1 #! /bin/sh
   2 # Guess values for system-dependent variables and create Makefiles.
   3 # Generated by GNU Autoconf 2.67 for OpenJDK jdk8.
   4 #
   5 # Report bugs to <build-dev@openjdk.java.net>.
   6 #
   7 #
   8 # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
   9 # 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software
  10 # Foundation, Inc.
  11 #
  12 #
  13 # This configure script is free software; the Free Software Foundation
  14 # gives unlimited permission to copy, distribute and modify it.
  15 ## -------------------- ##
  16 ## M4sh Initialization. ##
  17 ## -------------------- ##
  18 
  19 # Be more Bourne compatible
  20 DUALCASE=1; export DUALCASE # for MKS sh
  21 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
  22   emulate sh
  23   NULLCMD=:
  24   # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
  25   # is contrary to our usage.  Disable this feature.
  26   alias -g '${1+"$@"}'='"$@"'
  27   setopt NO_GLOB_SUBST
  28 else
  29   case `(set -o) 2>/dev/null` in #(
  30   *posix*) :
  31     set -o posix ;; #(
  32   *) :
  33      ;;
  34 esac
  35 fi
  36 
  37 
  38 as_nl='
  39 '
  40 export as_nl
  41 # Printing a long string crashes Solaris 7 /usr/bin/printf.
  42 as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
  43 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
  44 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
  45 # Prefer a ksh shell builtin over an external printf program on Solaris,
  46 # but without wasting forks for bash or zsh.
  47 if test -z "$BASH_VERSION$ZSH_VERSION" \
  48     && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
  49   as_echo='print -r --'
  50   as_echo_n='print -rn --'
  51 elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
  52   as_echo='printf %s\n'
  53   as_echo_n='printf %s'
  54 else
  55   if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
  56     as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
  57     as_echo_n='/usr/ucb/echo -n'
  58   else
  59     as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
  60     as_echo_n_body='eval
  61       arg=$1;
  62       case $arg in #(
  63       *"$as_nl"*)
  64         expr "X$arg" : "X\\(.*\\)$as_nl";
  65         arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
  66       esac;
  67       expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
  68     '
  69     export as_echo_n_body
  70     as_echo_n='sh -c $as_echo_n_body as_echo'
  71   fi
  72   export as_echo_body
  73   as_echo='sh -c $as_echo_body as_echo'
  74 fi
  75 
  76 # The user is always right.
  77 if test "${PATH_SEPARATOR+set}" != set; then
  78   PATH_SEPARATOR=:
  79   (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
  80     (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
  81       PATH_SEPARATOR=';'
  82   }
  83 fi
  84 
  85 
  86 # IFS
  87 # We need space, tab and new line, in precisely that order.  Quoting is
  88 # there to prevent editors from complaining about space-tab.
  89 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
  90 # splitting by setting IFS to empty value.)
  91 IFS=" ""        $as_nl"
  92 
  93 # Find who we are.  Look in the path if we contain no directory separator.
  94 case $0 in #((
  95   *[\\/]* ) as_myself=$0 ;;
  96   *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
  97 for as_dir in $PATH
  98 do
  99   IFS=$as_save_IFS
 100   test -z "$as_dir" && as_dir=.
 101     test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
 102   done
 103 IFS=$as_save_IFS
 104 
 105      ;;
 106 esac
 107 # We did not find ourselves, most probably we were run as `sh COMMAND'
 108 # in which case we are not to be found in the path.
 109 if test "x$as_myself" = x; then
 110   as_myself=$0
 111 fi
 112 if test ! -f "$as_myself"; then
 113   $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
 114   exit 1
 115 fi
 116 
 117 # Unset variables that we do not need and which cause bugs (e.g. in
 118 # pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
 119 # suppresses any "Segmentation fault" message there.  '((' could
 120 # trigger a bug in pdksh 5.2.14.
 121 for as_var in BASH_ENV ENV MAIL MAILPATH
 122 do eval test x\${$as_var+set} = xset \
 123   && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
 124 done
 125 PS1='$ '
 126 PS2='> '
 127 PS4='+ '
 128 
 129 # NLS nuisances.
 130 LC_ALL=C
 131 export LC_ALL
 132 LANGUAGE=C
 133 export LANGUAGE
 134 
 135 # CDPATH.
 136 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
 137 
 138 if test "x$CONFIG_SHELL" = x; then
 139   as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
 140   emulate sh
 141   NULLCMD=:
 142   # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
 143   # is contrary to our usage.  Disable this feature.
 144   alias -g '\${1+\"\$@\"}'='\"\$@\"'
 145   setopt NO_GLOB_SUBST
 146 else
 147   case \`(set -o) 2>/dev/null\` in #(
 148   *posix*) :
 149     set -o posix ;; #(
 150   *) :
 151      ;;
 152 esac
 153 fi
 154 "
 155   as_required="as_fn_return () { (exit \$1); }
 156 as_fn_success () { as_fn_return 0; }
 157 as_fn_failure () { as_fn_return 1; }
 158 as_fn_ret_success () { return 0; }
 159 as_fn_ret_failure () { return 1; }
 160 
 161 exitcode=0
 162 as_fn_success || { exitcode=1; echo as_fn_success failed.; }
 163 as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
 164 as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
 165 as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
 166 if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
 167 
 168 else
 169   exitcode=1; echo positional parameters were not saved.
 170 fi
 171 test x\$exitcode = x0 || exit 1"
 172   as_suggested="  as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
 173   as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
 174   eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
 175   test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
 176 test \$(( 1 + 1 )) = 2 || exit 1"
 177   if (eval "$as_required") 2>/dev/null; then :
 178   as_have_required=yes
 179 else
 180   as_have_required=no
 181 fi
 182   if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
 183 
 184 else
 185   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
 186 as_found=false
 187 for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
 188 do
 189   IFS=$as_save_IFS
 190   test -z "$as_dir" && as_dir=.
 191   as_found=:
 192   case $as_dir in #(
 193          /*)
 194            for as_base in sh bash ksh sh5; do
 195              # Try only shells that exist, to save several forks.
 196              as_shell=$as_dir/$as_base
 197              if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
 198                     { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
 199   CONFIG_SHELL=$as_shell as_have_required=yes
 200                    if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
 201   break 2
 202 fi
 203 fi
 204            done;;
 205        esac
 206   as_found=false
 207 done
 208 $as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
 209               { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
 210   CONFIG_SHELL=$SHELL as_have_required=yes
 211 fi; }
 212 IFS=$as_save_IFS
 213 
 214 
 215       if test "x$CONFIG_SHELL" != x; then :
 216   # We cannot yet assume a decent shell, so we have to provide a
 217         # neutralization value for shells without unset; and this also
 218         # works around shells that cannot unset nonexistent variables.
 219         BASH_ENV=/dev/null
 220         ENV=/dev/null
 221         (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
 222         export CONFIG_SHELL
 223         exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"}
 224 fi
 225 
 226     if test x$as_have_required = xno; then :
 227   $as_echo "$0: This script requires a shell more modern than all"
 228   $as_echo "$0: the shells that I found on your system."
 229   if test x${ZSH_VERSION+set} = xset ; then
 230     $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
 231     $as_echo "$0: be upgraded to zsh 4.3.4 or later."
 232   else
 233     $as_echo "$0: Please tell bug-autoconf@gnu.org and
 234 $0: build-dev@openjdk.java.net about your system, including
 235 $0: any error possibly output before this message. Then
 236 $0: install a modern shell, or manually run the script
 237 $0: under such a shell if you do have one."
 238   fi
 239   exit 1
 240 fi
 241 fi
 242 fi
 243 SHELL=${CONFIG_SHELL-/bin/sh}
 244 export SHELL
 245 # Unset more variables known to interfere with behavior of common tools.
 246 CLICOLOR_FORCE= GREP_OPTIONS=
 247 unset CLICOLOR_FORCE GREP_OPTIONS
 248 
 249 ## --------------------- ##
 250 ## M4sh Shell Functions. ##
 251 ## --------------------- ##
 252 # as_fn_unset VAR
 253 # ---------------
 254 # Portably unset VAR.
 255 as_fn_unset ()
 256 {
 257   { eval $1=; unset $1;}
 258 }
 259 as_unset=as_fn_unset
 260 
 261 # as_fn_set_status STATUS
 262 # -----------------------
 263 # Set $? to STATUS, without forking.
 264 as_fn_set_status ()
 265 {
 266   return $1
 267 } # as_fn_set_status
 268 
 269 # as_fn_exit STATUS
 270 # -----------------
 271 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
 272 as_fn_exit ()
 273 {
 274   set +e
 275   as_fn_set_status $1
 276   exit $1
 277 } # as_fn_exit
 278 
 279 # as_fn_mkdir_p
 280 # -------------
 281 # Create "$as_dir" as a directory, including parents if necessary.
 282 as_fn_mkdir_p ()
 283 {
 284 
 285   case $as_dir in #(
 286   -*) as_dir=./$as_dir;;
 287   esac
 288   test -d "$as_dir" || eval $as_mkdir_p || {
 289     as_dirs=
 290     while :; do
 291       case $as_dir in #(
 292       *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
 293       *) as_qdir=$as_dir;;
 294       esac
 295       as_dirs="'$as_qdir' $as_dirs"
 296       as_dir=`$as_dirname -- "$as_dir" ||
 297 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
 298          X"$as_dir" : 'X\(//\)[^/]' \| \
 299          X"$as_dir" : 'X\(//\)$' \| \
 300          X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
 301 $as_echo X"$as_dir" |
 302     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
 303             s//\1/
 304             q
 305           }
 306           /^X\(\/\/\)[^/].*/{
 307             s//\1/
 308             q
 309           }
 310           /^X\(\/\/\)$/{
 311             s//\1/
 312             q
 313           }
 314           /^X\(\/\).*/{
 315             s//\1/
 316             q
 317           }
 318           s/.*/./; q'`
 319       test -d "$as_dir" && break
 320     done
 321     test -z "$as_dirs" || eval "mkdir $as_dirs"
 322   } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
 323 
 324 
 325 } # as_fn_mkdir_p
 326 # as_fn_append VAR VALUE
 327 # ----------------------
 328 # Append the text in VALUE to the end of the definition contained in VAR. Take
 329 # advantage of any shell optimizations that allow amortized linear growth over
 330 # repeated appends, instead of the typical quadratic growth present in naive
 331 # implementations.
 332 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
 333   eval 'as_fn_append ()
 334   {
 335     eval $1+=\$2
 336   }'
 337 else
 338   as_fn_append ()
 339   {
 340     eval $1=\$$1\$2
 341   }
 342 fi # as_fn_append
 343 
 344 # as_fn_arith ARG...
 345 # ------------------
 346 # Perform arithmetic evaluation on the ARGs, and store the result in the
 347 # global $as_val. Take advantage of shells that can avoid forks. The arguments
 348 # must be portable across $(()) and expr.
 349 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
 350   eval 'as_fn_arith ()
 351   {
 352     as_val=$(( $* ))
 353   }'
 354 else
 355   as_fn_arith ()
 356   {
 357     as_val=`expr "$@" || test $? -eq 1`
 358   }
 359 fi # as_fn_arith
 360 
 361 
 362 # as_fn_error STATUS ERROR [LINENO LOG_FD]
 363 # ----------------------------------------
 364 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
 365 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
 366 # script with STATUS, using 1 if that was 0.
 367 as_fn_error ()
 368 {
 369   as_status=$1; test $as_status -eq 0 && as_status=1
 370   if test "$4"; then
 371     as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
 372     $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
 373   fi
 374   $as_echo "$as_me: error: $2" >&2
 375   as_fn_exit $as_status
 376 } # as_fn_error
 377 
 378 if expr a : '\(a\)' >/dev/null 2>&1 &&
 379    test "X`expr 00001 : '.*\(...\)'`" = X001; then
 380   as_expr=expr
 381 else
 382   as_expr=false
 383 fi
 384 
 385 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
 386   as_basename=basename
 387 else
 388   as_basename=false
 389 fi
 390 
 391 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
 392   as_dirname=dirname
 393 else
 394   as_dirname=false
 395 fi
 396 
 397 as_me=`$as_basename -- "$0" ||
 398 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
 399          X"$0" : 'X\(//\)$' \| \
 400          X"$0" : 'X\(/\)' \| . 2>/dev/null ||
 401 $as_echo X/"$0" |
 402     sed '/^.*\/\([^/][^/]*\)\/*$/{
 403             s//\1/
 404             q
 405           }
 406           /^X\/\(\/\/\)$/{
 407             s//\1/
 408             q
 409           }
 410           /^X\/\(\/\).*/{
 411             s//\1/
 412             q
 413           }
 414           s/.*/./; q'`
 415 
 416 # Avoid depending upon Character Ranges.
 417 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
 418 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
 419 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
 420 as_cr_digits='0123456789'
 421 as_cr_alnum=$as_cr_Letters$as_cr_digits
 422 
 423 
 424   as_lineno_1=$LINENO as_lineno_1a=$LINENO
 425   as_lineno_2=$LINENO as_lineno_2a=$LINENO
 426   eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
 427   test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
 428   # Blame Lee E. McMahon (1931-1989) for sed's syntax.  :-)
 429   sed -n '
 430     p
 431     /[$]LINENO/=
 432   ' <$as_myself |
 433     sed '
 434       s/[$]LINENO.*/&-/
 435       t lineno
 436       b
 437       :lineno
 438       N
 439       :loop
 440       s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
 441       t loop
 442       s/-\n.*//
 443     ' >$as_me.lineno &&
 444   chmod +x "$as_me.lineno" ||
 445     { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
 446 
 447   # Don't try to exec as it changes $[0], causing all sort of problems
 448   # (the dirname of $[0] is not the place where we might find the
 449   # original and so on.  Autoconf is especially sensitive to this).
 450   . "./$as_me.lineno"
 451   # Exit status is that of the last command.
 452   exit
 453 }
 454 
 455 ECHO_C= ECHO_N= ECHO_T=
 456 case `echo -n x` in #(((((
 457 -n*)
 458   case `echo 'xy\c'` in
 459   *c*) ECHO_T=' ';;     # ECHO_T is single tab character.
 460   xy)  ECHO_C='\c';;
 461   *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
 462        ECHO_T=' ';;
 463   esac;;
 464 *)
 465   ECHO_N='-n';;
 466 esac
 467 
 468 rm -f conf$$ conf$$.exe conf$$.file
 469 if test -d conf$$.dir; then
 470   rm -f conf$$.dir/conf$$.file
 471 else
 472   rm -f conf$$.dir
 473   mkdir conf$$.dir 2>/dev/null
 474 fi
 475 if (echo >conf$$.file) 2>/dev/null; then
 476   if ln -s conf$$.file conf$$ 2>/dev/null; then
 477     as_ln_s='ln -s'
 478     # ... but there are two gotchas:
 479     # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
 480     # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
 481     # In both cases, we have to default to `cp -p'.
 482     ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
 483       as_ln_s='cp -p'
 484   elif ln conf$$.file conf$$ 2>/dev/null; then
 485     as_ln_s=ln
 486   else
 487     as_ln_s='cp -p'
 488   fi
 489 else
 490   as_ln_s='cp -p'
 491 fi
 492 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
 493 rmdir conf$$.dir 2>/dev/null
 494 
 495 if mkdir -p . 2>/dev/null; then
 496   as_mkdir_p='mkdir -p "$as_dir"'
 497 else
 498   test -d ./-p && rmdir ./-p
 499   as_mkdir_p=false
 500 fi
 501 
 502 if test -x / >/dev/null 2>&1; then
 503   as_test_x='test -x'
 504 else
 505   if ls -dL / >/dev/null 2>&1; then
 506     as_ls_L_option=L
 507   else
 508     as_ls_L_option=
 509   fi
 510   as_test_x='
 511     eval sh -c '\''
 512       if test -d "$1"; then
 513         test -d "$1/.";
 514       else
 515         case $1 in #(
 516         -*)set "./$1";;
 517         esac;
 518         case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
 519         ???[sx]*):;;*)false;;esac;fi
 520     '\'' sh
 521   '
 522 fi
 523 as_executable_p=$as_test_x
 524 
 525 # Sed expression to map a string onto a valid CPP name.
 526 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
 527 
 528 # Sed expression to map a string onto a valid variable name.
 529 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
 530 
 531 
 532 test -n "$DJDIR" || exec 7<&0 </dev/null
 533 exec 6>&1
 534 
 535 # Name of the host.
 536 # hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
 537 # so uname gets run too.
 538 ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
 539 
 540 #
 541 # Initializations.
 542 #
 543 ac_default_prefix=/usr/local
 544 ac_clean_files=
 545 ac_config_libobj_dir=.
 546 LIBOBJS=
 547 cross_compiling=no
 548 subdirs=
 549 MFLAGS=
 550 MAKEFLAGS=
 551 
 552 # Identity of this package.
 553 PACKAGE_NAME='OpenJDK'
 554 PACKAGE_TARNAME='openjdk'
 555 PACKAGE_VERSION='jdk8'
 556 PACKAGE_STRING='OpenJDK jdk8'
 557 PACKAGE_BUGREPORT='build-dev@openjdk.java.net'
 558 PACKAGE_URL='http://openjdk.java.net'
 559 
 560 # Factoring default headers for most tests.
 561 ac_includes_default="\
 562 #include <stdio.h>
 563 #ifdef HAVE_SYS_TYPES_H
 564 # include <sys/types.h>
 565 #endif
 566 #ifdef HAVE_SYS_STAT_H
 567 # include <sys/stat.h>
 568 #endif
 569 #ifdef STDC_HEADERS
 570 # include <stdlib.h>
 571 # include <stddef.h>
 572 #else
 573 # ifdef HAVE_STDLIB_H
 574 #  include <stdlib.h>
 575 # endif
 576 #endif
 577 #ifdef HAVE_STRING_H
 578 # if !defined STDC_HEADERS && defined HAVE_MEMORY_H
 579 #  include <memory.h>
 580 # endif
 581 # include <string.h>
 582 #endif
 583 #ifdef HAVE_STRINGS_H
 584 # include <strings.h>
 585 #endif
 586 #ifdef HAVE_INTTYPES_H
 587 # include <inttypes.h>
 588 #endif
 589 #ifdef HAVE_STDINT_H
 590 # include <stdint.h>
 591 #endif
 592 #ifdef HAVE_UNISTD_H
 593 # include <unistd.h>
 594 #endif"
 595 
 596 ac_subst_vars='LTLIBOBJS
 597 LIBOBJS
 598 CCACHE
 599 USE_PRECOMPILED_HEADER
 600 SJAVAC_SERVER_DIR
 601 ENABLE_SJAVAC
 602 SJAVAC_SERVER_JAVA
 603 JOBS
 604 MEMORY_SIZE
 605 NUM_CORES
 606 ENABLE_INTREE_EC
 607 SALIB_NAME
 608 HOTSPOT_MAKE_ARGS
 609 FIXPATH
 610 LIBCXX
 611 LLVM_LIBS
 612 LLVM_LDFLAGS
 613 LLVM_CFLAGS
 614 LLVM_CONFIG
 615 LIBFFI_LIBS
 616 LIBFFI_CFLAGS
 617 STATIC_CXX_SETTING
 618 LIBDL
 619 LIBM
 620 LIBZIP_CAN_USE_MMAP
 621 USE_EXTERNAL_LIBZ
 622 USE_EXTERNAL_LIBGIF
 623 USE_EXTERNAL_LIBJPEG
 624 ALSA_LIBS
 625 ALSA_CFLAGS
 626 FREETYPE2_LIB_PATH
 627 USING_SYSTEM_FT_LIB
 628 FREETYPE2_LIBS
 629 FREETYPE2_CFLAGS
 630 CUPS_CFLAGS
 631 OPENWIN_HOME
 632 X_EXTRA_LIBS
 633 X_LIBS
 634 X_PRE_LIBS
 635 X_CFLAGS
 636 XMKMF
 637 CXXFLAGS_DEBUG_SYMBOLS
 638 CFLAGS_DEBUG_SYMBOLS
 639 ZIP_DEBUGINFO_FILES
 640 ENABLE_DEBUG_SYMBOLS
 641 COMPILER_SUPPORTS_TARGET_BITS_FLAG
 642 ZERO_ARCHFLAG
 643 LDFLAGS_CXX_JDK
 644 LDFLAGS_JDKEXE_SUFFIX
 645 LDFLAGS_JDKLIB_SUFFIX
 646 LDFLAGS_JDKEXE
 647 LDFLAGS_JDKLIB
 648 CXXFLAGS_JDKEXE
 649 CXXFLAGS_JDKLIB
 650 CFLAGS_JDKEXE
 651 CFLAGS_JDKLIB
 652 MACOSX_VERSION_MIN
 653 PACKAGE_PATH
 654 LEGACY_EXTRA_LDFLAGS
 655 LEGACY_EXTRA_CXXFLAGS
 656 LEGACY_EXTRA_CFLAGS
 657 CXX_FLAG_DEPS
 658 C_FLAG_DEPS
 659 CXX_O_FLAG_NONE
 660 CXX_O_FLAG_NORM
 661 CXX_O_FLAG_HI
 662 CXX_O_FLAG_HIGHEST
 663 C_O_FLAG_NONE
 664 C_O_FLAG_NORM
 665 C_O_FLAG_HI
 666 C_O_FLAG_HIGHEST
 667 POST_MCS_CMD
 668 POST_STRIP_CMD
 669 SET_EXECUTABLE_ORIGIN
 670 SET_SHARED_LIBRARY_ORIGIN
 671 CXX_FLAG_REORDER
 672 C_FLAG_REORDER
 673 SET_SHARED_LIBRARY_MAPFILE
 674 SET_SHARED_LIBRARY_NAME
 675 SHARED_LIBRARY_FLAGS
 676 EXE_SUFFIX
 677 STATIC_LIBRARY_SUFFIX
 678 SHARED_LIBRARY_SUFFIX
 679 LIBRARY_PREFIX
 680 STATIC_LIBRARY
 681 SHARED_LIBRARY
 682 OBJ_SUFFIX
 683 COMPILER_NAME
 684 JT_HOME
 685 JTREGEXE
 686 LIPO
 687 ac_ct_OBJDUMP
 688 OBJDUMP
 689 ac_ct_OBJCOPY
 690 OBJCOPY
 691 MCS
 692 STRIP
 693 GNM
 694 NM
 695 AS
 696 CXXCPP
 697 CPP
 698 COMPILER_TYPE
 699 RC_FLAGS
 700 DUMPBIN
 701 WINAR
 702 HOTSPOT_RC
 703 HOTSPOT_MT
 704 RC
 705 MT
 706 WINLD
 707 HOTSPOT_LD
 708 HOTSPOT_CXX
 709 ARFLAGS
 710 AR
 711 LDEXECXX
 712 LDCXX
 713 LDEXE
 714 LD
 715 ac_ct_OBJC
 716 OBJCFLAGS
 717 OBJC
 718 ac_ct_CXX
 719 CXXFLAGS
 720 CXX
 721 ac_ct_PROPER_COMPILER_CXX
 722 PROPER_COMPILER_CXX
 723 POTENTIAL_CXX
 724 TOOLS_DIR_CXX
 725 OBJEXT
 726 EXEEXT
 727 ac_ct_CC
 728 CPPFLAGS
 729 LDFLAGS
 730 CFLAGS
 731 CC
 732 ac_ct_PROPER_COMPILER_CC
 733 PROPER_COMPILER_CC
 734 POTENTIAL_CC
 735 TOOLS_DIR_CC
 736 BUILD_LD
 737 BUILD_CXX
 738 BUILD_CC
 739 MSVCR_DLL
 740 DXSDK_INCLUDE_PATH
 741 DXSDK_LIB_PATH
 742 VS_PATH
 743 VS_LIB
 744 VS_INCLUDE
 745 CYGWIN_LINK
 746 AR_OUT_OPTION
 747 LD_OUT_OPTION
 748 EXE_OUT_OPTION
 749 CC_OUT_OPTION
 750 BUILD_HOTSPOT
 751 HOTSPOT_DIST
 752 BUILD_OUTPUT
 753 OVERRIDE_SRC_ROOT
 754 ADD_SRC_ROOT
 755 JDK_TOPDIR
 756 NASHORN_TOPDIR
 757 HOTSPOT_TOPDIR
 758 JAXWS_TOPDIR
 759 JAXP_TOPDIR
 760 CORBA_TOPDIR
 761 LANGTOOLS_TOPDIR
 762 BOOT_JDK_JVMARGS
 763 JAVAC_FLAGS
 764 BOOT_JDK_SOURCETARGET
 765 BOOT_JDK
 766 BOOT_TOOLSJAR
 767 BOOT_RTJAR
 768 JAVA_CHECK
 769 JAVAC_CHECK
 770 COOKED_BUILD_NUMBER
 771 JDK_VERSION
 772 COPYRIGHT_YEAR
 773 MACOSX_BUNDLE_ID_BASE
 774 MACOSX_BUNDLE_NAME_BASE
 775 COMPANY_NAME
 776 JDK_RC_PLATFORM_NAME
 777 PRODUCT_SUFFIX
 778 PRODUCT_NAME
 779 LAUNCHER_NAME
 780 MILESTONE
 781 JDK_BUILD_NUMBER
 782 JDK_UPDATE_VERSION
 783 JDK_MICRO_VERSION
 784 JDK_MINOR_VERSION
 785 JDK_MAJOR_VERSION
 786 USER_RELEASE_SUFFIX
 787 COMPRESS_JARS
 788 UNLIMITED_CRYPTO
 789 CACERTS_FILE
 790 TEST_IN_BUILD
 791 BUILD_HEADLESS
 792 SUPPORT_HEADFUL
 793 SUPPORT_HEADLESS
 794 BDEPS_FTP
 795 BDEPS_UNZIP
 796 OS_VERSION_MICRO
 797 OS_VERSION_MINOR
 798 OS_VERSION_MAJOR
 799 PKG_CONFIG
 800 CODESIGN
 801 XATTR
 802 TIME
 803 STAT
 804 HG
 805 READELF
 806 OTOOL
 807 LDD
 808 ZIP
 809 UNZIP
 810 FIND_DELETE
 811 MAKE
 812 CHECK_TOOLSDIR_MAKE
 813 CHECK_TOOLSDIR_GMAKE
 814 CHECK_MAKE
 815 CHECK_GMAKE
 816 PKGHANDLER
 817 OUTPUT_ROOT
 818 CONF_NAME
 819 SPEC
 820 BUILD_VARIANT_RELEASE
 821 DEBUG_CLASSFILES
 822 FASTDEBUG
 823 VARIANT
 824 DEBUG_LEVEL
 825 MACOSX_UNIVERSAL
 826 INCLUDE_SA
 827 JVM_VARIANT_ZEROSHARK
 828 JVM_VARIANT_ZERO
 829 JVM_VARIANT_KERNEL
 830 JVM_VARIANT_MINIMAL1
 831 JVM_VARIANT_CLIENT
 832 JVM_VARIANT_SERVER
 833 JVM_VARIANTS
 834 JDK_VARIANT
 835 SET_OPENJDK
 836 BUILD_LOG_WRAPPER
 837 BUILD_LOG_PREVIOUS
 838 BUILD_LOG
 839 SYS_ROOT
 840 PATH_SEP
 841 SRC_ROOT
 842 ZERO_ARCHDEF
 843 DEFINE_CROSS_COMPILE_ARCH
 844 LP64
 845 OPENJDK_TARGET_OS_API_DIR
 846 OPENJDK_TARGET_CPU_JLI_CFLAGS
 847 OPENJDK_TARGET_CPU_OSARCH
 848 OPENJDK_TARGET_CPU_ISADIR
 849 OPENJDK_TARGET_CPU_LIBDIR
 850 OPENJDK_TARGET_CPU_LEGACY_LIB
 851 OPENJDK_TARGET_CPU_LEGACY
 852 REQUIRED_OS_VERSION
 853 REQUIRED_OS_NAME
 854 COMPILE_TYPE
 855 OPENJDK_TARGET_CPU_ENDIAN
 856 OPENJDK_TARGET_CPU_BITS
 857 OPENJDK_TARGET_CPU_ARCH
 858 OPENJDK_TARGET_CPU
 859 OPENJDK_TARGET_OS_API
 860 OPENJDK_TARGET_OS
 861 OPENJDK_BUILD_CPU_ENDIAN
 862 OPENJDK_BUILD_CPU_BITS
 863 OPENJDK_BUILD_CPU_ARCH
 864 OPENJDK_BUILD_CPU
 865 OPENJDK_BUILD_OS_API
 866 OPENJDK_BUILD_OS
 867 OPENJDK_BUILD_AUTOCONF_NAME
 868 OPENJDK_TARGET_AUTOCONF_NAME
 869 target_os
 870 target_vendor
 871 target_cpu
 872 target
 873 host_os
 874 host_vendor
 875 host_cpu
 876 host
 877 build_os
 878 build_vendor
 879 build_cpu
 880 build
 881 SETFILE
 882 DF
 883 READLINK
 884 CYGPATH
 885 NAWK
 886 SED
 887 FGREP
 888 EGREP
 889 GREP
 890 AWK
 891 XARGS
 892 WHICH
 893 WC
 894 UNIQ
 895 UNAME
 896 TR
 897 TOUCH
 898 TEE
 899 TAR
 900 TAIL
 901 SORT
 902 SH
 903 RM
 904 PRINTF
 905 MV
 906 MKTEMP
 907 MKDIR
 908 LS
 909 LN
 910 HEAD
 911 FIND
 912 FILE
 913 EXPR
 914 ECHO
 915 DIRNAME
 916 DIFF
 917 DATE
 918 CUT
 919 CPIO
 920 CP
 921 COMM
 922 CMP
 923 CHMOD
 924 CAT
 925 BASH
 926 BASENAME
 927 DATE_WHEN_CONFIGURED
 928 CONFIGURE_COMMAND_LINE
 929 CUSTOM_MAKE_DIR
 930 target_alias
 931 host_alias
 932 build_alias
 933 LIBS
 934 ECHO_T
 935 ECHO_N
 936 ECHO_C
 937 DEFS
 938 mandir
 939 localedir
 940 libdir
 941 psdir
 942 pdfdir
 943 dvidir
 944 htmldir
 945 infodir
 946 docdir
 947 oldincludedir
 948 includedir
 949 localstatedir
 950 sharedstatedir
 951 sysconfdir
 952 datadir
 953 datarootdir
 954 libexecdir
 955 sbindir
 956 bindir
 957 program_transform_name
 958 prefix
 959 exec_prefix
 960 PACKAGE_URL
 961 PACKAGE_BUGREPORT
 962 PACKAGE_STRING
 963 PACKAGE_VERSION
 964 PACKAGE_TARNAME
 965 PACKAGE_NAME
 966 PATH_SEPARATOR
 967 SHELL'
 968 ac_subst_files=''
 969 ac_user_opts='
 970 enable_option_checking
 971 with_custom_make_dir
 972 with_target_bits
 973 with_sys_root
 974 with_tools_dir
 975 with_devkit
 976 enable_openjdk_only
 977 with_jdk_variant
 978 with_jvm_variants
 979 enable_debug
 980 with_debug_level
 981 with_conf_name
 982 with_builddeps_conf
 983 with_builddeps_server
 984 with_builddeps_dir
 985 with_builddeps_group
 986 enable_headful
 987 enable_hotspot_test_in_build
 988 with_cacerts_file
 989 enable_unlimited_crypto
 990 with_milestone
 991 with_update_version
 992 with_build_number
 993 with_user_release_suffix
 994 with_boot_jdk
 995 with_boot_jdk_jvmargs
 996 with_add_source_root
 997 with_override_source_root
 998 with_adds_and_overrides
 999 with_override_langtools
1000 with_override_corba
1001 with_override_jaxp
1002 with_override_jaxws
1003 with_override_hotspot
1004 with_override_jdk
1005 with_import_hotspot
1006 with_msvcr_dll
1007 with_dxsdk
1008 with_dxsdk_lib
1009 with_dxsdk_include
1010 with_jtreg
1011 with_extra_cflags
1012 with_extra_cxxflags
1013 with_extra_ldflags
1014 enable_debug_symbols
1015 enable_zip_debug_info
1016 enable_macosx_runtime_support
1017 with_x
1018 with_cups
1019 with_cups_include
1020 with_freetype
1021 with_alsa
1022 with_alsa_include
1023 with_alsa_lib
1024 with_giflib
1025 with_zlib
1026 with_stdc__lib
1027 with_num_cores
1028 with_memory_size
1029 with_jobs
1030 with_sjavac_server_java
1031 enable_sjavac
1032 enable_precompiled_headers
1033 enable_ccache
1034 with_ccache_dir
1035 '
1036       ac_precious_vars='build_alias
1037 host_alias
1038 target_alias
1039 PKG_CONFIG
1040 CC
1041 CFLAGS
1042 LDFLAGS
1043 LIBS
1044 CPPFLAGS
1045 CXX
1046 CXXFLAGS
1047 CCC
1048 OBJC
1049 OBJCFLAGS
1050 CPP
1051 CXXCPP
1052 XMKMF
1053 FREETYPE2_CFLAGS
1054 FREETYPE2_LIBS
1055 ALSA_CFLAGS
1056 ALSA_LIBS
1057 LIBFFI_CFLAGS
1058 LIBFFI_LIBS'
1059 
1060 
1061 # Initialize some variables set by options.
1062 ac_init_help=
1063 ac_init_version=false
1064 ac_unrecognized_opts=
1065 ac_unrecognized_sep=
1066 # The variables have the same names as the options, with
1067 # dashes changed to underlines.
1068 cache_file=/dev/null
1069 exec_prefix=NONE
1070 no_create=
1071 no_recursion=
1072 prefix=NONE
1073 program_prefix=NONE
1074 program_suffix=NONE
1075 program_transform_name=s,x,x,
1076 silent=
1077 site=
1078 srcdir=
1079 verbose=
1080 x_includes=NONE
1081 x_libraries=NONE
1082 
1083 # Installation directory options.
1084 # These are left unexpanded so users can "make install exec_prefix=/foo"
1085 # and all the variables that are supposed to be based on exec_prefix
1086 # by default will actually change.
1087 # Use braces instead of parens because sh, perl, etc. also accept them.
1088 # (The list follows the same order as the GNU Coding Standards.)
1089 bindir='${exec_prefix}/bin'
1090 sbindir='${exec_prefix}/sbin'
1091 libexecdir='${exec_prefix}/libexec'
1092 datarootdir='${prefix}/share'
1093 datadir='${datarootdir}'
1094 sysconfdir='${prefix}/etc'
1095 sharedstatedir='${prefix}/com'
1096 localstatedir='${prefix}/var'
1097 includedir='${prefix}/include'
1098 oldincludedir='/usr/include'
1099 docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
1100 infodir='${datarootdir}/info'
1101 htmldir='${docdir}'
1102 dvidir='${docdir}'
1103 pdfdir='${docdir}'
1104 psdir='${docdir}'
1105 libdir='${exec_prefix}/lib'
1106 localedir='${datarootdir}/locale'
1107 mandir='${datarootdir}/man'
1108 
1109 ac_prev=
1110 ac_dashdash=
1111 for ac_option
1112 do
1113   # If the previous option needs an argument, assign it.
1114   if test -n "$ac_prev"; then
1115     eval $ac_prev=\$ac_option
1116     ac_prev=
1117     continue
1118   fi
1119 
1120   case $ac_option in
1121   *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
1122   *=)   ac_optarg= ;;
1123   *)    ac_optarg=yes ;;
1124   esac
1125 
1126   # Accept the important Cygnus configure options, so we can diagnose typos.
1127 
1128   case $ac_dashdash$ac_option in
1129   --)
1130     ac_dashdash=yes ;;
1131 
1132   -bindir | --bindir | --bindi | --bind | --bin | --bi)
1133     ac_prev=bindir ;;
1134   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
1135     bindir=$ac_optarg ;;
1136 
1137   -build | --build | --buil | --bui | --bu)
1138     ac_prev=build_alias ;;
1139   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
1140     build_alias=$ac_optarg ;;
1141 
1142   -cache-file | --cache-file | --cache-fil | --cache-fi \
1143   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1144     ac_prev=cache_file ;;
1145   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1146   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
1147     cache_file=$ac_optarg ;;
1148 
1149   --config-cache | -C)
1150     cache_file=config.cache ;;
1151 
1152   -datadir | --datadir | --datadi | --datad)
1153     ac_prev=datadir ;;
1154   -datadir=* | --datadir=* | --datadi=* | --datad=*)
1155     datadir=$ac_optarg ;;
1156 
1157   -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1158   | --dataroo | --dataro | --datar)
1159     ac_prev=datarootdir ;;
1160   -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1161   | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1162     datarootdir=$ac_optarg ;;
1163 
1164   -disable-* | --disable-*)
1165     ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1166     # Reject names that are not valid shell variable names.
1167     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1168       as_fn_error $? "invalid feature name: $ac_useropt"
1169     ac_useropt_orig=$ac_useropt
1170     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1171     case $ac_user_opts in
1172       *"
1173 "enable_$ac_useropt"
1174 "*) ;;
1175       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1176          ac_unrecognized_sep=', ';;
1177     esac
1178     eval enable_$ac_useropt=no ;;
1179 
1180   -docdir | --docdir | --docdi | --doc | --do)
1181     ac_prev=docdir ;;
1182   -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1183     docdir=$ac_optarg ;;
1184 
1185   -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1186     ac_prev=dvidir ;;
1187   -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1188     dvidir=$ac_optarg ;;
1189 
1190   -enable-* | --enable-*)
1191     ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1192     # Reject names that are not valid shell variable names.
1193     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1194       as_fn_error $? "invalid feature name: $ac_useropt"
1195     ac_useropt_orig=$ac_useropt
1196     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1197     case $ac_user_opts in
1198       *"
1199 "enable_$ac_useropt"
1200 "*) ;;
1201       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1202          ac_unrecognized_sep=', ';;
1203     esac
1204     eval enable_$ac_useropt=\$ac_optarg ;;
1205 
1206   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1207   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1208   | --exec | --exe | --ex)
1209     ac_prev=exec_prefix ;;
1210   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1211   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1212   | --exec=* | --exe=* | --ex=*)
1213     exec_prefix=$ac_optarg ;;
1214 
1215   -gas | --gas | --ga | --g)
1216     # Obsolete; use --with-gas.
1217     with_gas=yes ;;
1218 
1219   -help | --help | --hel | --he | -h)
1220     ac_init_help=long ;;
1221   -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1222     ac_init_help=recursive ;;
1223   -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1224     ac_init_help=short ;;
1225 
1226   -host | --host | --hos | --ho)
1227     ac_prev=host_alias ;;
1228   -host=* | --host=* | --hos=* | --ho=*)
1229     host_alias=$ac_optarg ;;
1230 
1231   -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1232     ac_prev=htmldir ;;
1233   -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1234   | --ht=*)
1235     htmldir=$ac_optarg ;;
1236 
1237   -includedir | --includedir | --includedi | --included | --include \
1238   | --includ | --inclu | --incl | --inc)
1239     ac_prev=includedir ;;
1240   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1241   | --includ=* | --inclu=* | --incl=* | --inc=*)
1242     includedir=$ac_optarg ;;
1243 
1244   -infodir | --infodir | --infodi | --infod | --info | --inf)
1245     ac_prev=infodir ;;
1246   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1247     infodir=$ac_optarg ;;
1248 
1249   -libdir | --libdir | --libdi | --libd)
1250     ac_prev=libdir ;;
1251   -libdir=* | --libdir=* | --libdi=* | --libd=*)
1252     libdir=$ac_optarg ;;
1253 
1254   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1255   | --libexe | --libex | --libe)
1256     ac_prev=libexecdir ;;
1257   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1258   | --libexe=* | --libex=* | --libe=*)
1259     libexecdir=$ac_optarg ;;
1260 
1261   -localedir | --localedir | --localedi | --localed | --locale)
1262     ac_prev=localedir ;;
1263   -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1264     localedir=$ac_optarg ;;
1265 
1266   -localstatedir | --localstatedir | --localstatedi | --localstated \
1267   | --localstate | --localstat | --localsta | --localst | --locals)
1268     ac_prev=localstatedir ;;
1269   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1270   | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1271     localstatedir=$ac_optarg ;;
1272 
1273   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1274     ac_prev=mandir ;;
1275   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1276     mandir=$ac_optarg ;;
1277 
1278   -nfp | --nfp | --nf)
1279     # Obsolete; use --without-fp.
1280     with_fp=no ;;
1281 
1282   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1283   | --no-cr | --no-c | -n)
1284     no_create=yes ;;
1285 
1286   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1287   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1288     no_recursion=yes ;;
1289 
1290   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1291   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1292   | --oldin | --oldi | --old | --ol | --o)
1293     ac_prev=oldincludedir ;;
1294   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1295   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1296   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1297     oldincludedir=$ac_optarg ;;
1298 
1299   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1300     ac_prev=prefix ;;
1301   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1302     prefix=$ac_optarg ;;
1303 
1304   -program-prefix | --program-prefix | --program-prefi | --program-pref \
1305   | --program-pre | --program-pr | --program-p)
1306     ac_prev=program_prefix ;;
1307   -program-prefix=* | --program-prefix=* | --program-prefi=* \
1308   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1309     program_prefix=$ac_optarg ;;
1310 
1311   -program-suffix | --program-suffix | --program-suffi | --program-suff \
1312   | --program-suf | --program-su | --program-s)
1313     ac_prev=program_suffix ;;
1314   -program-suffix=* | --program-suffix=* | --program-suffi=* \
1315   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1316     program_suffix=$ac_optarg ;;
1317 
1318   -program-transform-name | --program-transform-name \
1319   | --program-transform-nam | --program-transform-na \
1320   | --program-transform-n | --program-transform- \
1321   | --program-transform | --program-transfor \
1322   | --program-transfo | --program-transf \
1323   | --program-trans | --program-tran \
1324   | --progr-tra | --program-tr | --program-t)
1325     ac_prev=program_transform_name ;;
1326   -program-transform-name=* | --program-transform-name=* \
1327   | --program-transform-nam=* | --program-transform-na=* \
1328   | --program-transform-n=* | --program-transform-=* \
1329   | --program-transform=* | --program-transfor=* \
1330   | --program-transfo=* | --program-transf=* \
1331   | --program-trans=* | --program-tran=* \
1332   | --progr-tra=* | --program-tr=* | --program-t=*)
1333     program_transform_name=$ac_optarg ;;
1334 
1335   -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1336     ac_prev=pdfdir ;;
1337   -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1338     pdfdir=$ac_optarg ;;
1339 
1340   -psdir | --psdir | --psdi | --psd | --ps)
1341     ac_prev=psdir ;;
1342   -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1343     psdir=$ac_optarg ;;
1344 
1345   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1346   | -silent | --silent | --silen | --sile | --sil)
1347     silent=yes ;;
1348 
1349   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1350     ac_prev=sbindir ;;
1351   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1352   | --sbi=* | --sb=*)
1353     sbindir=$ac_optarg ;;
1354 
1355   -sharedstatedir | --sharedstatedir | --sharedstatedi \
1356   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1357   | --sharedst | --shareds | --shared | --share | --shar \
1358   | --sha | --sh)
1359     ac_prev=sharedstatedir ;;
1360   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1361   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1362   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1363   | --sha=* | --sh=*)
1364     sharedstatedir=$ac_optarg ;;
1365 
1366   -site | --site | --sit)
1367     ac_prev=site ;;
1368   -site=* | --site=* | --sit=*)
1369     site=$ac_optarg ;;
1370 
1371   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1372     ac_prev=srcdir ;;
1373   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1374     srcdir=$ac_optarg ;;
1375 
1376   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1377   | --syscon | --sysco | --sysc | --sys | --sy)
1378     ac_prev=sysconfdir ;;
1379   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1380   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1381     sysconfdir=$ac_optarg ;;
1382 
1383   -target | --target | --targe | --targ | --tar | --ta | --t)
1384     ac_prev=target_alias ;;
1385   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1386     target_alias=$ac_optarg ;;
1387 
1388   -v | -verbose | --verbose | --verbos | --verbo | --verb)
1389     verbose=yes ;;
1390 
1391   -version | --version | --versio | --versi | --vers | -V)
1392     ac_init_version=: ;;
1393 
1394   -with-* | --with-*)
1395     ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1396     # Reject names that are not valid shell variable names.
1397     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1398       as_fn_error $? "invalid package name: $ac_useropt"
1399     ac_useropt_orig=$ac_useropt
1400     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1401     case $ac_user_opts in
1402       *"
1403 "with_$ac_useropt"
1404 "*) ;;
1405       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1406          ac_unrecognized_sep=', ';;
1407     esac
1408     eval with_$ac_useropt=\$ac_optarg ;;
1409 
1410   -without-* | --without-*)
1411     ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1412     # Reject names that are not valid shell variable names.
1413     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1414       as_fn_error $? "invalid package name: $ac_useropt"
1415     ac_useropt_orig=$ac_useropt
1416     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1417     case $ac_user_opts in
1418       *"
1419 "with_$ac_useropt"
1420 "*) ;;
1421       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1422          ac_unrecognized_sep=', ';;
1423     esac
1424     eval with_$ac_useropt=no ;;
1425 
1426   --x)
1427     # Obsolete; use --with-x.
1428     with_x=yes ;;
1429 
1430   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1431   | --x-incl | --x-inc | --x-in | --x-i)
1432     ac_prev=x_includes ;;
1433   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1434   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1435     x_includes=$ac_optarg ;;
1436 
1437   -x-libraries | --x-libraries | --x-librarie | --x-librari \
1438   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1439     ac_prev=x_libraries ;;
1440   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1441   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1442     x_libraries=$ac_optarg ;;
1443 
1444   -*) as_fn_error $? "unrecognized option: \`$ac_option'
1445 Try \`$0 --help' for more information"
1446     ;;
1447 
1448   *=*)
1449     ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1450     # Reject names that are not valid shell variable names.
1451     case $ac_envvar in #(
1452       '' | [0-9]* | *[!_$as_cr_alnum]* )
1453       as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1454     esac
1455     eval $ac_envvar=\$ac_optarg
1456     export $ac_envvar ;;
1457 
1458   *)
1459     # FIXME: should be removed in autoconf 3.0.
1460     $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1461     expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1462       $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1463     : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
1464     ;;
1465 
1466   esac
1467 done
1468 
1469 if test -n "$ac_prev"; then
1470   ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1471   as_fn_error $? "missing argument to $ac_option"
1472 fi
1473 
1474 if test -n "$ac_unrecognized_opts"; then
1475   case $enable_option_checking in
1476     no) ;;
1477     fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1478     *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1479   esac
1480 fi
1481 
1482 # Check all directory arguments for consistency.
1483 for ac_var in   exec_prefix prefix bindir sbindir libexecdir datarootdir \
1484                 datadir sysconfdir sharedstatedir localstatedir includedir \
1485                 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1486                 libdir localedir mandir
1487 do
1488   eval ac_val=\$$ac_var
1489   # Remove trailing slashes.
1490   case $ac_val in
1491     */ )
1492       ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1493       eval $ac_var=\$ac_val;;
1494   esac
1495   # Be sure to have absolute directory names.
1496   case $ac_val in
1497     [\\/$]* | ?:[\\/]* )  continue;;
1498     NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1499   esac
1500   as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1501 done
1502 
1503 # There might be people who depend on the old broken behavior: `$host'
1504 # used to hold the argument of --host etc.
1505 # FIXME: To remove some day.
1506 build=$build_alias
1507 host=$host_alias
1508 target=$target_alias
1509 
1510 # FIXME: To remove some day.
1511 if test "x$host_alias" != x; then
1512   if test "x$build_alias" = x; then
1513     cross_compiling=maybe
1514     $as_echo "$as_me: WARNING: if you wanted to set the --build type, don't use --host.
1515     If a cross compiler is detected then cross compile mode will be used" >&2
1516   elif test "x$build_alias" != "x$host_alias"; then
1517     cross_compiling=yes
1518   fi
1519 fi
1520 
1521 ac_tool_prefix=
1522 test -n "$host_alias" && ac_tool_prefix=$host_alias-
1523 
1524 test "$silent" = yes && exec 6>/dev/null
1525 
1526 
1527 ac_pwd=`pwd` && test -n "$ac_pwd" &&
1528 ac_ls_di=`ls -di .` &&
1529 ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1530   as_fn_error $? "working directory cannot be determined"
1531 test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1532   as_fn_error $? "pwd does not report name of working directory"
1533 
1534 
1535 # Find the source files, if location was not specified.
1536 if test -z "$srcdir"; then
1537   ac_srcdir_defaulted=yes
1538   # Try the directory containing this script, then the parent directory.
1539   ac_confdir=`$as_dirname -- "$as_myself" ||
1540 $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1541          X"$as_myself" : 'X\(//\)[^/]' \| \
1542          X"$as_myself" : 'X\(//\)$' \| \
1543          X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1544 $as_echo X"$as_myself" |
1545     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1546             s//\1/
1547             q
1548           }
1549           /^X\(\/\/\)[^/].*/{
1550             s//\1/
1551             q
1552           }
1553           /^X\(\/\/\)$/{
1554             s//\1/
1555             q
1556           }
1557           /^X\(\/\).*/{
1558             s//\1/
1559             q
1560           }
1561           s/.*/./; q'`
1562   srcdir=$ac_confdir
1563   if test ! -r "$srcdir/$ac_unique_file"; then
1564     srcdir=..
1565   fi
1566 else
1567   ac_srcdir_defaulted=no
1568 fi
1569 if test ! -r "$srcdir/$ac_unique_file"; then
1570   test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1571   as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1572 fi
1573 ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1574 ac_abs_confdir=`(
1575         cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1576         pwd)`
1577 # When building in place, set srcdir=.
1578 if test "$ac_abs_confdir" = "$ac_pwd"; then
1579   srcdir=.
1580 fi
1581 # Remove unnecessary trailing slashes from srcdir.
1582 # Double slashes in file names in object file debugging info
1583 # mess up M-x gdb in Emacs.
1584 case $srcdir in
1585 */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1586 esac
1587 for ac_var in $ac_precious_vars; do
1588   eval ac_env_${ac_var}_set=\${${ac_var}+set}
1589   eval ac_env_${ac_var}_value=\$${ac_var}
1590   eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1591   eval ac_cv_env_${ac_var}_value=\$${ac_var}
1592 done
1593 
1594 #
1595 # Report the --help message.
1596 #
1597 if test "$ac_init_help" = "long"; then
1598   # Omit some internal or obsolete options to make the list less imposing.
1599   # This message is too long to be a string in the A/UX 3.1 sh.
1600   cat <<_ACEOF
1601 \`configure' configures OpenJDK jdk8 to adapt to many kinds of systems.
1602 
1603 Usage: $0 [OPTION]... [VAR=VALUE]...
1604 
1605 To assign environment variables (e.g., CC, CFLAGS...), specify them as
1606 VAR=VALUE.  See below for descriptions of some of the useful variables.
1607 
1608 Defaults for the options are specified in brackets.
1609 
1610 Configuration:
1611   -h, --help              display this help and exit
1612       --help=short        display options specific to this package
1613       --help=recursive    display the short help of all the included packages
1614   -V, --version           display version information and exit
1615   -q, --quiet, --silent   do not print \`checking ...' messages
1616       --cache-file=FILE   cache test results in FILE [disabled]
1617   -C, --config-cache      alias for \`--cache-file=config.cache'
1618   -n, --no-create         do not create output files
1619       --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1620 
1621 Installation directories:
1622   --prefix=PREFIX         install architecture-independent files in PREFIX
1623                           [$ac_default_prefix]
1624   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1625                           [PREFIX]
1626 
1627 By default, \`make install' will install all the files in
1628 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1629 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1630 for instance \`--prefix=\$HOME'.
1631 
1632 For better control, use the options below.
1633 
1634 Fine tuning of the installation directories:
1635   --bindir=DIR            user executables [EPREFIX/bin]
1636   --sbindir=DIR           system admin executables [EPREFIX/sbin]
1637   --libexecdir=DIR        program executables [EPREFIX/libexec]
1638   --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
1639   --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
1640   --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
1641   --libdir=DIR            object code libraries [EPREFIX/lib]
1642   --includedir=DIR        C header files [PREFIX/include]
1643   --oldincludedir=DIR     C header files for non-gcc [/usr/include]
1644   --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
1645   --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
1646   --infodir=DIR           info documentation [DATAROOTDIR/info]
1647   --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
1648   --mandir=DIR            man documentation [DATAROOTDIR/man]
1649   --docdir=DIR            documentation root [DATAROOTDIR/doc/openjdk]
1650   --htmldir=DIR           html documentation [DOCDIR]
1651   --dvidir=DIR            dvi documentation [DOCDIR]
1652   --pdfdir=DIR            pdf documentation [DOCDIR]
1653   --psdir=DIR             ps documentation [DOCDIR]
1654 _ACEOF
1655 
1656   cat <<\_ACEOF
1657 
1658 X features:
1659   --x-includes=DIR    X include files are in DIR
1660   --x-libraries=DIR   X library files are in DIR
1661 
1662 System types:
1663   --build=BUILD     configure for building on BUILD [guessed]
1664   --host=HOST       cross-compile to build programs to run on HOST [BUILD]
1665   --target=TARGET   configure for building compilers for TARGET [HOST]
1666 _ACEOF
1667 fi
1668 
1669 if test -n "$ac_init_help"; then
1670   case $ac_init_help in
1671      short | recursive ) echo "Configuration of OpenJDK jdk8:";;
1672    esac
1673   cat <<\_ACEOF
1674 
1675 Optional Features:
1676   --disable-option-checking  ignore unrecognized --enable/--with options
1677   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1678   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1679   --enable-openjdk-only   suppress building custom source even if present
1680                           [disabled]
1681   --enable-debug          set the debug level to fastdebug (shorthand for
1682                           --with-debug-level=fastdebug) [disabled]
1683   --disable-headful       disable building headful support (graphical UI
1684                           support) [enabled]
1685   --enable-hotspot-test-in-build
1686                           run the Queens test after Hotspot build [disabled]
1687   --enable-unlimited-crypto
1688                           Enable unlimited crypto policy [disabled]
1689   --disable-debug-symbols disable generation of debug symbols [enabled]
1690   --disable-zip-debug-info
1691                           disable zipping of debug-info files [enabled]
1692   --disable-macosx-runtime-support
1693                           disable the use of MacOSX Java runtime support
1694                           framework [enabled]
1695   --enable-sjavac         use sjavac to do fast incremental compiles
1696                           [disabled]
1697   --disable-precompiled-headers
1698                           disable using precompiled headers when compiling C++
1699                           [enabled]
1700   --disable-ccache        disable using ccache to speed up recompilations
1701                           [enabled]
1702 
1703 Optional Packages:
1704   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
1705   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
1706   --with-custom-make-dir  use this directory for custom build/make files
1707   --with-target-bits      build 32-bit or 64-bit binaries (for platforms that
1708                           support it), e.g. --with-target-bits=32 [guessed]
1709   --with-sys-root         pass this sys-root to the compilers and tools (for
1710                           cross-compiling)
1711   --with-tools-dir        search this directory for compilers and tools (for
1712                           cross-compiling)
1713   --with-devkit           use this directory as base for tools-dir and
1714                           sys-root (for cross-compiling)
1715   --with-jdk-variant      JDK variant to build (normal) [normal]
1716   --with-jvm-variants     JVM variants (separated by commas) to build (server,
1717                           client, minimal1, kernel, zero, zeroshark) [server]
1718   --with-debug-level      set the debug level (release, fastdebug, slowdebug)
1719                           [release]
1720   --with-conf-name        use this as the name of the configuration [generated
1721                           from important configuration options]
1722   --with-builddeps-conf   use this configuration file for the builddeps
1723   --with-builddeps-server download and use build dependencies from this server
1724                           url
1725   --with-builddeps-dir    store downloaded build dependencies here
1726                           [/localhome/builddeps]
1727   --with-builddeps-group  chgrp the downloaded build dependencies to this
1728                           group
1729   --with-cacerts-file     specify alternative cacerts file
1730   --with-milestone        Set milestone value for build [internal]
1731   --with-update-version   Set update version value for build [b00]
1732   --with-build-number     Set build number value for build [b00]
1733   --with-user-release-suffix
1734                           Add a custom string to the version string if build
1735                           number isn't set.[username_builddateb00]
1736   --with-boot-jdk         path to Boot JDK (used to bootstrap build) [probed]
1737   --with-boot-jdk-jvmargs specify JVM arguments to be passed to all
1738                           invocations of the Boot JDK, overriding the default
1739                           values, e.g --with-boot-jdk-jvmargs="-Xmx8G
1740                           -enableassertions"
1741   --with-add-source-root  for each and every source directory, look in this
1742                           additional source root for the same directory; if it
1743                           exists and have files in it, include it in the build
1744   --with-override-source-root
1745                           for each and every source directory, look in this
1746                           override source root for the same directory; if it
1747                           exists, use that directory instead and ignore the
1748                           directory in the original source root
1749   --with-adds-and-overrides
1750                           use the subdirs 'adds' and 'overrides' in the
1751                           specified directory as add-source-root and
1752                           override-source-root
1753   --with-override-langtools
1754                           use this langtools dir for the build
1755   --with-override-corba   use this corba dir for the build
1756   --with-override-jaxp    use this jaxp dir for the build
1757   --with-override-jaxws   use this jaxws dir for the build
1758   --with-override-hotspot use this hotspot dir for the build
1759   --with-override-jdk     use this jdk dir for the build
1760   --with-import-hotspot   import hotspot binaries from this jdk image or
1761                           hotspot build dist dir instead of building from
1762                           source
1763   --with-msvcr-dll        copy this msvcr100.dll into the built JDK (Windows
1764                           only) [probed]
1765   --with-dxsdk            the DirectX SDK (Windows only) [probed]
1766   --with-dxsdk-lib        the DirectX SDK lib directory (Windows only)
1767                           [probed]
1768   --with-dxsdk-include    the DirectX SDK include directory (Windows only)
1769                           [probed]
1770   --with-jtreg            Regression Test Harness [probed]
1771   --with-extra-cflags     extra flags to be used when compiling jdk c-files
1772   --with-extra-cxxflags   extra flags to be used when compiling jdk c++-files
1773   --with-extra-ldflags    extra flags to be used when linking jdk
1774   --with-x                use the X Window System
1775   --with-cups             specify prefix directory for the cups package
1776                           (expecting the headers under PATH/include)
1777   --with-cups-include     specify directory for the cups include files
1778   --with-freetype         specify prefix directory for the freetype2 package
1779                           (expecting the libraries under PATH/lib and the
1780                           headers under PATH/include)
1781   --with-alsa             specify prefix directory for the alsa package
1782                           (expecting the libraries under PATH/lib and the
1783                           headers under PATH/include)
1784   --with-alsa-include     specify directory for the alsa include files
1785   --with-alsa-lib         specify directory for the alsa library
1786   --with-giflib           use giflib from build system or OpenJDK source
1787                           (system, bundled) [bundled]
1788   --with-zlib             use zlib from build system or OpenJDK source
1789                           (system, bundled) [bundled]
1790   --with-stdc++lib=<static>,<dynamic>,<default>
1791                           force linking of the C++ runtime on Linux to either
1792                           static or dynamic, default is static with dynamic as
1793                           fallback
1794   --with-num-cores        number of cores in the build system, e.g.
1795                           --with-num-cores=8 [probed]
1796   --with-memory-size      memory (in MB) available in the build system, e.g.
1797                           --with-memory-size=1024 [probed]
1798   --with-jobs             number of parallel jobs to let make run [calculated
1799                           based on cores and memory]
1800   --with-sjavac-server-java
1801                           use this java binary for running the sjavac
1802                           background server [Boot JDK java]
1803   --with-ccache-dir       where to store ccache files [~/.ccache]
1804 
1805 Some influential environment variables:
1806   PKG_CONFIG  path to pkg-config utility
1807   CC          C compiler command
1808   CFLAGS      C compiler flags
1809   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
1810               nonstandard directory <lib dir>
1811   LIBS        libraries to pass to the linker, e.g. -l<library>
1812   CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
1813               you have headers in a nonstandard directory <include dir>
1814   CXX         C++ compiler command
1815   CXXFLAGS    C++ compiler flags
1816   OBJC        Objective C compiler command
1817   OBJCFLAGS   Objective C compiler flags
1818   CPP         C preprocessor
1819   CXXCPP      C++ preprocessor
1820   XMKMF       Path to xmkmf, Makefile generator for X Window System
1821   FREETYPE2_CFLAGS
1822               C compiler flags for FREETYPE2, overriding pkg-config
1823   FREETYPE2_LIBS
1824               linker flags for FREETYPE2, overriding pkg-config
1825   ALSA_CFLAGS C compiler flags for ALSA, overriding pkg-config
1826   ALSA_LIBS   linker flags for ALSA, overriding pkg-config
1827   LIBFFI_CFLAGS
1828               C compiler flags for LIBFFI, overriding pkg-config
1829   LIBFFI_LIBS linker flags for LIBFFI, overriding pkg-config
1830 
1831 Use these variables to override the choices made by `configure' or to help
1832 it to find libraries and programs with nonstandard names/locations.
1833 
1834 Report bugs to <build-dev@openjdk.java.net>.
1835 OpenJDK home page: <http://openjdk.java.net>.
1836 _ACEOF
1837 ac_status=$?
1838 fi
1839 
1840 if test "$ac_init_help" = "recursive"; then
1841   # If there are subdirs, report their specific --help.
1842   for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
1843     test -d "$ac_dir" ||
1844       { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1845       continue
1846     ac_builddir=.
1847 
1848 case "$ac_dir" in
1849 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1850 *)
1851   ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
1852   # A ".." for each directory in $ac_dir_suffix.
1853   ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
1854   case $ac_top_builddir_sub in
1855   "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1856   *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1857   esac ;;
1858 esac
1859 ac_abs_top_builddir=$ac_pwd
1860 ac_abs_builddir=$ac_pwd$ac_dir_suffix
1861 # for backward compatibility:
1862 ac_top_builddir=$ac_top_build_prefix
1863 
1864 case $srcdir in
1865   .)  # We are building in place.
1866     ac_srcdir=.
1867     ac_top_srcdir=$ac_top_builddir_sub
1868     ac_abs_top_srcdir=$ac_pwd ;;
1869   [\\/]* | ?:[\\/]* )  # Absolute name.
1870     ac_srcdir=$srcdir$ac_dir_suffix;
1871     ac_top_srcdir=$srcdir
1872     ac_abs_top_srcdir=$srcdir ;;
1873   *) # Relative name.
1874     ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1875     ac_top_srcdir=$ac_top_build_prefix$srcdir
1876     ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
1877 esac
1878 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
1879 
1880     cd "$ac_dir" || { ac_status=$?; continue; }
1881     # Check for guested configure.
1882     if test -f "$ac_srcdir/configure.gnu"; then
1883       echo &&
1884       $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1885     elif test -f "$ac_srcdir/configure"; then
1886       echo &&
1887       $SHELL "$ac_srcdir/configure" --help=recursive
1888     else
1889       $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1890     fi || ac_status=$?
1891     cd "$ac_pwd" || { ac_status=$?; break; }
1892   done
1893 fi
1894 
1895 test -n "$ac_init_help" && exit $ac_status
1896 if $ac_init_version; then
1897   cat <<\_ACEOF
1898 OpenJDK configure jdk8
1899 generated by GNU Autoconf 2.67
1900 
1901 Copyright (C) 2010 Free Software Foundation, Inc.
1902 This configure script is free software; the Free Software Foundation
1903 gives unlimited permission to copy, distribute and modify it.
1904 _ACEOF
1905   exit
1906 fi
1907 
1908 ## ------------------------ ##
1909 ## Autoconf initialization. ##
1910 ## ------------------------ ##
1911 
1912 # ac_fn_c_try_compile LINENO
1913 # --------------------------
1914 # Try to compile conftest.$ac_ext, and return whether this succeeded.
1915 ac_fn_c_try_compile ()
1916 {
1917   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1918   rm -f conftest.$ac_objext
1919   if { { ac_try="$ac_compile"
1920 case "(($ac_try" in
1921   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1922   *) ac_try_echo=$ac_try;;
1923 esac
1924 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1925 $as_echo "$ac_try_echo"; } >&5
1926   (eval "$ac_compile") 2>conftest.err
1927   ac_status=$?
1928   if test -s conftest.err; then
1929     grep -v '^ *+' conftest.err >conftest.er1
1930     cat conftest.er1 >&5
1931     mv -f conftest.er1 conftest.err
1932   fi
1933   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1934   test $ac_status = 0; } && {
1935          test -z "$ac_c_werror_flag" ||
1936          test ! -s conftest.err
1937        } && test -s conftest.$ac_objext; then :
1938   ac_retval=0
1939 else
1940   $as_echo "$as_me: failed program was:" >&5
1941 sed 's/^/| /' conftest.$ac_ext >&5
1942 
1943         ac_retval=1
1944 fi
1945   eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1946   as_fn_set_status $ac_retval
1947 
1948 } # ac_fn_c_try_compile
1949 
1950 # ac_fn_cxx_try_compile LINENO
1951 # ----------------------------
1952 # Try to compile conftest.$ac_ext, and return whether this succeeded.
1953 ac_fn_cxx_try_compile ()
1954 {
1955   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1956   rm -f conftest.$ac_objext
1957   if { { ac_try="$ac_compile"
1958 case "(($ac_try" in
1959   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1960   *) ac_try_echo=$ac_try;;
1961 esac
1962 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1963 $as_echo "$ac_try_echo"; } >&5
1964   (eval "$ac_compile") 2>conftest.err
1965   ac_status=$?
1966   if test -s conftest.err; then
1967     grep -v '^ *+' conftest.err >conftest.er1
1968     cat conftest.er1 >&5
1969     mv -f conftest.er1 conftest.err
1970   fi
1971   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1972   test $ac_status = 0; } && {
1973          test -z "$ac_cxx_werror_flag" ||
1974          test ! -s conftest.err
1975        } && test -s conftest.$ac_objext; then :
1976   ac_retval=0
1977 else
1978   $as_echo "$as_me: failed program was:" >&5
1979 sed 's/^/| /' conftest.$ac_ext >&5
1980 
1981         ac_retval=1
1982 fi
1983   eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1984   as_fn_set_status $ac_retval
1985 
1986 } # ac_fn_cxx_try_compile
1987 
1988 # ac_fn_objc_try_compile LINENO
1989 # -----------------------------
1990 # Try to compile conftest.$ac_ext, and return whether this succeeded.
1991 ac_fn_objc_try_compile ()
1992 {
1993   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1994   rm -f conftest.$ac_objext
1995   if { { ac_try="$ac_compile"
1996 case "(($ac_try" in
1997   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1998   *) ac_try_echo=$ac_try;;
1999 esac
2000 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2001 $as_echo "$ac_try_echo"; } >&5
2002   (eval "$ac_compile") 2>conftest.err
2003   ac_status=$?
2004   if test -s conftest.err; then
2005     grep -v '^ *+' conftest.err >conftest.er1
2006     cat conftest.er1 >&5
2007     mv -f conftest.er1 conftest.err
2008   fi
2009   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2010   test $ac_status = 0; } && {
2011          test -z "$ac_objc_werror_flag" ||
2012          test ! -s conftest.err
2013        } && test -s conftest.$ac_objext; then :
2014   ac_retval=0
2015 else
2016   $as_echo "$as_me: failed program was:" >&5
2017 sed 's/^/| /' conftest.$ac_ext >&5
2018 
2019         ac_retval=1
2020 fi
2021   eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2022   as_fn_set_status $ac_retval
2023 
2024 } # ac_fn_objc_try_compile
2025 
2026 # ac_fn_c_try_cpp LINENO
2027 # ----------------------
2028 # Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2029 ac_fn_c_try_cpp ()
2030 {
2031   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2032   if { { ac_try="$ac_cpp conftest.$ac_ext"
2033 case "(($ac_try" in
2034   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2035   *) ac_try_echo=$ac_try;;
2036 esac
2037 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2038 $as_echo "$ac_try_echo"; } >&5
2039   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2040   ac_status=$?
2041   if test -s conftest.err; then
2042     grep -v '^ *+' conftest.err >conftest.er1
2043     cat conftest.er1 >&5
2044     mv -f conftest.er1 conftest.err
2045   fi
2046   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2047   test $ac_status = 0; } > conftest.i && {
2048          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
2049          test ! -s conftest.err
2050        }; then :
2051   ac_retval=0
2052 else
2053   $as_echo "$as_me: failed program was:" >&5
2054 sed 's/^/| /' conftest.$ac_ext >&5
2055 
2056     ac_retval=1
2057 fi
2058   eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2059   as_fn_set_status $ac_retval
2060 
2061 } # ac_fn_c_try_cpp
2062 
2063 # ac_fn_cxx_try_cpp LINENO
2064 # ------------------------
2065 # Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2066 ac_fn_cxx_try_cpp ()
2067 {
2068   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2069   if { { ac_try="$ac_cpp conftest.$ac_ext"
2070 case "(($ac_try" in
2071   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2072   *) ac_try_echo=$ac_try;;
2073 esac
2074 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2075 $as_echo "$ac_try_echo"; } >&5
2076   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2077   ac_status=$?
2078   if test -s conftest.err; then
2079     grep -v '^ *+' conftest.err >conftest.er1
2080     cat conftest.er1 >&5
2081     mv -f conftest.er1 conftest.err
2082   fi
2083   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2084   test $ac_status = 0; } > conftest.i && {
2085          test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
2086          test ! -s conftest.err
2087        }; then :
2088   ac_retval=0
2089 else
2090   $as_echo "$as_me: failed program was:" >&5
2091 sed 's/^/| /' conftest.$ac_ext >&5
2092 
2093     ac_retval=1
2094 fi
2095   eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2096   as_fn_set_status $ac_retval
2097 
2098 } # ac_fn_cxx_try_cpp
2099 
2100 # ac_fn_cxx_check_header_mongrel LINENO HEADER VAR INCLUDES
2101 # ---------------------------------------------------------
2102 # Tests whether HEADER exists, giving a warning if it cannot be compiled using
2103 # the include files in INCLUDES and setting the cache variable VAR
2104 # accordingly.
2105 ac_fn_cxx_check_header_mongrel ()
2106 {
2107   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2108   if eval "test \"\${$3+set}\"" = set; then :
2109   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2110 $as_echo_n "checking for $2... " >&6; }
2111 if eval "test \"\${$3+set}\"" = set; then :
2112   $as_echo_n "(cached) " >&6
2113 fi
2114 eval ac_res=\$$3
2115                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2116 $as_echo "$ac_res" >&6; }
2117 else
2118   # Is the header compilable?
2119 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
2120 $as_echo_n "checking $2 usability... " >&6; }
2121 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2122 /* end confdefs.h.  */
2123 $4
2124 #include <$2>
2125 _ACEOF
2126 if ac_fn_cxx_try_compile "$LINENO"; then :
2127   ac_header_compiler=yes
2128 else
2129   ac_header_compiler=no
2130 fi
2131 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2132 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
2133 $as_echo "$ac_header_compiler" >&6; }
2134 
2135 # Is the header present?
2136 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
2137 $as_echo_n "checking $2 presence... " >&6; }
2138 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2139 /* end confdefs.h.  */
2140 #include <$2>
2141 _ACEOF
2142 if ac_fn_cxx_try_cpp "$LINENO"; then :
2143   ac_header_preproc=yes
2144 else
2145   ac_header_preproc=no
2146 fi
2147 rm -f conftest.err conftest.i conftest.$ac_ext
2148 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
2149 $as_echo "$ac_header_preproc" >&6; }
2150 
2151 # So?  What about this header?
2152 case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in #((
2153   yes:no: )
2154     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
2155 $as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
2156     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2157 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2158     ;;
2159   no:yes:* )
2160     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
2161 $as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
2162     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
2163 $as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
2164     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
2165 $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
2166     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
2167 $as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
2168     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2169 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2170 ( $as_echo "## ----------------------------------------- ##
2171 ## Report this to build-dev@openjdk.java.net ##
2172 ## ----------------------------------------- ##"
2173      ) | sed "s/^/$as_me: WARNING:     /" >&2
2174     ;;
2175 esac
2176   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2177 $as_echo_n "checking for $2... " >&6; }
2178 if eval "test \"\${$3+set}\"" = set; then :
2179   $as_echo_n "(cached) " >&6
2180 else
2181   eval "$3=\$ac_header_compiler"
2182 fi
2183 eval ac_res=\$$3
2184                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2185 $as_echo "$ac_res" >&6; }
2186 fi
2187   eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2188 
2189 } # ac_fn_cxx_check_header_mongrel
2190 
2191 # ac_fn_cxx_try_run LINENO
2192 # ------------------------
2193 # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
2194 # that executables *can* be run.
2195 ac_fn_cxx_try_run ()
2196 {
2197   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2198   if { { ac_try="$ac_link"
2199 case "(($ac_try" in
2200   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2201   *) ac_try_echo=$ac_try;;
2202 esac
2203 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2204 $as_echo "$ac_try_echo"; } >&5
2205   (eval "$ac_link") 2>&5
2206   ac_status=$?
2207   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2208   test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
2209   { { case "(($ac_try" in
2210   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2211   *) ac_try_echo=$ac_try;;
2212 esac
2213 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2214 $as_echo "$ac_try_echo"; } >&5
2215   (eval "$ac_try") 2>&5
2216   ac_status=$?
2217   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2218   test $ac_status = 0; }; }; then :
2219   ac_retval=0
2220 else
2221   $as_echo "$as_me: program exited with status $ac_status" >&5
2222        $as_echo "$as_me: failed program was:" >&5
2223 sed 's/^/| /' conftest.$ac_ext >&5
2224 
2225        ac_retval=$ac_status
2226 fi
2227   rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2228   eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2229   as_fn_set_status $ac_retval
2230 
2231 } # ac_fn_cxx_try_run
2232 
2233 # ac_fn_cxx_check_header_compile LINENO HEADER VAR INCLUDES
2234 # ---------------------------------------------------------
2235 # Tests whether HEADER exists and can be compiled using the include files in
2236 # INCLUDES, setting the cache variable VAR accordingly.
2237 ac_fn_cxx_check_header_compile ()
2238 {
2239   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2240   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2241 $as_echo_n "checking for $2... " >&6; }
2242 if eval "test \"\${$3+set}\"" = set; then :
2243   $as_echo_n "(cached) " >&6
2244 else
2245   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2246 /* end confdefs.h.  */
2247 $4
2248 #include <$2>
2249 _ACEOF
2250 if ac_fn_cxx_try_compile "$LINENO"; then :
2251   eval "$3=yes"
2252 else
2253   eval "$3=no"
2254 fi
2255 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2256 fi
2257 eval ac_res=\$$3
2258                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2259 $as_echo "$ac_res" >&6; }
2260   eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2261 
2262 } # ac_fn_cxx_check_header_compile
2263 
2264 # ac_fn_cxx_compute_int LINENO EXPR VAR INCLUDES
2265 # ----------------------------------------------
2266 # Tries to find the compile-time value of EXPR in a program that includes
2267 # INCLUDES, setting VAR accordingly. Returns whether the value could be
2268 # computed
2269 ac_fn_cxx_compute_int ()
2270 {
2271   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2272   if test "$cross_compiling" = yes; then
2273     # Depending upon the size, compute the lo and hi bounds.
2274 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2275 /* end confdefs.h.  */
2276 $4
2277 int
2278 main ()
2279 {
2280 static int test_array [1 - 2 * !(($2) >= 0)];
2281 test_array [0] = 0
2282 
2283   ;
2284   return 0;
2285 }
2286 _ACEOF
2287 if ac_fn_cxx_try_compile "$LINENO"; then :
2288   ac_lo=0 ac_mid=0
2289   while :; do
2290     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2291 /* end confdefs.h.  */
2292 $4
2293 int
2294 main ()
2295 {
2296 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2297 test_array [0] = 0
2298 
2299   ;
2300   return 0;
2301 }
2302 _ACEOF
2303 if ac_fn_cxx_try_compile "$LINENO"; then :
2304   ac_hi=$ac_mid; break
2305 else
2306   as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2307                         if test $ac_lo -le $ac_mid; then
2308                           ac_lo= ac_hi=
2309                           break
2310                         fi
2311                         as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2312 fi
2313 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2314   done
2315 else
2316   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2317 /* end confdefs.h.  */
2318 $4
2319 int
2320 main ()
2321 {
2322 static int test_array [1 - 2 * !(($2) < 0)];
2323 test_array [0] = 0
2324 
2325   ;
2326   return 0;
2327 }
2328 _ACEOF
2329 if ac_fn_cxx_try_compile "$LINENO"; then :
2330   ac_hi=-1 ac_mid=-1
2331   while :; do
2332     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2333 /* end confdefs.h.  */
2334 $4
2335 int
2336 main ()
2337 {
2338 static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2339 test_array [0] = 0
2340 
2341   ;
2342   return 0;
2343 }
2344 _ACEOF
2345 if ac_fn_cxx_try_compile "$LINENO"; then :
2346   ac_lo=$ac_mid; break
2347 else
2348   as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2349                         if test $ac_mid -le $ac_hi; then
2350                           ac_lo= ac_hi=
2351                           break
2352                         fi
2353                         as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2354 fi
2355 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2356   done
2357 else
2358   ac_lo= ac_hi=
2359 fi
2360 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2361 fi
2362 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2363 # Binary search between lo and hi bounds.
2364 while test "x$ac_lo" != "x$ac_hi"; do
2365   as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2366   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2367 /* end confdefs.h.  */
2368 $4
2369 int
2370 main ()
2371 {
2372 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2373 test_array [0] = 0
2374 
2375   ;
2376   return 0;
2377 }
2378 _ACEOF
2379 if ac_fn_cxx_try_compile "$LINENO"; then :
2380   ac_hi=$ac_mid
2381 else
2382   as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2383 fi
2384 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2385 done
2386 case $ac_lo in #((
2387 ?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2388 '') ac_retval=1 ;;
2389 esac
2390   else
2391     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2392 /* end confdefs.h.  */
2393 $4
2394 static long int longval () { return $2; }
2395 static unsigned long int ulongval () { return $2; }
2396 #include <stdio.h>
2397 #include <stdlib.h>
2398 int
2399 main ()
2400 {
2401 
2402   FILE *f = fopen ("conftest.val", "w");
2403   if (! f)
2404     return 1;
2405   if (($2) < 0)
2406     {
2407       long int i = longval ();
2408       if (i != ($2))
2409         return 1;
2410       fprintf (f, "%ld", i);
2411     }
2412   else
2413     {
2414       unsigned long int i = ulongval ();
2415       if (i != ($2))
2416         return 1;
2417       fprintf (f, "%lu", i);
2418     }
2419   /* Do not output a trailing newline, as this causes \r\n confusion
2420      on some platforms.  */
2421   return ferror (f) || fclose (f) != 0;
2422 
2423   ;
2424   return 0;
2425 }
2426 _ACEOF
2427 if ac_fn_cxx_try_run "$LINENO"; then :
2428   echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2429 else
2430   ac_retval=1
2431 fi
2432 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2433   conftest.$ac_objext conftest.beam conftest.$ac_ext
2434 rm -f conftest.val
2435 
2436   fi
2437   eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2438   as_fn_set_status $ac_retval
2439 
2440 } # ac_fn_cxx_compute_int
2441 
2442 # ac_fn_cxx_try_link LINENO
2443 # -------------------------
2444 # Try to link conftest.$ac_ext, and return whether this succeeded.
2445 ac_fn_cxx_try_link ()
2446 {
2447   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2448   rm -f conftest.$ac_objext conftest$ac_exeext
2449   if { { ac_try="$ac_link"
2450 case "(($ac_try" in
2451   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2452   *) ac_try_echo=$ac_try;;
2453 esac
2454 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2455 $as_echo "$ac_try_echo"; } >&5
2456   (eval "$ac_link") 2>conftest.err
2457   ac_status=$?
2458   if test -s conftest.err; then
2459     grep -v '^ *+' conftest.err >conftest.er1
2460     cat conftest.er1 >&5
2461     mv -f conftest.er1 conftest.err
2462   fi
2463   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2464   test $ac_status = 0; } && {
2465          test -z "$ac_cxx_werror_flag" ||
2466          test ! -s conftest.err
2467        } && test -s conftest$ac_exeext && {
2468          test "$cross_compiling" = yes ||
2469          $as_test_x conftest$ac_exeext
2470        }; then :
2471   ac_retval=0
2472 else
2473   $as_echo "$as_me: failed program was:" >&5
2474 sed 's/^/| /' conftest.$ac_ext >&5
2475 
2476         ac_retval=1
2477 fi
2478   # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2479   # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2480   # interfere with the next link command; also delete a directory that is
2481   # left behind by Apple's compiler.  We do this before executing the actions.
2482   rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2483   eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2484   as_fn_set_status $ac_retval
2485 
2486 } # ac_fn_cxx_try_link
2487 
2488 # ac_fn_cxx_check_func LINENO FUNC VAR
2489 # ------------------------------------
2490 # Tests whether FUNC exists, setting the cache variable VAR accordingly
2491 ac_fn_cxx_check_func ()
2492 {
2493   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2494   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2495 $as_echo_n "checking for $2... " >&6; }
2496 if eval "test \"\${$3+set}\"" = set; then :
2497   $as_echo_n "(cached) " >&6
2498 else
2499   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2500 /* end confdefs.h.  */
2501 /* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2502    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
2503 #define $2 innocuous_$2
2504 
2505 /* System header to define __stub macros and hopefully few prototypes,
2506     which can conflict with char $2 (); below.
2507     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2508     <limits.h> exists even on freestanding compilers.  */
2509 
2510 #ifdef __STDC__
2511 # include <limits.h>
2512 #else
2513 # include <assert.h>
2514 #endif
2515 
2516 #undef $2
2517 
2518 /* Override any GCC internal prototype to avoid an error.
2519    Use char because int might match the return type of a GCC
2520    builtin and then its argument prototype would still apply.  */
2521 #ifdef __cplusplus
2522 extern "C"
2523 #endif
2524 char $2 ();
2525 /* The GNU C library defines this for functions which it implements
2526     to always fail with ENOSYS.  Some functions are actually named
2527     something starting with __ and the normal name is an alias.  */
2528 #if defined __stub_$2 || defined __stub___$2
2529 choke me
2530 #endif
2531 
2532 int
2533 main ()
2534 {
2535 return $2 ();
2536   ;
2537   return 0;
2538 }
2539 _ACEOF
2540 if ac_fn_cxx_try_link "$LINENO"; then :
2541   eval "$3=yes"
2542 else
2543   eval "$3=no"
2544 fi
2545 rm -f core conftest.err conftest.$ac_objext \
2546     conftest$ac_exeext conftest.$ac_ext
2547 fi
2548 eval ac_res=\$$3
2549                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2550 $as_echo "$ac_res" >&6; }
2551   eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2552 
2553 } # ac_fn_cxx_check_func
2554 
2555 # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
2556 # -------------------------------------------------------
2557 # Tests whether HEADER exists and can be compiled using the include files in
2558 # INCLUDES, setting the cache variable VAR accordingly.
2559 ac_fn_c_check_header_compile ()
2560 {
2561   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2562   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2563 $as_echo_n "checking for $2... " >&6; }
2564 if eval "test \"\${$3+set}\"" = set; then :
2565   $as_echo_n "(cached) " >&6
2566 else
2567   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2568 /* end confdefs.h.  */
2569 $4
2570 #include <$2>
2571 _ACEOF
2572 if ac_fn_c_try_compile "$LINENO"; then :
2573   eval "$3=yes"
2574 else
2575   eval "$3=no"
2576 fi
2577 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2578 fi
2579 eval ac_res=\$$3
2580                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2581 $as_echo "$ac_res" >&6; }
2582   eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2583 
2584 } # ac_fn_c_check_header_compile
2585 cat >config.log <<_ACEOF
2586 This file contains any messages produced by compilers while
2587 running configure, to aid debugging if configure makes a mistake.
2588 
2589 It was created by OpenJDK $as_me jdk8, which was
2590 generated by GNU Autoconf 2.67.  Invocation command line was
2591 
2592   $ $0 $@
2593 
2594 _ACEOF
2595 exec 5>>config.log
2596 {
2597 cat <<_ASUNAME
2598 ## --------- ##
2599 ## Platform. ##
2600 ## --------- ##
2601 
2602 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2603 uname -m = `(uname -m) 2>/dev/null || echo unknown`
2604 uname -r = `(uname -r) 2>/dev/null || echo unknown`
2605 uname -s = `(uname -s) 2>/dev/null || echo unknown`
2606 uname -v = `(uname -v) 2>/dev/null || echo unknown`
2607 
2608 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2609 /bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
2610 
2611 /bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
2612 /usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
2613 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2614 /usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
2615 /bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
2616 /usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
2617 /bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
2618 
2619 _ASUNAME
2620 
2621 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2622 for as_dir in $PATH
2623 do
2624   IFS=$as_save_IFS
2625   test -z "$as_dir" && as_dir=.
2626     $as_echo "PATH: $as_dir"
2627   done
2628 IFS=$as_save_IFS
2629 
2630 } >&5
2631 
2632 cat >&5 <<_ACEOF
2633 
2634 
2635 ## ----------- ##
2636 ## Core tests. ##
2637 ## ----------- ##
2638 
2639 _ACEOF
2640 
2641 
2642 # Keep a trace of the command line.
2643 # Strip out --no-create and --no-recursion so they do not pile up.
2644 # Strip out --silent because we don't want to record it for future runs.
2645 # Also quote any args containing shell meta-characters.
2646 # Make two passes to allow for proper duplicate-argument suppression.
2647 ac_configure_args=
2648 ac_configure_args0=
2649 ac_configure_args1=
2650 ac_must_keep_next=false
2651 for ac_pass in 1 2
2652 do
2653   for ac_arg
2654   do
2655     case $ac_arg in
2656     -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2657     -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2658     | -silent | --silent | --silen | --sile | --sil)
2659       continue ;;
2660     *\'*)
2661       ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2662     esac
2663     case $ac_pass in
2664     1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2665     2)
2666       as_fn_append ac_configure_args1 " '$ac_arg'"
2667       if test $ac_must_keep_next = true; then
2668         ac_must_keep_next=false # Got value, back to normal.
2669       else
2670         case $ac_arg in
2671           *=* | --config-cache | -C | -disable-* | --disable-* \
2672           | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2673           | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2674           | -with-* | --with-* | -without-* | --without-* | --x)
2675             case "$ac_configure_args0 " in
2676               "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2677             esac
2678             ;;
2679           -* ) ac_must_keep_next=true ;;
2680         esac
2681       fi
2682       as_fn_append ac_configure_args " '$ac_arg'"
2683       ;;
2684     esac
2685   done
2686 done
2687 { ac_configure_args0=; unset ac_configure_args0;}
2688 { ac_configure_args1=; unset ac_configure_args1;}
2689 
2690 # When interrupted or exit'd, cleanup temporary files, and complete
2691 # config.log.  We remove comments because anyway the quotes in there
2692 # would cause problems or look ugly.
2693 # WARNING: Use '\'' to represent an apostrophe within the trap.
2694 # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2695 trap 'exit_status=$?
2696   # Save into config.log some information that might help in debugging.
2697   {
2698     echo
2699 
2700     $as_echo "## ---------------- ##
2701 ## Cache variables. ##
2702 ## ---------------- ##"
2703     echo
2704     # The following way of writing the cache mishandles newlines in values,
2705 (
2706   for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2707     eval ac_val=\$$ac_var
2708     case $ac_val in #(
2709     *${as_nl}*)
2710       case $ac_var in #(
2711       *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2712 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
2713       esac
2714       case $ac_var in #(
2715       _ | IFS | as_nl) ;; #(
2716       BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2717       *) { eval $ac_var=; unset $ac_var;} ;;
2718       esac ;;
2719     esac
2720   done
2721   (set) 2>&1 |
2722     case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2723     *${as_nl}ac_space=\ *)
2724       sed -n \
2725         "s/'\''/'\''\\\\'\'''\''/g;
2726           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2727       ;; #(
2728     *)
2729       sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
2730       ;;
2731     esac |
2732     sort
2733 )
2734     echo
2735 
2736     $as_echo "## ----------------- ##
2737 ## Output variables. ##
2738 ## ----------------- ##"
2739     echo
2740     for ac_var in $ac_subst_vars
2741     do
2742       eval ac_val=\$$ac_var
2743       case $ac_val in
2744       *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2745       esac
2746       $as_echo "$ac_var='\''$ac_val'\''"
2747     done | sort
2748     echo
2749 
2750     if test -n "$ac_subst_files"; then
2751       $as_echo "## ------------------- ##
2752 ## File substitutions. ##
2753 ## ------------------- ##"
2754       echo
2755       for ac_var in $ac_subst_files
2756       do
2757         eval ac_val=\$$ac_var
2758         case $ac_val in
2759         *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2760         esac
2761         $as_echo "$ac_var='\''$ac_val'\''"
2762       done | sort
2763       echo
2764     fi
2765 
2766     if test -s confdefs.h; then
2767       $as_echo "## ----------- ##
2768 ## confdefs.h. ##
2769 ## ----------- ##"
2770       echo
2771       cat confdefs.h
2772       echo
2773     fi
2774     test "$ac_signal" != 0 &&
2775       $as_echo "$as_me: caught signal $ac_signal"
2776     $as_echo "$as_me: exit $exit_status"
2777   } >&5
2778   rm -f core *.core core.conftest.* &&
2779     rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
2780     exit $exit_status
2781 ' 0
2782 for ac_signal in 1 2 13 15; do
2783   trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
2784 done
2785 ac_signal=0
2786 
2787 # confdefs.h avoids OS command line length limits that DEFS can exceed.
2788 rm -f -r conftest* confdefs.h
2789 
2790 $as_echo "/* confdefs.h */" > confdefs.h
2791 
2792 # Predefined preprocessor variables.
2793 
2794 cat >>confdefs.h <<_ACEOF
2795 #define PACKAGE_NAME "$PACKAGE_NAME"
2796 _ACEOF
2797 
2798 cat >>confdefs.h <<_ACEOF
2799 #define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2800 _ACEOF
2801 
2802 cat >>confdefs.h <<_ACEOF
2803 #define PACKAGE_VERSION "$PACKAGE_VERSION"
2804 _ACEOF
2805 
2806 cat >>confdefs.h <<_ACEOF
2807 #define PACKAGE_STRING "$PACKAGE_STRING"
2808 _ACEOF
2809 
2810 cat >>confdefs.h <<_ACEOF
2811 #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2812 _ACEOF
2813 
2814 cat >>confdefs.h <<_ACEOF
2815 #define PACKAGE_URL "$PACKAGE_URL"
2816 _ACEOF
2817 
2818 
2819 # Let the site file select an alternate cache file if it wants to.
2820 # Prefer an explicitly selected file to automatically selected ones.
2821 ac_site_file1=NONE
2822 ac_site_file2=NONE
2823 if test -n "$CONFIG_SITE"; then
2824   # We do not want a PATH search for config.site.
2825   case $CONFIG_SITE in #((
2826     -*)  ac_site_file1=./$CONFIG_SITE;;
2827     */*) ac_site_file1=$CONFIG_SITE;;
2828     *)   ac_site_file1=./$CONFIG_SITE;;
2829   esac
2830 elif test "x$prefix" != xNONE; then
2831   ac_site_file1=$prefix/share/config.site
2832   ac_site_file2=$prefix/etc/config.site
2833 else
2834   ac_site_file1=$ac_default_prefix/share/config.site
2835   ac_site_file2=$ac_default_prefix/etc/config.site
2836 fi
2837 for ac_site_file in "$ac_site_file1" "$ac_site_file2"
2838 do
2839   test "x$ac_site_file" = xNONE && continue
2840   if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2841     { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2842 $as_echo "$as_me: loading site script $ac_site_file" >&6;}
2843     sed 's/^/| /' "$ac_site_file" >&5
2844     . "$ac_site_file" \
2845       || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2846 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2847 as_fn_error $? "failed to load site script $ac_site_file
2848 See \`config.log' for more details" "$LINENO" 5 ; }
2849   fi
2850 done
2851 
2852 if test -r "$cache_file"; then
2853   # Some versions of bash will fail to source /dev/null (special files
2854   # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
2855   if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2856     { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2857 $as_echo "$as_me: loading cache $cache_file" >&6;}
2858     case $cache_file in
2859       [\\/]* | ?:[\\/]* ) . "$cache_file";;
2860       *)                      . "./$cache_file";;
2861     esac
2862   fi
2863 else
2864   { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2865 $as_echo "$as_me: creating cache $cache_file" >&6;}
2866   >$cache_file
2867 fi
2868 
2869 # Check that the precious variables saved in the cache have kept the same
2870 # value.
2871 ac_cache_corrupted=false
2872 for ac_var in $ac_precious_vars; do
2873   eval ac_old_set=\$ac_cv_env_${ac_var}_set
2874   eval ac_new_set=\$ac_env_${ac_var}_set
2875   eval ac_old_val=\$ac_cv_env_${ac_var}_value
2876   eval ac_new_val=\$ac_env_${ac_var}_value
2877   case $ac_old_set,$ac_new_set in
2878     set,)
2879       { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2880 $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
2881       ac_cache_corrupted=: ;;
2882     ,set)
2883       { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2884 $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
2885       ac_cache_corrupted=: ;;
2886     ,);;
2887     *)
2888       if test "x$ac_old_val" != "x$ac_new_val"; then
2889         # differences in whitespace do not lead to failure.
2890         ac_old_val_w=`echo x $ac_old_val`
2891         ac_new_val_w=`echo x $ac_new_val`
2892         if test "$ac_old_val_w" != "$ac_new_val_w"; then
2893           { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2894 $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2895           ac_cache_corrupted=:
2896         else
2897           { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2898 $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2899           eval $ac_var=\$ac_old_val
2900         fi
2901         { $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
2902 $as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
2903         { $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
2904 $as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
2905       fi;;
2906   esac
2907   # Pass precious variables to config.status.
2908   if test "$ac_new_set" = set; then
2909     case $ac_new_val in
2910     *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
2911     *) ac_arg=$ac_var=$ac_new_val ;;
2912     esac
2913     case " $ac_configure_args " in
2914       *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
2915       *) as_fn_append ac_configure_args " '$ac_arg'" ;;
2916     esac
2917   fi
2918 done
2919 if $ac_cache_corrupted; then
2920   { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2921 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2922   { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2923 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
2924   as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
2925 fi
2926 ## -------------------- ##
2927 ## Main body of script. ##
2928 ## -------------------- ##
2929 
2930 ac_ext=c
2931 ac_cpp='$CPP $CPPFLAGS'
2932 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2933 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2934 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2935 
2936 
2937 
2938 ac_aux_dir=
2939 for ac_dir in build-aux "$srcdir"/build-aux; do
2940   if test -f "$ac_dir/install-sh"; then
2941     ac_aux_dir=$ac_dir
2942     ac_install_sh="$ac_aux_dir/install-sh -c"
2943     break
2944   elif test -f "$ac_dir/install.sh"; then
2945     ac_aux_dir=$ac_dir
2946     ac_install_sh="$ac_aux_dir/install.sh -c"
2947     break
2948   elif test -f "$ac_dir/shtool"; then
2949     ac_aux_dir=$ac_dir
2950     ac_install_sh="$ac_aux_dir/shtool install -c"
2951     break
2952   fi
2953 done
2954 if test -z "$ac_aux_dir"; then
2955   as_fn_error $? "cannot find install-sh, install.sh, or shtool in build-aux \"$srcdir\"/build-aux" "$LINENO" 5
2956 fi
2957 
2958 # These three variables are undocumented and unsupported,
2959 # and are intended to be withdrawn in a future Autoconf release.
2960 # They can cause serious problems if a builder's source tree is in a directory
2961 # whose full name contains unusual characters.
2962 ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
2963 ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
2964 ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
2965 
2966 
2967 # pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
2968 
2969 #
2970 # Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
2971 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
2972 #
2973 # This code is free software; you can redistribute it and/or modify it
2974 # under the terms of the GNU General Public License version 2 only, as
2975 # published by the Free Software Foundation.  Oracle designates this
2976 # particular file as subject to the "Classpath" exception as provided
2977 # by Oracle in the LICENSE file that accompanied this code.
2978 #
2979 # This code is distributed in the hope that it will be useful, but WITHOUT
2980 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
2981 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
2982 # version 2 for more details (a copy is included in the LICENSE file that
2983 # accompanied this code).
2984 #
2985 # You should have received a copy of the GNU General Public License version
2986 # 2 along with this work; if not, write to the Free Software Foundation,
2987 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
2988 #
2989 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
2990 # or visit www.oracle.com if you need additional information or have any
2991 # questions.
2992 #
2993 
2994 #
2995 # Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
2996 #
2997 # This program is free software; you can redistribute it and/or modify
2998 # it under the terms of the GNU General Public License as published by
2999 # the Free Software Foundation; either version 2 of the License, or
3000 # (at your option) any later version.
3001 #
3002 # This program is distributed in the hope that it will be useful, but
3003 # WITHOUT ANY WARRANTY; without even the implied warranty of
3004 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
3005 # General Public License for more details.
3006 #
3007 # You should have received a copy of the GNU General Public License
3008 # along with this program; if not, write to the Free Software
3009 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
3010 #
3011 # As a special exception to the GNU General Public License, if you
3012 # distribute this file as part of a program that contains a
3013 # configuration script generated by Autoconf, you may include it under
3014 # the same distribution terms that you use for the rest of that program.
3015 
3016 # PKG_PROG_PKG_CONFIG([MIN-VERSION])
3017 # ----------------------------------
3018 # PKG_PROG_PKG_CONFIG
3019 
3020 # PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
3021 #
3022 # Check to see whether a particular set of modules exists.  Similar
3023 # to PKG_CHECK_MODULES(), but does not set variables or print errors.
3024 #
3025 #
3026 # Similar to PKG_CHECK_MODULES, make sure that the first instance of
3027 # this or PKG_CHECK_MODULES is called, or make sure to call
3028 # PKG_CHECK_EXISTS manually
3029 # --------------------------------------------------------------
3030 
3031 
3032 
3033 # _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
3034 # ---------------------------------------------
3035 # _PKG_CONFIG
3036 
3037 # _PKG_SHORT_ERRORS_SUPPORTED
3038 # -----------------------------
3039 # _PKG_SHORT_ERRORS_SUPPORTED
3040 
3041 
3042 # PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
3043 # [ACTION-IF-NOT-FOUND])
3044 #
3045 #
3046 # Note that if there is a possibility the first call to
3047 # PKG_CHECK_MODULES might not happen, you should be sure to include an
3048 # explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
3049 #
3050 #
3051 # --------------------------------------------------------------
3052 # PKG_CHECK_MODULES
3053 
3054 
3055 # Include these first...
3056 #
3057 # Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
3058 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3059 #
3060 # This code is free software; you can redistribute it and/or modify it
3061 # under the terms of the GNU General Public License version 2 only, as
3062 # published by the Free Software Foundation.  Oracle designates this
3063 # particular file as subject to the "Classpath" exception as provided
3064 # by Oracle in the LICENSE file that accompanied this code.
3065 #
3066 # This code is distributed in the hope that it will be useful, but WITHOUT
3067 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3068 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3069 # version 2 for more details (a copy is included in the LICENSE file that
3070 # accompanied this code).
3071 #
3072 # You should have received a copy of the GNU General Public License version
3073 # 2 along with this work; if not, write to the Free Software Foundation,
3074 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3075 #
3076 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3077 # or visit www.oracle.com if you need additional information or have any
3078 # questions.
3079 #
3080 
3081 # Test if $1 is a valid argument to $3 (often is $JAVA passed as $3)
3082 # If so, then append $1 to $2\
3083 # Also set JVM_ARG_OK to true/false depending on outcome.
3084 
3085 
3086 # This will make sure the given variable points to a full and proper
3087 # path. This means:
3088 # 1) There will be no spaces in the path. On posix platforms,
3089 #    spaces in the path will result in an error. On Windows,
3090 #    the path will be rewritten using short-style to be space-free.
3091 # 2) The path will be absolute, and it will be in unix-style (on
3092 #     cygwin).
3093 # $1: The name of the variable to fix
3094 
3095 
3096 # This will make sure the given variable points to a executable
3097 # with a full and proper path. This means:
3098 # 1) There will be no spaces in the path. On posix platforms,
3099 #    spaces in the path will result in an error. On Windows,
3100 #    the path will be rewritten using short-style to be space-free.
3101 # 2) The path will be absolute, and it will be in unix-style (on
3102 #     cygwin).
3103 # Any arguments given to the executable is preserved.
3104 # If the input variable does not have a directory specification, then
3105 # it need to be in the PATH.
3106 # $1: The name of the variable to fix
3107 
3108 
3109 
3110 
3111 
3112 
3113 # Test that variable $1 denoting a program is not empty. If empty, exit with an error.
3114 # $1: variable to check
3115 # $2: executable name to print in warning (optional)
3116 
3117 
3118 # Does AC_PATH_PROG followed by BASIC_CHECK_NONEMPTY.
3119 # Arguments as AC_PATH_PROG:
3120 # $1: variable to set
3121 # $2: executable name to look for
3122 
3123 
3124 # Setup the most fundamental tools that relies on not much else to set up,
3125 # but is used by much of the early bootstrap code.
3126 
3127 
3128 # Setup basic configuration paths, and platform-specific stuff related to PATHs.
3129 
3130 
3131 
3132 
3133 
3134 
3135 
3136 #%%% Simple tools %%%
3137 
3138 # Check if we have found a usable version of make
3139 # $1: the path to a potential make binary (or empty)
3140 # $2: the description on how we found this
3141 
3142 
3143 # Goes looking for a usable version of GNU make.
3144 
3145 
3146 
3147 
3148 
3149 
3150 # Check if build directory is on local disk. If not possible to determine,
3151 # we prefer to claim it's local.
3152 # Argument 1: directory to test
3153 # Argument 2: what to do if it is on local disk
3154 # Argument 3: what to do otherwise (remote disk or failure)
3155 
3156 
3157 # Check that source files have basic read permissions set. This might
3158 # not be the case in cygwin in certain conditions.
3159 
3160 
3161 
3162 
3163 #
3164 # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3165 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3166 #
3167 # This code is free software; you can redistribute it and/or modify it
3168 # under the terms of the GNU General Public License version 2 only, as
3169 # published by the Free Software Foundation.  Oracle designates this
3170 # particular file as subject to the "Classpath" exception as provided
3171 # by Oracle in the LICENSE file that accompanied this code.
3172 #
3173 # This code is distributed in the hope that it will be useful, but WITHOUT
3174 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3175 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3176 # version 2 for more details (a copy is included in the LICENSE file that
3177 # accompanied this code).
3178 #
3179 # You should have received a copy of the GNU General Public License version
3180 # 2 along with this work; if not, write to the Free Software Foundation,
3181 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3182 #
3183 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3184 # or visit www.oracle.com if you need additional information or have any
3185 # questions.
3186 #
3187 
3188 
3189 
3190 
3191 
3192 # Helper function which possibly converts a path using DOS-style short mode.
3193 # If so, the updated path is stored in $new_path.
3194 # $1: The path to check
3195 
3196 
3197 # Helper function which possibly converts a path using DOS-style short mode.
3198 # If so, the updated path is stored in $new_path.
3199 # $1: The path to check
3200 
3201 
3202 # FIXME: The BASIC_FIXUP_*_CYGWIN/MSYS is most likely too convoluted
3203 # and could probably be heavily simplified. However, all changes in this
3204 # area tend to need lot of testing in different scenarios, and in lack of
3205 # proper unit testing, cleaning this up has not been deemed worth the effort
3206 # at the moment.
3207 
3208 
3209 
3210 
3211 
3212 
3213 
3214 
3215 
3216 # Setup basic configuration paths, and platform-specific stuff related to PATHs.
3217 
3218 
3219 
3220 
3221 #
3222 # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3223 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3224 #
3225 # This code is free software; you can redistribute it and/or modify it
3226 # under the terms of the GNU General Public License version 2 only, as
3227 # published by the Free Software Foundation.  Oracle designates this
3228 # particular file as subject to the "Classpath" exception as provided
3229 # by Oracle in the LICENSE file that accompanied this code.
3230 #
3231 # This code is distributed in the hope that it will be useful, but WITHOUT
3232 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3233 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3234 # version 2 for more details (a copy is included in the LICENSE file that
3235 # accompanied this code).
3236 #
3237 # You should have received a copy of the GNU General Public License version
3238 # 2 along with this work; if not, write to the Free Software Foundation,
3239 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3240 #
3241 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3242 # or visit www.oracle.com if you need additional information or have any
3243 # questions.
3244 #
3245 
3246 
3247 
3248 
3249 
3250 
3251 
3252 
3253 
3254 
3255 
3256 # ... then the rest
3257 #
3258 # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3259 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3260 #
3261 # This code is free software; you can redistribute it and/or modify it
3262 # under the terms of the GNU General Public License version 2 only, as
3263 # published by the Free Software Foundation.  Oracle designates this
3264 # particular file as subject to the "Classpath" exception as provided
3265 # by Oracle in the LICENSE file that accompanied this code.
3266 #
3267 # This code is distributed in the hope that it will be useful, but WITHOUT
3268 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3269 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3270 # version 2 for more details (a copy is included in the LICENSE file that
3271 # accompanied this code).
3272 #
3273 # You should have received a copy of the GNU General Public License version
3274 # 2 along with this work; if not, write to the Free Software Foundation,
3275 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3276 #
3277 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3278 # or visit www.oracle.com if you need additional information or have any
3279 # questions.
3280 #
3281 
3282 # Execute the check given as argument, and verify the result
3283 # If the Boot JDK was previously found, do nothing
3284 # $1 A command line (typically autoconf macro) to execute
3285 
3286 
3287 # Test: Is bootjdk explicitely set by command line arguments?
3288 
3289 
3290 # Test: Is bootjdk available from builddeps?
3291 
3292 
3293 # Test: Is $JAVA_HOME set?
3294 
3295 
3296 # Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
3297 
3298 
3299 # Test: Is there a /usr/libexec/java_home? (Typically on MacOSX)
3300 
3301 
3302 # Look for a jdk in the given path. If there are multiple, try to select the newest.
3303 # If found, set BOOT_JDK and BOOT_JDK_FOUND.
3304 # $1 = Path to directory containing jdk installations.
3305 # $2 = String to append to the found JDK directory to get the proper JDK home
3306 
3307 
3308 # Call BOOTJDK_FIND_BEST_JDK_IN_DIRECTORY, but use the given
3309 # environmental variable as base for where to look.
3310 # $1 Name of an environmal variable, assumed to point to the Program Files directory.
3311 
3312 
3313 # Test: Is there a JDK installed in default, well-known locations?
3314 
3315 
3316 # Check that a command-line tool in the Boot JDK is correct
3317 # $1 = name of variable to assign
3318 # $2 = name of binary
3319 
3320 
3321 ###############################################################################
3322 #
3323 # We need a Boot JDK to bootstrap the build.
3324 #
3325 
3326 
3327 
3328 
3329 
3330 #
3331 # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3332 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3333 #
3334 # This code is free software; you can redistribute it and/or modify it
3335 # under the terms of the GNU General Public License version 2 only, as
3336 # published by the Free Software Foundation.  Oracle designates this
3337 # particular file as subject to the "Classpath" exception as provided
3338 # by Oracle in the LICENSE file that accompanied this code.
3339 #
3340 # This code is distributed in the hope that it will be useful, but WITHOUT
3341 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3342 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3343 # version 2 for more details (a copy is included in the LICENSE file that
3344 # accompanied this code).
3345 #
3346 # You should have received a copy of the GNU General Public License version
3347 # 2 along with this work; if not, write to the Free Software Foundation,
3348 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3349 #
3350 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3351 # or visit www.oracle.com if you need additional information or have any
3352 # questions.
3353 #
3354 
3355 
3356 
3357 
3358 
3359 
3360 
3361 
3362 
3363 
3364 
3365 
3366 
3367 
3368 
3369 
3370 
3371 
3372 
3373 
3374 #
3375 # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3376 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3377 #
3378 # This code is free software; you can redistribute it and/or modify it
3379 # under the terms of the GNU General Public License version 2 only, as
3380 # published by the Free Software Foundation.  Oracle designates this
3381 # particular file as subject to the "Classpath" exception as provided
3382 # by Oracle in the LICENSE file that accompanied this code.
3383 #
3384 # This code is distributed in the hope that it will be useful, but WITHOUT
3385 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3386 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3387 # version 2 for more details (a copy is included in the LICENSE file that
3388 # accompanied this code).
3389 #
3390 # You should have received a copy of the GNU General Public License version
3391 # 2 along with this work; if not, write to the Free Software Foundation,
3392 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3393 #
3394 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3395 # or visit www.oracle.com if you need additional information or have any
3396 # questions.
3397 #
3398 
3399 
3400 
3401 
3402 
3403 cygwin_help() {
3404     case $1 in
3405     unzip)
3406         PKGHANDLER_COMMAND="cd <location of cygwin setup.exe> && cmd /c setup -q -P unzip" ;;
3407     zip)
3408         PKGHANDLER_COMMAND="cd <location of cygwin setup.exe> && cmd /c setup -q -P zip" ;;
3409     make)
3410         PKGHANDLER_COMMAND="cd <location of cygwin setup.exe> && cmd /c setup -q -P make" ;;
3411     * )
3412        break ;;
3413     esac
3414 }
3415 
3416 apt_help() {
3417     case $1 in
3418     devkit)
3419         PKGHANDLER_COMMAND="sudo apt-get install build-essential" ;;
3420     openjdk)
3421         PKGHANDLER_COMMAND="sudo apt-get install openjdk-7-jdk" ;;
3422     alsa)
3423         PKGHANDLER_COMMAND="sudo apt-get install libasound2-dev" ;;
3424     cups)
3425         PKGHANDLER_COMMAND="sudo apt-get install libcups2-dev" ;;
3426     freetype2)
3427         PKGHANDLER_COMMAND="sudo apt-get install libfreetype6-dev" ;;
3428     pulse)
3429         PKGHANDLER_COMMAND="sudo apt-get install libpulse-dev" ;;
3430     x11)
3431         PKGHANDLER_COMMAND="sudo apt-get install libX11-dev libxext-dev libxrender-dev libxtst-dev" ;;
3432     ccache)
3433         PKGHANDLER_COMMAND="sudo apt-get install ccache" ;;
3434     * )
3435        break ;;
3436     esac
3437 }
3438 
3439 yum_help() {
3440     case $1 in
3441     devkit)
3442         PKGHANDLER_COMMAND="sudo yum groupinstall \"Development Tools\"" ;;
3443     openjdk)
3444         PKGHANDLER_COMMAND="sudo yum install java-1.7.0-openjdk" ;;
3445     alsa)
3446         PKGHANDLER_COMMAND="sudo yum install alsa-lib-devel" ;;
3447     cups)
3448         PKGHANDLER_COMMAND="sudo yum install cups-devel" ;;
3449     freetype2)
3450         PKGHANDLER_COMMAND="sudo yum install freetype2-devel" ;;
3451     pulse)
3452         PKGHANDLER_COMMAND="sudo yum install pulseaudio-libs-devel" ;;
3453     x11)
3454         PKGHANDLER_COMMAND="sudo yum install libXtst-devel" ;;
3455     ccache)
3456         PKGHANDLER_COMMAND="sudo yum install ccache" ;;
3457     * )
3458        break ;;
3459     esac
3460 }
3461 
3462 port_help() {
3463     PKGHANDLER_COMMAND=""
3464 }
3465 
3466 pkgutil_help() {
3467     PKGHANDLER_COMMAND=""
3468 }
3469 
3470 pkgadd_help() {
3471     PKGHANDLER_COMMAND=""
3472 }
3473 
3474 
3475 
3476 #
3477 # Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
3478 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3479 #
3480 # This code is free software; you can redistribute it and/or modify it
3481 # under the terms of the GNU General Public License version 2 only, as
3482 # published by the Free Software Foundation.  Oracle designates this
3483 # particular file as subject to the "Classpath" exception as provided
3484 # by Oracle in the LICENSE file that accompanied this code.
3485 #
3486 # This code is distributed in the hope that it will be useful, but WITHOUT
3487 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3488 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3489 # version 2 for more details (a copy is included in the LICENSE file that
3490 # accompanied this code).
3491 #
3492 # You should have received a copy of the GNU General Public License version
3493 # 2 along with this work; if not, write to the Free Software Foundation,
3494 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3495 #
3496 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3497 # or visit www.oracle.com if you need additional information or have any
3498 # questions.
3499 #
3500 
3501 
3502 
3503 
3504 
3505 
3506 
3507 
3508 ###############################################################################
3509 #
3510 # Should we build only OpenJDK even if closed sources are present?
3511 #
3512 
3513 
3514 
3515 
3516 ###############################################################################
3517 #
3518 # Setup version numbers
3519 #
3520 
3521 
3522 
3523 
3524 
3525 
3526 # Support for customization of the build process. Some build files
3527 # will include counterparts from this location, if they exist. This allows
3528 # for a degree of customization of the build targets and the rules/recipes
3529 # to create them
3530 
3531 # Check whether --with-custom-make-dir was given.
3532 if test "${with_custom_make_dir+set}" = set; then :
3533   withval=$with_custom_make_dir; CUSTOM_MAKE_DIR=$with_custom_make_dir
3534 fi
3535 
3536 
3537 
3538 #
3539 # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3540 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3541 #
3542 # This code is free software; you can redistribute it and/or modify it
3543 # under the terms of the GNU General Public License version 2 only, as
3544 # published by the Free Software Foundation.  Oracle designates this
3545 # particular file as subject to the "Classpath" exception as provided
3546 # by Oracle in the LICENSE file that accompanied this code.
3547 #
3548 # This code is distributed in the hope that it will be useful, but WITHOUT
3549 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3550 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3551 # version 2 for more details (a copy is included in the LICENSE file that
3552 # accompanied this code).
3553 #
3554 # You should have received a copy of the GNU General Public License version
3555 # 2 along with this work; if not, write to the Free Software Foundation,
3556 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3557 #
3558 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3559 # or visit www.oracle.com if you need additional information or have any
3560 # questions.
3561 #
3562 
3563 
3564 
3565 
3566 
3567 
3568 
3569 
3570 
3571 
3572 
3573 
3574 
3575 
3576 
3577 #
3578 # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3579 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3580 #
3581 # This code is free software; you can redistribute it and/or modify it
3582 # under the terms of the GNU General Public License version 2 only, as
3583 # published by the Free Software Foundation.  Oracle designates this
3584 # particular file as subject to the "Classpath" exception as provided
3585 # by Oracle in the LICENSE file that accompanied this code.
3586 #
3587 # This code is distributed in the hope that it will be useful, but WITHOUT
3588 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3589 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3590 # version 2 for more details (a copy is included in the LICENSE file that
3591 # accompanied this code).
3592 #
3593 # You should have received a copy of the GNU General Public License version
3594 # 2 along with this work; if not, write to the Free Software Foundation,
3595 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3596 #
3597 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3598 # or visit www.oracle.com if you need additional information or have any
3599 # questions.
3600 #
3601 
3602 # Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
3603 # Converts autoconf style CPU name to OpenJDK style, into
3604 # VAR_CPU, VAR_CPU_ARCH, VAR_CPU_BITS and VAR_CPU_ENDIAN.
3605 
3606 
3607 # Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
3608 # Converts autoconf style OS name to OpenJDK style, into
3609 # VAR_OS and VAR_OS_API.
3610 
3611 
3612 # Expects $host_os $host_cpu $build_os and $build_cpu
3613 # and $with_target_bits to have been setup!
3614 #
3615 # Translate the standard triplet(quadruplet) definition
3616 # of the target/build system into OPENJDK_TARGET_OS, OPENJDK_TARGET_CPU,
3617 # OPENJDK_BUILD_OS, etc.
3618 
3619 
3620 # Check if a reduced build (32-bit on 64-bit platforms) is requested, and modify behaviour
3621 # accordingly. Must be done after setting up build and target system, but before
3622 # doing anything else with these values.
3623 
3624 
3625     # Setup the legacy variables, for controlling the old makefiles.
3626     #
3627 
3628 
3629 
3630 
3631 #%%% Build and target systems %%%
3632 
3633 
3634 
3635 
3636 # Support macro for PLATFORM_SETUP_OPENJDK_TARGET_BITS.
3637 # Add -mX to various FLAGS variables.
3638 
3639 
3640 
3641 
3642 
3643 
3644 #
3645 # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3646 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3647 #
3648 # This code is free software; you can redistribute it and/or modify it
3649 # under the terms of the GNU General Public License version 2 only, as
3650 # published by the Free Software Foundation.  Oracle designates this
3651 # particular file as subject to the "Classpath" exception as provided
3652 # by Oracle in the LICENSE file that accompanied this code.
3653 #
3654 # This code is distributed in the hope that it will be useful, but WITHOUT
3655 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3656 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3657 # version 2 for more details (a copy is included in the LICENSE file that
3658 # accompanied this code).
3659 #
3660 # You should have received a copy of the GNU General Public License version
3661 # 2 along with this work; if not, write to the Free Software Foundation,
3662 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3663 #
3664 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3665 # or visit www.oracle.com if you need additional information or have any
3666 # questions.
3667 #
3668 
3669 
3670 
3671 
3672 
3673 
3674 
3675 
3676 #
3677 # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3678 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3679 #
3680 # This code is free software; you can redistribute it and/or modify it
3681 # under the terms of the GNU General Public License version 2 only, as
3682 # published by the Free Software Foundation.  Oracle designates this
3683 # particular file as subject to the "Classpath" exception as provided
3684 # by Oracle in the LICENSE file that accompanied this code.
3685 #
3686 # This code is distributed in the hope that it will be useful, but WITHOUT
3687 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3688 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3689 # version 2 for more details (a copy is included in the LICENSE file that
3690 # accompanied this code).
3691 #
3692 # You should have received a copy of the GNU General Public License version
3693 # 2 along with this work; if not, write to the Free Software Foundation,
3694 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3695 #
3696 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3697 # or visit www.oracle.com if you need additional information or have any
3698 # questions.
3699 #
3700 
3701 # $1 = compiler to test (CC or CXX)
3702 # $2 = human readable name of compiler (C or C++)
3703 
3704 
3705 
3706 
3707 
3708 # $1 = compiler to test (CC or CXX)
3709 # $2 = human readable name of compiler (C or C++)
3710 # $3 = list of compiler names to search for
3711 
3712 
3713 
3714 
3715 
3716 
3717 
3718 
3719 
3720 
3721 
3722 
3723 
3724 # TOOLCHAIN_COMPILER_CHECK_ARGUMENTS([ARGUMENT], [RUN-IF-TRUE],
3725 #                                   [RUN-IF-FALSE])
3726 # ------------------------------------------------------------
3727 # Check that the c and c++ compilers support an argument
3728 
3729 
3730 
3731 
3732 # Setup the JTREG paths
3733 
3734 
3735 #
3736 # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3737 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3738 #
3739 # This code is free software; you can redistribute it and/or modify it
3740 # under the terms of the GNU General Public License version 2 only, as
3741 # published by the Free Software Foundation.  Oracle designates this
3742 # particular file as subject to the "Classpath" exception as provided
3743 # by Oracle in the LICENSE file that accompanied this code.
3744 #
3745 # This code is distributed in the hope that it will be useful, but WITHOUT
3746 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3747 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3748 # version 2 for more details (a copy is included in the LICENSE file that
3749 # accompanied this code).
3750 #
3751 # You should have received a copy of the GNU General Public License version
3752 # 2 along with this work; if not, write to the Free Software Foundation,
3753 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3754 #
3755 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3756 # or visit www.oracle.com if you need additional information or have any
3757 # questions.
3758 #
3759 
3760 
3761 
3762 
3763 
3764 
3765 
3766 # Check if the VS env variables were setup prior to running configure.
3767 # If not, then find vcvarsall.bat and run it automatically, and integrate
3768 # the set env variables into the spec file.
3769 
3770 
3771 
3772 # Setup the DXSDK paths
3773 
3774 
3775 
3776 
3777 
3778 
3779 # This line needs to be here, verbatim, after all includes and the dummy hook
3780 # definitions. It is replaced with custom functionality when building
3781 # custom sources.
3782 #CUSTOM_AUTOCONF_INCLUDE
3783 
3784 # Do not change or remove the following line, it is needed for consistency checks:
3785 DATE_WHEN_GENERATED=1371547824
3786 
3787 ###############################################################################
3788 #
3789 # Initialization / Boot-strapping
3790 #
3791 # The bootstrapping process needs to solve the "chicken or the egg" problem,
3792 # thus it jumps back and forth, each time gaining something needed later on.
3793 #
3794 ###############################################################################
3795 
3796 # Basic initialization that must happen first of all
3797 
3798 # Save the original command line. This is passed to us by the wrapper configure script.
3799 
3800 DATE_WHEN_CONFIGURED=`LANG=C date`
3801 
3802 { $as_echo "$as_me:${as_lineno-$LINENO}: Configuration created at $DATE_WHEN_CONFIGURED." >&5
3803 $as_echo "$as_me: Configuration created at $DATE_WHEN_CONFIGURED." >&6;}
3804 { $as_echo "$as_me:${as_lineno-$LINENO}: configure script generated at timestamp $DATE_WHEN_GENERATED." >&5
3805 $as_echo "$as_me: configure script generated at timestamp $DATE_WHEN_GENERATED." >&6;}
3806 
3807 
3808 
3809 # Start with tools that do not need have cross compilation support
3810 # and can be expected to be found in the default PATH. These tools are
3811 # used by configure. Nor are these tools expected to be found in the
3812 # devkit from the builddeps server either, since they are
3813 # needed to download the devkit.
3814 
3815 # First are all the simple required tools.
3816 
3817     for ac_prog in basename
3818 do
3819   # Extract the first word of "$ac_prog", so it can be a program name with args.
3820 set dummy $ac_prog; ac_word=$2
3821 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3822 $as_echo_n "checking for $ac_word... " >&6; }
3823 if test "${ac_cv_path_BASENAME+set}" = set; then :
3824   $as_echo_n "(cached) " >&6
3825 else
3826   case $BASENAME in
3827   [\\/]* | ?:[\\/]*)
3828   ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
3829   ;;
3830   *)
3831   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3832 for as_dir in $PATH
3833 do
3834   IFS=$as_save_IFS
3835   test -z "$as_dir" && as_dir=.
3836     for ac_exec_ext in '' $ac_executable_extensions; do
3837   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3838     ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
3839     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3840     break 2
3841   fi
3842 done
3843   done
3844 IFS=$as_save_IFS
3845 
3846   ;;
3847 esac
3848 fi
3849 BASENAME=$ac_cv_path_BASENAME
3850 if test -n "$BASENAME"; then
3851   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
3852 $as_echo "$BASENAME" >&6; }
3853 else
3854   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3855 $as_echo "no" >&6; }
3856 fi
3857 
3858 
3859   test -n "$BASENAME" && break
3860 done
3861 
3862 
3863     if test "x$BASENAME" = x; then
3864         if test "xbasename" = x; then
3865           PROG_NAME=basename
3866         else
3867           PROG_NAME=basename
3868         fi
3869         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
3870 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
3871         as_fn_error $? "Cannot continue" "$LINENO" 5
3872     fi
3873 
3874 
3875 
3876     for ac_prog in bash
3877 do
3878   # Extract the first word of "$ac_prog", so it can be a program name with args.
3879 set dummy $ac_prog; ac_word=$2
3880 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3881 $as_echo_n "checking for $ac_word... " >&6; }
3882 if test "${ac_cv_path_BASH+set}" = set; then :
3883   $as_echo_n "(cached) " >&6
3884 else
3885   case $BASH in
3886   [\\/]* | ?:[\\/]*)
3887   ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
3888   ;;
3889   *)
3890   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3891 for as_dir in $PATH
3892 do
3893   IFS=$as_save_IFS
3894   test -z "$as_dir" && as_dir=.
3895     for ac_exec_ext in '' $ac_executable_extensions; do
3896   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3897     ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
3898     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3899     break 2
3900   fi
3901 done
3902   done
3903 IFS=$as_save_IFS
3904 
3905   ;;
3906 esac
3907 fi
3908 BASH=$ac_cv_path_BASH
3909 if test -n "$BASH"; then
3910   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
3911 $as_echo "$BASH" >&6; }
3912 else
3913   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3914 $as_echo "no" >&6; }
3915 fi
3916 
3917 
3918   test -n "$BASH" && break
3919 done
3920 
3921 
3922     if test "x$BASH" = x; then
3923         if test "xbash" = x; then
3924           PROG_NAME=bash
3925         else
3926           PROG_NAME=bash
3927         fi
3928         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
3929 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
3930         as_fn_error $? "Cannot continue" "$LINENO" 5
3931     fi
3932 
3933 
3934 
3935     for ac_prog in cat
3936 do
3937   # Extract the first word of "$ac_prog", so it can be a program name with args.
3938 set dummy $ac_prog; ac_word=$2
3939 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3940 $as_echo_n "checking for $ac_word... " >&6; }
3941 if test "${ac_cv_path_CAT+set}" = set; then :
3942   $as_echo_n "(cached) " >&6
3943 else
3944   case $CAT in
3945   [\\/]* | ?:[\\/]*)
3946   ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
3947   ;;
3948   *)
3949   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3950 for as_dir in $PATH
3951 do
3952   IFS=$as_save_IFS
3953   test -z "$as_dir" && as_dir=.
3954     for ac_exec_ext in '' $ac_executable_extensions; do
3955   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3956     ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
3957     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3958     break 2
3959   fi
3960 done
3961   done
3962 IFS=$as_save_IFS
3963 
3964   ;;
3965 esac
3966 fi
3967 CAT=$ac_cv_path_CAT
3968 if test -n "$CAT"; then
3969   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
3970 $as_echo "$CAT" >&6; }
3971 else
3972   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3973 $as_echo "no" >&6; }
3974 fi
3975 
3976 
3977   test -n "$CAT" && break
3978 done
3979 
3980 
3981     if test "x$CAT" = x; then
3982         if test "xcat" = x; then
3983           PROG_NAME=cat
3984         else
3985           PROG_NAME=cat
3986         fi
3987         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
3988 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
3989         as_fn_error $? "Cannot continue" "$LINENO" 5
3990     fi
3991 
3992 
3993 
3994     for ac_prog in chmod
3995 do
3996   # Extract the first word of "$ac_prog", so it can be a program name with args.
3997 set dummy $ac_prog; ac_word=$2
3998 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3999 $as_echo_n "checking for $ac_word... " >&6; }
4000 if test "${ac_cv_path_CHMOD+set}" = set; then :
4001   $as_echo_n "(cached) " >&6
4002 else
4003   case $CHMOD in
4004   [\\/]* | ?:[\\/]*)
4005   ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
4006   ;;
4007   *)
4008   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4009 for as_dir in $PATH
4010 do
4011   IFS=$as_save_IFS
4012   test -z "$as_dir" && as_dir=.
4013     for ac_exec_ext in '' $ac_executable_extensions; do
4014   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4015     ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
4016     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4017     break 2
4018   fi
4019 done
4020   done
4021 IFS=$as_save_IFS
4022 
4023   ;;
4024 esac
4025 fi
4026 CHMOD=$ac_cv_path_CHMOD
4027 if test -n "$CHMOD"; then
4028   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
4029 $as_echo "$CHMOD" >&6; }
4030 else
4031   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4032 $as_echo "no" >&6; }
4033 fi
4034 
4035 
4036   test -n "$CHMOD" && break
4037 done
4038 
4039 
4040     if test "x$CHMOD" = x; then
4041         if test "xchmod" = x; then
4042           PROG_NAME=chmod
4043         else
4044           PROG_NAME=chmod
4045         fi
4046         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4047 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4048         as_fn_error $? "Cannot continue" "$LINENO" 5
4049     fi
4050 
4051 
4052 
4053     for ac_prog in cmp
4054 do
4055   # Extract the first word of "$ac_prog", so it can be a program name with args.
4056 set dummy $ac_prog; ac_word=$2
4057 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4058 $as_echo_n "checking for $ac_word... " >&6; }
4059 if test "${ac_cv_path_CMP+set}" = set; then :
4060   $as_echo_n "(cached) " >&6
4061 else
4062   case $CMP in
4063   [\\/]* | ?:[\\/]*)
4064   ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
4065   ;;
4066   *)
4067   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4068 for as_dir in $PATH
4069 do
4070   IFS=$as_save_IFS
4071   test -z "$as_dir" && as_dir=.
4072     for ac_exec_ext in '' $ac_executable_extensions; do
4073   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4074     ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
4075     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4076     break 2
4077   fi
4078 done
4079   done
4080 IFS=$as_save_IFS
4081 
4082   ;;
4083 esac
4084 fi
4085 CMP=$ac_cv_path_CMP
4086 if test -n "$CMP"; then
4087   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
4088 $as_echo "$CMP" >&6; }
4089 else
4090   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4091 $as_echo "no" >&6; }
4092 fi
4093 
4094 
4095   test -n "$CMP" && break
4096 done
4097 
4098 
4099     if test "x$CMP" = x; then
4100         if test "xcmp" = x; then
4101           PROG_NAME=cmp
4102         else
4103           PROG_NAME=cmp
4104         fi
4105         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4106 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4107         as_fn_error $? "Cannot continue" "$LINENO" 5
4108     fi
4109 
4110 
4111 
4112     for ac_prog in comm
4113 do
4114   # Extract the first word of "$ac_prog", so it can be a program name with args.
4115 set dummy $ac_prog; ac_word=$2
4116 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4117 $as_echo_n "checking for $ac_word... " >&6; }
4118 if test "${ac_cv_path_COMM+set}" = set; then :
4119   $as_echo_n "(cached) " >&6
4120 else
4121   case $COMM in
4122   [\\/]* | ?:[\\/]*)
4123   ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
4124   ;;
4125   *)
4126   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4127 for as_dir in $PATH
4128 do
4129   IFS=$as_save_IFS
4130   test -z "$as_dir" && as_dir=.
4131     for ac_exec_ext in '' $ac_executable_extensions; do
4132   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4133     ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
4134     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4135     break 2
4136   fi
4137 done
4138   done
4139 IFS=$as_save_IFS
4140 
4141   ;;
4142 esac
4143 fi
4144 COMM=$ac_cv_path_COMM
4145 if test -n "$COMM"; then
4146   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
4147 $as_echo "$COMM" >&6; }
4148 else
4149   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4150 $as_echo "no" >&6; }
4151 fi
4152 
4153 
4154   test -n "$COMM" && break
4155 done
4156 
4157 
4158     if test "x$COMM" = x; then
4159         if test "xcomm" = x; then
4160           PROG_NAME=comm
4161         else
4162           PROG_NAME=comm
4163         fi
4164         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4165 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4166         as_fn_error $? "Cannot continue" "$LINENO" 5
4167     fi
4168 
4169 
4170 
4171     for ac_prog in cp
4172 do
4173   # Extract the first word of "$ac_prog", so it can be a program name with args.
4174 set dummy $ac_prog; ac_word=$2
4175 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4176 $as_echo_n "checking for $ac_word... " >&6; }
4177 if test "${ac_cv_path_CP+set}" = set; then :
4178   $as_echo_n "(cached) " >&6
4179 else
4180   case $CP in
4181   [\\/]* | ?:[\\/]*)
4182   ac_cv_path_CP="$CP" # Let the user override the test with a path.
4183   ;;
4184   *)
4185   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4186 for as_dir in $PATH
4187 do
4188   IFS=$as_save_IFS
4189   test -z "$as_dir" && as_dir=.
4190     for ac_exec_ext in '' $ac_executable_extensions; do
4191   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4192     ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
4193     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4194     break 2
4195   fi
4196 done
4197   done
4198 IFS=$as_save_IFS
4199 
4200   ;;
4201 esac
4202 fi
4203 CP=$ac_cv_path_CP
4204 if test -n "$CP"; then
4205   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
4206 $as_echo "$CP" >&6; }
4207 else
4208   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4209 $as_echo "no" >&6; }
4210 fi
4211 
4212 
4213   test -n "$CP" && break
4214 done
4215 
4216 
4217     if test "x$CP" = x; then
4218         if test "xcp" = x; then
4219           PROG_NAME=cp
4220         else
4221           PROG_NAME=cp
4222         fi
4223         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4224 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4225         as_fn_error $? "Cannot continue" "$LINENO" 5
4226     fi
4227 
4228 
4229 
4230     for ac_prog in cpio
4231 do
4232   # Extract the first word of "$ac_prog", so it can be a program name with args.
4233 set dummy $ac_prog; ac_word=$2
4234 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4235 $as_echo_n "checking for $ac_word... " >&6; }
4236 if test "${ac_cv_path_CPIO+set}" = set; then :
4237   $as_echo_n "(cached) " >&6
4238 else
4239   case $CPIO in
4240   [\\/]* | ?:[\\/]*)
4241   ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
4242   ;;
4243   *)
4244   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4245 for as_dir in $PATH
4246 do
4247   IFS=$as_save_IFS
4248   test -z "$as_dir" && as_dir=.
4249     for ac_exec_ext in '' $ac_executable_extensions; do
4250   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4251     ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
4252     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4253     break 2
4254   fi
4255 done
4256   done
4257 IFS=$as_save_IFS
4258 
4259   ;;
4260 esac
4261 fi
4262 CPIO=$ac_cv_path_CPIO
4263 if test -n "$CPIO"; then
4264   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
4265 $as_echo "$CPIO" >&6; }
4266 else
4267   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4268 $as_echo "no" >&6; }
4269 fi
4270 
4271 
4272   test -n "$CPIO" && break
4273 done
4274 
4275 
4276     if test "x$CPIO" = x; then
4277         if test "xcpio" = x; then
4278           PROG_NAME=cpio
4279         else
4280           PROG_NAME=cpio
4281         fi
4282         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4283 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4284         as_fn_error $? "Cannot continue" "$LINENO" 5
4285     fi
4286 
4287 
4288 
4289     for ac_prog in cut
4290 do
4291   # Extract the first word of "$ac_prog", so it can be a program name with args.
4292 set dummy $ac_prog; ac_word=$2
4293 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4294 $as_echo_n "checking for $ac_word... " >&6; }
4295 if test "${ac_cv_path_CUT+set}" = set; then :
4296   $as_echo_n "(cached) " >&6
4297 else
4298   case $CUT in
4299   [\\/]* | ?:[\\/]*)
4300   ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
4301   ;;
4302   *)
4303   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4304 for as_dir in $PATH
4305 do
4306   IFS=$as_save_IFS
4307   test -z "$as_dir" && as_dir=.
4308     for ac_exec_ext in '' $ac_executable_extensions; do
4309   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4310     ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
4311     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4312     break 2
4313   fi
4314 done
4315   done
4316 IFS=$as_save_IFS
4317 
4318   ;;
4319 esac
4320 fi
4321 CUT=$ac_cv_path_CUT
4322 if test -n "$CUT"; then
4323   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
4324 $as_echo "$CUT" >&6; }
4325 else
4326   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4327 $as_echo "no" >&6; }
4328 fi
4329 
4330 
4331   test -n "$CUT" && break
4332 done
4333 
4334 
4335     if test "x$CUT" = x; then
4336         if test "xcut" = x; then
4337           PROG_NAME=cut
4338         else
4339           PROG_NAME=cut
4340         fi
4341         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4342 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4343         as_fn_error $? "Cannot continue" "$LINENO" 5
4344     fi
4345 
4346 
4347 
4348     for ac_prog in date
4349 do
4350   # Extract the first word of "$ac_prog", so it can be a program name with args.
4351 set dummy $ac_prog; ac_word=$2
4352 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4353 $as_echo_n "checking for $ac_word... " >&6; }
4354 if test "${ac_cv_path_DATE+set}" = set; then :
4355   $as_echo_n "(cached) " >&6
4356 else
4357   case $DATE in
4358   [\\/]* | ?:[\\/]*)
4359   ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
4360   ;;
4361   *)
4362   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4363 for as_dir in $PATH
4364 do
4365   IFS=$as_save_IFS
4366   test -z "$as_dir" && as_dir=.
4367     for ac_exec_ext in '' $ac_executable_extensions; do
4368   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4369     ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
4370     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4371     break 2
4372   fi
4373 done
4374   done
4375 IFS=$as_save_IFS
4376 
4377   ;;
4378 esac
4379 fi
4380 DATE=$ac_cv_path_DATE
4381 if test -n "$DATE"; then
4382   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
4383 $as_echo "$DATE" >&6; }
4384 else
4385   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4386 $as_echo "no" >&6; }
4387 fi
4388 
4389 
4390   test -n "$DATE" && break
4391 done
4392 
4393 
4394     if test "x$DATE" = x; then
4395         if test "xdate" = x; then
4396           PROG_NAME=date
4397         else
4398           PROG_NAME=date
4399         fi
4400         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4401 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4402         as_fn_error $? "Cannot continue" "$LINENO" 5
4403     fi
4404 
4405 
4406 
4407     for ac_prog in gdiff diff
4408 do
4409   # Extract the first word of "$ac_prog", so it can be a program name with args.
4410 set dummy $ac_prog; ac_word=$2
4411 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4412 $as_echo_n "checking for $ac_word... " >&6; }
4413 if test "${ac_cv_path_DIFF+set}" = set; then :
4414   $as_echo_n "(cached) " >&6
4415 else
4416   case $DIFF in
4417   [\\/]* | ?:[\\/]*)
4418   ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
4419   ;;
4420   *)
4421   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4422 for as_dir in $PATH
4423 do
4424   IFS=$as_save_IFS
4425   test -z "$as_dir" && as_dir=.
4426     for ac_exec_ext in '' $ac_executable_extensions; do
4427   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4428     ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
4429     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4430     break 2
4431   fi
4432 done
4433   done
4434 IFS=$as_save_IFS
4435 
4436   ;;
4437 esac
4438 fi
4439 DIFF=$ac_cv_path_DIFF
4440 if test -n "$DIFF"; then
4441   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
4442 $as_echo "$DIFF" >&6; }
4443 else
4444   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4445 $as_echo "no" >&6; }
4446 fi
4447 
4448 
4449   test -n "$DIFF" && break
4450 done
4451 
4452 
4453     if test "x$DIFF" = x; then
4454         if test "xgdiff diff" = x; then
4455           PROG_NAME=diff
4456         else
4457           PROG_NAME=gdiff diff
4458         fi
4459         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4460 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4461         as_fn_error $? "Cannot continue" "$LINENO" 5
4462     fi
4463 
4464 
4465 
4466     for ac_prog in dirname
4467 do
4468   # Extract the first word of "$ac_prog", so it can be a program name with args.
4469 set dummy $ac_prog; ac_word=$2
4470 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4471 $as_echo_n "checking for $ac_word... " >&6; }
4472 if test "${ac_cv_path_DIRNAME+set}" = set; then :
4473   $as_echo_n "(cached) " >&6
4474 else
4475   case $DIRNAME in
4476   [\\/]* | ?:[\\/]*)
4477   ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
4478   ;;
4479   *)
4480   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4481 for as_dir in $PATH
4482 do
4483   IFS=$as_save_IFS
4484   test -z "$as_dir" && as_dir=.
4485     for ac_exec_ext in '' $ac_executable_extensions; do
4486   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4487     ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
4488     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4489     break 2
4490   fi
4491 done
4492   done
4493 IFS=$as_save_IFS
4494 
4495   ;;
4496 esac
4497 fi
4498 DIRNAME=$ac_cv_path_DIRNAME
4499 if test -n "$DIRNAME"; then
4500   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
4501 $as_echo "$DIRNAME" >&6; }
4502 else
4503   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4504 $as_echo "no" >&6; }
4505 fi
4506 
4507 
4508   test -n "$DIRNAME" && break
4509 done
4510 
4511 
4512     if test "x$DIRNAME" = x; then
4513         if test "xdirname" = x; then
4514           PROG_NAME=dirname
4515         else
4516           PROG_NAME=dirname
4517         fi
4518         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4519 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4520         as_fn_error $? "Cannot continue" "$LINENO" 5
4521     fi
4522 
4523 
4524 
4525     for ac_prog in echo
4526 do
4527   # Extract the first word of "$ac_prog", so it can be a program name with args.
4528 set dummy $ac_prog; ac_word=$2
4529 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4530 $as_echo_n "checking for $ac_word... " >&6; }
4531 if test "${ac_cv_path_ECHO+set}" = set; then :
4532   $as_echo_n "(cached) " >&6
4533 else
4534   case $ECHO in
4535   [\\/]* | ?:[\\/]*)
4536   ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
4537   ;;
4538   *)
4539   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4540 for as_dir in $PATH
4541 do
4542   IFS=$as_save_IFS
4543   test -z "$as_dir" && as_dir=.
4544     for ac_exec_ext in '' $ac_executable_extensions; do
4545   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4546     ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
4547     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4548     break 2
4549   fi
4550 done
4551   done
4552 IFS=$as_save_IFS
4553 
4554   ;;
4555 esac
4556 fi
4557 ECHO=$ac_cv_path_ECHO
4558 if test -n "$ECHO"; then
4559   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
4560 $as_echo "$ECHO" >&6; }
4561 else
4562   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4563 $as_echo "no" >&6; }
4564 fi
4565 
4566 
4567   test -n "$ECHO" && break
4568 done
4569 
4570 
4571     if test "x$ECHO" = x; then
4572         if test "xecho" = x; then
4573           PROG_NAME=echo
4574         else
4575           PROG_NAME=echo
4576         fi
4577         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4578 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4579         as_fn_error $? "Cannot continue" "$LINENO" 5
4580     fi
4581 
4582 
4583 
4584     for ac_prog in expr
4585 do
4586   # Extract the first word of "$ac_prog", so it can be a program name with args.
4587 set dummy $ac_prog; ac_word=$2
4588 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4589 $as_echo_n "checking for $ac_word... " >&6; }
4590 if test "${ac_cv_path_EXPR+set}" = set; then :
4591   $as_echo_n "(cached) " >&6
4592 else
4593   case $EXPR in
4594   [\\/]* | ?:[\\/]*)
4595   ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
4596   ;;
4597   *)
4598   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4599 for as_dir in $PATH
4600 do
4601   IFS=$as_save_IFS
4602   test -z "$as_dir" && as_dir=.
4603     for ac_exec_ext in '' $ac_executable_extensions; do
4604   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4605     ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
4606     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4607     break 2
4608   fi
4609 done
4610   done
4611 IFS=$as_save_IFS
4612 
4613   ;;
4614 esac
4615 fi
4616 EXPR=$ac_cv_path_EXPR
4617 if test -n "$EXPR"; then
4618   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
4619 $as_echo "$EXPR" >&6; }
4620 else
4621   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4622 $as_echo "no" >&6; }
4623 fi
4624 
4625 
4626   test -n "$EXPR" && break
4627 done
4628 
4629 
4630     if test "x$EXPR" = x; then
4631         if test "xexpr" = x; then
4632           PROG_NAME=expr
4633         else
4634           PROG_NAME=expr
4635         fi
4636         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4637 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4638         as_fn_error $? "Cannot continue" "$LINENO" 5
4639     fi
4640 
4641 
4642 
4643     for ac_prog in file
4644 do
4645   # Extract the first word of "$ac_prog", so it can be a program name with args.
4646 set dummy $ac_prog; ac_word=$2
4647 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4648 $as_echo_n "checking for $ac_word... " >&6; }
4649 if test "${ac_cv_path_FILE+set}" = set; then :
4650   $as_echo_n "(cached) " >&6
4651 else
4652   case $FILE in
4653   [\\/]* | ?:[\\/]*)
4654   ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
4655   ;;
4656   *)
4657   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4658 for as_dir in $PATH
4659 do
4660   IFS=$as_save_IFS
4661   test -z "$as_dir" && as_dir=.
4662     for ac_exec_ext in '' $ac_executable_extensions; do
4663   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4664     ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
4665     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4666     break 2
4667   fi
4668 done
4669   done
4670 IFS=$as_save_IFS
4671 
4672   ;;
4673 esac
4674 fi
4675 FILE=$ac_cv_path_FILE
4676 if test -n "$FILE"; then
4677   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
4678 $as_echo "$FILE" >&6; }
4679 else
4680   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4681 $as_echo "no" >&6; }
4682 fi
4683 
4684 
4685   test -n "$FILE" && break
4686 done
4687 
4688 
4689     if test "x$FILE" = x; then
4690         if test "xfile" = x; then
4691           PROG_NAME=file
4692         else
4693           PROG_NAME=file
4694         fi
4695         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4696 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4697         as_fn_error $? "Cannot continue" "$LINENO" 5
4698     fi
4699 
4700 
4701 
4702     for ac_prog in find
4703 do
4704   # Extract the first word of "$ac_prog", so it can be a program name with args.
4705 set dummy $ac_prog; ac_word=$2
4706 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4707 $as_echo_n "checking for $ac_word... " >&6; }
4708 if test "${ac_cv_path_FIND+set}" = set; then :
4709   $as_echo_n "(cached) " >&6
4710 else
4711   case $FIND in
4712   [\\/]* | ?:[\\/]*)
4713   ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
4714   ;;
4715   *)
4716   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4717 for as_dir in $PATH
4718 do
4719   IFS=$as_save_IFS
4720   test -z "$as_dir" && as_dir=.
4721     for ac_exec_ext in '' $ac_executable_extensions; do
4722   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4723     ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
4724     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4725     break 2
4726   fi
4727 done
4728   done
4729 IFS=$as_save_IFS
4730 
4731   ;;
4732 esac
4733 fi
4734 FIND=$ac_cv_path_FIND
4735 if test -n "$FIND"; then
4736   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
4737 $as_echo "$FIND" >&6; }
4738 else
4739   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4740 $as_echo "no" >&6; }
4741 fi
4742 
4743 
4744   test -n "$FIND" && break
4745 done
4746 
4747 
4748     if test "x$FIND" = x; then
4749         if test "xfind" = x; then
4750           PROG_NAME=find
4751         else
4752           PROG_NAME=find
4753         fi
4754         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4755 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4756         as_fn_error $? "Cannot continue" "$LINENO" 5
4757     fi
4758 
4759 
4760 
4761     for ac_prog in head
4762 do
4763   # Extract the first word of "$ac_prog", so it can be a program name with args.
4764 set dummy $ac_prog; ac_word=$2
4765 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4766 $as_echo_n "checking for $ac_word... " >&6; }
4767 if test "${ac_cv_path_HEAD+set}" = set; then :
4768   $as_echo_n "(cached) " >&6
4769 else
4770   case $HEAD in
4771   [\\/]* | ?:[\\/]*)
4772   ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
4773   ;;
4774   *)
4775   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4776 for as_dir in $PATH
4777 do
4778   IFS=$as_save_IFS
4779   test -z "$as_dir" && as_dir=.
4780     for ac_exec_ext in '' $ac_executable_extensions; do
4781   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4782     ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
4783     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4784     break 2
4785   fi
4786 done
4787   done
4788 IFS=$as_save_IFS
4789 
4790   ;;
4791 esac
4792 fi
4793 HEAD=$ac_cv_path_HEAD
4794 if test -n "$HEAD"; then
4795   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
4796 $as_echo "$HEAD" >&6; }
4797 else
4798   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4799 $as_echo "no" >&6; }
4800 fi
4801 
4802 
4803   test -n "$HEAD" && break
4804 done
4805 
4806 
4807     if test "x$HEAD" = x; then
4808         if test "xhead" = x; then
4809           PROG_NAME=head
4810         else
4811           PROG_NAME=head
4812         fi
4813         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4814 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4815         as_fn_error $? "Cannot continue" "$LINENO" 5
4816     fi
4817 
4818 
4819 
4820     for ac_prog in ln
4821 do
4822   # Extract the first word of "$ac_prog", so it can be a program name with args.
4823 set dummy $ac_prog; ac_word=$2
4824 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4825 $as_echo_n "checking for $ac_word... " >&6; }
4826 if test "${ac_cv_path_LN+set}" = set; then :
4827   $as_echo_n "(cached) " >&6
4828 else
4829   case $LN in
4830   [\\/]* | ?:[\\/]*)
4831   ac_cv_path_LN="$LN" # Let the user override the test with a path.
4832   ;;
4833   *)
4834   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4835 for as_dir in $PATH
4836 do
4837   IFS=$as_save_IFS
4838   test -z "$as_dir" && as_dir=.
4839     for ac_exec_ext in '' $ac_executable_extensions; do
4840   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4841     ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
4842     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4843     break 2
4844   fi
4845 done
4846   done
4847 IFS=$as_save_IFS
4848 
4849   ;;
4850 esac
4851 fi
4852 LN=$ac_cv_path_LN
4853 if test -n "$LN"; then
4854   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
4855 $as_echo "$LN" >&6; }
4856 else
4857   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4858 $as_echo "no" >&6; }
4859 fi
4860 
4861 
4862   test -n "$LN" && break
4863 done
4864 
4865 
4866     if test "x$LN" = x; then
4867         if test "xln" = x; then
4868           PROG_NAME=ln
4869         else
4870           PROG_NAME=ln
4871         fi
4872         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4873 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4874         as_fn_error $? "Cannot continue" "$LINENO" 5
4875     fi
4876 
4877 
4878 
4879     for ac_prog in ls
4880 do
4881   # Extract the first word of "$ac_prog", so it can be a program name with args.
4882 set dummy $ac_prog; ac_word=$2
4883 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4884 $as_echo_n "checking for $ac_word... " >&6; }
4885 if test "${ac_cv_path_LS+set}" = set; then :
4886   $as_echo_n "(cached) " >&6
4887 else
4888   case $LS in
4889   [\\/]* | ?:[\\/]*)
4890   ac_cv_path_LS="$LS" # Let the user override the test with a path.
4891   ;;
4892   *)
4893   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4894 for as_dir in $PATH
4895 do
4896   IFS=$as_save_IFS
4897   test -z "$as_dir" && as_dir=.
4898     for ac_exec_ext in '' $ac_executable_extensions; do
4899   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4900     ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
4901     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4902     break 2
4903   fi
4904 done
4905   done
4906 IFS=$as_save_IFS
4907 
4908   ;;
4909 esac
4910 fi
4911 LS=$ac_cv_path_LS
4912 if test -n "$LS"; then
4913   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
4914 $as_echo "$LS" >&6; }
4915 else
4916   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4917 $as_echo "no" >&6; }
4918 fi
4919 
4920 
4921   test -n "$LS" && break
4922 done
4923 
4924 
4925     if test "x$LS" = x; then
4926         if test "xls" = x; then
4927           PROG_NAME=ls
4928         else
4929           PROG_NAME=ls
4930         fi
4931         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4932 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4933         as_fn_error $? "Cannot continue" "$LINENO" 5
4934     fi
4935 
4936 
4937 
4938     for ac_prog in mkdir
4939 do
4940   # Extract the first word of "$ac_prog", so it can be a program name with args.
4941 set dummy $ac_prog; ac_word=$2
4942 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4943 $as_echo_n "checking for $ac_word... " >&6; }
4944 if test "${ac_cv_path_MKDIR+set}" = set; then :
4945   $as_echo_n "(cached) " >&6
4946 else
4947   case $MKDIR in
4948   [\\/]* | ?:[\\/]*)
4949   ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
4950   ;;
4951   *)
4952   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4953 for as_dir in $PATH
4954 do
4955   IFS=$as_save_IFS
4956   test -z "$as_dir" && as_dir=.
4957     for ac_exec_ext in '' $ac_executable_extensions; do
4958   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4959     ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
4960     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4961     break 2
4962   fi
4963 done
4964   done
4965 IFS=$as_save_IFS
4966 
4967   ;;
4968 esac
4969 fi
4970 MKDIR=$ac_cv_path_MKDIR
4971 if test -n "$MKDIR"; then
4972   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
4973 $as_echo "$MKDIR" >&6; }
4974 else
4975   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4976 $as_echo "no" >&6; }
4977 fi
4978 
4979 
4980   test -n "$MKDIR" && break
4981 done
4982 
4983 
4984     if test "x$MKDIR" = x; then
4985         if test "xmkdir" = x; then
4986           PROG_NAME=mkdir
4987         else
4988           PROG_NAME=mkdir
4989         fi
4990         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4991 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4992         as_fn_error $? "Cannot continue" "$LINENO" 5
4993     fi
4994 
4995 
4996 
4997     for ac_prog in mktemp
4998 do
4999   # Extract the first word of "$ac_prog", so it can be a program name with args.
5000 set dummy $ac_prog; ac_word=$2
5001 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5002 $as_echo_n "checking for $ac_word... " >&6; }
5003 if test "${ac_cv_path_MKTEMP+set}" = set; then :
5004   $as_echo_n "(cached) " >&6
5005 else
5006   case $MKTEMP in
5007   [\\/]* | ?:[\\/]*)
5008   ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
5009   ;;
5010   *)
5011   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5012 for as_dir in $PATH
5013 do
5014   IFS=$as_save_IFS
5015   test -z "$as_dir" && as_dir=.
5016     for ac_exec_ext in '' $ac_executable_extensions; do
5017   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5018     ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
5019     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5020     break 2
5021   fi
5022 done
5023   done
5024 IFS=$as_save_IFS
5025 
5026   ;;
5027 esac
5028 fi
5029 MKTEMP=$ac_cv_path_MKTEMP
5030 if test -n "$MKTEMP"; then
5031   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
5032 $as_echo "$MKTEMP" >&6; }
5033 else
5034   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5035 $as_echo "no" >&6; }
5036 fi
5037 
5038 
5039   test -n "$MKTEMP" && break
5040 done
5041 
5042 
5043     if test "x$MKTEMP" = x; then
5044         if test "xmktemp" = x; then
5045           PROG_NAME=mktemp
5046         else
5047           PROG_NAME=mktemp
5048         fi
5049         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5050 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5051         as_fn_error $? "Cannot continue" "$LINENO" 5
5052     fi
5053 
5054 
5055 
5056     for ac_prog in mv
5057 do
5058   # Extract the first word of "$ac_prog", so it can be a program name with args.
5059 set dummy $ac_prog; ac_word=$2
5060 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5061 $as_echo_n "checking for $ac_word... " >&6; }
5062 if test "${ac_cv_path_MV+set}" = set; then :
5063   $as_echo_n "(cached) " >&6
5064 else
5065   case $MV in
5066   [\\/]* | ?:[\\/]*)
5067   ac_cv_path_MV="$MV" # Let the user override the test with a path.
5068   ;;
5069   *)
5070   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5071 for as_dir in $PATH
5072 do
5073   IFS=$as_save_IFS
5074   test -z "$as_dir" && as_dir=.
5075     for ac_exec_ext in '' $ac_executable_extensions; do
5076   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5077     ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
5078     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5079     break 2
5080   fi
5081 done
5082   done
5083 IFS=$as_save_IFS
5084 
5085   ;;
5086 esac
5087 fi
5088 MV=$ac_cv_path_MV
5089 if test -n "$MV"; then
5090   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
5091 $as_echo "$MV" >&6; }
5092 else
5093   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5094 $as_echo "no" >&6; }
5095 fi
5096 
5097 
5098   test -n "$MV" && break
5099 done
5100 
5101 
5102     if test "x$MV" = x; then
5103         if test "xmv" = x; then
5104           PROG_NAME=mv
5105         else
5106           PROG_NAME=mv
5107         fi
5108         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5109 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5110         as_fn_error $? "Cannot continue" "$LINENO" 5
5111     fi
5112 
5113 
5114 
5115     for ac_prog in printf
5116 do
5117   # Extract the first word of "$ac_prog", so it can be a program name with args.
5118 set dummy $ac_prog; ac_word=$2
5119 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5120 $as_echo_n "checking for $ac_word... " >&6; }
5121 if test "${ac_cv_path_PRINTF+set}" = set; then :
5122   $as_echo_n "(cached) " >&6
5123 else
5124   case $PRINTF in
5125   [\\/]* | ?:[\\/]*)
5126   ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
5127   ;;
5128   *)
5129   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5130 for as_dir in $PATH
5131 do
5132   IFS=$as_save_IFS
5133   test -z "$as_dir" && as_dir=.
5134     for ac_exec_ext in '' $ac_executable_extensions; do
5135   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5136     ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
5137     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5138     break 2
5139   fi
5140 done
5141   done
5142 IFS=$as_save_IFS
5143 
5144   ;;
5145 esac
5146 fi
5147 PRINTF=$ac_cv_path_PRINTF
5148 if test -n "$PRINTF"; then
5149   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
5150 $as_echo "$PRINTF" >&6; }
5151 else
5152   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5153 $as_echo "no" >&6; }
5154 fi
5155 
5156 
5157   test -n "$PRINTF" && break
5158 done
5159 
5160 
5161     if test "x$PRINTF" = x; then
5162         if test "xprintf" = x; then
5163           PROG_NAME=printf
5164         else
5165           PROG_NAME=printf
5166         fi
5167         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5168 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5169         as_fn_error $? "Cannot continue" "$LINENO" 5
5170     fi
5171 
5172 
5173 
5174     for ac_prog in rm
5175 do
5176   # Extract the first word of "$ac_prog", so it can be a program name with args.
5177 set dummy $ac_prog; ac_word=$2
5178 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5179 $as_echo_n "checking for $ac_word... " >&6; }
5180 if test "${ac_cv_path_RM+set}" = set; then :
5181   $as_echo_n "(cached) " >&6
5182 else
5183   case $RM in
5184   [\\/]* | ?:[\\/]*)
5185   ac_cv_path_RM="$RM" # Let the user override the test with a path.
5186   ;;
5187   *)
5188   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5189 for as_dir in $PATH
5190 do
5191   IFS=$as_save_IFS
5192   test -z "$as_dir" && as_dir=.
5193     for ac_exec_ext in '' $ac_executable_extensions; do
5194   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5195     ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
5196     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5197     break 2
5198   fi
5199 done
5200   done
5201 IFS=$as_save_IFS
5202 
5203   ;;
5204 esac
5205 fi
5206 RM=$ac_cv_path_RM
5207 if test -n "$RM"; then
5208   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
5209 $as_echo "$RM" >&6; }
5210 else
5211   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5212 $as_echo "no" >&6; }
5213 fi
5214 
5215 
5216   test -n "$RM" && break
5217 done
5218 
5219 
5220     if test "x$RM" = x; then
5221         if test "xrm" = x; then
5222           PROG_NAME=rm
5223         else
5224           PROG_NAME=rm
5225         fi
5226         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5227 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5228         as_fn_error $? "Cannot continue" "$LINENO" 5
5229     fi
5230 
5231 
5232 
5233     for ac_prog in sh
5234 do
5235   # Extract the first word of "$ac_prog", so it can be a program name with args.
5236 set dummy $ac_prog; ac_word=$2
5237 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5238 $as_echo_n "checking for $ac_word... " >&6; }
5239 if test "${ac_cv_path_SH+set}" = set; then :
5240   $as_echo_n "(cached) " >&6
5241 else
5242   case $SH in
5243   [\\/]* | ?:[\\/]*)
5244   ac_cv_path_SH="$SH" # Let the user override the test with a path.
5245   ;;
5246   *)
5247   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5248 for as_dir in $PATH
5249 do
5250   IFS=$as_save_IFS
5251   test -z "$as_dir" && as_dir=.
5252     for ac_exec_ext in '' $ac_executable_extensions; do
5253   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5254     ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
5255     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5256     break 2
5257   fi
5258 done
5259   done
5260 IFS=$as_save_IFS
5261 
5262   ;;
5263 esac
5264 fi
5265 SH=$ac_cv_path_SH
5266 if test -n "$SH"; then
5267   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
5268 $as_echo "$SH" >&6; }
5269 else
5270   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5271 $as_echo "no" >&6; }
5272 fi
5273 
5274 
5275   test -n "$SH" && break
5276 done
5277 
5278 
5279     if test "x$SH" = x; then
5280         if test "xsh" = x; then
5281           PROG_NAME=sh
5282         else
5283           PROG_NAME=sh
5284         fi
5285         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5286 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5287         as_fn_error $? "Cannot continue" "$LINENO" 5
5288     fi
5289 
5290 
5291 
5292     for ac_prog in sort
5293 do
5294   # Extract the first word of "$ac_prog", so it can be a program name with args.
5295 set dummy $ac_prog; ac_word=$2
5296 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5297 $as_echo_n "checking for $ac_word... " >&6; }
5298 if test "${ac_cv_path_SORT+set}" = set; then :
5299   $as_echo_n "(cached) " >&6
5300 else
5301   case $SORT in
5302   [\\/]* | ?:[\\/]*)
5303   ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
5304   ;;
5305   *)
5306   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5307 for as_dir in $PATH
5308 do
5309   IFS=$as_save_IFS
5310   test -z "$as_dir" && as_dir=.
5311     for ac_exec_ext in '' $ac_executable_extensions; do
5312   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5313     ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
5314     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5315     break 2
5316   fi
5317 done
5318   done
5319 IFS=$as_save_IFS
5320 
5321   ;;
5322 esac
5323 fi
5324 SORT=$ac_cv_path_SORT
5325 if test -n "$SORT"; then
5326   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
5327 $as_echo "$SORT" >&6; }
5328 else
5329   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5330 $as_echo "no" >&6; }
5331 fi
5332 
5333 
5334   test -n "$SORT" && break
5335 done
5336 
5337 
5338     if test "x$SORT" = x; then
5339         if test "xsort" = x; then
5340           PROG_NAME=sort
5341         else
5342           PROG_NAME=sort
5343         fi
5344         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5345 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5346         as_fn_error $? "Cannot continue" "$LINENO" 5
5347     fi
5348 
5349 
5350 
5351     for ac_prog in tail
5352 do
5353   # Extract the first word of "$ac_prog", so it can be a program name with args.
5354 set dummy $ac_prog; ac_word=$2
5355 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5356 $as_echo_n "checking for $ac_word... " >&6; }
5357 if test "${ac_cv_path_TAIL+set}" = set; then :
5358   $as_echo_n "(cached) " >&6
5359 else
5360   case $TAIL in
5361   [\\/]* | ?:[\\/]*)
5362   ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
5363   ;;
5364   *)
5365   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5366 for as_dir in $PATH
5367 do
5368   IFS=$as_save_IFS
5369   test -z "$as_dir" && as_dir=.
5370     for ac_exec_ext in '' $ac_executable_extensions; do
5371   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5372     ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
5373     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5374     break 2
5375   fi
5376 done
5377   done
5378 IFS=$as_save_IFS
5379 
5380   ;;
5381 esac
5382 fi
5383 TAIL=$ac_cv_path_TAIL
5384 if test -n "$TAIL"; then
5385   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
5386 $as_echo "$TAIL" >&6; }
5387 else
5388   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5389 $as_echo "no" >&6; }
5390 fi
5391 
5392 
5393   test -n "$TAIL" && break
5394 done
5395 
5396 
5397     if test "x$TAIL" = x; then
5398         if test "xtail" = x; then
5399           PROG_NAME=tail
5400         else
5401           PROG_NAME=tail
5402         fi
5403         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5404 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5405         as_fn_error $? "Cannot continue" "$LINENO" 5
5406     fi
5407 
5408 
5409 
5410     for ac_prog in tar
5411 do
5412   # Extract the first word of "$ac_prog", so it can be a program name with args.
5413 set dummy $ac_prog; ac_word=$2
5414 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5415 $as_echo_n "checking for $ac_word... " >&6; }
5416 if test "${ac_cv_path_TAR+set}" = set; then :
5417   $as_echo_n "(cached) " >&6
5418 else
5419   case $TAR in
5420   [\\/]* | ?:[\\/]*)
5421   ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
5422   ;;
5423   *)
5424   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5425 for as_dir in $PATH
5426 do
5427   IFS=$as_save_IFS
5428   test -z "$as_dir" && as_dir=.
5429     for ac_exec_ext in '' $ac_executable_extensions; do
5430   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5431     ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
5432     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5433     break 2
5434   fi
5435 done
5436   done
5437 IFS=$as_save_IFS
5438 
5439   ;;
5440 esac
5441 fi
5442 TAR=$ac_cv_path_TAR
5443 if test -n "$TAR"; then
5444   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
5445 $as_echo "$TAR" >&6; }
5446 else
5447   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5448 $as_echo "no" >&6; }
5449 fi
5450 
5451 
5452   test -n "$TAR" && break
5453 done
5454 
5455 
5456     if test "x$TAR" = x; then
5457         if test "xtar" = x; then
5458           PROG_NAME=tar
5459         else
5460           PROG_NAME=tar
5461         fi
5462         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5463 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5464         as_fn_error $? "Cannot continue" "$LINENO" 5
5465     fi
5466 
5467 
5468 
5469     for ac_prog in tee
5470 do
5471   # Extract the first word of "$ac_prog", so it can be a program name with args.
5472 set dummy $ac_prog; ac_word=$2
5473 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5474 $as_echo_n "checking for $ac_word... " >&6; }
5475 if test "${ac_cv_path_TEE+set}" = set; then :
5476   $as_echo_n "(cached) " >&6
5477 else
5478   case $TEE in
5479   [\\/]* | ?:[\\/]*)
5480   ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
5481   ;;
5482   *)
5483   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5484 for as_dir in $PATH
5485 do
5486   IFS=$as_save_IFS
5487   test -z "$as_dir" && as_dir=.
5488     for ac_exec_ext in '' $ac_executable_extensions; do
5489   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5490     ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
5491     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5492     break 2
5493   fi
5494 done
5495   done
5496 IFS=$as_save_IFS
5497 
5498   ;;
5499 esac
5500 fi
5501 TEE=$ac_cv_path_TEE
5502 if test -n "$TEE"; then
5503   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
5504 $as_echo "$TEE" >&6; }
5505 else
5506   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5507 $as_echo "no" >&6; }
5508 fi
5509 
5510 
5511   test -n "$TEE" && break
5512 done
5513 
5514 
5515     if test "x$TEE" = x; then
5516         if test "xtee" = x; then
5517           PROG_NAME=tee
5518         else
5519           PROG_NAME=tee
5520         fi
5521         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5522 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5523         as_fn_error $? "Cannot continue" "$LINENO" 5
5524     fi
5525 
5526 
5527 
5528     for ac_prog in touch
5529 do
5530   # Extract the first word of "$ac_prog", so it can be a program name with args.
5531 set dummy $ac_prog; ac_word=$2
5532 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5533 $as_echo_n "checking for $ac_word... " >&6; }
5534 if test "${ac_cv_path_TOUCH+set}" = set; then :
5535   $as_echo_n "(cached) " >&6
5536 else
5537   case $TOUCH in
5538   [\\/]* | ?:[\\/]*)
5539   ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
5540   ;;
5541   *)
5542   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5543 for as_dir in $PATH
5544 do
5545   IFS=$as_save_IFS
5546   test -z "$as_dir" && as_dir=.
5547     for ac_exec_ext in '' $ac_executable_extensions; do
5548   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5549     ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
5550     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5551     break 2
5552   fi
5553 done
5554   done
5555 IFS=$as_save_IFS
5556 
5557   ;;
5558 esac
5559 fi
5560 TOUCH=$ac_cv_path_TOUCH
5561 if test -n "$TOUCH"; then
5562   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
5563 $as_echo "$TOUCH" >&6; }
5564 else
5565   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5566 $as_echo "no" >&6; }
5567 fi
5568 
5569 
5570   test -n "$TOUCH" && break
5571 done
5572 
5573 
5574     if test "x$TOUCH" = x; then
5575         if test "xtouch" = x; then
5576           PROG_NAME=touch
5577         else
5578           PROG_NAME=touch
5579         fi
5580         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5581 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5582         as_fn_error $? "Cannot continue" "$LINENO" 5
5583     fi
5584 
5585 
5586 
5587     for ac_prog in tr
5588 do
5589   # Extract the first word of "$ac_prog", so it can be a program name with args.
5590 set dummy $ac_prog; ac_word=$2
5591 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5592 $as_echo_n "checking for $ac_word... " >&6; }
5593 if test "${ac_cv_path_TR+set}" = set; then :
5594   $as_echo_n "(cached) " >&6
5595 else
5596   case $TR in
5597   [\\/]* | ?:[\\/]*)
5598   ac_cv_path_TR="$TR" # Let the user override the test with a path.
5599   ;;
5600   *)
5601   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5602 for as_dir in $PATH
5603 do
5604   IFS=$as_save_IFS
5605   test -z "$as_dir" && as_dir=.
5606     for ac_exec_ext in '' $ac_executable_extensions; do
5607   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5608     ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
5609     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5610     break 2
5611   fi
5612 done
5613   done
5614 IFS=$as_save_IFS
5615 
5616   ;;
5617 esac
5618 fi
5619 TR=$ac_cv_path_TR
5620 if test -n "$TR"; then
5621   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
5622 $as_echo "$TR" >&6; }
5623 else
5624   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5625 $as_echo "no" >&6; }
5626 fi
5627 
5628 
5629   test -n "$TR" && break
5630 done
5631 
5632 
5633     if test "x$TR" = x; then
5634         if test "xtr" = x; then
5635           PROG_NAME=tr
5636         else
5637           PROG_NAME=tr
5638         fi
5639         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5640 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5641         as_fn_error $? "Cannot continue" "$LINENO" 5
5642     fi
5643 
5644 
5645 
5646     for ac_prog in uname
5647 do
5648   # Extract the first word of "$ac_prog", so it can be a program name with args.
5649 set dummy $ac_prog; ac_word=$2
5650 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5651 $as_echo_n "checking for $ac_word... " >&6; }
5652 if test "${ac_cv_path_UNAME+set}" = set; then :
5653   $as_echo_n "(cached) " >&6
5654 else
5655   case $UNAME in
5656   [\\/]* | ?:[\\/]*)
5657   ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
5658   ;;
5659   *)
5660   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5661 for as_dir in $PATH
5662 do
5663   IFS=$as_save_IFS
5664   test -z "$as_dir" && as_dir=.
5665     for ac_exec_ext in '' $ac_executable_extensions; do
5666   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5667     ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
5668     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5669     break 2
5670   fi
5671 done
5672   done
5673 IFS=$as_save_IFS
5674 
5675   ;;
5676 esac
5677 fi
5678 UNAME=$ac_cv_path_UNAME
5679 if test -n "$UNAME"; then
5680   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
5681 $as_echo "$UNAME" >&6; }
5682 else
5683   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5684 $as_echo "no" >&6; }
5685 fi
5686 
5687 
5688   test -n "$UNAME" && break
5689 done
5690 
5691 
5692     if test "x$UNAME" = x; then
5693         if test "xuname" = x; then
5694           PROG_NAME=uname
5695         else
5696           PROG_NAME=uname
5697         fi
5698         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5699 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5700         as_fn_error $? "Cannot continue" "$LINENO" 5
5701     fi
5702 
5703 
5704 
5705     for ac_prog in uniq
5706 do
5707   # Extract the first word of "$ac_prog", so it can be a program name with args.
5708 set dummy $ac_prog; ac_word=$2
5709 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5710 $as_echo_n "checking for $ac_word... " >&6; }
5711 if test "${ac_cv_path_UNIQ+set}" = set; then :
5712   $as_echo_n "(cached) " >&6
5713 else
5714   case $UNIQ in
5715   [\\/]* | ?:[\\/]*)
5716   ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
5717   ;;
5718   *)
5719   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5720 for as_dir in $PATH
5721 do
5722   IFS=$as_save_IFS
5723   test -z "$as_dir" && as_dir=.
5724     for ac_exec_ext in '' $ac_executable_extensions; do
5725   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5726     ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
5727     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5728     break 2
5729   fi
5730 done
5731   done
5732 IFS=$as_save_IFS
5733 
5734   ;;
5735 esac
5736 fi
5737 UNIQ=$ac_cv_path_UNIQ
5738 if test -n "$UNIQ"; then
5739   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
5740 $as_echo "$UNIQ" >&6; }
5741 else
5742   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5743 $as_echo "no" >&6; }
5744 fi
5745 
5746 
5747   test -n "$UNIQ" && break
5748 done
5749 
5750 
5751     if test "x$UNIQ" = x; then
5752         if test "xuniq" = x; then
5753           PROG_NAME=uniq
5754         else
5755           PROG_NAME=uniq
5756         fi
5757         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5758 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5759         as_fn_error $? "Cannot continue" "$LINENO" 5
5760     fi
5761 
5762 
5763 
5764     for ac_prog in wc
5765 do
5766   # Extract the first word of "$ac_prog", so it can be a program name with args.
5767 set dummy $ac_prog; ac_word=$2
5768 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5769 $as_echo_n "checking for $ac_word... " >&6; }
5770 if test "${ac_cv_path_WC+set}" = set; then :
5771   $as_echo_n "(cached) " >&6
5772 else
5773   case $WC in
5774   [\\/]* | ?:[\\/]*)
5775   ac_cv_path_WC="$WC" # Let the user override the test with a path.
5776   ;;
5777   *)
5778   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5779 for as_dir in $PATH
5780 do
5781   IFS=$as_save_IFS
5782   test -z "$as_dir" && as_dir=.
5783     for ac_exec_ext in '' $ac_executable_extensions; do
5784   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5785     ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
5786     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5787     break 2
5788   fi
5789 done
5790   done
5791 IFS=$as_save_IFS
5792 
5793   ;;
5794 esac
5795 fi
5796 WC=$ac_cv_path_WC
5797 if test -n "$WC"; then
5798   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
5799 $as_echo "$WC" >&6; }
5800 else
5801   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5802 $as_echo "no" >&6; }
5803 fi
5804 
5805 
5806   test -n "$WC" && break
5807 done
5808 
5809 
5810     if test "x$WC" = x; then
5811         if test "xwc" = x; then
5812           PROG_NAME=wc
5813         else
5814           PROG_NAME=wc
5815         fi
5816         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5817 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5818         as_fn_error $? "Cannot continue" "$LINENO" 5
5819     fi
5820 
5821 
5822 
5823     for ac_prog in which
5824 do
5825   # Extract the first word of "$ac_prog", so it can be a program name with args.
5826 set dummy $ac_prog; ac_word=$2
5827 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5828 $as_echo_n "checking for $ac_word... " >&6; }
5829 if test "${ac_cv_path_WHICH+set}" = set; then :
5830   $as_echo_n "(cached) " >&6
5831 else
5832   case $WHICH in
5833   [\\/]* | ?:[\\/]*)
5834   ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
5835   ;;
5836   *)
5837   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5838 for as_dir in $PATH
5839 do
5840   IFS=$as_save_IFS
5841   test -z "$as_dir" && as_dir=.
5842     for ac_exec_ext in '' $ac_executable_extensions; do
5843   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5844     ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
5845     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5846     break 2
5847   fi
5848 done
5849   done
5850 IFS=$as_save_IFS
5851 
5852   ;;
5853 esac
5854 fi
5855 WHICH=$ac_cv_path_WHICH
5856 if test -n "$WHICH"; then
5857   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
5858 $as_echo "$WHICH" >&6; }
5859 else
5860   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5861 $as_echo "no" >&6; }
5862 fi
5863 
5864 
5865   test -n "$WHICH" && break
5866 done
5867 
5868 
5869     if test "x$WHICH" = x; then
5870         if test "xwhich" = x; then
5871           PROG_NAME=which
5872         else
5873           PROG_NAME=which
5874         fi
5875         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5876 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5877         as_fn_error $? "Cannot continue" "$LINENO" 5
5878     fi
5879 
5880 
5881 
5882     for ac_prog in xargs
5883 do
5884   # Extract the first word of "$ac_prog", so it can be a program name with args.
5885 set dummy $ac_prog; ac_word=$2
5886 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5887 $as_echo_n "checking for $ac_word... " >&6; }
5888 if test "${ac_cv_path_XARGS+set}" = set; then :
5889   $as_echo_n "(cached) " >&6
5890 else
5891   case $XARGS in
5892   [\\/]* | ?:[\\/]*)
5893   ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
5894   ;;
5895   *)
5896   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5897 for as_dir in $PATH
5898 do
5899   IFS=$as_save_IFS
5900   test -z "$as_dir" && as_dir=.
5901     for ac_exec_ext in '' $ac_executable_extensions; do
5902   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5903     ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
5904     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5905     break 2
5906   fi
5907 done
5908   done
5909 IFS=$as_save_IFS
5910 
5911   ;;
5912 esac
5913 fi
5914 XARGS=$ac_cv_path_XARGS
5915 if test -n "$XARGS"; then
5916   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
5917 $as_echo "$XARGS" >&6; }
5918 else
5919   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5920 $as_echo "no" >&6; }
5921 fi
5922 
5923 
5924   test -n "$XARGS" && break
5925 done
5926 
5927 
5928     if test "x$XARGS" = x; then
5929         if test "xxargs" = x; then
5930           PROG_NAME=xargs
5931         else
5932           PROG_NAME=xargs
5933         fi
5934         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5935 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5936         as_fn_error $? "Cannot continue" "$LINENO" 5
5937     fi
5938 
5939 
5940 
5941 # Then required tools that require some special treatment.
5942 for ac_prog in gawk mawk nawk awk
5943 do
5944   # Extract the first word of "$ac_prog", so it can be a program name with args.
5945 set dummy $ac_prog; ac_word=$2
5946 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5947 $as_echo_n "checking for $ac_word... " >&6; }
5948 if test "${ac_cv_prog_AWK+set}" = set; then :
5949   $as_echo_n "(cached) " >&6
5950 else
5951   if test -n "$AWK"; then
5952   ac_cv_prog_AWK="$AWK" # Let the user override the test.
5953 else
5954 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5955 for as_dir in $PATH
5956 do
5957   IFS=$as_save_IFS
5958   test -z "$as_dir" && as_dir=.
5959     for ac_exec_ext in '' $ac_executable_extensions; do
5960   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5961     ac_cv_prog_AWK="$ac_prog"
5962     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5963     break 2
5964   fi
5965 done
5966   done
5967 IFS=$as_save_IFS
5968 
5969 fi
5970 fi
5971 AWK=$ac_cv_prog_AWK
5972 if test -n "$AWK"; then
5973   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
5974 $as_echo "$AWK" >&6; }
5975 else
5976   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5977 $as_echo "no" >&6; }
5978 fi
5979 
5980 
5981   test -n "$AWK" && break
5982 done
5983 
5984 
5985     if test "x$AWK" = x; then
5986         if test "x" = x; then
5987           PROG_NAME=awk
5988         else
5989           PROG_NAME=
5990         fi
5991         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5992 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5993         as_fn_error $? "Cannot continue" "$LINENO" 5
5994     fi
5995 
5996 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
5997 $as_echo_n "checking for grep that handles long lines and -e... " >&6; }
5998 if test "${ac_cv_path_GREP+set}" = set; then :
5999   $as_echo_n "(cached) " >&6
6000 else
6001   if test -z "$GREP"; then
6002   ac_path_GREP_found=false
6003   # Loop through the user's path and test for each of PROGNAME-LIST
6004   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6005 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
6006 do
6007   IFS=$as_save_IFS
6008   test -z "$as_dir" && as_dir=.
6009     for ac_prog in grep ggrep; do
6010     for ac_exec_ext in '' $ac_executable_extensions; do
6011       ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
6012       { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
6013 # Check for GNU ac_path_GREP and select it if it is found.
6014   # Check for GNU $ac_path_GREP
6015 case `"$ac_path_GREP" --version 2>&1` in
6016 *GNU*)
6017   ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
6018 *)
6019   ac_count=0
6020   $as_echo_n 0123456789 >"conftest.in"
6021   while :
6022   do
6023     cat "conftest.in" "conftest.in" >"conftest.tmp"
6024     mv "conftest.tmp" "conftest.in"
6025     cp "conftest.in" "conftest.nl"
6026     $as_echo 'GREP' >> "conftest.nl"
6027     "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
6028     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6029     as_fn_arith $ac_count + 1 && ac_count=$as_val
6030     if test $ac_count -gt ${ac_path_GREP_max-0}; then
6031       # Best one so far, save it but keep looking for a better one
6032       ac_cv_path_GREP="$ac_path_GREP"
6033       ac_path_GREP_max=$ac_count
6034     fi
6035     # 10*(2^10) chars as input seems more than enough
6036     test $ac_count -gt 10 && break
6037   done
6038   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6039 esac
6040 
6041       $ac_path_GREP_found && break 3
6042     done
6043   done
6044   done
6045 IFS=$as_save_IFS
6046   if test -z "$ac_cv_path_GREP"; then
6047     as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
6048   fi
6049 else
6050   ac_cv_path_GREP=$GREP
6051 fi
6052 
6053 fi
6054 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
6055 $as_echo "$ac_cv_path_GREP" >&6; }
6056  GREP="$ac_cv_path_GREP"
6057 
6058 
6059 
6060     if test "x$GREP" = x; then
6061         if test "x" = x; then
6062           PROG_NAME=grep
6063         else
6064           PROG_NAME=
6065         fi
6066         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6067 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6068         as_fn_error $? "Cannot continue" "$LINENO" 5
6069     fi
6070 
6071 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
6072 $as_echo_n "checking for egrep... " >&6; }
6073 if test "${ac_cv_path_EGREP+set}" = set; then :
6074   $as_echo_n "(cached) " >&6
6075 else
6076   if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
6077    then ac_cv_path_EGREP="$GREP -E"
6078    else
6079      if test -z "$EGREP"; then
6080   ac_path_EGREP_found=false
6081   # Loop through the user's path and test for each of PROGNAME-LIST
6082   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6083 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
6084 do
6085   IFS=$as_save_IFS
6086   test -z "$as_dir" && as_dir=.
6087     for ac_prog in egrep; do
6088     for ac_exec_ext in '' $ac_executable_extensions; do
6089       ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
6090       { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
6091 # Check for GNU ac_path_EGREP and select it if it is found.
6092   # Check for GNU $ac_path_EGREP
6093 case `"$ac_path_EGREP" --version 2>&1` in
6094 *GNU*)
6095   ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
6096 *)
6097   ac_count=0
6098   $as_echo_n 0123456789 >"conftest.in"
6099   while :
6100   do
6101     cat "conftest.in" "conftest.in" >"conftest.tmp"
6102     mv "conftest.tmp" "conftest.in"
6103     cp "conftest.in" "conftest.nl"
6104     $as_echo 'EGREP' >> "conftest.nl"
6105     "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
6106     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6107     as_fn_arith $ac_count + 1 && ac_count=$as_val
6108     if test $ac_count -gt ${ac_path_EGREP_max-0}; then
6109       # Best one so far, save it but keep looking for a better one
6110       ac_cv_path_EGREP="$ac_path_EGREP"
6111       ac_path_EGREP_max=$ac_count
6112     fi
6113     # 10*(2^10) chars as input seems more than enough
6114     test $ac_count -gt 10 && break
6115   done
6116   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6117 esac
6118 
6119       $ac_path_EGREP_found && break 3
6120     done
6121   done
6122   done
6123 IFS=$as_save_IFS
6124   if test -z "$ac_cv_path_EGREP"; then
6125     as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
6126   fi
6127 else
6128   ac_cv_path_EGREP=$EGREP
6129 fi
6130 
6131    fi
6132 fi
6133 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
6134 $as_echo "$ac_cv_path_EGREP" >&6; }
6135  EGREP="$ac_cv_path_EGREP"
6136 
6137 
6138 
6139     if test "x$EGREP" = x; then
6140         if test "x" = x; then
6141           PROG_NAME=egrep
6142         else
6143           PROG_NAME=
6144         fi
6145         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6146 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6147         as_fn_error $? "Cannot continue" "$LINENO" 5
6148     fi
6149 
6150 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
6151 $as_echo_n "checking for fgrep... " >&6; }
6152 if test "${ac_cv_path_FGREP+set}" = set; then :
6153   $as_echo_n "(cached) " >&6
6154 else
6155   if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
6156    then ac_cv_path_FGREP="$GREP -F"
6157    else
6158      if test -z "$FGREP"; then
6159   ac_path_FGREP_found=false
6160   # Loop through the user's path and test for each of PROGNAME-LIST
6161   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6162 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
6163 do
6164   IFS=$as_save_IFS
6165   test -z "$as_dir" && as_dir=.
6166     for ac_prog in fgrep; do
6167     for ac_exec_ext in '' $ac_executable_extensions; do
6168       ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
6169       { test -f "$ac_path_FGREP" && $as_test_x "$ac_path_FGREP"; } || continue
6170 # Check for GNU ac_path_FGREP and select it if it is found.
6171   # Check for GNU $ac_path_FGREP
6172 case `"$ac_path_FGREP" --version 2>&1` in
6173 *GNU*)
6174   ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
6175 *)
6176   ac_count=0
6177   $as_echo_n 0123456789 >"conftest.in"
6178   while :
6179   do
6180     cat "conftest.in" "conftest.in" >"conftest.tmp"
6181     mv "conftest.tmp" "conftest.in"
6182     cp "conftest.in" "conftest.nl"
6183     $as_echo 'FGREP' >> "conftest.nl"
6184     "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
6185     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6186     as_fn_arith $ac_count + 1 && ac_count=$as_val
6187     if test $ac_count -gt ${ac_path_FGREP_max-0}; then
6188       # Best one so far, save it but keep looking for a better one
6189       ac_cv_path_FGREP="$ac_path_FGREP"
6190       ac_path_FGREP_max=$ac_count
6191     fi
6192     # 10*(2^10) chars as input seems more than enough
6193     test $ac_count -gt 10 && break
6194   done
6195   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6196 esac
6197 
6198       $ac_path_FGREP_found && break 3
6199     done
6200   done
6201   done
6202 IFS=$as_save_IFS
6203   if test -z "$ac_cv_path_FGREP"; then
6204     as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
6205   fi
6206 else
6207   ac_cv_path_FGREP=$FGREP
6208 fi
6209 
6210    fi
6211 fi
6212 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
6213 $as_echo "$ac_cv_path_FGREP" >&6; }
6214  FGREP="$ac_cv_path_FGREP"
6215 
6216 
6217 
6218     if test "x$FGREP" = x; then
6219         if test "x" = x; then
6220           PROG_NAME=fgrep
6221         else
6222           PROG_NAME=
6223         fi
6224         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6225 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6226         as_fn_error $? "Cannot continue" "$LINENO" 5
6227     fi
6228 
6229 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
6230 $as_echo_n "checking for a sed that does not truncate output... " >&6; }
6231 if test "${ac_cv_path_SED+set}" = set; then :
6232   $as_echo_n "(cached) " >&6
6233 else
6234             ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
6235      for ac_i in 1 2 3 4 5 6 7; do
6236        ac_script="$ac_script$as_nl$ac_script"
6237      done
6238      echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
6239      { ac_script=; unset ac_script;}
6240      if test -z "$SED"; then
6241   ac_path_SED_found=false
6242   # Loop through the user's path and test for each of PROGNAME-LIST
6243   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6244 for as_dir in $PATH
6245 do
6246   IFS=$as_save_IFS
6247   test -z "$as_dir" && as_dir=.
6248     for ac_prog in sed gsed; do
6249     for ac_exec_ext in '' $ac_executable_extensions; do
6250       ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
6251       { test -f "$ac_path_SED" && $as_test_x "$ac_path_SED"; } || continue
6252 # Check for GNU ac_path_SED and select it if it is found.
6253   # Check for GNU $ac_path_SED
6254 case `"$ac_path_SED" --version 2>&1` in
6255 *GNU*)
6256   ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
6257 *)
6258   ac_count=0
6259   $as_echo_n 0123456789 >"conftest.in"
6260   while :
6261   do
6262     cat "conftest.in" "conftest.in" >"conftest.tmp"
6263     mv "conftest.tmp" "conftest.in"
6264     cp "conftest.in" "conftest.nl"
6265     $as_echo '' >> "conftest.nl"
6266     "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
6267     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6268     as_fn_arith $ac_count + 1 && ac_count=$as_val
6269     if test $ac_count -gt ${ac_path_SED_max-0}; then
6270       # Best one so far, save it but keep looking for a better one
6271       ac_cv_path_SED="$ac_path_SED"
6272       ac_path_SED_max=$ac_count
6273     fi
6274     # 10*(2^10) chars as input seems more than enough
6275     test $ac_count -gt 10 && break
6276   done
6277   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6278 esac
6279 
6280       $ac_path_SED_found && break 3
6281     done
6282   done
6283   done
6284 IFS=$as_save_IFS
6285   if test -z "$ac_cv_path_SED"; then
6286     as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
6287   fi
6288 else
6289   ac_cv_path_SED=$SED
6290 fi
6291 
6292 fi
6293 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
6294 $as_echo "$ac_cv_path_SED" >&6; }
6295  SED="$ac_cv_path_SED"
6296   rm -f conftest.sed
6297 
6298 
6299     if test "x$SED" = x; then
6300         if test "x" = x; then
6301           PROG_NAME=sed
6302         else
6303           PROG_NAME=
6304         fi
6305         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6306 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6307         as_fn_error $? "Cannot continue" "$LINENO" 5
6308     fi
6309 
6310 
6311 for ac_prog in nawk gawk awk
6312 do
6313   # Extract the first word of "$ac_prog", so it can be a program name with args.
6314 set dummy $ac_prog; ac_word=$2
6315 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6316 $as_echo_n "checking for $ac_word... " >&6; }
6317 if test "${ac_cv_path_NAWK+set}" = set; then :
6318   $as_echo_n "(cached) " >&6
6319 else
6320   case $NAWK in
6321   [\\/]* | ?:[\\/]*)
6322   ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
6323   ;;
6324   *)
6325   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6326 for as_dir in $PATH
6327 do
6328   IFS=$as_save_IFS
6329   test -z "$as_dir" && as_dir=.
6330     for ac_exec_ext in '' $ac_executable_extensions; do
6331   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6332     ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
6333     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6334     break 2
6335   fi
6336 done
6337   done
6338 IFS=$as_save_IFS
6339 
6340   ;;
6341 esac
6342 fi
6343 NAWK=$ac_cv_path_NAWK
6344 if test -n "$NAWK"; then
6345   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
6346 $as_echo "$NAWK" >&6; }
6347 else
6348   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6349 $as_echo "no" >&6; }
6350 fi
6351 
6352 
6353   test -n "$NAWK" && break
6354 done
6355 
6356 
6357     if test "x$NAWK" = x; then
6358         if test "x" = x; then
6359           PROG_NAME=nawk
6360         else
6361           PROG_NAME=
6362         fi
6363         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6364 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6365         as_fn_error $? "Cannot continue" "$LINENO" 5
6366     fi
6367 
6368 
6369 # Always force rm.
6370 RM="$RM -f"
6371 
6372 # pwd behaves differently on various platforms and some don't support the -L flag.
6373 # Always use the bash builtin pwd to get uniform behavior.
6374 THEPWDCMD=pwd
6375 
6376 # These are not required on all platforms
6377 # Extract the first word of "cygpath", so it can be a program name with args.
6378 set dummy cygpath; ac_word=$2
6379 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6380 $as_echo_n "checking for $ac_word... " >&6; }
6381 if test "${ac_cv_path_CYGPATH+set}" = set; then :
6382   $as_echo_n "(cached) " >&6
6383 else
6384   case $CYGPATH in
6385   [\\/]* | ?:[\\/]*)
6386   ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
6387   ;;
6388   *)
6389   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6390 for as_dir in $PATH
6391 do
6392   IFS=$as_save_IFS
6393   test -z "$as_dir" && as_dir=.
6394     for ac_exec_ext in '' $ac_executable_extensions; do
6395   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6396     ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
6397     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6398     break 2
6399   fi
6400 done
6401   done
6402 IFS=$as_save_IFS
6403 
6404   ;;
6405 esac
6406 fi
6407 CYGPATH=$ac_cv_path_CYGPATH
6408 if test -n "$CYGPATH"; then
6409   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
6410 $as_echo "$CYGPATH" >&6; }
6411 else
6412   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6413 $as_echo "no" >&6; }
6414 fi
6415 
6416 
6417 # Extract the first word of "readlink", so it can be a program name with args.
6418 set dummy readlink; ac_word=$2
6419 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6420 $as_echo_n "checking for $ac_word... " >&6; }
6421 if test "${ac_cv_path_READLINK+set}" = set; then :
6422   $as_echo_n "(cached) " >&6
6423 else
6424   case $READLINK in
6425   [\\/]* | ?:[\\/]*)
6426   ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
6427   ;;
6428   *)
6429   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6430 for as_dir in $PATH
6431 do
6432   IFS=$as_save_IFS
6433   test -z "$as_dir" && as_dir=.
6434     for ac_exec_ext in '' $ac_executable_extensions; do
6435   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6436     ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
6437     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6438     break 2
6439   fi
6440 done
6441   done
6442 IFS=$as_save_IFS
6443 
6444   ;;
6445 esac
6446 fi
6447 READLINK=$ac_cv_path_READLINK
6448 if test -n "$READLINK"; then
6449   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
6450 $as_echo "$READLINK" >&6; }
6451 else
6452   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6453 $as_echo "no" >&6; }
6454 fi
6455 
6456 
6457 # Extract the first word of "df", so it can be a program name with args.
6458 set dummy df; ac_word=$2
6459 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6460 $as_echo_n "checking for $ac_word... " >&6; }
6461 if test "${ac_cv_path_DF+set}" = set; then :
6462   $as_echo_n "(cached) " >&6
6463 else
6464   case $DF in
6465   [\\/]* | ?:[\\/]*)
6466   ac_cv_path_DF="$DF" # Let the user override the test with a path.
6467   ;;
6468   *)
6469   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6470 for as_dir in $PATH
6471 do
6472   IFS=$as_save_IFS
6473   test -z "$as_dir" && as_dir=.
6474     for ac_exec_ext in '' $ac_executable_extensions; do
6475   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6476     ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
6477     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6478     break 2
6479   fi
6480 done
6481   done
6482 IFS=$as_save_IFS
6483 
6484   ;;
6485 esac
6486 fi
6487 DF=$ac_cv_path_DF
6488 if test -n "$DF"; then
6489   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
6490 $as_echo "$DF" >&6; }
6491 else
6492   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6493 $as_echo "no" >&6; }
6494 fi
6495 
6496 
6497 # Extract the first word of "SetFile", so it can be a program name with args.
6498 set dummy SetFile; ac_word=$2
6499 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6500 $as_echo_n "checking for $ac_word... " >&6; }
6501 if test "${ac_cv_path_SETFILE+set}" = set; then :
6502   $as_echo_n "(cached) " >&6
6503 else
6504   case $SETFILE in
6505   [\\/]* | ?:[\\/]*)
6506   ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
6507   ;;
6508   *)
6509   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6510 for as_dir in $PATH
6511 do
6512   IFS=$as_save_IFS
6513   test -z "$as_dir" && as_dir=.
6514     for ac_exec_ext in '' $ac_executable_extensions; do
6515   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6516     ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
6517     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6518     break 2
6519   fi
6520 done
6521   done
6522 IFS=$as_save_IFS
6523 
6524   ;;
6525 esac
6526 fi
6527 SETFILE=$ac_cv_path_SETFILE
6528 if test -n "$SETFILE"; then
6529   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
6530 $as_echo "$SETFILE" >&6; }
6531 else
6532   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6533 $as_echo "no" >&6; }
6534 fi
6535 
6536 
6537 
6538 
6539 # Now we can determine OpenJDK build and target platforms. This is required to
6540 # have early on.
6541 # Make sure we can run config.sub.
6542 $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
6543   as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
6544 
6545 { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
6546 $as_echo_n "checking build system type... " >&6; }
6547 if test "${ac_cv_build+set}" = set; then :
6548   $as_echo_n "(cached) " >&6
6549 else
6550   ac_build_alias=$build_alias
6551 test "x$ac_build_alias" = x &&
6552   ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
6553 test "x$ac_build_alias" = x &&
6554   as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
6555 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
6556   as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
6557 
6558 fi
6559 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
6560 $as_echo "$ac_cv_build" >&6; }
6561 case $ac_cv_build in
6562 *-*-*) ;;
6563 *) as_fn_error $? "invalid value of canonical build" "$LINENO" 5 ;;
6564 esac
6565 build=$ac_cv_build
6566 ac_save_IFS=$IFS; IFS='-'
6567 set x $ac_cv_build
6568 shift
6569 build_cpu=$1
6570 build_vendor=$2
6571 shift; shift
6572 # Remember, the first character of IFS is used to create $*,
6573 # except with old shells:
6574 build_os=$*
6575 IFS=$ac_save_IFS
6576 case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
6577 
6578 
6579 { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
6580 $as_echo_n "checking host system type... " >&6; }
6581 if test "${ac_cv_host+set}" = set; then :
6582   $as_echo_n "(cached) " >&6
6583 else
6584   if test "x$host_alias" = x; then
6585   ac_cv_host=$ac_cv_build
6586 else
6587   ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
6588     as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
6589 fi
6590 
6591 fi
6592 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
6593 $as_echo "$ac_cv_host" >&6; }
6594 case $ac_cv_host in
6595 *-*-*) ;;
6596 *) as_fn_error $? "invalid value of canonical host" "$LINENO" 5 ;;
6597 esac
6598 host=$ac_cv_host
6599 ac_save_IFS=$IFS; IFS='-'
6600 set x $ac_cv_host
6601 shift
6602 host_cpu=$1
6603 host_vendor=$2
6604 shift; shift
6605 # Remember, the first character of IFS is used to create $*,
6606 # except with old shells:
6607 host_os=$*
6608 IFS=$ac_save_IFS
6609 case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
6610 
6611 
6612 { $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
6613 $as_echo_n "checking target system type... " >&6; }
6614 if test "${ac_cv_target+set}" = set; then :
6615   $as_echo_n "(cached) " >&6
6616 else
6617   if test "x$target_alias" = x; then
6618   ac_cv_target=$ac_cv_host
6619 else
6620   ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
6621     as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
6622 fi
6623 
6624 fi
6625 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
6626 $as_echo "$ac_cv_target" >&6; }
6627 case $ac_cv_target in
6628 *-*-*) ;;
6629 *) as_fn_error $? "invalid value of canonical target" "$LINENO" 5 ;;
6630 esac
6631 target=$ac_cv_target
6632 ac_save_IFS=$IFS; IFS='-'
6633 set x $ac_cv_target
6634 shift
6635 target_cpu=$1
6636 target_vendor=$2
6637 shift; shift
6638 # Remember, the first character of IFS is used to create $*,
6639 # except with old shells:
6640 target_os=$*
6641 IFS=$ac_save_IFS
6642 case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
6643 
6644 
6645 # The aliases save the names the user supplied, while $host etc.
6646 # will get canonicalized.
6647 test -n "$target_alias" &&
6648   test "$program_prefix$program_suffix$program_transform_name" = \
6649     NONENONEs,x,x, &&
6650   program_prefix=${target_alias}-
6651 
6652 # Figure out the build and target systems. # Note that in autoconf terminology, "build" is obvious, but "target"
6653 # is confusing; it assumes you are cross-compiling a cross-compiler (!)  and "target" is thus the target of the
6654 # product you're building. The target of this build is called "host". Since this is confusing to most people, we
6655 # have not adopted that system, but use "target" as the platform we are building for. In some places though we need
6656 # to use the configure naming style.
6657 
6658 
6659 
6660 
6661 
6662     # Copy the autoconf trip/quadruplet verbatim to OPENJDK_TARGET_AUTOCONF_NAME
6663     # (from the autoconf "host") and OPENJDK_BUILD_AUTOCONF_NAME
6664     # Note that we might later on rewrite e.g. OPENJDK_TARGET_CPU due to reduced build,
6665     # but this will not change the value of OPENJDK_TARGET_AUTOCONF_NAME.
6666     OPENJDK_TARGET_AUTOCONF_NAME="$host"
6667     OPENJDK_BUILD_AUTOCONF_NAME="$build"
6668 
6669 
6670 
6671     # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
6672 
6673   case "$build_os" in
6674     *linux*)
6675       VAR_OS=linux
6676       VAR_OS_API=posix
6677       VAR_OS_ENV=linux
6678       ;;
6679     *solaris*)
6680       VAR_OS=solaris
6681       VAR_OS_API=posix
6682       VAR_OS_ENV=solaris
6683       ;;
6684     *darwin*)
6685       VAR_OS=macosx
6686       VAR_OS_API=posix
6687       VAR_OS_ENV=macosx
6688       ;;
6689     *bsd*)
6690       VAR_OS=bsd
6691       VAR_OS_API=posix
6692       VAR_OS_ENV=bsd
6693       ;;
6694     *cygwin*)
6695       VAR_OS=windows
6696       VAR_OS_API=winapi
6697       VAR_OS_ENV=windows.cygwin
6698       ;;
6699     *mingw*)
6700       VAR_OS=windows
6701       VAR_OS_API=winapi
6702       VAR_OS_ENV=windows.msys
6703       ;;
6704     *)
6705       as_fn_error $? "unsupported operating system $build_os" "$LINENO" 5
6706       ;;
6707   esac
6708 
6709 
6710   # First argument is the cpu name from the trip/quad
6711   case "$build_cpu" in
6712     x86_64)
6713       VAR_CPU=x86_64
6714       VAR_CPU_ARCH=x86
6715       VAR_CPU_BITS=64
6716       VAR_CPU_ENDIAN=little
6717       ;;
6718     i?86)
6719       VAR_CPU=x86
6720       VAR_CPU_ARCH=x86
6721       VAR_CPU_BITS=32
6722       VAR_CPU_ENDIAN=little
6723       ;;
6724     arm*)
6725       VAR_CPU=arm
6726       VAR_CPU_ARCH=arm
6727       VAR_CPU_BITS=32
6728       VAR_CPU_ENDIAN=little
6729       ;;
6730     powerpc)
6731       VAR_CPU=ppc
6732       VAR_CPU_ARCH=ppc
6733       VAR_CPU_BITS=32
6734       VAR_CPU_ENDIAN=big
6735        ;;
6736     powerpc64)
6737       VAR_CPU=ppc64
6738       VAR_CPU_ARCH=ppc
6739       VAR_CPU_BITS=64
6740       VAR_CPU_ENDIAN=big
6741        ;;
6742     sparc)
6743       VAR_CPU=sparc
6744       VAR_CPU_ARCH=sparc
6745       VAR_CPU_BITS=32
6746       VAR_CPU_ENDIAN=big
6747        ;;
6748     sparcv9)
6749       VAR_CPU=sparcv9
6750       VAR_CPU_ARCH=sparc
6751       VAR_CPU_BITS=64
6752       VAR_CPU_ENDIAN=big
6753        ;;
6754     *)
6755       as_fn_error $? "unsupported cpu $build_cpu" "$LINENO" 5
6756       ;;
6757   esac
6758 
6759     # ..and setup our own variables. (Do this explicitely to facilitate searching)
6760     OPENJDK_BUILD_OS="$VAR_OS"
6761     OPENJDK_BUILD_OS_API="$VAR_OS_API"
6762     OPENJDK_BUILD_OS_ENV="$VAR_OS_ENV"
6763     OPENJDK_BUILD_CPU="$VAR_CPU"
6764     OPENJDK_BUILD_CPU_ARCH="$VAR_CPU_ARCH"
6765     OPENJDK_BUILD_CPU_BITS="$VAR_CPU_BITS"
6766     OPENJDK_BUILD_CPU_ENDIAN="$VAR_CPU_ENDIAN"
6767 
6768 
6769 
6770 
6771 
6772 
6773 
6774     { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-build os-cpu" >&5
6775 $as_echo_n "checking openjdk-build os-cpu... " >&6; }
6776     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&5
6777 $as_echo "$OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&6; }
6778 
6779     # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
6780 
6781   case "$host_os" in
6782     *linux*)
6783       VAR_OS=linux
6784       VAR_OS_API=posix
6785       VAR_OS_ENV=linux
6786       ;;
6787     *solaris*)
6788       VAR_OS=solaris
6789       VAR_OS_API=posix
6790       VAR_OS_ENV=solaris
6791       ;;
6792     *darwin*)
6793       VAR_OS=macosx
6794       VAR_OS_API=posix
6795       VAR_OS_ENV=macosx
6796       ;;
6797     *bsd*)
6798       VAR_OS=bsd
6799       VAR_OS_API=posix
6800       VAR_OS_ENV=bsd
6801       ;;
6802     *cygwin*)
6803       VAR_OS=windows
6804       VAR_OS_API=winapi
6805       VAR_OS_ENV=windows.cygwin
6806       ;;
6807     *mingw*)
6808       VAR_OS=windows
6809       VAR_OS_API=winapi
6810       VAR_OS_ENV=windows.msys
6811       ;;
6812     *)
6813       as_fn_error $? "unsupported operating system $host_os" "$LINENO" 5
6814       ;;
6815   esac
6816 
6817 
6818   # First argument is the cpu name from the trip/quad
6819   case "$host_cpu" in
6820     x86_64)
6821       VAR_CPU=x86_64
6822       VAR_CPU_ARCH=x86
6823       VAR_CPU_BITS=64
6824       VAR_CPU_ENDIAN=little
6825       ;;
6826     i?86)
6827       VAR_CPU=x86
6828       VAR_CPU_ARCH=x86
6829       VAR_CPU_BITS=32
6830       VAR_CPU_ENDIAN=little
6831       ;;
6832     arm*)
6833       VAR_CPU=arm
6834       VAR_CPU_ARCH=arm
6835       VAR_CPU_BITS=32
6836       VAR_CPU_ENDIAN=little
6837       ;;
6838     powerpc)
6839       VAR_CPU=ppc
6840       VAR_CPU_ARCH=ppc
6841       VAR_CPU_BITS=32
6842       VAR_CPU_ENDIAN=big
6843        ;;
6844     powerpc64)
6845       VAR_CPU=ppc64
6846       VAR_CPU_ARCH=ppc
6847       VAR_CPU_BITS=64
6848       VAR_CPU_ENDIAN=big
6849        ;;
6850     sparc)
6851       VAR_CPU=sparc
6852       VAR_CPU_ARCH=sparc
6853       VAR_CPU_BITS=32
6854       VAR_CPU_ENDIAN=big
6855        ;;
6856     sparcv9)
6857       VAR_CPU=sparcv9
6858       VAR_CPU_ARCH=sparc
6859       VAR_CPU_BITS=64
6860       VAR_CPU_ENDIAN=big
6861        ;;
6862     *)
6863       as_fn_error $? "unsupported cpu $host_cpu" "$LINENO" 5
6864       ;;
6865   esac
6866 
6867     # ... and setup our own variables. (Do this explicitely to facilitate searching)
6868     OPENJDK_TARGET_OS="$VAR_OS"
6869     OPENJDK_TARGET_OS_API="$VAR_OS_API"
6870     OPENJDK_TARGET_OS_ENV="$VAR_OS_ENV"
6871     OPENJDK_TARGET_CPU="$VAR_CPU"
6872     OPENJDK_TARGET_CPU_ARCH="$VAR_CPU_ARCH"
6873     OPENJDK_TARGET_CPU_BITS="$VAR_CPU_BITS"
6874     OPENJDK_TARGET_CPU_ENDIAN="$VAR_CPU_ENDIAN"
6875 
6876 
6877 
6878 
6879 
6880 
6881 
6882     { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-target os-cpu" >&5
6883 $as_echo_n "checking openjdk-target os-cpu... " >&6; }
6884     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&5
6885 $as_echo "$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&6; }
6886 
6887 
6888 
6889 # Check whether --with-target-bits was given.
6890 if test "${with_target_bits+set}" = set; then :
6891   withval=$with_target_bits;
6892 fi
6893 
6894 
6895   # We have three types of compiles:
6896   # native  == normal compilation, target system == build system
6897   # cross   == traditional cross compilation, target system != build system; special toolchain needed
6898   # reduced == using native compilers, but with special flags (e.g. -m32) to produce 32-bit builds on 64-bit machines
6899   #
6900   if test "x$OPENJDK_BUILD_AUTOCONF_NAME" != "x$OPENJDK_TARGET_AUTOCONF_NAME"; then
6901     # We're doing a proper cross-compilation
6902     COMPILE_TYPE="cross"
6903   else
6904     COMPILE_TYPE="native"
6905   fi
6906 
6907   if test "x$with_target_bits" != x; then
6908     if test "x$COMPILE_TYPE" = "xcross"; then
6909       as_fn_error $? "It is not possible to combine --with-target-bits=X and proper cross-compilation. Choose either." "$LINENO" 5
6910     fi
6911 
6912     if test "x$with_target_bits" = x32 && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
6913       # A reduced build is requested
6914       COMPILE_TYPE="reduced"
6915       OPENJDK_TARGET_CPU_BITS=32
6916       if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
6917         OPENJDK_TARGET_CPU=x86
6918       elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
6919         OPENJDK_TARGET_CPU=sparc
6920       else
6921         as_fn_error $? "Reduced build (--with-target-bits=32) is only supported on x86_64 and sparcv9" "$LINENO" 5
6922       fi
6923     elif test "x$with_target_bits" = x64 && test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
6924       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
6925     elif test "x$with_target_bits" = "x$OPENJDK_TARGET_CPU_BITS"; then
6926       { $as_echo "$as_me:${as_lineno-$LINENO}: --with-target-bits are set to build platform address size; argument has no meaning" >&5
6927 $as_echo "$as_me: --with-target-bits are set to build platform address size; argument has no meaning" >&6;}
6928     else
6929       as_fn_error $? "--with-target-bits can only be 32 or 64, you specified $with_target_bits!" "$LINENO" 5
6930     fi
6931   fi
6932 
6933 
6934 { $as_echo "$as_me:${as_lineno-$LINENO}: checking compilation type" >&5
6935 $as_echo_n "checking compilation type... " >&6; }
6936 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMPILE_TYPE" >&5
6937 $as_echo "$COMPILE_TYPE" >&6; }
6938 
6939 
6940     if test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
6941        REQUIRED_OS_NAME=SunOS
6942        REQUIRED_OS_VERSION=5.10
6943     fi
6944     if test "x$OPENJDK_TARGET_OS" = "xlinux"; then
6945        REQUIRED_OS_NAME=Linux
6946        REQUIRED_OS_VERSION=2.6
6947     fi
6948     if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
6949         REQUIRED_OS_NAME=Windows
6950         if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
6951             REQUIRED_OS_VERSION=5.2
6952         else
6953             REQUIRED_OS_VERSION=5.1
6954         fi
6955     fi
6956     if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
6957         REQUIRED_OS_NAME=Darwin
6958         REQUIRED_OS_VERSION=11.2
6959     fi
6960 
6961 
6962 
6963 
6964 
6965     # Also store the legacy naming of the cpu.
6966     # Ie i586 and amd64 instead of x86 and x86_64
6967     OPENJDK_TARGET_CPU_LEGACY="$OPENJDK_TARGET_CPU"
6968     if test "x$OPENJDK_TARGET_CPU" = xx86; then
6969       OPENJDK_TARGET_CPU_LEGACY="i586"
6970     elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
6971       # On all platforms except MacOSX replace x86_64 with amd64.
6972       OPENJDK_TARGET_CPU_LEGACY="amd64"
6973     fi
6974 
6975 
6976     # And the second legacy naming of the cpu.
6977     # Ie i386 and amd64 instead of x86 and x86_64.
6978     OPENJDK_TARGET_CPU_LEGACY_LIB="$OPENJDK_TARGET_CPU"
6979     if test "x$OPENJDK_TARGET_CPU" = xx86; then
6980       OPENJDK_TARGET_CPU_LEGACY_LIB="i386"
6981     elif test "x$OPENJDK_TARGET_CPU" = xx86_64; then
6982       OPENJDK_TARGET_CPU_LEGACY_LIB="amd64"
6983     fi
6984 
6985 
6986     # This is the name of the cpu (but using i386 and amd64 instead of
6987     # x86 and x86_64, respectively), preceeded by a /, to be used when
6988     # locating libraries. On macosx, it's empty, though.
6989     OPENJDK_TARGET_CPU_LIBDIR="/$OPENJDK_TARGET_CPU_LEGACY_LIB"
6990     if test "x$OPENJDK_TARGET_OS" = xmacosx; then
6991         OPENJDK_TARGET_CPU_LIBDIR=""
6992     fi
6993 
6994 
6995     # OPENJDK_TARGET_CPU_ISADIR is normally empty. On 64-bit Solaris systems, it is set to
6996     # /amd64 or /sparcv9. This string is appended to some library paths, like this:
6997     # /usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libexample.so
6998     OPENJDK_TARGET_CPU_ISADIR=""
6999     if test "x$OPENJDK_TARGET_OS" = xsolaris; then
7000       if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
7001           OPENJDK_TARGET_CPU_ISADIR="/amd64"
7002       elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
7003           OPENJDK_TARGET_CPU_ISADIR="/sparcv9"
7004       fi
7005     fi
7006 
7007 
7008     # Setup OPENJDK_TARGET_CPU_OSARCH, which is used to set the os.arch Java system property
7009     OPENJDK_TARGET_CPU_OSARCH="$OPENJDK_TARGET_CPU"
7010     if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$OPENJDK_TARGET_CPU" = xx86; then
7011       # On linux only, we replace x86 with i386.
7012       OPENJDK_TARGET_CPU_OSARCH="i386"
7013     elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
7014       # On all platforms except macosx, we replace x86_64 with amd64.
7015       OPENJDK_TARGET_CPU_OSARCH="amd64"
7016     fi
7017 
7018 
7019     OPENJDK_TARGET_CPU_JLI="$OPENJDK_TARGET_CPU"
7020     if test "x$OPENJDK_TARGET_CPU" = xx86; then
7021       OPENJDK_TARGET_CPU_JLI="i386"
7022     elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
7023       # On all platforms except macosx, we replace x86_64 with amd64.
7024       OPENJDK_TARGET_CPU_JLI="amd64"
7025     fi
7026     # Now setup the -D flags for building libjli.
7027     OPENJDK_TARGET_CPU_JLI_CFLAGS="-DLIBARCHNAME='\"$OPENJDK_TARGET_CPU_JLI\"'"
7028     if test "x$OPENJDK_TARGET_OS" = xsolaris; then
7029       if test "x$OPENJDK_TARGET_CPU_ARCH" = xsparc; then
7030         OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"sparc\"' -DLIBARCH64NAME='\"sparcv9\"'"
7031       elif test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
7032         OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"i386\"' -DLIBARCH64NAME='\"amd64\"'"
7033       fi
7034     fi
7035 
7036 
7037     # Setup OPENJDK_TARGET_OS_API_DIR, used in source paths.
7038     if test "x$OPENJDK_TARGET_OS_API" = xposix; then
7039         OPENJDK_TARGET_OS_API_DIR="solaris"
7040     fi
7041     if test "x$OPENJDK_TARGET_OS_API" = xwinapi; then
7042         OPENJDK_TARGET_OS_API_DIR="windows"
7043     fi
7044 
7045 
7046     if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
7047         A_LP64="LP64:="
7048         # -D_LP64=1 is only set on linux and mac. Setting on windows causes diff in
7049         # unpack200.exe
7050         if test "x$OPENJDK_TARGET_OS" = xlinux || test "x$OPENJDK_TARGET_OS" = xmacosx; then
7051             ADD_LP64="-D_LP64=1"
7052         fi
7053     fi
7054     LP64=$A_LP64
7055 
7056 
7057     if test "x$COMPILE_TYPE" = "xcross"; then
7058       # FIXME: ... or should this include reduced builds..?
7059       DEFINE_CROSS_COMPILE_ARCH="CROSS_COMPILE_ARCH:=$OPENJDK_TARGET_CPU_LEGACY"
7060     else
7061       DEFINE_CROSS_COMPILE_ARCH=""
7062     fi
7063 
7064 
7065     # ZERO_ARCHDEF is used to enable architecture-specific code
7066     case "${OPENJDK_TARGET_CPU}" in
7067       ppc*)    ZERO_ARCHDEF=PPC   ;;
7068       s390*)   ZERO_ARCHDEF=S390  ;;
7069       sparc*)  ZERO_ARCHDEF=SPARC ;;
7070       x86_64*) ZERO_ARCHDEF=AMD64 ;;
7071       x86)     ZERO_ARCHDEF=IA32  ;;
7072       *)      ZERO_ARCHDEF=$(echo "${OPENJDK_TARGET_CPU_LEGACY_LIB}" | tr a-z A-Z)
7073     esac
7074 
7075 
7076 
7077 
7078 
7079 # Continue setting up basic stuff. Most remaining code require fundamental tools.
7080 
7081 # Locate the directory of this script.
7082 SCRIPT="$0"
7083 AUTOCONF_DIR=`cd \`$DIRNAME $SCRIPT\`; $THEPWDCMD -L`
7084 
7085 # Where is the source? It is located two levels above the configure script.
7086 CURDIR="$PWD"
7087 cd "$AUTOCONF_DIR/../.."
7088 SRC_ROOT="`$THEPWDCMD -L`"
7089 
7090 if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
7091   PATH_SEP=";"
7092 
7093   SRC_ROOT_LENGTH=`$THEPWDCMD -L|$WC -m`
7094   if test $SRC_ROOT_LENGTH -gt 100; then
7095       as_fn_error $? "Your base path is too long. It is $SRC_ROOT_LENGTH characters long, but only 100 is supported" "$LINENO" 5
7096   fi
7097 
7098   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7099     { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin release" >&5
7100 $as_echo_n "checking cygwin release... " >&6; }
7101     CYGWIN_VERSION=`$UNAME -r`
7102     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_VERSION" >&5
7103 $as_echo "$CYGWIN_VERSION" >&6; }
7104     WINDOWS_ENV_VENDOR='cygwin'
7105     WINDOWS_ENV_VERSION="$CYGWIN_VERSION"
7106 
7107     CYGWIN_VERSION_OK=`$ECHO $CYGWIN_VERSION | $GREP ^1.7.`
7108     if test "x$CYGWIN_VERSION_OK" = x; then
7109       { $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
7110 $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;}
7111       as_fn_error $? "Cannot continue" "$LINENO" 5
7112     fi
7113     if test "x$CYGPATH" = x; then
7114         as_fn_error $? "Something is wrong with your cygwin installation since I cannot find cygpath.exe in your path" "$LINENO" 5
7115     fi
7116     { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin root directory as unix-style path" >&5
7117 $as_echo_n "checking cygwin root directory as unix-style path... " >&6; }
7118     # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
7119     cygwin_winpath_root=`cd / ; cmd /c cd | grep ".*"`
7120     # Force cygpath to report the proper root by including a trailing space, and then stripping it off again.
7121     CYGWIN_ROOT_PATH=`$CYGPATH -u "$cygwin_winpath_root " | $CUT -f 1 -d " "`
7122     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_ROOT_PATH" >&5
7123 $as_echo "$CYGWIN_ROOT_PATH" >&6; }
7124     WINDOWS_ENV_ROOT_PATH="$CYGWIN_ROOT_PATH"
7125     test_cygdrive_prefix=`$ECHO $CYGWIN_ROOT_PATH | $GREP ^/cygdrive/`
7126     if test "x$test_cygdrive_prefix" = x; then
7127         as_fn_error $? "Your cygdrive prefix is not /cygdrive. This is currently not supported. Change with mount -c." "$LINENO" 5
7128     fi
7129   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7130     { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys release" >&5
7131 $as_echo_n "checking msys release... " >&6; }
7132     MSYS_VERSION=`$UNAME -r`
7133     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_VERSION" >&5
7134 $as_echo "$MSYS_VERSION" >&6; }
7135 
7136     WINDOWS_ENV_VENDOR='msys'
7137     WINDOWS_ENV_VERSION="$MSYS_VERSION"
7138 
7139     { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys root directory as unix-style path" >&5
7140 $as_echo_n "checking msys root directory as unix-style path... " >&6; }
7141     # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
7142     MSYS_ROOT_PATH=`cd / ; cmd /c cd | grep ".*"`
7143 
7144   windows_path="$MSYS_ROOT_PATH"
7145   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7146     unix_path=`$CYGPATH -u "$windows_path"`
7147     MSYS_ROOT_PATH="$unix_path"
7148   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7149     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
7150     MSYS_ROOT_PATH="$unix_path"
7151   fi
7152 
7153     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_ROOT_PATH" >&5
7154 $as_echo "$MSYS_ROOT_PATH" >&6; }
7155     WINDOWS_ENV_ROOT_PATH="$MSYS_ROOT_PATH"
7156   else
7157     as_fn_error $? "Unknown Windows environment. Neither cygwin nor msys was detected." "$LINENO" 5
7158   fi
7159 
7160   # Test if windows or unix (cygwin/msys) find is first in path.
7161   { $as_echo "$as_me:${as_lineno-$LINENO}: checking what kind of 'find' is first on the PATH" >&5
7162 $as_echo_n "checking what kind of 'find' is first on the PATH... " >&6; }
7163   FIND_BINARY_OUTPUT=`find --version 2>&1`
7164   if test "x`echo $FIND_BINARY_OUTPUT | $GREP GNU`" != x; then
7165     { $as_echo "$as_me:${as_lineno-$LINENO}: result: unix style" >&5
7166 $as_echo "unix style" >&6; }
7167   elif test "x`echo $FIND_BINARY_OUTPUT | $GREP FIND`" != x; then
7168     { $as_echo "$as_me:${as_lineno-$LINENO}: result: Windows" >&5
7169 $as_echo "Windows" >&6; }
7170     { $as_echo "$as_me:${as_lineno-$LINENO}: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&5
7171 $as_echo "$as_me: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&6;}
7172     { $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
7173 $as_echo "$as_me: This will not work. Please correct and make sure /usr/bin (or similar) is first in path." >&6;}
7174     as_fn_error $? "Cannot continue" "$LINENO" 5
7175   else
7176     { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
7177 $as_echo "unknown" >&6; }
7178     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: It seems that your find utility is non-standard." >&5
7179 $as_echo "$as_me: WARNING: It seems that your find utility is non-standard." >&2;}
7180   fi
7181 
7182 else
7183   PATH_SEP=":"
7184 fi
7185 
7186 
7187 
7188 cd "$CURDIR"
7189 
7190 
7191   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7192 
7193   # Input might be given as Windows format, start by converting to
7194   # unix format.
7195   path="$SRC_ROOT"
7196   new_path=`$CYGPATH -u "$path"`
7197 
7198   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
7199   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
7200   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
7201   # "foo.exe" is OK but "foo" is an error.
7202   #
7203   # This test is therefore slightly more accurate than "test -f" to check for file precense.
7204   # It is also a way to make sure we got the proper file name for the real test later on.
7205   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
7206   if test "x$test_shortpath" = x; then
7207     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&5
7208 $as_echo "$as_me: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&6;}
7209     as_fn_error $? "Cannot locate the the path of SRC_ROOT" "$LINENO" 5
7210   fi
7211 
7212   # Call helper function which possibly converts this using DOS-style short mode.
7213   # If so, the updated path is stored in $new_path.
7214 
7215   input_path="$new_path"
7216   # Check if we need to convert this using DOS-style short mode. If the path
7217   # contains just simple characters, use it. Otherwise (spaces, weird characters),
7218   # take no chances and rewrite it.
7219   # Note: m4 eats our [], so we need to use [ and ] instead.
7220   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
7221   if test "x$has_forbidden_chars" != x; then
7222     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7223     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
7224     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
7225     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
7226       # Going to short mode and back again did indeed matter. Since short mode is
7227       # case insensitive, let's make it lowercase to improve readability.
7228       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7229       # Now convert it back to Unix-stile (cygpath)
7230       input_path=`$CYGPATH -u "$shortmode_path"`
7231       new_path="$input_path"
7232     fi
7233   fi
7234 
7235   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
7236   if test "x$test_cygdrive_prefix" = x; then
7237     # As a simple fix, exclude /usr/bin since it's not a real path.
7238     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
7239       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
7240       # a path prefixed by /cygdrive for fixpath to work.
7241       new_path="$CYGWIN_ROOT_PATH$input_path"
7242     fi
7243   fi
7244 
7245 
7246   if test "x$path" != "x$new_path"; then
7247     SRC_ROOT="$new_path"
7248     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting SRC_ROOT to \"$new_path\"" >&5
7249 $as_echo "$as_me: Rewriting SRC_ROOT to \"$new_path\"" >&6;}
7250   fi
7251 
7252   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7253 
7254   path="$SRC_ROOT"
7255   has_colon=`$ECHO $path | $GREP ^.:`
7256   new_path="$path"
7257   if test "x$has_colon" = x; then
7258     # Not in mixed or Windows style, start by that.
7259     new_path=`cmd //c echo $path`
7260   fi
7261 
7262 
7263   input_path="$new_path"
7264   # Check if we need to convert this using DOS-style short mode. If the path
7265   # contains just simple characters, use it. Otherwise (spaces, weird characters),
7266   # take no chances and rewrite it.
7267   # Note: m4 eats our [], so we need to use [ and ] instead.
7268   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
7269   if test "x$has_forbidden_chars" != x; then
7270     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7271     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7272   fi
7273 
7274 
7275   windows_path="$new_path"
7276   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7277     unix_path=`$CYGPATH -u "$windows_path"`
7278     new_path="$unix_path"
7279   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7280     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
7281     new_path="$unix_path"
7282   fi
7283 
7284   if test "x$path" != "x$new_path"; then
7285     SRC_ROOT="$new_path"
7286     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting SRC_ROOT to \"$new_path\"" >&5
7287 $as_echo "$as_me: Rewriting SRC_ROOT to \"$new_path\"" >&6;}
7288   fi
7289 
7290   # Save the first 10 bytes of this path to the storage, so fixpath can work.
7291   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
7292 
7293   else
7294     # We're on a posix platform. Hooray! :)
7295     path="$SRC_ROOT"
7296     has_space=`$ECHO "$path" | $GREP " "`
7297     if test "x$has_space" != x; then
7298       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&5
7299 $as_echo "$as_me: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&6;}
7300       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
7301     fi
7302 
7303     # Use eval to expand a potential ~
7304     eval path="$path"
7305     if test ! -f "$path" && test ! -d "$path"; then
7306       as_fn_error $? "The path of SRC_ROOT, which resolves as \"$path\", is not found." "$LINENO" 5
7307     fi
7308 
7309     SRC_ROOT="`cd "$path"; $THEPWDCMD -L`"
7310   fi
7311 
7312 
7313   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7314 
7315   # Input might be given as Windows format, start by converting to
7316   # unix format.
7317   path="$CURDIR"
7318   new_path=`$CYGPATH -u "$path"`
7319 
7320   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
7321   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
7322   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
7323   # "foo.exe" is OK but "foo" is an error.
7324   #
7325   # This test is therefore slightly more accurate than "test -f" to check for file precense.
7326   # It is also a way to make sure we got the proper file name for the real test later on.
7327   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
7328   if test "x$test_shortpath" = x; then
7329     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
7330 $as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
7331     as_fn_error $? "Cannot locate the the path of CURDIR" "$LINENO" 5
7332   fi
7333 
7334   # Call helper function which possibly converts this using DOS-style short mode.
7335   # If so, the updated path is stored in $new_path.
7336 
7337   input_path="$new_path"
7338   # Check if we need to convert this using DOS-style short mode. If the path
7339   # contains just simple characters, use it. Otherwise (spaces, weird characters),
7340   # take no chances and rewrite it.
7341   # Note: m4 eats our [], so we need to use [ and ] instead.
7342   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
7343   if test "x$has_forbidden_chars" != x; then
7344     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7345     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
7346     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
7347     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
7348       # Going to short mode and back again did indeed matter. Since short mode is
7349       # case insensitive, let's make it lowercase to improve readability.
7350       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7351       # Now convert it back to Unix-stile (cygpath)
7352       input_path=`$CYGPATH -u "$shortmode_path"`
7353       new_path="$input_path"
7354     fi
7355   fi
7356 
7357   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
7358   if test "x$test_cygdrive_prefix" = x; then
7359     # As a simple fix, exclude /usr/bin since it's not a real path.
7360     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
7361       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
7362       # a path prefixed by /cygdrive for fixpath to work.
7363       new_path="$CYGWIN_ROOT_PATH$input_path"
7364     fi
7365   fi
7366 
7367 
7368   if test "x$path" != "x$new_path"; then
7369     CURDIR="$new_path"
7370     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
7371 $as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
7372   fi
7373 
7374   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7375 
7376   path="$CURDIR"
7377   has_colon=`$ECHO $path | $GREP ^.:`
7378   new_path="$path"
7379   if test "x$has_colon" = x; then
7380     # Not in mixed or Windows style, start by that.
7381     new_path=`cmd //c echo $path`
7382   fi
7383 
7384 
7385   input_path="$new_path"
7386   # Check if we need to convert this using DOS-style short mode. If the path
7387   # contains just simple characters, use it. Otherwise (spaces, weird characters),
7388   # take no chances and rewrite it.
7389   # Note: m4 eats our [], so we need to use [ and ] instead.
7390   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
7391   if test "x$has_forbidden_chars" != x; then
7392     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7393     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7394   fi
7395 
7396 
7397   windows_path="$new_path"
7398   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7399     unix_path=`$CYGPATH -u "$windows_path"`
7400     new_path="$unix_path"
7401   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7402     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
7403     new_path="$unix_path"
7404   fi
7405 
7406   if test "x$path" != "x$new_path"; then
7407     CURDIR="$new_path"
7408     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
7409 $as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
7410   fi
7411 
7412   # Save the first 10 bytes of this path to the storage, so fixpath can work.
7413   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
7414 
7415   else
7416     # We're on a posix platform. Hooray! :)
7417     path="$CURDIR"
7418     has_space=`$ECHO "$path" | $GREP " "`
7419     if test "x$has_space" != x; then
7420       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
7421 $as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
7422       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
7423     fi
7424 
7425     # Use eval to expand a potential ~
7426     eval path="$path"
7427     if test ! -f "$path" && test ! -d "$path"; then
7428       as_fn_error $? "The path of CURDIR, which resolves as \"$path\", is not found." "$LINENO" 5
7429     fi
7430 
7431     CURDIR="`cd "$path"; $THEPWDCMD -L`"
7432   fi
7433 
7434 
7435 if test "x$OPENJDK_BUILD_OS" = "xsolaris"; then
7436     # Add extra search paths on solaris for utilities like ar and as etc...
7437     PATH="$PATH:/usr/ccs/bin:/usr/sfw/bin:/opt/csw/bin"
7438 fi
7439 
7440 # You can force the sys-root if the sys-root encoded into the cross compiler tools
7441 # is not correct.
7442 
7443 # Check whether --with-sys-root was given.
7444 if test "${with_sys_root+set}" = set; then :
7445   withval=$with_sys_root;
7446 fi
7447 
7448 
7449 if test "x$with_sys_root" != x; then
7450   SYS_ROOT=$with_sys_root
7451 else
7452   SYS_ROOT=/
7453 fi
7454 
7455 
7456 
7457 # Check whether --with-tools-dir was given.
7458 if test "${with_tools_dir+set}" = set; then :
7459   withval=$with_tools_dir; TOOLS_DIR=$with_tools_dir
7460 fi
7461 
7462 
7463 
7464 # Check whether --with-devkit was given.
7465 if test "${with_devkit+set}" = set; then :
7466   withval=$with_devkit;
7467     if test "x$with_sys_root" != x; then
7468       as_fn_error $? "Cannot specify both --with-devkit and --with-sys-root at the same time" "$LINENO" 5
7469     fi
7470     if test "x$with_tools_dir" != x; then
7471       as_fn_error $? "Cannot specify both --with-devkit and --with-tools-dir at the same time" "$LINENO" 5
7472     fi
7473     TOOLS_DIR=$with_devkit/bin
7474     if test -d "$with_devkit/$host_alias/libc"; then
7475       SYS_ROOT=$with_devkit/$host_alias/libc
7476     elif test -d "$with_devkit/$host/sys-root"; then
7477       SYS_ROOT=$with_devkit/$host/sys-root
7478     fi
7479 
7480 fi
7481 
7482 
7483 
7484 
7485 # Setup default logging of stdout and stderr to build.log in the output root.
7486 BUILD_LOG='$(OUTPUT_ROOT)/build.log'
7487 BUILD_LOG_PREVIOUS='$(OUTPUT_ROOT)/build.log.old'
7488 BUILD_LOG_WRAPPER='$(BASH) $(SRC_ROOT)/common/bin/logger.sh $(BUILD_LOG)'
7489 
7490 
7491 
7492 
7493 
7494 # Check if it's a pure open build or if custom sources are to be used.
7495 
7496   # Check whether --enable-openjdk-only was given.
7497 if test "${enable_openjdk_only+set}" = set; then :
7498   enableval=$enable_openjdk_only;
7499 else
7500   enable_openjdk_only="no"
7501 fi
7502 
7503 
7504   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for presence of closed sources" >&5
7505 $as_echo_n "checking for presence of closed sources... " >&6; }
7506   if test -d "$SRC_ROOT/jdk/src/closed"; then
7507     CLOSED_SOURCE_PRESENT=yes
7508   else
7509     CLOSED_SOURCE_PRESENT=no
7510   fi
7511   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CLOSED_SOURCE_PRESENT" >&5
7512 $as_echo "$CLOSED_SOURCE_PRESENT" >&6; }
7513 
7514   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if closed source is suppressed (openjdk-only)" >&5
7515 $as_echo_n "checking if closed source is suppressed (openjdk-only)... " >&6; }
7516   SUPPRESS_CLOSED_SOURCE="$enable_openjdk_only"
7517   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SUPPRESS_CLOSED_SOURCE" >&5
7518 $as_echo "$SUPPRESS_CLOSED_SOURCE" >&6; }
7519 
7520   if test "x$CLOSED_SOURCE_PRESENT" = xno; then
7521     OPENJDK=true
7522     if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then
7523       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&5
7524 $as_echo "$as_me: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&2;}
7525     fi
7526   else
7527     if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then
7528       OPENJDK=true
7529     else
7530       OPENJDK=false
7531     fi
7532   fi
7533 
7534   if test "x$OPENJDK" = "xtrue"; then
7535     SET_OPENJDK="OPENJDK=true"
7536   fi
7537 
7538 
7539 
7540 
7541 # These are needed to be able to create a configuration name (and thus the output directory)
7542 
7543 ###############################################################################
7544 #
7545 # Check which variant of the JDK that we want to build.
7546 # Currently we have:
7547 #    normal:   standard edition
7548 # but the custom make system may add other variants
7549 #
7550 # Effectively the JDK variant gives a name to a specific set of
7551 # modules to compile into the JDK. In the future, these modules
7552 # might even be Jigsaw modules.
7553 #
7554 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variant of the JDK to build" >&5
7555 $as_echo_n "checking which variant of the JDK to build... " >&6; }
7556 
7557 # Check whether --with-jdk-variant was given.
7558 if test "${with_jdk_variant+set}" = set; then :
7559   withval=$with_jdk_variant;
7560 fi
7561 
7562 
7563 if test "x$with_jdk_variant" = xnormal || test "x$with_jdk_variant" = x; then
7564     JDK_VARIANT="normal"
7565 else
7566     as_fn_error $? "The available JDK variants are: normal" "$LINENO" 5
7567 fi
7568 
7569 
7570 
7571 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JDK_VARIANT" >&5
7572 $as_echo "$JDK_VARIANT" >&6; }
7573 
7574 
7575 
7576 ###############################################################################
7577 #
7578 # Check which variants of the JVM that we want to build.
7579 # Currently we have:
7580 #    server: normal interpreter and a tiered C1/C2 compiler
7581 #    client: normal interpreter and C1 (no C2 compiler) (only 32-bit platforms)
7582 #    minimal1: reduced form of client with optional VM services and features stripped out
7583 #    kernel: kernel footprint JVM that passes the TCK without major performance problems,
7584 #             ie normal interpreter and C1, only the serial GC, kernel jvmti etc
7585 #    zero: no machine code interpreter, no compiler
7586 #    zeroshark: zero interpreter and shark/llvm compiler backend
7587 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variants of the JVM to build" >&5
7588 $as_echo_n "checking which variants of the JVM to build... " >&6; }
7589 
7590 # Check whether --with-jvm-variants was given.
7591 if test "${with_jvm_variants+set}" = set; then :
7592   withval=$with_jvm_variants;
7593 fi
7594 
7595 
7596 if test "x$with_jvm_variants" = x; then
7597      with_jvm_variants="server"
7598 fi
7599 
7600 JVM_VARIANTS=",$with_jvm_variants,"
7601 TEST_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/server,//' -e 's/client,//'  -e 's/minimal1,//' -e 's/kernel,//' -e 's/zero,//' -e 's/zeroshark,//'`
7602 
7603 if test "x$TEST_VARIANTS" != "x,"; then
7604    as_fn_error $? "The available JVM variants are: server, client, minimal1, kernel, zero, zeroshark" "$LINENO" 5
7605 fi
7606 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_jvm_variants" >&5
7607 $as_echo "$with_jvm_variants" >&6; }
7608 
7609 JVM_VARIANT_SERVER=`$ECHO "$JVM_VARIANTS" | $SED -e '/,server,/!s/.*/false/g' -e '/,server,/s/.*/true/g'`
7610 JVM_VARIANT_CLIENT=`$ECHO "$JVM_VARIANTS" | $SED -e '/,client,/!s/.*/false/g' -e '/,client,/s/.*/true/g'`
7611 JVM_VARIANT_MINIMAL1=`$ECHO "$JVM_VARIANTS" | $SED -e '/,minimal1,/!s/.*/false/g' -e '/,minimal1,/s/.*/true/g'`
7612 JVM_VARIANT_KERNEL=`$ECHO "$JVM_VARIANTS" | $SED -e '/,kernel,/!s/.*/false/g' -e '/,kernel,/s/.*/true/g'`
7613 JVM_VARIANT_ZERO=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zero,/!s/.*/false/g' -e '/,zero,/s/.*/true/g'`
7614 JVM_VARIANT_ZEROSHARK=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zeroshark,/!s/.*/false/g' -e '/,zeroshark,/s/.*/true/g'`
7615 
7616 if test "x$JVM_VARIANT_CLIENT" = xtrue; then
7617     if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
7618         as_fn_error $? "You cannot build a client JVM for a 64-bit machine." "$LINENO" 5
7619     fi
7620 fi
7621 if test "x$JVM_VARIANT_KERNEL" = xtrue; then
7622     if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
7623         as_fn_error $? "You cannot build a kernel JVM for a 64-bit machine." "$LINENO" 5
7624     fi
7625 fi
7626 if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
7627     if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
7628         as_fn_error $? "You cannot build a minimal JVM for a 64-bit machine." "$LINENO" 5
7629     fi
7630 fi
7631 
7632 # Replace the commas with AND for use in the build directory name.
7633 ANDED_JVM_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/^,//' -e 's/,$//' -e 's/,/AND/'`
7634 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/'`
7635 if test "x$COUNT_VARIANTS" != "x,1"; then
7636     BUILDING_MULTIPLE_JVM_VARIANTS=yes
7637 else
7638     BUILDING_MULTIPLE_JVM_VARIANTS=no
7639 fi
7640 
7641 
7642 
7643 
7644 
7645 
7646 
7647 
7648 
7649 INCLUDE_SA=true
7650 if test "x$JVM_VARIANT_ZERO" = xtrue ; then
7651     INCLUDE_SA=false
7652 fi
7653 if test "x$JVM_VARIANT_ZEROSHARK" = xtrue ; then
7654     INCLUDE_SA=false
7655 fi
7656 
7657 
7658 if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
7659    MACOSX_UNIVERSAL="true"
7660 fi
7661 
7662 
7663 
7664 
7665 
7666 ###############################################################################
7667 #
7668 # Set the debug level
7669 #    release: no debug information, all optimizations, no asserts.
7670 #    fastdebug: debug information (-g), all optimizations, all asserts
7671 #    slowdebug: debug information (-g), no optimizations, all asserts
7672 #
7673 DEBUG_LEVEL="release"
7674 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which debug level to use" >&5
7675 $as_echo_n "checking which debug level to use... " >&6; }
7676 # Check whether --enable-debug was given.
7677 if test "${enable_debug+set}" = set; then :
7678   enableval=$enable_debug;
7679         ENABLE_DEBUG="${enableval}"
7680         DEBUG_LEVEL="fastdebug"
7681 
7682 else
7683   ENABLE_DEBUG="no"
7684 fi
7685 
7686 
7687 
7688 # Check whether --with-debug-level was given.
7689 if test "${with_debug_level+set}" = set; then :
7690   withval=$with_debug_level;
7691         DEBUG_LEVEL="${withval}"
7692         if test "x$ENABLE_DEBUG" = xyes; then
7693                         as_fn_error $? "You cannot use both --enable-debug and --with-debug-level at the same time." "$LINENO" 5
7694         fi
7695 
7696 fi
7697 
7698 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEBUG_LEVEL" >&5
7699 $as_echo "$DEBUG_LEVEL" >&6; }
7700 
7701 if test "x$DEBUG_LEVEL" != xrelease && \
7702    test "x$DEBUG_LEVEL" != xfastdebug && \
7703    test "x$DEBUG_LEVEL" != xslowdebug; then
7704    as_fn_error $? "Allowed debug levels are: release, fastdebug and slowdebug" "$LINENO" 5
7705 fi
7706 
7707 
7708 ###############################################################################
7709 #
7710 # Setup legacy vars/targets and new vars to deal with different debug levels.
7711 #
7712 
7713 case $DEBUG_LEVEL in
7714       release )
7715           VARIANT="OPT"
7716           FASTDEBUG="false"
7717           DEBUG_CLASSFILES="false"
7718           BUILD_VARIANT_RELEASE=""
7719           HOTSPOT_DEBUG_LEVEL="product"
7720           HOTSPOT_EXPORT="product"
7721            ;;
7722       fastdebug )
7723           VARIANT="DBG"
7724           FASTDEBUG="true"
7725           DEBUG_CLASSFILES="true"
7726           BUILD_VARIANT_RELEASE="-fastdebug"
7727           HOTSPOT_DEBUG_LEVEL="fastdebug"
7728           HOTSPOT_EXPORT="fastdebug"
7729            ;;
7730       slowdebug )
7731           VARIANT="DBG"
7732           FASTDEBUG="false"
7733           DEBUG_CLASSFILES="true"
7734           BUILD_VARIANT_RELEASE="-debug"
7735           HOTSPOT_DEBUG_LEVEL="jvmg"
7736           HOTSPOT_EXPORT="debug"
7737            ;;
7738 esac
7739 
7740 #####
7741 # Generate the legacy makefile targets for hotspot.
7742 # The hotspot api for selecting the build artifacts, really, needs to be improved.
7743 # JDK-7195896 will fix this on the hotspot side by using the JVM_VARIANT_* variables to
7744 # determine what needs to be built. All we will need to set here is all_product, all_fastdebug etc
7745 # But until then ...
7746 HOTSPOT_TARGET=""
7747 
7748 if test "x$JVM_VARIANT_SERVER" = xtrue; then
7749     HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL} "
7750 fi
7751 
7752 if test "x$JVM_VARIANT_CLIENT" = xtrue; then
7753     HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}1 "
7754 fi
7755 
7756 if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
7757     HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}minimal1 "
7758 fi
7759 
7760 if test "x$JVM_VARIANT_KERNEL" = xtrue; then
7761     HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}kernel "
7762 fi
7763 
7764 if test "x$JVM_VARIANT_ZERO" = xtrue; then
7765     HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}zero "
7766 fi
7767 
7768 if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
7769     HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}shark "
7770 fi
7771 
7772 HOTSPOT_TARGET="$HOTSPOT_TARGET docs export_$HOTSPOT_EXPORT"
7773 
7774 # On Macosx universal binaries are produced, but they only contain
7775 # 64 bit intel. This invalidates control of which jvms are built
7776 # from configure, but only server is valid anyway. Fix this
7777 # when hotspot makefiles are rewritten.
7778 if test "x$MACOSX_UNIVERSAL" = xtrue; then
7779     HOTSPOT_TARGET=universal_${HOTSPOT_EXPORT}
7780 fi
7781 
7782 #####
7783 
7784 
7785 
7786 
7787 
7788 
7789 
7790 
7791 # With basic setup done, call the custom early hook.
7792 
7793 
7794 # To properly create a configuration name, we need to have the OpenJDK target
7795 # and options (variants and debug level) parsed.
7796 
7797 
7798 
7799 # Check whether --with-conf-name was given.
7800 if test "${with_conf_name+set}" = set; then :
7801   withval=$with_conf_name;  CONF_NAME=${with_conf_name}
7802 fi
7803 
7804 
7805 # Test from where we are running configure, in or outside of src root.
7806 if test "x$CURDIR" = "x$SRC_ROOT" || test "x$CURDIR" = "x$SRC_ROOT/common" \
7807         || test "x$CURDIR" = "x$SRC_ROOT/common/autoconf" \
7808         || test "x$CURDIR" = "x$SRC_ROOT/common/makefiles" ; then
7809     # We are running configure from the src root.
7810     # Create a default ./build/target-variant-debuglevel output root.
7811     if test "x${CONF_NAME}" = x; then
7812         CONF_NAME="${OPENJDK_TARGET_OS}-${OPENJDK_TARGET_CPU}-${JDK_VARIANT}-${ANDED_JVM_VARIANTS}-${DEBUG_LEVEL}"
7813     fi
7814     OUTPUT_ROOT="$SRC_ROOT/build/${CONF_NAME}"
7815     $MKDIR -p "$OUTPUT_ROOT"
7816     if test ! -d "$OUTPUT_ROOT"; then
7817         as_fn_error $? "Could not create build directory $OUTPUT_ROOT" "$LINENO" 5
7818     fi
7819 else
7820     # We are running configure from outside of the src dir.
7821     # Then use the current directory as output dir!
7822     # If configuration is situated in normal build directory, just use the build
7823     # directory name as configuration name, otherwise use the complete path.
7824     if test "x${CONF_NAME}" = x; then
7825         CONF_NAME=`$ECHO $CURDIR | $SED -e "s!^${SRC_ROOT}/build/!!"`
7826     fi
7827     OUTPUT_ROOT="$CURDIR"
7828 
7829     # WARNING: This might be a bad thing to do. You need to be sure you want to
7830     # have a configuration in this directory. Do some sanity checks!
7831 
7832     if test ! -e "$OUTPUT_ROOT/spec.gmk"; then
7833       # If we have a spec.gmk, we have run here before and we are OK. Otherwise, check for
7834       # other files
7835       files_present=`$LS $OUTPUT_ROOT`
7836       # Configure has already touched config.log and confdefs.h in the current dir when this check
7837       # is performed.
7838       filtered_files=`$ECHO "$files_present" | $SED -e 's/config.log//g' -e 's/confdefs.h//g' -e 's/ //g' \
7839                                              | $TR -d '\n'`
7840       if test "x$filtered_files" != x; then
7841         { $as_echo "$as_me:${as_lineno-$LINENO}: Current directory is $CURDIR." >&5
7842 $as_echo "$as_me: Current directory is $CURDIR." >&6;}
7843         { $as_echo "$as_me:${as_lineno-$LINENO}: Since this is not the source root, configure will output the configuration here" >&5
7844 $as_echo "$as_me: Since this is not the source root, configure will output the configuration here" >&6;}
7845         { $as_echo "$as_me:${as_lineno-$LINENO}: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&5
7846 $as_echo "$as_me: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&6;}
7847         { $as_echo "$as_me:${as_lineno-$LINENO}: However, this directory is not empty. This is not allowed, since it could" >&5
7848 $as_echo "$as_me: However, this directory is not empty. This is not allowed, since it could" >&6;}
7849         { $as_echo "$as_me:${as_lineno-$LINENO}: seriously mess up just about everything." >&5
7850 $as_echo "$as_me: seriously mess up just about everything." >&6;}
7851         { $as_echo "$as_me:${as_lineno-$LINENO}: Try 'cd $SRC_ROOT' and restart configure" >&5
7852 $as_echo "$as_me: Try 'cd $SRC_ROOT' and restart configure" >&6;}
7853         { $as_echo "$as_me:${as_lineno-$LINENO}: (or create a new empty directory and cd to it)." >&5
7854 $as_echo "$as_me: (or create a new empty directory and cd to it)." >&6;}
7855         as_fn_error $? "Will not continue creating configuration in $CURDIR" "$LINENO" 5
7856       fi
7857     fi
7858 fi
7859 { $as_echo "$as_me:${as_lineno-$LINENO}: checking what configuration name to use" >&5
7860 $as_echo_n "checking what configuration name to use... " >&6; }
7861 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CONF_NAME" >&5
7862 $as_echo "$CONF_NAME" >&6; }
7863 
7864 
7865   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7866 
7867   # Input might be given as Windows format, start by converting to
7868   # unix format.
7869   path="$OUTPUT_ROOT"
7870   new_path=`$CYGPATH -u "$path"`
7871 
7872   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
7873   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
7874   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
7875   # "foo.exe" is OK but "foo" is an error.
7876   #
7877   # This test is therefore slightly more accurate than "test -f" to check for file precense.
7878   # It is also a way to make sure we got the proper file name for the real test later on.
7879   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
7880   if test "x$test_shortpath" = x; then
7881     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
7882 $as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
7883     as_fn_error $? "Cannot locate the the path of OUTPUT_ROOT" "$LINENO" 5
7884   fi
7885 
7886   # Call helper function which possibly converts this using DOS-style short mode.
7887   # If so, the updated path is stored in $new_path.
7888 
7889   input_path="$new_path"
7890   # Check if we need to convert this using DOS-style short mode. If the path
7891   # contains just simple characters, use it. Otherwise (spaces, weird characters),
7892   # take no chances and rewrite it.
7893   # Note: m4 eats our [], so we need to use [ and ] instead.
7894   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
7895   if test "x$has_forbidden_chars" != x; then
7896     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7897     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
7898     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
7899     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
7900       # Going to short mode and back again did indeed matter. Since short mode is
7901       # case insensitive, let's make it lowercase to improve readability.
7902       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7903       # Now convert it back to Unix-stile (cygpath)
7904       input_path=`$CYGPATH -u "$shortmode_path"`
7905       new_path="$input_path"
7906     fi
7907   fi
7908 
7909   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
7910   if test "x$test_cygdrive_prefix" = x; then
7911     # As a simple fix, exclude /usr/bin since it's not a real path.
7912     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
7913       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
7914       # a path prefixed by /cygdrive for fixpath to work.
7915       new_path="$CYGWIN_ROOT_PATH$input_path"
7916     fi
7917   fi
7918 
7919 
7920   if test "x$path" != "x$new_path"; then
7921     OUTPUT_ROOT="$new_path"
7922     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
7923 $as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
7924   fi
7925 
7926   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7927 
7928   path="$OUTPUT_ROOT"
7929   has_colon=`$ECHO $path | $GREP ^.:`
7930   new_path="$path"
7931   if test "x$has_colon" = x; then
7932     # Not in mixed or Windows style, start by that.
7933     new_path=`cmd //c echo $path`
7934   fi
7935 
7936 
7937   input_path="$new_path"
7938   # Check if we need to convert this using DOS-style short mode. If the path
7939   # contains just simple characters, use it. Otherwise (spaces, weird characters),
7940   # take no chances and rewrite it.
7941   # Note: m4 eats our [], so we need to use [ and ] instead.
7942   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
7943   if test "x$has_forbidden_chars" != x; then
7944     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7945     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7946   fi
7947 
7948 
7949   windows_path="$new_path"
7950   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7951     unix_path=`$CYGPATH -u "$windows_path"`
7952     new_path="$unix_path"
7953   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7954     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
7955     new_path="$unix_path"
7956   fi
7957 
7958   if test "x$path" != "x$new_path"; then
7959     OUTPUT_ROOT="$new_path"
7960     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
7961 $as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
7962   fi
7963 
7964   # Save the first 10 bytes of this path to the storage, so fixpath can work.
7965   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
7966 
7967   else
7968     # We're on a posix platform. Hooray! :)
7969     path="$OUTPUT_ROOT"
7970     has_space=`$ECHO "$path" | $GREP " "`
7971     if test "x$has_space" != x; then
7972       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
7973 $as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
7974       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
7975     fi
7976 
7977     # Use eval to expand a potential ~
7978     eval path="$path"
7979     if test ! -f "$path" && test ! -d "$path"; then
7980       as_fn_error $? "The path of OUTPUT_ROOT, which resolves as \"$path\", is not found." "$LINENO" 5
7981     fi
7982 
7983     OUTPUT_ROOT="`cd "$path"; $THEPWDCMD -L`"
7984   fi
7985 
7986 
7987 SPEC=$OUTPUT_ROOT/spec.gmk
7988 
7989 CONF_NAME=$CONF_NAME
7990 
7991 OUTPUT_ROOT=$OUTPUT_ROOT
7992 
7993 
7994 # Most of the probed defines are put into config.h
7995 ac_config_headers="$ac_config_headers $OUTPUT_ROOT/config.h:$AUTOCONF_DIR/config.h.in"
7996 
7997 # The spec.gmk file contains all variables for the make system.
7998 ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in"
7999 
8000 # The hotspot-spec.gmk file contains legacy variables for the hotspot make system.
8001 ac_config_files="$ac_config_files $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in"
8002 
8003 # The bootcycle-spec.gmk file contains support for boot cycle builds.
8004 ac_config_files="$ac_config_files $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in"
8005 
8006 # The compare.sh is used to compare the build output to other builds.
8007 ac_config_files="$ac_config_files $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in"
8008 
8009 # Spec.sh is currently used by compare-objects.sh
8010 ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.sh:$AUTOCONF_DIR/spec.sh.in"
8011 
8012 # The generated Makefile knows where the spec.gmk is and where the source is.
8013 # You can run make from the OUTPUT_ROOT, or from the top-level Makefile
8014 # which will look for generated configurations
8015 ac_config_files="$ac_config_files $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in"
8016 
8017 
8018 # Save the arguments given to us
8019 echo "$CONFIGURE_COMMAND_LINE" > $OUTPUT_ROOT/configure-arguments
8020 
8021 
8022 # Must be done before we can call HELP_MSG_MISSING_DEPENDENCY.
8023 
8024     for ac_prog in apt-get yum port pkgutil pkgadd
8025 do
8026   # Extract the first word of "$ac_prog", so it can be a program name with args.
8027 set dummy $ac_prog; ac_word=$2
8028 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8029 $as_echo_n "checking for $ac_word... " >&6; }
8030 if test "${ac_cv_prog_PKGHANDLER+set}" = set; then :
8031   $as_echo_n "(cached) " >&6
8032 else
8033   if test -n "$PKGHANDLER"; then
8034   ac_cv_prog_PKGHANDLER="$PKGHANDLER" # Let the user override the test.
8035 else
8036 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8037 for as_dir in $PATH
8038 do
8039   IFS=$as_save_IFS
8040   test -z "$as_dir" && as_dir=.
8041     for ac_exec_ext in '' $ac_executable_extensions; do
8042   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8043     ac_cv_prog_PKGHANDLER="$ac_prog"
8044     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8045     break 2
8046   fi
8047 done
8048   done
8049 IFS=$as_save_IFS
8050 
8051 fi
8052 fi
8053 PKGHANDLER=$ac_cv_prog_PKGHANDLER
8054 if test -n "$PKGHANDLER"; then
8055   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKGHANDLER" >&5
8056 $as_echo "$PKGHANDLER" >&6; }
8057 else
8058   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8059 $as_echo "no" >&6; }
8060 fi
8061 
8062 
8063   test -n "$PKGHANDLER" && break
8064 done
8065 
8066 
8067 
8068 # Setup tools that requires more complex handling, or that is not needed by the configure script.
8069 
8070 
8071   # We need to find a recent version of GNU make. Especially on Solaris, this can be tricky.
8072   if test "x$MAKE" != x; then
8073     # User has supplied a make, test it.
8074     if test ! -f "$MAKE"; then
8075       as_fn_error $? "The specified make (by MAKE=$MAKE) is not found." "$LINENO" 5
8076     fi
8077 
8078   MAKE_CANDIDATE=""$MAKE""
8079   DESCRIPTION="user supplied MAKE=$MAKE"
8080   if test "x$MAKE_CANDIDATE" != x; then
8081     { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
8082 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
8083     MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
8084     IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
8085     if test "x$IS_GNU_MAKE" = x; then
8086       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
8087 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
8088     else
8089       IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'`
8090       if test "x$IS_MODERN_MAKE" = x; then
8091         { $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
8092 $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;}
8093       else
8094         if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
8095           if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8096             MAKE_EXPECTED_ENV='cygwin'
8097           elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8098             MAKE_EXPECTED_ENV='msys'
8099           else
8100             as_fn_error $? "Unknown Windows environment" "$LINENO" 5
8101           fi
8102           MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
8103           IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
8104         else
8105           # Not relevant for non-Windows
8106           IS_MAKE_CORRECT_ENV=true
8107         fi
8108         if test "x$IS_MAKE_CORRECT_ENV" = x; then
8109           { $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
8110 $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;}
8111         else
8112           FOUND_MAKE=$MAKE_CANDIDATE
8113 
8114   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8115 
8116   # First separate the path from the arguments. This will split at the first
8117   # space.
8118   complete="$FOUND_MAKE"
8119   path="${complete%% *}"
8120   tmp="$complete EOL"
8121   arguments="${tmp#* }"
8122 
8123   # Input might be given as Windows format, start by converting to
8124   # unix format.
8125   new_path=`$CYGPATH -u "$path"`
8126 
8127   # Now try to locate executable using which
8128   new_path=`$WHICH "$new_path" 2> /dev/null`
8129   # bat and cmd files are not always considered executable in cygwin causing which
8130   # to not find them
8131   if test "x$new_path" = x \
8132            && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8133            && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8134     new_path=`$CYGPATH -u "$path"`
8135   fi
8136   if test "x$new_path" = x; then
8137     # Oops. Which didn't find the executable.
8138     # The splitting of arguments from the executable at a space might have been incorrect,
8139     # since paths with space are more likely in Windows. Give it another try with the whole
8140     # argument.
8141     path="$complete"
8142     arguments="EOL"
8143     new_path=`$CYGPATH -u "$path"`
8144     new_path=`$WHICH "$new_path" 2> /dev/null`
8145     # bat and cmd files are not always considered executable in cygwin causing which
8146     # to not find them
8147     if test "x$new_path" = x \
8148              && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8149              && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8150       new_path=`$CYGPATH -u "$path"`
8151     fi
8152     if test "x$new_path" = x; then
8153       # It's still not found. Now this is an unrecoverable error.
8154       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8155 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8156       has_space=`$ECHO "$complete" | $GREP " "`
8157       if test "x$has_space" != x; then
8158         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8159 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8160       fi
8161       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8162     fi
8163   fi
8164 
8165   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
8166   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
8167   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
8168   # "foo.exe" is OK but "foo" is an error.
8169   #
8170   # This test is therefore slightly more accurate than "test -f" to check for file precense.
8171   # It is also a way to make sure we got the proper file name for the real test later on.
8172   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
8173   if test "x$test_shortpath" = x; then
8174     # Short path failed, file does not exist as specified.
8175     # Try adding .exe or .cmd
8176     if test -f "${new_path}.exe"; then
8177        input_to_shortpath="${new_path}.exe"
8178     elif test -f "${new_path}.cmd"; then
8179        input_to_shortpath="${new_path}.cmd"
8180     else
8181       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
8182 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
8183       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
8184 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
8185       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8186     fi
8187   else
8188     input_to_shortpath="$new_path"
8189   fi
8190 
8191   # Call helper function which possibly converts this using DOS-style short mode.
8192   # If so, the updated path is stored in $new_path.
8193   new_path="$input_to_shortpath"
8194 
8195   input_path="$input_to_shortpath"
8196   # Check if we need to convert this using DOS-style short mode. If the path
8197   # contains just simple characters, use it. Otherwise (spaces, weird characters),
8198   # take no chances and rewrite it.
8199   # Note: m4 eats our [], so we need to use [ and ] instead.
8200   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
8201   if test "x$has_forbidden_chars" != x; then
8202     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8203     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
8204     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
8205     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
8206       # Going to short mode and back again did indeed matter. Since short mode is
8207       # case insensitive, let's make it lowercase to improve readability.
8208       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8209       # Now convert it back to Unix-stile (cygpath)
8210       input_path=`$CYGPATH -u "$shortmode_path"`
8211       new_path="$input_path"
8212     fi
8213   fi
8214 
8215   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
8216   if test "x$test_cygdrive_prefix" = x; then
8217     # As a simple fix, exclude /usr/bin since it's not a real path.
8218     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
8219       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
8220       # a path prefixed by /cygdrive for fixpath to work.
8221       new_path="$CYGWIN_ROOT_PATH$input_path"
8222     fi
8223   fi
8224 
8225   # remove trailing .exe if any
8226   new_path="${new_path/%.exe/}"
8227 
8228   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8229 
8230   # First separate the path from the arguments. This will split at the first
8231   # space.
8232   complete="$FOUND_MAKE"
8233   path="${complete%% *}"
8234   tmp="$complete EOL"
8235   arguments="${tmp#* }"
8236 
8237   # Input might be given as Windows format, start by converting to
8238   # unix format.
8239   new_path="$path"
8240 
8241   windows_path="$new_path"
8242   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8243     unix_path=`$CYGPATH -u "$windows_path"`
8244     new_path="$unix_path"
8245   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8246     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8247     new_path="$unix_path"
8248   fi
8249 
8250 
8251   # Now try to locate executable using which
8252   new_path=`$WHICH "$new_path" 2> /dev/null`
8253 
8254   if test "x$new_path" = x; then
8255     # Oops. Which didn't find the executable.
8256     # The splitting of arguments from the executable at a space might have been incorrect,
8257     # since paths with space are more likely in Windows. Give it another try with the whole
8258     # argument.
8259     path="$complete"
8260     arguments="EOL"
8261     new_path="$path"
8262 
8263   windows_path="$new_path"
8264   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8265     unix_path=`$CYGPATH -u "$windows_path"`
8266     new_path="$unix_path"
8267   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8268     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8269     new_path="$unix_path"
8270   fi
8271 
8272 
8273     new_path=`$WHICH "$new_path" 2> /dev/null`
8274 
8275     if test "x$new_path" = x; then
8276       # It's still not found. Now this is an unrecoverable error.
8277       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8278 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8279       has_space=`$ECHO "$complete" | $GREP " "`
8280       if test "x$has_space" != x; then
8281         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8282 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8283       fi
8284       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8285     fi
8286   fi
8287 
8288   # Now new_path has a complete unix path to the binary
8289   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
8290     # Keep paths in /bin as-is, but remove trailing .exe if any
8291     new_path="${new_path/%.exe/}"
8292     # Do not save /bin paths to all_fixpath_prefixes!
8293   else
8294     # Not in mixed or Windows style, start by that.
8295     new_path=`cmd //c echo $new_path`
8296 
8297   input_path="$new_path"
8298   # Check if we need to convert this using DOS-style short mode. If the path
8299   # contains just simple characters, use it. Otherwise (spaces, weird characters),
8300   # take no chances and rewrite it.
8301   # Note: m4 eats our [], so we need to use [ and ] instead.
8302   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
8303   if test "x$has_forbidden_chars" != x; then
8304     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8305     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8306   fi
8307 
8308     # Output is in $new_path
8309 
8310   windows_path="$new_path"
8311   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8312     unix_path=`$CYGPATH -u "$windows_path"`
8313     new_path="$unix_path"
8314   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8315     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8316     new_path="$unix_path"
8317   fi
8318 
8319     # remove trailing .exe if any
8320     new_path="${new_path/%.exe/}"
8321 
8322     # Save the first 10 bytes of this path to the storage, so fixpath can work.
8323     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
8324   fi
8325 
8326   else
8327     # We're on a posix platform. Hooray! :)
8328     # First separate the path from the arguments. This will split at the first
8329     # space.
8330     complete="$FOUND_MAKE"
8331     path="${complete%% *}"
8332     tmp="$complete EOL"
8333     arguments="${tmp#* }"
8334 
8335     # Cannot rely on the command "which" here since it doesn't always work.
8336     is_absolute_path=`$ECHO "$path" | $GREP ^/`
8337     if test -z "$is_absolute_path"; then
8338       # Path to executable is not absolute. Find it.
8339       IFS_save="$IFS"
8340       IFS=:
8341       for p in $PATH; do
8342         if test -f "$p/$path" && test -x "$p/$path"; then
8343           new_path="$p/$path"
8344           break
8345         fi
8346       done
8347       IFS="$IFS_save"
8348     else
8349       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
8350 $as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
8351       new_path="$path"
8352     fi
8353 
8354     if test "x$new_path" = x; then
8355         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8356 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8357         has_space=`$ECHO "$complete" | $GREP " "`
8358         if test "x$has_space" != x; then
8359           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
8360 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
8361         fi
8362         as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8363       fi
8364   fi
8365 
8366       # Now join together the path and the arguments once again
8367       if test "x$arguments" != xEOL; then
8368         new_complete="$new_path ${arguments% *}"
8369       else
8370         new_complete="$new_path"
8371       fi
8372 
8373   if test "x$complete" != "x$new_complete"; then
8374       FOUND_MAKE="$new_complete"
8375       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
8376 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
8377     fi
8378 
8379         fi
8380       fi
8381     fi
8382   fi
8383 
8384     if test "x$FOUND_MAKE" = x; then
8385       as_fn_error $? "The specified make (by MAKE=$MAKE) is not GNU make 3.81 or newer." "$LINENO" 5
8386     fi
8387   else
8388     # Try our hardest to locate a correct version of GNU make
8389     for ac_prog in gmake
8390 do
8391   # Extract the first word of "$ac_prog", so it can be a program name with args.
8392 set dummy $ac_prog; ac_word=$2
8393 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8394 $as_echo_n "checking for $ac_word... " >&6; }
8395 if test "${ac_cv_path_CHECK_GMAKE+set}" = set; then :
8396   $as_echo_n "(cached) " >&6
8397 else
8398   case $CHECK_GMAKE in
8399   [\\/]* | ?:[\\/]*)
8400   ac_cv_path_CHECK_GMAKE="$CHECK_GMAKE" # Let the user override the test with a path.
8401   ;;
8402   *)
8403   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8404 for as_dir in $PATH
8405 do
8406   IFS=$as_save_IFS
8407   test -z "$as_dir" && as_dir=.
8408     for ac_exec_ext in '' $ac_executable_extensions; do
8409   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8410     ac_cv_path_CHECK_GMAKE="$as_dir/$ac_word$ac_exec_ext"
8411     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8412     break 2
8413   fi
8414 done
8415   done
8416 IFS=$as_save_IFS
8417 
8418   ;;
8419 esac
8420 fi
8421 CHECK_GMAKE=$ac_cv_path_CHECK_GMAKE
8422 if test -n "$CHECK_GMAKE"; then
8423   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_GMAKE" >&5
8424 $as_echo "$CHECK_GMAKE" >&6; }
8425 else
8426   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8427 $as_echo "no" >&6; }
8428 fi
8429 
8430 
8431   test -n "$CHECK_GMAKE" && break
8432 done
8433 
8434 
8435   MAKE_CANDIDATE=""$CHECK_GMAKE""
8436   DESCRIPTION="gmake in PATH"
8437   if test "x$MAKE_CANDIDATE" != x; then
8438     { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
8439 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
8440     MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
8441     IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
8442     if test "x$IS_GNU_MAKE" = x; then
8443       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
8444 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
8445     else
8446       IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'`
8447       if test "x$IS_MODERN_MAKE" = x; then
8448         { $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
8449 $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;}
8450       else
8451         if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
8452           if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8453             MAKE_EXPECTED_ENV='cygwin'
8454           elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8455             MAKE_EXPECTED_ENV='msys'
8456           else
8457             as_fn_error $? "Unknown Windows environment" "$LINENO" 5
8458           fi
8459           MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
8460           IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
8461         else
8462           # Not relevant for non-Windows
8463           IS_MAKE_CORRECT_ENV=true
8464         fi
8465         if test "x$IS_MAKE_CORRECT_ENV" = x; then
8466           { $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
8467 $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;}
8468         else
8469           FOUND_MAKE=$MAKE_CANDIDATE
8470 
8471   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8472 
8473   # First separate the path from the arguments. This will split at the first
8474   # space.
8475   complete="$FOUND_MAKE"
8476   path="${complete%% *}"
8477   tmp="$complete EOL"
8478   arguments="${tmp#* }"
8479 
8480   # Input might be given as Windows format, start by converting to
8481   # unix format.
8482   new_path=`$CYGPATH -u "$path"`
8483 
8484   # Now try to locate executable using which
8485   new_path=`$WHICH "$new_path" 2> /dev/null`
8486   # bat and cmd files are not always considered executable in cygwin causing which
8487   # to not find them
8488   if test "x$new_path" = x \
8489            && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8490            && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8491     new_path=`$CYGPATH -u "$path"`
8492   fi
8493   if test "x$new_path" = x; then
8494     # Oops. Which didn't find the executable.
8495     # The splitting of arguments from the executable at a space might have been incorrect,
8496     # since paths with space are more likely in Windows. Give it another try with the whole
8497     # argument.
8498     path="$complete"
8499     arguments="EOL"
8500     new_path=`$CYGPATH -u "$path"`
8501     new_path=`$WHICH "$new_path" 2> /dev/null`
8502     # bat and cmd files are not always considered executable in cygwin causing which
8503     # to not find them
8504     if test "x$new_path" = x \
8505              && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8506              && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8507       new_path=`$CYGPATH -u "$path"`
8508     fi
8509     if test "x$new_path" = x; then
8510       # It's still not found. Now this is an unrecoverable error.
8511       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8512 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8513       has_space=`$ECHO "$complete" | $GREP " "`
8514       if test "x$has_space" != x; then
8515         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8516 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8517       fi
8518       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8519     fi
8520   fi
8521 
8522   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
8523   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
8524   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
8525   # "foo.exe" is OK but "foo" is an error.
8526   #
8527   # This test is therefore slightly more accurate than "test -f" to check for file precense.
8528   # It is also a way to make sure we got the proper file name for the real test later on.
8529   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
8530   if test "x$test_shortpath" = x; then
8531     # Short path failed, file does not exist as specified.
8532     # Try adding .exe or .cmd
8533     if test -f "${new_path}.exe"; then
8534        input_to_shortpath="${new_path}.exe"
8535     elif test -f "${new_path}.cmd"; then
8536        input_to_shortpath="${new_path}.cmd"
8537     else
8538       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
8539 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
8540       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
8541 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
8542       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8543     fi
8544   else
8545     input_to_shortpath="$new_path"
8546   fi
8547 
8548   # Call helper function which possibly converts this using DOS-style short mode.
8549   # If so, the updated path is stored in $new_path.
8550   new_path="$input_to_shortpath"
8551 
8552   input_path="$input_to_shortpath"
8553   # Check if we need to convert this using DOS-style short mode. If the path
8554   # contains just simple characters, use it. Otherwise (spaces, weird characters),
8555   # take no chances and rewrite it.
8556   # Note: m4 eats our [], so we need to use [ and ] instead.
8557   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
8558   if test "x$has_forbidden_chars" != x; then
8559     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8560     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
8561     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
8562     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
8563       # Going to short mode and back again did indeed matter. Since short mode is
8564       # case insensitive, let's make it lowercase to improve readability.
8565       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8566       # Now convert it back to Unix-stile (cygpath)
8567       input_path=`$CYGPATH -u "$shortmode_path"`
8568       new_path="$input_path"
8569     fi
8570   fi
8571 
8572   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
8573   if test "x$test_cygdrive_prefix" = x; then
8574     # As a simple fix, exclude /usr/bin since it's not a real path.
8575     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
8576       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
8577       # a path prefixed by /cygdrive for fixpath to work.
8578       new_path="$CYGWIN_ROOT_PATH$input_path"
8579     fi
8580   fi
8581 
8582   # remove trailing .exe if any
8583   new_path="${new_path/%.exe/}"
8584 
8585   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8586 
8587   # First separate the path from the arguments. This will split at the first
8588   # space.
8589   complete="$FOUND_MAKE"
8590   path="${complete%% *}"
8591   tmp="$complete EOL"
8592   arguments="${tmp#* }"
8593 
8594   # Input might be given as Windows format, start by converting to
8595   # unix format.
8596   new_path="$path"
8597 
8598   windows_path="$new_path"
8599   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8600     unix_path=`$CYGPATH -u "$windows_path"`
8601     new_path="$unix_path"
8602   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8603     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8604     new_path="$unix_path"
8605   fi
8606 
8607 
8608   # Now try to locate executable using which
8609   new_path=`$WHICH "$new_path" 2> /dev/null`
8610 
8611   if test "x$new_path" = x; then
8612     # Oops. Which didn't find the executable.
8613     # The splitting of arguments from the executable at a space might have been incorrect,
8614     # since paths with space are more likely in Windows. Give it another try with the whole
8615     # argument.
8616     path="$complete"
8617     arguments="EOL"
8618     new_path="$path"
8619 
8620   windows_path="$new_path"
8621   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8622     unix_path=`$CYGPATH -u "$windows_path"`
8623     new_path="$unix_path"
8624   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8625     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8626     new_path="$unix_path"
8627   fi
8628 
8629 
8630     new_path=`$WHICH "$new_path" 2> /dev/null`
8631 
8632     if test "x$new_path" = x; then
8633       # It's still not found. Now this is an unrecoverable error.
8634       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8635 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8636       has_space=`$ECHO "$complete" | $GREP " "`
8637       if test "x$has_space" != x; then
8638         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8639 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8640       fi
8641       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8642     fi
8643   fi
8644 
8645   # Now new_path has a complete unix path to the binary
8646   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
8647     # Keep paths in /bin as-is, but remove trailing .exe if any
8648     new_path="${new_path/%.exe/}"
8649     # Do not save /bin paths to all_fixpath_prefixes!
8650   else
8651     # Not in mixed or Windows style, start by that.
8652     new_path=`cmd //c echo $new_path`
8653 
8654   input_path="$new_path"
8655   # Check if we need to convert this using DOS-style short mode. If the path
8656   # contains just simple characters, use it. Otherwise (spaces, weird characters),
8657   # take no chances and rewrite it.
8658   # Note: m4 eats our [], so we need to use [ and ] instead.
8659   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
8660   if test "x$has_forbidden_chars" != x; then
8661     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8662     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8663   fi
8664 
8665     # Output is in $new_path
8666 
8667   windows_path="$new_path"
8668   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8669     unix_path=`$CYGPATH -u "$windows_path"`
8670     new_path="$unix_path"
8671   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8672     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8673     new_path="$unix_path"
8674   fi
8675 
8676     # remove trailing .exe if any
8677     new_path="${new_path/%.exe/}"
8678 
8679     # Save the first 10 bytes of this path to the storage, so fixpath can work.
8680     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
8681   fi
8682 
8683   else
8684     # We're on a posix platform. Hooray! :)
8685     # First separate the path from the arguments. This will split at the first
8686     # space.
8687     complete="$FOUND_MAKE"
8688     path="${complete%% *}"
8689     tmp="$complete EOL"
8690     arguments="${tmp#* }"
8691 
8692     # Cannot rely on the command "which" here since it doesn't always work.
8693     is_absolute_path=`$ECHO "$path" | $GREP ^/`
8694     if test -z "$is_absolute_path"; then
8695       # Path to executable is not absolute. Find it.
8696       IFS_save="$IFS"
8697       IFS=:
8698       for p in $PATH; do
8699         if test -f "$p/$path" && test -x "$p/$path"; then
8700           new_path="$p/$path"
8701           break
8702         fi
8703       done
8704       IFS="$IFS_save"
8705     else
8706       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
8707 $as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
8708       new_path="$path"
8709     fi
8710 
8711     if test "x$new_path" = x; then
8712         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8713 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8714         has_space=`$ECHO "$complete" | $GREP " "`
8715         if test "x$has_space" != x; then
8716           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
8717 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
8718         fi
8719         as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8720       fi
8721   fi
8722 
8723       # Now join together the path and the arguments once again
8724       if test "x$arguments" != xEOL; then
8725         new_complete="$new_path ${arguments% *}"
8726       else
8727         new_complete="$new_path"
8728       fi
8729 
8730   if test "x$complete" != "x$new_complete"; then
8731       FOUND_MAKE="$new_complete"
8732       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
8733 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
8734     fi
8735 
8736         fi
8737       fi
8738     fi
8739   fi
8740 
8741 
8742     if test "x$FOUND_MAKE" = x; then
8743       for ac_prog in make
8744 do
8745   # Extract the first word of "$ac_prog", so it can be a program name with args.
8746 set dummy $ac_prog; ac_word=$2
8747 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8748 $as_echo_n "checking for $ac_word... " >&6; }
8749 if test "${ac_cv_path_CHECK_MAKE+set}" = set; then :
8750   $as_echo_n "(cached) " >&6
8751 else
8752   case $CHECK_MAKE in
8753   [\\/]* | ?:[\\/]*)
8754   ac_cv_path_CHECK_MAKE="$CHECK_MAKE" # Let the user override the test with a path.
8755   ;;
8756   *)
8757   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8758 for as_dir in $PATH
8759 do
8760   IFS=$as_save_IFS
8761   test -z "$as_dir" && as_dir=.
8762     for ac_exec_ext in '' $ac_executable_extensions; do
8763   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8764     ac_cv_path_CHECK_MAKE="$as_dir/$ac_word$ac_exec_ext"
8765     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8766     break 2
8767   fi
8768 done
8769   done
8770 IFS=$as_save_IFS
8771 
8772   ;;
8773 esac
8774 fi
8775 CHECK_MAKE=$ac_cv_path_CHECK_MAKE
8776 if test -n "$CHECK_MAKE"; then
8777   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_MAKE" >&5
8778 $as_echo "$CHECK_MAKE" >&6; }
8779 else
8780   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8781 $as_echo "no" >&6; }
8782 fi
8783 
8784 
8785   test -n "$CHECK_MAKE" && break
8786 done
8787 
8788 
8789   MAKE_CANDIDATE=""$CHECK_MAKE""
8790   DESCRIPTION="make in PATH"
8791   if test "x$MAKE_CANDIDATE" != x; then
8792     { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
8793 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
8794     MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
8795     IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
8796     if test "x$IS_GNU_MAKE" = x; then
8797       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
8798 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
8799     else
8800       IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'`
8801       if test "x$IS_MODERN_MAKE" = x; then
8802         { $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
8803 $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;}
8804       else
8805         if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
8806           if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8807             MAKE_EXPECTED_ENV='cygwin'
8808           elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8809             MAKE_EXPECTED_ENV='msys'
8810           else
8811             as_fn_error $? "Unknown Windows environment" "$LINENO" 5
8812           fi
8813           MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
8814           IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
8815         else
8816           # Not relevant for non-Windows
8817           IS_MAKE_CORRECT_ENV=true
8818         fi
8819         if test "x$IS_MAKE_CORRECT_ENV" = x; then
8820           { $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
8821 $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;}
8822         else
8823           FOUND_MAKE=$MAKE_CANDIDATE
8824 
8825   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8826 
8827   # First separate the path from the arguments. This will split at the first
8828   # space.
8829   complete="$FOUND_MAKE"
8830   path="${complete%% *}"
8831   tmp="$complete EOL"
8832   arguments="${tmp#* }"
8833 
8834   # Input might be given as Windows format, start by converting to
8835   # unix format.
8836   new_path=`$CYGPATH -u "$path"`
8837 
8838   # Now try to locate executable using which
8839   new_path=`$WHICH "$new_path" 2> /dev/null`
8840   # bat and cmd files are not always considered executable in cygwin causing which
8841   # to not find them
8842   if test "x$new_path" = x \
8843            && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8844            && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8845     new_path=`$CYGPATH -u "$path"`
8846   fi
8847   if test "x$new_path" = x; then
8848     # Oops. Which didn't find the executable.
8849     # The splitting of arguments from the executable at a space might have been incorrect,
8850     # since paths with space are more likely in Windows. Give it another try with the whole
8851     # argument.
8852     path="$complete"
8853     arguments="EOL"
8854     new_path=`$CYGPATH -u "$path"`
8855     new_path=`$WHICH "$new_path" 2> /dev/null`
8856     # bat and cmd files are not always considered executable in cygwin causing which
8857     # to not find them
8858     if test "x$new_path" = x \
8859              && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8860              && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8861       new_path=`$CYGPATH -u "$path"`
8862     fi
8863     if test "x$new_path" = x; then
8864       # It's still not found. Now this is an unrecoverable error.
8865       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8866 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8867       has_space=`$ECHO "$complete" | $GREP " "`
8868       if test "x$has_space" != x; then
8869         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8870 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8871       fi
8872       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8873     fi
8874   fi
8875 
8876   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
8877   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
8878   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
8879   # "foo.exe" is OK but "foo" is an error.
8880   #
8881   # This test is therefore slightly more accurate than "test -f" to check for file precense.
8882   # It is also a way to make sure we got the proper file name for the real test later on.
8883   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
8884   if test "x$test_shortpath" = x; then
8885     # Short path failed, file does not exist as specified.
8886     # Try adding .exe or .cmd
8887     if test -f "${new_path}.exe"; then
8888        input_to_shortpath="${new_path}.exe"
8889     elif test -f "${new_path}.cmd"; then
8890        input_to_shortpath="${new_path}.cmd"
8891     else
8892       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
8893 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
8894       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
8895 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
8896       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8897     fi
8898   else
8899     input_to_shortpath="$new_path"
8900   fi
8901 
8902   # Call helper function which possibly converts this using DOS-style short mode.
8903   # If so, the updated path is stored in $new_path.
8904   new_path="$input_to_shortpath"
8905 
8906   input_path="$input_to_shortpath"
8907   # Check if we need to convert this using DOS-style short mode. If the path
8908   # contains just simple characters, use it. Otherwise (spaces, weird characters),
8909   # take no chances and rewrite it.
8910   # Note: m4 eats our [], so we need to use [ and ] instead.
8911   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
8912   if test "x$has_forbidden_chars" != x; then
8913     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8914     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
8915     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
8916     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
8917       # Going to short mode and back again did indeed matter. Since short mode is
8918       # case insensitive, let's make it lowercase to improve readability.
8919       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8920       # Now convert it back to Unix-stile (cygpath)
8921       input_path=`$CYGPATH -u "$shortmode_path"`
8922       new_path="$input_path"
8923     fi
8924   fi
8925 
8926   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
8927   if test "x$test_cygdrive_prefix" = x; then
8928     # As a simple fix, exclude /usr/bin since it's not a real path.
8929     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
8930       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
8931       # a path prefixed by /cygdrive for fixpath to work.
8932       new_path="$CYGWIN_ROOT_PATH$input_path"
8933     fi
8934   fi
8935 
8936   # remove trailing .exe if any
8937   new_path="${new_path/%.exe/}"
8938 
8939   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8940 
8941   # First separate the path from the arguments. This will split at the first
8942   # space.
8943   complete="$FOUND_MAKE"
8944   path="${complete%% *}"
8945   tmp="$complete EOL"
8946   arguments="${tmp#* }"
8947 
8948   # Input might be given as Windows format, start by converting to
8949   # unix format.
8950   new_path="$path"
8951 
8952   windows_path="$new_path"
8953   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8954     unix_path=`$CYGPATH -u "$windows_path"`
8955     new_path="$unix_path"
8956   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8957     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8958     new_path="$unix_path"
8959   fi
8960 
8961 
8962   # Now try to locate executable using which
8963   new_path=`$WHICH "$new_path" 2> /dev/null`
8964 
8965   if test "x$new_path" = x; then
8966     # Oops. Which didn't find the executable.
8967     # The splitting of arguments from the executable at a space might have been incorrect,
8968     # since paths with space are more likely in Windows. Give it another try with the whole
8969     # argument.
8970     path="$complete"
8971     arguments="EOL"
8972     new_path="$path"
8973 
8974   windows_path="$new_path"
8975   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8976     unix_path=`$CYGPATH -u "$windows_path"`
8977     new_path="$unix_path"
8978   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8979     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8980     new_path="$unix_path"
8981   fi
8982 
8983 
8984     new_path=`$WHICH "$new_path" 2> /dev/null`
8985 
8986     if test "x$new_path" = x; then
8987       # It's still not found. Now this is an unrecoverable error.
8988       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8989 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8990       has_space=`$ECHO "$complete" | $GREP " "`
8991       if test "x$has_space" != x; then
8992         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8993 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8994       fi
8995       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8996     fi
8997   fi
8998 
8999   # Now new_path has a complete unix path to the binary
9000   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
9001     # Keep paths in /bin as-is, but remove trailing .exe if any
9002     new_path="${new_path/%.exe/}"
9003     # Do not save /bin paths to all_fixpath_prefixes!
9004   else
9005     # Not in mixed or Windows style, start by that.
9006     new_path=`cmd //c echo $new_path`
9007 
9008   input_path="$new_path"
9009   # Check if we need to convert this using DOS-style short mode. If the path
9010   # contains just simple characters, use it. Otherwise (spaces, weird characters),
9011   # take no chances and rewrite it.
9012   # Note: m4 eats our [], so we need to use [ and ] instead.
9013   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
9014   if test "x$has_forbidden_chars" != x; then
9015     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9016     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9017   fi
9018 
9019     # Output is in $new_path
9020 
9021   windows_path="$new_path"
9022   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9023     unix_path=`$CYGPATH -u "$windows_path"`
9024     new_path="$unix_path"
9025   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9026     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9027     new_path="$unix_path"
9028   fi
9029 
9030     # remove trailing .exe if any
9031     new_path="${new_path/%.exe/}"
9032 
9033     # Save the first 10 bytes of this path to the storage, so fixpath can work.
9034     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
9035   fi
9036 
9037   else
9038     # We're on a posix platform. Hooray! :)
9039     # First separate the path from the arguments. This will split at the first
9040     # space.
9041     complete="$FOUND_MAKE"
9042     path="${complete%% *}"
9043     tmp="$complete EOL"
9044     arguments="${tmp#* }"
9045 
9046     # Cannot rely on the command "which" here since it doesn't always work.
9047     is_absolute_path=`$ECHO "$path" | $GREP ^/`
9048     if test -z "$is_absolute_path"; then
9049       # Path to executable is not absolute. Find it.
9050       IFS_save="$IFS"
9051       IFS=:
9052       for p in $PATH; do
9053         if test -f "$p/$path" && test -x "$p/$path"; then
9054           new_path="$p/$path"
9055           break
9056         fi
9057       done
9058       IFS="$IFS_save"
9059     else
9060       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
9061 $as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
9062       new_path="$path"
9063     fi
9064 
9065     if test "x$new_path" = x; then
9066         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9067 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9068         has_space=`$ECHO "$complete" | $GREP " "`
9069         if test "x$has_space" != x; then
9070           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
9071 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
9072         fi
9073         as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9074       fi
9075   fi
9076 
9077       # Now join together the path and the arguments once again
9078       if test "x$arguments" != xEOL; then
9079         new_complete="$new_path ${arguments% *}"
9080       else
9081         new_complete="$new_path"
9082       fi
9083 
9084   if test "x$complete" != "x$new_complete"; then
9085       FOUND_MAKE="$new_complete"
9086       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
9087 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
9088     fi
9089 
9090         fi
9091       fi
9092     fi
9093   fi
9094 
9095     fi
9096 
9097     if test "x$FOUND_MAKE" = x; then
9098       if test "x$TOOLS_DIR" != x; then
9099         # We have a tools-dir, check that as well before giving up.
9100         OLD_PATH=$PATH
9101         PATH=$TOOLS_DIR:$PATH
9102         for ac_prog in gmake
9103 do
9104   # Extract the first word of "$ac_prog", so it can be a program name with args.
9105 set dummy $ac_prog; ac_word=$2
9106 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9107 $as_echo_n "checking for $ac_word... " >&6; }
9108 if test "${ac_cv_path_CHECK_TOOLSDIR_GMAKE+set}" = set; then :
9109   $as_echo_n "(cached) " >&6
9110 else
9111   case $CHECK_TOOLSDIR_GMAKE in
9112   [\\/]* | ?:[\\/]*)
9113   ac_cv_path_CHECK_TOOLSDIR_GMAKE="$CHECK_TOOLSDIR_GMAKE" # Let the user override the test with a path.
9114   ;;
9115   *)
9116   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9117 for as_dir in $PATH
9118 do
9119   IFS=$as_save_IFS
9120   test -z "$as_dir" && as_dir=.
9121     for ac_exec_ext in '' $ac_executable_extensions; do
9122   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9123     ac_cv_path_CHECK_TOOLSDIR_GMAKE="$as_dir/$ac_word$ac_exec_ext"
9124     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9125     break 2
9126   fi
9127 done
9128   done
9129 IFS=$as_save_IFS
9130 
9131   ;;
9132 esac
9133 fi
9134 CHECK_TOOLSDIR_GMAKE=$ac_cv_path_CHECK_TOOLSDIR_GMAKE
9135 if test -n "$CHECK_TOOLSDIR_GMAKE"; then
9136   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_GMAKE" >&5
9137 $as_echo "$CHECK_TOOLSDIR_GMAKE" >&6; }
9138 else
9139   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9140 $as_echo "no" >&6; }
9141 fi
9142 
9143 
9144   test -n "$CHECK_TOOLSDIR_GMAKE" && break
9145 done
9146 
9147 
9148   MAKE_CANDIDATE=""$CHECK_TOOLSDIR_GMAKE""
9149   DESCRIPTION="gmake in tools-dir"
9150   if test "x$MAKE_CANDIDATE" != x; then
9151     { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
9152 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
9153     MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
9154     IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
9155     if test "x$IS_GNU_MAKE" = x; then
9156       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
9157 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
9158     else
9159       IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'`
9160       if test "x$IS_MODERN_MAKE" = x; then
9161         { $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
9162 $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;}
9163       else
9164         if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
9165           if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9166             MAKE_EXPECTED_ENV='cygwin'
9167           elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9168             MAKE_EXPECTED_ENV='msys'
9169           else
9170             as_fn_error $? "Unknown Windows environment" "$LINENO" 5
9171           fi
9172           MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
9173           IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
9174         else
9175           # Not relevant for non-Windows
9176           IS_MAKE_CORRECT_ENV=true
9177         fi
9178         if test "x$IS_MAKE_CORRECT_ENV" = x; then
9179           { $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
9180 $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;}
9181         else
9182           FOUND_MAKE=$MAKE_CANDIDATE
9183 
9184   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9185 
9186   # First separate the path from the arguments. This will split at the first
9187   # space.
9188   complete="$FOUND_MAKE"
9189   path="${complete%% *}"
9190   tmp="$complete EOL"
9191   arguments="${tmp#* }"
9192 
9193   # Input might be given as Windows format, start by converting to
9194   # unix format.
9195   new_path=`$CYGPATH -u "$path"`
9196 
9197   # Now try to locate executable using which
9198   new_path=`$WHICH "$new_path" 2> /dev/null`
9199   # bat and cmd files are not always considered executable in cygwin causing which
9200   # to not find them
9201   if test "x$new_path" = x \
9202            && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
9203            && test "x`$LS \"$path\" 2>/dev/null`" != x; then
9204     new_path=`$CYGPATH -u "$path"`
9205   fi
9206   if test "x$new_path" = x; then
9207     # Oops. Which didn't find the executable.
9208     # The splitting of arguments from the executable at a space might have been incorrect,
9209     # since paths with space are more likely in Windows. Give it another try with the whole
9210     # argument.
9211     path="$complete"
9212     arguments="EOL"
9213     new_path=`$CYGPATH -u "$path"`
9214     new_path=`$WHICH "$new_path" 2> /dev/null`
9215     # bat and cmd files are not always considered executable in cygwin causing which
9216     # to not find them
9217     if test "x$new_path" = x \
9218              && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
9219              && test "x`$LS \"$path\" 2>/dev/null`" != x; then
9220       new_path=`$CYGPATH -u "$path"`
9221     fi
9222     if test "x$new_path" = x; then
9223       # It's still not found. Now this is an unrecoverable error.
9224       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9225 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9226       has_space=`$ECHO "$complete" | $GREP " "`
9227       if test "x$has_space" != x; then
9228         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9229 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9230       fi
9231       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9232     fi
9233   fi
9234 
9235   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
9236   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
9237   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
9238   # "foo.exe" is OK but "foo" is an error.
9239   #
9240   # This test is therefore slightly more accurate than "test -f" to check for file precense.
9241   # It is also a way to make sure we got the proper file name for the real test later on.
9242   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
9243   if test "x$test_shortpath" = x; then
9244     # Short path failed, file does not exist as specified.
9245     # Try adding .exe or .cmd
9246     if test -f "${new_path}.exe"; then
9247        input_to_shortpath="${new_path}.exe"
9248     elif test -f "${new_path}.cmd"; then
9249        input_to_shortpath="${new_path}.cmd"
9250     else
9251       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
9252 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
9253       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
9254 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
9255       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9256     fi
9257   else
9258     input_to_shortpath="$new_path"
9259   fi
9260 
9261   # Call helper function which possibly converts this using DOS-style short mode.
9262   # If so, the updated path is stored in $new_path.
9263   new_path="$input_to_shortpath"
9264 
9265   input_path="$input_to_shortpath"
9266   # Check if we need to convert this using DOS-style short mode. If the path
9267   # contains just simple characters, use it. Otherwise (spaces, weird characters),
9268   # take no chances and rewrite it.
9269   # Note: m4 eats our [], so we need to use [ and ] instead.
9270   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
9271   if test "x$has_forbidden_chars" != x; then
9272     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9273     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
9274     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
9275     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
9276       # Going to short mode and back again did indeed matter. Since short mode is
9277       # case insensitive, let's make it lowercase to improve readability.
9278       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9279       # Now convert it back to Unix-stile (cygpath)
9280       input_path=`$CYGPATH -u "$shortmode_path"`
9281       new_path="$input_path"
9282     fi
9283   fi
9284 
9285   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
9286   if test "x$test_cygdrive_prefix" = x; then
9287     # As a simple fix, exclude /usr/bin since it's not a real path.
9288     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
9289       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
9290       # a path prefixed by /cygdrive for fixpath to work.
9291       new_path="$CYGWIN_ROOT_PATH$input_path"
9292     fi
9293   fi
9294 
9295   # remove trailing .exe if any
9296   new_path="${new_path/%.exe/}"
9297 
9298   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9299 
9300   # First separate the path from the arguments. This will split at the first
9301   # space.
9302   complete="$FOUND_MAKE"
9303   path="${complete%% *}"
9304   tmp="$complete EOL"
9305   arguments="${tmp#* }"
9306 
9307   # Input might be given as Windows format, start by converting to
9308   # unix format.
9309   new_path="$path"
9310 
9311   windows_path="$new_path"
9312   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9313     unix_path=`$CYGPATH -u "$windows_path"`
9314     new_path="$unix_path"
9315   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9316     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9317     new_path="$unix_path"
9318   fi
9319 
9320 
9321   # Now try to locate executable using which
9322   new_path=`$WHICH "$new_path" 2> /dev/null`
9323 
9324   if test "x$new_path" = x; then
9325     # Oops. Which didn't find the executable.
9326     # The splitting of arguments from the executable at a space might have been incorrect,
9327     # since paths with space are more likely in Windows. Give it another try with the whole
9328     # argument.
9329     path="$complete"
9330     arguments="EOL"
9331     new_path="$path"
9332 
9333   windows_path="$new_path"
9334   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9335     unix_path=`$CYGPATH -u "$windows_path"`
9336     new_path="$unix_path"
9337   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9338     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9339     new_path="$unix_path"
9340   fi
9341 
9342 
9343     new_path=`$WHICH "$new_path" 2> /dev/null`
9344 
9345     if test "x$new_path" = x; then
9346       # It's still not found. Now this is an unrecoverable error.
9347       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9348 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9349       has_space=`$ECHO "$complete" | $GREP " "`
9350       if test "x$has_space" != x; then
9351         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9352 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9353       fi
9354       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9355     fi
9356   fi
9357 
9358   # Now new_path has a complete unix path to the binary
9359   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
9360     # Keep paths in /bin as-is, but remove trailing .exe if any
9361     new_path="${new_path/%.exe/}"
9362     # Do not save /bin paths to all_fixpath_prefixes!
9363   else
9364     # Not in mixed or Windows style, start by that.
9365     new_path=`cmd //c echo $new_path`
9366 
9367   input_path="$new_path"
9368   # Check if we need to convert this using DOS-style short mode. If the path
9369   # contains just simple characters, use it. Otherwise (spaces, weird characters),
9370   # take no chances and rewrite it.
9371   # Note: m4 eats our [], so we need to use [ and ] instead.
9372   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
9373   if test "x$has_forbidden_chars" != x; then
9374     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9375     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9376   fi
9377 
9378     # Output is in $new_path
9379 
9380   windows_path="$new_path"
9381   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9382     unix_path=`$CYGPATH -u "$windows_path"`
9383     new_path="$unix_path"
9384   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9385     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9386     new_path="$unix_path"
9387   fi
9388 
9389     # remove trailing .exe if any
9390     new_path="${new_path/%.exe/}"
9391 
9392     # Save the first 10 bytes of this path to the storage, so fixpath can work.
9393     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
9394   fi
9395 
9396   else
9397     # We're on a posix platform. Hooray! :)
9398     # First separate the path from the arguments. This will split at the first
9399     # space.
9400     complete="$FOUND_MAKE"
9401     path="${complete%% *}"
9402     tmp="$complete EOL"
9403     arguments="${tmp#* }"
9404 
9405     # Cannot rely on the command "which" here since it doesn't always work.
9406     is_absolute_path=`$ECHO "$path" | $GREP ^/`
9407     if test -z "$is_absolute_path"; then
9408       # Path to executable is not absolute. Find it.
9409       IFS_save="$IFS"
9410       IFS=:
9411       for p in $PATH; do
9412         if test -f "$p/$path" && test -x "$p/$path"; then
9413           new_path="$p/$path"
9414           break
9415         fi
9416       done
9417       IFS="$IFS_save"
9418     else
9419       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
9420 $as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
9421       new_path="$path"
9422     fi
9423 
9424     if test "x$new_path" = x; then
9425         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9426 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9427         has_space=`$ECHO "$complete" | $GREP " "`
9428         if test "x$has_space" != x; then
9429           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
9430 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
9431         fi
9432         as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9433       fi
9434   fi
9435 
9436       # Now join together the path and the arguments once again
9437       if test "x$arguments" != xEOL; then
9438         new_complete="$new_path ${arguments% *}"
9439       else
9440         new_complete="$new_path"
9441       fi
9442 
9443   if test "x$complete" != "x$new_complete"; then
9444       FOUND_MAKE="$new_complete"
9445       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
9446 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
9447     fi
9448 
9449         fi
9450       fi
9451     fi
9452   fi
9453 
9454         if test "x$FOUND_MAKE" = x; then
9455           for ac_prog in make
9456 do
9457   # Extract the first word of "$ac_prog", so it can be a program name with args.
9458 set dummy $ac_prog; ac_word=$2
9459 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9460 $as_echo_n "checking for $ac_word... " >&6; }
9461 if test "${ac_cv_path_CHECK_TOOLSDIR_MAKE+set}" = set; then :
9462   $as_echo_n "(cached) " >&6
9463 else
9464   case $CHECK_TOOLSDIR_MAKE in
9465   [\\/]* | ?:[\\/]*)
9466   ac_cv_path_CHECK_TOOLSDIR_MAKE="$CHECK_TOOLSDIR_MAKE" # Let the user override the test with a path.
9467   ;;
9468   *)
9469   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9470 for as_dir in $PATH
9471 do
9472   IFS=$as_save_IFS
9473   test -z "$as_dir" && as_dir=.
9474     for ac_exec_ext in '' $ac_executable_extensions; do
9475   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9476     ac_cv_path_CHECK_TOOLSDIR_MAKE="$as_dir/$ac_word$ac_exec_ext"
9477     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9478     break 2
9479   fi
9480 done
9481   done
9482 IFS=$as_save_IFS
9483 
9484   ;;
9485 esac
9486 fi
9487 CHECK_TOOLSDIR_MAKE=$ac_cv_path_CHECK_TOOLSDIR_MAKE
9488 if test -n "$CHECK_TOOLSDIR_MAKE"; then
9489   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_MAKE" >&5
9490 $as_echo "$CHECK_TOOLSDIR_MAKE" >&6; }
9491 else
9492   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9493 $as_echo "no" >&6; }
9494 fi
9495 
9496 
9497   test -n "$CHECK_TOOLSDIR_MAKE" && break
9498 done
9499 
9500 
9501   MAKE_CANDIDATE=""$CHECK_TOOLSDIR_MAKE""
9502   DESCRIPTION="make in tools-dir"
9503   if test "x$MAKE_CANDIDATE" != x; then
9504     { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
9505 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
9506     MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
9507     IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
9508     if test "x$IS_GNU_MAKE" = x; then
9509       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
9510 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
9511     else
9512       IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'`
9513       if test "x$IS_MODERN_MAKE" = x; then
9514         { $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
9515 $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;}
9516       else
9517         if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
9518           if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9519             MAKE_EXPECTED_ENV='cygwin'
9520           elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9521             MAKE_EXPECTED_ENV='msys'
9522           else
9523             as_fn_error $? "Unknown Windows environment" "$LINENO" 5
9524           fi
9525           MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
9526           IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
9527         else
9528           # Not relevant for non-Windows
9529           IS_MAKE_CORRECT_ENV=true
9530         fi
9531         if test "x$IS_MAKE_CORRECT_ENV" = x; then
9532           { $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
9533 $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;}
9534         else
9535           FOUND_MAKE=$MAKE_CANDIDATE
9536 
9537   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9538 
9539   # First separate the path from the arguments. This will split at the first
9540   # space.
9541   complete="$FOUND_MAKE"
9542   path="${complete%% *}"
9543   tmp="$complete EOL"
9544   arguments="${tmp#* }"
9545 
9546   # Input might be given as Windows format, start by converting to
9547   # unix format.
9548   new_path=`$CYGPATH -u "$path"`
9549 
9550   # Now try to locate executable using which
9551   new_path=`$WHICH "$new_path" 2> /dev/null`
9552   # bat and cmd files are not always considered executable in cygwin causing which
9553   # to not find them
9554   if test "x$new_path" = x \
9555            && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
9556            && test "x`$LS \"$path\" 2>/dev/null`" != x; then
9557     new_path=`$CYGPATH -u "$path"`
9558   fi
9559   if test "x$new_path" = x; then
9560     # Oops. Which didn't find the executable.
9561     # The splitting of arguments from the executable at a space might have been incorrect,
9562     # since paths with space are more likely in Windows. Give it another try with the whole
9563     # argument.
9564     path="$complete"
9565     arguments="EOL"
9566     new_path=`$CYGPATH -u "$path"`
9567     new_path=`$WHICH "$new_path" 2> /dev/null`
9568     # bat and cmd files are not always considered executable in cygwin causing which
9569     # to not find them
9570     if test "x$new_path" = x \
9571              && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
9572              && test "x`$LS \"$path\" 2>/dev/null`" != x; then
9573       new_path=`$CYGPATH -u "$path"`
9574     fi
9575     if test "x$new_path" = x; then
9576       # It's still not found. Now this is an unrecoverable error.
9577       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9578 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9579       has_space=`$ECHO "$complete" | $GREP " "`
9580       if test "x$has_space" != x; then
9581         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9582 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9583       fi
9584       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9585     fi
9586   fi
9587 
9588   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
9589   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
9590   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
9591   # "foo.exe" is OK but "foo" is an error.
9592   #
9593   # This test is therefore slightly more accurate than "test -f" to check for file precense.
9594   # It is also a way to make sure we got the proper file name for the real test later on.
9595   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
9596   if test "x$test_shortpath" = x; then
9597     # Short path failed, file does not exist as specified.
9598     # Try adding .exe or .cmd
9599     if test -f "${new_path}.exe"; then
9600        input_to_shortpath="${new_path}.exe"
9601     elif test -f "${new_path}.cmd"; then
9602        input_to_shortpath="${new_path}.cmd"
9603     else
9604       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
9605 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
9606       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
9607 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
9608       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9609     fi
9610   else
9611     input_to_shortpath="$new_path"
9612   fi
9613 
9614   # Call helper function which possibly converts this using DOS-style short mode.
9615   # If so, the updated path is stored in $new_path.
9616   new_path="$input_to_shortpath"
9617 
9618   input_path="$input_to_shortpath"
9619   # Check if we need to convert this using DOS-style short mode. If the path
9620   # contains just simple characters, use it. Otherwise (spaces, weird characters),
9621   # take no chances and rewrite it.
9622   # Note: m4 eats our [], so we need to use [ and ] instead.
9623   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
9624   if test "x$has_forbidden_chars" != x; then
9625     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9626     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
9627     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
9628     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
9629       # Going to short mode and back again did indeed matter. Since short mode is
9630       # case insensitive, let's make it lowercase to improve readability.
9631       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9632       # Now convert it back to Unix-stile (cygpath)
9633       input_path=`$CYGPATH -u "$shortmode_path"`
9634       new_path="$input_path"
9635     fi
9636   fi
9637 
9638   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
9639   if test "x$test_cygdrive_prefix" = x; then
9640     # As a simple fix, exclude /usr/bin since it's not a real path.
9641     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
9642       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
9643       # a path prefixed by /cygdrive for fixpath to work.
9644       new_path="$CYGWIN_ROOT_PATH$input_path"
9645     fi
9646   fi
9647 
9648   # remove trailing .exe if any
9649   new_path="${new_path/%.exe/}"
9650 
9651   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9652 
9653   # First separate the path from the arguments. This will split at the first
9654   # space.
9655   complete="$FOUND_MAKE"
9656   path="${complete%% *}"
9657   tmp="$complete EOL"
9658   arguments="${tmp#* }"
9659 
9660   # Input might be given as Windows format, start by converting to
9661   # unix format.
9662   new_path="$path"
9663 
9664   windows_path="$new_path"
9665   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9666     unix_path=`$CYGPATH -u "$windows_path"`
9667     new_path="$unix_path"
9668   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9669     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9670     new_path="$unix_path"
9671   fi
9672 
9673 
9674   # Now try to locate executable using which
9675   new_path=`$WHICH "$new_path" 2> /dev/null`
9676 
9677   if test "x$new_path" = x; then
9678     # Oops. Which didn't find the executable.
9679     # The splitting of arguments from the executable at a space might have been incorrect,
9680     # since paths with space are more likely in Windows. Give it another try with the whole
9681     # argument.
9682     path="$complete"
9683     arguments="EOL"
9684     new_path="$path"
9685 
9686   windows_path="$new_path"
9687   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9688     unix_path=`$CYGPATH -u "$windows_path"`
9689     new_path="$unix_path"
9690   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9691     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9692     new_path="$unix_path"
9693   fi
9694 
9695 
9696     new_path=`$WHICH "$new_path" 2> /dev/null`
9697 
9698     if test "x$new_path" = x; then
9699       # It's still not found. Now this is an unrecoverable error.
9700       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9701 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9702       has_space=`$ECHO "$complete" | $GREP " "`
9703       if test "x$has_space" != x; then
9704         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9705 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9706       fi
9707       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9708     fi
9709   fi
9710 
9711   # Now new_path has a complete unix path to the binary
9712   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
9713     # Keep paths in /bin as-is, but remove trailing .exe if any
9714     new_path="${new_path/%.exe/}"
9715     # Do not save /bin paths to all_fixpath_prefixes!
9716   else
9717     # Not in mixed or Windows style, start by that.
9718     new_path=`cmd //c echo $new_path`
9719 
9720   input_path="$new_path"
9721   # Check if we need to convert this using DOS-style short mode. If the path
9722   # contains just simple characters, use it. Otherwise (spaces, weird characters),
9723   # take no chances and rewrite it.
9724   # Note: m4 eats our [], so we need to use [ and ] instead.
9725   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
9726   if test "x$has_forbidden_chars" != x; then
9727     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9728     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9729   fi
9730 
9731     # Output is in $new_path
9732 
9733   windows_path="$new_path"
9734   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9735     unix_path=`$CYGPATH -u "$windows_path"`
9736     new_path="$unix_path"
9737   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9738     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9739     new_path="$unix_path"
9740   fi
9741 
9742     # remove trailing .exe if any
9743     new_path="${new_path/%.exe/}"
9744 
9745     # Save the first 10 bytes of this path to the storage, so fixpath can work.
9746     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
9747   fi
9748 
9749   else
9750     # We're on a posix platform. Hooray! :)
9751     # First separate the path from the arguments. This will split at the first
9752     # space.
9753     complete="$FOUND_MAKE"
9754     path="${complete%% *}"
9755     tmp="$complete EOL"
9756     arguments="${tmp#* }"
9757 
9758     # Cannot rely on the command "which" here since it doesn't always work.
9759     is_absolute_path=`$ECHO "$path" | $GREP ^/`
9760     if test -z "$is_absolute_path"; then
9761       # Path to executable is not absolute. Find it.
9762       IFS_save="$IFS"
9763       IFS=:
9764       for p in $PATH; do
9765         if test -f "$p/$path" && test -x "$p/$path"; then
9766           new_path="$p/$path"
9767           break
9768         fi
9769       done
9770       IFS="$IFS_save"
9771     else
9772       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
9773 $as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
9774       new_path="$path"
9775     fi
9776 
9777     if test "x$new_path" = x; then
9778         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9779 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9780         has_space=`$ECHO "$complete" | $GREP " "`
9781         if test "x$has_space" != x; then
9782           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
9783 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
9784         fi
9785         as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9786       fi
9787   fi
9788 
9789       # Now join together the path and the arguments once again
9790       if test "x$arguments" != xEOL; then
9791         new_complete="$new_path ${arguments% *}"
9792       else
9793         new_complete="$new_path"
9794       fi
9795 
9796   if test "x$complete" != "x$new_complete"; then
9797       FOUND_MAKE="$new_complete"
9798       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
9799 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
9800     fi
9801 
9802         fi
9803       fi
9804     fi
9805   fi
9806 
9807         fi
9808         PATH=$OLD_PATH
9809       fi
9810     fi
9811 
9812     if test "x$FOUND_MAKE" = x; then
9813       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
9814     fi
9815   fi
9816 
9817   MAKE=$FOUND_MAKE
9818 
9819   { $as_echo "$as_me:${as_lineno-$LINENO}: Using GNU make 3.81 (or later) at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&5
9820 $as_echo "$as_me: Using GNU make 3.81 (or later) at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&6;}
9821 
9822 
9823 
9824     # Test if find supports -delete
9825     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if find supports -delete" >&5
9826 $as_echo_n "checking if find supports -delete... " >&6; }
9827     FIND_DELETE="-delete"
9828 
9829     DELETEDIR=`$MKTEMP -d tmp.XXXXXXXXXX` || (echo Could not create temporary directory!; exit $?)
9830 
9831     echo Hejsan > $DELETEDIR/TestIfFindSupportsDelete
9832 
9833     TEST_DELETE=`$FIND "$DELETEDIR" -name TestIfFindSupportsDelete $FIND_DELETE 2>&1`
9834     if test -f $DELETEDIR/TestIfFindSupportsDelete; then
9835         # No, it does not.
9836         rm $DELETEDIR/TestIfFindSupportsDelete
9837         FIND_DELETE="-exec rm \{\} \+"
9838         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9839 $as_echo "no" >&6; }
9840     else
9841         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9842 $as_echo "yes" >&6; }
9843     fi
9844     rmdir $DELETEDIR
9845 
9846 
9847 
9848 # These tools might not be installed by default,
9849 # need hint on how to install them.
9850 
9851     for ac_prog in unzip
9852 do
9853   # Extract the first word of "$ac_prog", so it can be a program name with args.
9854 set dummy $ac_prog; ac_word=$2
9855 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9856 $as_echo_n "checking for $ac_word... " >&6; }
9857 if test "${ac_cv_path_UNZIP+set}" = set; then :
9858   $as_echo_n "(cached) " >&6
9859 else
9860   case $UNZIP in
9861   [\\/]* | ?:[\\/]*)
9862   ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
9863   ;;
9864   *)
9865   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9866 for as_dir in $PATH
9867 do
9868   IFS=$as_save_IFS
9869   test -z "$as_dir" && as_dir=.
9870     for ac_exec_ext in '' $ac_executable_extensions; do
9871   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9872     ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
9873     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9874     break 2
9875   fi
9876 done
9877   done
9878 IFS=$as_save_IFS
9879 
9880   ;;
9881 esac
9882 fi
9883 UNZIP=$ac_cv_path_UNZIP
9884 if test -n "$UNZIP"; then
9885   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
9886 $as_echo "$UNZIP" >&6; }
9887 else
9888   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9889 $as_echo "no" >&6; }
9890 fi
9891 
9892 
9893   test -n "$UNZIP" && break
9894 done
9895 
9896 
9897     if test "x$UNZIP" = x; then
9898         if test "xunzip" = x; then
9899           PROG_NAME=unzip
9900         else
9901           PROG_NAME=unzip
9902         fi
9903         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
9904 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
9905         as_fn_error $? "Cannot continue" "$LINENO" 5
9906     fi
9907 
9908 
9909 
9910     for ac_prog in zip
9911 do
9912   # Extract the first word of "$ac_prog", so it can be a program name with args.
9913 set dummy $ac_prog; ac_word=$2
9914 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9915 $as_echo_n "checking for $ac_word... " >&6; }
9916 if test "${ac_cv_path_ZIP+set}" = set; then :
9917   $as_echo_n "(cached) " >&6
9918 else
9919   case $ZIP in
9920   [\\/]* | ?:[\\/]*)
9921   ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
9922   ;;
9923   *)
9924   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9925 for as_dir in $PATH
9926 do
9927   IFS=$as_save_IFS
9928   test -z "$as_dir" && as_dir=.
9929     for ac_exec_ext in '' $ac_executable_extensions; do
9930   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9931     ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
9932     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9933     break 2
9934   fi
9935 done
9936   done
9937 IFS=$as_save_IFS
9938 
9939   ;;
9940 esac
9941 fi
9942 ZIP=$ac_cv_path_ZIP
9943 if test -n "$ZIP"; then
9944   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
9945 $as_echo "$ZIP" >&6; }
9946 else
9947   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9948 $as_echo "no" >&6; }
9949 fi
9950 
9951 
9952   test -n "$ZIP" && break
9953 done
9954 
9955 
9956     if test "x$ZIP" = x; then
9957         if test "xzip" = x; then
9958           PROG_NAME=zip
9959         else
9960           PROG_NAME=zip
9961         fi
9962         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
9963 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
9964         as_fn_error $? "Cannot continue" "$LINENO" 5
9965     fi
9966 
9967 
9968 
9969 # Non-required basic tools
9970 
9971 # Extract the first word of "ldd", so it can be a program name with args.
9972 set dummy ldd; ac_word=$2
9973 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9974 $as_echo_n "checking for $ac_word... " >&6; }
9975 if test "${ac_cv_path_LDD+set}" = set; then :
9976   $as_echo_n "(cached) " >&6
9977 else
9978   case $LDD in
9979   [\\/]* | ?:[\\/]*)
9980   ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
9981   ;;
9982   *)
9983   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9984 for as_dir in $PATH
9985 do
9986   IFS=$as_save_IFS
9987   test -z "$as_dir" && as_dir=.
9988     for ac_exec_ext in '' $ac_executable_extensions; do
9989   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9990     ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
9991     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9992     break 2
9993   fi
9994 done
9995   done
9996 IFS=$as_save_IFS
9997 
9998   ;;
9999 esac
10000 fi
10001 LDD=$ac_cv_path_LDD
10002 if test -n "$LDD"; then
10003   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
10004 $as_echo "$LDD" >&6; }
10005 else
10006   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10007 $as_echo "no" >&6; }
10008 fi
10009 
10010 
10011 if test "x$LDD" = "x"; then
10012     # List shared lib dependencies is used for
10013     # debug output and checking for forbidden dependencies.
10014     # We can build without it.
10015     LDD="true"
10016 fi
10017 # Extract the first word of "otool", so it can be a program name with args.
10018 set dummy otool; ac_word=$2
10019 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10020 $as_echo_n "checking for $ac_word... " >&6; }
10021 if test "${ac_cv_path_OTOOL+set}" = set; then :
10022   $as_echo_n "(cached) " >&6
10023 else
10024   case $OTOOL in
10025   [\\/]* | ?:[\\/]*)
10026   ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
10027   ;;
10028   *)
10029   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10030 for as_dir in $PATH
10031 do
10032   IFS=$as_save_IFS
10033   test -z "$as_dir" && as_dir=.
10034     for ac_exec_ext in '' $ac_executable_extensions; do
10035   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10036     ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
10037     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10038     break 2
10039   fi
10040 done
10041   done
10042 IFS=$as_save_IFS
10043 
10044   ;;
10045 esac
10046 fi
10047 OTOOL=$ac_cv_path_OTOOL
10048 if test -n "$OTOOL"; then
10049   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
10050 $as_echo "$OTOOL" >&6; }
10051 else
10052   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10053 $as_echo "no" >&6; }
10054 fi
10055 
10056 
10057 if test "x$OTOOL" = "x"; then
10058    OTOOL="true"
10059 fi
10060 for ac_prog in readelf greadelf
10061 do
10062   # Extract the first word of "$ac_prog", so it can be a program name with args.
10063 set dummy $ac_prog; ac_word=$2
10064 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10065 $as_echo_n "checking for $ac_word... " >&6; }
10066 if test "${ac_cv_path_READELF+set}" = set; then :
10067   $as_echo_n "(cached) " >&6
10068 else
10069   case $READELF in
10070   [\\/]* | ?:[\\/]*)
10071   ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
10072   ;;
10073   *)
10074   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10075 for as_dir in $PATH
10076 do
10077   IFS=$as_save_IFS
10078   test -z "$as_dir" && as_dir=.
10079     for ac_exec_ext in '' $ac_executable_extensions; do
10080   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10081     ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
10082     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10083     break 2
10084   fi
10085 done
10086   done
10087 IFS=$as_save_IFS
10088 
10089   ;;
10090 esac
10091 fi
10092 READELF=$ac_cv_path_READELF
10093 if test -n "$READELF"; then
10094   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
10095 $as_echo "$READELF" >&6; }
10096 else
10097   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10098 $as_echo "no" >&6; }
10099 fi
10100 
10101 
10102   test -n "$READELF" && break
10103 done
10104 
10105 # Extract the first word of "hg", so it can be a program name with args.
10106 set dummy hg; ac_word=$2
10107 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10108 $as_echo_n "checking for $ac_word... " >&6; }
10109 if test "${ac_cv_path_HG+set}" = set; then :
10110   $as_echo_n "(cached) " >&6
10111 else
10112   case $HG in
10113   [\\/]* | ?:[\\/]*)
10114   ac_cv_path_HG="$HG" # Let the user override the test with a path.
10115   ;;
10116   *)
10117   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10118 for as_dir in $PATH
10119 do
10120   IFS=$as_save_IFS
10121   test -z "$as_dir" && as_dir=.
10122     for ac_exec_ext in '' $ac_executable_extensions; do
10123   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10124     ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
10125     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10126     break 2
10127   fi
10128 done
10129   done
10130 IFS=$as_save_IFS
10131 
10132   ;;
10133 esac
10134 fi
10135 HG=$ac_cv_path_HG
10136 if test -n "$HG"; then
10137   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
10138 $as_echo "$HG" >&6; }
10139 else
10140   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10141 $as_echo "no" >&6; }
10142 fi
10143 
10144 
10145 # Extract the first word of "stat", so it can be a program name with args.
10146 set dummy stat; ac_word=$2
10147 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10148 $as_echo_n "checking for $ac_word... " >&6; }
10149 if test "${ac_cv_path_STAT+set}" = set; then :
10150   $as_echo_n "(cached) " >&6
10151 else
10152   case $STAT in
10153   [\\/]* | ?:[\\/]*)
10154   ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
10155   ;;
10156   *)
10157   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10158 for as_dir in $PATH
10159 do
10160   IFS=$as_save_IFS
10161   test -z "$as_dir" && as_dir=.
10162     for ac_exec_ext in '' $ac_executable_extensions; do
10163   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10164     ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
10165     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10166     break 2
10167   fi
10168 done
10169   done
10170 IFS=$as_save_IFS
10171 
10172   ;;
10173 esac
10174 fi
10175 STAT=$ac_cv_path_STAT
10176 if test -n "$STAT"; then
10177   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
10178 $as_echo "$STAT" >&6; }
10179 else
10180   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10181 $as_echo "no" >&6; }
10182 fi
10183 
10184 
10185 # Extract the first word of "time", so it can be a program name with args.
10186 set dummy time; ac_word=$2
10187 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10188 $as_echo_n "checking for $ac_word... " >&6; }
10189 if test "${ac_cv_path_TIME+set}" = set; then :
10190   $as_echo_n "(cached) " >&6
10191 else
10192   case $TIME in
10193   [\\/]* | ?:[\\/]*)
10194   ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
10195   ;;
10196   *)
10197   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10198 for as_dir in $PATH
10199 do
10200   IFS=$as_save_IFS
10201   test -z "$as_dir" && as_dir=.
10202     for ac_exec_ext in '' $ac_executable_extensions; do
10203   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10204     ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
10205     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10206     break 2
10207   fi
10208 done
10209   done
10210 IFS=$as_save_IFS
10211 
10212   ;;
10213 esac
10214 fi
10215 TIME=$ac_cv_path_TIME
10216 if test -n "$TIME"; then
10217   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
10218 $as_echo "$TIME" >&6; }
10219 else
10220   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10221 $as_echo "no" >&6; }
10222 fi
10223 
10224 
10225 
10226 if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
10227 
10228     for ac_prog in comm
10229 do
10230   # Extract the first word of "$ac_prog", so it can be a program name with args.
10231 set dummy $ac_prog; ac_word=$2
10232 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10233 $as_echo_n "checking for $ac_word... " >&6; }
10234 if test "${ac_cv_path_COMM+set}" = set; then :
10235   $as_echo_n "(cached) " >&6
10236 else
10237   case $COMM in
10238   [\\/]* | ?:[\\/]*)
10239   ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
10240   ;;
10241   *)
10242   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10243 for as_dir in $PATH
10244 do
10245   IFS=$as_save_IFS
10246   test -z "$as_dir" && as_dir=.
10247     for ac_exec_ext in '' $ac_executable_extensions; do
10248   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10249     ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
10250     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10251     break 2
10252   fi
10253 done
10254   done
10255 IFS=$as_save_IFS
10256 
10257   ;;
10258 esac
10259 fi
10260 COMM=$ac_cv_path_COMM
10261 if test -n "$COMM"; then
10262   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
10263 $as_echo "$COMM" >&6; }
10264 else
10265   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10266 $as_echo "no" >&6; }
10267 fi
10268 
10269 
10270   test -n "$COMM" && break
10271 done
10272 
10273 
10274     if test "x$COMM" = x; then
10275         if test "xcomm" = x; then
10276           PROG_NAME=comm
10277         else
10278           PROG_NAME=comm
10279         fi
10280         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
10281 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
10282         as_fn_error $? "Cannot continue" "$LINENO" 5
10283     fi
10284 
10285 
10286 fi
10287 
10288 if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
10289 
10290     for ac_prog in xattr
10291 do
10292   # Extract the first word of "$ac_prog", so it can be a program name with args.
10293 set dummy $ac_prog; ac_word=$2
10294 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10295 $as_echo_n "checking for $ac_word... " >&6; }
10296 if test "${ac_cv_path_XATTR+set}" = set; then :
10297   $as_echo_n "(cached) " >&6
10298 else
10299   case $XATTR in
10300   [\\/]* | ?:[\\/]*)
10301   ac_cv_path_XATTR="$XATTR" # 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10311     ac_cv_path_XATTR="$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 XATTR=$ac_cv_path_XATTR
10323 if test -n "$XATTR"; then
10324   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
10325 $as_echo "$XATTR" >&6; }
10326 else
10327   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10328 $as_echo "no" >&6; }
10329 fi
10330 
10331 
10332   test -n "$XATTR" && break
10333 done
10334 
10335 
10336     if test "x$XATTR" = x; then
10337         if test "xxattr" = x; then
10338           PROG_NAME=xattr
10339         else
10340           PROG_NAME=xattr
10341         fi
10342         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
10343 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
10344         as_fn_error $? "Cannot continue" "$LINENO" 5
10345     fi
10346 
10347 
10348   # Extract the first word of "codesign", so it can be a program name with args.
10349 set dummy codesign; ac_word=$2
10350 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10351 $as_echo_n "checking for $ac_word... " >&6; }
10352 if test "${ac_cv_path_CODESIGN+set}" = set; then :
10353   $as_echo_n "(cached) " >&6
10354 else
10355   case $CODESIGN in
10356   [\\/]* | ?:[\\/]*)
10357   ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
10358   ;;
10359   *)
10360   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10361 for as_dir in $PATH
10362 do
10363   IFS=$as_save_IFS
10364   test -z "$as_dir" && as_dir=.
10365     for ac_exec_ext in '' $ac_executable_extensions; do
10366   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10367     ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
10368     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10369     break 2
10370   fi
10371 done
10372   done
10373 IFS=$as_save_IFS
10374 
10375   ;;
10376 esac
10377 fi
10378 CODESIGN=$ac_cv_path_CODESIGN
10379 if test -n "$CODESIGN"; then
10380   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
10381 $as_echo "$CODESIGN" >&6; }
10382 else
10383   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10384 $as_echo "no" >&6; }
10385 fi
10386 
10387 
10388   if test "x$CODESIGN" != "x"; then
10389     # Verify that the openjdk_codesign certificate is present
10390     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if openjdk_codesign certificate is present" >&5
10391 $as_echo_n "checking if openjdk_codesign certificate is present... " >&6; }
10392     rm -f codesign-testfile
10393     touch codesign-testfile
10394     codesign -s openjdk_codesign codesign-testfile 2>&5 >&5 || CODESIGN=
10395     rm -f codesign-testfile
10396     if test "x$CODESIGN" = x; then
10397       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10398 $as_echo "no" >&6; }
10399     else
10400       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10401 $as_echo "yes" >&6; }
10402     fi
10403   fi
10404 fi
10405 
10406 
10407 # Check if pkg-config is available.
10408 
10409 
10410 if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
10411         if test -n "$ac_tool_prefix"; then
10412   # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
10413 set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
10414 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10415 $as_echo_n "checking for $ac_word... " >&6; }
10416 if test "${ac_cv_path_PKG_CONFIG+set}" = set; then :
10417   $as_echo_n "(cached) " >&6
10418 else
10419   case $PKG_CONFIG in
10420   [\\/]* | ?:[\\/]*)
10421   ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
10422   ;;
10423   *)
10424   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10425 for as_dir in $PATH
10426 do
10427   IFS=$as_save_IFS
10428   test -z "$as_dir" && as_dir=.
10429     for ac_exec_ext in '' $ac_executable_extensions; do
10430   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10431     ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
10432     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10433     break 2
10434   fi
10435 done
10436   done
10437 IFS=$as_save_IFS
10438 
10439   ;;
10440 esac
10441 fi
10442 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
10443 if test -n "$PKG_CONFIG"; then
10444   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
10445 $as_echo "$PKG_CONFIG" >&6; }
10446 else
10447   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10448 $as_echo "no" >&6; }
10449 fi
10450 
10451 
10452 fi
10453 if test -z "$ac_cv_path_PKG_CONFIG"; then
10454   ac_pt_PKG_CONFIG=$PKG_CONFIG
10455   # Extract the first word of "pkg-config", so it can be a program name with args.
10456 set dummy pkg-config; ac_word=$2
10457 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10458 $as_echo_n "checking for $ac_word... " >&6; }
10459 if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then :
10460   $as_echo_n "(cached) " >&6
10461 else
10462   case $ac_pt_PKG_CONFIG in
10463   [\\/]* | ?:[\\/]*)
10464   ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
10465   ;;
10466   *)
10467   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10468 for as_dir in $PATH
10469 do
10470   IFS=$as_save_IFS
10471   test -z "$as_dir" && as_dir=.
10472     for ac_exec_ext in '' $ac_executable_extensions; do
10473   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10474     ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
10475     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10476     break 2
10477   fi
10478 done
10479   done
10480 IFS=$as_save_IFS
10481 
10482   ;;
10483 esac
10484 fi
10485 ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
10486 if test -n "$ac_pt_PKG_CONFIG"; then
10487   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
10488 $as_echo "$ac_pt_PKG_CONFIG" >&6; }
10489 else
10490   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10491 $as_echo "no" >&6; }
10492 fi
10493 
10494   if test "x$ac_pt_PKG_CONFIG" = x; then
10495     PKG_CONFIG=""
10496   else
10497     case $cross_compiling:$ac_tool_warned in
10498 yes:)
10499 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
10500 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
10501 ac_tool_warned=yes ;;
10502 esac
10503     PKG_CONFIG=$ac_pt_PKG_CONFIG
10504   fi
10505 else
10506   PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
10507 fi
10508 
10509 fi
10510 if test -n "$PKG_CONFIG"; then
10511         _pkg_min_version=0.9.0
10512         { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
10513 $as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
10514         if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
10515                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10516 $as_echo "yes" >&6; }
10517         else
10518                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10519 $as_echo "no" >&6; }
10520                 PKG_CONFIG=""
10521         fi
10522 
10523 fi
10524 
10525 # After basic tools have been setup, we can check build os specific details.
10526 
10527 ###############################################################################
10528 
10529 # Note that this is the build platform OS version!
10530 
10531 OS_VERSION="`uname -r | ${SED} 's!\.! !g' | ${SED} 's!-! !g'`"
10532 OS_VERSION_MAJOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 1 -d ' '`"
10533 OS_VERSION_MINOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 2 -d ' '`"
10534 OS_VERSION_MICRO="`${ECHO} ${OS_VERSION} | ${CUT} -f 3 -d ' '`"
10535 
10536 
10537 
10538 
10539 
10540 # Setup builddeps, for automatic downloading of tools we need.
10541 # This is needed before we can call BDEPS_CHECK_MODULE, which is done in
10542 # boot-jdk setup, but we need to have basic tools setup first.
10543 
10544 
10545 # Check whether --with-builddeps-conf was given.
10546 if test "${with_builddeps_conf+set}" = set; then :
10547   withval=$with_builddeps_conf;
10548 fi
10549 
10550 
10551 
10552 # Check whether --with-builddeps-server was given.
10553 if test "${with_builddeps_server+set}" = set; then :
10554   withval=$with_builddeps_server;
10555 fi
10556 
10557 
10558 
10559 # Check whether --with-builddeps-dir was given.
10560 if test "${with_builddeps_dir+set}" = set; then :
10561   withval=$with_builddeps_dir;
10562 else
10563   with_builddeps_dir=/localhome/builddeps
10564 fi
10565 
10566 
10567 
10568 # Check whether --with-builddeps-group was given.
10569 if test "${with_builddeps_group+set}" = set; then :
10570   withval=$with_builddeps_group;
10571 fi
10572 
10573 
10574 
10575 
10576     if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
10577         if test "x$with_builddeps_conf" != x; then
10578             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for supplied builddeps configuration file" >&5
10579 $as_echo_n "checking for supplied builddeps configuration file... " >&6; }
10580             builddepsfile=$with_builddeps_conf
10581             if test -s $builddepsfile; then
10582                 . $builddepsfile
10583                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: loaded!" >&5
10584 $as_echo "loaded!" >&6; }
10585             else
10586                as_fn_error $? "The given builddeps conf file $with_builddeps_conf could not be loaded!" "$LINENO" 5
10587            fi
10588         else
10589             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builddeps.conf files in sources..." >&5
10590 $as_echo_n "checking for builddeps.conf files in sources...... " >&6; }
10591             builddepsfile=`mktemp`
10592             touch $builddepsfile
10593             # Put all found confs into a single file.
10594             find ${SRC_ROOT} -name builddeps.conf -exec cat \{\} \; >> $builddepsfile
10595             # Source the file to acquire the variables
10596             if test -s $builddepsfile; then
10597                 . $builddepsfile
10598                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: found at least one!" >&5
10599 $as_echo "found at least one!" >&6; }
10600             else
10601                as_fn_error $? "Could not find any builddeps.conf at all!" "$LINENO" 5
10602            fi
10603         fi
10604         # Create build and target names that use _ instead of "-" and ".".
10605         # This is necessary to use them in variable names.
10606         build_var=`echo ${OPENJDK_BUILD_AUTOCONF_NAME} | tr '-' '_' | tr '.' '_'`
10607         target_var=`echo ${OPENJDK_TARGET_AUTOCONF_NAME} | tr '-' '_' | tr '.' '_'`
10608         # Extract rewrite information for build and target
10609         eval rewritten_build=\${REWRITE_${build_var}}
10610         if test "x$rewritten_build" = x; then
10611             rewritten_build=${OPENJDK_BUILD_AUTOCONF_NAME}
10612             echo Build stays the same $rewritten_build
10613         else
10614             echo Rewriting build for builddeps into $rewritten_build
10615         fi
10616         eval rewritten_target=\${REWRITE_${target_var}}
10617         if test "x$rewritten_target" = x; then
10618             rewritten_target=${OPENJDK_TARGET_AUTOCONF_NAME}
10619             echo Target stays the same $rewritten_target
10620         else
10621             echo Rewriting target for builddeps into $rewritten_target
10622         fi
10623         rewritten_build_var=`echo ${rewritten_build} | tr '-' '_' | tr '.' '_'`
10624         rewritten_target_var=`echo ${rewritten_target} | tr '-' '_' | tr '.' '_'`
10625     fi
10626     for ac_prog in 7z unzip
10627 do
10628   # Extract the first word of "$ac_prog", so it can be a program name with args.
10629 set dummy $ac_prog; ac_word=$2
10630 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10631 $as_echo_n "checking for $ac_word... " >&6; }
10632 if test "${ac_cv_prog_BDEPS_UNZIP+set}" = set; then :
10633   $as_echo_n "(cached) " >&6
10634 else
10635   if test -n "$BDEPS_UNZIP"; then
10636   ac_cv_prog_BDEPS_UNZIP="$BDEPS_UNZIP" # Let the user override the test.
10637 else
10638 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10639 for as_dir in $PATH
10640 do
10641   IFS=$as_save_IFS
10642   test -z "$as_dir" && as_dir=.
10643     for ac_exec_ext in '' $ac_executable_extensions; do
10644   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10645     ac_cv_prog_BDEPS_UNZIP="$ac_prog"
10646     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10647     break 2
10648   fi
10649 done
10650   done
10651 IFS=$as_save_IFS
10652 
10653 fi
10654 fi
10655 BDEPS_UNZIP=$ac_cv_prog_BDEPS_UNZIP
10656 if test -n "$BDEPS_UNZIP"; then
10657   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BDEPS_UNZIP" >&5
10658 $as_echo "$BDEPS_UNZIP" >&6; }
10659 else
10660   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10661 $as_echo "no" >&6; }
10662 fi
10663 
10664 
10665   test -n "$BDEPS_UNZIP" && break
10666 done
10667 
10668     if test "x$BDEPS_UNZIP" = x7z; then
10669         BDEPS_UNZIP="7z x"
10670     fi
10671 
10672     for ac_prog in wget lftp ftp
10673 do
10674   # Extract the first word of "$ac_prog", so it can be a program name with args.
10675 set dummy $ac_prog; ac_word=$2
10676 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10677 $as_echo_n "checking for $ac_word... " >&6; }
10678 if test "${ac_cv_prog_BDEPS_FTP+set}" = set; then :
10679   $as_echo_n "(cached) " >&6
10680 else
10681   if test -n "$BDEPS_FTP"; then
10682   ac_cv_prog_BDEPS_FTP="$BDEPS_FTP" # Let the user override the test.
10683 else
10684 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10685 for as_dir in $PATH
10686 do
10687   IFS=$as_save_IFS
10688   test -z "$as_dir" && as_dir=.
10689     for ac_exec_ext in '' $ac_executable_extensions; do
10690   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10691     ac_cv_prog_BDEPS_FTP="$ac_prog"
10692     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10693     break 2
10694   fi
10695 done
10696   done
10697 IFS=$as_save_IFS
10698 
10699 fi
10700 fi
10701 BDEPS_FTP=$ac_cv_prog_BDEPS_FTP
10702 if test -n "$BDEPS_FTP"; then
10703   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BDEPS_FTP" >&5
10704 $as_echo "$BDEPS_FTP" >&6; }
10705 else
10706   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10707 $as_echo "no" >&6; }
10708 fi
10709 
10710 
10711   test -n "$BDEPS_FTP" && break
10712 done
10713 
10714 
10715 
10716 ###############################################################################
10717 #
10718 # Determine OpenJDK variants, options and version numbers.
10719 #
10720 ###############################################################################
10721 
10722 # We need build & target for this.
10723 
10724 
10725 ###############################################################################
10726 #
10727 # Should we build a JDK/JVM with headful support (ie a graphical ui)?
10728 # We always build headless support.
10729 #
10730 { $as_echo "$as_me:${as_lineno-$LINENO}: checking headful support" >&5
10731 $as_echo_n "checking headful support... " >&6; }
10732 # Check whether --enable-headful was given.
10733 if test "${enable_headful+set}" = set; then :
10734   enableval=$enable_headful; SUPPORT_HEADFUL=${enable_headful}
10735 else
10736   SUPPORT_HEADFUL=yes
10737 fi
10738 
10739 
10740 SUPPORT_HEADLESS=yes
10741 BUILD_HEADLESS="BUILD_HEADLESS:=true"
10742 
10743 if test "x$SUPPORT_HEADFUL" = xyes; then
10744     # We are building both headful and headless.
10745     headful_msg="inlude support for both headful and headless"
10746 fi
10747 
10748 if test "x$SUPPORT_HEADFUL" = xno; then
10749     # Thus we are building headless only.
10750     BUILD_HEADLESS="BUILD_HEADLESS:=true"
10751     headful_msg="headless only"
10752 fi
10753 
10754 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $headful_msg" >&5
10755 $as_echo "$headful_msg" >&6; }
10756 
10757 
10758 
10759 
10760 
10761 # Control wether Hotspot runs Queens test after build.
10762 # Check whether --enable-hotspot-test-in-build was given.
10763 if test "${enable_hotspot_test_in_build+set}" = set; then :
10764   enableval=$enable_hotspot_test_in_build;
10765 else
10766   enable_hotspot_test_in_build=no
10767 fi
10768 
10769 if test "x$enable_hotspot_test_in_build" = "xyes"; then
10770     TEST_IN_BUILD=true
10771 else
10772     TEST_IN_BUILD=false
10773 fi
10774 
10775 
10776 ###############################################################################
10777 #
10778 # Choose cacerts source file
10779 #
10780 
10781 # Check whether --with-cacerts-file was given.
10782 if test "${with_cacerts_file+set}" = set; then :
10783   withval=$with_cacerts_file;
10784 fi
10785 
10786 if test "x$with_cacerts_file" != x; then
10787     CACERTS_FILE=$with_cacerts_file
10788 else
10789     CACERTS_FILE=${SRC_ROOT}/jdk/src/share/lib/security/cacerts
10790 fi
10791 
10792 
10793 ###############################################################################
10794 #
10795 # Enable or disable unlimited crypto
10796 #
10797 # Check whether --enable-unlimited-crypto was given.
10798 if test "${enable_unlimited_crypto+set}" = set; then :
10799   enableval=$enable_unlimited_crypto;
10800 else
10801   enable_unlimited_crypto=no
10802 fi
10803 
10804 if test "x$enable_unlimited_crypto" = "xyes"; then
10805     UNLIMITED_CRYPTO=true
10806 else
10807     UNLIMITED_CRYPTO=false
10808 fi
10809 
10810 
10811 ###############################################################################
10812 #
10813 # Enable or disable the elliptic curve crypto implementation
10814 #
10815 
10816 
10817 ###############################################################################
10818 #
10819 # Compress jars
10820 #
10821 COMPRESS_JARS=false
10822 
10823 
10824 
10825 
10826 # Source the version numbers
10827 . $AUTOCONF_DIR/version-numbers
10828 
10829 # Get the settings from parameters
10830 
10831 # Check whether --with-milestone was given.
10832 if test "${with_milestone+set}" = set; then :
10833   withval=$with_milestone;
10834 fi
10835 
10836 if test "x$with_milestone" = xyes; then
10837   as_fn_error $? "Milestone must have a value" "$LINENO" 5
10838 elif test "x$with_milestone" != x; then
10839     MILESTONE="$with_milestone"
10840 fi
10841 if test "x$MILESTONE" = x; then
10842   MILESTONE=internal
10843 fi
10844 
10845 
10846 # Check whether --with-update-version was given.
10847 if test "${with_update_version+set}" = set; then :
10848   withval=$with_update_version;
10849 fi
10850 
10851 if test "x$with_update_version" = xyes; then
10852   as_fn_error $? "Update version must have a value" "$LINENO" 5
10853 elif test "x$with_update_version" != x; then
10854   JDK_UPDATE_VERSION="$with_update_version"
10855 fi
10856 
10857 
10858 # Check whether --with-build-number was given.
10859 if test "${with_build_number+set}" = set; then :
10860   withval=$with_build_number;
10861 fi
10862 
10863 if test "x$with_build_number" = xyes; then
10864   as_fn_error $? "Build number must have a value" "$LINENO" 5
10865 elif test "x$with_build_number" != x; then
10866   JDK_BUILD_NUMBER="$with_build_number"
10867 fi
10868 if test "x$JDK_BUILD_NUMBER" = x; then
10869   JDK_BUILD_NUMBER=b00
10870 fi
10871 
10872 
10873 # Check whether --with-user-release-suffix was given.
10874 if test "${with_user_release_suffix+set}" = set; then :
10875   withval=$with_user_release_suffix;
10876 fi
10877 
10878 if test "x$with_user_release_suffix" = xyes; then
10879   as_fn_error $? "Release suffix must have a value" "$LINENO" 5
10880 elif test "x$with_user_release_suffix" != x; then
10881   USER_RELEASE_SUFFIX="$with_user_release_suffix"
10882 else
10883   BUILD_DATE=`date '+%Y_%m_%d_%H_%M'`
10884   # Avoid [:alnum:] since it depends on the locale.
10885   CLEAN_USERNAME=`echo "$USER" | $TR -d -c 'abcdefghijklmnopqrstuvqxyz0123456789'`
10886   USER_RELEASE_SUFFIX=`echo "${CLEAN_USERNAME}_${BUILD_DATE}" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
10887 fi
10888 
10889 
10890 # Now set the JDK version, milestone, build number etc.
10891 
10892 
10893 
10894 
10895 
10896 
10897 
10898 
10899 
10900 
10901 
10902 
10903 
10904 
10905 COPYRIGHT_YEAR=`date +'%Y'`
10906 
10907 
10908 if test "x$JDK_UPDATE_VERSION" != x; then
10909   JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}_${JDK_UPDATE_VERSION}"
10910 else
10911   JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}"
10912 fi
10913 
10914 
10915 COOKED_BUILD_NUMBER=`$ECHO $JDK_BUILD_NUMBER | $SED -e 's/^b//' -e 's/^0//'`
10916 
10917 
10918 
10919 ###############################################################################
10920 #
10921 # Setup BootJDK, used to bootstrap the build.
10922 #
10923 ###############################################################################
10924 
10925 
10926 BOOT_JDK_FOUND=no
10927 
10928 # Check whether --with-boot-jdk was given.
10929 if test "${with_boot_jdk+set}" = set; then :
10930   withval=$with_boot_jdk;
10931 fi
10932 
10933 
10934 # We look for the Boot JDK through various means, going from more certain to
10935 # more of a guess-work. After each test, BOOT_JDK_FOUND is set to "yes" if
10936 # we detected something (if so, the path to the jdk is in BOOT_JDK). But we
10937 # must check if this is indeed valid; otherwise we'll continue looking.
10938 
10939 # Test: Is bootjdk explicitely set by command line arguments?
10940 
10941   if test "x$BOOT_JDK_FOUND" = xno; then
10942     # Now execute the test
10943 
10944 if test "x$with_boot_jdk" != x; then
10945     BOOT_JDK=$with_boot_jdk
10946     BOOT_JDK_FOUND=maybe
10947     { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using configure arguments" >&5
10948 $as_echo "$as_me: Found potential Boot JDK using configure arguments" >&6;}
10949 fi
10950 
10951 
10952     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
10953     if test "x$BOOT_JDK_FOUND" = xmaybe; then
10954       # Do we have a bin/java?
10955       if test ! -x "$BOOT_JDK/bin/java"; then
10956         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
10957 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
10958         BOOT_JDK_FOUND=no
10959       else
10960         # Do we have a bin/javac?
10961         if test ! -x "$BOOT_JDK/bin/javac"; then
10962           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
10963 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
10964           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
10965 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
10966           BOOT_JDK_FOUND=no
10967         else
10968           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
10969           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
10970             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
10971 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
10972             BOOT_JDK_FOUND=no
10973           else
10974             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
10975             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
10976 
10977             # Extra M4 quote needed to protect [] in grep expression.
10978             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
10979             if test "x$FOUND_VERSION_78" = x; then
10980               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
10981 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
10982               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
10983 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
10984               BOOT_JDK_FOUND=no
10985             else
10986               # We're done! :-)
10987               BOOT_JDK_FOUND=yes
10988 
10989   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
10990 
10991   # Input might be given as Windows format, start by converting to
10992   # unix format.
10993   path="$BOOT_JDK"
10994   new_path=`$CYGPATH -u "$path"`
10995 
10996   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
10997   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
10998   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
10999   # "foo.exe" is OK but "foo" is an error.
11000   #
11001   # This test is therefore slightly more accurate than "test -f" to check for file precense.
11002   # It is also a way to make sure we got the proper file name for the real test later on.
11003   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
11004   if test "x$test_shortpath" = x; then
11005     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11006 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11007     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
11008   fi
11009 
11010   # Call helper function which possibly converts this using DOS-style short mode.
11011   # If so, the updated path is stored in $new_path.
11012 
11013   input_path="$new_path"
11014   # Check if we need to convert this using DOS-style short mode. If the path
11015   # contains just simple characters, use it. Otherwise (spaces, weird characters),
11016   # take no chances and rewrite it.
11017   # Note: m4 eats our [], so we need to use [ and ] instead.
11018   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
11019   if test "x$has_forbidden_chars" != x; then
11020     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11021     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
11022     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
11023     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
11024       # Going to short mode and back again did indeed matter. Since short mode is
11025       # case insensitive, let's make it lowercase to improve readability.
11026       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11027       # Now convert it back to Unix-stile (cygpath)
11028       input_path=`$CYGPATH -u "$shortmode_path"`
11029       new_path="$input_path"
11030     fi
11031   fi
11032 
11033   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
11034   if test "x$test_cygdrive_prefix" = x; then
11035     # As a simple fix, exclude /usr/bin since it's not a real path.
11036     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
11037       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
11038       # a path prefixed by /cygdrive for fixpath to work.
11039       new_path="$CYGWIN_ROOT_PATH$input_path"
11040     fi
11041   fi
11042 
11043 
11044   if test "x$path" != "x$new_path"; then
11045     BOOT_JDK="$new_path"
11046     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11047 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11048   fi
11049 
11050   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11051 
11052   path="$BOOT_JDK"
11053   has_colon=`$ECHO $path | $GREP ^.:`
11054   new_path="$path"
11055   if test "x$has_colon" = x; then
11056     # Not in mixed or Windows style, start by that.
11057     new_path=`cmd //c echo $path`
11058   fi
11059 
11060 
11061   input_path="$new_path"
11062   # Check if we need to convert this using DOS-style short mode. If the path
11063   # contains just simple characters, use it. Otherwise (spaces, weird characters),
11064   # take no chances and rewrite it.
11065   # Note: m4 eats our [], so we need to use [ and ] instead.
11066   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
11067   if test "x$has_forbidden_chars" != x; then
11068     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11069     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11070   fi
11071 
11072 
11073   windows_path="$new_path"
11074   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11075     unix_path=`$CYGPATH -u "$windows_path"`
11076     new_path="$unix_path"
11077   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11078     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11079     new_path="$unix_path"
11080   fi
11081 
11082   if test "x$path" != "x$new_path"; then
11083     BOOT_JDK="$new_path"
11084     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11085 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11086   fi
11087 
11088   # Save the first 10 bytes of this path to the storage, so fixpath can work.
11089   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
11090 
11091   else
11092     # We're on a posix platform. Hooray! :)
11093     path="$BOOT_JDK"
11094     has_space=`$ECHO "$path" | $GREP " "`
11095     if test "x$has_space" != x; then
11096       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11097 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11098       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
11099     fi
11100 
11101     # Use eval to expand a potential ~
11102     eval path="$path"
11103     if test ! -f "$path" && test ! -d "$path"; then
11104       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
11105     fi
11106 
11107     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
11108   fi
11109 
11110               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
11111 $as_echo_n "checking for Boot JDK... " >&6; }
11112               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
11113 $as_echo "$BOOT_JDK" >&6; }
11114               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
11115 $as_echo_n "checking Boot JDK version... " >&6; }
11116               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
11117               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
11118 $as_echo "$BOOT_JDK_VERSION" >&6; }
11119             fi # end check jdk version
11120           fi # end check rt.jar
11121         fi # end check javac
11122       fi # end check java
11123     fi # end check boot jdk found
11124   fi
11125 
11126 if test "x$with_boot_jdk" != x && test "x$BOOT_JDK_FOUND" = xno; then
11127   # Having specified an argument which is incorrect will produce an instant failure;
11128   # we should not go on looking
11129   as_fn_error $? "The path given by --with-boot-jdk does not contain a valid Boot JDK" "$LINENO" 5
11130 fi
11131 
11132 # Test: Is bootjdk available from builddeps?
11133 
11134   if test "x$BOOT_JDK_FOUND" = xno; then
11135     # Now execute the test
11136 
11137 
11138 
11139     if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
11140         # Source the builddeps file again, to make sure it uses the latest variables!
11141         . $builddepsfile
11142         # Look for a target and build machine specific resource!
11143         eval resource=\${builddep_bootjdk_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
11144         if test "x$resource" = x; then
11145             # Ok, lets instead look for a target specific resource
11146             eval resource=\${builddep_bootjdk_TARGET_${rewritten_target_var}}
11147         fi
11148         if test "x$resource" = x; then
11149             # Ok, lets instead look for a build specific resource
11150             eval resource=\${builddep_bootjdk_BUILD_${rewritten_build_var}}
11151         fi
11152         if test "x$resource" = x; then
11153             # Ok, lets instead look for a generic resource
11154             # (The bootjdk comes from M4 and not the shell, thus no need for eval here.)
11155             resource=${builddep_bootjdk}
11156         fi
11157         if test "x$resource" != x; then
11158             { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for bootjdk" >&5
11159 $as_echo "$as_me: Using builddeps $resource for bootjdk" >&6;}
11160             # If the resource in the builddeps.conf file is an existing directory,
11161             # for example /java/linux/cups
11162             if test -d ${resource}; then
11163                depdir=${resource}
11164             else
11165 
11166 # bootjdk is for example mymodule
11167 # $resource is for example libs/general/libmymod_1_2_3.zip
11168 # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
11169 # $with_builddeps_dir is for example /localhome/builddeps
11170 # depdir is the name of the variable into which we store the depdir, eg MYMOD
11171 # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
11172 # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
11173     filename=`basename $resource`
11174     filebase=`echo $filename | sed 's/\.[^\.]*$//'`
11175     filebase=${filename%%.*}
11176     extension=${filename#*.}
11177     installdir=$with_builddeps_dir/$filebase
11178     if test ! -f $installdir/$filename.unpacked; then
11179         { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency bootjdk from $with_builddeps_server/$resource and installing into $installdir" >&5
11180 $as_echo "$as_me: Downloading build dependency bootjdk from $with_builddeps_server/$resource and installing into $installdir" >&6;}
11181         if test ! -d $installdir; then
11182             mkdir -p $installdir
11183         fi
11184         if test ! -d $installdir; then
11185             as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
11186         fi
11187         tmpfile=`mktemp $installdir/bootjdk.XXXXXXXXX`
11188         touch $tmpfile
11189         if test ! -f $tmpfile; then
11190             as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
11191         fi
11192 
11193     # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
11194     # $tmpfile is the local file name for the downloaded file.
11195     VALID_TOOL=no
11196     if test "x$BDEPS_FTP" = xwget; then
11197        VALID_TOOL=yes
11198        wget -O $tmpfile $with_builddeps_server/$resource
11199     fi
11200     if test "x$BDEPS_FTP" = xlftp; then
11201        VALID_TOOL=yes
11202        lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
11203     fi
11204     if test "x$BDEPS_FTP" = xftp; then
11205         VALID_TOOL=yes
11206         FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
11207         FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
11208         FTPUSERPWD=${FTPSERVER%%@*}
11209         if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
11210             FTPUSER=${userpwd%%:*}
11211             FTPPWD=${userpwd#*@}
11212             FTPSERVER=${FTPSERVER#*@}
11213         else
11214             FTPUSER=ftp
11215             FTPPWD=ftp
11216         fi
11217         # the "pass" command does not work on some
11218         # ftp clients (read ftp.exe) but if it works,
11219         # passive mode is better!
11220         (\
11221             echo "user $FTPUSER $FTPPWD"        ;\
11222             echo "pass"                         ;\
11223             echo "bin"                          ;\
11224             echo "get $FTPPATH $tmpfile"              ;\
11225         ) | ftp -in $FTPSERVER
11226     fi
11227     if test "x$VALID_TOOL" != xyes; then
11228        as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
11229     fi
11230 
11231         mv $tmpfile $installdir/$filename
11232         if test ! -s $installdir/$filename; then
11233             as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
11234         fi
11235         case "$extension" in
11236             zip)  echo "Unzipping $installdir/$filename..."
11237                (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
11238             ;;
11239             tar.gz) echo "Untaring $installdir/$filename..."
11240                (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
11241             ;;
11242             tgz) echo "Untaring $installdir/$filename..."
11243                (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
11244             ;;
11245             *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
11246             ;;
11247         esac
11248     fi
11249     if test -f $installdir/$filename.unpacked; then
11250         depdir=$installdir
11251     fi
11252 
11253             fi
11254             # Source the builddeps file again, because in the previous command, the depdir
11255             # was updated to point at the current build dependency install directory.
11256             . $builddepsfile
11257             # Now extract variables from the builddeps.conf files.
11258             theroot=${builddep_bootjdk_ROOT}
11259             thecflags=${builddep_bootjdk_CFLAGS}
11260             thelibs=${builddep_bootjdk_LIBS}
11261             if test "x$depdir" = x; then
11262                 as_fn_error $? "Could not download build dependency bootjdk" "$LINENO" 5
11263             fi
11264             BOOT_JDK=$depdir
11265             if test "x$theroot" != x; then
11266                BOOT_JDK="$theroot"
11267             fi
11268             if test "x$thecflags" != x; then
11269                BOOT_JDK_CFLAGS="$thecflags"
11270             fi
11271             if test "x$thelibs" != x; then
11272                BOOT_JDK_LIBS="$thelibs"
11273             fi
11274             BOOT_JDK_FOUND=maybe
11275             else BOOT_JDK_FOUND=no
11276 
11277         fi
11278         else BOOT_JDK_FOUND=no
11279 
11280     fi
11281 
11282 
11283 
11284     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
11285     if test "x$BOOT_JDK_FOUND" = xmaybe; then
11286       # Do we have a bin/java?
11287       if test ! -x "$BOOT_JDK/bin/java"; then
11288         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
11289 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
11290         BOOT_JDK_FOUND=no
11291       else
11292         # Do we have a bin/javac?
11293         if test ! -x "$BOOT_JDK/bin/javac"; then
11294           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
11295 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
11296           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
11297 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
11298           BOOT_JDK_FOUND=no
11299         else
11300           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
11301           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
11302             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
11303 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
11304             BOOT_JDK_FOUND=no
11305           else
11306             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
11307             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
11308 
11309             # Extra M4 quote needed to protect [] in grep expression.
11310             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
11311             if test "x$FOUND_VERSION_78" = x; then
11312               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
11313 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
11314               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
11315 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
11316               BOOT_JDK_FOUND=no
11317             else
11318               # We're done! :-)
11319               BOOT_JDK_FOUND=yes
11320 
11321   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11322 
11323   # Input might be given as Windows format, start by converting to
11324   # unix format.
11325   path="$BOOT_JDK"
11326   new_path=`$CYGPATH -u "$path"`
11327 
11328   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
11329   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
11330   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
11331   # "foo.exe" is OK but "foo" is an error.
11332   #
11333   # This test is therefore slightly more accurate than "test -f" to check for file precense.
11334   # It is also a way to make sure we got the proper file name for the real test later on.
11335   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
11336   if test "x$test_shortpath" = x; then
11337     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11338 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11339     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
11340   fi
11341 
11342   # Call helper function which possibly converts this using DOS-style short mode.
11343   # If so, the updated path is stored in $new_path.
11344 
11345   input_path="$new_path"
11346   # Check if we need to convert this using DOS-style short mode. If the path
11347   # contains just simple characters, use it. Otherwise (spaces, weird characters),
11348   # take no chances and rewrite it.
11349   # Note: m4 eats our [], so we need to use [ and ] instead.
11350   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
11351   if test "x$has_forbidden_chars" != x; then
11352     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11353     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
11354     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
11355     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
11356       # Going to short mode and back again did indeed matter. Since short mode is
11357       # case insensitive, let's make it lowercase to improve readability.
11358       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11359       # Now convert it back to Unix-stile (cygpath)
11360       input_path=`$CYGPATH -u "$shortmode_path"`
11361       new_path="$input_path"
11362     fi
11363   fi
11364 
11365   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
11366   if test "x$test_cygdrive_prefix" = x; then
11367     # As a simple fix, exclude /usr/bin since it's not a real path.
11368     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
11369       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
11370       # a path prefixed by /cygdrive for fixpath to work.
11371       new_path="$CYGWIN_ROOT_PATH$input_path"
11372     fi
11373   fi
11374 
11375 
11376   if test "x$path" != "x$new_path"; then
11377     BOOT_JDK="$new_path"
11378     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11379 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11380   fi
11381 
11382   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11383 
11384   path="$BOOT_JDK"
11385   has_colon=`$ECHO $path | $GREP ^.:`
11386   new_path="$path"
11387   if test "x$has_colon" = x; then
11388     # Not in mixed or Windows style, start by that.
11389     new_path=`cmd //c echo $path`
11390   fi
11391 
11392 
11393   input_path="$new_path"
11394   # Check if we need to convert this using DOS-style short mode. If the path
11395   # contains just simple characters, use it. Otherwise (spaces, weird characters),
11396   # take no chances and rewrite it.
11397   # Note: m4 eats our [], so we need to use [ and ] instead.
11398   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
11399   if test "x$has_forbidden_chars" != x; then
11400     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11401     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11402   fi
11403 
11404 
11405   windows_path="$new_path"
11406   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11407     unix_path=`$CYGPATH -u "$windows_path"`
11408     new_path="$unix_path"
11409   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11410     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11411     new_path="$unix_path"
11412   fi
11413 
11414   if test "x$path" != "x$new_path"; then
11415     BOOT_JDK="$new_path"
11416     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11417 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11418   fi
11419 
11420   # Save the first 10 bytes of this path to the storage, so fixpath can work.
11421   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
11422 
11423   else
11424     # We're on a posix platform. Hooray! :)
11425     path="$BOOT_JDK"
11426     has_space=`$ECHO "$path" | $GREP " "`
11427     if test "x$has_space" != x; then
11428       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11429 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11430       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
11431     fi
11432 
11433     # Use eval to expand a potential ~
11434     eval path="$path"
11435     if test ! -f "$path" && test ! -d "$path"; then
11436       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
11437     fi
11438 
11439     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
11440   fi
11441 
11442               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
11443 $as_echo_n "checking for Boot JDK... " >&6; }
11444               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
11445 $as_echo "$BOOT_JDK" >&6; }
11446               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
11447 $as_echo_n "checking Boot JDK version... " >&6; }
11448               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
11449               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
11450 $as_echo "$BOOT_JDK_VERSION" >&6; }
11451             fi # end check jdk version
11452           fi # end check rt.jar
11453         fi # end check javac
11454       fi # end check java
11455     fi # end check boot jdk found
11456   fi
11457 
11458 
11459 # Test: Is $JAVA_HOME set?
11460 
11461   if test "x$BOOT_JDK_FOUND" = xno; then
11462     # Now execute the test
11463 
11464     if test "x$JAVA_HOME" != x; then
11465         JAVA_HOME_PROCESSED="$JAVA_HOME"
11466 
11467   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11468 
11469   # Input might be given as Windows format, start by converting to
11470   # unix format.
11471   path="$JAVA_HOME_PROCESSED"
11472   new_path=`$CYGPATH -u "$path"`
11473 
11474   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
11475   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
11476   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
11477   # "foo.exe" is OK but "foo" is an error.
11478   #
11479   # This test is therefore slightly more accurate than "test -f" to check for file precense.
11480   # It is also a way to make sure we got the proper file name for the real test later on.
11481   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
11482   if test "x$test_shortpath" = x; then
11483     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
11484 $as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
11485     as_fn_error $? "Cannot locate the the path of JAVA_HOME_PROCESSED" "$LINENO" 5
11486   fi
11487 
11488   # Call helper function which possibly converts this using DOS-style short mode.
11489   # If so, the updated path is stored in $new_path.
11490 
11491   input_path="$new_path"
11492   # Check if we need to convert this using DOS-style short mode. If the path
11493   # contains just simple characters, use it. Otherwise (spaces, weird characters),
11494   # take no chances and rewrite it.
11495   # Note: m4 eats our [], so we need to use [ and ] instead.
11496   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
11497   if test "x$has_forbidden_chars" != x; then
11498     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11499     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
11500     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
11501     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
11502       # Going to short mode and back again did indeed matter. Since short mode is
11503       # case insensitive, let's make it lowercase to improve readability.
11504       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11505       # Now convert it back to Unix-stile (cygpath)
11506       input_path=`$CYGPATH -u "$shortmode_path"`
11507       new_path="$input_path"
11508     fi
11509   fi
11510 
11511   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
11512   if test "x$test_cygdrive_prefix" = x; then
11513     # As a simple fix, exclude /usr/bin since it's not a real path.
11514     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
11515       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
11516       # a path prefixed by /cygdrive for fixpath to work.
11517       new_path="$CYGWIN_ROOT_PATH$input_path"
11518     fi
11519   fi
11520 
11521 
11522   if test "x$path" != "x$new_path"; then
11523     JAVA_HOME_PROCESSED="$new_path"
11524     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
11525 $as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
11526   fi
11527 
11528   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11529 
11530   path="$JAVA_HOME_PROCESSED"
11531   has_colon=`$ECHO $path | $GREP ^.:`
11532   new_path="$path"
11533   if test "x$has_colon" = x; then
11534     # Not in mixed or Windows style, start by that.
11535     new_path=`cmd //c echo $path`
11536   fi
11537 
11538 
11539   input_path="$new_path"
11540   # Check if we need to convert this using DOS-style short mode. If the path
11541   # contains just simple characters, use it. Otherwise (spaces, weird characters),
11542   # take no chances and rewrite it.
11543   # Note: m4 eats our [], so we need to use [ and ] instead.
11544   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
11545   if test "x$has_forbidden_chars" != x; then
11546     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11547     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11548   fi
11549 
11550 
11551   windows_path="$new_path"
11552   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11553     unix_path=`$CYGPATH -u "$windows_path"`
11554     new_path="$unix_path"
11555   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11556     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11557     new_path="$unix_path"
11558   fi
11559 
11560   if test "x$path" != "x$new_path"; then
11561     JAVA_HOME_PROCESSED="$new_path"
11562     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
11563 $as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
11564   fi
11565 
11566   # Save the first 10 bytes of this path to the storage, so fixpath can work.
11567   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
11568 
11569   else
11570     # We're on a posix platform. Hooray! :)
11571     path="$JAVA_HOME_PROCESSED"
11572     has_space=`$ECHO "$path" | $GREP " "`
11573     if test "x$has_space" != x; then
11574       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
11575 $as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
11576       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
11577     fi
11578 
11579     # Use eval to expand a potential ~
11580     eval path="$path"
11581     if test ! -f "$path" && test ! -d "$path"; then
11582       as_fn_error $? "The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is not found." "$LINENO" 5
11583     fi
11584 
11585     JAVA_HOME_PROCESSED="`cd "$path"; $THEPWDCMD -L`"
11586   fi
11587 
11588         if test ! -d "$JAVA_HOME_PROCESSED"; then
11589             { $as_echo "$as_me:${as_lineno-$LINENO}: Your JAVA_HOME points to a non-existing directory!" >&5
11590 $as_echo "$as_me: Your JAVA_HOME points to a non-existing directory!" >&6;}
11591         else
11592           # Aha, the user has set a JAVA_HOME
11593           # let us use that as the Boot JDK.
11594           BOOT_JDK="$JAVA_HOME_PROCESSED"
11595           BOOT_JDK_FOUND=maybe
11596           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using JAVA_HOME" >&5
11597 $as_echo "$as_me: Found potential Boot JDK using JAVA_HOME" >&6;}
11598         fi
11599     fi
11600 
11601 
11602     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
11603     if test "x$BOOT_JDK_FOUND" = xmaybe; then
11604       # Do we have a bin/java?
11605       if test ! -x "$BOOT_JDK/bin/java"; then
11606         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
11607 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
11608         BOOT_JDK_FOUND=no
11609       else
11610         # Do we have a bin/javac?
11611         if test ! -x "$BOOT_JDK/bin/javac"; then
11612           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
11613 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
11614           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
11615 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
11616           BOOT_JDK_FOUND=no
11617         else
11618           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
11619           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
11620             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
11621 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
11622             BOOT_JDK_FOUND=no
11623           else
11624             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
11625             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
11626 
11627             # Extra M4 quote needed to protect [] in grep expression.
11628             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
11629             if test "x$FOUND_VERSION_78" = x; then
11630               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
11631 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
11632               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
11633 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
11634               BOOT_JDK_FOUND=no
11635             else
11636               # We're done! :-)
11637               BOOT_JDK_FOUND=yes
11638 
11639   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11640 
11641   # Input might be given as Windows format, start by converting to
11642   # unix format.
11643   path="$BOOT_JDK"
11644   new_path=`$CYGPATH -u "$path"`
11645 
11646   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
11647   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
11648   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
11649   # "foo.exe" is OK but "foo" is an error.
11650   #
11651   # This test is therefore slightly more accurate than "test -f" to check for file precense.
11652   # It is also a way to make sure we got the proper file name for the real test later on.
11653   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
11654   if test "x$test_shortpath" = x; then
11655     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11656 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11657     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
11658   fi
11659 
11660   # Call helper function which possibly converts this using DOS-style short mode.
11661   # If so, the updated path is stored in $new_path.
11662 
11663   input_path="$new_path"
11664   # Check if we need to convert this using DOS-style short mode. If the path
11665   # contains just simple characters, use it. Otherwise (spaces, weird characters),
11666   # take no chances and rewrite it.
11667   # Note: m4 eats our [], so we need to use [ and ] instead.
11668   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
11669   if test "x$has_forbidden_chars" != x; then
11670     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11671     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
11672     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
11673     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
11674       # Going to short mode and back again did indeed matter. Since short mode is
11675       # case insensitive, let's make it lowercase to improve readability.
11676       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11677       # Now convert it back to Unix-stile (cygpath)
11678       input_path=`$CYGPATH -u "$shortmode_path"`
11679       new_path="$input_path"
11680     fi
11681   fi
11682 
11683   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
11684   if test "x$test_cygdrive_prefix" = x; then
11685     # As a simple fix, exclude /usr/bin since it's not a real path.
11686     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
11687       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
11688       # a path prefixed by /cygdrive for fixpath to work.
11689       new_path="$CYGWIN_ROOT_PATH$input_path"
11690     fi
11691   fi
11692 
11693 
11694   if test "x$path" != "x$new_path"; then
11695     BOOT_JDK="$new_path"
11696     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11697 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11698   fi
11699 
11700   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11701 
11702   path="$BOOT_JDK"
11703   has_colon=`$ECHO $path | $GREP ^.:`
11704   new_path="$path"
11705   if test "x$has_colon" = x; then
11706     # Not in mixed or Windows style, start by that.
11707     new_path=`cmd //c echo $path`
11708   fi
11709 
11710 
11711   input_path="$new_path"
11712   # Check if we need to convert this using DOS-style short mode. If the path
11713   # contains just simple characters, use it. Otherwise (spaces, weird characters),
11714   # take no chances and rewrite it.
11715   # Note: m4 eats our [], so we need to use [ and ] instead.
11716   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
11717   if test "x$has_forbidden_chars" != x; then
11718     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11719     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11720   fi
11721 
11722 
11723   windows_path="$new_path"
11724   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11725     unix_path=`$CYGPATH -u "$windows_path"`
11726     new_path="$unix_path"
11727   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11728     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11729     new_path="$unix_path"
11730   fi
11731 
11732   if test "x$path" != "x$new_path"; then
11733     BOOT_JDK="$new_path"
11734     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11735 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11736   fi
11737 
11738   # Save the first 10 bytes of this path to the storage, so fixpath can work.
11739   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
11740 
11741   else
11742     # We're on a posix platform. Hooray! :)
11743     path="$BOOT_JDK"
11744     has_space=`$ECHO "$path" | $GREP " "`
11745     if test "x$has_space" != x; then
11746       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11747 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11748       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
11749     fi
11750 
11751     # Use eval to expand a potential ~
11752     eval path="$path"
11753     if test ! -f "$path" && test ! -d "$path"; then
11754       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
11755     fi
11756 
11757     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
11758   fi
11759 
11760               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
11761 $as_echo_n "checking for Boot JDK... " >&6; }
11762               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
11763 $as_echo "$BOOT_JDK" >&6; }
11764               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
11765 $as_echo_n "checking Boot JDK version... " >&6; }
11766               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
11767               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
11768 $as_echo "$BOOT_JDK_VERSION" >&6; }
11769             fi # end check jdk version
11770           fi # end check rt.jar
11771         fi # end check javac
11772       fi # end check java
11773     fi # end check boot jdk found
11774   fi
11775 
11776 
11777 # Test: Is there a /usr/libexec/java_home? (Typically on MacOSX)
11778 
11779   if test "x$BOOT_JDK_FOUND" = xno; then
11780     # Now execute the test
11781 
11782     if test -x /usr/libexec/java_home; then
11783         BOOT_JDK=`/usr/libexec/java_home`
11784         BOOT_JDK_FOUND=maybe
11785         { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home" >&5
11786 $as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home" >&6;}
11787     fi
11788 
11789 
11790     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
11791     if test "x$BOOT_JDK_FOUND" = xmaybe; then
11792       # Do we have a bin/java?
11793       if test ! -x "$BOOT_JDK/bin/java"; then
11794         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
11795 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
11796         BOOT_JDK_FOUND=no
11797       else
11798         # Do we have a bin/javac?
11799         if test ! -x "$BOOT_JDK/bin/javac"; then
11800           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
11801 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
11802           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
11803 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
11804           BOOT_JDK_FOUND=no
11805         else
11806           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
11807           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
11808             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
11809 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
11810             BOOT_JDK_FOUND=no
11811           else
11812             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
11813             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
11814 
11815             # Extra M4 quote needed to protect [] in grep expression.
11816             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
11817             if test "x$FOUND_VERSION_78" = x; then
11818               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
11819 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
11820               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
11821 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
11822               BOOT_JDK_FOUND=no
11823             else
11824               # We're done! :-)
11825               BOOT_JDK_FOUND=yes
11826 
11827   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11828 
11829   # Input might be given as Windows format, start by converting to
11830   # unix format.
11831   path="$BOOT_JDK"
11832   new_path=`$CYGPATH -u "$path"`
11833 
11834   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
11835   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
11836   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
11837   # "foo.exe" is OK but "foo" is an error.
11838   #
11839   # This test is therefore slightly more accurate than "test -f" to check for file precense.
11840   # It is also a way to make sure we got the proper file name for the real test later on.
11841   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
11842   if test "x$test_shortpath" = x; then
11843     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11844 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11845     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
11846   fi
11847 
11848   # Call helper function which possibly converts this using DOS-style short mode.
11849   # If so, the updated path is stored in $new_path.
11850 
11851   input_path="$new_path"
11852   # Check if we need to convert this using DOS-style short mode. If the path
11853   # contains just simple characters, use it. Otherwise (spaces, weird characters),
11854   # take no chances and rewrite it.
11855   # Note: m4 eats our [], so we need to use [ and ] instead.
11856   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
11857   if test "x$has_forbidden_chars" != x; then
11858     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11859     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
11860     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
11861     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
11862       # Going to short mode and back again did indeed matter. Since short mode is
11863       # case insensitive, let's make it lowercase to improve readability.
11864       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11865       # Now convert it back to Unix-stile (cygpath)
11866       input_path=`$CYGPATH -u "$shortmode_path"`
11867       new_path="$input_path"
11868     fi
11869   fi
11870 
11871   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
11872   if test "x$test_cygdrive_prefix" = x; then
11873     # As a simple fix, exclude /usr/bin since it's not a real path.
11874     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
11875       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
11876       # a path prefixed by /cygdrive for fixpath to work.
11877       new_path="$CYGWIN_ROOT_PATH$input_path"
11878     fi
11879   fi
11880 
11881 
11882   if test "x$path" != "x$new_path"; then
11883     BOOT_JDK="$new_path"
11884     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11885 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11886   fi
11887 
11888   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11889 
11890   path="$BOOT_JDK"
11891   has_colon=`$ECHO $path | $GREP ^.:`
11892   new_path="$path"
11893   if test "x$has_colon" = x; then
11894     # Not in mixed or Windows style, start by that.
11895     new_path=`cmd //c echo $path`
11896   fi
11897 
11898 
11899   input_path="$new_path"
11900   # Check if we need to convert this using DOS-style short mode. If the path
11901   # contains just simple characters, use it. Otherwise (spaces, weird characters),
11902   # take no chances and rewrite it.
11903   # Note: m4 eats our [], so we need to use [ and ] instead.
11904   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
11905   if test "x$has_forbidden_chars" != x; then
11906     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11907     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11908   fi
11909 
11910 
11911   windows_path="$new_path"
11912   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11913     unix_path=`$CYGPATH -u "$windows_path"`
11914     new_path="$unix_path"
11915   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11916     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11917     new_path="$unix_path"
11918   fi
11919 
11920   if test "x$path" != "x$new_path"; then
11921     BOOT_JDK="$new_path"
11922     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11923 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11924   fi
11925 
11926   # Save the first 10 bytes of this path to the storage, so fixpath can work.
11927   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
11928 
11929   else
11930     # We're on a posix platform. Hooray! :)
11931     path="$BOOT_JDK"
11932     has_space=`$ECHO "$path" | $GREP " "`
11933     if test "x$has_space" != x; then
11934       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11935 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11936       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
11937     fi
11938 
11939     # Use eval to expand a potential ~
11940     eval path="$path"
11941     if test ! -f "$path" && test ! -d "$path"; then
11942       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
11943     fi
11944 
11945     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
11946   fi
11947 
11948               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
11949 $as_echo_n "checking for Boot JDK... " >&6; }
11950               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
11951 $as_echo "$BOOT_JDK" >&6; }
11952               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
11953 $as_echo_n "checking Boot JDK version... " >&6; }
11954               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
11955               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
11956 $as_echo "$BOOT_JDK_VERSION" >&6; }
11957             fi # end check jdk version
11958           fi # end check rt.jar
11959         fi # end check javac
11960       fi # end check java
11961     fi # end check boot jdk found
11962   fi
11963 
11964 
11965 # Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
11966 
11967   if test "x$BOOT_JDK_FOUND" = xno; then
11968     # Now execute the test
11969 
11970     # Extract the first word of "javac", so it can be a program name with args.
11971 set dummy javac; ac_word=$2
11972 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11973 $as_echo_n "checking for $ac_word... " >&6; }
11974 if test "${ac_cv_path_JAVAC_CHECK+set}" = set; then :
11975   $as_echo_n "(cached) " >&6
11976 else
11977   case $JAVAC_CHECK in
11978   [\\/]* | ?:[\\/]*)
11979   ac_cv_path_JAVAC_CHECK="$JAVAC_CHECK" # Let the user override the test with a path.
11980   ;;
11981   *)
11982   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11983 for as_dir in $PATH
11984 do
11985   IFS=$as_save_IFS
11986   test -z "$as_dir" && as_dir=.
11987     for ac_exec_ext in '' $ac_executable_extensions; do
11988   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
11989     ac_cv_path_JAVAC_CHECK="$as_dir/$ac_word$ac_exec_ext"
11990     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11991     break 2
11992   fi
11993 done
11994   done
11995 IFS=$as_save_IFS
11996 
11997   ;;
11998 esac
11999 fi
12000 JAVAC_CHECK=$ac_cv_path_JAVAC_CHECK
12001 if test -n "$JAVAC_CHECK"; then
12002   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC_CHECK" >&5
12003 $as_echo "$JAVAC_CHECK" >&6; }
12004 else
12005   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12006 $as_echo "no" >&6; }
12007 fi
12008 
12009 
12010     # Extract the first word of "java", so it can be a program name with args.
12011 set dummy java; ac_word=$2
12012 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12013 $as_echo_n "checking for $ac_word... " >&6; }
12014 if test "${ac_cv_path_JAVA_CHECK+set}" = set; then :
12015   $as_echo_n "(cached) " >&6
12016 else
12017   case $JAVA_CHECK in
12018   [\\/]* | ?:[\\/]*)
12019   ac_cv_path_JAVA_CHECK="$JAVA_CHECK" # Let the user override the test with a path.
12020   ;;
12021   *)
12022   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12023 for as_dir in $PATH
12024 do
12025   IFS=$as_save_IFS
12026   test -z "$as_dir" && as_dir=.
12027     for ac_exec_ext in '' $ac_executable_extensions; do
12028   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
12029     ac_cv_path_JAVA_CHECK="$as_dir/$ac_word$ac_exec_ext"
12030     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12031     break 2
12032   fi
12033 done
12034   done
12035 IFS=$as_save_IFS
12036 
12037   ;;
12038 esac
12039 fi
12040 JAVA_CHECK=$ac_cv_path_JAVA_CHECK
12041 if test -n "$JAVA_CHECK"; then
12042   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA_CHECK" >&5
12043 $as_echo "$JAVA_CHECK" >&6; }
12044 else
12045   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12046 $as_echo "no" >&6; }
12047 fi
12048 
12049 
12050     BINARY="$JAVAC_CHECK"
12051     if test "x$JAVAC_CHECK" = x; then
12052         BINARY="$JAVA_CHECK"
12053     fi
12054     if test "x$BINARY" != x; then
12055         # So there is a java(c) binary, it might be part of a JDK.
12056         # Lets find the JDK/JRE directory by following symbolic links.
12057         # Linux/GNU systems often have links from /usr/bin/java to
12058         # /etc/alternatives/java to the real JDK binary.
12059 
12060     if test "x$OPENJDK_BUILD_OS" != xwindows; then
12061         # Follow a chain of symbolic links. Use readlink
12062         # where it exists, else fall back to horribly
12063         # complicated shell code.
12064         if test "x$READLINK_TESTED" != yes; then
12065             # On MacOSX there is a readlink tool with a different
12066             # purpose than the GNU readlink tool. Check the found readlink.
12067             ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
12068             if test "x$ISGNU" = x; then
12069                  # A readlink that we do not know how to use.
12070                  # Are there other non-GNU readlinks out there?
12071                  READLINK_TESTED=yes
12072                  READLINK=
12073             fi
12074         fi
12075 
12076         if test "x$READLINK" != x; then
12077             BINARY=`$READLINK -f $BINARY`
12078         else
12079             # Save the current directory for restoring afterwards
12080             STARTDIR=$PWD
12081             COUNTER=0
12082             sym_link_dir=`$DIRNAME $BINARY`
12083             sym_link_file=`$BASENAME $BINARY`
12084             cd $sym_link_dir
12085             # Use -P flag to resolve symlinks in directories.
12086             cd `$THEPWDCMD -P`
12087             sym_link_dir=`$THEPWDCMD -P`
12088             # Resolve file symlinks
12089             while test $COUNTER -lt 20; do
12090                 ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
12091                 if test "x$ISLINK" == x; then
12092                     # This is not a symbolic link! We are done!
12093                     break
12094                 fi
12095                 # Again resolve directory symlinks since the target of the just found
12096                 # link could be in a different directory
12097                 cd `$DIRNAME $ISLINK`
12098                 sym_link_dir=`$THEPWDCMD -P`
12099                 sym_link_file=`$BASENAME $ISLINK`
12100                 let COUNTER=COUNTER+1
12101             done
12102             cd $STARTDIR
12103             BINARY=$sym_link_dir/$sym_link_file
12104         fi
12105     fi
12106 
12107         BOOT_JDK=`dirname "$BINARY"`
12108         BOOT_JDK=`cd "$BOOT_JDK/.."; pwd`
12109         if test -x "$BOOT_JDK/bin/javac" && test -x "$BOOT_JDK/bin/java"; then
12110             # Looks like we found ourselves an JDK
12111             BOOT_JDK_FOUND=maybe
12112             { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using java(c) in PATH" >&5
12113 $as_echo "$as_me: Found potential Boot JDK using java(c) in PATH" >&6;}
12114         fi
12115     fi
12116 
12117 
12118     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12119     if test "x$BOOT_JDK_FOUND" = xmaybe; then
12120       # Do we have a bin/java?
12121       if test ! -x "$BOOT_JDK/bin/java"; then
12122         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12123 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12124         BOOT_JDK_FOUND=no
12125       else
12126         # Do we have a bin/javac?
12127         if test ! -x "$BOOT_JDK/bin/javac"; then
12128           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12129 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12130           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12131 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12132           BOOT_JDK_FOUND=no
12133         else
12134           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12135           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12136             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12137 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12138             BOOT_JDK_FOUND=no
12139           else
12140             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12141             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12142 
12143             # Extra M4 quote needed to protect [] in grep expression.
12144             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12145             if test "x$FOUND_VERSION_78" = x; then
12146               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12147 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12148               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12149 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12150               BOOT_JDK_FOUND=no
12151             else
12152               # We're done! :-)
12153               BOOT_JDK_FOUND=yes
12154 
12155   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12156 
12157   # Input might be given as Windows format, start by converting to
12158   # unix format.
12159   path="$BOOT_JDK"
12160   new_path=`$CYGPATH -u "$path"`
12161 
12162   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12163   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12164   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12165   # "foo.exe" is OK but "foo" is an error.
12166   #
12167   # This test is therefore slightly more accurate than "test -f" to check for file precense.
12168   # It is also a way to make sure we got the proper file name for the real test later on.
12169   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12170   if test "x$test_shortpath" = x; then
12171     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12172 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12173     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12174   fi
12175 
12176   # Call helper function which possibly converts this using DOS-style short mode.
12177   # If so, the updated path is stored in $new_path.
12178 
12179   input_path="$new_path"
12180   # Check if we need to convert this using DOS-style short mode. If the path
12181   # contains just simple characters, use it. Otherwise (spaces, weird characters),
12182   # take no chances and rewrite it.
12183   # Note: m4 eats our [], so we need to use [ and ] instead.
12184   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12185   if test "x$has_forbidden_chars" != x; then
12186     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12187     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12188     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12189     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12190       # Going to short mode and back again did indeed matter. Since short mode is
12191       # case insensitive, let's make it lowercase to improve readability.
12192       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12193       # Now convert it back to Unix-stile (cygpath)
12194       input_path=`$CYGPATH -u "$shortmode_path"`
12195       new_path="$input_path"
12196     fi
12197   fi
12198 
12199   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12200   if test "x$test_cygdrive_prefix" = x; then
12201     # As a simple fix, exclude /usr/bin since it's not a real path.
12202     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12203       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12204       # a path prefixed by /cygdrive for fixpath to work.
12205       new_path="$CYGWIN_ROOT_PATH$input_path"
12206     fi
12207   fi
12208 
12209 
12210   if test "x$path" != "x$new_path"; then
12211     BOOT_JDK="$new_path"
12212     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12213 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12214   fi
12215 
12216   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12217 
12218   path="$BOOT_JDK"
12219   has_colon=`$ECHO $path | $GREP ^.:`
12220   new_path="$path"
12221   if test "x$has_colon" = x; then
12222     # Not in mixed or Windows style, start by that.
12223     new_path=`cmd //c echo $path`
12224   fi
12225 
12226 
12227   input_path="$new_path"
12228   # Check if we need to convert this using DOS-style short mode. If the path
12229   # contains just simple characters, use it. Otherwise (spaces, weird characters),
12230   # take no chances and rewrite it.
12231   # Note: m4 eats our [], so we need to use [ and ] instead.
12232   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12233   if test "x$has_forbidden_chars" != x; then
12234     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12235     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12236   fi
12237 
12238 
12239   windows_path="$new_path"
12240   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12241     unix_path=`$CYGPATH -u "$windows_path"`
12242     new_path="$unix_path"
12243   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12244     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12245     new_path="$unix_path"
12246   fi
12247 
12248   if test "x$path" != "x$new_path"; then
12249     BOOT_JDK="$new_path"
12250     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12251 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12252   fi
12253 
12254   # Save the first 10 bytes of this path to the storage, so fixpath can work.
12255   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12256 
12257   else
12258     # We're on a posix platform. Hooray! :)
12259     path="$BOOT_JDK"
12260     has_space=`$ECHO "$path" | $GREP " "`
12261     if test "x$has_space" != x; then
12262       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12263 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12264       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
12265     fi
12266 
12267     # Use eval to expand a potential ~
12268     eval path="$path"
12269     if test ! -f "$path" && test ! -d "$path"; then
12270       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
12271     fi
12272 
12273     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
12274   fi
12275 
12276               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12277 $as_echo_n "checking for Boot JDK... " >&6; }
12278               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12279 $as_echo "$BOOT_JDK" >&6; }
12280               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12281 $as_echo_n "checking Boot JDK version... " >&6; }
12282               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12283               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12284 $as_echo "$BOOT_JDK_VERSION" >&6; }
12285             fi # end check jdk version
12286           fi # end check rt.jar
12287         fi # end check javac
12288       fi # end check java
12289     fi # end check boot jdk found
12290   fi
12291 
12292 
12293 # Test: Is there a JDK installed in default, well-known locations?
12294 
12295   if test "x$BOOT_JDK_FOUND" = xno; then
12296     # Now execute the test
12297 
12298   if test "x$OPENJDK_TARGET_OS" = xwindows; then
12299 
12300   if test "x$BOOT_JDK_FOUND" = xno; then
12301     # Now execute the test
12302 
12303   if test "x$ProgramW6432" != x; then
12304     VIRTUAL_DIR="$ProgramW6432/Java"
12305 
12306   windows_path="$VIRTUAL_DIR"
12307   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12308     unix_path=`$CYGPATH -u "$windows_path"`
12309     VIRTUAL_DIR="$unix_path"
12310   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12311     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12312     VIRTUAL_DIR="$unix_path"
12313   fi
12314 
12315 
12316   BOOT_JDK_PREFIX="$VIRTUAL_DIR"
12317   BOOT_JDK_SUFFIX=""
12318   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
12319   if test "x$ALL_JDKS_FOUND" != x; then
12320     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
12321 
12322   if test "x$BOOT_JDK_FOUND" = xno; then
12323     # Now execute the test
12324 
12325         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
12326         if test -d "$BOOT_JDK"; then
12327           BOOT_JDK_FOUND=maybe
12328           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
12329 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
12330         fi
12331 
12332 
12333     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12334     if test "x$BOOT_JDK_FOUND" = xmaybe; then
12335       # Do we have a bin/java?
12336       if test ! -x "$BOOT_JDK/bin/java"; then
12337         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12338 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12339         BOOT_JDK_FOUND=no
12340       else
12341         # Do we have a bin/javac?
12342         if test ! -x "$BOOT_JDK/bin/javac"; then
12343           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12344 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12345           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12346 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12347           BOOT_JDK_FOUND=no
12348         else
12349           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12350           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12351             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12352 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12353             BOOT_JDK_FOUND=no
12354           else
12355             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12356             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12357 
12358             # Extra M4 quote needed to protect [] in grep expression.
12359             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12360             if test "x$FOUND_VERSION_78" = x; then
12361               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12362 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12363               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12364 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12365               BOOT_JDK_FOUND=no
12366             else
12367               # We're done! :-)
12368               BOOT_JDK_FOUND=yes
12369 
12370   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12371 
12372   # Input might be given as Windows format, start by converting to
12373   # unix format.
12374   path="$BOOT_JDK"
12375   new_path=`$CYGPATH -u "$path"`
12376 
12377   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12378   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12379   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12380   # "foo.exe" is OK but "foo" is an error.
12381   #
12382   # This test is therefore slightly more accurate than "test -f" to check for file precense.
12383   # It is also a way to make sure we got the proper file name for the real test later on.
12384   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12385   if test "x$test_shortpath" = x; then
12386     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12387 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12388     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12389   fi
12390 
12391   # Call helper function which possibly converts this using DOS-style short mode.
12392   # If so, the updated path is stored in $new_path.
12393 
12394   input_path="$new_path"
12395   # Check if we need to convert this using DOS-style short mode. If the path
12396   # contains just simple characters, use it. Otherwise (spaces, weird characters),
12397   # take no chances and rewrite it.
12398   # Note: m4 eats our [], so we need to use [ and ] instead.
12399   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12400   if test "x$has_forbidden_chars" != x; then
12401     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12402     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12403     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12404     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12405       # Going to short mode and back again did indeed matter. Since short mode is
12406       # case insensitive, let's make it lowercase to improve readability.
12407       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12408       # Now convert it back to Unix-stile (cygpath)
12409       input_path=`$CYGPATH -u "$shortmode_path"`
12410       new_path="$input_path"
12411     fi
12412   fi
12413 
12414   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12415   if test "x$test_cygdrive_prefix" = x; then
12416     # As a simple fix, exclude /usr/bin since it's not a real path.
12417     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12418       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12419       # a path prefixed by /cygdrive for fixpath to work.
12420       new_path="$CYGWIN_ROOT_PATH$input_path"
12421     fi
12422   fi
12423 
12424 
12425   if test "x$path" != "x$new_path"; then
12426     BOOT_JDK="$new_path"
12427     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12428 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12429   fi
12430 
12431   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12432 
12433   path="$BOOT_JDK"
12434   has_colon=`$ECHO $path | $GREP ^.:`
12435   new_path="$path"
12436   if test "x$has_colon" = x; then
12437     # Not in mixed or Windows style, start by that.
12438     new_path=`cmd //c echo $path`
12439   fi
12440 
12441 
12442   input_path="$new_path"
12443   # Check if we need to convert this using DOS-style short mode. If the path
12444   # contains just simple characters, use it. Otherwise (spaces, weird characters),
12445   # take no chances and rewrite it.
12446   # Note: m4 eats our [], so we need to use [ and ] instead.
12447   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12448   if test "x$has_forbidden_chars" != x; then
12449     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12450     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12451   fi
12452 
12453 
12454   windows_path="$new_path"
12455   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12456     unix_path=`$CYGPATH -u "$windows_path"`
12457     new_path="$unix_path"
12458   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12459     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12460     new_path="$unix_path"
12461   fi
12462 
12463   if test "x$path" != "x$new_path"; then
12464     BOOT_JDK="$new_path"
12465     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12466 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12467   fi
12468 
12469   # Save the first 10 bytes of this path to the storage, so fixpath can work.
12470   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12471 
12472   else
12473     # We're on a posix platform. Hooray! :)
12474     path="$BOOT_JDK"
12475     has_space=`$ECHO "$path" | $GREP " "`
12476     if test "x$has_space" != x; then
12477       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12478 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12479       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
12480     fi
12481 
12482     # Use eval to expand a potential ~
12483     eval path="$path"
12484     if test ! -f "$path" && test ! -d "$path"; then
12485       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
12486     fi
12487 
12488     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
12489   fi
12490 
12491               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12492 $as_echo_n "checking for Boot JDK... " >&6; }
12493               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12494 $as_echo "$BOOT_JDK" >&6; }
12495               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12496 $as_echo_n "checking Boot JDK version... " >&6; }
12497               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12498               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12499 $as_echo "$BOOT_JDK_VERSION" >&6; }
12500             fi # end check jdk version
12501           fi # end check rt.jar
12502         fi # end check javac
12503       fi # end check java
12504     fi # end check boot jdk found
12505   fi
12506 
12507     done
12508   fi
12509 
12510   fi
12511 
12512 
12513     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12514     if test "x$BOOT_JDK_FOUND" = xmaybe; then
12515       # Do we have a bin/java?
12516       if test ! -x "$BOOT_JDK/bin/java"; then
12517         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12518 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12519         BOOT_JDK_FOUND=no
12520       else
12521         # Do we have a bin/javac?
12522         if test ! -x "$BOOT_JDK/bin/javac"; then
12523           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12524 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12525           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12526 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12527           BOOT_JDK_FOUND=no
12528         else
12529           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12530           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12531             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12532 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12533             BOOT_JDK_FOUND=no
12534           else
12535             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12536             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12537 
12538             # Extra M4 quote needed to protect [] in grep expression.
12539             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12540             if test "x$FOUND_VERSION_78" = x; then
12541               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12542 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12543               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12544 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12545               BOOT_JDK_FOUND=no
12546             else
12547               # We're done! :-)
12548               BOOT_JDK_FOUND=yes
12549 
12550   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12551 
12552   # Input might be given as Windows format, start by converting to
12553   # unix format.
12554   path="$BOOT_JDK"
12555   new_path=`$CYGPATH -u "$path"`
12556 
12557   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12558   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12559   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12560   # "foo.exe" is OK but "foo" is an error.
12561   #
12562   # This test is therefore slightly more accurate than "test -f" to check for file precense.
12563   # It is also a way to make sure we got the proper file name for the real test later on.
12564   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12565   if test "x$test_shortpath" = x; then
12566     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12567 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12568     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12569   fi
12570 
12571   # Call helper function which possibly converts this using DOS-style short mode.
12572   # If so, the updated path is stored in $new_path.
12573 
12574   input_path="$new_path"
12575   # Check if we need to convert this using DOS-style short mode. If the path
12576   # contains just simple characters, use it. Otherwise (spaces, weird characters),
12577   # take no chances and rewrite it.
12578   # Note: m4 eats our [], so we need to use [ and ] instead.
12579   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12580   if test "x$has_forbidden_chars" != x; then
12581     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12582     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12583     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12584     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12585       # Going to short mode and back again did indeed matter. Since short mode is
12586       # case insensitive, let's make it lowercase to improve readability.
12587       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12588       # Now convert it back to Unix-stile (cygpath)
12589       input_path=`$CYGPATH -u "$shortmode_path"`
12590       new_path="$input_path"
12591     fi
12592   fi
12593 
12594   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12595   if test "x$test_cygdrive_prefix" = x; then
12596     # As a simple fix, exclude /usr/bin since it's not a real path.
12597     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12598       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12599       # a path prefixed by /cygdrive for fixpath to work.
12600       new_path="$CYGWIN_ROOT_PATH$input_path"
12601     fi
12602   fi
12603 
12604 
12605   if test "x$path" != "x$new_path"; then
12606     BOOT_JDK="$new_path"
12607     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12608 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12609   fi
12610 
12611   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12612 
12613   path="$BOOT_JDK"
12614   has_colon=`$ECHO $path | $GREP ^.:`
12615   new_path="$path"
12616   if test "x$has_colon" = x; then
12617     # Not in mixed or Windows style, start by that.
12618     new_path=`cmd //c echo $path`
12619   fi
12620 
12621 
12622   input_path="$new_path"
12623   # Check if we need to convert this using DOS-style short mode. If the path
12624   # contains just simple characters, use it. Otherwise (spaces, weird characters),
12625   # take no chances and rewrite it.
12626   # Note: m4 eats our [], so we need to use [ and ] instead.
12627   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12628   if test "x$has_forbidden_chars" != x; then
12629     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12630     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12631   fi
12632 
12633 
12634   windows_path="$new_path"
12635   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12636     unix_path=`$CYGPATH -u "$windows_path"`
12637     new_path="$unix_path"
12638   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12639     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12640     new_path="$unix_path"
12641   fi
12642 
12643   if test "x$path" != "x$new_path"; then
12644     BOOT_JDK="$new_path"
12645     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12646 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12647   fi
12648 
12649   # Save the first 10 bytes of this path to the storage, so fixpath can work.
12650   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12651 
12652   else
12653     # We're on a posix platform. Hooray! :)
12654     path="$BOOT_JDK"
12655     has_space=`$ECHO "$path" | $GREP " "`
12656     if test "x$has_space" != x; then
12657       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12658 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12659       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
12660     fi
12661 
12662     # Use eval to expand a potential ~
12663     eval path="$path"
12664     if test ! -f "$path" && test ! -d "$path"; then
12665       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
12666     fi
12667 
12668     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
12669   fi
12670 
12671               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12672 $as_echo_n "checking for Boot JDK... " >&6; }
12673               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12674 $as_echo "$BOOT_JDK" >&6; }
12675               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12676 $as_echo_n "checking Boot JDK version... " >&6; }
12677               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12678               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12679 $as_echo "$BOOT_JDK_VERSION" >&6; }
12680             fi # end check jdk version
12681           fi # end check rt.jar
12682         fi # end check javac
12683       fi # end check java
12684     fi # end check boot jdk found
12685   fi
12686 
12687 
12688   if test "x$BOOT_JDK_FOUND" = xno; then
12689     # Now execute the test
12690 
12691   if test "x$PROGRAMW6432" != x; then
12692     VIRTUAL_DIR="$PROGRAMW6432/Java"
12693 
12694   windows_path="$VIRTUAL_DIR"
12695   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12696     unix_path=`$CYGPATH -u "$windows_path"`
12697     VIRTUAL_DIR="$unix_path"
12698   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12699     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12700     VIRTUAL_DIR="$unix_path"
12701   fi
12702 
12703 
12704   BOOT_JDK_PREFIX="$VIRTUAL_DIR"
12705   BOOT_JDK_SUFFIX=""
12706   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
12707   if test "x$ALL_JDKS_FOUND" != x; then
12708     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
12709 
12710   if test "x$BOOT_JDK_FOUND" = xno; then
12711     # Now execute the test
12712 
12713         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
12714         if test -d "$BOOT_JDK"; then
12715           BOOT_JDK_FOUND=maybe
12716           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
12717 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
12718         fi
12719 
12720 
12721     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12722     if test "x$BOOT_JDK_FOUND" = xmaybe; then
12723       # Do we have a bin/java?
12724       if test ! -x "$BOOT_JDK/bin/java"; then
12725         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12726 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12727         BOOT_JDK_FOUND=no
12728       else
12729         # Do we have a bin/javac?
12730         if test ! -x "$BOOT_JDK/bin/javac"; then
12731           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12732 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12733           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12734 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12735           BOOT_JDK_FOUND=no
12736         else
12737           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12738           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12739             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12740 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12741             BOOT_JDK_FOUND=no
12742           else
12743             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12744             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12745 
12746             # Extra M4 quote needed to protect [] in grep expression.
12747             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12748             if test "x$FOUND_VERSION_78" = x; then
12749               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12750 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12751               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12752 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12753               BOOT_JDK_FOUND=no
12754             else
12755               # We're done! :-)
12756               BOOT_JDK_FOUND=yes
12757 
12758   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12759 
12760   # Input might be given as Windows format, start by converting to
12761   # unix format.
12762   path="$BOOT_JDK"
12763   new_path=`$CYGPATH -u "$path"`
12764 
12765   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12766   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12767   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12768   # "foo.exe" is OK but "foo" is an error.
12769   #
12770   # This test is therefore slightly more accurate than "test -f" to check for file precense.
12771   # It is also a way to make sure we got the proper file name for the real test later on.
12772   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12773   if test "x$test_shortpath" = x; then
12774     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12775 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12776     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12777   fi
12778 
12779   # Call helper function which possibly converts this using DOS-style short mode.
12780   # If so, the updated path is stored in $new_path.
12781 
12782   input_path="$new_path"
12783   # Check if we need to convert this using DOS-style short mode. If the path
12784   # contains just simple characters, use it. Otherwise (spaces, weird characters),
12785   # take no chances and rewrite it.
12786   # Note: m4 eats our [], so we need to use [ and ] instead.
12787   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12788   if test "x$has_forbidden_chars" != x; then
12789     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12790     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12791     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12792     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12793       # Going to short mode and back again did indeed matter. Since short mode is
12794       # case insensitive, let's make it lowercase to improve readability.
12795       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12796       # Now convert it back to Unix-stile (cygpath)
12797       input_path=`$CYGPATH -u "$shortmode_path"`
12798       new_path="$input_path"
12799     fi
12800   fi
12801 
12802   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12803   if test "x$test_cygdrive_prefix" = x; then
12804     # As a simple fix, exclude /usr/bin since it's not a real path.
12805     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12806       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12807       # a path prefixed by /cygdrive for fixpath to work.
12808       new_path="$CYGWIN_ROOT_PATH$input_path"
12809     fi
12810   fi
12811 
12812 
12813   if test "x$path" != "x$new_path"; then
12814     BOOT_JDK="$new_path"
12815     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12816 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12817   fi
12818 
12819   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12820 
12821   path="$BOOT_JDK"
12822   has_colon=`$ECHO $path | $GREP ^.:`
12823   new_path="$path"
12824   if test "x$has_colon" = x; then
12825     # Not in mixed or Windows style, start by that.
12826     new_path=`cmd //c echo $path`
12827   fi
12828 
12829 
12830   input_path="$new_path"
12831   # Check if we need to convert this using DOS-style short mode. If the path
12832   # contains just simple characters, use it. Otherwise (spaces, weird characters),
12833   # take no chances and rewrite it.
12834   # Note: m4 eats our [], so we need to use [ and ] instead.
12835   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12836   if test "x$has_forbidden_chars" != x; then
12837     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12838     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12839   fi
12840 
12841 
12842   windows_path="$new_path"
12843   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12844     unix_path=`$CYGPATH -u "$windows_path"`
12845     new_path="$unix_path"
12846   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12847     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12848     new_path="$unix_path"
12849   fi
12850 
12851   if test "x$path" != "x$new_path"; then
12852     BOOT_JDK="$new_path"
12853     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12854 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12855   fi
12856 
12857   # Save the first 10 bytes of this path to the storage, so fixpath can work.
12858   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12859 
12860   else
12861     # We're on a posix platform. Hooray! :)
12862     path="$BOOT_JDK"
12863     has_space=`$ECHO "$path" | $GREP " "`
12864     if test "x$has_space" != x; then
12865       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12866 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12867       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
12868     fi
12869 
12870     # Use eval to expand a potential ~
12871     eval path="$path"
12872     if test ! -f "$path" && test ! -d "$path"; then
12873       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
12874     fi
12875 
12876     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
12877   fi
12878 
12879               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12880 $as_echo_n "checking for Boot JDK... " >&6; }
12881               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12882 $as_echo "$BOOT_JDK" >&6; }
12883               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12884 $as_echo_n "checking Boot JDK version... " >&6; }
12885               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12886               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12887 $as_echo "$BOOT_JDK_VERSION" >&6; }
12888             fi # end check jdk version
12889           fi # end check rt.jar
12890         fi # end check javac
12891       fi # end check java
12892     fi # end check boot jdk found
12893   fi
12894 
12895     done
12896   fi
12897 
12898   fi
12899 
12900 
12901     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12902     if test "x$BOOT_JDK_FOUND" = xmaybe; then
12903       # Do we have a bin/java?
12904       if test ! -x "$BOOT_JDK/bin/java"; then
12905         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12906 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12907         BOOT_JDK_FOUND=no
12908       else
12909         # Do we have a bin/javac?
12910         if test ! -x "$BOOT_JDK/bin/javac"; then
12911           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12912 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12913           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12914 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12915           BOOT_JDK_FOUND=no
12916         else
12917           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12918           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12919             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12920 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12921             BOOT_JDK_FOUND=no
12922           else
12923             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12924             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12925 
12926             # Extra M4 quote needed to protect [] in grep expression.
12927             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12928             if test "x$FOUND_VERSION_78" = x; then
12929               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12930 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12931               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12932 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12933               BOOT_JDK_FOUND=no
12934             else
12935               # We're done! :-)
12936               BOOT_JDK_FOUND=yes
12937 
12938   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12939 
12940   # Input might be given as Windows format, start by converting to
12941   # unix format.
12942   path="$BOOT_JDK"
12943   new_path=`$CYGPATH -u "$path"`
12944 
12945   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12946   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12947   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12948   # "foo.exe" is OK but "foo" is an error.
12949   #
12950   # This test is therefore slightly more accurate than "test -f" to check for file precense.
12951   # It is also a way to make sure we got the proper file name for the real test later on.
12952   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12953   if test "x$test_shortpath" = x; then
12954     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12955 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12956     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12957   fi
12958 
12959   # Call helper function which possibly converts this using DOS-style short mode.
12960   # If so, the updated path is stored in $new_path.
12961 
12962   input_path="$new_path"
12963   # Check if we need to convert this using DOS-style short mode. If the path
12964   # contains just simple characters, use it. Otherwise (spaces, weird characters),
12965   # take no chances and rewrite it.
12966   # Note: m4 eats our [], so we need to use [ and ] instead.
12967   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12968   if test "x$has_forbidden_chars" != x; then
12969     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12970     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12971     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12972     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12973       # Going to short mode and back again did indeed matter. Since short mode is
12974       # case insensitive, let's make it lowercase to improve readability.
12975       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12976       # Now convert it back to Unix-stile (cygpath)
12977       input_path=`$CYGPATH -u "$shortmode_path"`
12978       new_path="$input_path"
12979     fi
12980   fi
12981 
12982   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12983   if test "x$test_cygdrive_prefix" = x; then
12984     # As a simple fix, exclude /usr/bin since it's not a real path.
12985     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12986       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12987       # a path prefixed by /cygdrive for fixpath to work.
12988       new_path="$CYGWIN_ROOT_PATH$input_path"
12989     fi
12990   fi
12991 
12992 
12993   if test "x$path" != "x$new_path"; then
12994     BOOT_JDK="$new_path"
12995     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12996 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12997   fi
12998 
12999   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13000 
13001   path="$BOOT_JDK"
13002   has_colon=`$ECHO $path | $GREP ^.:`
13003   new_path="$path"
13004   if test "x$has_colon" = x; then
13005     # Not in mixed or Windows style, start by that.
13006     new_path=`cmd //c echo $path`
13007   fi
13008 
13009 
13010   input_path="$new_path"
13011   # Check if we need to convert this using DOS-style short mode. If the path
13012   # contains just simple characters, use it. Otherwise (spaces, weird characters),
13013   # take no chances and rewrite it.
13014   # Note: m4 eats our [], so we need to use [ and ] instead.
13015   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13016   if test "x$has_forbidden_chars" != x; then
13017     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13018     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13019   fi
13020 
13021 
13022   windows_path="$new_path"
13023   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13024     unix_path=`$CYGPATH -u "$windows_path"`
13025     new_path="$unix_path"
13026   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13027     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13028     new_path="$unix_path"
13029   fi
13030 
13031   if test "x$path" != "x$new_path"; then
13032     BOOT_JDK="$new_path"
13033     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13034 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13035   fi
13036 
13037   # Save the first 10 bytes of this path to the storage, so fixpath can work.
13038   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13039 
13040   else
13041     # We're on a posix platform. Hooray! :)
13042     path="$BOOT_JDK"
13043     has_space=`$ECHO "$path" | $GREP " "`
13044     if test "x$has_space" != x; then
13045       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13046 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13047       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13048     fi
13049 
13050     # Use eval to expand a potential ~
13051     eval path="$path"
13052     if test ! -f "$path" && test ! -d "$path"; then
13053       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13054     fi
13055 
13056     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
13057   fi
13058 
13059               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13060 $as_echo_n "checking for Boot JDK... " >&6; }
13061               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13062 $as_echo "$BOOT_JDK" >&6; }
13063               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13064 $as_echo_n "checking Boot JDK version... " >&6; }
13065               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13066               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13067 $as_echo "$BOOT_JDK_VERSION" >&6; }
13068             fi # end check jdk version
13069           fi # end check rt.jar
13070         fi # end check javac
13071       fi # end check java
13072     fi # end check boot jdk found
13073   fi
13074 
13075 
13076   if test "x$BOOT_JDK_FOUND" = xno; then
13077     # Now execute the test
13078 
13079   if test "x$PROGRAMFILES" != x; then
13080     VIRTUAL_DIR="$PROGRAMFILES/Java"
13081 
13082   windows_path="$VIRTUAL_DIR"
13083   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13084     unix_path=`$CYGPATH -u "$windows_path"`
13085     VIRTUAL_DIR="$unix_path"
13086   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13087     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13088     VIRTUAL_DIR="$unix_path"
13089   fi
13090 
13091 
13092   BOOT_JDK_PREFIX="$VIRTUAL_DIR"
13093   BOOT_JDK_SUFFIX=""
13094   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
13095   if test "x$ALL_JDKS_FOUND" != x; then
13096     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
13097 
13098   if test "x$BOOT_JDK_FOUND" = xno; then
13099     # Now execute the test
13100 
13101         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
13102         if test -d "$BOOT_JDK"; then
13103           BOOT_JDK_FOUND=maybe
13104           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
13105 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
13106         fi
13107 
13108 
13109     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13110     if test "x$BOOT_JDK_FOUND" = xmaybe; then
13111       # Do we have a bin/java?
13112       if test ! -x "$BOOT_JDK/bin/java"; then
13113         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13114 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13115         BOOT_JDK_FOUND=no
13116       else
13117         # Do we have a bin/javac?
13118         if test ! -x "$BOOT_JDK/bin/javac"; then
13119           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13120 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13121           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13122 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13123           BOOT_JDK_FOUND=no
13124         else
13125           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13126           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13127             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13128 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13129             BOOT_JDK_FOUND=no
13130           else
13131             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13132             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13133 
13134             # Extra M4 quote needed to protect [] in grep expression.
13135             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13136             if test "x$FOUND_VERSION_78" = x; then
13137               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13138 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13139               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13140 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13141               BOOT_JDK_FOUND=no
13142             else
13143               # We're done! :-)
13144               BOOT_JDK_FOUND=yes
13145 
13146   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13147 
13148   # Input might be given as Windows format, start by converting to
13149   # unix format.
13150   path="$BOOT_JDK"
13151   new_path=`$CYGPATH -u "$path"`
13152 
13153   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13154   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13155   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13156   # "foo.exe" is OK but "foo" is an error.
13157   #
13158   # This test is therefore slightly more accurate than "test -f" to check for file precense.
13159   # It is also a way to make sure we got the proper file name for the real test later on.
13160   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13161   if test "x$test_shortpath" = x; then
13162     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13163 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13164     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13165   fi
13166 
13167   # Call helper function which possibly converts this using DOS-style short mode.
13168   # If so, the updated path is stored in $new_path.
13169 
13170   input_path="$new_path"
13171   # Check if we need to convert this using DOS-style short mode. If the path
13172   # contains just simple characters, use it. Otherwise (spaces, weird characters),
13173   # take no chances and rewrite it.
13174   # Note: m4 eats our [], so we need to use [ and ] instead.
13175   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13176   if test "x$has_forbidden_chars" != x; then
13177     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13178     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13179     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13180     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13181       # Going to short mode and back again did indeed matter. Since short mode is
13182       # case insensitive, let's make it lowercase to improve readability.
13183       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13184       # Now convert it back to Unix-stile (cygpath)
13185       input_path=`$CYGPATH -u "$shortmode_path"`
13186       new_path="$input_path"
13187     fi
13188   fi
13189 
13190   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13191   if test "x$test_cygdrive_prefix" = x; then
13192     # As a simple fix, exclude /usr/bin since it's not a real path.
13193     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13194       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13195       # a path prefixed by /cygdrive for fixpath to work.
13196       new_path="$CYGWIN_ROOT_PATH$input_path"
13197     fi
13198   fi
13199 
13200 
13201   if test "x$path" != "x$new_path"; then
13202     BOOT_JDK="$new_path"
13203     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13204 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13205   fi
13206 
13207   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13208 
13209   path="$BOOT_JDK"
13210   has_colon=`$ECHO $path | $GREP ^.:`
13211   new_path="$path"
13212   if test "x$has_colon" = x; then
13213     # Not in mixed or Windows style, start by that.
13214     new_path=`cmd //c echo $path`
13215   fi
13216 
13217 
13218   input_path="$new_path"
13219   # Check if we need to convert this using DOS-style short mode. If the path
13220   # contains just simple characters, use it. Otherwise (spaces, weird characters),
13221   # take no chances and rewrite it.
13222   # Note: m4 eats our [], so we need to use [ and ] instead.
13223   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13224   if test "x$has_forbidden_chars" != x; then
13225     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13226     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13227   fi
13228 
13229 
13230   windows_path="$new_path"
13231   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13232     unix_path=`$CYGPATH -u "$windows_path"`
13233     new_path="$unix_path"
13234   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13235     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13236     new_path="$unix_path"
13237   fi
13238 
13239   if test "x$path" != "x$new_path"; then
13240     BOOT_JDK="$new_path"
13241     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13242 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13243   fi
13244 
13245   # Save the first 10 bytes of this path to the storage, so fixpath can work.
13246   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13247 
13248   else
13249     # We're on a posix platform. Hooray! :)
13250     path="$BOOT_JDK"
13251     has_space=`$ECHO "$path" | $GREP " "`
13252     if test "x$has_space" != x; then
13253       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13254 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13255       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13256     fi
13257 
13258     # Use eval to expand a potential ~
13259     eval path="$path"
13260     if test ! -f "$path" && test ! -d "$path"; then
13261       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13262     fi
13263 
13264     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
13265   fi
13266 
13267               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13268 $as_echo_n "checking for Boot JDK... " >&6; }
13269               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13270 $as_echo "$BOOT_JDK" >&6; }
13271               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13272 $as_echo_n "checking Boot JDK version... " >&6; }
13273               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13274               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13275 $as_echo "$BOOT_JDK_VERSION" >&6; }
13276             fi # end check jdk version
13277           fi # end check rt.jar
13278         fi # end check javac
13279       fi # end check java
13280     fi # end check boot jdk found
13281   fi
13282 
13283     done
13284   fi
13285 
13286   fi
13287 
13288 
13289     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13290     if test "x$BOOT_JDK_FOUND" = xmaybe; then
13291       # Do we have a bin/java?
13292       if test ! -x "$BOOT_JDK/bin/java"; then
13293         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13294 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13295         BOOT_JDK_FOUND=no
13296       else
13297         # Do we have a bin/javac?
13298         if test ! -x "$BOOT_JDK/bin/javac"; then
13299           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13300 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13301           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13302 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13303           BOOT_JDK_FOUND=no
13304         else
13305           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13306           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13307             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13308 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13309             BOOT_JDK_FOUND=no
13310           else
13311             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13312             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13313 
13314             # Extra M4 quote needed to protect [] in grep expression.
13315             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13316             if test "x$FOUND_VERSION_78" = x; then
13317               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13318 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13319               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13320 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13321               BOOT_JDK_FOUND=no
13322             else
13323               # We're done! :-)
13324               BOOT_JDK_FOUND=yes
13325 
13326   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13327 
13328   # Input might be given as Windows format, start by converting to
13329   # unix format.
13330   path="$BOOT_JDK"
13331   new_path=`$CYGPATH -u "$path"`
13332 
13333   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13334   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13335   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13336   # "foo.exe" is OK but "foo" is an error.
13337   #
13338   # This test is therefore slightly more accurate than "test -f" to check for file precense.
13339   # It is also a way to make sure we got the proper file name for the real test later on.
13340   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13341   if test "x$test_shortpath" = x; then
13342     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13343 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13344     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13345   fi
13346 
13347   # Call helper function which possibly converts this using DOS-style short mode.
13348   # If so, the updated path is stored in $new_path.
13349 
13350   input_path="$new_path"
13351   # Check if we need to convert this using DOS-style short mode. If the path
13352   # contains just simple characters, use it. Otherwise (spaces, weird characters),
13353   # take no chances and rewrite it.
13354   # Note: m4 eats our [], so we need to use [ and ] instead.
13355   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13356   if test "x$has_forbidden_chars" != x; then
13357     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13358     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13359     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13360     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13361       # Going to short mode and back again did indeed matter. Since short mode is
13362       # case insensitive, let's make it lowercase to improve readability.
13363       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13364       # Now convert it back to Unix-stile (cygpath)
13365       input_path=`$CYGPATH -u "$shortmode_path"`
13366       new_path="$input_path"
13367     fi
13368   fi
13369 
13370   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13371   if test "x$test_cygdrive_prefix" = x; then
13372     # As a simple fix, exclude /usr/bin since it's not a real path.
13373     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13374       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13375       # a path prefixed by /cygdrive for fixpath to work.
13376       new_path="$CYGWIN_ROOT_PATH$input_path"
13377     fi
13378   fi
13379 
13380 
13381   if test "x$path" != "x$new_path"; then
13382     BOOT_JDK="$new_path"
13383     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13384 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13385   fi
13386 
13387   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13388 
13389   path="$BOOT_JDK"
13390   has_colon=`$ECHO $path | $GREP ^.:`
13391   new_path="$path"
13392   if test "x$has_colon" = x; then
13393     # Not in mixed or Windows style, start by that.
13394     new_path=`cmd //c echo $path`
13395   fi
13396 
13397 
13398   input_path="$new_path"
13399   # Check if we need to convert this using DOS-style short mode. If the path
13400   # contains just simple characters, use it. Otherwise (spaces, weird characters),
13401   # take no chances and rewrite it.
13402   # Note: m4 eats our [], so we need to use [ and ] instead.
13403   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13404   if test "x$has_forbidden_chars" != x; then
13405     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13406     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13407   fi
13408 
13409 
13410   windows_path="$new_path"
13411   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13412     unix_path=`$CYGPATH -u "$windows_path"`
13413     new_path="$unix_path"
13414   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13415     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13416     new_path="$unix_path"
13417   fi
13418 
13419   if test "x$path" != "x$new_path"; then
13420     BOOT_JDK="$new_path"
13421     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13422 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13423   fi
13424 
13425   # Save the first 10 bytes of this path to the storage, so fixpath can work.
13426   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13427 
13428   else
13429     # We're on a posix platform. Hooray! :)
13430     path="$BOOT_JDK"
13431     has_space=`$ECHO "$path" | $GREP " "`
13432     if test "x$has_space" != x; then
13433       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13434 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13435       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13436     fi
13437 
13438     # Use eval to expand a potential ~
13439     eval path="$path"
13440     if test ! -f "$path" && test ! -d "$path"; then
13441       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13442     fi
13443 
13444     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
13445   fi
13446 
13447               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13448 $as_echo_n "checking for Boot JDK... " >&6; }
13449               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13450 $as_echo "$BOOT_JDK" >&6; }
13451               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13452 $as_echo_n "checking Boot JDK version... " >&6; }
13453               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13454               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13455 $as_echo "$BOOT_JDK_VERSION" >&6; }
13456             fi # end check jdk version
13457           fi # end check rt.jar
13458         fi # end check javac
13459       fi # end check java
13460     fi # end check boot jdk found
13461   fi
13462 
13463 
13464   if test "x$BOOT_JDK_FOUND" = xno; then
13465     # Now execute the test
13466 
13467   if test "x$ProgramFiles" != x; then
13468     VIRTUAL_DIR="$ProgramFiles/Java"
13469 
13470   windows_path="$VIRTUAL_DIR"
13471   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13472     unix_path=`$CYGPATH -u "$windows_path"`
13473     VIRTUAL_DIR="$unix_path"
13474   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13475     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13476     VIRTUAL_DIR="$unix_path"
13477   fi
13478 
13479 
13480   BOOT_JDK_PREFIX="$VIRTUAL_DIR"
13481   BOOT_JDK_SUFFIX=""
13482   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
13483   if test "x$ALL_JDKS_FOUND" != x; then
13484     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
13485 
13486   if test "x$BOOT_JDK_FOUND" = xno; then
13487     # Now execute the test
13488 
13489         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
13490         if test -d "$BOOT_JDK"; then
13491           BOOT_JDK_FOUND=maybe
13492           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
13493 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
13494         fi
13495 
13496 
13497     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13498     if test "x$BOOT_JDK_FOUND" = xmaybe; then
13499       # Do we have a bin/java?
13500       if test ! -x "$BOOT_JDK/bin/java"; then
13501         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13502 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13503         BOOT_JDK_FOUND=no
13504       else
13505         # Do we have a bin/javac?
13506         if test ! -x "$BOOT_JDK/bin/javac"; then
13507           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13508 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13509           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13510 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13511           BOOT_JDK_FOUND=no
13512         else
13513           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13514           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13515             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13516 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13517             BOOT_JDK_FOUND=no
13518           else
13519             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13520             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13521 
13522             # Extra M4 quote needed to protect [] in grep expression.
13523             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13524             if test "x$FOUND_VERSION_78" = x; then
13525               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13526 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13527               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13528 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13529               BOOT_JDK_FOUND=no
13530             else
13531               # We're done! :-)
13532               BOOT_JDK_FOUND=yes
13533 
13534   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13535 
13536   # Input might be given as Windows format, start by converting to
13537   # unix format.
13538   path="$BOOT_JDK"
13539   new_path=`$CYGPATH -u "$path"`
13540 
13541   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13542   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13543   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13544   # "foo.exe" is OK but "foo" is an error.
13545   #
13546   # This test is therefore slightly more accurate than "test -f" to check for file precense.
13547   # It is also a way to make sure we got the proper file name for the real test later on.
13548   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13549   if test "x$test_shortpath" = x; then
13550     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13551 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13552     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13553   fi
13554 
13555   # Call helper function which possibly converts this using DOS-style short mode.
13556   # If so, the updated path is stored in $new_path.
13557 
13558   input_path="$new_path"
13559   # Check if we need to convert this using DOS-style short mode. If the path
13560   # contains just simple characters, use it. Otherwise (spaces, weird characters),
13561   # take no chances and rewrite it.
13562   # Note: m4 eats our [], so we need to use [ and ] instead.
13563   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13564   if test "x$has_forbidden_chars" != x; then
13565     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13566     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13567     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13568     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13569       # Going to short mode and back again did indeed matter. Since short mode is
13570       # case insensitive, let's make it lowercase to improve readability.
13571       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13572       # Now convert it back to Unix-stile (cygpath)
13573       input_path=`$CYGPATH -u "$shortmode_path"`
13574       new_path="$input_path"
13575     fi
13576   fi
13577 
13578   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13579   if test "x$test_cygdrive_prefix" = x; then
13580     # As a simple fix, exclude /usr/bin since it's not a real path.
13581     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13582       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13583       # a path prefixed by /cygdrive for fixpath to work.
13584       new_path="$CYGWIN_ROOT_PATH$input_path"
13585     fi
13586   fi
13587 
13588 
13589   if test "x$path" != "x$new_path"; then
13590     BOOT_JDK="$new_path"
13591     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13592 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13593   fi
13594 
13595   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13596 
13597   path="$BOOT_JDK"
13598   has_colon=`$ECHO $path | $GREP ^.:`
13599   new_path="$path"
13600   if test "x$has_colon" = x; then
13601     # Not in mixed or Windows style, start by that.
13602     new_path=`cmd //c echo $path`
13603   fi
13604 
13605 
13606   input_path="$new_path"
13607   # Check if we need to convert this using DOS-style short mode. If the path
13608   # contains just simple characters, use it. Otherwise (spaces, weird characters),
13609   # take no chances and rewrite it.
13610   # Note: m4 eats our [], so we need to use [ and ] instead.
13611   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13612   if test "x$has_forbidden_chars" != x; then
13613     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13614     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13615   fi
13616 
13617 
13618   windows_path="$new_path"
13619   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13620     unix_path=`$CYGPATH -u "$windows_path"`
13621     new_path="$unix_path"
13622   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13623     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13624     new_path="$unix_path"
13625   fi
13626 
13627   if test "x$path" != "x$new_path"; then
13628     BOOT_JDK="$new_path"
13629     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13630 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13631   fi
13632 
13633   # Save the first 10 bytes of this path to the storage, so fixpath can work.
13634   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13635 
13636   else
13637     # We're on a posix platform. Hooray! :)
13638     path="$BOOT_JDK"
13639     has_space=`$ECHO "$path" | $GREP " "`
13640     if test "x$has_space" != x; then
13641       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13642 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13643       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13644     fi
13645 
13646     # Use eval to expand a potential ~
13647     eval path="$path"
13648     if test ! -f "$path" && test ! -d "$path"; then
13649       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13650     fi
13651 
13652     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
13653   fi
13654 
13655               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13656 $as_echo_n "checking for Boot JDK... " >&6; }
13657               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13658 $as_echo "$BOOT_JDK" >&6; }
13659               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13660 $as_echo_n "checking Boot JDK version... " >&6; }
13661               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13662               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13663 $as_echo "$BOOT_JDK_VERSION" >&6; }
13664             fi # end check jdk version
13665           fi # end check rt.jar
13666         fi # end check javac
13667       fi # end check java
13668     fi # end check boot jdk found
13669   fi
13670 
13671     done
13672   fi
13673 
13674   fi
13675 
13676 
13677     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13678     if test "x$BOOT_JDK_FOUND" = xmaybe; then
13679       # Do we have a bin/java?
13680       if test ! -x "$BOOT_JDK/bin/java"; then
13681         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13682 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13683         BOOT_JDK_FOUND=no
13684       else
13685         # Do we have a bin/javac?
13686         if test ! -x "$BOOT_JDK/bin/javac"; then
13687           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13688 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13689           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13690 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13691           BOOT_JDK_FOUND=no
13692         else
13693           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13694           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13695             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13696 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13697             BOOT_JDK_FOUND=no
13698           else
13699             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13700             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13701 
13702             # Extra M4 quote needed to protect [] in grep expression.
13703             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13704             if test "x$FOUND_VERSION_78" = x; then
13705               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13706 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13707               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13708 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13709               BOOT_JDK_FOUND=no
13710             else
13711               # We're done! :-)
13712               BOOT_JDK_FOUND=yes
13713 
13714   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13715 
13716   # Input might be given as Windows format, start by converting to
13717   # unix format.
13718   path="$BOOT_JDK"
13719   new_path=`$CYGPATH -u "$path"`
13720 
13721   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13722   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13723   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13724   # "foo.exe" is OK but "foo" is an error.
13725   #
13726   # This test is therefore slightly more accurate than "test -f" to check for file precense.
13727   # It is also a way to make sure we got the proper file name for the real test later on.
13728   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13729   if test "x$test_shortpath" = x; then
13730     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13731 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13732     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13733   fi
13734 
13735   # Call helper function which possibly converts this using DOS-style short mode.
13736   # If so, the updated path is stored in $new_path.
13737 
13738   input_path="$new_path"
13739   # Check if we need to convert this using DOS-style short mode. If the path
13740   # contains just simple characters, use it. Otherwise (spaces, weird characters),
13741   # take no chances and rewrite it.
13742   # Note: m4 eats our [], so we need to use [ and ] instead.
13743   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13744   if test "x$has_forbidden_chars" != x; then
13745     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13746     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13747     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13748     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13749       # Going to short mode and back again did indeed matter. Since short mode is
13750       # case insensitive, let's make it lowercase to improve readability.
13751       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13752       # Now convert it back to Unix-stile (cygpath)
13753       input_path=`$CYGPATH -u "$shortmode_path"`
13754       new_path="$input_path"
13755     fi
13756   fi
13757 
13758   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13759   if test "x$test_cygdrive_prefix" = x; then
13760     # As a simple fix, exclude /usr/bin since it's not a real path.
13761     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13762       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13763       # a path prefixed by /cygdrive for fixpath to work.
13764       new_path="$CYGWIN_ROOT_PATH$input_path"
13765     fi
13766   fi
13767 
13768 
13769   if test "x$path" != "x$new_path"; then
13770     BOOT_JDK="$new_path"
13771     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13772 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13773   fi
13774 
13775   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13776 
13777   path="$BOOT_JDK"
13778   has_colon=`$ECHO $path | $GREP ^.:`
13779   new_path="$path"
13780   if test "x$has_colon" = x; then
13781     # Not in mixed or Windows style, start by that.
13782     new_path=`cmd //c echo $path`
13783   fi
13784 
13785 
13786   input_path="$new_path"
13787   # Check if we need to convert this using DOS-style short mode. If the path
13788   # contains just simple characters, use it. Otherwise (spaces, weird characters),
13789   # take no chances and rewrite it.
13790   # Note: m4 eats our [], so we need to use [ and ] instead.
13791   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13792   if test "x$has_forbidden_chars" != x; then
13793     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13794     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13795   fi
13796 
13797 
13798   windows_path="$new_path"
13799   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13800     unix_path=`$CYGPATH -u "$windows_path"`
13801     new_path="$unix_path"
13802   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13803     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13804     new_path="$unix_path"
13805   fi
13806 
13807   if test "x$path" != "x$new_path"; then
13808     BOOT_JDK="$new_path"
13809     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13810 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13811   fi
13812 
13813   # Save the first 10 bytes of this path to the storage, so fixpath can work.
13814   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13815 
13816   else
13817     # We're on a posix platform. Hooray! :)
13818     path="$BOOT_JDK"
13819     has_space=`$ECHO "$path" | $GREP " "`
13820     if test "x$has_space" != x; then
13821       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13822 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13823       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13824     fi
13825 
13826     # Use eval to expand a potential ~
13827     eval path="$path"
13828     if test ! -f "$path" && test ! -d "$path"; then
13829       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13830     fi
13831 
13832     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
13833   fi
13834 
13835               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13836 $as_echo_n "checking for Boot JDK... " >&6; }
13837               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13838 $as_echo "$BOOT_JDK" >&6; }
13839               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13840 $as_echo_n "checking Boot JDK version... " >&6; }
13841               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13842               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13843 $as_echo "$BOOT_JDK_VERSION" >&6; }
13844             fi # end check jdk version
13845           fi # end check rt.jar
13846         fi # end check javac
13847       fi # end check java
13848     fi # end check boot jdk found
13849   fi
13850 
13851 
13852   if test "x$BOOT_JDK_FOUND" = xno; then
13853     # Now execute the test
13854 
13855   BOOT_JDK_PREFIX="/cygdrive/c/Program Files/Java"
13856   BOOT_JDK_SUFFIX=""
13857   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
13858   if test "x$ALL_JDKS_FOUND" != x; then
13859     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
13860 
13861   if test "x$BOOT_JDK_FOUND" = xno; then
13862     # Now execute the test
13863 
13864         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
13865         if test -d "$BOOT_JDK"; then
13866           BOOT_JDK_FOUND=maybe
13867           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
13868 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
13869         fi
13870 
13871 
13872     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13873     if test "x$BOOT_JDK_FOUND" = xmaybe; then
13874       # Do we have a bin/java?
13875       if test ! -x "$BOOT_JDK/bin/java"; then
13876         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13877 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13878         BOOT_JDK_FOUND=no
13879       else
13880         # Do we have a bin/javac?
13881         if test ! -x "$BOOT_JDK/bin/javac"; then
13882           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13883 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13884           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13885 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13886           BOOT_JDK_FOUND=no
13887         else
13888           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13889           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13890             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13891 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13892             BOOT_JDK_FOUND=no
13893           else
13894             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13895             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13896 
13897             # Extra M4 quote needed to protect [] in grep expression.
13898             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13899             if test "x$FOUND_VERSION_78" = x; then
13900               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13901 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13902               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13903 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13904               BOOT_JDK_FOUND=no
13905             else
13906               # We're done! :-)
13907               BOOT_JDK_FOUND=yes
13908 
13909   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13910 
13911   # Input might be given as Windows format, start by converting to
13912   # unix format.
13913   path="$BOOT_JDK"
13914   new_path=`$CYGPATH -u "$path"`
13915 
13916   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13917   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13918   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13919   # "foo.exe" is OK but "foo" is an error.
13920   #
13921   # This test is therefore slightly more accurate than "test -f" to check for file precense.
13922   # It is also a way to make sure we got the proper file name for the real test later on.
13923   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13924   if test "x$test_shortpath" = x; then
13925     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13926 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13927     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13928   fi
13929 
13930   # Call helper function which possibly converts this using DOS-style short mode.
13931   # If so, the updated path is stored in $new_path.
13932 
13933   input_path="$new_path"
13934   # Check if we need to convert this using DOS-style short mode. If the path
13935   # contains just simple characters, use it. Otherwise (spaces, weird characters),
13936   # take no chances and rewrite it.
13937   # Note: m4 eats our [], so we need to use [ and ] instead.
13938   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13939   if test "x$has_forbidden_chars" != x; then
13940     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13941     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13942     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13943     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13944       # Going to short mode and back again did indeed matter. Since short mode is
13945       # case insensitive, let's make it lowercase to improve readability.
13946       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13947       # Now convert it back to Unix-stile (cygpath)
13948       input_path=`$CYGPATH -u "$shortmode_path"`
13949       new_path="$input_path"
13950     fi
13951   fi
13952 
13953   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13954   if test "x$test_cygdrive_prefix" = x; then
13955     # As a simple fix, exclude /usr/bin since it's not a real path.
13956     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13957       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13958       # a path prefixed by /cygdrive for fixpath to work.
13959       new_path="$CYGWIN_ROOT_PATH$input_path"
13960     fi
13961   fi
13962 
13963 
13964   if test "x$path" != "x$new_path"; then
13965     BOOT_JDK="$new_path"
13966     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13967 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13968   fi
13969 
13970   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13971 
13972   path="$BOOT_JDK"
13973   has_colon=`$ECHO $path | $GREP ^.:`
13974   new_path="$path"
13975   if test "x$has_colon" = x; then
13976     # Not in mixed or Windows style, start by that.
13977     new_path=`cmd //c echo $path`
13978   fi
13979 
13980 
13981   input_path="$new_path"
13982   # Check if we need to convert this using DOS-style short mode. If the path
13983   # contains just simple characters, use it. Otherwise (spaces, weird characters),
13984   # take no chances and rewrite it.
13985   # Note: m4 eats our [], so we need to use [ and ] instead.
13986   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13987   if test "x$has_forbidden_chars" != x; then
13988     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13989     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13990   fi
13991 
13992 
13993   windows_path="$new_path"
13994   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13995     unix_path=`$CYGPATH -u "$windows_path"`
13996     new_path="$unix_path"
13997   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13998     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13999     new_path="$unix_path"
14000   fi
14001 
14002   if test "x$path" != "x$new_path"; then
14003     BOOT_JDK="$new_path"
14004     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14005 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14006   fi
14007 
14008   # Save the first 10 bytes of this path to the storage, so fixpath can work.
14009   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14010 
14011   else
14012     # We're on a posix platform. Hooray! :)
14013     path="$BOOT_JDK"
14014     has_space=`$ECHO "$path" | $GREP " "`
14015     if test "x$has_space" != x; then
14016       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14017 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14018       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14019     fi
14020 
14021     # Use eval to expand a potential ~
14022     eval path="$path"
14023     if test ! -f "$path" && test ! -d "$path"; then
14024       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14025     fi
14026 
14027     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
14028   fi
14029 
14030               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14031 $as_echo_n "checking for Boot JDK... " >&6; }
14032               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14033 $as_echo "$BOOT_JDK" >&6; }
14034               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14035 $as_echo_n "checking Boot JDK version... " >&6; }
14036               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14037               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14038 $as_echo "$BOOT_JDK_VERSION" >&6; }
14039             fi # end check jdk version
14040           fi # end check rt.jar
14041         fi # end check javac
14042       fi # end check java
14043     fi # end check boot jdk found
14044   fi
14045 
14046     done
14047   fi
14048 
14049 
14050     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14051     if test "x$BOOT_JDK_FOUND" = xmaybe; then
14052       # Do we have a bin/java?
14053       if test ! -x "$BOOT_JDK/bin/java"; then
14054         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14055 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14056         BOOT_JDK_FOUND=no
14057       else
14058         # Do we have a bin/javac?
14059         if test ! -x "$BOOT_JDK/bin/javac"; then
14060           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14061 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14062           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14063 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14064           BOOT_JDK_FOUND=no
14065         else
14066           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14067           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14068             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14069 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14070             BOOT_JDK_FOUND=no
14071           else
14072             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14073             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14074 
14075             # Extra M4 quote needed to protect [] in grep expression.
14076             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14077             if test "x$FOUND_VERSION_78" = x; then
14078               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14079 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14080               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14081 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14082               BOOT_JDK_FOUND=no
14083             else
14084               # We're done! :-)
14085               BOOT_JDK_FOUND=yes
14086 
14087   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14088 
14089   # Input might be given as Windows format, start by converting to
14090   # unix format.
14091   path="$BOOT_JDK"
14092   new_path=`$CYGPATH -u "$path"`
14093 
14094   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14095   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14096   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14097   # "foo.exe" is OK but "foo" is an error.
14098   #
14099   # This test is therefore slightly more accurate than "test -f" to check for file precense.
14100   # It is also a way to make sure we got the proper file name for the real test later on.
14101   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14102   if test "x$test_shortpath" = x; then
14103     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14104 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14105     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14106   fi
14107 
14108   # Call helper function which possibly converts this using DOS-style short mode.
14109   # If so, the updated path is stored in $new_path.
14110 
14111   input_path="$new_path"
14112   # Check if we need to convert this using DOS-style short mode. If the path
14113   # contains just simple characters, use it. Otherwise (spaces, weird characters),
14114   # take no chances and rewrite it.
14115   # Note: m4 eats our [], so we need to use [ and ] instead.
14116   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14117   if test "x$has_forbidden_chars" != x; then
14118     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14119     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14120     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14121     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14122       # Going to short mode and back again did indeed matter. Since short mode is
14123       # case insensitive, let's make it lowercase to improve readability.
14124       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14125       # Now convert it back to Unix-stile (cygpath)
14126       input_path=`$CYGPATH -u "$shortmode_path"`
14127       new_path="$input_path"
14128     fi
14129   fi
14130 
14131   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14132   if test "x$test_cygdrive_prefix" = x; then
14133     # As a simple fix, exclude /usr/bin since it's not a real path.
14134     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14135       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14136       # a path prefixed by /cygdrive for fixpath to work.
14137       new_path="$CYGWIN_ROOT_PATH$input_path"
14138     fi
14139   fi
14140 
14141 
14142   if test "x$path" != "x$new_path"; then
14143     BOOT_JDK="$new_path"
14144     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14145 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14146   fi
14147 
14148   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14149 
14150   path="$BOOT_JDK"
14151   has_colon=`$ECHO $path | $GREP ^.:`
14152   new_path="$path"
14153   if test "x$has_colon" = x; then
14154     # Not in mixed or Windows style, start by that.
14155     new_path=`cmd //c echo $path`
14156   fi
14157 
14158 
14159   input_path="$new_path"
14160   # Check if we need to convert this using DOS-style short mode. If the path
14161   # contains just simple characters, use it. Otherwise (spaces, weird characters),
14162   # take no chances and rewrite it.
14163   # Note: m4 eats our [], so we need to use [ and ] instead.
14164   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14165   if test "x$has_forbidden_chars" != x; then
14166     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14167     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14168   fi
14169 
14170 
14171   windows_path="$new_path"
14172   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14173     unix_path=`$CYGPATH -u "$windows_path"`
14174     new_path="$unix_path"
14175   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14176     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14177     new_path="$unix_path"
14178   fi
14179 
14180   if test "x$path" != "x$new_path"; then
14181     BOOT_JDK="$new_path"
14182     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14183 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14184   fi
14185 
14186   # Save the first 10 bytes of this path to the storage, so fixpath can work.
14187   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14188 
14189   else
14190     # We're on a posix platform. Hooray! :)
14191     path="$BOOT_JDK"
14192     has_space=`$ECHO "$path" | $GREP " "`
14193     if test "x$has_space" != x; then
14194       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14195 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14196       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14197     fi
14198 
14199     # Use eval to expand a potential ~
14200     eval path="$path"
14201     if test ! -f "$path" && test ! -d "$path"; then
14202       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14203     fi
14204 
14205     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
14206   fi
14207 
14208               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14209 $as_echo_n "checking for Boot JDK... " >&6; }
14210               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14211 $as_echo "$BOOT_JDK" >&6; }
14212               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14213 $as_echo_n "checking Boot JDK version... " >&6; }
14214               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14215               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14216 $as_echo "$BOOT_JDK_VERSION" >&6; }
14217             fi # end check jdk version
14218           fi # end check rt.jar
14219         fi # end check javac
14220       fi # end check java
14221     fi # end check boot jdk found
14222   fi
14223 
14224   elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
14225 
14226   if test "x$BOOT_JDK_FOUND" = xno; then
14227     # Now execute the test
14228 
14229   BOOT_JDK_PREFIX="/Library/Java/JavaVirtualMachines"
14230   BOOT_JDK_SUFFIX="/Contents/Home"
14231   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
14232   if test "x$ALL_JDKS_FOUND" != x; then
14233     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
14234 
14235   if test "x$BOOT_JDK_FOUND" = xno; then
14236     # Now execute the test
14237 
14238         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
14239         if test -d "$BOOT_JDK"; then
14240           BOOT_JDK_FOUND=maybe
14241           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
14242 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
14243         fi
14244 
14245 
14246     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14247     if test "x$BOOT_JDK_FOUND" = xmaybe; then
14248       # Do we have a bin/java?
14249       if test ! -x "$BOOT_JDK/bin/java"; then
14250         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14251 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14252         BOOT_JDK_FOUND=no
14253       else
14254         # Do we have a bin/javac?
14255         if test ! -x "$BOOT_JDK/bin/javac"; then
14256           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14257 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14258           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14259 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14260           BOOT_JDK_FOUND=no
14261         else
14262           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14263           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14264             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14265 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14266             BOOT_JDK_FOUND=no
14267           else
14268             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14269             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14270 
14271             # Extra M4 quote needed to protect [] in grep expression.
14272             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14273             if test "x$FOUND_VERSION_78" = x; then
14274               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14275 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14276               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14277 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14278               BOOT_JDK_FOUND=no
14279             else
14280               # We're done! :-)
14281               BOOT_JDK_FOUND=yes
14282 
14283   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14284 
14285   # Input might be given as Windows format, start by converting to
14286   # unix format.
14287   path="$BOOT_JDK"
14288   new_path=`$CYGPATH -u "$path"`
14289 
14290   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14291   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14292   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14293   # "foo.exe" is OK but "foo" is an error.
14294   #
14295   # This test is therefore slightly more accurate than "test -f" to check for file precense.
14296   # It is also a way to make sure we got the proper file name for the real test later on.
14297   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14298   if test "x$test_shortpath" = x; then
14299     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14300 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14301     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14302   fi
14303 
14304   # Call helper function which possibly converts this using DOS-style short mode.
14305   # If so, the updated path is stored in $new_path.
14306 
14307   input_path="$new_path"
14308   # Check if we need to convert this using DOS-style short mode. If the path
14309   # contains just simple characters, use it. Otherwise (spaces, weird characters),
14310   # take no chances and rewrite it.
14311   # Note: m4 eats our [], so we need to use [ and ] instead.
14312   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14313   if test "x$has_forbidden_chars" != x; then
14314     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14315     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14316     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14317     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14318       # Going to short mode and back again did indeed matter. Since short mode is
14319       # case insensitive, let's make it lowercase to improve readability.
14320       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14321       # Now convert it back to Unix-stile (cygpath)
14322       input_path=`$CYGPATH -u "$shortmode_path"`
14323       new_path="$input_path"
14324     fi
14325   fi
14326 
14327   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14328   if test "x$test_cygdrive_prefix" = x; then
14329     # As a simple fix, exclude /usr/bin since it's not a real path.
14330     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14331       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14332       # a path prefixed by /cygdrive for fixpath to work.
14333       new_path="$CYGWIN_ROOT_PATH$input_path"
14334     fi
14335   fi
14336 
14337 
14338   if test "x$path" != "x$new_path"; then
14339     BOOT_JDK="$new_path"
14340     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14341 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14342   fi
14343 
14344   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14345 
14346   path="$BOOT_JDK"
14347   has_colon=`$ECHO $path | $GREP ^.:`
14348   new_path="$path"
14349   if test "x$has_colon" = x; then
14350     # Not in mixed or Windows style, start by that.
14351     new_path=`cmd //c echo $path`
14352   fi
14353 
14354 
14355   input_path="$new_path"
14356   # Check if we need to convert this using DOS-style short mode. If the path
14357   # contains just simple characters, use it. Otherwise (spaces, weird characters),
14358   # take no chances and rewrite it.
14359   # Note: m4 eats our [], so we need to use [ and ] instead.
14360   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14361   if test "x$has_forbidden_chars" != x; then
14362     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14363     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14364   fi
14365 
14366 
14367   windows_path="$new_path"
14368   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14369     unix_path=`$CYGPATH -u "$windows_path"`
14370     new_path="$unix_path"
14371   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14372     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14373     new_path="$unix_path"
14374   fi
14375 
14376   if test "x$path" != "x$new_path"; then
14377     BOOT_JDK="$new_path"
14378     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14379 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14380   fi
14381 
14382   # Save the first 10 bytes of this path to the storage, so fixpath can work.
14383   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14384 
14385   else
14386     # We're on a posix platform. Hooray! :)
14387     path="$BOOT_JDK"
14388     has_space=`$ECHO "$path" | $GREP " "`
14389     if test "x$has_space" != x; then
14390       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14391 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14392       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14393     fi
14394 
14395     # Use eval to expand a potential ~
14396     eval path="$path"
14397     if test ! -f "$path" && test ! -d "$path"; then
14398       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14399     fi
14400 
14401     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
14402   fi
14403 
14404               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14405 $as_echo_n "checking for Boot JDK... " >&6; }
14406               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14407 $as_echo "$BOOT_JDK" >&6; }
14408               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14409 $as_echo_n "checking Boot JDK version... " >&6; }
14410               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14411               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14412 $as_echo "$BOOT_JDK_VERSION" >&6; }
14413             fi # end check jdk version
14414           fi # end check rt.jar
14415         fi # end check javac
14416       fi # end check java
14417     fi # end check boot jdk found
14418   fi
14419 
14420     done
14421   fi
14422 
14423 
14424     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14425     if test "x$BOOT_JDK_FOUND" = xmaybe; then
14426       # Do we have a bin/java?
14427       if test ! -x "$BOOT_JDK/bin/java"; then
14428         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14429 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14430         BOOT_JDK_FOUND=no
14431       else
14432         # Do we have a bin/javac?
14433         if test ! -x "$BOOT_JDK/bin/javac"; then
14434           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14435 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14436           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14437 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14438           BOOT_JDK_FOUND=no
14439         else
14440           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14441           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14442             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14443 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14444             BOOT_JDK_FOUND=no
14445           else
14446             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14447             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14448 
14449             # Extra M4 quote needed to protect [] in grep expression.
14450             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14451             if test "x$FOUND_VERSION_78" = x; then
14452               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14453 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14454               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14455 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14456               BOOT_JDK_FOUND=no
14457             else
14458               # We're done! :-)
14459               BOOT_JDK_FOUND=yes
14460 
14461   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14462 
14463   # Input might be given as Windows format, start by converting to
14464   # unix format.
14465   path="$BOOT_JDK"
14466   new_path=`$CYGPATH -u "$path"`
14467 
14468   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14469   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14470   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14471   # "foo.exe" is OK but "foo" is an error.
14472   #
14473   # This test is therefore slightly more accurate than "test -f" to check for file precense.
14474   # It is also a way to make sure we got the proper file name for the real test later on.
14475   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14476   if test "x$test_shortpath" = x; then
14477     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14478 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14479     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14480   fi
14481 
14482   # Call helper function which possibly converts this using DOS-style short mode.
14483   # If so, the updated path is stored in $new_path.
14484 
14485   input_path="$new_path"
14486   # Check if we need to convert this using DOS-style short mode. If the path
14487   # contains just simple characters, use it. Otherwise (spaces, weird characters),
14488   # take no chances and rewrite it.
14489   # Note: m4 eats our [], so we need to use [ and ] instead.
14490   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14491   if test "x$has_forbidden_chars" != x; then
14492     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14493     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14494     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14495     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14496       # Going to short mode and back again did indeed matter. Since short mode is
14497       # case insensitive, let's make it lowercase to improve readability.
14498       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14499       # Now convert it back to Unix-stile (cygpath)
14500       input_path=`$CYGPATH -u "$shortmode_path"`
14501       new_path="$input_path"
14502     fi
14503   fi
14504 
14505   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14506   if test "x$test_cygdrive_prefix" = x; then
14507     # As a simple fix, exclude /usr/bin since it's not a real path.
14508     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14509       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14510       # a path prefixed by /cygdrive for fixpath to work.
14511       new_path="$CYGWIN_ROOT_PATH$input_path"
14512     fi
14513   fi
14514 
14515 
14516   if test "x$path" != "x$new_path"; then
14517     BOOT_JDK="$new_path"
14518     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14519 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14520   fi
14521 
14522   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14523 
14524   path="$BOOT_JDK"
14525   has_colon=`$ECHO $path | $GREP ^.:`
14526   new_path="$path"
14527   if test "x$has_colon" = x; then
14528     # Not in mixed or Windows style, start by that.
14529     new_path=`cmd //c echo $path`
14530   fi
14531 
14532 
14533   input_path="$new_path"
14534   # Check if we need to convert this using DOS-style short mode. If the path
14535   # contains just simple characters, use it. Otherwise (spaces, weird characters),
14536   # take no chances and rewrite it.
14537   # Note: m4 eats our [], so we need to use [ and ] instead.
14538   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14539   if test "x$has_forbidden_chars" != x; then
14540     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14541     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14542   fi
14543 
14544 
14545   windows_path="$new_path"
14546   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14547     unix_path=`$CYGPATH -u "$windows_path"`
14548     new_path="$unix_path"
14549   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14550     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14551     new_path="$unix_path"
14552   fi
14553 
14554   if test "x$path" != "x$new_path"; then
14555     BOOT_JDK="$new_path"
14556     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14557 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14558   fi
14559 
14560   # Save the first 10 bytes of this path to the storage, so fixpath can work.
14561   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14562 
14563   else
14564     # We're on a posix platform. Hooray! :)
14565     path="$BOOT_JDK"
14566     has_space=`$ECHO "$path" | $GREP " "`
14567     if test "x$has_space" != x; then
14568       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14569 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14570       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14571     fi
14572 
14573     # Use eval to expand a potential ~
14574     eval path="$path"
14575     if test ! -f "$path" && test ! -d "$path"; then
14576       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14577     fi
14578 
14579     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
14580   fi
14581 
14582               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14583 $as_echo_n "checking for Boot JDK... " >&6; }
14584               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14585 $as_echo "$BOOT_JDK" >&6; }
14586               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14587 $as_echo_n "checking Boot JDK version... " >&6; }
14588               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14589               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14590 $as_echo "$BOOT_JDK_VERSION" >&6; }
14591             fi # end check jdk version
14592           fi # end check rt.jar
14593         fi # end check javac
14594       fi # end check java
14595     fi # end check boot jdk found
14596   fi
14597 
14598 
14599   if test "x$BOOT_JDK_FOUND" = xno; then
14600     # Now execute the test
14601 
14602   BOOT_JDK_PREFIX="/System/Library/Java/JavaVirtualMachines"
14603   BOOT_JDK_SUFFIX="/Contents/Home"
14604   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
14605   if test "x$ALL_JDKS_FOUND" != x; then
14606     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
14607 
14608   if test "x$BOOT_JDK_FOUND" = xno; then
14609     # Now execute the test
14610 
14611         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
14612         if test -d "$BOOT_JDK"; then
14613           BOOT_JDK_FOUND=maybe
14614           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
14615 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
14616         fi
14617 
14618 
14619     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14620     if test "x$BOOT_JDK_FOUND" = xmaybe; then
14621       # Do we have a bin/java?
14622       if test ! -x "$BOOT_JDK/bin/java"; then
14623         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14624 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14625         BOOT_JDK_FOUND=no
14626       else
14627         # Do we have a bin/javac?
14628         if test ! -x "$BOOT_JDK/bin/javac"; then
14629           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14630 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14631           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14632 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14633           BOOT_JDK_FOUND=no
14634         else
14635           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14636           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14637             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14638 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14639             BOOT_JDK_FOUND=no
14640           else
14641             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14642             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14643 
14644             # Extra M4 quote needed to protect [] in grep expression.
14645             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14646             if test "x$FOUND_VERSION_78" = x; then
14647               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14648 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14649               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14650 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14651               BOOT_JDK_FOUND=no
14652             else
14653               # We're done! :-)
14654               BOOT_JDK_FOUND=yes
14655 
14656   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14657 
14658   # Input might be given as Windows format, start by converting to
14659   # unix format.
14660   path="$BOOT_JDK"
14661   new_path=`$CYGPATH -u "$path"`
14662 
14663   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14664   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14665   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14666   # "foo.exe" is OK but "foo" is an error.
14667   #
14668   # This test is therefore slightly more accurate than "test -f" to check for file precense.
14669   # It is also a way to make sure we got the proper file name for the real test later on.
14670   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14671   if test "x$test_shortpath" = x; then
14672     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14673 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14674     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14675   fi
14676 
14677   # Call helper function which possibly converts this using DOS-style short mode.
14678   # If so, the updated path is stored in $new_path.
14679 
14680   input_path="$new_path"
14681   # Check if we need to convert this using DOS-style short mode. If the path
14682   # contains just simple characters, use it. Otherwise (spaces, weird characters),
14683   # take no chances and rewrite it.
14684   # Note: m4 eats our [], so we need to use [ and ] instead.
14685   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14686   if test "x$has_forbidden_chars" != x; then
14687     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14688     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14689     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14690     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14691       # Going to short mode and back again did indeed matter. Since short mode is
14692       # case insensitive, let's make it lowercase to improve readability.
14693       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14694       # Now convert it back to Unix-stile (cygpath)
14695       input_path=`$CYGPATH -u "$shortmode_path"`
14696       new_path="$input_path"
14697     fi
14698   fi
14699 
14700   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14701   if test "x$test_cygdrive_prefix" = x; then
14702     # As a simple fix, exclude /usr/bin since it's not a real path.
14703     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14704       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14705       # a path prefixed by /cygdrive for fixpath to work.
14706       new_path="$CYGWIN_ROOT_PATH$input_path"
14707     fi
14708   fi
14709 
14710 
14711   if test "x$path" != "x$new_path"; then
14712     BOOT_JDK="$new_path"
14713     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14714 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14715   fi
14716 
14717   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14718 
14719   path="$BOOT_JDK"
14720   has_colon=`$ECHO $path | $GREP ^.:`
14721   new_path="$path"
14722   if test "x$has_colon" = x; then
14723     # Not in mixed or Windows style, start by that.
14724     new_path=`cmd //c echo $path`
14725   fi
14726 
14727 
14728   input_path="$new_path"
14729   # Check if we need to convert this using DOS-style short mode. If the path
14730   # contains just simple characters, use it. Otherwise (spaces, weird characters),
14731   # take no chances and rewrite it.
14732   # Note: m4 eats our [], so we need to use [ and ] instead.
14733   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14734   if test "x$has_forbidden_chars" != x; then
14735     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14736     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14737   fi
14738 
14739 
14740   windows_path="$new_path"
14741   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14742     unix_path=`$CYGPATH -u "$windows_path"`
14743     new_path="$unix_path"
14744   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14745     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14746     new_path="$unix_path"
14747   fi
14748 
14749   if test "x$path" != "x$new_path"; then
14750     BOOT_JDK="$new_path"
14751     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14752 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14753   fi
14754 
14755   # Save the first 10 bytes of this path to the storage, so fixpath can work.
14756   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14757 
14758   else
14759     # We're on a posix platform. Hooray! :)
14760     path="$BOOT_JDK"
14761     has_space=`$ECHO "$path" | $GREP " "`
14762     if test "x$has_space" != x; then
14763       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14764 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14765       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14766     fi
14767 
14768     # Use eval to expand a potential ~
14769     eval path="$path"
14770     if test ! -f "$path" && test ! -d "$path"; then
14771       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14772     fi
14773 
14774     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
14775   fi
14776 
14777               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14778 $as_echo_n "checking for Boot JDK... " >&6; }
14779               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14780 $as_echo "$BOOT_JDK" >&6; }
14781               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14782 $as_echo_n "checking Boot JDK version... " >&6; }
14783               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14784               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14785 $as_echo "$BOOT_JDK_VERSION" >&6; }
14786             fi # end check jdk version
14787           fi # end check rt.jar
14788         fi # end check javac
14789       fi # end check java
14790     fi # end check boot jdk found
14791   fi
14792 
14793     done
14794   fi
14795 
14796 
14797     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14798     if test "x$BOOT_JDK_FOUND" = xmaybe; then
14799       # Do we have a bin/java?
14800       if test ! -x "$BOOT_JDK/bin/java"; then
14801         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14802 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14803         BOOT_JDK_FOUND=no
14804       else
14805         # Do we have a bin/javac?
14806         if test ! -x "$BOOT_JDK/bin/javac"; then
14807           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14808 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14809           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14810 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14811           BOOT_JDK_FOUND=no
14812         else
14813           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14814           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14815             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14816 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14817             BOOT_JDK_FOUND=no
14818           else
14819             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14820             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14821 
14822             # Extra M4 quote needed to protect [] in grep expression.
14823             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14824             if test "x$FOUND_VERSION_78" = x; then
14825               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14826 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14827               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14828 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14829               BOOT_JDK_FOUND=no
14830             else
14831               # We're done! :-)
14832               BOOT_JDK_FOUND=yes
14833 
14834   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14835 
14836   # Input might be given as Windows format, start by converting to
14837   # unix format.
14838   path="$BOOT_JDK"
14839   new_path=`$CYGPATH -u "$path"`
14840 
14841   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14842   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14843   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14844   # "foo.exe" is OK but "foo" is an error.
14845   #
14846   # This test is therefore slightly more accurate than "test -f" to check for file precense.
14847   # It is also a way to make sure we got the proper file name for the real test later on.
14848   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14849   if test "x$test_shortpath" = x; then
14850     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14851 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14852     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14853   fi
14854 
14855   # Call helper function which possibly converts this using DOS-style short mode.
14856   # If so, the updated path is stored in $new_path.
14857 
14858   input_path="$new_path"
14859   # Check if we need to convert this using DOS-style short mode. If the path
14860   # contains just simple characters, use it. Otherwise (spaces, weird characters),
14861   # take no chances and rewrite it.
14862   # Note: m4 eats our [], so we need to use [ and ] instead.
14863   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14864   if test "x$has_forbidden_chars" != x; then
14865     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14866     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14867     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14868     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14869       # Going to short mode and back again did indeed matter. Since short mode is
14870       # case insensitive, let's make it lowercase to improve readability.
14871       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14872       # Now convert it back to Unix-stile (cygpath)
14873       input_path=`$CYGPATH -u "$shortmode_path"`
14874       new_path="$input_path"
14875     fi
14876   fi
14877 
14878   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14879   if test "x$test_cygdrive_prefix" = x; then
14880     # As a simple fix, exclude /usr/bin since it's not a real path.
14881     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14882       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14883       # a path prefixed by /cygdrive for fixpath to work.
14884       new_path="$CYGWIN_ROOT_PATH$input_path"
14885     fi
14886   fi
14887 
14888 
14889   if test "x$path" != "x$new_path"; then
14890     BOOT_JDK="$new_path"
14891     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14892 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14893   fi
14894 
14895   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14896 
14897   path="$BOOT_JDK"
14898   has_colon=`$ECHO $path | $GREP ^.:`
14899   new_path="$path"
14900   if test "x$has_colon" = x; then
14901     # Not in mixed or Windows style, start by that.
14902     new_path=`cmd //c echo $path`
14903   fi
14904 
14905 
14906   input_path="$new_path"
14907   # Check if we need to convert this using DOS-style short mode. If the path
14908   # contains just simple characters, use it. Otherwise (spaces, weird characters),
14909   # take no chances and rewrite it.
14910   # Note: m4 eats our [], so we need to use [ and ] instead.
14911   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14912   if test "x$has_forbidden_chars" != x; then
14913     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14914     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14915   fi
14916 
14917 
14918   windows_path="$new_path"
14919   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14920     unix_path=`$CYGPATH -u "$windows_path"`
14921     new_path="$unix_path"
14922   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14923     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14924     new_path="$unix_path"
14925   fi
14926 
14927   if test "x$path" != "x$new_path"; then
14928     BOOT_JDK="$new_path"
14929     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14930 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14931   fi
14932 
14933   # Save the first 10 bytes of this path to the storage, so fixpath can work.
14934   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14935 
14936   else
14937     # We're on a posix platform. Hooray! :)
14938     path="$BOOT_JDK"
14939     has_space=`$ECHO "$path" | $GREP " "`
14940     if test "x$has_space" != x; then
14941       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14942 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14943       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14944     fi
14945 
14946     # Use eval to expand a potential ~
14947     eval path="$path"
14948     if test ! -f "$path" && test ! -d "$path"; then
14949       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14950     fi
14951 
14952     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
14953   fi
14954 
14955               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14956 $as_echo_n "checking for Boot JDK... " >&6; }
14957               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14958 $as_echo "$BOOT_JDK" >&6; }
14959               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14960 $as_echo_n "checking Boot JDK version... " >&6; }
14961               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14962               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14963 $as_echo "$BOOT_JDK_VERSION" >&6; }
14964             fi # end check jdk version
14965           fi # end check rt.jar
14966         fi # end check javac
14967       fi # end check java
14968     fi # end check boot jdk found
14969   fi
14970 
14971   elif test "x$OPENJDK_TARGET_OS" = xlinux; then
14972 
14973   if test "x$BOOT_JDK_FOUND" = xno; then
14974     # Now execute the test
14975 
14976   BOOT_JDK_PREFIX="/usr/lib/jvm"
14977   BOOT_JDK_SUFFIX=""
14978   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
14979   if test "x$ALL_JDKS_FOUND" != x; then
14980     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
14981 
14982   if test "x$BOOT_JDK_FOUND" = xno; then
14983     # Now execute the test
14984 
14985         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
14986         if test -d "$BOOT_JDK"; then
14987           BOOT_JDK_FOUND=maybe
14988           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
14989 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
14990         fi
14991 
14992 
14993     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14994     if test "x$BOOT_JDK_FOUND" = xmaybe; then
14995       # Do we have a bin/java?
14996       if test ! -x "$BOOT_JDK/bin/java"; then
14997         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14998 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14999         BOOT_JDK_FOUND=no
15000       else
15001         # Do we have a bin/javac?
15002         if test ! -x "$BOOT_JDK/bin/javac"; then
15003           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
15004 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
15005           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
15006 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
15007           BOOT_JDK_FOUND=no
15008         else
15009           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
15010           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
15011             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
15012 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
15013             BOOT_JDK_FOUND=no
15014           else
15015             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
15016             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
15017 
15018             # Extra M4 quote needed to protect [] in grep expression.
15019             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
15020             if test "x$FOUND_VERSION_78" = x; then
15021               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
15022 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
15023               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
15024 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
15025               BOOT_JDK_FOUND=no
15026             else
15027               # We're done! :-)
15028               BOOT_JDK_FOUND=yes
15029 
15030   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15031 
15032   # Input might be given as Windows format, start by converting to
15033   # unix format.
15034   path="$BOOT_JDK"
15035   new_path=`$CYGPATH -u "$path"`
15036 
15037   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15038   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15039   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15040   # "foo.exe" is OK but "foo" is an error.
15041   #
15042   # This test is therefore slightly more accurate than "test -f" to check for file precense.
15043   # It is also a way to make sure we got the proper file name for the real test later on.
15044   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15045   if test "x$test_shortpath" = x; then
15046     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15047 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15048     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
15049   fi
15050 
15051   # Call helper function which possibly converts this using DOS-style short mode.
15052   # If so, the updated path is stored in $new_path.
15053 
15054   input_path="$new_path"
15055   # Check if we need to convert this using DOS-style short mode. If the path
15056   # contains just simple characters, use it. Otherwise (spaces, weird characters),
15057   # take no chances and rewrite it.
15058   # Note: m4 eats our [], so we need to use [ and ] instead.
15059   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15060   if test "x$has_forbidden_chars" != x; then
15061     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15062     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15063     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15064     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15065       # Going to short mode and back again did indeed matter. Since short mode is
15066       # case insensitive, let's make it lowercase to improve readability.
15067       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15068       # Now convert it back to Unix-stile (cygpath)
15069       input_path=`$CYGPATH -u "$shortmode_path"`
15070       new_path="$input_path"
15071     fi
15072   fi
15073 
15074   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15075   if test "x$test_cygdrive_prefix" = x; then
15076     # As a simple fix, exclude /usr/bin since it's not a real path.
15077     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15078       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15079       # a path prefixed by /cygdrive for fixpath to work.
15080       new_path="$CYGWIN_ROOT_PATH$input_path"
15081     fi
15082   fi
15083 
15084 
15085   if test "x$path" != "x$new_path"; then
15086     BOOT_JDK="$new_path"
15087     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15088 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15089   fi
15090 
15091   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15092 
15093   path="$BOOT_JDK"
15094   has_colon=`$ECHO $path | $GREP ^.:`
15095   new_path="$path"
15096   if test "x$has_colon" = x; then
15097     # Not in mixed or Windows style, start by that.
15098     new_path=`cmd //c echo $path`
15099   fi
15100 
15101 
15102   input_path="$new_path"
15103   # Check if we need to convert this using DOS-style short mode. If the path
15104   # contains just simple characters, use it. Otherwise (spaces, weird characters),
15105   # take no chances and rewrite it.
15106   # Note: m4 eats our [], so we need to use [ and ] instead.
15107   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15108   if test "x$has_forbidden_chars" != x; then
15109     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15110     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15111   fi
15112 
15113 
15114   windows_path="$new_path"
15115   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15116     unix_path=`$CYGPATH -u "$windows_path"`
15117     new_path="$unix_path"
15118   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15119     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15120     new_path="$unix_path"
15121   fi
15122 
15123   if test "x$path" != "x$new_path"; then
15124     BOOT_JDK="$new_path"
15125     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15126 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15127   fi
15128 
15129   # Save the first 10 bytes of this path to the storage, so fixpath can work.
15130   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15131 
15132   else
15133     # We're on a posix platform. Hooray! :)
15134     path="$BOOT_JDK"
15135     has_space=`$ECHO "$path" | $GREP " "`
15136     if test "x$has_space" != x; then
15137       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15138 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15139       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15140     fi
15141 
15142     # Use eval to expand a potential ~
15143     eval path="$path"
15144     if test ! -f "$path" && test ! -d "$path"; then
15145       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
15146     fi
15147 
15148     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
15149   fi
15150 
15151               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
15152 $as_echo_n "checking for Boot JDK... " >&6; }
15153               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
15154 $as_echo "$BOOT_JDK" >&6; }
15155               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
15156 $as_echo_n "checking Boot JDK version... " >&6; }
15157               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
15158               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
15159 $as_echo "$BOOT_JDK_VERSION" >&6; }
15160             fi # end check jdk version
15161           fi # end check rt.jar
15162         fi # end check javac
15163       fi # end check java
15164     fi # end check boot jdk found
15165   fi
15166 
15167     done
15168   fi
15169 
15170 
15171     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
15172     if test "x$BOOT_JDK_FOUND" = xmaybe; then
15173       # Do we have a bin/java?
15174       if test ! -x "$BOOT_JDK/bin/java"; then
15175         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
15176 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
15177         BOOT_JDK_FOUND=no
15178       else
15179         # Do we have a bin/javac?
15180         if test ! -x "$BOOT_JDK/bin/javac"; then
15181           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
15182 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
15183           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
15184 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
15185           BOOT_JDK_FOUND=no
15186         else
15187           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
15188           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
15189             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
15190 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
15191             BOOT_JDK_FOUND=no
15192           else
15193             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
15194             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
15195 
15196             # Extra M4 quote needed to protect [] in grep expression.
15197             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
15198             if test "x$FOUND_VERSION_78" = x; then
15199               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
15200 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
15201               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
15202 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
15203               BOOT_JDK_FOUND=no
15204             else
15205               # We're done! :-)
15206               BOOT_JDK_FOUND=yes
15207 
15208   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15209 
15210   # Input might be given as Windows format, start by converting to
15211   # unix format.
15212   path="$BOOT_JDK"
15213   new_path=`$CYGPATH -u "$path"`
15214 
15215   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15216   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15217   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15218   # "foo.exe" is OK but "foo" is an error.
15219   #
15220   # This test is therefore slightly more accurate than "test -f" to check for file precense.
15221   # It is also a way to make sure we got the proper file name for the real test later on.
15222   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15223   if test "x$test_shortpath" = x; then
15224     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15225 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15226     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
15227   fi
15228 
15229   # Call helper function which possibly converts this using DOS-style short mode.
15230   # If so, the updated path is stored in $new_path.
15231 
15232   input_path="$new_path"
15233   # Check if we need to convert this using DOS-style short mode. If the path
15234   # contains just simple characters, use it. Otherwise (spaces, weird characters),
15235   # take no chances and rewrite it.
15236   # Note: m4 eats our [], so we need to use [ and ] instead.
15237   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15238   if test "x$has_forbidden_chars" != x; then
15239     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15240     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15241     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15242     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15243       # Going to short mode and back again did indeed matter. Since short mode is
15244       # case insensitive, let's make it lowercase to improve readability.
15245       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15246       # Now convert it back to Unix-stile (cygpath)
15247       input_path=`$CYGPATH -u "$shortmode_path"`
15248       new_path="$input_path"
15249     fi
15250   fi
15251 
15252   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15253   if test "x$test_cygdrive_prefix" = x; then
15254     # As a simple fix, exclude /usr/bin since it's not a real path.
15255     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15256       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15257       # a path prefixed by /cygdrive for fixpath to work.
15258       new_path="$CYGWIN_ROOT_PATH$input_path"
15259     fi
15260   fi
15261 
15262 
15263   if test "x$path" != "x$new_path"; then
15264     BOOT_JDK="$new_path"
15265     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15266 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15267   fi
15268 
15269   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15270 
15271   path="$BOOT_JDK"
15272   has_colon=`$ECHO $path | $GREP ^.:`
15273   new_path="$path"
15274   if test "x$has_colon" = x; then
15275     # Not in mixed or Windows style, start by that.
15276     new_path=`cmd //c echo $path`
15277   fi
15278 
15279 
15280   input_path="$new_path"
15281   # Check if we need to convert this using DOS-style short mode. If the path
15282   # contains just simple characters, use it. Otherwise (spaces, weird characters),
15283   # take no chances and rewrite it.
15284   # Note: m4 eats our [], so we need to use [ and ] instead.
15285   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15286   if test "x$has_forbidden_chars" != x; then
15287     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15288     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15289   fi
15290 
15291 
15292   windows_path="$new_path"
15293   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15294     unix_path=`$CYGPATH -u "$windows_path"`
15295     new_path="$unix_path"
15296   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15297     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15298     new_path="$unix_path"
15299   fi
15300 
15301   if test "x$path" != "x$new_path"; then
15302     BOOT_JDK="$new_path"
15303     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15304 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15305   fi
15306 
15307   # Save the first 10 bytes of this path to the storage, so fixpath can work.
15308   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15309 
15310   else
15311     # We're on a posix platform. Hooray! :)
15312     path="$BOOT_JDK"
15313     has_space=`$ECHO "$path" | $GREP " "`
15314     if test "x$has_space" != x; then
15315       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15316 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15317       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15318     fi
15319 
15320     # Use eval to expand a potential ~
15321     eval path="$path"
15322     if test ! -f "$path" && test ! -d "$path"; then
15323       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
15324     fi
15325 
15326     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
15327   fi
15328 
15329               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
15330 $as_echo_n "checking for Boot JDK... " >&6; }
15331               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
15332 $as_echo "$BOOT_JDK" >&6; }
15333               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
15334 $as_echo_n "checking Boot JDK version... " >&6; }
15335               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
15336               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
15337 $as_echo "$BOOT_JDK_VERSION" >&6; }
15338             fi # end check jdk version
15339           fi # end check rt.jar
15340         fi # end check javac
15341       fi # end check java
15342     fi # end check boot jdk found
15343   fi
15344 
15345   fi
15346 
15347 
15348     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
15349     if test "x$BOOT_JDK_FOUND" = xmaybe; then
15350       # Do we have a bin/java?
15351       if test ! -x "$BOOT_JDK/bin/java"; then
15352         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
15353 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
15354         BOOT_JDK_FOUND=no
15355       else
15356         # Do we have a bin/javac?
15357         if test ! -x "$BOOT_JDK/bin/javac"; then
15358           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
15359 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
15360           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
15361 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
15362           BOOT_JDK_FOUND=no
15363         else
15364           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
15365           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
15366             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
15367 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
15368             BOOT_JDK_FOUND=no
15369           else
15370             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
15371             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
15372 
15373             # Extra M4 quote needed to protect [] in grep expression.
15374             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
15375             if test "x$FOUND_VERSION_78" = x; then
15376               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
15377 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
15378               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
15379 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
15380               BOOT_JDK_FOUND=no
15381             else
15382               # We're done! :-)
15383               BOOT_JDK_FOUND=yes
15384 
15385   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15386 
15387   # Input might be given as Windows format, start by converting to
15388   # unix format.
15389   path="$BOOT_JDK"
15390   new_path=`$CYGPATH -u "$path"`
15391 
15392   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15393   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15394   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15395   # "foo.exe" is OK but "foo" is an error.
15396   #
15397   # This test is therefore slightly more accurate than "test -f" to check for file precense.
15398   # It is also a way to make sure we got the proper file name for the real test later on.
15399   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15400   if test "x$test_shortpath" = x; then
15401     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15402 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15403     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
15404   fi
15405 
15406   # Call helper function which possibly converts this using DOS-style short mode.
15407   # If so, the updated path is stored in $new_path.
15408 
15409   input_path="$new_path"
15410   # Check if we need to convert this using DOS-style short mode. If the path
15411   # contains just simple characters, use it. Otherwise (spaces, weird characters),
15412   # take no chances and rewrite it.
15413   # Note: m4 eats our [], so we need to use [ and ] instead.
15414   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15415   if test "x$has_forbidden_chars" != x; then
15416     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15417     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15418     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15419     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15420       # Going to short mode and back again did indeed matter. Since short mode is
15421       # case insensitive, let's make it lowercase to improve readability.
15422       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15423       # Now convert it back to Unix-stile (cygpath)
15424       input_path=`$CYGPATH -u "$shortmode_path"`
15425       new_path="$input_path"
15426     fi
15427   fi
15428 
15429   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15430   if test "x$test_cygdrive_prefix" = x; then
15431     # As a simple fix, exclude /usr/bin since it's not a real path.
15432     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15433       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15434       # a path prefixed by /cygdrive for fixpath to work.
15435       new_path="$CYGWIN_ROOT_PATH$input_path"
15436     fi
15437   fi
15438 
15439 
15440   if test "x$path" != "x$new_path"; then
15441     BOOT_JDK="$new_path"
15442     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15443 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15444   fi
15445 
15446   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15447 
15448   path="$BOOT_JDK"
15449   has_colon=`$ECHO $path | $GREP ^.:`
15450   new_path="$path"
15451   if test "x$has_colon" = x; then
15452     # Not in mixed or Windows style, start by that.
15453     new_path=`cmd //c echo $path`
15454   fi
15455 
15456 
15457   input_path="$new_path"
15458   # Check if we need to convert this using DOS-style short mode. If the path
15459   # contains just simple characters, use it. Otherwise (spaces, weird characters),
15460   # take no chances and rewrite it.
15461   # Note: m4 eats our [], so we need to use [ and ] instead.
15462   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15463   if test "x$has_forbidden_chars" != x; then
15464     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15465     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15466   fi
15467 
15468 
15469   windows_path="$new_path"
15470   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15471     unix_path=`$CYGPATH -u "$windows_path"`
15472     new_path="$unix_path"
15473   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15474     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15475     new_path="$unix_path"
15476   fi
15477 
15478   if test "x$path" != "x$new_path"; then
15479     BOOT_JDK="$new_path"
15480     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15481 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15482   fi
15483 
15484   # Save the first 10 bytes of this path to the storage, so fixpath can work.
15485   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15486 
15487   else
15488     # We're on a posix platform. Hooray! :)
15489     path="$BOOT_JDK"
15490     has_space=`$ECHO "$path" | $GREP " "`
15491     if test "x$has_space" != x; then
15492       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15493 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15494       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15495     fi
15496 
15497     # Use eval to expand a potential ~
15498     eval path="$path"
15499     if test ! -f "$path" && test ! -d "$path"; then
15500       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
15501     fi
15502 
15503     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
15504   fi
15505 
15506               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
15507 $as_echo_n "checking for Boot JDK... " >&6; }
15508               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
15509 $as_echo "$BOOT_JDK" >&6; }
15510               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
15511 $as_echo_n "checking Boot JDK version... " >&6; }
15512               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
15513               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
15514 $as_echo "$BOOT_JDK_VERSION" >&6; }
15515             fi # end check jdk version
15516           fi # end check rt.jar
15517         fi # end check javac
15518       fi # end check java
15519     fi # end check boot jdk found
15520   fi
15521 
15522 
15523 # If we haven't found anything yet, we've truly lost. Give up.
15524 if test "x$BOOT_JDK_FOUND" = xno; then
15525 
15526     # Print a helpful message on how to acquire the necessary build dependency.
15527     # openjdk is the help tag: freetyp2, cups, pulse, alsa etc
15528     MISSING_DEPENDENCY=openjdk
15529     PKGHANDLER_COMMAND=
15530 
15531     case $PKGHANDLER in
15532         apt-get)
15533                 apt_help     $MISSING_DEPENDENCY ;;
15534     yum)
15535                 yum_help     $MISSING_DEPENDENCY ;;
15536         port)
15537                 port_help    $MISSING_DEPENDENCY ;;
15538         pkgutil)
15539                 pkgutil_help $MISSING_DEPENDENCY ;;
15540         pkgadd)
15541                 pkgadd_help  $MISSING_DEPENDENCY ;;
15542     * )
15543       break ;;
15544     esac
15545 
15546     if test "x$PKGHANDLER_COMMAND" != x; then
15547         HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
15548     fi
15549 
15550   { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find a valid Boot JDK. $HELP_MSG" >&5
15551 $as_echo "$as_me: Could not find a valid Boot JDK. $HELP_MSG" >&6;}
15552   { $as_echo "$as_me:${as_lineno-$LINENO}: This might be fixed by explicitely setting --with-boot-jdk" >&5
15553 $as_echo "$as_me: This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15554   as_fn_error $? "Cannot continue" "$LINENO" 5
15555 fi
15556 
15557 # Setup proper paths for what we found
15558 BOOT_RTJAR="$BOOT_JDK/jre/lib/rt.jar"
15559 if test ! -f "$BOOT_RTJAR"; then
15560     # On MacOSX it is called classes.jar
15561     BOOT_RTJAR="$BOOT_JDK/../Classes/classes.jar"
15562     if test -f "$BOOT_RTJAR"; then
15563       # Remove the ..
15564       BOOT_RTJAR="`cd ${BOOT_RTJAR%/*} && pwd`/${BOOT_RTJAR##*/}"
15565     fi
15566 fi
15567 BOOT_TOOLSJAR="$BOOT_JDK/lib/tools.jar"
15568 BOOT_JDK="$BOOT_JDK"
15569 
15570 
15571 
15572 
15573 # Setup tools from the Boot JDK.
15574 
15575   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
15576 $as_echo_n "checking for java in Boot JDK... " >&6; }
15577   JAVA=$BOOT_JDK/bin/java
15578   if test ! -x $JAVA; then
15579       { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15580 $as_echo "not found" >&6; }
15581       { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15582 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15583       as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
15584   fi
15585   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15586 $as_echo "ok" >&6; }
15587 
15588 
15589   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
15590 $as_echo_n "checking for javac in Boot JDK... " >&6; }
15591   JAVAC=$BOOT_JDK/bin/javac
15592   if test ! -x $JAVAC; then
15593       { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15594 $as_echo "not found" >&6; }
15595       { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15596 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15597       as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
15598   fi
15599   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15600 $as_echo "ok" >&6; }
15601 
15602 
15603   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
15604 $as_echo_n "checking for javah in Boot JDK... " >&6; }
15605   JAVAH=$BOOT_JDK/bin/javah
15606   if test ! -x $JAVAH; then
15607       { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15608 $as_echo "not found" >&6; }
15609       { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15610 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15611       as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
15612   fi
15613   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15614 $as_echo "ok" >&6; }
15615 
15616 
15617   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javap in Boot JDK" >&5
15618 $as_echo_n "checking for javap in Boot JDK... " >&6; }
15619   JAVAP=$BOOT_JDK/bin/javap
15620   if test ! -x $JAVAP; then
15621       { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15622 $as_echo "not found" >&6; }
15623       { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15624 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15625       as_fn_error $? "Could not find javap in the Boot JDK" "$LINENO" 5
15626   fi
15627   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15628 $as_echo "ok" >&6; }
15629 
15630 
15631   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
15632 $as_echo_n "checking for jar in Boot JDK... " >&6; }
15633   JAR=$BOOT_JDK/bin/jar
15634   if test ! -x $JAR; then
15635       { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15636 $as_echo "not found" >&6; }
15637       { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15638 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15639       as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
15640   fi
15641   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15642 $as_echo "ok" >&6; }
15643 
15644 
15645   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for rmic in Boot JDK" >&5
15646 $as_echo_n "checking for rmic in Boot JDK... " >&6; }
15647   RMIC=$BOOT_JDK/bin/rmic
15648   if test ! -x $RMIC; then
15649       { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15650 $as_echo "not found" >&6; }
15651       { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15652 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15653       as_fn_error $? "Could not find rmic in the Boot JDK" "$LINENO" 5
15654   fi
15655   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15656 $as_echo "ok" >&6; }
15657 
15658 
15659   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for native2ascii in Boot JDK" >&5
15660 $as_echo_n "checking for native2ascii in Boot JDK... " >&6; }
15661   NATIVE2ASCII=$BOOT_JDK/bin/native2ascii
15662   if test ! -x $NATIVE2ASCII; then
15663       { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15664 $as_echo "not found" >&6; }
15665       { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15666 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15667       as_fn_error $? "Could not find native2ascii in the Boot JDK" "$LINENO" 5
15668   fi
15669   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15670 $as_echo "ok" >&6; }
15671 
15672 
15673 # Finally, set some other options...
15674 
15675 # When compiling code to be executed by the Boot JDK, force jdk7 compatibility.
15676 BOOT_JDK_SOURCETARGET="-source 7 -target 7"
15677 
15678 
15679 
15680 
15681 ##############################################################################
15682 #
15683 # Specify options for anything that is run with the Boot JDK.
15684 #
15685 
15686 # Check whether --with-boot-jdk-jvmargs was given.
15687 if test "${with_boot_jdk_jvmargs+set}" = set; then :
15688   withval=$with_boot_jdk_jvmargs;
15689 fi
15690 
15691 
15692 if test "x$with_boot_jdk_jvmargs" = x; then
15693     # Not all JVM:s accept the same arguments on the command line.
15694     # OpenJDK specific increase in thread stack for JDK build,
15695     # well more specifically, when running javac.
15696     if test "x$BUILD_NUM_BITS" = x32; then
15697        STACK_SIZE=768
15698     else
15699        # Running Javac on a JVM on a 64-bit machine, the stack takes more space
15700        # since 64-bit pointers are pushed on the stach. Apparently, we need
15701        # to increase the stack space when javacing the JDK....
15702        STACK_SIZE=1536
15703     fi
15704 
15705     # Minimum amount of heap memory.
15706 
15707     $ECHO "Check if jvm arg is ok: -Xms64M" >&5
15708     $ECHO "Command: $JAVA -Xms64M -version" >&5
15709     OUTPUT=`$JAVA -Xms64M -version 2>&1`
15710     FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
15711     FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
15712     if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15713         boot_jdk_jvmargs="$boot_jdk_jvmargs -Xms64M"
15714         JVM_ARG_OK=true
15715     else
15716         $ECHO "Arg failed:" >&5
15717         $ECHO "$OUTPUT" >&5
15718         JVM_ARG_OK=false
15719     fi
15720 
15721     if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
15722         # Why does macosx need more heap? Its the huge JDK batch.
15723 
15724     $ECHO "Check if jvm arg is ok: -Xmx1600M" >&5
15725     $ECHO "Command: $JAVA -Xmx1600M -version" >&5
15726     OUTPUT=`$JAVA -Xmx1600M -version 2>&1`
15727     FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
15728     FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
15729     if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15730         boot_jdk_jvmargs="$boot_jdk_jvmargs -Xmx1600M"
15731         JVM_ARG_OK=true
15732     else
15733         $ECHO "Arg failed:" >&5
15734         $ECHO "$OUTPUT" >&5
15735         JVM_ARG_OK=false
15736     fi
15737 
15738     else
15739 
15740     $ECHO "Check if jvm arg is ok: -Xmx1100M" >&5
15741     $ECHO "Command: $JAVA -Xmx1100M -version" >&5
15742     OUTPUT=`$JAVA -Xmx1100M -version 2>&1`
15743     FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
15744     FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
15745     if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15746         boot_jdk_jvmargs="$boot_jdk_jvmargs -Xmx1100M"
15747         JVM_ARG_OK=true
15748     else
15749         $ECHO "Arg failed:" >&5
15750         $ECHO "$OUTPUT" >&5
15751         JVM_ARG_OK=false
15752     fi
15753 
15754     fi
15755     # When is adding -client something that speeds up the JVM?
15756     # ADD_JVM_ARG_IF_OK([-client],boot_jdk_jvmargs,[$JAVA])
15757 
15758     $ECHO "Check if jvm arg is ok: -XX:PermSize=32m" >&5
15759     $ECHO "Command: $JAVA -XX:PermSize=32m -version" >&5
15760     OUTPUT=`$JAVA -XX:PermSize=32m -version 2>&1`
15761     FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
15762     FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
15763     if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15764         boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:PermSize=32m"
15765         JVM_ARG_OK=true
15766     else
15767         $ECHO "Arg failed:" >&5
15768         $ECHO "$OUTPUT" >&5
15769         JVM_ARG_OK=false
15770     fi
15771 
15772 
15773     $ECHO "Check if jvm arg is ok: -XX:MaxPermSize=160m" >&5
15774     $ECHO "Command: $JAVA -XX:MaxPermSize=160m -version" >&5
15775     OUTPUT=`$JAVA -XX:MaxPermSize=160m -version 2>&1`
15776     FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
15777     FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
15778     if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15779         boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:MaxPermSize=160m"
15780         JVM_ARG_OK=true
15781     else
15782         $ECHO "Arg failed:" >&5
15783         $ECHO "$OUTPUT" >&5
15784         JVM_ARG_OK=false
15785     fi
15786 
15787 
15788     $ECHO "Check if jvm arg is ok: -XX:ThreadStackSize=$STACK_SIZE" >&5
15789     $ECHO "Command: $JAVA -XX:ThreadStackSize=$STACK_SIZE -version" >&5
15790     OUTPUT=`$JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1`
15791     FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
15792     FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
15793     if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15794         boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:ThreadStackSize=$STACK_SIZE"
15795         JVM_ARG_OK=true
15796     else
15797         $ECHO "Arg failed:" >&5
15798         $ECHO "$OUTPUT" >&5
15799         JVM_ARG_OK=false
15800     fi
15801 
15802     # Disable special log output when a debug build is used as Boot JDK...
15803 
15804     $ECHO "Check if jvm arg is ok: -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput" >&5
15805     $ECHO "Command: $JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version" >&5
15806     OUTPUT=`$JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version 2>&1`
15807     FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
15808     FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
15809     if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15810         boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput"
15811         JVM_ARG_OK=true
15812     else
15813         $ECHO "Arg failed:" >&5
15814         $ECHO "$OUTPUT" >&5
15815         JVM_ARG_OK=false
15816     fi
15817 
15818 fi
15819 
15820 BOOT_JDK_JVMARGS=$boot_jdk_jvmargs
15821 
15822 
15823 
15824 ###############################################################################
15825 #
15826 # Configure the sources to use. We can add or override individual directories.
15827 #
15828 ###############################################################################
15829 
15830 
15831 
15832 # Where are the sources. Any of these can be overridden
15833 # using --with-override-corba and the likes.
15834 LANGTOOLS_TOPDIR="$SRC_ROOT/langtools"
15835 CORBA_TOPDIR="$SRC_ROOT/corba"
15836 JAXP_TOPDIR="$SRC_ROOT/jaxp"
15837 JAXWS_TOPDIR="$SRC_ROOT/jaxws"
15838 HOTSPOT_TOPDIR="$SRC_ROOT/hotspot"
15839 NASHORN_TOPDIR="$SRC_ROOT/nashorn"
15840 JDK_TOPDIR="$SRC_ROOT/jdk"
15841 
15842 
15843 
15844 
15845 
15846 
15847 
15848 
15849 
15850 
15851 ###############################################################################
15852 #
15853 # Pickup additional source for a component from outside of the source root
15854 # or override source for a component.
15855 #
15856 
15857 # Check whether --with-add-source-root was given.
15858 if test "${with_add_source_root+set}" = set; then :
15859   withval=$with_add_source_root;
15860 fi
15861 
15862 
15863 
15864 # Check whether --with-override-source-root was given.
15865 if test "${with_override_source_root+set}" = set; then :
15866   withval=$with_override_source_root;
15867 fi
15868 
15869 
15870 
15871 # Check whether --with-adds-and-overrides was given.
15872 if test "${with_adds_and_overrides+set}" = set; then :
15873   withval=$with_adds_and_overrides;
15874 fi
15875 
15876 
15877 if test "x$with_adds_and_overrides" != x; then
15878     with_add_source_root="$with_adds_and_overrides/adds"
15879     with_override_source_root="$with_adds_and_overrides/overrides"
15880 fi
15881 
15882 if test "x$with_add_source_root" != x; then
15883     if ! test -d $with_add_source_root; then
15884        as_fn_error $? "Trying to use a non-existant add-source-root $with_add_source_root" "$LINENO" 5
15885     fi
15886     CURDIR="$PWD"
15887     cd "$with_add_source_root"
15888     ADD_SRC_ROOT="`pwd`"
15889     cd "$CURDIR"
15890     # Verify that the addon source root does not have any root makefiles.
15891     # If it does, then it is usually an error, prevent this.
15892     if test -f $with_add_source_root/langtools/makefiles/Makefile || \
15893        test -f $with_add_source_root/langtools/make/Makefile; then
15894         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
15895     fi
15896     if test -f $with_add_source_root/corba/makefiles/Makefile || \
15897        test -f $with_add_source_root/corba/make/Makefile; then
15898         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
15899     fi
15900     if test -f $with_add_source_root/jaxp/makefiles/Makefile || \
15901        test -f $with_add_source_root/jaxp/make/Makefile; then
15902         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
15903     fi
15904     if test -f $with_add_source_root/jaxws/makefiles/Makefile || \
15905        test -f $with_add_source_root/jaxws/make/Makefile; then
15906         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
15907     fi
15908     if test -f $with_add_source_root/hotspot/makefiles/Makefile || \
15909        test -f $with_add_source_root/hotspot/make/Makefile; then
15910         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
15911     fi
15912     if test -f $with_add_source_root/jdk/makefiles/Makefile || \
15913        test -f $with_add_source_root/jdk/make/Makefile; then
15914         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
15915     fi
15916 fi
15917 
15918 
15919 if test "x$with_override_source_root" != x; then
15920     if ! test -d $with_override_source_root; then
15921        as_fn_error $? "Trying to use a non-existant override-source-root $with_override_source_root" "$LINENO" 5
15922     fi
15923     CURDIR="$PWD"
15924     cd "$with_override_source_root"
15925     OVERRIDE_SRC_ROOT="`pwd`"
15926     cd "$CURDIR"
15927     if test -f $with_override_source_root/langtools/makefiles/Makefile || \
15928        test -f $with_override_source_root/langtools/make/Makefile; then
15929         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
15930     fi
15931     if test -f $with_override_source_root/corba/makefiles/Makefile || \
15932        test -f $with_override_source_root/corba/make/Makefile; then
15933         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
15934     fi
15935     if test -f $with_override_source_root/jaxp/makefiles/Makefile || \
15936        test -f $with_override_source_root/jaxp/make/Makefile; then
15937         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
15938     fi
15939     if test -f $with_override_source_root/jaxws/makefiles/Makefile || \
15940        test -f $with_override_source_root/jaxws/make/Makefile; then
15941         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
15942     fi
15943     if test -f $with_override_source_root/hotspot/makefiles/Makefile || \
15944        test -f $with_override_source_root/hotspot/make/Makefile; then
15945         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
15946     fi
15947     if test -f $with_override_source_root/jdk/makefiles/Makefile || \
15948        test -f $with_override_source_root/jdk/make/Makefile; then
15949         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
15950     fi
15951 fi
15952 
15953 
15954 ###############################################################################
15955 #
15956 # Override a repo completely, this is used for example when you have 3 small
15957 # development sandboxes of the langtools sources and want to avoid having 3 full
15958 # OpenJDK sources checked out on disk.
15959 #
15960 # Assuming that the 3 langtools sandboxes are located here:
15961 # /home/fredrik/sandbox1/langtools
15962 # /home/fredrik/sandbox2/langtools
15963 # /home/fredrik/sandbox3/langtools
15964 #
15965 # From the source root you create build subdirs manually:
15966 #     mkdir -p build1 build2 build3
15967 # in each build directory run:
15968 #     (cd build1 && ../configure --with-override-langtools=/home/fredrik/sandbox1 && make)
15969 #     (cd build2 && ../configure --with-override-langtools=/home/fredrik/sandbox2 && make)
15970 #     (cd build3 && ../configure --with-override-langtools=/home/fredrik/sandbox3 && make)
15971 #
15972 
15973 
15974 # Check whether --with-override-langtools was given.
15975 if test "${with_override_langtools+set}" = set; then :
15976   withval=$with_override_langtools;
15977 fi
15978 
15979 
15980 
15981 # Check whether --with-override-corba was given.
15982 if test "${with_override_corba+set}" = set; then :
15983   withval=$with_override_corba;
15984 fi
15985 
15986 
15987 
15988 # Check whether --with-override-jaxp was given.
15989 if test "${with_override_jaxp+set}" = set; then :
15990   withval=$with_override_jaxp;
15991 fi
15992 
15993 
15994 
15995 # Check whether --with-override-jaxws was given.
15996 if test "${with_override_jaxws+set}" = set; then :
15997   withval=$with_override_jaxws;
15998 fi
15999 
16000 
16001 
16002 # Check whether --with-override-hotspot was given.
16003 if test "${with_override_hotspot+set}" = set; then :
16004   withval=$with_override_hotspot;
16005 fi
16006 
16007 
16008 
16009 # Check whether --with-override-jdk was given.
16010 if test "${with_override_jdk+set}" = set; then :
16011   withval=$with_override_jdk;
16012 fi
16013 
16014 
16015 if test "x$with_override_langtools" != x; then
16016     CURDIR="$PWD"
16017     cd "$with_override_langtools"
16018     LANGTOOLS_TOPDIR="`pwd`"
16019     cd "$CURDIR"
16020     if ! test -f $LANGTOOLS_TOPDIR/makefiles/Makefile; then
16021         as_fn_error $? "You have to override langtools with a full langtools repo!" "$LINENO" 5
16022     fi
16023     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if langtools should be overridden" >&5
16024 $as_echo_n "checking if langtools should be overridden... " >&6; }
16025     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $LANGTOOLS_TOPDIR" >&5
16026 $as_echo "yes with $LANGTOOLS_TOPDIR" >&6; }
16027 fi
16028 if test "x$with_override_corba" != x; then
16029     CURDIR="$PWD"
16030     cd "$with_override_corba"
16031     CORBA_TOPDIR="`pwd`"
16032     cd "$CURDIR"
16033     if ! test -f $CORBA_TOPDIR/makefiles/Makefile; then
16034         as_fn_error $? "You have to override corba with a full corba repo!" "$LINENO" 5
16035     fi
16036     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if corba should be overridden" >&5
16037 $as_echo_n "checking if corba should be overridden... " >&6; }
16038     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $CORBA_TOPDIR" >&5
16039 $as_echo "yes with $CORBA_TOPDIR" >&6; }
16040 fi
16041 if test "x$with_override_jaxp" != x; then
16042     CURDIR="$PWD"
16043     cd "$with_override_jaxp"
16044     JAXP_TOPDIR="`pwd`"
16045     cd "$CURDIR"
16046     if ! test -f $JAXP_TOPDIR/makefiles/Makefile; then
16047         as_fn_error $? "You have to override jaxp with a full jaxp repo!" "$LINENO" 5
16048     fi
16049     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jaxp should be overridden" >&5
16050 $as_echo_n "checking if jaxp should be overridden... " >&6; }
16051     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JAXP_TOPDIR" >&5
16052 $as_echo "yes with $JAXP_TOPDIR" >&6; }
16053 fi
16054 if test "x$with_override_jaxws" != x; then
16055     CURDIR="$PWD"
16056     cd "$with_override_jaxws"
16057     JAXWS_TOPDIR="`pwd`"
16058     cd "$CURDIR"
16059     if ! test -f $JAXWS_TOPDIR/makefiles/Makefile; then
16060         as_fn_error $? "You have to override jaxws with a full jaxws repo!" "$LINENO" 5
16061     fi
16062     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jaxws should be overridden" >&5
16063 $as_echo_n "checking if jaxws should be overridden... " >&6; }
16064     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JAXWS_TOPDIR" >&5
16065 $as_echo "yes with $JAXWS_TOPDIR" >&6; }
16066 fi
16067 if test "x$with_override_hotspot" != x; then
16068     CURDIR="$PWD"
16069     cd "$with_override_hotspot"
16070     HOTSPOT_TOPDIR="`pwd`"
16071     cd "$CURDIR"
16072     if ! test -f $HOTSPOT_TOPDIR/make/Makefile && \
16073        ! test -f $HOTSPOT_TOPDIR/makefiles/Makefile; then
16074         as_fn_error $? "You have to override hotspot with a full hotspot repo!" "$LINENO" 5
16075     fi
16076     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be overridden" >&5
16077 $as_echo_n "checking if hotspot should be overridden... " >&6; }
16078     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $HOTSPOT_TOPDIR" >&5
16079 $as_echo "yes with $HOTSPOT_TOPDIR" >&6; }
16080 fi
16081 if test "x$with_override_nashorn" != x; then
16082     CURDIR="$PWD"
16083     cd "$with_override_nashorn"
16084     NASHORN_TOPDIR="`pwd`"
16085     cd "$CURDIR"
16086     if ! test -f $NASHORN_TOPDIR/makefiles/BuildNashorn.gmk; then
16087         as_fn_error $? "You have to override nashorn with a full nashorn repo!" "$LINENO" 5
16088     fi
16089     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if nashorn should be overridden" >&5
16090 $as_echo_n "checking if nashorn should be overridden... " >&6; }
16091     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $NASHORN_TOPDIR" >&5
16092 $as_echo "yes with $NASHORN_TOPDIR" >&6; }
16093 fi
16094 if test "x$with_override_jdk" != x; then
16095     CURDIR="$PWD"
16096     cd "$with_override_jdk"
16097     JDK_TOPDIR="`pwd`"
16098     cd "$CURDIR"
16099     if ! test -f $JDK_TOPDIR/makefiles/Makefile; then
16100         as_fn_error $? "You have to override JDK with a full JDK repo!" "$LINENO" 5
16101     fi
16102     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if JDK should be overridden" >&5
16103 $as_echo_n "checking if JDK should be overridden... " >&6; }
16104     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JDK_TOPDIR" >&5
16105 $as_echo "yes with $JDK_TOPDIR" >&6; }
16106 fi
16107 
16108 
16109 
16110 BUILD_OUTPUT="$OUTPUT_ROOT"
16111 
16112 
16113 HOTSPOT_DIST="$OUTPUT_ROOT/hotspot/dist"
16114 BUILD_HOTSPOT=true
16115 
16116 
16117 
16118 # Check whether --with-import-hotspot was given.
16119 if test "${with_import_hotspot+set}" = set; then :
16120   withval=$with_import_hotspot;
16121 fi
16122 
16123 if test "x$with_import_hotspot" != x; then
16124     CURDIR="$PWD"
16125     cd "$with_import_hotspot"
16126     HOTSPOT_DIST="`pwd`"
16127     cd "$CURDIR"
16128     if ! (test -d $HOTSPOT_DIST/lib && test -d $HOTSPOT_DIST/jre/lib); then
16129         as_fn_error $? "You have to import hotspot from a full jdk image or hotspot build dist dir!" "$LINENO" 5
16130     fi
16131     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be imported" >&5
16132 $as_echo_n "checking if hotspot should be imported... " >&6; }
16133     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes from $HOTSPOT_DIST" >&5
16134 $as_echo "yes from $HOTSPOT_DIST" >&6; }
16135     BUILD_HOTSPOT=false
16136 fi
16137 
16138 JDK_OUTPUTDIR="$OUTPUT_ROOT/jdk"
16139 
16140 
16141 ###############################################################################
16142 #
16143 # Setup the toolchain (compilers etc), i.e. the tools that need to be
16144 # cross-compilation aware.
16145 #
16146 ###############################################################################
16147 
16148 
16149 ###############################################################################
16150 #
16151 # Configure the development tool paths and potential sysroot.
16152 #
16153 ac_ext=cpp
16154 ac_cpp='$CXXCPP $CPPFLAGS'
16155 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
16156 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
16157 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
16158 
16159 
16160 # The option used to specify the target .o,.a or .so file.
16161 # When compiling, how to specify the to be created object file.
16162 CC_OUT_OPTION='-o$(SPACE)'
16163 # When linking, how to specify the to be created executable.
16164 EXE_OUT_OPTION='-o$(SPACE)'
16165 # When linking, how to specify the to be created dynamically linkable library.
16166 LD_OUT_OPTION='-o$(SPACE)'
16167 # When archiving, how to specify the to be create static archive for object files.
16168 AR_OUT_OPTION='rcs$(SPACE)'
16169 
16170 
16171 
16172 
16173 
16174 # Locate the actual tools
16175 
16176 
16177 # Check whether --with-jtreg was given.
16178 if test "${with_jtreg+set}" = set; then :
16179   withval=$with_jtreg;
16180 else
16181   with_jtreg=no
16182 fi
16183 
16184 
16185   if test "x$with_jtreg" = xno; then
16186     # jtreg disabled
16187     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
16188 $as_echo_n "checking for jtreg... " >&6; }
16189     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16190 $as_echo "no" >&6; }
16191   else
16192     if test "x$with_jtreg" != xyes; then
16193       # with path specified.
16194       JT_HOME="$with_jtreg"
16195     fi
16196 
16197     if test "x$JT_HOME" != x; then
16198       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
16199 $as_echo_n "checking for jtreg... " >&6; }
16200 
16201       # use JT_HOME enviroment var.
16202 
16203   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16204 
16205   # Input might be given as Windows format, start by converting to
16206   # unix format.
16207   path="$JT_HOME"
16208   new_path=`$CYGPATH -u "$path"`
16209 
16210   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16211   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16212   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16213   # "foo.exe" is OK but "foo" is an error.
16214   #
16215   # This test is therefore slightly more accurate than "test -f" to check for file precense.
16216   # It is also a way to make sure we got the proper file name for the real test later on.
16217   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16218   if test "x$test_shortpath" = x; then
16219     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
16220 $as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
16221     as_fn_error $? "Cannot locate the the path of JT_HOME" "$LINENO" 5
16222   fi
16223 
16224   # Call helper function which possibly converts this using DOS-style short mode.
16225   # If so, the updated path is stored in $new_path.
16226 
16227   input_path="$new_path"
16228   # Check if we need to convert this using DOS-style short mode. If the path
16229   # contains just simple characters, use it. Otherwise (spaces, weird characters),
16230   # take no chances and rewrite it.
16231   # Note: m4 eats our [], so we need to use [ and ] instead.
16232   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16233   if test "x$has_forbidden_chars" != x; then
16234     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16235     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16236     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16237     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16238       # Going to short mode and back again did indeed matter. Since short mode is
16239       # case insensitive, let's make it lowercase to improve readability.
16240       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16241       # Now convert it back to Unix-stile (cygpath)
16242       input_path=`$CYGPATH -u "$shortmode_path"`
16243       new_path="$input_path"
16244     fi
16245   fi
16246 
16247   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16248   if test "x$test_cygdrive_prefix" = x; then
16249     # As a simple fix, exclude /usr/bin since it's not a real path.
16250     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
16251       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16252       # a path prefixed by /cygdrive for fixpath to work.
16253       new_path="$CYGWIN_ROOT_PATH$input_path"
16254     fi
16255   fi
16256 
16257 
16258   if test "x$path" != "x$new_path"; then
16259     JT_HOME="$new_path"
16260     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
16261 $as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
16262   fi
16263 
16264   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16265 
16266   path="$JT_HOME"
16267   has_colon=`$ECHO $path | $GREP ^.:`
16268   new_path="$path"
16269   if test "x$has_colon" = x; then
16270     # Not in mixed or Windows style, start by that.
16271     new_path=`cmd //c echo $path`
16272   fi
16273 
16274 
16275   input_path="$new_path"
16276   # Check if we need to convert this using DOS-style short mode. If the path
16277   # contains just simple characters, use it. Otherwise (spaces, weird characters),
16278   # take no chances and rewrite it.
16279   # Note: m4 eats our [], so we need to use [ and ] instead.
16280   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16281   if test "x$has_forbidden_chars" != x; then
16282     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16283     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16284   fi
16285 
16286 
16287   windows_path="$new_path"
16288   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16289     unix_path=`$CYGPATH -u "$windows_path"`
16290     new_path="$unix_path"
16291   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16292     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16293     new_path="$unix_path"
16294   fi
16295 
16296   if test "x$path" != "x$new_path"; then
16297     JT_HOME="$new_path"
16298     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
16299 $as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
16300   fi
16301 
16302   # Save the first 10 bytes of this path to the storage, so fixpath can work.
16303   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16304 
16305   else
16306     # We're on a posix platform. Hooray! :)
16307     path="$JT_HOME"
16308     has_space=`$ECHO "$path" | $GREP " "`
16309     if test "x$has_space" != x; then
16310       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
16311 $as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
16312       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
16313     fi
16314 
16315     # Use eval to expand a potential ~
16316     eval path="$path"
16317     if test ! -f "$path" && test ! -d "$path"; then
16318       as_fn_error $? "The path of JT_HOME, which resolves as \"$path\", is not found." "$LINENO" 5
16319     fi
16320 
16321     JT_HOME="`cd "$path"; $THEPWDCMD -L`"
16322   fi
16323 
16324 
16325       # jtreg win32 script works for everybody
16326       JTREGEXE="$JT_HOME/win32/bin/jtreg"
16327 
16328       if test ! -f "$JTREGEXE"; then
16329         as_fn_error $? "JTReg executable does not exist: $JTREGEXE" "$LINENO" 5
16330       fi
16331 
16332       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
16333 $as_echo "$JTREGEXE" >&6; }
16334     else
16335       # try to find jtreg on path
16336 
16337     for ac_prog in jtreg
16338 do
16339   # Extract the first word of "$ac_prog", so it can be a program name with args.
16340 set dummy $ac_prog; ac_word=$2
16341 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16342 $as_echo_n "checking for $ac_word... " >&6; }
16343 if test "${ac_cv_path_JTREGEXE+set}" = set; then :
16344   $as_echo_n "(cached) " >&6
16345 else
16346   case $JTREGEXE in
16347   [\\/]* | ?:[\\/]*)
16348   ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
16349   ;;
16350   *)
16351   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16352 for as_dir in $PATH
16353 do
16354   IFS=$as_save_IFS
16355   test -z "$as_dir" && as_dir=.
16356     for ac_exec_ext in '' $ac_executable_extensions; do
16357   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
16358     ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
16359     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16360     break 2
16361   fi
16362 done
16363   done
16364 IFS=$as_save_IFS
16365 
16366   ;;
16367 esac
16368 fi
16369 JTREGEXE=$ac_cv_path_JTREGEXE
16370 if test -n "$JTREGEXE"; then
16371   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
16372 $as_echo "$JTREGEXE" >&6; }
16373 else
16374   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16375 $as_echo "no" >&6; }
16376 fi
16377 
16378 
16379   test -n "$JTREGEXE" && break
16380 done
16381 
16382 
16383     if test "x$JTREGEXE" = x; then
16384         if test "xjtreg" = x; then
16385           PROG_NAME=jtregexe
16386         else
16387           PROG_NAME=jtreg
16388         fi
16389         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
16390 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
16391         as_fn_error $? "Cannot continue" "$LINENO" 5
16392     fi
16393 
16394 
16395       JT_HOME="`$DIRNAME $JTREGEXE`"
16396     fi
16397   fi
16398 
16399 
16400 
16401 
16402 
16403 if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
16404 
16405   # Store path to cygwin link.exe to help excluding it when searching for
16406   # VS linker. This must be done before changing the PATH when looking for VS.
16407   # Extract the first word of "link", so it can be a program name with args.
16408 set dummy link; ac_word=$2
16409 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16410 $as_echo_n "checking for $ac_word... " >&6; }
16411 if test "${ac_cv_path_CYGWIN_LINK+set}" = set; then :
16412   $as_echo_n "(cached) " >&6
16413 else
16414   case $CYGWIN_LINK in
16415   [\\/]* | ?:[\\/]*)
16416   ac_cv_path_CYGWIN_LINK="$CYGWIN_LINK" # Let the user override the test with a path.
16417   ;;
16418   *)
16419   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16420 for as_dir in $PATH
16421 do
16422   IFS=$as_save_IFS
16423   test -z "$as_dir" && as_dir=.
16424     for ac_exec_ext in '' $ac_executable_extensions; do
16425   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
16426     ac_cv_path_CYGWIN_LINK="$as_dir/$ac_word$ac_exec_ext"
16427     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16428     break 2
16429   fi
16430 done
16431   done
16432 IFS=$as_save_IFS
16433 
16434   ;;
16435 esac
16436 fi
16437 CYGWIN_LINK=$ac_cv_path_CYGWIN_LINK
16438 if test -n "$CYGWIN_LINK"; then
16439   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_LINK" >&5
16440 $as_echo "$CYGWIN_LINK" >&6; }
16441 else
16442   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16443 $as_echo "no" >&6; }
16444 fi
16445 
16446 
16447   if test "x$CYGWIN_LINK" != x; then
16448     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the first found link.exe is actually the Cygwin link tool" >&5
16449 $as_echo_n "checking if the first found link.exe is actually the Cygwin link tool... " >&6; }
16450     "$CYGWIN_LINK" --version > /dev/null
16451     if test $? -eq 0 ; then
16452       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16453 $as_echo "yes" >&6; }
16454     else
16455       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16456 $as_echo "no" >&6; }
16457       # This might be the VS linker. Don't exclude it later on.
16458       CYGWIN_LINK=""
16459     fi
16460   fi
16461 
16462   # First-hand choice is to locate and run the vsvars bat file.
16463 
16464   if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
16465     VCVARSFILE="vc/bin/vcvars32.bat"
16466   else
16467     VCVARSFILE="vc/bin/amd64/vcvars64.bat"
16468   fi
16469 
16470   VS_ENV_CMD=""
16471   VS_ENV_ARGS=""
16472   if test "x$with_toolsdir" != x; then
16473 
16474   if test "x$VS_ENV_CMD" = x; then
16475     VS100BASE="$with_toolsdir/../.."
16476     METHOD="--with-tools-dir"
16477 
16478   windows_path="$VS100BASE"
16479   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16480     unix_path=`$CYGPATH -u "$windows_path"`
16481     VS100BASE="$unix_path"
16482   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16483     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16484     VS100BASE="$unix_path"
16485   fi
16486 
16487     if test -d "$VS100BASE"; then
16488       if test -f "$VS100BASE/$VCVARSFILE"; then
16489         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16490 $as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16491         VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16492       else
16493         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16494 $as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16495         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16496 $as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16497       fi
16498     fi
16499   fi
16500 
16501   fi
16502 
16503   if test "x$with_toolsdir" != x && test "x$VS_ENV_CMD" = x; then
16504     # Having specified an argument which is incorrect will produce an instant failure;
16505     # we should not go on looking
16506     { $as_echo "$as_me:${as_lineno-$LINENO}: The path given by --with-tools-dir does not contain a valid Visual Studio installation" >&5
16507 $as_echo "$as_me: The path given by --with-tools-dir does not contain a valid Visual Studio installation" >&6;}
16508     { $as_echo "$as_me:${as_lineno-$LINENO}: Please point to the VC/bin directory within the Visual Studio installation" >&5
16509 $as_echo "$as_me: Please point to the VC/bin directory within the Visual Studio installation" >&6;}
16510     as_fn_error $? "Cannot locate a valid Visual Studio installation" "$LINENO" 5
16511   fi
16512 
16513   if test "x$VS100COMNTOOLS" != x; then
16514 
16515   if test "x$VS_ENV_CMD" = x; then
16516     VS100BASE="$VS100COMNTOOLS/../.."
16517     METHOD="VS100COMNTOOLS variable"
16518 
16519   windows_path="$VS100BASE"
16520   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16521     unix_path=`$CYGPATH -u "$windows_path"`
16522     VS100BASE="$unix_path"
16523   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16524     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16525     VS100BASE="$unix_path"
16526   fi
16527 
16528     if test -d "$VS100BASE"; then
16529       if test -f "$VS100BASE/$VCVARSFILE"; then
16530         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16531 $as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16532         VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16533       else
16534         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16535 $as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16536         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16537 $as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16538       fi
16539     fi
16540   fi
16541 
16542   fi
16543   if test "x$PROGRAMFILES" != x; then
16544 
16545   if test "x$VS_ENV_CMD" = x; then
16546     VS100BASE="$PROGRAMFILES/Microsoft Visual Studio 10.0"
16547     METHOD="well-known name"
16548 
16549   windows_path="$VS100BASE"
16550   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16551     unix_path=`$CYGPATH -u "$windows_path"`
16552     VS100BASE="$unix_path"
16553   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16554     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16555     VS100BASE="$unix_path"
16556   fi
16557 
16558     if test -d "$VS100BASE"; then
16559       if test -f "$VS100BASE/$VCVARSFILE"; then
16560         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16561 $as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16562         VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16563       else
16564         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16565 $as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16566         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16567 $as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16568       fi
16569     fi
16570   fi
16571 
16572   fi
16573 
16574   if test "x$VS_ENV_CMD" = x; then
16575     VS100BASE="C:/Program Files/Microsoft Visual Studio 10.0"
16576     METHOD="well-known name"
16577 
16578   windows_path="$VS100BASE"
16579   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16580     unix_path=`$CYGPATH -u "$windows_path"`
16581     VS100BASE="$unix_path"
16582   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16583     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16584     VS100BASE="$unix_path"
16585   fi
16586 
16587     if test -d "$VS100BASE"; then
16588       if test -f "$VS100BASE/$VCVARSFILE"; then
16589         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16590 $as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16591         VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16592       else
16593         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16594 $as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16595         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16596 $as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16597       fi
16598     fi
16599   fi
16600 
16601 
16602   if test "x$VS_ENV_CMD" = x; then
16603     VS100BASE="C:/Program Files (x86)/Microsoft Visual Studio 10.0"
16604     METHOD="well-known name"
16605 
16606   windows_path="$VS100BASE"
16607   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16608     unix_path=`$CYGPATH -u "$windows_path"`
16609     VS100BASE="$unix_path"
16610   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16611     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16612     VS100BASE="$unix_path"
16613   fi
16614 
16615     if test -d "$VS100BASE"; then
16616       if test -f "$VS100BASE/$VCVARSFILE"; then
16617         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16618 $as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16619         VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16620       else
16621         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16622 $as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16623         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16624 $as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16625       fi
16626     fi
16627   fi
16628 
16629 
16630   if test "x$ProgramW6432" != x; then
16631 
16632   if test "x$VS_ENV_CMD" = x; then
16633     WIN_SDK_BASE="$ProgramW6432/Microsoft SDKs/Windows/v7.1/Bin"
16634     METHOD="well-known name"
16635 
16636   windows_path="$WIN_SDK_BASE"
16637   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16638     unix_path=`$CYGPATH -u "$windows_path"`
16639     WIN_SDK_BASE="$unix_path"
16640   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16641     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16642     WIN_SDK_BASE="$unix_path"
16643   fi
16644 
16645     if test -d "$WIN_SDK_BASE"; then
16646       # There have been cases of partial or broken SDK installations. A missing
16647       # lib dir is not going to work.
16648       if test ! -d "$WIN_SDK_BASE/../lib"; then
16649         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16650 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16651         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
16652 $as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
16653       elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
16654         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16655 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16656         VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
16657         if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
16658           VS_ENV_ARGS="/x86"
16659         else
16660           VS_ENV_ARGS="/x64"
16661         fi
16662       else
16663         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16664 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16665         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
16666 $as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
16667       fi
16668     fi
16669   fi
16670 
16671   fi
16672   if test "x$PROGRAMW6432" != x; then
16673 
16674   if test "x$VS_ENV_CMD" = x; then
16675     WIN_SDK_BASE="$PROGRAMW6432/Microsoft SDKs/Windows/v7.1/Bin"
16676     METHOD="well-known name"
16677 
16678   windows_path="$WIN_SDK_BASE"
16679   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16680     unix_path=`$CYGPATH -u "$windows_path"`
16681     WIN_SDK_BASE="$unix_path"
16682   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16683     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16684     WIN_SDK_BASE="$unix_path"
16685   fi
16686 
16687     if test -d "$WIN_SDK_BASE"; then
16688       # There have been cases of partial or broken SDK installations. A missing
16689       # lib dir is not going to work.
16690       if test ! -d "$WIN_SDK_BASE/../lib"; then
16691         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16692 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16693         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
16694 $as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
16695       elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
16696         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16697 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16698         VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
16699         if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
16700           VS_ENV_ARGS="/x86"
16701         else
16702           VS_ENV_ARGS="/x64"
16703         fi
16704       else
16705         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16706 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16707         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
16708 $as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
16709       fi
16710     fi
16711   fi
16712 
16713   fi
16714   if test "x$PROGRAMFILES" != x; then
16715 
16716   if test "x$VS_ENV_CMD" = x; then
16717     WIN_SDK_BASE="$PROGRAMFILES/Microsoft SDKs/Windows/v7.1/Bin"
16718     METHOD="well-known name"
16719 
16720   windows_path="$WIN_SDK_BASE"
16721   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16722     unix_path=`$CYGPATH -u "$windows_path"`
16723     WIN_SDK_BASE="$unix_path"
16724   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16725     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16726     WIN_SDK_BASE="$unix_path"
16727   fi
16728 
16729     if test -d "$WIN_SDK_BASE"; then
16730       # There have been cases of partial or broken SDK installations. A missing
16731       # lib dir is not going to work.
16732       if test ! -d "$WIN_SDK_BASE/../lib"; then
16733         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16734 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16735         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
16736 $as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
16737       elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
16738         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16739 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16740         VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
16741         if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
16742           VS_ENV_ARGS="/x86"
16743         else
16744           VS_ENV_ARGS="/x64"
16745         fi
16746       else
16747         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16748 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16749         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
16750 $as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
16751       fi
16752     fi
16753   fi
16754 
16755   fi
16756 
16757   if test "x$VS_ENV_CMD" = x; then
16758     WIN_SDK_BASE="C:/Program Files/Microsoft SDKs/Windows/v7.1/Bin"
16759     METHOD="well-known name"
16760 
16761   windows_path="$WIN_SDK_BASE"
16762   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16763     unix_path=`$CYGPATH -u "$windows_path"`
16764     WIN_SDK_BASE="$unix_path"
16765   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16766     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16767     WIN_SDK_BASE="$unix_path"
16768   fi
16769 
16770     if test -d "$WIN_SDK_BASE"; then
16771       # There have been cases of partial or broken SDK installations. A missing
16772       # lib dir is not going to work.
16773       if test ! -d "$WIN_SDK_BASE/../lib"; then
16774         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16775 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16776         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
16777 $as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
16778       elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
16779         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16780 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16781         VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
16782         if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
16783           VS_ENV_ARGS="/x86"
16784         else
16785           VS_ENV_ARGS="/x64"
16786         fi
16787       else
16788         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16789 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16790         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
16791 $as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
16792       fi
16793     fi
16794   fi
16795 
16796 
16797   if test "x$VS_ENV_CMD" = x; then
16798     WIN_SDK_BASE="C:/Program Files (x86)/Microsoft SDKs/Windows/v7.1/Bin"
16799     METHOD="well-known name"
16800 
16801   windows_path="$WIN_SDK_BASE"
16802   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16803     unix_path=`$CYGPATH -u "$windows_path"`
16804     WIN_SDK_BASE="$unix_path"
16805   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16806     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16807     WIN_SDK_BASE="$unix_path"
16808   fi
16809 
16810     if test -d "$WIN_SDK_BASE"; then
16811       # There have been cases of partial or broken SDK installations. A missing
16812       # lib dir is not going to work.
16813       if test ! -d "$WIN_SDK_BASE/../lib"; then
16814         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16815 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16816         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
16817 $as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
16818       elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
16819         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16820 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16821         VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
16822         if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
16823           VS_ENV_ARGS="/x86"
16824         else
16825           VS_ENV_ARGS="/x64"
16826         fi
16827       else
16828         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16829 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16830         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
16831 $as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
16832       fi
16833     fi
16834   fi
16835 
16836 
16837   if test "x$VS_ENV_CMD" != x; then
16838     # We have found a Visual Studio environment on disk, let's extract variables from the vsvars bat file.
16839 
16840   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16841 
16842   # First separate the path from the arguments. This will split at the first
16843   # space.
16844   complete="$VS_ENV_CMD"
16845   path="${complete%% *}"
16846   tmp="$complete EOL"
16847   arguments="${tmp#* }"
16848 
16849   # Input might be given as Windows format, start by converting to
16850   # unix format.
16851   new_path=`$CYGPATH -u "$path"`
16852 
16853   # Now try to locate executable using which
16854   new_path=`$WHICH "$new_path" 2> /dev/null`
16855   # bat and cmd files are not always considered executable in cygwin causing which
16856   # to not find them
16857   if test "x$new_path" = x \
16858            && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16859            && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16860     new_path=`$CYGPATH -u "$path"`
16861   fi
16862   if test "x$new_path" = x; then
16863     # Oops. Which didn't find the executable.
16864     # The splitting of arguments from the executable at a space might have been incorrect,
16865     # since paths with space are more likely in Windows. Give it another try with the whole
16866     # argument.
16867     path="$complete"
16868     arguments="EOL"
16869     new_path=`$CYGPATH -u "$path"`
16870     new_path=`$WHICH "$new_path" 2> /dev/null`
16871     # bat and cmd files are not always considered executable in cygwin causing which
16872     # to not find them
16873     if test "x$new_path" = x \
16874              && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16875              && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16876       new_path=`$CYGPATH -u "$path"`
16877     fi
16878     if test "x$new_path" = x; then
16879       # It's still not found. Now this is an unrecoverable error.
16880       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
16881 $as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
16882       has_space=`$ECHO "$complete" | $GREP " "`
16883       if test "x$has_space" != x; then
16884         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16885 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16886       fi
16887       as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
16888     fi
16889   fi
16890 
16891   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16892   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16893   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16894   # "foo.exe" is OK but "foo" is an error.
16895   #
16896   # This test is therefore slightly more accurate than "test -f" to check for file precense.
16897   # It is also a way to make sure we got the proper file name for the real test later on.
16898   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16899   if test "x$test_shortpath" = x; then
16900     # Short path failed, file does not exist as specified.
16901     # Try adding .exe or .cmd
16902     if test -f "${new_path}.exe"; then
16903        input_to_shortpath="${new_path}.exe"
16904     elif test -f "${new_path}.cmd"; then
16905        input_to_shortpath="${new_path}.cmd"
16906     else
16907       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&5
16908 $as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&6;}
16909       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
16910 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
16911       as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
16912     fi
16913   else
16914     input_to_shortpath="$new_path"
16915   fi
16916 
16917   # Call helper function which possibly converts this using DOS-style short mode.
16918   # If so, the updated path is stored in $new_path.
16919   new_path="$input_to_shortpath"
16920 
16921   input_path="$input_to_shortpath"
16922   # Check if we need to convert this using DOS-style short mode. If the path
16923   # contains just simple characters, use it. Otherwise (spaces, weird characters),
16924   # take no chances and rewrite it.
16925   # Note: m4 eats our [], so we need to use [ and ] instead.
16926   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16927   if test "x$has_forbidden_chars" != x; then
16928     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16929     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16930     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16931     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16932       # Going to short mode and back again did indeed matter. Since short mode is
16933       # case insensitive, let's make it lowercase to improve readability.
16934       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16935       # Now convert it back to Unix-stile (cygpath)
16936       input_path=`$CYGPATH -u "$shortmode_path"`
16937       new_path="$input_path"
16938     fi
16939   fi
16940 
16941   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16942   if test "x$test_cygdrive_prefix" = x; then
16943     # As a simple fix, exclude /usr/bin since it's not a real path.
16944     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
16945       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16946       # a path prefixed by /cygdrive for fixpath to work.
16947       new_path="$CYGWIN_ROOT_PATH$input_path"
16948     fi
16949   fi
16950 
16951   # remove trailing .exe if any
16952   new_path="${new_path/%.exe/}"
16953 
16954   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16955 
16956   # First separate the path from the arguments. This will split at the first
16957   # space.
16958   complete="$VS_ENV_CMD"
16959   path="${complete%% *}"
16960   tmp="$complete EOL"
16961   arguments="${tmp#* }"
16962 
16963   # Input might be given as Windows format, start by converting to
16964   # unix format.
16965   new_path="$path"
16966 
16967   windows_path="$new_path"
16968   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16969     unix_path=`$CYGPATH -u "$windows_path"`
16970     new_path="$unix_path"
16971   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16972     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16973     new_path="$unix_path"
16974   fi
16975 
16976 
16977   # Now try to locate executable using which
16978   new_path=`$WHICH "$new_path" 2> /dev/null`
16979 
16980   if test "x$new_path" = x; then
16981     # Oops. Which didn't find the executable.
16982     # The splitting of arguments from the executable at a space might have been incorrect,
16983     # since paths with space are more likely in Windows. Give it another try with the whole
16984     # argument.
16985     path="$complete"
16986     arguments="EOL"
16987     new_path="$path"
16988 
16989   windows_path="$new_path"
16990   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16991     unix_path=`$CYGPATH -u "$windows_path"`
16992     new_path="$unix_path"
16993   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16994     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16995     new_path="$unix_path"
16996   fi
16997 
16998 
16999     new_path=`$WHICH "$new_path" 2> /dev/null`
17000 
17001     if test "x$new_path" = x; then
17002       # It's still not found. Now this is an unrecoverable error.
17003       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
17004 $as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
17005       has_space=`$ECHO "$complete" | $GREP " "`
17006       if test "x$has_space" != x; then
17007         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17008 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17009       fi
17010       as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
17011     fi
17012   fi
17013 
17014   # Now new_path has a complete unix path to the binary
17015   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
17016     # Keep paths in /bin as-is, but remove trailing .exe if any
17017     new_path="${new_path/%.exe/}"
17018     # Do not save /bin paths to all_fixpath_prefixes!
17019   else
17020     # Not in mixed or Windows style, start by that.
17021     new_path=`cmd //c echo $new_path`
17022 
17023   input_path="$new_path"
17024   # Check if we need to convert this using DOS-style short mode. If the path
17025   # contains just simple characters, use it. Otherwise (spaces, weird characters),
17026   # take no chances and rewrite it.
17027   # Note: m4 eats our [], so we need to use [ and ] instead.
17028   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17029   if test "x$has_forbidden_chars" != x; then
17030     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17031     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17032   fi
17033 
17034     # Output is in $new_path
17035 
17036   windows_path="$new_path"
17037   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17038     unix_path=`$CYGPATH -u "$windows_path"`
17039     new_path="$unix_path"
17040   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17041     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17042     new_path="$unix_path"
17043   fi
17044 
17045     # remove trailing .exe if any
17046     new_path="${new_path/%.exe/}"
17047 
17048     # Save the first 10 bytes of this path to the storage, so fixpath can work.
17049     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17050   fi
17051 
17052   else
17053     # We're on a posix platform. Hooray! :)
17054     # First separate the path from the arguments. This will split at the first
17055     # space.
17056     complete="$VS_ENV_CMD"
17057     path="${complete%% *}"
17058     tmp="$complete EOL"
17059     arguments="${tmp#* }"
17060 
17061     # Cannot rely on the command "which" here since it doesn't always work.
17062     is_absolute_path=`$ECHO "$path" | $GREP ^/`
17063     if test -z "$is_absolute_path"; then
17064       # Path to executable is not absolute. Find it.
17065       IFS_save="$IFS"
17066       IFS=:
17067       for p in $PATH; do
17068         if test -f "$p/$path" && test -x "$p/$path"; then
17069           new_path="$p/$path"
17070           break
17071         fi
17072       done
17073       IFS="$IFS_save"
17074     else
17075       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving VS_ENV_CMD (as $path) failed, using $path directly." >&5
17076 $as_echo "$as_me: Resolving VS_ENV_CMD (as $path) failed, using $path directly." >&6;}
17077       new_path="$path"
17078     fi
17079 
17080     if test "x$new_path" = x; then
17081         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
17082 $as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
17083         has_space=`$ECHO "$complete" | $GREP " "`
17084         if test "x$has_space" != x; then
17085           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
17086 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
17087         fi
17088         as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
17089       fi
17090   fi
17091 
17092       # Now join together the path and the arguments once again
17093       if test "x$arguments" != xEOL; then
17094         new_complete="$new_path ${arguments% *}"
17095       else
17096         new_complete="$new_path"
17097       fi
17098 
17099   if test "x$complete" != "x$new_complete"; then
17100       VS_ENV_CMD="$new_complete"
17101       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting VS_ENV_CMD to \"$new_complete\"" >&5
17102 $as_echo "$as_me: Rewriting VS_ENV_CMD to \"$new_complete\"" >&6;}
17103     fi
17104 
17105 
17106     # Lets extract the variables that are set by vcvarsall.bat/vsvars32.bat/vsvars64.bat
17107     { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to extract Visual Studio environment variables" >&5
17108 $as_echo "$as_me: Trying to extract Visual Studio environment variables" >&6;}
17109     cd $OUTPUT_ROOT
17110     # FIXME: The code betweeen ---- was inlined from a separate script and is not properly adapted
17111     # to autoconf standards.
17112 
17113     #----
17114 
17115     # Cannot use the VS10 setup script directly (since it only updates the DOS subshell environment)
17116     # but calculate the difference in Cygwin environment before/after running it and then
17117     # apply the diff.
17118 
17119     if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
17120       _vs10varsall=`cygpath -a -m -s "$VS_ENV_CMD"`
17121       _dosvs10varsall=`cygpath -a -w -s $_vs10varsall`
17122       _dosbash=`cygpath -a -w -s \`which bash\`.*`
17123     else
17124       _dosvs10varsall=`cmd //c echo $VS_ENV_CMD`
17125       _dosbash=`cmd //c echo \`which bash\``
17126     fi
17127 
17128     # generate the set of exported vars before/after the vs10 setup
17129     $ECHO "@echo off"                                           >  localdevenvtmp.bat
17130     $ECHO "$_dosbash -c \"export -p\" > localdevenvtmp.export0" >> localdevenvtmp.bat
17131     $ECHO "call $_dosvs10varsall $VS_ENV_ARGS"                  >> localdevenvtmp.bat
17132     $ECHO "$_dosbash -c \"export -p\" > localdevenvtmp.export1" >> localdevenvtmp.bat
17133 
17134     # Now execute the newly created bat file.
17135     # The | cat is to stop SetEnv.Cmd to mess with system colors on msys
17136     cmd /c localdevenvtmp.bat | cat
17137 
17138     # apply the diff (less some non-vs10 vars named by "!")
17139     $SORT localdevenvtmp.export0 | $GREP -v "!" > localdevenvtmp.export0.sort
17140     $SORT localdevenvtmp.export1 | $GREP -v "!" > localdevenvtmp.export1.sort
17141     $COMM -1 -3 localdevenvtmp.export0.sort localdevenvtmp.export1.sort > localdevenv.sh
17142 
17143     # cleanup
17144     $RM localdevenvtmp*
17145     #----
17146     cd $CURDIR
17147     if test ! -s $OUTPUT_ROOT/localdevenv.sh; then
17148       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17149 $as_echo "no" >&6; }
17150       { $as_echo "$as_me:${as_lineno-$LINENO}: Could not succesfully extract the envionment variables needed for the VS setup." >&5
17151 $as_echo "$as_me: Could not succesfully extract the envionment variables needed for the VS setup." >&6;}
17152       { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
17153 $as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
17154       { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
17155 $as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
17156       as_fn_error $? "Cannot continue" "$LINENO" 5
17157     fi
17158 
17159     # Now set all paths and other env variables. This will allow the rest of
17160     # the configure script to find and run the compiler in the proper way.
17161     { $as_echo "$as_me:${as_lineno-$LINENO}: Setting extracted environment variables" >&5
17162 $as_echo "$as_me: Setting extracted environment variables" >&6;}
17163     . $OUTPUT_ROOT/localdevenv.sh
17164   else
17165     # We did not find a vsvars bat file, let's hope we are run from a VS command prompt.
17166     { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio installation, checking current environment" >&5
17167 $as_echo "$as_me: Cannot locate a valid Visual Studio installation, checking current environment" >&6;}
17168   fi
17169 
17170   # At this point, we should have corrent variables in the environment, or we can't continue.
17171   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Visual Studio variables" >&5
17172 $as_echo_n "checking for Visual Studio variables... " >&6; }
17173 
17174   if test "x$VCINSTALLDIR" != x || test "x$WindowsSDKDir" != x || test "x$WINDOWSSDKDIR" != x; then
17175     if test "x$INCLUDE" = x || test "x$LIB" = x; then
17176       { $as_echo "$as_me:${as_lineno-$LINENO}: result: present but broken" >&5
17177 $as_echo "present but broken" >&6; }
17178       as_fn_error $? "Your VC command prompt seems broken, INCLUDE and/or LIB is missing." "$LINENO" 5
17179     else
17180       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
17181 $as_echo "ok" >&6; }
17182       # Remove any trailing \ from INCLUDE and LIB to avoid trouble in spec.gmk.
17183       VS_INCLUDE=`$ECHO "$INCLUDE" | $SED 's/\\\\$//'`
17184       VS_LIB=`$ECHO "$LIB" | $SED 's/\\\\$//'`
17185       VS_PATH="$PATH"
17186 
17187 
17188 
17189     fi
17190   else
17191     { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
17192 $as_echo "not found" >&6; }
17193 
17194     if test "x$VS_ENV_CMD" = x; then
17195       { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&5
17196 $as_echo "$as_me: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&6;}
17197       { $as_echo "$as_me:${as_lineno-$LINENO}: nor is this script run from a Visual Studio command prompt." >&5
17198 $as_echo "$as_me: nor is this script run from a Visual Studio command prompt." >&6;}
17199     else
17200       { $as_echo "$as_me:${as_lineno-$LINENO}: Running the extraction script failed." >&5
17201 $as_echo "$as_me: Running the extraction script failed." >&6;}
17202     fi
17203     { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
17204 $as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
17205     { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
17206 $as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
17207     as_fn_error $? "Cannot continue" "$LINENO" 5
17208   fi
17209 
17210   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
17211 $as_echo_n "checking for msvcr100.dll... " >&6; }
17212 
17213 # Check whether --with-msvcr-dll was given.
17214 if test "${with_msvcr_dll+set}" = set; then :
17215   withval=$with_msvcr_dll;
17216 fi
17217 
17218   if test "x$with_msvcr_dll" != x; then
17219     MSVCR_DLL="$with_msvcr_dll"
17220   else
17221     if test "x$VCINSTALLDIR" != x; then
17222       if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
17223         MSVCR_DLL=`find "$VCINSTALLDIR" -name msvcr100.dll | grep x64 | head --lines 1`
17224       else
17225         MSVCR_DLL=`find "$VCINSTALLDIR" -name msvcr100.dll | grep x86 | grep -v ia64 | grep -v x64 | head --lines 1`
17226         if test "x$MSVCR_DLL" = x; then
17227           MSVCR_DLL=`find "$VCINSTALLDIR" -name msvcr100.dll | head --lines 1`
17228         fi
17229       fi
17230       if test "x$MSVCR_DLL" != x; then
17231         { $as_echo "$as_me:${as_lineno-$LINENO}: msvcr100.dll found in VCINSTALLDIR: $VCINSTALLDIR" >&5
17232 $as_echo "$as_me: msvcr100.dll found in VCINSTALLDIR: $VCINSTALLDIR" >&6;}
17233       else
17234         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: msvcr100.dll not found in VCINSTALLDIR: $VCINSTALLDIR" >&5
17235 $as_echo "$as_me: Warning: msvcr100.dll not found in VCINSTALLDIR: $VCINSTALLDIR" >&6;}
17236       fi
17237     fi
17238     # Try some fallback alternatives
17239     if test "x$MSVCR_DLL" = x; then
17240       # If visual studio express is installed, there is usually one with the debugger
17241       if test "x$VS100COMNTOOLS" != x; then
17242         if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
17243           MSVCR_DLL=`find "$VS100COMNTOOLS/.." -name msvcr100.dll | grep -i x64 | head --lines 1`
17244           { $as_echo "$as_me:${as_lineno-$LINENO}: msvcr100.dll found in $VS100COMNTOOLS..: $VS100COMNTOOLS.." >&5
17245 $as_echo "$as_me: msvcr100.dll found in $VS100COMNTOOLS..: $VS100COMNTOOLS.." >&6;}
17246         fi
17247       fi
17248     fi
17249     if test "x$MSVCR_DLL" = x; then
17250       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
17251         # Fallback for 32bit builds, look in the windows directory.
17252         if test -f "$SYSTEMROOT/system32/msvcr100.dll"; then
17253           { $as_echo "$as_me:${as_lineno-$LINENO}: msvcr100.dll found in $SYSTEMROOT/system32" >&5
17254 $as_echo "$as_me: msvcr100.dll found in $SYSTEMROOT/system32" >&6;}
17255           MSVCR_DLL="$SYSTEMROOT/system32/msvcr100.dll"
17256         fi
17257       fi
17258     fi
17259   fi
17260   if test "x$MSVCR_DLL" = x; then
17261     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17262 $as_echo "no" >&6; }
17263     as_fn_error $? "Could not find msvcr100.dll !" "$LINENO" 5
17264   fi
17265   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
17266 $as_echo "$MSVCR_DLL" >&6; }
17267 
17268   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17269 
17270   # Input might be given as Windows format, start by converting to
17271   # unix format.
17272   path="$MSVCR_DLL"
17273   new_path=`$CYGPATH -u "$path"`
17274 
17275   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17276   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17277   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17278   # "foo.exe" is OK but "foo" is an error.
17279   #
17280   # This test is therefore slightly more accurate than "test -f" to check for file precense.
17281   # It is also a way to make sure we got the proper file name for the real test later on.
17282   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17283   if test "x$test_shortpath" = x; then
17284     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&5
17285 $as_echo "$as_me: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&6;}
17286     as_fn_error $? "Cannot locate the the path of MSVCR_DLL" "$LINENO" 5
17287   fi
17288 
17289   # Call helper function which possibly converts this using DOS-style short mode.
17290   # If so, the updated path is stored in $new_path.
17291 
17292   input_path="$new_path"
17293   # Check if we need to convert this using DOS-style short mode. If the path
17294   # contains just simple characters, use it. Otherwise (spaces, weird characters),
17295   # take no chances and rewrite it.
17296   # Note: m4 eats our [], so we need to use [ and ] instead.
17297   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17298   if test "x$has_forbidden_chars" != x; then
17299     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17300     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17301     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17302     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17303       # Going to short mode and back again did indeed matter. Since short mode is
17304       # case insensitive, let's make it lowercase to improve readability.
17305       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17306       # Now convert it back to Unix-stile (cygpath)
17307       input_path=`$CYGPATH -u "$shortmode_path"`
17308       new_path="$input_path"
17309     fi
17310   fi
17311 
17312   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17313   if test "x$test_cygdrive_prefix" = x; then
17314     # As a simple fix, exclude /usr/bin since it's not a real path.
17315     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
17316       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17317       # a path prefixed by /cygdrive for fixpath to work.
17318       new_path="$CYGWIN_ROOT_PATH$input_path"
17319     fi
17320   fi
17321 
17322 
17323   if test "x$path" != "x$new_path"; then
17324     MSVCR_DLL="$new_path"
17325     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVCR_DLL to \"$new_path\"" >&5
17326 $as_echo "$as_me: Rewriting MSVCR_DLL to \"$new_path\"" >&6;}
17327   fi
17328 
17329   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17330 
17331   path="$MSVCR_DLL"
17332   has_colon=`$ECHO $path | $GREP ^.:`
17333   new_path="$path"
17334   if test "x$has_colon" = x; then
17335     # Not in mixed or Windows style, start by that.
17336     new_path=`cmd //c echo $path`
17337   fi
17338 
17339 
17340   input_path="$new_path"
17341   # Check if we need to convert this using DOS-style short mode. If the path
17342   # contains just simple characters, use it. Otherwise (spaces, weird characters),
17343   # take no chances and rewrite it.
17344   # Note: m4 eats our [], so we need to use [ and ] instead.
17345   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17346   if test "x$has_forbidden_chars" != x; then
17347     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17348     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17349   fi
17350 
17351 
17352   windows_path="$new_path"
17353   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17354     unix_path=`$CYGPATH -u "$windows_path"`
17355     new_path="$unix_path"
17356   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17357     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17358     new_path="$unix_path"
17359   fi
17360 
17361   if test "x$path" != "x$new_path"; then
17362     MSVCR_DLL="$new_path"
17363     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVCR_DLL to \"$new_path\"" >&5
17364 $as_echo "$as_me: Rewriting MSVCR_DLL to \"$new_path\"" >&6;}
17365   fi
17366 
17367   # Save the first 10 bytes of this path to the storage, so fixpath can work.
17368   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17369 
17370   else
17371     # We're on a posix platform. Hooray! :)
17372     path="$MSVCR_DLL"
17373     has_space=`$ECHO "$path" | $GREP " "`
17374     if test "x$has_space" != x; then
17375       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&5
17376 $as_echo "$as_me: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&6;}
17377       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
17378     fi
17379 
17380     # Use eval to expand a potential ~
17381     eval path="$path"
17382     if test ! -f "$path" && test ! -d "$path"; then
17383       as_fn_error $? "The path of MSVCR_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
17384     fi
17385 
17386     MSVCR_DLL="`cd "$path"; $THEPWDCMD -L`"
17387   fi
17388 
17389 
17390 
17391 
17392 # Check whether --with-dxsdk was given.
17393 if test "${with_dxsdk+set}" = set; then :
17394   withval=$with_dxsdk;
17395 fi
17396 
17397 
17398 # Check whether --with-dxsdk-lib was given.
17399 if test "${with_dxsdk_lib+set}" = set; then :
17400   withval=$with_dxsdk_lib;
17401 fi
17402 
17403 
17404 # Check whether --with-dxsdk-include was given.
17405 if test "${with_dxsdk_include+set}" = set; then :
17406   withval=$with_dxsdk_include;
17407 fi
17408 
17409 
17410   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DirectX SDK" >&5
17411 $as_echo_n "checking for DirectX SDK... " >&6; }
17412 
17413   if test "x$with_dxsdk" != x; then
17414     dxsdk_path="$with_dxsdk"
17415   elif test "x$DXSDK_DIR" != x; then
17416     dxsdk_path="$DXSDK_DIR"
17417   elif test -d "C:/DXSDK"; then
17418     dxsdk_path="C:/DXSDK"
17419   else
17420     as_fn_error $? "Could not find the DirectX SDK" "$LINENO" 5
17421   fi
17422   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $dxsdk_path" >&5
17423 $as_echo "$dxsdk_path" >&6; }
17424 
17425   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17426 
17427   # Input might be given as Windows format, start by converting to
17428   # unix format.
17429   path="$dxsdk_path"
17430   new_path=`$CYGPATH -u "$path"`
17431 
17432   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17433   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17434   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17435   # "foo.exe" is OK but "foo" is an error.
17436   #
17437   # This test is therefore slightly more accurate than "test -f" to check for file precense.
17438   # It is also a way to make sure we got the proper file name for the real test later on.
17439   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17440   if test "x$test_shortpath" = x; then
17441     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of dxsdk_path, which resolves as \"$path\", is invalid." >&5
17442 $as_echo "$as_me: The path of dxsdk_path, which resolves as \"$path\", is invalid." >&6;}
17443     as_fn_error $? "Cannot locate the the path of dxsdk_path" "$LINENO" 5
17444   fi
17445 
17446   # Call helper function which possibly converts this using DOS-style short mode.
17447   # If so, the updated path is stored in $new_path.
17448 
17449   input_path="$new_path"
17450   # Check if we need to convert this using DOS-style short mode. If the path
17451   # contains just simple characters, use it. Otherwise (spaces, weird characters),
17452   # take no chances and rewrite it.
17453   # Note: m4 eats our [], so we need to use [ and ] instead.
17454   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17455   if test "x$has_forbidden_chars" != x; then
17456     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17457     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17458     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17459     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17460       # Going to short mode and back again did indeed matter. Since short mode is
17461       # case insensitive, let's make it lowercase to improve readability.
17462       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17463       # Now convert it back to Unix-stile (cygpath)
17464       input_path=`$CYGPATH -u "$shortmode_path"`
17465       new_path="$input_path"
17466     fi
17467   fi
17468 
17469   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17470   if test "x$test_cygdrive_prefix" = x; then
17471     # As a simple fix, exclude /usr/bin since it's not a real path.
17472     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
17473       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17474       # a path prefixed by /cygdrive for fixpath to work.
17475       new_path="$CYGWIN_ROOT_PATH$input_path"
17476     fi
17477   fi
17478 
17479 
17480   if test "x$path" != "x$new_path"; then
17481     dxsdk_path="$new_path"
17482     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting dxsdk_path to \"$new_path\"" >&5
17483 $as_echo "$as_me: Rewriting dxsdk_path to \"$new_path\"" >&6;}
17484   fi
17485 
17486   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17487 
17488   path="$dxsdk_path"
17489   has_colon=`$ECHO $path | $GREP ^.:`
17490   new_path="$path"
17491   if test "x$has_colon" = x; then
17492     # Not in mixed or Windows style, start by that.
17493     new_path=`cmd //c echo $path`
17494   fi
17495 
17496 
17497   input_path="$new_path"
17498   # Check if we need to convert this using DOS-style short mode. If the path
17499   # contains just simple characters, use it. Otherwise (spaces, weird characters),
17500   # take no chances and rewrite it.
17501   # Note: m4 eats our [], so we need to use [ and ] instead.
17502   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17503   if test "x$has_forbidden_chars" != x; then
17504     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17505     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17506   fi
17507 
17508 
17509   windows_path="$new_path"
17510   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17511     unix_path=`$CYGPATH -u "$windows_path"`
17512     new_path="$unix_path"
17513   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17514     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17515     new_path="$unix_path"
17516   fi
17517 
17518   if test "x$path" != "x$new_path"; then
17519     dxsdk_path="$new_path"
17520     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting dxsdk_path to \"$new_path\"" >&5
17521 $as_echo "$as_me: Rewriting dxsdk_path to \"$new_path\"" >&6;}
17522   fi
17523 
17524   # Save the first 10 bytes of this path to the storage, so fixpath can work.
17525   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17526 
17527   else
17528     # We're on a posix platform. Hooray! :)
17529     path="$dxsdk_path"
17530     has_space=`$ECHO "$path" | $GREP " "`
17531     if test "x$has_space" != x; then
17532       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of dxsdk_path, which resolves as \"$path\", is invalid." >&5
17533 $as_echo "$as_me: The path of dxsdk_path, which resolves as \"$path\", is invalid." >&6;}
17534       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
17535     fi
17536 
17537     # Use eval to expand a potential ~
17538     eval path="$path"
17539     if test ! -f "$path" && test ! -d "$path"; then
17540       as_fn_error $? "The path of dxsdk_path, which resolves as \"$path\", is not found." "$LINENO" 5
17541     fi
17542 
17543     dxsdk_path="`cd "$path"; $THEPWDCMD -L`"
17544   fi
17545 
17546 
17547   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DirectX SDK lib dir" >&5
17548 $as_echo_n "checking for DirectX SDK lib dir... " >&6; }
17549   if test "x$with_dxsdk_lib" != x; then
17550     DXSDK_LIB_PATH="$with_dxsdk_lib"
17551   elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
17552     DXSDK_LIB_PATH="$dxsdk_path/Lib/x64"
17553   else
17554     DXSDK_LIB_PATH="$dxsdk_path/Lib"
17555   fi
17556   # dsound.lib is linked to in jsoundds
17557   if test ! -f "$DXSDK_LIB_PATH/dsound.lib"; then
17558     as_fn_error $? "Invalid DirectX SDK lib dir" "$LINENO" 5
17559   fi
17560   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DXSDK_LIB_PATH" >&5
17561 $as_echo "$DXSDK_LIB_PATH" >&6; }
17562 
17563   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17564 
17565   # Input might be given as Windows format, start by converting to
17566   # unix format.
17567   path="$DXSDK_LIB_PATH"
17568   new_path=`$CYGPATH -u "$path"`
17569 
17570   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17571   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17572   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17573   # "foo.exe" is OK but "foo" is an error.
17574   #
17575   # This test is therefore slightly more accurate than "test -f" to check for file precense.
17576   # It is also a way to make sure we got the proper file name for the real test later on.
17577   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17578   if test "x$test_shortpath" = x; then
17579     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DXSDK_LIB_PATH, which resolves as \"$path\", is invalid." >&5
17580 $as_echo "$as_me: The path of DXSDK_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
17581     as_fn_error $? "Cannot locate the the path of DXSDK_LIB_PATH" "$LINENO" 5
17582   fi
17583 
17584   # Call helper function which possibly converts this using DOS-style short mode.
17585   # If so, the updated path is stored in $new_path.
17586 
17587   input_path="$new_path"
17588   # Check if we need to convert this using DOS-style short mode. If the path
17589   # contains just simple characters, use it. Otherwise (spaces, weird characters),
17590   # take no chances and rewrite it.
17591   # Note: m4 eats our [], so we need to use [ and ] instead.
17592   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17593   if test "x$has_forbidden_chars" != x; then
17594     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17595     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17596     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17597     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17598       # Going to short mode and back again did indeed matter. Since short mode is
17599       # case insensitive, let's make it lowercase to improve readability.
17600       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17601       # Now convert it back to Unix-stile (cygpath)
17602       input_path=`$CYGPATH -u "$shortmode_path"`
17603       new_path="$input_path"
17604     fi
17605   fi
17606 
17607   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17608   if test "x$test_cygdrive_prefix" = x; then
17609     # As a simple fix, exclude /usr/bin since it's not a real path.
17610     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
17611       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17612       # a path prefixed by /cygdrive for fixpath to work.
17613       new_path="$CYGWIN_ROOT_PATH$input_path"
17614     fi
17615   fi
17616 
17617 
17618   if test "x$path" != "x$new_path"; then
17619     DXSDK_LIB_PATH="$new_path"
17620     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DXSDK_LIB_PATH to \"$new_path\"" >&5
17621 $as_echo "$as_me: Rewriting DXSDK_LIB_PATH to \"$new_path\"" >&6;}
17622   fi
17623 
17624   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17625 
17626   path="$DXSDK_LIB_PATH"
17627   has_colon=`$ECHO $path | $GREP ^.:`
17628   new_path="$path"
17629   if test "x$has_colon" = x; then
17630     # Not in mixed or Windows style, start by that.
17631     new_path=`cmd //c echo $path`
17632   fi
17633 
17634 
17635   input_path="$new_path"
17636   # Check if we need to convert this using DOS-style short mode. If the path
17637   # contains just simple characters, use it. Otherwise (spaces, weird characters),
17638   # take no chances and rewrite it.
17639   # Note: m4 eats our [], so we need to use [ and ] instead.
17640   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17641   if test "x$has_forbidden_chars" != x; then
17642     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17643     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17644   fi
17645 
17646 
17647   windows_path="$new_path"
17648   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17649     unix_path=`$CYGPATH -u "$windows_path"`
17650     new_path="$unix_path"
17651   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17652     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17653     new_path="$unix_path"
17654   fi
17655 
17656   if test "x$path" != "x$new_path"; then
17657     DXSDK_LIB_PATH="$new_path"
17658     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DXSDK_LIB_PATH to \"$new_path\"" >&5
17659 $as_echo "$as_me: Rewriting DXSDK_LIB_PATH to \"$new_path\"" >&6;}
17660   fi
17661 
17662   # Save the first 10 bytes of this path to the storage, so fixpath can work.
17663   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17664 
17665   else
17666     # We're on a posix platform. Hooray! :)
17667     path="$DXSDK_LIB_PATH"
17668     has_space=`$ECHO "$path" | $GREP " "`
17669     if test "x$has_space" != x; then
17670       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DXSDK_LIB_PATH, which resolves as \"$path\", is invalid." >&5
17671 $as_echo "$as_me: The path of DXSDK_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
17672       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
17673     fi
17674 
17675     # Use eval to expand a potential ~
17676     eval path="$path"
17677     if test ! -f "$path" && test ! -d "$path"; then
17678       as_fn_error $? "The path of DXSDK_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
17679     fi
17680 
17681     DXSDK_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
17682   fi
17683 
17684 
17685   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DirectX SDK include dir" >&5
17686 $as_echo_n "checking for DirectX SDK include dir... " >&6; }
17687   if test "x$with_dxsdk_include" != x; then
17688     DXSDK_INCLUDE_PATH="$with_dxsdk_include"
17689   else
17690     DXSDK_INCLUDE_PATH="$dxsdk_path/Include"
17691   fi
17692   # dsound.h is included in jsoundds
17693   if test ! -f "$DXSDK_INCLUDE_PATH/dsound.h"; then
17694     as_fn_error $? "Invalid DirectX SDK lib dir" "$LINENO" 5
17695   fi
17696   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DXSDK_INCLUDE_PATH" >&5
17697 $as_echo "$DXSDK_INCLUDE_PATH" >&6; }
17698 
17699   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17700 
17701   # Input might be given as Windows format, start by converting to
17702   # unix format.
17703   path="$DXSDK_INCLUDE_PATH"
17704   new_path=`$CYGPATH -u "$path"`
17705 
17706   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17707   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17708   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17709   # "foo.exe" is OK but "foo" is an error.
17710   #
17711   # This test is therefore slightly more accurate than "test -f" to check for file precense.
17712   # It is also a way to make sure we got the proper file name for the real test later on.
17713   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17714   if test "x$test_shortpath" = x; then
17715     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DXSDK_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
17716 $as_echo "$as_me: The path of DXSDK_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
17717     as_fn_error $? "Cannot locate the the path of DXSDK_INCLUDE_PATH" "$LINENO" 5
17718   fi
17719 
17720   # Call helper function which possibly converts this using DOS-style short mode.
17721   # If so, the updated path is stored in $new_path.
17722 
17723   input_path="$new_path"
17724   # Check if we need to convert this using DOS-style short mode. If the path
17725   # contains just simple characters, use it. Otherwise (spaces, weird characters),
17726   # take no chances and rewrite it.
17727   # Note: m4 eats our [], so we need to use [ and ] instead.
17728   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17729   if test "x$has_forbidden_chars" != x; then
17730     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17731     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17732     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17733     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17734       # Going to short mode and back again did indeed matter. Since short mode is
17735       # case insensitive, let's make it lowercase to improve readability.
17736       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17737       # Now convert it back to Unix-stile (cygpath)
17738       input_path=`$CYGPATH -u "$shortmode_path"`
17739       new_path="$input_path"
17740     fi
17741   fi
17742 
17743   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17744   if test "x$test_cygdrive_prefix" = x; then
17745     # As a simple fix, exclude /usr/bin since it's not a real path.
17746     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
17747       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17748       # a path prefixed by /cygdrive for fixpath to work.
17749       new_path="$CYGWIN_ROOT_PATH$input_path"
17750     fi
17751   fi
17752 
17753 
17754   if test "x$path" != "x$new_path"; then
17755     DXSDK_INCLUDE_PATH="$new_path"
17756     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DXSDK_INCLUDE_PATH to \"$new_path\"" >&5
17757 $as_echo "$as_me: Rewriting DXSDK_INCLUDE_PATH to \"$new_path\"" >&6;}
17758   fi
17759 
17760   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17761 
17762   path="$DXSDK_INCLUDE_PATH"
17763   has_colon=`$ECHO $path | $GREP ^.:`
17764   new_path="$path"
17765   if test "x$has_colon" = x; then
17766     # Not in mixed or Windows style, start by that.
17767     new_path=`cmd //c echo $path`
17768   fi
17769 
17770 
17771   input_path="$new_path"
17772   # Check if we need to convert this using DOS-style short mode. If the path
17773   # contains just simple characters, use it. Otherwise (spaces, weird characters),
17774   # take no chances and rewrite it.
17775   # Note: m4 eats our [], so we need to use [ and ] instead.
17776   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17777   if test "x$has_forbidden_chars" != x; then
17778     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17779     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17780   fi
17781 
17782 
17783   windows_path="$new_path"
17784   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17785     unix_path=`$CYGPATH -u "$windows_path"`
17786     new_path="$unix_path"
17787   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17788     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17789     new_path="$unix_path"
17790   fi
17791 
17792   if test "x$path" != "x$new_path"; then
17793     DXSDK_INCLUDE_PATH="$new_path"
17794     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DXSDK_INCLUDE_PATH to \"$new_path\"" >&5
17795 $as_echo "$as_me: Rewriting DXSDK_INCLUDE_PATH to \"$new_path\"" >&6;}
17796   fi
17797 
17798   # Save the first 10 bytes of this path to the storage, so fixpath can work.
17799   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17800 
17801   else
17802     # We're on a posix platform. Hooray! :)
17803     path="$DXSDK_INCLUDE_PATH"
17804     has_space=`$ECHO "$path" | $GREP " "`
17805     if test "x$has_space" != x; then
17806       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DXSDK_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
17807 $as_echo "$as_me: The path of DXSDK_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
17808       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
17809     fi
17810 
17811     # Use eval to expand a potential ~
17812     eval path="$path"
17813     if test ! -f "$path" && test ! -d "$path"; then
17814       as_fn_error $? "The path of DXSDK_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
17815     fi
17816 
17817     DXSDK_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
17818   fi
17819 
17820 
17821 
17822 
17823   LDFLAGS_JDK="$LDFLAGS_JDK -libpath:$DXSDK_LIB_PATH"
17824 
17825 fi
17826 
17827 
17828 
17829 # If --build AND --host is set, then the configure script will find any
17830 # cross compilation tools in the PATH. Cross compilation tools
17831 # follows the cross compilation standard where they are prefixed with ${host}.
17832 # For example the binary i686-sun-solaris2.10-gcc
17833 # will cross compile for i686-sun-solaris2.10
17834 # If neither of build and host is not set, then build=host and the
17835 # default compiler found in the path will be used.
17836 # Setting only --host, does not seem to be really supported.
17837 # Please set both --build and --host if you want to cross compile.
17838 
17839 if test "x$COMPILE_TYPE" = "xcross"; then
17840     # Now we to find a C/C++ compiler that can build executables for the build
17841     # platform. We can't use the AC_PROG_CC macro, since it can only be used
17842     # once. Also, we need to do this before adding a tools dir to the path,
17843     # otherwise we might pick up cross-compilers which don't use standard naming.
17844     # Otherwise, we'll set the BUILD_tools to the native tools, but that'll have
17845     # to wait until they are properly discovered.
17846     for ac_prog in cl cc gcc
17847 do
17848   # Extract the first word of "$ac_prog", so it can be a program name with args.
17849 set dummy $ac_prog; ac_word=$2
17850 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17851 $as_echo_n "checking for $ac_word... " >&6; }
17852 if test "${ac_cv_path_BUILD_CC+set}" = set; then :
17853   $as_echo_n "(cached) " >&6
17854 else
17855   case $BUILD_CC in
17856   [\\/]* | ?:[\\/]*)
17857   ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
17858   ;;
17859   *)
17860   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17861 for as_dir in $PATH
17862 do
17863   IFS=$as_save_IFS
17864   test -z "$as_dir" && as_dir=.
17865     for ac_exec_ext in '' $ac_executable_extensions; do
17866   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
17867     ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
17868     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17869     break 2
17870   fi
17871 done
17872   done
17873 IFS=$as_save_IFS
17874 
17875   ;;
17876 esac
17877 fi
17878 BUILD_CC=$ac_cv_path_BUILD_CC
17879 if test -n "$BUILD_CC"; then
17880   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
17881 $as_echo "$BUILD_CC" >&6; }
17882 else
17883   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17884 $as_echo "no" >&6; }
17885 fi
17886 
17887 
17888   test -n "$BUILD_CC" && break
17889 done
17890 
17891 
17892   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17893 
17894   # First separate the path from the arguments. This will split at the first
17895   # space.
17896   complete="$BUILD_CC"
17897   path="${complete%% *}"
17898   tmp="$complete EOL"
17899   arguments="${tmp#* }"
17900 
17901   # Input might be given as Windows format, start by converting to
17902   # unix format.
17903   new_path=`$CYGPATH -u "$path"`
17904 
17905   # Now try to locate executable using which
17906   new_path=`$WHICH "$new_path" 2> /dev/null`
17907   # bat and cmd files are not always considered executable in cygwin causing which
17908   # to not find them
17909   if test "x$new_path" = x \
17910            && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17911            && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17912     new_path=`$CYGPATH -u "$path"`
17913   fi
17914   if test "x$new_path" = x; then
17915     # Oops. Which didn't find the executable.
17916     # The splitting of arguments from the executable at a space might have been incorrect,
17917     # since paths with space are more likely in Windows. Give it another try with the whole
17918     # argument.
17919     path="$complete"
17920     arguments="EOL"
17921     new_path=`$CYGPATH -u "$path"`
17922     new_path=`$WHICH "$new_path" 2> /dev/null`
17923     # bat and cmd files are not always considered executable in cygwin causing which
17924     # to not find them
17925     if test "x$new_path" = x \
17926              && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17927              && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17928       new_path=`$CYGPATH -u "$path"`
17929     fi
17930     if test "x$new_path" = x; then
17931       # It's still not found. Now this is an unrecoverable error.
17932       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
17933 $as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
17934       has_space=`$ECHO "$complete" | $GREP " "`
17935       if test "x$has_space" != x; then
17936         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17937 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17938       fi
17939       as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
17940     fi
17941   fi
17942 
17943   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17944   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17945   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17946   # "foo.exe" is OK but "foo" is an error.
17947   #
17948   # This test is therefore slightly more accurate than "test -f" to check for file precense.
17949   # It is also a way to make sure we got the proper file name for the real test later on.
17950   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17951   if test "x$test_shortpath" = x; then
17952     # Short path failed, file does not exist as specified.
17953     # Try adding .exe or .cmd
17954     if test -f "${new_path}.exe"; then
17955        input_to_shortpath="${new_path}.exe"
17956     elif test -f "${new_path}.cmd"; then
17957        input_to_shortpath="${new_path}.cmd"
17958     else
17959       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&5
17960 $as_echo "$as_me: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&6;}
17961       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
17962 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
17963       as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
17964     fi
17965   else
17966     input_to_shortpath="$new_path"
17967   fi
17968 
17969   # Call helper function which possibly converts this using DOS-style short mode.
17970   # If so, the updated path is stored in $new_path.
17971   new_path="$input_to_shortpath"
17972 
17973   input_path="$input_to_shortpath"
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 $input_to_shortpath | $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   # remove trailing .exe if any
18004   new_path="${new_path/%.exe/}"
18005 
18006   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18007 
18008   # First separate the path from the arguments. This will split at the first
18009   # space.
18010   complete="$BUILD_CC"
18011   path="${complete%% *}"
18012   tmp="$complete EOL"
18013   arguments="${tmp#* }"
18014 
18015   # Input might be given as Windows format, start by converting to
18016   # unix format.
18017   new_path="$path"
18018 
18019   windows_path="$new_path"
18020   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18021     unix_path=`$CYGPATH -u "$windows_path"`
18022     new_path="$unix_path"
18023   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18024     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18025     new_path="$unix_path"
18026   fi
18027 
18028 
18029   # Now try to locate executable using which
18030   new_path=`$WHICH "$new_path" 2> /dev/null`
18031 
18032   if test "x$new_path" = x; then
18033     # Oops. Which didn't find the executable.
18034     # The splitting of arguments from the executable at a space might have been incorrect,
18035     # since paths with space are more likely in Windows. Give it another try with the whole
18036     # argument.
18037     path="$complete"
18038     arguments="EOL"
18039     new_path="$path"
18040 
18041   windows_path="$new_path"
18042   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18043     unix_path=`$CYGPATH -u "$windows_path"`
18044     new_path="$unix_path"
18045   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18046     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18047     new_path="$unix_path"
18048   fi
18049 
18050 
18051     new_path=`$WHICH "$new_path" 2> /dev/null`
18052 
18053     if test "x$new_path" = x; then
18054       # It's still not found. Now this is an unrecoverable error.
18055       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
18056 $as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
18057       has_space=`$ECHO "$complete" | $GREP " "`
18058       if test "x$has_space" != x; then
18059         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18060 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18061       fi
18062       as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
18063     fi
18064   fi
18065 
18066   # Now new_path has a complete unix path to the binary
18067   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18068     # Keep paths in /bin as-is, but remove trailing .exe if any
18069     new_path="${new_path/%.exe/}"
18070     # Do not save /bin paths to all_fixpath_prefixes!
18071   else
18072     # Not in mixed or Windows style, start by that.
18073     new_path=`cmd //c echo $new_path`
18074 
18075   input_path="$new_path"
18076   # Check if we need to convert this using DOS-style short mode. If the path
18077   # contains just simple characters, use it. Otherwise (spaces, weird characters),
18078   # take no chances and rewrite it.
18079   # Note: m4 eats our [], so we need to use [ and ] instead.
18080   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18081   if test "x$has_forbidden_chars" != x; then
18082     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18083     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18084   fi
18085 
18086     # Output is in $new_path
18087 
18088   windows_path="$new_path"
18089   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18090     unix_path=`$CYGPATH -u "$windows_path"`
18091     new_path="$unix_path"
18092   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18093     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18094     new_path="$unix_path"
18095   fi
18096 
18097     # remove trailing .exe if any
18098     new_path="${new_path/%.exe/}"
18099 
18100     # Save the first 10 bytes of this path to the storage, so fixpath can work.
18101     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18102   fi
18103 
18104   else
18105     # We're on a posix platform. Hooray! :)
18106     # First separate the path from the arguments. This will split at the first
18107     # space.
18108     complete="$BUILD_CC"
18109     path="${complete%% *}"
18110     tmp="$complete EOL"
18111     arguments="${tmp#* }"
18112 
18113     # Cannot rely on the command "which" here since it doesn't always work.
18114     is_absolute_path=`$ECHO "$path" | $GREP ^/`
18115     if test -z "$is_absolute_path"; then
18116       # Path to executable is not absolute. Find it.
18117       IFS_save="$IFS"
18118       IFS=:
18119       for p in $PATH; do
18120         if test -f "$p/$path" && test -x "$p/$path"; then
18121           new_path="$p/$path"
18122           break
18123         fi
18124       done
18125       IFS="$IFS_save"
18126     else
18127       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving BUILD_CC (as $path) failed, using $path directly." >&5
18128 $as_echo "$as_me: Resolving BUILD_CC (as $path) failed, using $path directly." >&6;}
18129       new_path="$path"
18130     fi
18131 
18132     if test "x$new_path" = x; then
18133         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
18134 $as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
18135         has_space=`$ECHO "$complete" | $GREP " "`
18136         if test "x$has_space" != x; then
18137           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18138 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18139         fi
18140         as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
18141       fi
18142   fi
18143 
18144       # Now join together the path and the arguments once again
18145       if test "x$arguments" != xEOL; then
18146         new_complete="$new_path ${arguments% *}"
18147       else
18148         new_complete="$new_path"
18149       fi
18150 
18151   if test "x$complete" != "x$new_complete"; then
18152       BUILD_CC="$new_complete"
18153       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CC to \"$new_complete\"" >&5
18154 $as_echo "$as_me: Rewriting BUILD_CC to \"$new_complete\"" >&6;}
18155     fi
18156 
18157     for ac_prog in cl CC g++
18158 do
18159   # Extract the first word of "$ac_prog", so it can be a program name with args.
18160 set dummy $ac_prog; ac_word=$2
18161 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18162 $as_echo_n "checking for $ac_word... " >&6; }
18163 if test "${ac_cv_path_BUILD_CXX+set}" = set; then :
18164   $as_echo_n "(cached) " >&6
18165 else
18166   case $BUILD_CXX in
18167   [\\/]* | ?:[\\/]*)
18168   ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
18169   ;;
18170   *)
18171   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18172 for as_dir in $PATH
18173 do
18174   IFS=$as_save_IFS
18175   test -z "$as_dir" && as_dir=.
18176     for ac_exec_ext in '' $ac_executable_extensions; do
18177   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
18178     ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
18179     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18180     break 2
18181   fi
18182 done
18183   done
18184 IFS=$as_save_IFS
18185 
18186   ;;
18187 esac
18188 fi
18189 BUILD_CXX=$ac_cv_path_BUILD_CXX
18190 if test -n "$BUILD_CXX"; then
18191   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
18192 $as_echo "$BUILD_CXX" >&6; }
18193 else
18194   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18195 $as_echo "no" >&6; }
18196 fi
18197 
18198 
18199   test -n "$BUILD_CXX" && break
18200 done
18201 
18202 
18203   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18204 
18205   # First separate the path from the arguments. This will split at the first
18206   # space.
18207   complete="$BUILD_CXX"
18208   path="${complete%% *}"
18209   tmp="$complete EOL"
18210   arguments="${tmp#* }"
18211 
18212   # Input might be given as Windows format, start by converting to
18213   # unix format.
18214   new_path=`$CYGPATH -u "$path"`
18215 
18216   # Now try to locate executable using which
18217   new_path=`$WHICH "$new_path" 2> /dev/null`
18218   # bat and cmd files are not always considered executable in cygwin causing which
18219   # to not find them
18220   if test "x$new_path" = x \
18221            && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18222            && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18223     new_path=`$CYGPATH -u "$path"`
18224   fi
18225   if test "x$new_path" = x; then
18226     # Oops. Which didn't find the executable.
18227     # The splitting of arguments from the executable at a space might have been incorrect,
18228     # since paths with space are more likely in Windows. Give it another try with the whole
18229     # argument.
18230     path="$complete"
18231     arguments="EOL"
18232     new_path=`$CYGPATH -u "$path"`
18233     new_path=`$WHICH "$new_path" 2> /dev/null`
18234     # bat and cmd files are not always considered executable in cygwin causing which
18235     # to not find them
18236     if test "x$new_path" = x \
18237              && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18238              && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18239       new_path=`$CYGPATH -u "$path"`
18240     fi
18241     if test "x$new_path" = x; then
18242       # It's still not found. Now this is an unrecoverable error.
18243       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
18244 $as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
18245       has_space=`$ECHO "$complete" | $GREP " "`
18246       if test "x$has_space" != x; then
18247         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18248 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18249       fi
18250       as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
18251     fi
18252   fi
18253 
18254   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18255   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18256   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18257   # "foo.exe" is OK but "foo" is an error.
18258   #
18259   # This test is therefore slightly more accurate than "test -f" to check for file precense.
18260   # It is also a way to make sure we got the proper file name for the real test later on.
18261   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18262   if test "x$test_shortpath" = x; then
18263     # Short path failed, file does not exist as specified.
18264     # Try adding .exe or .cmd
18265     if test -f "${new_path}.exe"; then
18266        input_to_shortpath="${new_path}.exe"
18267     elif test -f "${new_path}.cmd"; then
18268        input_to_shortpath="${new_path}.cmd"
18269     else
18270       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&5
18271 $as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&6;}
18272       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18273 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18274       as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
18275     fi
18276   else
18277     input_to_shortpath="$new_path"
18278   fi
18279 
18280   # Call helper function which possibly converts this using DOS-style short mode.
18281   # If so, the updated path is stored in $new_path.
18282   new_path="$input_to_shortpath"
18283 
18284   input_path="$input_to_shortpath"
18285   # Check if we need to convert this using DOS-style short mode. If the path
18286   # contains just simple characters, use it. Otherwise (spaces, weird characters),
18287   # take no chances and rewrite it.
18288   # Note: m4 eats our [], so we need to use [ and ] instead.
18289   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18290   if test "x$has_forbidden_chars" != x; then
18291     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18292     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18293     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18294     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18295       # Going to short mode and back again did indeed matter. Since short mode is
18296       # case insensitive, let's make it lowercase to improve readability.
18297       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18298       # Now convert it back to Unix-stile (cygpath)
18299       input_path=`$CYGPATH -u "$shortmode_path"`
18300       new_path="$input_path"
18301     fi
18302   fi
18303 
18304   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18305   if test "x$test_cygdrive_prefix" = x; then
18306     # As a simple fix, exclude /usr/bin since it's not a real path.
18307     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18308       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18309       # a path prefixed by /cygdrive for fixpath to work.
18310       new_path="$CYGWIN_ROOT_PATH$input_path"
18311     fi
18312   fi
18313 
18314   # remove trailing .exe if any
18315   new_path="${new_path/%.exe/}"
18316 
18317   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18318 
18319   # First separate the path from the arguments. This will split at the first
18320   # space.
18321   complete="$BUILD_CXX"
18322   path="${complete%% *}"
18323   tmp="$complete EOL"
18324   arguments="${tmp#* }"
18325 
18326   # Input might be given as Windows format, start by converting to
18327   # unix format.
18328   new_path="$path"
18329 
18330   windows_path="$new_path"
18331   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18332     unix_path=`$CYGPATH -u "$windows_path"`
18333     new_path="$unix_path"
18334   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18335     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18336     new_path="$unix_path"
18337   fi
18338 
18339 
18340   # Now try to locate executable using which
18341   new_path=`$WHICH "$new_path" 2> /dev/null`
18342 
18343   if test "x$new_path" = x; then
18344     # Oops. Which didn't find the executable.
18345     # The splitting of arguments from the executable at a space might have been incorrect,
18346     # since paths with space are more likely in Windows. Give it another try with the whole
18347     # argument.
18348     path="$complete"
18349     arguments="EOL"
18350     new_path="$path"
18351 
18352   windows_path="$new_path"
18353   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18354     unix_path=`$CYGPATH -u "$windows_path"`
18355     new_path="$unix_path"
18356   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18357     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18358     new_path="$unix_path"
18359   fi
18360 
18361 
18362     new_path=`$WHICH "$new_path" 2> /dev/null`
18363 
18364     if test "x$new_path" = x; then
18365       # It's still not found. Now this is an unrecoverable error.
18366       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
18367 $as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
18368       has_space=`$ECHO "$complete" | $GREP " "`
18369       if test "x$has_space" != x; then
18370         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18371 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18372       fi
18373       as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
18374     fi
18375   fi
18376 
18377   # Now new_path has a complete unix path to the binary
18378   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18379     # Keep paths in /bin as-is, but remove trailing .exe if any
18380     new_path="${new_path/%.exe/}"
18381     # Do not save /bin paths to all_fixpath_prefixes!
18382   else
18383     # Not in mixed or Windows style, start by that.
18384     new_path=`cmd //c echo $new_path`
18385 
18386   input_path="$new_path"
18387   # Check if we need to convert this using DOS-style short mode. If the path
18388   # contains just simple characters, use it. Otherwise (spaces, weird characters),
18389   # take no chances and rewrite it.
18390   # Note: m4 eats our [], so we need to use [ and ] instead.
18391   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18392   if test "x$has_forbidden_chars" != x; then
18393     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18394     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18395   fi
18396 
18397     # Output is in $new_path
18398 
18399   windows_path="$new_path"
18400   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18401     unix_path=`$CYGPATH -u "$windows_path"`
18402     new_path="$unix_path"
18403   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18404     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18405     new_path="$unix_path"
18406   fi
18407 
18408     # remove trailing .exe if any
18409     new_path="${new_path/%.exe/}"
18410 
18411     # Save the first 10 bytes of this path to the storage, so fixpath can work.
18412     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18413   fi
18414 
18415   else
18416     # We're on a posix platform. Hooray! :)
18417     # First separate the path from the arguments. This will split at the first
18418     # space.
18419     complete="$BUILD_CXX"
18420     path="${complete%% *}"
18421     tmp="$complete EOL"
18422     arguments="${tmp#* }"
18423 
18424     # Cannot rely on the command "which" here since it doesn't always work.
18425     is_absolute_path=`$ECHO "$path" | $GREP ^/`
18426     if test -z "$is_absolute_path"; then
18427       # Path to executable is not absolute. Find it.
18428       IFS_save="$IFS"
18429       IFS=:
18430       for p in $PATH; do
18431         if test -f "$p/$path" && test -x "$p/$path"; then
18432           new_path="$p/$path"
18433           break
18434         fi
18435       done
18436       IFS="$IFS_save"
18437     else
18438       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving BUILD_CXX (as $path) failed, using $path directly." >&5
18439 $as_echo "$as_me: Resolving BUILD_CXX (as $path) failed, using $path directly." >&6;}
18440       new_path="$path"
18441     fi
18442 
18443     if test "x$new_path" = x; then
18444         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
18445 $as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
18446         has_space=`$ECHO "$complete" | $GREP " "`
18447         if test "x$has_space" != x; then
18448           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18449 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18450         fi
18451         as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
18452       fi
18453   fi
18454 
18455       # Now join together the path and the arguments once again
18456       if test "x$arguments" != xEOL; then
18457         new_complete="$new_path ${arguments% *}"
18458       else
18459         new_complete="$new_path"
18460       fi
18461 
18462   if test "x$complete" != "x$new_complete"; then
18463       BUILD_CXX="$new_complete"
18464       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CXX to \"$new_complete\"" >&5
18465 $as_echo "$as_me: Rewriting BUILD_CXX to \"$new_complete\"" >&6;}
18466     fi
18467 
18468     # Extract the first word of "ld", so it can be a program name with args.
18469 set dummy ld; ac_word=$2
18470 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18471 $as_echo_n "checking for $ac_word... " >&6; }
18472 if test "${ac_cv_path_BUILD_LD+set}" = set; then :
18473   $as_echo_n "(cached) " >&6
18474 else
18475   case $BUILD_LD in
18476   [\\/]* | ?:[\\/]*)
18477   ac_cv_path_BUILD_LD="$BUILD_LD" # Let the user override the test with a path.
18478   ;;
18479   *)
18480   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18481 for as_dir in $PATH
18482 do
18483   IFS=$as_save_IFS
18484   test -z "$as_dir" && as_dir=.
18485     for ac_exec_ext in '' $ac_executable_extensions; do
18486   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
18487     ac_cv_path_BUILD_LD="$as_dir/$ac_word$ac_exec_ext"
18488     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18489     break 2
18490   fi
18491 done
18492   done
18493 IFS=$as_save_IFS
18494 
18495   ;;
18496 esac
18497 fi
18498 BUILD_LD=$ac_cv_path_BUILD_LD
18499 if test -n "$BUILD_LD"; then
18500   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_LD" >&5
18501 $as_echo "$BUILD_LD" >&6; }
18502 else
18503   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18504 $as_echo "no" >&6; }
18505 fi
18506 
18507 
18508 
18509   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18510 
18511   # First separate the path from the arguments. This will split at the first
18512   # space.
18513   complete="$BUILD_LD"
18514   path="${complete%% *}"
18515   tmp="$complete EOL"
18516   arguments="${tmp#* }"
18517 
18518   # Input might be given as Windows format, start by converting to
18519   # unix format.
18520   new_path=`$CYGPATH -u "$path"`
18521 
18522   # Now try to locate executable using which
18523   new_path=`$WHICH "$new_path" 2> /dev/null`
18524   # bat and cmd files are not always considered executable in cygwin causing which
18525   # to not find them
18526   if test "x$new_path" = x \
18527            && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18528            && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18529     new_path=`$CYGPATH -u "$path"`
18530   fi
18531   if test "x$new_path" = x; then
18532     # Oops. Which didn't find the executable.
18533     # The splitting of arguments from the executable at a space might have been incorrect,
18534     # since paths with space are more likely in Windows. Give it another try with the whole
18535     # argument.
18536     path="$complete"
18537     arguments="EOL"
18538     new_path=`$CYGPATH -u "$path"`
18539     new_path=`$WHICH "$new_path" 2> /dev/null`
18540     # bat and cmd files are not always considered executable in cygwin causing which
18541     # to not find them
18542     if test "x$new_path" = x \
18543              && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18544              && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18545       new_path=`$CYGPATH -u "$path"`
18546     fi
18547     if test "x$new_path" = x; then
18548       # It's still not found. Now this is an unrecoverable error.
18549       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
18550 $as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
18551       has_space=`$ECHO "$complete" | $GREP " "`
18552       if test "x$has_space" != x; then
18553         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18554 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18555       fi
18556       as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
18557     fi
18558   fi
18559 
18560   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18561   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18562   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18563   # "foo.exe" is OK but "foo" is an error.
18564   #
18565   # This test is therefore slightly more accurate than "test -f" to check for file precense.
18566   # It is also a way to make sure we got the proper file name for the real test later on.
18567   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18568   if test "x$test_shortpath" = x; then
18569     # Short path failed, file does not exist as specified.
18570     # Try adding .exe or .cmd
18571     if test -f "${new_path}.exe"; then
18572        input_to_shortpath="${new_path}.exe"
18573     elif test -f "${new_path}.cmd"; then
18574        input_to_shortpath="${new_path}.cmd"
18575     else
18576       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$new_path\", is invalid." >&5
18577 $as_echo "$as_me: The path of BUILD_LD, which resolves as \"$new_path\", is invalid." >&6;}
18578       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18579 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18580       as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
18581     fi
18582   else
18583     input_to_shortpath="$new_path"
18584   fi
18585 
18586   # Call helper function which possibly converts this using DOS-style short mode.
18587   # If so, the updated path is stored in $new_path.
18588   new_path="$input_to_shortpath"
18589 
18590   input_path="$input_to_shortpath"
18591   # Check if we need to convert this using DOS-style short mode. If the path
18592   # contains just simple characters, use it. Otherwise (spaces, weird characters),
18593   # take no chances and rewrite it.
18594   # Note: m4 eats our [], so we need to use [ and ] instead.
18595   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18596   if test "x$has_forbidden_chars" != x; then
18597     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18598     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18599     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18600     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18601       # Going to short mode and back again did indeed matter. Since short mode is
18602       # case insensitive, let's make it lowercase to improve readability.
18603       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18604       # Now convert it back to Unix-stile (cygpath)
18605       input_path=`$CYGPATH -u "$shortmode_path"`
18606       new_path="$input_path"
18607     fi
18608   fi
18609 
18610   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18611   if test "x$test_cygdrive_prefix" = x; then
18612     # As a simple fix, exclude /usr/bin since it's not a real path.
18613     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18614       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18615       # a path prefixed by /cygdrive for fixpath to work.
18616       new_path="$CYGWIN_ROOT_PATH$input_path"
18617     fi
18618   fi
18619 
18620   # remove trailing .exe if any
18621   new_path="${new_path/%.exe/}"
18622 
18623   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18624 
18625   # First separate the path from the arguments. This will split at the first
18626   # space.
18627   complete="$BUILD_LD"
18628   path="${complete%% *}"
18629   tmp="$complete EOL"
18630   arguments="${tmp#* }"
18631 
18632   # Input might be given as Windows format, start by converting to
18633   # unix format.
18634   new_path="$path"
18635 
18636   windows_path="$new_path"
18637   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18638     unix_path=`$CYGPATH -u "$windows_path"`
18639     new_path="$unix_path"
18640   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18641     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18642     new_path="$unix_path"
18643   fi
18644 
18645 
18646   # Now try to locate executable using which
18647   new_path=`$WHICH "$new_path" 2> /dev/null`
18648 
18649   if test "x$new_path" = x; then
18650     # Oops. Which didn't find the executable.
18651     # The splitting of arguments from the executable at a space might have been incorrect,
18652     # since paths with space are more likely in Windows. Give it another try with the whole
18653     # argument.
18654     path="$complete"
18655     arguments="EOL"
18656     new_path="$path"
18657 
18658   windows_path="$new_path"
18659   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18660     unix_path=`$CYGPATH -u "$windows_path"`
18661     new_path="$unix_path"
18662   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18663     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18664     new_path="$unix_path"
18665   fi
18666 
18667 
18668     new_path=`$WHICH "$new_path" 2> /dev/null`
18669 
18670     if test "x$new_path" = x; then
18671       # It's still not found. Now this is an unrecoverable error.
18672       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
18673 $as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
18674       has_space=`$ECHO "$complete" | $GREP " "`
18675       if test "x$has_space" != x; then
18676         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18677 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18678       fi
18679       as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
18680     fi
18681   fi
18682 
18683   # Now new_path has a complete unix path to the binary
18684   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18685     # Keep paths in /bin as-is, but remove trailing .exe if any
18686     new_path="${new_path/%.exe/}"
18687     # Do not save /bin paths to all_fixpath_prefixes!
18688   else
18689     # Not in mixed or Windows style, start by that.
18690     new_path=`cmd //c echo $new_path`
18691 
18692   input_path="$new_path"
18693   # Check if we need to convert this using DOS-style short mode. If the path
18694   # contains just simple characters, use it. Otherwise (spaces, weird characters),
18695   # take no chances and rewrite it.
18696   # Note: m4 eats our [], so we need to use [ and ] instead.
18697   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18698   if test "x$has_forbidden_chars" != x; then
18699     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18700     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18701   fi
18702 
18703     # Output is in $new_path
18704 
18705   windows_path="$new_path"
18706   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18707     unix_path=`$CYGPATH -u "$windows_path"`
18708     new_path="$unix_path"
18709   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18710     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18711     new_path="$unix_path"
18712   fi
18713 
18714     # remove trailing .exe if any
18715     new_path="${new_path/%.exe/}"
18716 
18717     # Save the first 10 bytes of this path to the storage, so fixpath can work.
18718     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18719   fi
18720 
18721   else
18722     # We're on a posix platform. Hooray! :)
18723     # First separate the path from the arguments. This will split at the first
18724     # space.
18725     complete="$BUILD_LD"
18726     path="${complete%% *}"
18727     tmp="$complete EOL"
18728     arguments="${tmp#* }"
18729 
18730     # Cannot rely on the command "which" here since it doesn't always work.
18731     is_absolute_path=`$ECHO "$path" | $GREP ^/`
18732     if test -z "$is_absolute_path"; then
18733       # Path to executable is not absolute. Find it.
18734       IFS_save="$IFS"
18735       IFS=:
18736       for p in $PATH; do
18737         if test -f "$p/$path" && test -x "$p/$path"; then
18738           new_path="$p/$path"
18739           break
18740         fi
18741       done
18742       IFS="$IFS_save"
18743     else
18744       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving BUILD_LD (as $path) failed, using $path directly." >&5
18745 $as_echo "$as_me: Resolving BUILD_LD (as $path) failed, using $path directly." >&6;}
18746       new_path="$path"
18747     fi
18748 
18749     if test "x$new_path" = x; then
18750         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
18751 $as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
18752         has_space=`$ECHO "$complete" | $GREP " "`
18753         if test "x$has_space" != x; then
18754           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18755 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18756         fi
18757         as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
18758       fi
18759   fi
18760 
18761       # Now join together the path and the arguments once again
18762       if test "x$arguments" != xEOL; then
18763         new_complete="$new_path ${arguments% *}"
18764       else
18765         new_complete="$new_path"
18766       fi
18767 
18768   if test "x$complete" != "x$new_complete"; then
18769       BUILD_LD="$new_complete"
18770       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_LD to \"$new_complete\"" >&5
18771 $as_echo "$as_me: Rewriting BUILD_LD to \"$new_complete\"" >&6;}
18772     fi
18773 
18774 fi
18775 
18776 
18777 
18778 
18779 # If a devkit is found on the builddeps server, then prepend its path to the
18780 # PATH variable. If there are cross compilers available in the devkit, these
18781 # will be found by AC_PROG_CC et al.
18782 DEVKIT=
18783 
18784 
18785     if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
18786         # Source the builddeps file again, to make sure it uses the latest variables!
18787         . $builddepsfile
18788         # Look for a target and build machine specific resource!
18789         eval resource=\${builddep_devkit_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
18790         if test "x$resource" = x; then
18791             # Ok, lets instead look for a target specific resource
18792             eval resource=\${builddep_devkit_TARGET_${rewritten_target_var}}
18793         fi
18794         if test "x$resource" = x; then
18795             # Ok, lets instead look for a build specific resource
18796             eval resource=\${builddep_devkit_BUILD_${rewritten_build_var}}
18797         fi
18798         if test "x$resource" = x; then
18799             # Ok, lets instead look for a generic resource
18800             # (The devkit comes from M4 and not the shell, thus no need for eval here.)
18801             resource=${builddep_devkit}
18802         fi
18803         if test "x$resource" != x; then
18804             { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for devkit" >&5
18805 $as_echo "$as_me: Using builddeps $resource for devkit" >&6;}
18806             # If the resource in the builddeps.conf file is an existing directory,
18807             # for example /java/linux/cups
18808             if test -d ${resource}; then
18809                depdir=${resource}
18810             else
18811 
18812 # devkit is for example mymodule
18813 # $resource is for example libs/general/libmymod_1_2_3.zip
18814 # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
18815 # $with_builddeps_dir is for example /localhome/builddeps
18816 # depdir is the name of the variable into which we store the depdir, eg MYMOD
18817 # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
18818 # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
18819     filename=`basename $resource`
18820     filebase=`echo $filename | sed 's/\.[^\.]*$//'`
18821     filebase=${filename%%.*}
18822     extension=${filename#*.}
18823     installdir=$with_builddeps_dir/$filebase
18824     if test ! -f $installdir/$filename.unpacked; then
18825         { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency devkit from $with_builddeps_server/$resource and installing into $installdir" >&5
18826 $as_echo "$as_me: Downloading build dependency devkit from $with_builddeps_server/$resource and installing into $installdir" >&6;}
18827         if test ! -d $installdir; then
18828             mkdir -p $installdir
18829         fi
18830         if test ! -d $installdir; then
18831             as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
18832         fi
18833         tmpfile=`mktemp $installdir/devkit.XXXXXXXXX`
18834         touch $tmpfile
18835         if test ! -f $tmpfile; then
18836             as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
18837         fi
18838 
18839     # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
18840     # $tmpfile is the local file name for the downloaded file.
18841     VALID_TOOL=no
18842     if test "x$BDEPS_FTP" = xwget; then
18843        VALID_TOOL=yes
18844        wget -O $tmpfile $with_builddeps_server/$resource
18845     fi
18846     if test "x$BDEPS_FTP" = xlftp; then
18847        VALID_TOOL=yes
18848        lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
18849     fi
18850     if test "x$BDEPS_FTP" = xftp; then
18851         VALID_TOOL=yes
18852         FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
18853         FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
18854         FTPUSERPWD=${FTPSERVER%%@*}
18855         if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
18856             FTPUSER=${userpwd%%:*}
18857             FTPPWD=${userpwd#*@}
18858             FTPSERVER=${FTPSERVER#*@}
18859         else
18860             FTPUSER=ftp
18861             FTPPWD=ftp
18862         fi
18863         # the "pass" command does not work on some
18864         # ftp clients (read ftp.exe) but if it works,
18865         # passive mode is better!
18866         (\
18867             echo "user $FTPUSER $FTPPWD"        ;\
18868             echo "pass"                         ;\
18869             echo "bin"                          ;\
18870             echo "get $FTPPATH $tmpfile"              ;\
18871         ) | ftp -in $FTPSERVER
18872     fi
18873     if test "x$VALID_TOOL" != xyes; then
18874        as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
18875     fi
18876 
18877         mv $tmpfile $installdir/$filename
18878         if test ! -s $installdir/$filename; then
18879             as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
18880         fi
18881         case "$extension" in
18882             zip)  echo "Unzipping $installdir/$filename..."
18883                (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
18884             ;;
18885             tar.gz) echo "Untaring $installdir/$filename..."
18886                (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
18887             ;;
18888             tgz) echo "Untaring $installdir/$filename..."
18889                (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
18890             ;;
18891             *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
18892             ;;
18893         esac
18894     fi
18895     if test -f $installdir/$filename.unpacked; then
18896         depdir=$installdir
18897     fi
18898 
18899             fi
18900             # Source the builddeps file again, because in the previous command, the depdir
18901             # was updated to point at the current build dependency install directory.
18902             . $builddepsfile
18903             # Now extract variables from the builddeps.conf files.
18904             theroot=${builddep_devkit_ROOT}
18905             thecflags=${builddep_devkit_CFLAGS}
18906             thelibs=${builddep_devkit_LIBS}
18907             if test "x$depdir" = x; then
18908                 as_fn_error $? "Could not download build dependency devkit" "$LINENO" 5
18909             fi
18910             DEVKIT=$depdir
18911             if test "x$theroot" != x; then
18912                DEVKIT="$theroot"
18913             fi
18914             if test "x$thecflags" != x; then
18915                DEVKIT_CFLAGS="$thecflags"
18916             fi
18917             if test "x$thelibs" != x; then
18918                DEVKIT_LIBS="$thelibs"
18919             fi
18920             # Found devkit
18921                      PATH="$DEVKIT/bin:$PATH"
18922                      SYS_ROOT="$DEVKIT/${rewritten_target}/sys-root"
18923                      if test "x$x_includes" = "xNONE"; then
18924                          x_includes="$SYS_ROOT/usr/include/X11"
18925                      fi
18926                      if test "x$x_libraries" = "xNONE"; then
18927                          x_libraries="$SYS_ROOT/usr/lib"
18928                      fi
18929 
18930 
18931         fi
18932 
18933     fi
18934 
18935 
18936 if test "x$SYS_ROOT" != "x/" ; then
18937     CFLAGS="--sysroot=$SYS_ROOT $CFLAGS"
18938     CXXFLAGS="--sysroot=$SYS_ROOT $CXXFLAGS"
18939     OBJCFLAGS="--sysroot=$SYS_ROOT $OBJCFLAGS"
18940     OBJCXXFLAGS="--sysroot=$SYS_ROOT $OBJCFLAGS"
18941     CPPFLAGS="--sysroot=$SYS_ROOT $CPPFLAGS"
18942     LDFLAGS="--sysroot=$SYS_ROOT $LDFLAGS"
18943 fi
18944 
18945 # Store the CFLAGS etal passed to the configure script.
18946 ORG_CFLAGS="$CFLAGS"
18947 ORG_CXXFLAGS="$CXXFLAGS"
18948 ORG_OBJCFLAGS="$OBJCFLAGS"
18949 
18950 # autoconf magic only relies on PATH, so update it if tools dir is specified
18951 OLD_PATH="$PATH"
18952 if test "x$TOOLS_DIR" != x; then
18953   PATH=$TOOLS_DIR:$PATH
18954 fi
18955 
18956 
18957 ### Locate C compiler (CC)
18958 
18959 # On windows, only cl.exe is supported.
18960 # On Solaris, cc is preferred to gcc.
18961 # Elsewhere, gcc is preferred to cc.
18962 
18963 if test "x$CC" != x; then
18964   COMPILER_CHECK_LIST="$CC"
18965 elif test "x$OPENJDK_TARGET_OS" = "xwindows"; then
18966   COMPILER_CHECK_LIST="cl"
18967 elif test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
18968   COMPILER_CHECK_LIST="cc gcc"
18969 else
18970   COMPILER_CHECK_LIST="gcc cc"
18971 fi
18972 
18973 
18974   COMPILER_NAME=C
18975 
18976   CC=
18977   # If TOOLS_DIR is set, check for all compiler names in there first
18978   # before checking the rest of the PATH.
18979   if test -n "$TOOLS_DIR"; then
18980     PATH_save="$PATH"
18981     PATH="$TOOLS_DIR"
18982     for ac_prog in $COMPILER_CHECK_LIST
18983 do
18984   # Extract the first word of "$ac_prog", so it can be a program name with args.
18985 set dummy $ac_prog; ac_word=$2
18986 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18987 $as_echo_n "checking for $ac_word... " >&6; }
18988 if test "${ac_cv_path_TOOLS_DIR_CC+set}" = set; then :
18989   $as_echo_n "(cached) " >&6
18990 else
18991   case $TOOLS_DIR_CC in
18992   [\\/]* | ?:[\\/]*)
18993   ac_cv_path_TOOLS_DIR_CC="$TOOLS_DIR_CC" # Let the user override the test with a path.
18994   ;;
18995   *)
18996   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18997 for as_dir in $PATH
18998 do
18999   IFS=$as_save_IFS
19000   test -z "$as_dir" && as_dir=.
19001     for ac_exec_ext in '' $ac_executable_extensions; do
19002   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
19003     ac_cv_path_TOOLS_DIR_CC="$as_dir/$ac_word$ac_exec_ext"
19004     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19005     break 2
19006   fi
19007 done
19008   done
19009 IFS=$as_save_IFS
19010 
19011   ;;
19012 esac
19013 fi
19014 TOOLS_DIR_CC=$ac_cv_path_TOOLS_DIR_CC
19015 if test -n "$TOOLS_DIR_CC"; then
19016   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLS_DIR_CC" >&5
19017 $as_echo "$TOOLS_DIR_CC" >&6; }
19018 else
19019   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19020 $as_echo "no" >&6; }
19021 fi
19022 
19023 
19024   test -n "$TOOLS_DIR_CC" && break
19025 done
19026 
19027     CC=$TOOLS_DIR_CC
19028     PATH="$PATH_save"
19029   fi
19030 
19031   # AC_PATH_PROGS can't be run multiple times with the same variable,
19032   # so create a new name for this run.
19033   if test "x$CC" = x; then
19034     for ac_prog in $COMPILER_CHECK_LIST
19035 do
19036   # Extract the first word of "$ac_prog", so it can be a program name with args.
19037 set dummy $ac_prog; ac_word=$2
19038 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19039 $as_echo_n "checking for $ac_word... " >&6; }
19040 if test "${ac_cv_path_POTENTIAL_CC+set}" = set; then :
19041   $as_echo_n "(cached) " >&6
19042 else
19043   case $POTENTIAL_CC in
19044   [\\/]* | ?:[\\/]*)
19045   ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
19046   ;;
19047   *)
19048   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19049 for as_dir in $PATH
19050 do
19051   IFS=$as_save_IFS
19052   test -z "$as_dir" && as_dir=.
19053     for ac_exec_ext in '' $ac_executable_extensions; do
19054   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
19055     ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
19056     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19057     break 2
19058   fi
19059 done
19060   done
19061 IFS=$as_save_IFS
19062 
19063   ;;
19064 esac
19065 fi
19066 POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
19067 if test -n "$POTENTIAL_CC"; then
19068   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
19069 $as_echo "$POTENTIAL_CC" >&6; }
19070 else
19071   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19072 $as_echo "no" >&6; }
19073 fi
19074 
19075 
19076   test -n "$POTENTIAL_CC" && break
19077 done
19078 
19079     CC=$POTENTIAL_CC
19080   fi
19081 
19082   if test "x$CC" = x; then
19083 
19084     # Print a helpful message on how to acquire the necessary build dependency.
19085     # devkit is the help tag: freetyp2, cups, pulse, alsa etc
19086     MISSING_DEPENDENCY=devkit
19087     PKGHANDLER_COMMAND=
19088 
19089     case $PKGHANDLER in
19090         apt-get)
19091                 apt_help     $MISSING_DEPENDENCY ;;
19092     yum)
19093                 yum_help     $MISSING_DEPENDENCY ;;
19094         port)
19095                 port_help    $MISSING_DEPENDENCY ;;
19096         pkgutil)
19097                 pkgutil_help $MISSING_DEPENDENCY ;;
19098         pkgadd)
19099                 pkgadd_help  $MISSING_DEPENDENCY ;;
19100     * )
19101       break ;;
19102     esac
19103 
19104     if test "x$PKGHANDLER_COMMAND" != x; then
19105         HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
19106     fi
19107 
19108       as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
19109   fi
19110 
19111   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19112 
19113   # First separate the path from the arguments. This will split at the first
19114   # space.
19115   complete="$CC"
19116   path="${complete%% *}"
19117   tmp="$complete EOL"
19118   arguments="${tmp#* }"
19119 
19120   # Input might be given as Windows format, start by converting to
19121   # unix format.
19122   new_path=`$CYGPATH -u "$path"`
19123 
19124   # Now try to locate executable using which
19125   new_path=`$WHICH "$new_path" 2> /dev/null`
19126   # bat and cmd files are not always considered executable in cygwin causing which
19127   # to not find them
19128   if test "x$new_path" = x \
19129            && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19130            && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19131     new_path=`$CYGPATH -u "$path"`
19132   fi
19133   if test "x$new_path" = x; then
19134     # Oops. Which didn't find the executable.
19135     # The splitting of arguments from the executable at a space might have been incorrect,
19136     # since paths with space are more likely in Windows. Give it another try with the whole
19137     # argument.
19138     path="$complete"
19139     arguments="EOL"
19140     new_path=`$CYGPATH -u "$path"`
19141     new_path=`$WHICH "$new_path" 2> /dev/null`
19142     # bat and cmd files are not always considered executable in cygwin causing which
19143     # to not find them
19144     if test "x$new_path" = x \
19145              && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19146              && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19147       new_path=`$CYGPATH -u "$path"`
19148     fi
19149     if test "x$new_path" = x; then
19150       # It's still not found. Now this is an unrecoverable error.
19151       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
19152 $as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
19153       has_space=`$ECHO "$complete" | $GREP " "`
19154       if test "x$has_space" != x; then
19155         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19156 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19157       fi
19158       as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
19159     fi
19160   fi
19161 
19162   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19163   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19164   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19165   # "foo.exe" is OK but "foo" is an error.
19166   #
19167   # This test is therefore slightly more accurate than "test -f" to check for file precense.
19168   # It is also a way to make sure we got the proper file name for the real test later on.
19169   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19170   if test "x$test_shortpath" = x; then
19171     # Short path failed, file does not exist as specified.
19172     # Try adding .exe or .cmd
19173     if test -f "${new_path}.exe"; then
19174        input_to_shortpath="${new_path}.exe"
19175     elif test -f "${new_path}.cmd"; then
19176        input_to_shortpath="${new_path}.cmd"
19177     else
19178       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$new_path\", is invalid." >&5
19179 $as_echo "$as_me: The path of CC, which resolves as \"$new_path\", is invalid." >&6;}
19180       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19181 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19182       as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
19183     fi
19184   else
19185     input_to_shortpath="$new_path"
19186   fi
19187 
19188   # Call helper function which possibly converts this using DOS-style short mode.
19189   # If so, the updated path is stored in $new_path.
19190   new_path="$input_to_shortpath"
19191 
19192   input_path="$input_to_shortpath"
19193   # Check if we need to convert this using DOS-style short mode. If the path
19194   # contains just simple characters, use it. Otherwise (spaces, weird characters),
19195   # take no chances and rewrite it.
19196   # Note: m4 eats our [], so we need to use [ and ] instead.
19197   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19198   if test "x$has_forbidden_chars" != x; then
19199     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19200     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19201     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19202     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19203       # Going to short mode and back again did indeed matter. Since short mode is
19204       # case insensitive, let's make it lowercase to improve readability.
19205       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19206       # Now convert it back to Unix-stile (cygpath)
19207       input_path=`$CYGPATH -u "$shortmode_path"`
19208       new_path="$input_path"
19209     fi
19210   fi
19211 
19212   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19213   if test "x$test_cygdrive_prefix" = x; then
19214     # As a simple fix, exclude /usr/bin since it's not a real path.
19215     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19216       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19217       # a path prefixed by /cygdrive for fixpath to work.
19218       new_path="$CYGWIN_ROOT_PATH$input_path"
19219     fi
19220   fi
19221 
19222   # remove trailing .exe if any
19223   new_path="${new_path/%.exe/}"
19224 
19225   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19226 
19227   # First separate the path from the arguments. This will split at the first
19228   # space.
19229   complete="$CC"
19230   path="${complete%% *}"
19231   tmp="$complete EOL"
19232   arguments="${tmp#* }"
19233 
19234   # Input might be given as Windows format, start by converting to
19235   # unix format.
19236   new_path="$path"
19237 
19238   windows_path="$new_path"
19239   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19240     unix_path=`$CYGPATH -u "$windows_path"`
19241     new_path="$unix_path"
19242   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19243     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19244     new_path="$unix_path"
19245   fi
19246 
19247 
19248   # Now try to locate executable using which
19249   new_path=`$WHICH "$new_path" 2> /dev/null`
19250 
19251   if test "x$new_path" = x; then
19252     # Oops. Which didn't find the executable.
19253     # The splitting of arguments from the executable at a space might have been incorrect,
19254     # since paths with space are more likely in Windows. Give it another try with the whole
19255     # argument.
19256     path="$complete"
19257     arguments="EOL"
19258     new_path="$path"
19259 
19260   windows_path="$new_path"
19261   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19262     unix_path=`$CYGPATH -u "$windows_path"`
19263     new_path="$unix_path"
19264   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19265     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19266     new_path="$unix_path"
19267   fi
19268 
19269 
19270     new_path=`$WHICH "$new_path" 2> /dev/null`
19271 
19272     if test "x$new_path" = x; then
19273       # It's still not found. Now this is an unrecoverable error.
19274       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
19275 $as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
19276       has_space=`$ECHO "$complete" | $GREP " "`
19277       if test "x$has_space" != x; then
19278         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19279 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19280       fi
19281       as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
19282     fi
19283   fi
19284 
19285   # Now new_path has a complete unix path to the binary
19286   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
19287     # Keep paths in /bin as-is, but remove trailing .exe if any
19288     new_path="${new_path/%.exe/}"
19289     # Do not save /bin paths to all_fixpath_prefixes!
19290   else
19291     # Not in mixed or Windows style, start by that.
19292     new_path=`cmd //c echo $new_path`
19293 
19294   input_path="$new_path"
19295   # Check if we need to convert this using DOS-style short mode. If the path
19296   # contains just simple characters, use it. Otherwise (spaces, weird characters),
19297   # take no chances and rewrite it.
19298   # Note: m4 eats our [], so we need to use [ and ] instead.
19299   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19300   if test "x$has_forbidden_chars" != x; then
19301     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19302     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19303   fi
19304 
19305     # Output is in $new_path
19306 
19307   windows_path="$new_path"
19308   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19309     unix_path=`$CYGPATH -u "$windows_path"`
19310     new_path="$unix_path"
19311   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19312     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19313     new_path="$unix_path"
19314   fi
19315 
19316     # remove trailing .exe if any
19317     new_path="${new_path/%.exe/}"
19318 
19319     # Save the first 10 bytes of this path to the storage, so fixpath can work.
19320     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19321   fi
19322 
19323   else
19324     # We're on a posix platform. Hooray! :)
19325     # First separate the path from the arguments. This will split at the first
19326     # space.
19327     complete="$CC"
19328     path="${complete%% *}"
19329     tmp="$complete EOL"
19330     arguments="${tmp#* }"
19331 
19332     # Cannot rely on the command "which" here since it doesn't always work.
19333     is_absolute_path=`$ECHO "$path" | $GREP ^/`
19334     if test -z "$is_absolute_path"; then
19335       # Path to executable is not absolute. Find it.
19336       IFS_save="$IFS"
19337       IFS=:
19338       for p in $PATH; do
19339         if test -f "$p/$path" && test -x "$p/$path"; then
19340           new_path="$p/$path"
19341           break
19342         fi
19343       done
19344       IFS="$IFS_save"
19345     else
19346       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CC (as $path) failed, using $path directly." >&5
19347 $as_echo "$as_me: Resolving CC (as $path) failed, using $path directly." >&6;}
19348       new_path="$path"
19349     fi
19350 
19351     if test "x$new_path" = x; then
19352         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
19353 $as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
19354         has_space=`$ECHO "$complete" | $GREP " "`
19355         if test "x$has_space" != x; then
19356           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19357 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19358         fi
19359         as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
19360       fi
19361   fi
19362 
19363       # Now join together the path and the arguments once again
19364       if test "x$arguments" != xEOL; then
19365         new_complete="$new_path ${arguments% *}"
19366       else
19367         new_complete="$new_path"
19368       fi
19369 
19370   if test "x$complete" != "x$new_complete"; then
19371       CC="$new_complete"
19372       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CC to \"$new_complete\"" >&5
19373 $as_echo "$as_me: Rewriting CC to \"$new_complete\"" >&6;}
19374     fi
19375 
19376   { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CC" >&5
19377 $as_echo_n "checking resolved symbolic links for CC... " >&6; }
19378   TEST_COMPILER="$CC"
19379 
19380     if test "x$OPENJDK_BUILD_OS" != xwindows; then
19381         # Follow a chain of symbolic links. Use readlink
19382         # where it exists, else fall back to horribly
19383         # complicated shell code.
19384         if test "x$READLINK_TESTED" != yes; then
19385             # On MacOSX there is a readlink tool with a different
19386             # purpose than the GNU readlink tool. Check the found readlink.
19387             ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
19388             if test "x$ISGNU" = x; then
19389                  # A readlink that we do not know how to use.
19390                  # Are there other non-GNU readlinks out there?
19391                  READLINK_TESTED=yes
19392                  READLINK=
19393             fi
19394         fi
19395 
19396         if test "x$READLINK" != x; then
19397             TEST_COMPILER=`$READLINK -f $TEST_COMPILER`
19398         else
19399             # Save the current directory for restoring afterwards
19400             STARTDIR=$PWD
19401             COUNTER=0
19402             sym_link_dir=`$DIRNAME $TEST_COMPILER`
19403             sym_link_file=`$BASENAME $TEST_COMPILER`
19404             cd $sym_link_dir
19405             # Use -P flag to resolve symlinks in directories.
19406             cd `$THEPWDCMD -P`
19407             sym_link_dir=`$THEPWDCMD -P`
19408             # Resolve file symlinks
19409             while test $COUNTER -lt 20; do
19410                 ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
19411                 if test "x$ISLINK" == x; then
19412                     # This is not a symbolic link! We are done!
19413                     break
19414                 fi
19415                 # Again resolve directory symlinks since the target of the just found
19416                 # link could be in a different directory
19417                 cd `$DIRNAME $ISLINK`
19418                 sym_link_dir=`$THEPWDCMD -P`
19419                 sym_link_file=`$BASENAME $ISLINK`
19420                 let COUNTER=COUNTER+1
19421             done
19422             cd $STARTDIR
19423             TEST_COMPILER=$sym_link_dir/$sym_link_file
19424         fi
19425     fi
19426 
19427   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_COMPILER" >&5
19428 $as_echo "$TEST_COMPILER" >&6; }
19429   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CC is disguised ccache" >&5
19430 $as_echo_n "checking if CC is disguised ccache... " >&6; }
19431 
19432   COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"`
19433   if test "x$COMPILER_BASENAME" = "xccache"; then
19434     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5
19435 $as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; }
19436     # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache.
19437     # We want to control ccache invocation ourselves, so ignore this cc and try
19438     # searching again.
19439 
19440     # Remove the path to the fake ccache cc from the PATH
19441     RETRY_COMPILER_SAVED_PATH="$PATH"
19442     COMPILER_DIRNAME=`$DIRNAME $CC`
19443     PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`"
19444 
19445     # Try again looking for our compiler
19446     if test -n "$ac_tool_prefix"; then
19447   for ac_prog in $COMPILER_CHECK_LIST
19448   do
19449     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
19450 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
19451 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19452 $as_echo_n "checking for $ac_word... " >&6; }
19453 if test "${ac_cv_prog_PROPER_COMPILER_CC+set}" = set; then :
19454   $as_echo_n "(cached) " >&6
19455 else
19456   if test -n "$PROPER_COMPILER_CC"; then
19457   ac_cv_prog_PROPER_COMPILER_CC="$PROPER_COMPILER_CC" # Let the user override the test.
19458 else
19459 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19460 for as_dir in $PATH
19461 do
19462   IFS=$as_save_IFS
19463   test -z "$as_dir" && as_dir=.
19464     for ac_exec_ext in '' $ac_executable_extensions; do
19465   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
19466     ac_cv_prog_PROPER_COMPILER_CC="$ac_tool_prefix$ac_prog"
19467     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19468     break 2
19469   fi
19470 done
19471   done
19472 IFS=$as_save_IFS
19473 
19474 fi
19475 fi
19476 PROPER_COMPILER_CC=$ac_cv_prog_PROPER_COMPILER_CC
19477 if test -n "$PROPER_COMPILER_CC"; then
19478   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5
19479 $as_echo "$PROPER_COMPILER_CC" >&6; }
19480 else
19481   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19482 $as_echo "no" >&6; }
19483 fi
19484 
19485 
19486     test -n "$PROPER_COMPILER_CC" && break
19487   done
19488 fi
19489 if test -z "$PROPER_COMPILER_CC"; then
19490   ac_ct_PROPER_COMPILER_CC=$PROPER_COMPILER_CC
19491   for ac_prog in $COMPILER_CHECK_LIST
19492 do
19493   # Extract the first word of "$ac_prog", so it can be a program name with args.
19494 set dummy $ac_prog; ac_word=$2
19495 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19496 $as_echo_n "checking for $ac_word... " >&6; }
19497 if test "${ac_cv_prog_ac_ct_PROPER_COMPILER_CC+set}" = set; then :
19498   $as_echo_n "(cached) " >&6
19499 else
19500   if test -n "$ac_ct_PROPER_COMPILER_CC"; then
19501   ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_ct_PROPER_COMPILER_CC" # Let the user override the test.
19502 else
19503 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19504 for as_dir in $PATH
19505 do
19506   IFS=$as_save_IFS
19507   test -z "$as_dir" && as_dir=.
19508     for ac_exec_ext in '' $ac_executable_extensions; do
19509   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
19510     ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_prog"
19511     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19512     break 2
19513   fi
19514 done
19515   done
19516 IFS=$as_save_IFS
19517 
19518 fi
19519 fi
19520 ac_ct_PROPER_COMPILER_CC=$ac_cv_prog_ac_ct_PROPER_COMPILER_CC
19521 if test -n "$ac_ct_PROPER_COMPILER_CC"; then
19522   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CC" >&5
19523 $as_echo "$ac_ct_PROPER_COMPILER_CC" >&6; }
19524 else
19525   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19526 $as_echo "no" >&6; }
19527 fi
19528 
19529 
19530   test -n "$ac_ct_PROPER_COMPILER_CC" && break
19531 done
19532 
19533   if test "x$ac_ct_PROPER_COMPILER_CC" = x; then
19534     PROPER_COMPILER_CC=""
19535   else
19536     case $cross_compiling:$ac_tool_warned in
19537 yes:)
19538 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
19539 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
19540 ac_tool_warned=yes ;;
19541 esac
19542     PROPER_COMPILER_CC=$ac_ct_PROPER_COMPILER_CC
19543   fi
19544 fi
19545 
19546 
19547   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19548 
19549   # First separate the path from the arguments. This will split at the first
19550   # space.
19551   complete="$PROPER_COMPILER_CC"
19552   path="${complete%% *}"
19553   tmp="$complete EOL"
19554   arguments="${tmp#* }"
19555 
19556   # Input might be given as Windows format, start by converting to
19557   # unix format.
19558   new_path=`$CYGPATH -u "$path"`
19559 
19560   # Now try to locate executable using which
19561   new_path=`$WHICH "$new_path" 2> /dev/null`
19562   # bat and cmd files are not always considered executable in cygwin causing which
19563   # to not find them
19564   if test "x$new_path" = x \
19565            && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19566            && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19567     new_path=`$CYGPATH -u "$path"`
19568   fi
19569   if test "x$new_path" = x; then
19570     # Oops. Which didn't find the executable.
19571     # The splitting of arguments from the executable at a space might have been incorrect,
19572     # since paths with space are more likely in Windows. Give it another try with the whole
19573     # argument.
19574     path="$complete"
19575     arguments="EOL"
19576     new_path=`$CYGPATH -u "$path"`
19577     new_path=`$WHICH "$new_path" 2> /dev/null`
19578     # bat and cmd files are not always considered executable in cygwin causing which
19579     # to not find them
19580     if test "x$new_path" = x \
19581              && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19582              && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19583       new_path=`$CYGPATH -u "$path"`
19584     fi
19585     if test "x$new_path" = x; then
19586       # It's still not found. Now this is an unrecoverable error.
19587       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
19588 $as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
19589       has_space=`$ECHO "$complete" | $GREP " "`
19590       if test "x$has_space" != x; then
19591         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19592 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19593       fi
19594       as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
19595     fi
19596   fi
19597 
19598   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19599   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19600   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19601   # "foo.exe" is OK but "foo" is an error.
19602   #
19603   # This test is therefore slightly more accurate than "test -f" to check for file precense.
19604   # It is also a way to make sure we got the proper file name for the real test later on.
19605   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19606   if test "x$test_shortpath" = x; then
19607     # Short path failed, file does not exist as specified.
19608     # Try adding .exe or .cmd
19609     if test -f "${new_path}.exe"; then
19610        input_to_shortpath="${new_path}.exe"
19611     elif test -f "${new_path}.cmd"; then
19612        input_to_shortpath="${new_path}.cmd"
19613     else
19614       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&5
19615 $as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&6;}
19616       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19617 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19618       as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
19619     fi
19620   else
19621     input_to_shortpath="$new_path"
19622   fi
19623 
19624   # Call helper function which possibly converts this using DOS-style short mode.
19625   # If so, the updated path is stored in $new_path.
19626   new_path="$input_to_shortpath"
19627 
19628   input_path="$input_to_shortpath"
19629   # Check if we need to convert this using DOS-style short mode. If the path
19630   # contains just simple characters, use it. Otherwise (spaces, weird characters),
19631   # take no chances and rewrite it.
19632   # Note: m4 eats our [], so we need to use [ and ] instead.
19633   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19634   if test "x$has_forbidden_chars" != x; then
19635     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19636     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19637     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19638     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19639       # Going to short mode and back again did indeed matter. Since short mode is
19640       # case insensitive, let's make it lowercase to improve readability.
19641       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19642       # Now convert it back to Unix-stile (cygpath)
19643       input_path=`$CYGPATH -u "$shortmode_path"`
19644       new_path="$input_path"
19645     fi
19646   fi
19647 
19648   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19649   if test "x$test_cygdrive_prefix" = x; then
19650     # As a simple fix, exclude /usr/bin since it's not a real path.
19651     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19652       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19653       # a path prefixed by /cygdrive for fixpath to work.
19654       new_path="$CYGWIN_ROOT_PATH$input_path"
19655     fi
19656   fi
19657 
19658   # remove trailing .exe if any
19659   new_path="${new_path/%.exe/}"
19660 
19661   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19662 
19663   # First separate the path from the arguments. This will split at the first
19664   # space.
19665   complete="$PROPER_COMPILER_CC"
19666   path="${complete%% *}"
19667   tmp="$complete EOL"
19668   arguments="${tmp#* }"
19669 
19670   # Input might be given as Windows format, start by converting to
19671   # unix format.
19672   new_path="$path"
19673 
19674   windows_path="$new_path"
19675   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19676     unix_path=`$CYGPATH -u "$windows_path"`
19677     new_path="$unix_path"
19678   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19679     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19680     new_path="$unix_path"
19681   fi
19682 
19683 
19684   # Now try to locate executable using which
19685   new_path=`$WHICH "$new_path" 2> /dev/null`
19686 
19687   if test "x$new_path" = x; then
19688     # Oops. Which didn't find the executable.
19689     # The splitting of arguments from the executable at a space might have been incorrect,
19690     # since paths with space are more likely in Windows. Give it another try with the whole
19691     # argument.
19692     path="$complete"
19693     arguments="EOL"
19694     new_path="$path"
19695 
19696   windows_path="$new_path"
19697   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19698     unix_path=`$CYGPATH -u "$windows_path"`
19699     new_path="$unix_path"
19700   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19701     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19702     new_path="$unix_path"
19703   fi
19704 
19705 
19706     new_path=`$WHICH "$new_path" 2> /dev/null`
19707 
19708     if test "x$new_path" = x; then
19709       # It's still not found. Now this is an unrecoverable error.
19710       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
19711 $as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
19712       has_space=`$ECHO "$complete" | $GREP " "`
19713       if test "x$has_space" != x; then
19714         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19715 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19716       fi
19717       as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
19718     fi
19719   fi
19720 
19721   # Now new_path has a complete unix path to the binary
19722   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
19723     # Keep paths in /bin as-is, but remove trailing .exe if any
19724     new_path="${new_path/%.exe/}"
19725     # Do not save /bin paths to all_fixpath_prefixes!
19726   else
19727     # Not in mixed or Windows style, start by that.
19728     new_path=`cmd //c echo $new_path`
19729 
19730   input_path="$new_path"
19731   # Check if we need to convert this using DOS-style short mode. If the path
19732   # contains just simple characters, use it. Otherwise (spaces, weird characters),
19733   # take no chances and rewrite it.
19734   # Note: m4 eats our [], so we need to use [ and ] instead.
19735   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19736   if test "x$has_forbidden_chars" != x; then
19737     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19738     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19739   fi
19740 
19741     # Output is in $new_path
19742 
19743   windows_path="$new_path"
19744   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19745     unix_path=`$CYGPATH -u "$windows_path"`
19746     new_path="$unix_path"
19747   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19748     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19749     new_path="$unix_path"
19750   fi
19751 
19752     # remove trailing .exe if any
19753     new_path="${new_path/%.exe/}"
19754 
19755     # Save the first 10 bytes of this path to the storage, so fixpath can work.
19756     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19757   fi
19758 
19759   else
19760     # We're on a posix platform. Hooray! :)
19761     # First separate the path from the arguments. This will split at the first
19762     # space.
19763     complete="$PROPER_COMPILER_CC"
19764     path="${complete%% *}"
19765     tmp="$complete EOL"
19766     arguments="${tmp#* }"
19767 
19768     # Cannot rely on the command "which" here since it doesn't always work.
19769     is_absolute_path=`$ECHO "$path" | $GREP ^/`
19770     if test -z "$is_absolute_path"; then
19771       # Path to executable is not absolute. Find it.
19772       IFS_save="$IFS"
19773       IFS=:
19774       for p in $PATH; do
19775         if test -f "$p/$path" && test -x "$p/$path"; then
19776           new_path="$p/$path"
19777           break
19778         fi
19779       done
19780       IFS="$IFS_save"
19781     else
19782       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving PROPER_COMPILER_CC (as $path) failed, using $path directly." >&5
19783 $as_echo "$as_me: Resolving PROPER_COMPILER_CC (as $path) failed, using $path directly." >&6;}
19784       new_path="$path"
19785     fi
19786 
19787     if test "x$new_path" = x; then
19788         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
19789 $as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
19790         has_space=`$ECHO "$complete" | $GREP " "`
19791         if test "x$has_space" != x; then
19792           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19793 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19794         fi
19795         as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
19796       fi
19797   fi
19798 
19799       # Now join together the path and the arguments once again
19800       if test "x$arguments" != xEOL; then
19801         new_complete="$new_path ${arguments% *}"
19802       else
19803         new_complete="$new_path"
19804       fi
19805 
19806   if test "x$complete" != "x$new_complete"; then
19807       PROPER_COMPILER_CC="$new_complete"
19808       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&5
19809 $as_echo "$as_me: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&6;}
19810     fi
19811 
19812     PATH="$RETRY_COMPILER_SAVED_PATH"
19813 
19814     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CC" >&5
19815 $as_echo_n "checking for resolved symbolic links for CC... " >&6; }
19816 
19817     if test "x$OPENJDK_BUILD_OS" != xwindows; then
19818         # Follow a chain of symbolic links. Use readlink
19819         # where it exists, else fall back to horribly
19820         # complicated shell code.
19821         if test "x$READLINK_TESTED" != yes; then
19822             # On MacOSX there is a readlink tool with a different
19823             # purpose than the GNU readlink tool. Check the found readlink.
19824             ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
19825             if test "x$ISGNU" = x; then
19826                  # A readlink that we do not know how to use.
19827                  # Are there other non-GNU readlinks out there?
19828                  READLINK_TESTED=yes
19829                  READLINK=
19830             fi
19831         fi
19832 
19833         if test "x$READLINK" != x; then
19834             PROPER_COMPILER_CC=`$READLINK -f $PROPER_COMPILER_CC`
19835         else
19836             # Save the current directory for restoring afterwards
19837             STARTDIR=$PWD
19838             COUNTER=0
19839             sym_link_dir=`$DIRNAME $PROPER_COMPILER_CC`
19840             sym_link_file=`$BASENAME $PROPER_COMPILER_CC`
19841             cd $sym_link_dir
19842             # Use -P flag to resolve symlinks in directories.
19843             cd `$THEPWDCMD -P`
19844             sym_link_dir=`$THEPWDCMD -P`
19845             # Resolve file symlinks
19846             while test $COUNTER -lt 20; do
19847                 ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
19848                 if test "x$ISLINK" == x; then
19849                     # This is not a symbolic link! We are done!
19850                     break
19851                 fi
19852                 # Again resolve directory symlinks since the target of the just found
19853                 # link could be in a different directory
19854                 cd `$DIRNAME $ISLINK`
19855                 sym_link_dir=`$THEPWDCMD -P`
19856                 sym_link_file=`$BASENAME $ISLINK`
19857                 let COUNTER=COUNTER+1
19858             done
19859             cd $STARTDIR
19860             PROPER_COMPILER_CC=$sym_link_dir/$sym_link_file
19861         fi
19862     fi
19863 
19864     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5
19865 $as_echo "$PROPER_COMPILER_CC" >&6; }
19866     CC="$PROPER_COMPILER_CC"
19867   else
19868     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CC" >&5
19869 $as_echo "no, keeping CC" >&6; }
19870     CC="$TEST_COMPILER"
19871   fi
19872 
19873   COMPILER=$CC
19874   COMPILER_NAME=$COMPILER_NAME
19875 
19876   if test "x$OPENJDK_TARGET_OS" = xsolaris; then
19877     # Make sure we use the Sun Studio compiler and not gcc on Solaris, which won't work
19878     COMPILER_VERSION_TEST=`$COMPILER -V 2>&1 | $HEAD -n 1`
19879     $ECHO $COMPILER_VERSION_TEST | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
19880     if test $? -ne 0; then
19881       GCC_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
19882 
19883       { $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
19884 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required Sun Studio compiler." >&6;}
19885       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&5
19886 $as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&6;}
19887       as_fn_error $? "Sun Studio compiler is required. Try setting --with-tools-dir." "$LINENO" 5
19888     else
19889       COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/p"`
19890       COMPILER_VENDOR="Sun Studio"
19891     fi
19892   elif test  "x$OPENJDK_TARGET_OS" = xwindows; then
19893     # First line typically looks something like:
19894     # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.30319.01 for 80x86
19895     COMPILER_VERSION_TEST=`$COMPILER 2>&1 | $HEAD -n 1`
19896     COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*Version \([1-9][0-9.]*\) .*/\1/p"`
19897     COMPILER_VENDOR="Microsoft CL.EXE"
19898     COMPILER_CPU_TEST=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* for \(.*\)$/\1/p"`
19899     if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
19900       if test "x$COMPILER_CPU_TEST" != "x80x86"; then
19901         as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"80x86\"." "$LINENO" 5
19902       fi
19903     elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
19904       if test "x$COMPILER_CPU_TEST" != "xx64"; then
19905         as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." "$LINENO" 5
19906       fi
19907     fi
19908   else
19909     COMPILER_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
19910     # Check that this is likely to be GCC.
19911     $COMPILER --version 2>&1 | $GREP "Free Software Foundation" > /dev/null
19912     if test $? -ne 0; then
19913       { $as_echo "$as_me:${as_lineno-$LINENO}: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&5
19914 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&6;}
19915       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&5
19916 $as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&6;}
19917       as_fn_error $? "GCC compiler is required. Try setting --with-tools-dir." "$LINENO" 5
19918     fi
19919 
19920     # First line typically looks something like:
19921     # gcc (Ubuntu/Linaro 4.5.2-8ubuntu4) 4.5.2
19922     COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* \([1-9][0-9.]*\)/\1/p"`
19923     COMPILER_VENDOR=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^\(.*\) [1-9][0-9.]*/\1/p"`
19924   fi
19925   # This sets CC_VERSION or CXX_VERSION. (This comment is a grep marker)
19926   CC_VERSION="$COMPILER_VERSION"
19927   # This sets CC_VENDOR or CXX_VENDOR. (This comment is a grep marker)
19928   CC_VENDOR="$COMPILER_VENDOR"
19929 
19930   { $as_echo "$as_me:${as_lineno-$LINENO}: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&5
19931 $as_echo "$as_me: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&6;}
19932 
19933 
19934 # Now that we have resolved CC ourself, let autoconf have its go at it
19935 ac_ext=c
19936 ac_cpp='$CPP $CPPFLAGS'
19937 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
19938 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
19939 ac_compiler_gnu=$ac_cv_c_compiler_gnu
19940 if test -n "$ac_tool_prefix"; then
19941   for ac_prog in $CC
19942   do
19943     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
19944 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
19945 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19946 $as_echo_n "checking for $ac_word... " >&6; }
19947 if test "${ac_cv_prog_CC+set}" = set; then :
19948   $as_echo_n "(cached) " >&6
19949 else
19950   if test -n "$CC"; then
19951   ac_cv_prog_CC="$CC" # Let the user override the test.
19952 else
19953 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19954 for as_dir in $PATH
19955 do
19956   IFS=$as_save_IFS
19957   test -z "$as_dir" && as_dir=.
19958     for ac_exec_ext in '' $ac_executable_extensions; do
19959   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
19960     ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
19961     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19962     break 2
19963   fi
19964 done
19965   done
19966 IFS=$as_save_IFS
19967 
19968 fi
19969 fi
19970 CC=$ac_cv_prog_CC
19971 if test -n "$CC"; then
19972   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
19973 $as_echo "$CC" >&6; }
19974 else
19975   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19976 $as_echo "no" >&6; }
19977 fi
19978 
19979 
19980     test -n "$CC" && break
19981   done
19982 fi
19983 if test -z "$CC"; then
19984   ac_ct_CC=$CC
19985   for ac_prog in $CC
19986 do
19987   # Extract the first word of "$ac_prog", so it can be a program name with args.
19988 set dummy $ac_prog; ac_word=$2
19989 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19990 $as_echo_n "checking for $ac_word... " >&6; }
19991 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
19992   $as_echo_n "(cached) " >&6
19993 else
19994   if test -n "$ac_ct_CC"; then
19995   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
19996 else
19997 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19998 for as_dir in $PATH
19999 do
20000   IFS=$as_save_IFS
20001   test -z "$as_dir" && as_dir=.
20002     for ac_exec_ext in '' $ac_executable_extensions; do
20003   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
20004     ac_cv_prog_ac_ct_CC="$ac_prog"
20005     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20006     break 2
20007   fi
20008 done
20009   done
20010 IFS=$as_save_IFS
20011 
20012 fi
20013 fi
20014 ac_ct_CC=$ac_cv_prog_ac_ct_CC
20015 if test -n "$ac_ct_CC"; then
20016   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
20017 $as_echo "$ac_ct_CC" >&6; }
20018 else
20019   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20020 $as_echo "no" >&6; }
20021 fi
20022 
20023 
20024   test -n "$ac_ct_CC" && break
20025 done
20026 
20027   if test "x$ac_ct_CC" = x; then
20028     CC=""
20029   else
20030     case $cross_compiling:$ac_tool_warned in
20031 yes:)
20032 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
20033 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
20034 ac_tool_warned=yes ;;
20035 esac
20036     CC=$ac_ct_CC
20037   fi
20038 fi
20039 
20040 
20041 test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
20042 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
20043 as_fn_error $? "no acceptable C compiler found in \$PATH
20044 See \`config.log' for more details" "$LINENO" 5 ; }
20045 
20046 # Provide some information about the compiler.
20047 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
20048 set X $ac_compile
20049 ac_compiler=$2
20050 for ac_option in --version -v -V -qversion; do
20051   { { ac_try="$ac_compiler $ac_option >&5"
20052 case "(($ac_try" in
20053   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20054   *) ac_try_echo=$ac_try;;
20055 esac
20056 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
20057 $as_echo "$ac_try_echo"; } >&5
20058   (eval "$ac_compiler $ac_option >&5") 2>conftest.err
20059   ac_status=$?
20060   if test -s conftest.err; then
20061     sed '10a\
20062 ... rest of stderr output deleted ...
20063          10q' conftest.err >conftest.er1
20064     cat conftest.er1 >&5
20065   fi
20066   rm -f conftest.er1 conftest.err
20067   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
20068   test $ac_status = 0; }
20069 done
20070 
20071 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20072 /* end confdefs.h.  */
20073 
20074 int
20075 main ()
20076 {
20077 
20078   ;
20079   return 0;
20080 }
20081 _ACEOF
20082 ac_clean_files_save=$ac_clean_files
20083 ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
20084 # Try to create an executable without -o first, disregard a.out.
20085 # It will help us diagnose broken compilers, and finding out an intuition
20086 # of exeext.
20087 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
20088 $as_echo_n "checking whether the C compiler works... " >&6; }
20089 ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
20090 
20091 # The possible output files:
20092 ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
20093 
20094 ac_rmfiles=
20095 for ac_file in $ac_files
20096 do
20097   case $ac_file in
20098     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
20099     * ) ac_rmfiles="$ac_rmfiles $ac_file";;
20100   esac
20101 done
20102 rm -f $ac_rmfiles
20103 
20104 if { { ac_try="$ac_link_default"
20105 case "(($ac_try" in
20106   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20107   *) ac_try_echo=$ac_try;;
20108 esac
20109 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
20110 $as_echo "$ac_try_echo"; } >&5
20111   (eval "$ac_link_default") 2>&5
20112   ac_status=$?
20113   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
20114   test $ac_status = 0; }; then :
20115   # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
20116 # So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
20117 # in a Makefile.  We should not override ac_cv_exeext if it was cached,
20118 # so that the user can short-circuit this test for compilers unknown to
20119 # Autoconf.
20120 for ac_file in $ac_files ''
20121 do
20122   test -f "$ac_file" || continue
20123   case $ac_file in
20124     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
20125         ;;
20126     [ab].out )
20127         # We found the default executable, but exeext='' is most
20128         # certainly right.
20129         break;;
20130     *.* )
20131         if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
20132         then :; else
20133            ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
20134         fi
20135         # We set ac_cv_exeext here because the later test for it is not
20136         # safe: cross compilers may not add the suffix if given an `-o'
20137         # argument, so we may need to know it at that point already.
20138         # Even if this section looks crufty: it has the advantage of
20139         # actually working.
20140         break;;
20141     * )
20142         break;;
20143   esac
20144 done
20145 test "$ac_cv_exeext" = no && ac_cv_exeext=
20146 
20147 else
20148   ac_file=''
20149 fi
20150 if test -z "$ac_file"; then :
20151   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20152 $as_echo "no" >&6; }
20153 $as_echo "$as_me: failed program was:" >&5
20154 sed 's/^/| /' conftest.$ac_ext >&5
20155 
20156 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
20157 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
20158 as_fn_error 77 "C compiler cannot create executables
20159 See \`config.log' for more details" "$LINENO" 5 ; }
20160 else
20161   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
20162 $as_echo "yes" >&6; }
20163 fi
20164 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
20165 $as_echo_n "checking for C compiler default output file name... " >&6; }
20166 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
20167 $as_echo "$ac_file" >&6; }
20168 ac_exeext=$ac_cv_exeext
20169 
20170 rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
20171 ac_clean_files=$ac_clean_files_save
20172 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
20173 $as_echo_n "checking for suffix of executables... " >&6; }
20174 if { { ac_try="$ac_link"
20175 case "(($ac_try" in
20176   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20177   *) ac_try_echo=$ac_try;;
20178 esac
20179 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
20180 $as_echo "$ac_try_echo"; } >&5
20181   (eval "$ac_link") 2>&5
20182   ac_status=$?
20183   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
20184   test $ac_status = 0; }; then :
20185   # If both `conftest.exe' and `conftest' are `present' (well, observable)
20186 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
20187 # work properly (i.e., refer to `conftest.exe'), while it won't with
20188 # `rm'.
20189 for ac_file in conftest.exe conftest conftest.*; do
20190   test -f "$ac_file" || continue
20191   case $ac_file in
20192     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
20193     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
20194           break;;
20195     * ) break;;
20196   esac
20197 done
20198 else
20199   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
20200 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
20201 as_fn_error $? "cannot compute suffix of executables: cannot compile and link
20202 See \`config.log' for more details" "$LINENO" 5 ; }
20203 fi
20204 rm -f conftest conftest$ac_cv_exeext
20205 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
20206 $as_echo "$ac_cv_exeext" >&6; }
20207 
20208 rm -f conftest.$ac_ext
20209 EXEEXT=$ac_cv_exeext
20210 ac_exeext=$EXEEXT
20211 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20212 /* end confdefs.h.  */
20213 #include <stdio.h>
20214 int
20215 main ()
20216 {
20217 FILE *f = fopen ("conftest.out", "w");
20218  return ferror (f) || fclose (f) != 0;
20219 
20220   ;
20221   return 0;
20222 }
20223 _ACEOF
20224 ac_clean_files="$ac_clean_files conftest.out"
20225 # Check that the compiler produces executables we can run.  If not, either
20226 # the compiler is broken, or we cross compile.
20227 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
20228 $as_echo_n "checking whether we are cross compiling... " >&6; }
20229 if test "$cross_compiling" != yes; then
20230   { { ac_try="$ac_link"
20231 case "(($ac_try" in
20232   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20233   *) ac_try_echo=$ac_try;;
20234 esac
20235 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
20236 $as_echo "$ac_try_echo"; } >&5
20237   (eval "$ac_link") 2>&5
20238   ac_status=$?
20239   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
20240   test $ac_status = 0; }
20241   if { ac_try='./conftest$ac_cv_exeext'
20242   { { case "(($ac_try" in
20243   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20244   *) ac_try_echo=$ac_try;;
20245 esac
20246 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
20247 $as_echo "$ac_try_echo"; } >&5
20248   (eval "$ac_try") 2>&5
20249   ac_status=$?
20250   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
20251   test $ac_status = 0; }; }; then
20252     cross_compiling=no
20253   else
20254     if test "$cross_compiling" = maybe; then
20255         cross_compiling=yes
20256     else
20257         { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
20258 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
20259 as_fn_error $? "cannot run C compiled programs.
20260 If you meant to cross compile, use \`--host'.
20261 See \`config.log' for more details" "$LINENO" 5 ; }
20262     fi
20263   fi
20264 fi
20265 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
20266 $as_echo "$cross_compiling" >&6; }
20267 
20268 rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
20269 ac_clean_files=$ac_clean_files_save
20270 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
20271 $as_echo_n "checking for suffix of object files... " >&6; }
20272 if test "${ac_cv_objext+set}" = set; then :
20273   $as_echo_n "(cached) " >&6
20274 else
20275   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20276 /* end confdefs.h.  */
20277 
20278 int
20279 main ()
20280 {
20281 
20282   ;
20283   return 0;
20284 }
20285 _ACEOF
20286 rm -f conftest.o conftest.obj
20287 if { { ac_try="$ac_compile"
20288 case "(($ac_try" in
20289   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20290   *) ac_try_echo=$ac_try;;
20291 esac
20292 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
20293 $as_echo "$ac_try_echo"; } >&5
20294   (eval "$ac_compile") 2>&5
20295   ac_status=$?
20296   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
20297   test $ac_status = 0; }; then :
20298   for ac_file in conftest.o conftest.obj conftest.*; do
20299   test -f "$ac_file" || continue;
20300   case $ac_file in
20301     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
20302     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
20303        break;;
20304   esac
20305 done
20306 else
20307   $as_echo "$as_me: failed program was:" >&5
20308 sed 's/^/| /' conftest.$ac_ext >&5
20309 
20310 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
20311 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
20312 as_fn_error $? "cannot compute suffix of object files: cannot compile
20313 See \`config.log' for more details" "$LINENO" 5 ; }
20314 fi
20315 rm -f conftest.$ac_cv_objext conftest.$ac_ext
20316 fi
20317 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
20318 $as_echo "$ac_cv_objext" >&6; }
20319 OBJEXT=$ac_cv_objext
20320 ac_objext=$OBJEXT
20321 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
20322 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
20323 if test "${ac_cv_c_compiler_gnu+set}" = set; then :
20324   $as_echo_n "(cached) " >&6
20325 else
20326   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20327 /* end confdefs.h.  */
20328 
20329 int
20330 main ()
20331 {
20332 #ifndef __GNUC__
20333        choke me
20334 #endif
20335 
20336   ;
20337   return 0;
20338 }
20339 _ACEOF
20340 if ac_fn_c_try_compile "$LINENO"; then :
20341   ac_compiler_gnu=yes
20342 else
20343   ac_compiler_gnu=no
20344 fi
20345 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20346 ac_cv_c_compiler_gnu=$ac_compiler_gnu
20347 
20348 fi
20349 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
20350 $as_echo "$ac_cv_c_compiler_gnu" >&6; }
20351 if test $ac_compiler_gnu = yes; then
20352   GCC=yes
20353 else
20354   GCC=
20355 fi
20356 ac_test_CFLAGS=${CFLAGS+set}
20357 ac_save_CFLAGS=$CFLAGS
20358 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
20359 $as_echo_n "checking whether $CC accepts -g... " >&6; }
20360 if test "${ac_cv_prog_cc_g+set}" = set; then :
20361   $as_echo_n "(cached) " >&6
20362 else
20363   ac_save_c_werror_flag=$ac_c_werror_flag
20364    ac_c_werror_flag=yes
20365    ac_cv_prog_cc_g=no
20366    CFLAGS="-g"
20367    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20368 /* end confdefs.h.  */
20369 
20370 int
20371 main ()
20372 {
20373 
20374   ;
20375   return 0;
20376 }
20377 _ACEOF
20378 if ac_fn_c_try_compile "$LINENO"; then :
20379   ac_cv_prog_cc_g=yes
20380 else
20381   CFLAGS=""
20382       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20383 /* end confdefs.h.  */
20384 
20385 int
20386 main ()
20387 {
20388 
20389   ;
20390   return 0;
20391 }
20392 _ACEOF
20393 if ac_fn_c_try_compile "$LINENO"; then :
20394 
20395 else
20396   ac_c_werror_flag=$ac_save_c_werror_flag
20397          CFLAGS="-g"
20398          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20399 /* end confdefs.h.  */
20400 
20401 int
20402 main ()
20403 {
20404 
20405   ;
20406   return 0;
20407 }
20408 _ACEOF
20409 if ac_fn_c_try_compile "$LINENO"; then :
20410   ac_cv_prog_cc_g=yes
20411 fi
20412 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20413 fi
20414 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20415 fi
20416 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20417    ac_c_werror_flag=$ac_save_c_werror_flag
20418 fi
20419 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
20420 $as_echo "$ac_cv_prog_cc_g" >&6; }
20421 if test "$ac_test_CFLAGS" = set; then
20422   CFLAGS=$ac_save_CFLAGS
20423 elif test $ac_cv_prog_cc_g = yes; then
20424   if test "$GCC" = yes; then
20425     CFLAGS="-g -O2"
20426   else
20427     CFLAGS="-g"
20428   fi
20429 else
20430   if test "$GCC" = yes; then
20431     CFLAGS="-O2"
20432   else
20433     CFLAGS=
20434   fi
20435 fi
20436 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
20437 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
20438 if test "${ac_cv_prog_cc_c89+set}" = set; then :
20439   $as_echo_n "(cached) " >&6
20440 else
20441   ac_cv_prog_cc_c89=no
20442 ac_save_CC=$CC
20443 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20444 /* end confdefs.h.  */
20445 #include <stdarg.h>
20446 #include <stdio.h>
20447 #include <sys/types.h>
20448 #include <sys/stat.h>
20449 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
20450 struct buf { int x; };
20451 FILE * (*rcsopen) (struct buf *, struct stat *, int);
20452 static char *e (p, i)
20453      char **p;
20454      int i;
20455 {
20456   return p[i];
20457 }
20458 static char *f (char * (*g) (char **, int), char **p, ...)
20459 {
20460   char *s;
20461   va_list v;
20462   va_start (v,p);
20463   s = g (p, va_arg (v,int));
20464   va_end (v);
20465   return s;
20466 }
20467 
20468 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
20469    function prototypes and stuff, but not '\xHH' hex character constants.
20470    These don't provoke an error unfortunately, instead are silently treated
20471    as 'x'.  The following induces an error, until -std is added to get
20472    proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
20473    array size at least.  It's necessary to write '\x00'==0 to get something
20474    that's true only with -std.  */
20475 int osf4_cc_array ['\x00' == 0 ? 1 : -1];
20476 
20477 /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
20478    inside strings and character constants.  */
20479 #define FOO(x) 'x'
20480 int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
20481 
20482 int test (int i, double x);
20483 struct s1 {int (*f) (int a);};
20484 struct s2 {int (*f) (double a);};
20485 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
20486 int argc;
20487 char **argv;
20488 int
20489 main ()
20490 {
20491 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
20492   ;
20493   return 0;
20494 }
20495 _ACEOF
20496 for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
20497         -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
20498 do
20499   CC="$ac_save_CC $ac_arg"
20500   if ac_fn_c_try_compile "$LINENO"; then :
20501   ac_cv_prog_cc_c89=$ac_arg
20502 fi
20503 rm -f core conftest.err conftest.$ac_objext
20504   test "x$ac_cv_prog_cc_c89" != "xno" && break
20505 done
20506 rm -f conftest.$ac_ext
20507 CC=$ac_save_CC
20508 
20509 fi
20510 # AC_CACHE_VAL
20511 case "x$ac_cv_prog_cc_c89" in
20512   x)
20513     { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
20514 $as_echo "none needed" >&6; } ;;
20515   xno)
20516     { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
20517 $as_echo "unsupported" >&6; } ;;
20518   *)
20519     CC="$CC $ac_cv_prog_cc_c89"
20520     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
20521 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
20522 esac
20523 if test "x$ac_cv_prog_cc_c89" != xno; then :
20524 
20525 fi
20526 
20527 ac_ext=cpp
20528 ac_cpp='$CXXCPP $CPPFLAGS'
20529 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
20530 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
20531 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
20532 
20533 
20534 ### Locate C++ compiler (CXX)
20535 
20536 if test "x$CXX" != x; then
20537   COMPILER_CHECK_LIST="$CXX"
20538 elif test "x$OPENJDK_TARGET_OS" = "xwindows"; then
20539   COMPILER_CHECK_LIST="cl"
20540 elif test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
20541   COMPILER_CHECK_LIST="CC g++"
20542 else
20543   COMPILER_CHECK_LIST="g++ CC"
20544 fi
20545 
20546 
20547   COMPILER_NAME=C++
20548 
20549   CXX=
20550   # If TOOLS_DIR is set, check for all compiler names in there first
20551   # before checking the rest of the PATH.
20552   if test -n "$TOOLS_DIR"; then
20553     PATH_save="$PATH"
20554     PATH="$TOOLS_DIR"
20555     for ac_prog in $COMPILER_CHECK_LIST
20556 do
20557   # Extract the first word of "$ac_prog", so it can be a program name with args.
20558 set dummy $ac_prog; ac_word=$2
20559 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20560 $as_echo_n "checking for $ac_word... " >&6; }
20561 if test "${ac_cv_path_TOOLS_DIR_CXX+set}" = set; then :
20562   $as_echo_n "(cached) " >&6
20563 else
20564   case $TOOLS_DIR_CXX in
20565   [\\/]* | ?:[\\/]*)
20566   ac_cv_path_TOOLS_DIR_CXX="$TOOLS_DIR_CXX" # Let the user override the test with a path.
20567   ;;
20568   *)
20569   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20570 for as_dir in $PATH
20571 do
20572   IFS=$as_save_IFS
20573   test -z "$as_dir" && as_dir=.
20574     for ac_exec_ext in '' $ac_executable_extensions; do
20575   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
20576     ac_cv_path_TOOLS_DIR_CXX="$as_dir/$ac_word$ac_exec_ext"
20577     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20578     break 2
20579   fi
20580 done
20581   done
20582 IFS=$as_save_IFS
20583 
20584   ;;
20585 esac
20586 fi
20587 TOOLS_DIR_CXX=$ac_cv_path_TOOLS_DIR_CXX
20588 if test -n "$TOOLS_DIR_CXX"; then
20589   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLS_DIR_CXX" >&5
20590 $as_echo "$TOOLS_DIR_CXX" >&6; }
20591 else
20592   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20593 $as_echo "no" >&6; }
20594 fi
20595 
20596 
20597   test -n "$TOOLS_DIR_CXX" && break
20598 done
20599 
20600     CXX=$TOOLS_DIR_CXX
20601     PATH="$PATH_save"
20602   fi
20603 
20604   # AC_PATH_PROGS can't be run multiple times with the same variable,
20605   # so create a new name for this run.
20606   if test "x$CXX" = x; then
20607     for ac_prog in $COMPILER_CHECK_LIST
20608 do
20609   # Extract the first word of "$ac_prog", so it can be a program name with args.
20610 set dummy $ac_prog; ac_word=$2
20611 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20612 $as_echo_n "checking for $ac_word... " >&6; }
20613 if test "${ac_cv_path_POTENTIAL_CXX+set}" = set; then :
20614   $as_echo_n "(cached) " >&6
20615 else
20616   case $POTENTIAL_CXX in
20617   [\\/]* | ?:[\\/]*)
20618   ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
20619   ;;
20620   *)
20621   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20622 for as_dir in $PATH
20623 do
20624   IFS=$as_save_IFS
20625   test -z "$as_dir" && as_dir=.
20626     for ac_exec_ext in '' $ac_executable_extensions; do
20627   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
20628     ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
20629     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20630     break 2
20631   fi
20632 done
20633   done
20634 IFS=$as_save_IFS
20635 
20636   ;;
20637 esac
20638 fi
20639 POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
20640 if test -n "$POTENTIAL_CXX"; then
20641   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
20642 $as_echo "$POTENTIAL_CXX" >&6; }
20643 else
20644   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20645 $as_echo "no" >&6; }
20646 fi
20647 
20648 
20649   test -n "$POTENTIAL_CXX" && break
20650 done
20651 
20652     CXX=$POTENTIAL_CXX
20653   fi
20654 
20655   if test "x$CXX" = x; then
20656 
20657     # Print a helpful message on how to acquire the necessary build dependency.
20658     # devkit is the help tag: freetyp2, cups, pulse, alsa etc
20659     MISSING_DEPENDENCY=devkit
20660     PKGHANDLER_COMMAND=
20661 
20662     case $PKGHANDLER in
20663         apt-get)
20664                 apt_help     $MISSING_DEPENDENCY ;;
20665     yum)
20666                 yum_help     $MISSING_DEPENDENCY ;;
20667         port)
20668                 port_help    $MISSING_DEPENDENCY ;;
20669         pkgutil)
20670                 pkgutil_help $MISSING_DEPENDENCY ;;
20671         pkgadd)
20672                 pkgadd_help  $MISSING_DEPENDENCY ;;
20673     * )
20674       break ;;
20675     esac
20676 
20677     if test "x$PKGHANDLER_COMMAND" != x; then
20678         HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
20679     fi
20680 
20681       as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
20682   fi
20683 
20684   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20685 
20686   # First separate the path from the arguments. This will split at the first
20687   # space.
20688   complete="$CXX"
20689   path="${complete%% *}"
20690   tmp="$complete EOL"
20691   arguments="${tmp#* }"
20692 
20693   # Input might be given as Windows format, start by converting to
20694   # unix format.
20695   new_path=`$CYGPATH -u "$path"`
20696 
20697   # Now try to locate executable using which
20698   new_path=`$WHICH "$new_path" 2> /dev/null`
20699   # bat and cmd files are not always considered executable in cygwin causing which
20700   # to not find them
20701   if test "x$new_path" = x \
20702            && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20703            && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20704     new_path=`$CYGPATH -u "$path"`
20705   fi
20706   if test "x$new_path" = x; then
20707     # Oops. Which didn't find the executable.
20708     # The splitting of arguments from the executable at a space might have been incorrect,
20709     # since paths with space are more likely in Windows. Give it another try with the whole
20710     # argument.
20711     path="$complete"
20712     arguments="EOL"
20713     new_path=`$CYGPATH -u "$path"`
20714     new_path=`$WHICH "$new_path" 2> /dev/null`
20715     # bat and cmd files are not always considered executable in cygwin causing which
20716     # to not find them
20717     if test "x$new_path" = x \
20718              && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20719              && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20720       new_path=`$CYGPATH -u "$path"`
20721     fi
20722     if test "x$new_path" = x; then
20723       # It's still not found. Now this is an unrecoverable error.
20724       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
20725 $as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
20726       has_space=`$ECHO "$complete" | $GREP " "`
20727       if test "x$has_space" != x; then
20728         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20729 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20730       fi
20731       as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
20732     fi
20733   fi
20734 
20735   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20736   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20737   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20738   # "foo.exe" is OK but "foo" is an error.
20739   #
20740   # This test is therefore slightly more accurate than "test -f" to check for file precense.
20741   # It is also a way to make sure we got the proper file name for the real test later on.
20742   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20743   if test "x$test_shortpath" = x; then
20744     # Short path failed, file does not exist as specified.
20745     # Try adding .exe or .cmd
20746     if test -f "${new_path}.exe"; then
20747        input_to_shortpath="${new_path}.exe"
20748     elif test -f "${new_path}.cmd"; then
20749        input_to_shortpath="${new_path}.cmd"
20750     else
20751       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$new_path\", is invalid." >&5
20752 $as_echo "$as_me: The path of CXX, which resolves as \"$new_path\", is invalid." >&6;}
20753       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
20754 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
20755       as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
20756     fi
20757   else
20758     input_to_shortpath="$new_path"
20759   fi
20760 
20761   # Call helper function which possibly converts this using DOS-style short mode.
20762   # If so, the updated path is stored in $new_path.
20763   new_path="$input_to_shortpath"
20764 
20765   input_path="$input_to_shortpath"
20766   # Check if we need to convert this using DOS-style short mode. If the path
20767   # contains just simple characters, use it. Otherwise (spaces, weird characters),
20768   # take no chances and rewrite it.
20769   # Note: m4 eats our [], so we need to use [ and ] instead.
20770   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20771   if test "x$has_forbidden_chars" != x; then
20772     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20773     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20774     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20775     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20776       # Going to short mode and back again did indeed matter. Since short mode is
20777       # case insensitive, let's make it lowercase to improve readability.
20778       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20779       # Now convert it back to Unix-stile (cygpath)
20780       input_path=`$CYGPATH -u "$shortmode_path"`
20781       new_path="$input_path"
20782     fi
20783   fi
20784 
20785   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20786   if test "x$test_cygdrive_prefix" = x; then
20787     # As a simple fix, exclude /usr/bin since it's not a real path.
20788     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
20789       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20790       # a path prefixed by /cygdrive for fixpath to work.
20791       new_path="$CYGWIN_ROOT_PATH$input_path"
20792     fi
20793   fi
20794 
20795   # remove trailing .exe if any
20796   new_path="${new_path/%.exe/}"
20797 
20798   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20799 
20800   # First separate the path from the arguments. This will split at the first
20801   # space.
20802   complete="$CXX"
20803   path="${complete%% *}"
20804   tmp="$complete EOL"
20805   arguments="${tmp#* }"
20806 
20807   # Input might be given as Windows format, start by converting to
20808   # unix format.
20809   new_path="$path"
20810 
20811   windows_path="$new_path"
20812   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20813     unix_path=`$CYGPATH -u "$windows_path"`
20814     new_path="$unix_path"
20815   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20816     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20817     new_path="$unix_path"
20818   fi
20819 
20820 
20821   # Now try to locate executable using which
20822   new_path=`$WHICH "$new_path" 2> /dev/null`
20823 
20824   if test "x$new_path" = x; then
20825     # Oops. Which didn't find the executable.
20826     # The splitting of arguments from the executable at a space might have been incorrect,
20827     # since paths with space are more likely in Windows. Give it another try with the whole
20828     # argument.
20829     path="$complete"
20830     arguments="EOL"
20831     new_path="$path"
20832 
20833   windows_path="$new_path"
20834   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20835     unix_path=`$CYGPATH -u "$windows_path"`
20836     new_path="$unix_path"
20837   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20838     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20839     new_path="$unix_path"
20840   fi
20841 
20842 
20843     new_path=`$WHICH "$new_path" 2> /dev/null`
20844 
20845     if test "x$new_path" = x; then
20846       # It's still not found. Now this is an unrecoverable error.
20847       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
20848 $as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
20849       has_space=`$ECHO "$complete" | $GREP " "`
20850       if test "x$has_space" != x; then
20851         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20852 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20853       fi
20854       as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
20855     fi
20856   fi
20857 
20858   # Now new_path has a complete unix path to the binary
20859   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
20860     # Keep paths in /bin as-is, but remove trailing .exe if any
20861     new_path="${new_path/%.exe/}"
20862     # Do not save /bin paths to all_fixpath_prefixes!
20863   else
20864     # Not in mixed or Windows style, start by that.
20865     new_path=`cmd //c echo $new_path`
20866 
20867   input_path="$new_path"
20868   # Check if we need to convert this using DOS-style short mode. If the path
20869   # contains just simple characters, use it. Otherwise (spaces, weird characters),
20870   # take no chances and rewrite it.
20871   # Note: m4 eats our [], so we need to use [ and ] instead.
20872   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20873   if test "x$has_forbidden_chars" != x; then
20874     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20875     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20876   fi
20877 
20878     # Output is in $new_path
20879 
20880   windows_path="$new_path"
20881   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20882     unix_path=`$CYGPATH -u "$windows_path"`
20883     new_path="$unix_path"
20884   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20885     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20886     new_path="$unix_path"
20887   fi
20888 
20889     # remove trailing .exe if any
20890     new_path="${new_path/%.exe/}"
20891 
20892     # Save the first 10 bytes of this path to the storage, so fixpath can work.
20893     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20894   fi
20895 
20896   else
20897     # We're on a posix platform. Hooray! :)
20898     # First separate the path from the arguments. This will split at the first
20899     # space.
20900     complete="$CXX"
20901     path="${complete%% *}"
20902     tmp="$complete EOL"
20903     arguments="${tmp#* }"
20904 
20905     # Cannot rely on the command "which" here since it doesn't always work.
20906     is_absolute_path=`$ECHO "$path" | $GREP ^/`
20907     if test -z "$is_absolute_path"; then
20908       # Path to executable is not absolute. Find it.
20909       IFS_save="$IFS"
20910       IFS=:
20911       for p in $PATH; do
20912         if test -f "$p/$path" && test -x "$p/$path"; then
20913           new_path="$p/$path"
20914           break
20915         fi
20916       done
20917       IFS="$IFS_save"
20918     else
20919       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CXX (as $path) failed, using $path directly." >&5
20920 $as_echo "$as_me: Resolving CXX (as $path) failed, using $path directly." >&6;}
20921       new_path="$path"
20922     fi
20923 
20924     if test "x$new_path" = x; then
20925         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
20926 $as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
20927         has_space=`$ECHO "$complete" | $GREP " "`
20928         if test "x$has_space" != x; then
20929           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
20930 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
20931         fi
20932         as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
20933       fi
20934   fi
20935 
20936       # Now join together the path and the arguments once again
20937       if test "x$arguments" != xEOL; then
20938         new_complete="$new_path ${arguments% *}"
20939       else
20940         new_complete="$new_path"
20941       fi
20942 
20943   if test "x$complete" != "x$new_complete"; then
20944       CXX="$new_complete"
20945       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXX to \"$new_complete\"" >&5
20946 $as_echo "$as_me: Rewriting CXX to \"$new_complete\"" >&6;}
20947     fi
20948 
20949   { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CXX" >&5
20950 $as_echo_n "checking resolved symbolic links for CXX... " >&6; }
20951   TEST_COMPILER="$CXX"
20952 
20953     if test "x$OPENJDK_BUILD_OS" != xwindows; then
20954         # Follow a chain of symbolic links. Use readlink
20955         # where it exists, else fall back to horribly
20956         # complicated shell code.
20957         if test "x$READLINK_TESTED" != yes; then
20958             # On MacOSX there is a readlink tool with a different
20959             # purpose than the GNU readlink tool. Check the found readlink.
20960             ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
20961             if test "x$ISGNU" = x; then
20962                  # A readlink that we do not know how to use.
20963                  # Are there other non-GNU readlinks out there?
20964                  READLINK_TESTED=yes
20965                  READLINK=
20966             fi
20967         fi
20968 
20969         if test "x$READLINK" != x; then
20970             TEST_COMPILER=`$READLINK -f $TEST_COMPILER`
20971         else
20972             # Save the current directory for restoring afterwards
20973             STARTDIR=$PWD
20974             COUNTER=0
20975             sym_link_dir=`$DIRNAME $TEST_COMPILER`
20976             sym_link_file=`$BASENAME $TEST_COMPILER`
20977             cd $sym_link_dir
20978             # Use -P flag to resolve symlinks in directories.
20979             cd `$THEPWDCMD -P`
20980             sym_link_dir=`$THEPWDCMD -P`
20981             # Resolve file symlinks
20982             while test $COUNTER -lt 20; do
20983                 ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
20984                 if test "x$ISLINK" == x; then
20985                     # This is not a symbolic link! We are done!
20986                     break
20987                 fi
20988                 # Again resolve directory symlinks since the target of the just found
20989                 # link could be in a different directory
20990                 cd `$DIRNAME $ISLINK`
20991                 sym_link_dir=`$THEPWDCMD -P`
20992                 sym_link_file=`$BASENAME $ISLINK`
20993                 let COUNTER=COUNTER+1
20994             done
20995             cd $STARTDIR
20996             TEST_COMPILER=$sym_link_dir/$sym_link_file
20997         fi
20998     fi
20999 
21000   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_COMPILER" >&5
21001 $as_echo "$TEST_COMPILER" >&6; }
21002   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CXX is disguised ccache" >&5
21003 $as_echo_n "checking if CXX is disguised ccache... " >&6; }
21004 
21005   COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"`
21006   if test "x$COMPILER_BASENAME" = "xccache"; then
21007     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5
21008 $as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; }
21009     # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache.
21010     # We want to control ccache invocation ourselves, so ignore this cc and try
21011     # searching again.
21012 
21013     # Remove the path to the fake ccache cc from the PATH
21014     RETRY_COMPILER_SAVED_PATH="$PATH"
21015     COMPILER_DIRNAME=`$DIRNAME $CXX`
21016     PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`"
21017 
21018     # Try again looking for our compiler
21019     if test -n "$ac_tool_prefix"; then
21020   for ac_prog in $COMPILER_CHECK_LIST
21021   do
21022     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
21023 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
21024 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21025 $as_echo_n "checking for $ac_word... " >&6; }
21026 if test "${ac_cv_prog_PROPER_COMPILER_CXX+set}" = set; then :
21027   $as_echo_n "(cached) " >&6
21028 else
21029   if test -n "$PROPER_COMPILER_CXX"; then
21030   ac_cv_prog_PROPER_COMPILER_CXX="$PROPER_COMPILER_CXX" # Let the user override the test.
21031 else
21032 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21033 for as_dir in $PATH
21034 do
21035   IFS=$as_save_IFS
21036   test -z "$as_dir" && as_dir=.
21037     for ac_exec_ext in '' $ac_executable_extensions; do
21038   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
21039     ac_cv_prog_PROPER_COMPILER_CXX="$ac_tool_prefix$ac_prog"
21040     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21041     break 2
21042   fi
21043 done
21044   done
21045 IFS=$as_save_IFS
21046 
21047 fi
21048 fi
21049 PROPER_COMPILER_CXX=$ac_cv_prog_PROPER_COMPILER_CXX
21050 if test -n "$PROPER_COMPILER_CXX"; then
21051   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5
21052 $as_echo "$PROPER_COMPILER_CXX" >&6; }
21053 else
21054   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21055 $as_echo "no" >&6; }
21056 fi
21057 
21058 
21059     test -n "$PROPER_COMPILER_CXX" && break
21060   done
21061 fi
21062 if test -z "$PROPER_COMPILER_CXX"; then
21063   ac_ct_PROPER_COMPILER_CXX=$PROPER_COMPILER_CXX
21064   for ac_prog in $COMPILER_CHECK_LIST
21065 do
21066   # Extract the first word of "$ac_prog", so it can be a program name with args.
21067 set dummy $ac_prog; ac_word=$2
21068 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21069 $as_echo_n "checking for $ac_word... " >&6; }
21070 if test "${ac_cv_prog_ac_ct_PROPER_COMPILER_CXX+set}" = set; then :
21071   $as_echo_n "(cached) " >&6
21072 else
21073   if test -n "$ac_ct_PROPER_COMPILER_CXX"; then
21074   ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_ct_PROPER_COMPILER_CXX" # Let the user override the test.
21075 else
21076 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21077 for as_dir in $PATH
21078 do
21079   IFS=$as_save_IFS
21080   test -z "$as_dir" && as_dir=.
21081     for ac_exec_ext in '' $ac_executable_extensions; do
21082   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
21083     ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_prog"
21084     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21085     break 2
21086   fi
21087 done
21088   done
21089 IFS=$as_save_IFS
21090 
21091 fi
21092 fi
21093 ac_ct_PROPER_COMPILER_CXX=$ac_cv_prog_ac_ct_PROPER_COMPILER_CXX
21094 if test -n "$ac_ct_PROPER_COMPILER_CXX"; then
21095   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CXX" >&5
21096 $as_echo "$ac_ct_PROPER_COMPILER_CXX" >&6; }
21097 else
21098   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21099 $as_echo "no" >&6; }
21100 fi
21101 
21102 
21103   test -n "$ac_ct_PROPER_COMPILER_CXX" && break
21104 done
21105 
21106   if test "x$ac_ct_PROPER_COMPILER_CXX" = x; then
21107     PROPER_COMPILER_CXX=""
21108   else
21109     case $cross_compiling:$ac_tool_warned in
21110 yes:)
21111 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
21112 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
21113 ac_tool_warned=yes ;;
21114 esac
21115     PROPER_COMPILER_CXX=$ac_ct_PROPER_COMPILER_CXX
21116   fi
21117 fi
21118 
21119 
21120   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21121 
21122   # First separate the path from the arguments. This will split at the first
21123   # space.
21124   complete="$PROPER_COMPILER_CXX"
21125   path="${complete%% *}"
21126   tmp="$complete EOL"
21127   arguments="${tmp#* }"
21128 
21129   # Input might be given as Windows format, start by converting to
21130   # unix format.
21131   new_path=`$CYGPATH -u "$path"`
21132 
21133   # Now try to locate executable using which
21134   new_path=`$WHICH "$new_path" 2> /dev/null`
21135   # bat and cmd files are not always considered executable in cygwin causing which
21136   # to not find them
21137   if test "x$new_path" = x \
21138            && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21139            && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21140     new_path=`$CYGPATH -u "$path"`
21141   fi
21142   if test "x$new_path" = x; then
21143     # Oops. Which didn't find the executable.
21144     # The splitting of arguments from the executable at a space might have been incorrect,
21145     # since paths with space are more likely in Windows. Give it another try with the whole
21146     # argument.
21147     path="$complete"
21148     arguments="EOL"
21149     new_path=`$CYGPATH -u "$path"`
21150     new_path=`$WHICH "$new_path" 2> /dev/null`
21151     # bat and cmd files are not always considered executable in cygwin causing which
21152     # to not find them
21153     if test "x$new_path" = x \
21154              && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21155              && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21156       new_path=`$CYGPATH -u "$path"`
21157     fi
21158     if test "x$new_path" = x; then
21159       # It's still not found. Now this is an unrecoverable error.
21160       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
21161 $as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
21162       has_space=`$ECHO "$complete" | $GREP " "`
21163       if test "x$has_space" != x; then
21164         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21165 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21166       fi
21167       as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
21168     fi
21169   fi
21170 
21171   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21172   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21173   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21174   # "foo.exe" is OK but "foo" is an error.
21175   #
21176   # This test is therefore slightly more accurate than "test -f" to check for file precense.
21177   # It is also a way to make sure we got the proper file name for the real test later on.
21178   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21179   if test "x$test_shortpath" = x; then
21180     # Short path failed, file does not exist as specified.
21181     # Try adding .exe or .cmd
21182     if test -f "${new_path}.exe"; then
21183        input_to_shortpath="${new_path}.exe"
21184     elif test -f "${new_path}.cmd"; then
21185        input_to_shortpath="${new_path}.cmd"
21186     else
21187       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&5
21188 $as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&6;}
21189       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
21190 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
21191       as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
21192     fi
21193   else
21194     input_to_shortpath="$new_path"
21195   fi
21196 
21197   # Call helper function which possibly converts this using DOS-style short mode.
21198   # If so, the updated path is stored in $new_path.
21199   new_path="$input_to_shortpath"
21200 
21201   input_path="$input_to_shortpath"
21202   # Check if we need to convert this using DOS-style short mode. If the path
21203   # contains just simple characters, use it. Otherwise (spaces, weird characters),
21204   # take no chances and rewrite it.
21205   # Note: m4 eats our [], so we need to use [ and ] instead.
21206   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21207   if test "x$has_forbidden_chars" != x; then
21208     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21209     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21210     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21211     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21212       # Going to short mode and back again did indeed matter. Since short mode is
21213       # case insensitive, let's make it lowercase to improve readability.
21214       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21215       # Now convert it back to Unix-stile (cygpath)
21216       input_path=`$CYGPATH -u "$shortmode_path"`
21217       new_path="$input_path"
21218     fi
21219   fi
21220 
21221   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21222   if test "x$test_cygdrive_prefix" = x; then
21223     # As a simple fix, exclude /usr/bin since it's not a real path.
21224     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
21225       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21226       # a path prefixed by /cygdrive for fixpath to work.
21227       new_path="$CYGWIN_ROOT_PATH$input_path"
21228     fi
21229   fi
21230 
21231   # remove trailing .exe if any
21232   new_path="${new_path/%.exe/}"
21233 
21234   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21235 
21236   # First separate the path from the arguments. This will split at the first
21237   # space.
21238   complete="$PROPER_COMPILER_CXX"
21239   path="${complete%% *}"
21240   tmp="$complete EOL"
21241   arguments="${tmp#* }"
21242 
21243   # Input might be given as Windows format, start by converting to
21244   # unix format.
21245   new_path="$path"
21246 
21247   windows_path="$new_path"
21248   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21249     unix_path=`$CYGPATH -u "$windows_path"`
21250     new_path="$unix_path"
21251   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21252     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21253     new_path="$unix_path"
21254   fi
21255 
21256 
21257   # Now try to locate executable using which
21258   new_path=`$WHICH "$new_path" 2> /dev/null`
21259 
21260   if test "x$new_path" = x; then
21261     # Oops. Which didn't find the executable.
21262     # The splitting of arguments from the executable at a space might have been incorrect,
21263     # since paths with space are more likely in Windows. Give it another try with the whole
21264     # argument.
21265     path="$complete"
21266     arguments="EOL"
21267     new_path="$path"
21268 
21269   windows_path="$new_path"
21270   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21271     unix_path=`$CYGPATH -u "$windows_path"`
21272     new_path="$unix_path"
21273   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21274     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21275     new_path="$unix_path"
21276   fi
21277 
21278 
21279     new_path=`$WHICH "$new_path" 2> /dev/null`
21280 
21281     if test "x$new_path" = x; then
21282       # It's still not found. Now this is an unrecoverable error.
21283       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
21284 $as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
21285       has_space=`$ECHO "$complete" | $GREP " "`
21286       if test "x$has_space" != x; then
21287         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21288 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21289       fi
21290       as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
21291     fi
21292   fi
21293 
21294   # Now new_path has a complete unix path to the binary
21295   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
21296     # Keep paths in /bin as-is, but remove trailing .exe if any
21297     new_path="${new_path/%.exe/}"
21298     # Do not save /bin paths to all_fixpath_prefixes!
21299   else
21300     # Not in mixed or Windows style, start by that.
21301     new_path=`cmd //c echo $new_path`
21302 
21303   input_path="$new_path"
21304   # Check if we need to convert this using DOS-style short mode. If the path
21305   # contains just simple characters, use it. Otherwise (spaces, weird characters),
21306   # take no chances and rewrite it.
21307   # Note: m4 eats our [], so we need to use [ and ] instead.
21308   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21309   if test "x$has_forbidden_chars" != x; then
21310     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21311     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21312   fi
21313 
21314     # Output is in $new_path
21315 
21316   windows_path="$new_path"
21317   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21318     unix_path=`$CYGPATH -u "$windows_path"`
21319     new_path="$unix_path"
21320   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21321     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21322     new_path="$unix_path"
21323   fi
21324 
21325     # remove trailing .exe if any
21326     new_path="${new_path/%.exe/}"
21327 
21328     # Save the first 10 bytes of this path to the storage, so fixpath can work.
21329     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21330   fi
21331 
21332   else
21333     # We're on a posix platform. Hooray! :)
21334     # First separate the path from the arguments. This will split at the first
21335     # space.
21336     complete="$PROPER_COMPILER_CXX"
21337     path="${complete%% *}"
21338     tmp="$complete EOL"
21339     arguments="${tmp#* }"
21340 
21341     # Cannot rely on the command "which" here since it doesn't always work.
21342     is_absolute_path=`$ECHO "$path" | $GREP ^/`
21343     if test -z "$is_absolute_path"; then
21344       # Path to executable is not absolute. Find it.
21345       IFS_save="$IFS"
21346       IFS=:
21347       for p in $PATH; do
21348         if test -f "$p/$path" && test -x "$p/$path"; then
21349           new_path="$p/$path"
21350           break
21351         fi
21352       done
21353       IFS="$IFS_save"
21354     else
21355       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving PROPER_COMPILER_CXX (as $path) failed, using $path directly." >&5
21356 $as_echo "$as_me: Resolving PROPER_COMPILER_CXX (as $path) failed, using $path directly." >&6;}
21357       new_path="$path"
21358     fi
21359 
21360     if test "x$new_path" = x; then
21361         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
21362 $as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
21363         has_space=`$ECHO "$complete" | $GREP " "`
21364         if test "x$has_space" != x; then
21365           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
21366 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
21367         fi
21368         as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
21369       fi
21370   fi
21371 
21372       # Now join together the path and the arguments once again
21373       if test "x$arguments" != xEOL; then
21374         new_complete="$new_path ${arguments% *}"
21375       else
21376         new_complete="$new_path"
21377       fi
21378 
21379   if test "x$complete" != "x$new_complete"; then
21380       PROPER_COMPILER_CXX="$new_complete"
21381       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&5
21382 $as_echo "$as_me: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&6;}
21383     fi
21384 
21385     PATH="$RETRY_COMPILER_SAVED_PATH"
21386 
21387     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CXX" >&5
21388 $as_echo_n "checking for resolved symbolic links for CXX... " >&6; }
21389 
21390     if test "x$OPENJDK_BUILD_OS" != xwindows; then
21391         # Follow a chain of symbolic links. Use readlink
21392         # where it exists, else fall back to horribly
21393         # complicated shell code.
21394         if test "x$READLINK_TESTED" != yes; then
21395             # On MacOSX there is a readlink tool with a different
21396             # purpose than the GNU readlink tool. Check the found readlink.
21397             ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
21398             if test "x$ISGNU" = x; then
21399                  # A readlink that we do not know how to use.
21400                  # Are there other non-GNU readlinks out there?
21401                  READLINK_TESTED=yes
21402                  READLINK=
21403             fi
21404         fi
21405 
21406         if test "x$READLINK" != x; then
21407             PROPER_COMPILER_CXX=`$READLINK -f $PROPER_COMPILER_CXX`
21408         else
21409             # Save the current directory for restoring afterwards
21410             STARTDIR=$PWD
21411             COUNTER=0
21412             sym_link_dir=`$DIRNAME $PROPER_COMPILER_CXX`
21413             sym_link_file=`$BASENAME $PROPER_COMPILER_CXX`
21414             cd $sym_link_dir
21415             # Use -P flag to resolve symlinks in directories.
21416             cd `$THEPWDCMD -P`
21417             sym_link_dir=`$THEPWDCMD -P`
21418             # Resolve file symlinks
21419             while test $COUNTER -lt 20; do
21420                 ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
21421                 if test "x$ISLINK" == x; then
21422                     # This is not a symbolic link! We are done!
21423                     break
21424                 fi
21425                 # Again resolve directory symlinks since the target of the just found
21426                 # link could be in a different directory
21427                 cd `$DIRNAME $ISLINK`
21428                 sym_link_dir=`$THEPWDCMD -P`
21429                 sym_link_file=`$BASENAME $ISLINK`
21430                 let COUNTER=COUNTER+1
21431             done
21432             cd $STARTDIR
21433             PROPER_COMPILER_CXX=$sym_link_dir/$sym_link_file
21434         fi
21435     fi
21436 
21437     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5
21438 $as_echo "$PROPER_COMPILER_CXX" >&6; }
21439     CXX="$PROPER_COMPILER_CXX"
21440   else
21441     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CXX" >&5
21442 $as_echo "no, keeping CXX" >&6; }
21443     CXX="$TEST_COMPILER"
21444   fi
21445 
21446   COMPILER=$CXX
21447   COMPILER_NAME=$COMPILER_NAME
21448 
21449   if test "x$OPENJDK_TARGET_OS" = xsolaris; then
21450     # Make sure we use the Sun Studio compiler and not gcc on Solaris, which won't work
21451     COMPILER_VERSION_TEST=`$COMPILER -V 2>&1 | $HEAD -n 1`
21452     $ECHO $COMPILER_VERSION_TEST | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
21453     if test $? -ne 0; then
21454       GCC_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
21455 
21456       { $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
21457 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required Sun Studio compiler." >&6;}
21458       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&5
21459 $as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&6;}
21460       as_fn_error $? "Sun Studio compiler is required. Try setting --with-tools-dir." "$LINENO" 5
21461     else
21462       COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/p"`
21463       COMPILER_VENDOR="Sun Studio"
21464     fi
21465   elif test  "x$OPENJDK_TARGET_OS" = xwindows; then
21466     # First line typically looks something like:
21467     # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.30319.01 for 80x86
21468     COMPILER_VERSION_TEST=`$COMPILER 2>&1 | $HEAD -n 1`
21469     COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*Version \([1-9][0-9.]*\) .*/\1/p"`
21470     COMPILER_VENDOR="Microsoft CL.EXE"
21471     COMPILER_CPU_TEST=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* for \(.*\)$/\1/p"`
21472     if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
21473       if test "x$COMPILER_CPU_TEST" != "x80x86"; then
21474         as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"80x86\"." "$LINENO" 5
21475       fi
21476     elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
21477       if test "x$COMPILER_CPU_TEST" != "xx64"; then
21478         as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." "$LINENO" 5
21479       fi
21480     fi
21481   else
21482     COMPILER_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
21483     # Check that this is likely to be GCC.
21484     $COMPILER --version 2>&1 | $GREP "Free Software Foundation" > /dev/null
21485     if test $? -ne 0; then
21486       { $as_echo "$as_me:${as_lineno-$LINENO}: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&5
21487 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&6;}
21488       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&5
21489 $as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&6;}
21490       as_fn_error $? "GCC compiler is required. Try setting --with-tools-dir." "$LINENO" 5
21491     fi
21492 
21493     # First line typically looks something like:
21494     # gcc (Ubuntu/Linaro 4.5.2-8ubuntu4) 4.5.2
21495     COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* \([1-9][0-9.]*\)/\1/p"`
21496     COMPILER_VENDOR=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^\(.*\) [1-9][0-9.]*/\1/p"`
21497   fi
21498   # This sets CC_VERSION or CXX_VERSION. (This comment is a grep marker)
21499   CXX_VERSION="$COMPILER_VERSION"
21500   # This sets CC_VENDOR or CXX_VENDOR. (This comment is a grep marker)
21501   CXX_VENDOR="$COMPILER_VENDOR"
21502 
21503   { $as_echo "$as_me:${as_lineno-$LINENO}: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&5
21504 $as_echo "$as_me: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&6;}
21505 
21506 
21507 # Now that we have resolved CXX ourself, let autoconf have its go at it
21508 ac_ext=cpp
21509 ac_cpp='$CXXCPP $CPPFLAGS'
21510 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
21511 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
21512 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
21513 if test -z "$CXX"; then
21514   if test -n "$CCC"; then
21515     CXX=$CCC
21516   else
21517     if test -n "$ac_tool_prefix"; then
21518   for ac_prog in $CXX
21519   do
21520     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
21521 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
21522 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21523 $as_echo_n "checking for $ac_word... " >&6; }
21524 if test "${ac_cv_prog_CXX+set}" = set; then :
21525   $as_echo_n "(cached) " >&6
21526 else
21527   if test -n "$CXX"; then
21528   ac_cv_prog_CXX="$CXX" # Let the user override the test.
21529 else
21530 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21531 for as_dir in $PATH
21532 do
21533   IFS=$as_save_IFS
21534   test -z "$as_dir" && as_dir=.
21535     for ac_exec_ext in '' $ac_executable_extensions; do
21536   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
21537     ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
21538     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21539     break 2
21540   fi
21541 done
21542   done
21543 IFS=$as_save_IFS
21544 
21545 fi
21546 fi
21547 CXX=$ac_cv_prog_CXX
21548 if test -n "$CXX"; then
21549   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
21550 $as_echo "$CXX" >&6; }
21551 else
21552   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21553 $as_echo "no" >&6; }
21554 fi
21555 
21556 
21557     test -n "$CXX" && break
21558   done
21559 fi
21560 if test -z "$CXX"; then
21561   ac_ct_CXX=$CXX
21562   for ac_prog in $CXX
21563 do
21564   # Extract the first word of "$ac_prog", so it can be a program name with args.
21565 set dummy $ac_prog; ac_word=$2
21566 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21567 $as_echo_n "checking for $ac_word... " >&6; }
21568 if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then :
21569   $as_echo_n "(cached) " >&6
21570 else
21571   if test -n "$ac_ct_CXX"; then
21572   ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
21573 else
21574 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21575 for as_dir in $PATH
21576 do
21577   IFS=$as_save_IFS
21578   test -z "$as_dir" && as_dir=.
21579     for ac_exec_ext in '' $ac_executable_extensions; do
21580   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
21581     ac_cv_prog_ac_ct_CXX="$ac_prog"
21582     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21583     break 2
21584   fi
21585 done
21586   done
21587 IFS=$as_save_IFS
21588 
21589 fi
21590 fi
21591 ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
21592 if test -n "$ac_ct_CXX"; then
21593   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
21594 $as_echo "$ac_ct_CXX" >&6; }
21595 else
21596   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21597 $as_echo "no" >&6; }
21598 fi
21599 
21600 
21601   test -n "$ac_ct_CXX" && break
21602 done
21603 
21604   if test "x$ac_ct_CXX" = x; then
21605     CXX="g++"
21606   else
21607     case $cross_compiling:$ac_tool_warned in
21608 yes:)
21609 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
21610 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
21611 ac_tool_warned=yes ;;
21612 esac
21613     CXX=$ac_ct_CXX
21614   fi
21615 fi
21616 
21617   fi
21618 fi
21619 # Provide some information about the compiler.
21620 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
21621 set X $ac_compile
21622 ac_compiler=$2
21623 for ac_option in --version -v -V -qversion; do
21624   { { ac_try="$ac_compiler $ac_option >&5"
21625 case "(($ac_try" in
21626   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21627   *) ac_try_echo=$ac_try;;
21628 esac
21629 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
21630 $as_echo "$ac_try_echo"; } >&5
21631   (eval "$ac_compiler $ac_option >&5") 2>conftest.err
21632   ac_status=$?
21633   if test -s conftest.err; then
21634     sed '10a\
21635 ... rest of stderr output deleted ...
21636          10q' conftest.err >conftest.er1
21637     cat conftest.er1 >&5
21638   fi
21639   rm -f conftest.er1 conftest.err
21640   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
21641   test $ac_status = 0; }
21642 done
21643 
21644 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
21645 $as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
21646 if test "${ac_cv_cxx_compiler_gnu+set}" = set; then :
21647   $as_echo_n "(cached) " >&6
21648 else
21649   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21650 /* end confdefs.h.  */
21651 
21652 int
21653 main ()
21654 {
21655 #ifndef __GNUC__
21656        choke me
21657 #endif
21658 
21659   ;
21660   return 0;
21661 }
21662 _ACEOF
21663 if ac_fn_cxx_try_compile "$LINENO"; then :
21664   ac_compiler_gnu=yes
21665 else
21666   ac_compiler_gnu=no
21667 fi
21668 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21669 ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
21670 
21671 fi
21672 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
21673 $as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
21674 if test $ac_compiler_gnu = yes; then
21675   GXX=yes
21676 else
21677   GXX=
21678 fi
21679 ac_test_CXXFLAGS=${CXXFLAGS+set}
21680 ac_save_CXXFLAGS=$CXXFLAGS
21681 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
21682 $as_echo_n "checking whether $CXX accepts -g... " >&6; }
21683 if test "${ac_cv_prog_cxx_g+set}" = set; then :
21684   $as_echo_n "(cached) " >&6
21685 else
21686   ac_save_cxx_werror_flag=$ac_cxx_werror_flag
21687    ac_cxx_werror_flag=yes
21688    ac_cv_prog_cxx_g=no
21689    CXXFLAGS="-g"
21690    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21691 /* end confdefs.h.  */
21692 
21693 int
21694 main ()
21695 {
21696 
21697   ;
21698   return 0;
21699 }
21700 _ACEOF
21701 if ac_fn_cxx_try_compile "$LINENO"; then :
21702   ac_cv_prog_cxx_g=yes
21703 else
21704   CXXFLAGS=""
21705       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21706 /* end confdefs.h.  */
21707 
21708 int
21709 main ()
21710 {
21711 
21712   ;
21713   return 0;
21714 }
21715 _ACEOF
21716 if ac_fn_cxx_try_compile "$LINENO"; then :
21717 
21718 else
21719   ac_cxx_werror_flag=$ac_save_cxx_werror_flag
21720          CXXFLAGS="-g"
21721          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21722 /* end confdefs.h.  */
21723 
21724 int
21725 main ()
21726 {
21727 
21728   ;
21729   return 0;
21730 }
21731 _ACEOF
21732 if ac_fn_cxx_try_compile "$LINENO"; then :
21733   ac_cv_prog_cxx_g=yes
21734 fi
21735 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21736 fi
21737 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21738 fi
21739 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21740    ac_cxx_werror_flag=$ac_save_cxx_werror_flag
21741 fi
21742 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
21743 $as_echo "$ac_cv_prog_cxx_g" >&6; }
21744 if test "$ac_test_CXXFLAGS" = set; then
21745   CXXFLAGS=$ac_save_CXXFLAGS
21746 elif test $ac_cv_prog_cxx_g = yes; then
21747   if test "$GXX" = yes; then
21748     CXXFLAGS="-g -O2"
21749   else
21750     CXXFLAGS="-g"
21751   fi
21752 else
21753   if test "$GXX" = yes; then
21754     CXXFLAGS="-O2"
21755   else
21756     CXXFLAGS=
21757   fi
21758 fi
21759 ac_ext=cpp
21760 ac_cpp='$CXXCPP $CPPFLAGS'
21761 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
21762 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
21763 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
21764 
21765 
21766 ### Locate other tools
21767 
21768 if test "x$OPENJDK_TARGET_OS" = xmacosx; then
21769     ac_ext=m
21770 ac_cpp='$OBJCPP $CPPFLAGS'
21771 ac_compile='$OBJC -c $OBJCFLAGS $CPPFLAGS conftest.$ac_ext >&5'
21772 ac_link='$OBJC -o conftest$ac_exeext $OBJCFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
21773 ac_compiler_gnu=$ac_cv_objc_compiler_gnu
21774 if test -n "$ac_tool_prefix"; then
21775   for ac_prog in gcc objcc objc cc CC
21776   do
21777     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
21778 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
21779 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21780 $as_echo_n "checking for $ac_word... " >&6; }
21781 if test "${ac_cv_prog_OBJC+set}" = set; then :
21782   $as_echo_n "(cached) " >&6
21783 else
21784   if test -n "$OBJC"; then
21785   ac_cv_prog_OBJC="$OBJC" # Let the user override the test.
21786 else
21787 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21788 for as_dir in $PATH
21789 do
21790   IFS=$as_save_IFS
21791   test -z "$as_dir" && as_dir=.
21792     for ac_exec_ext in '' $ac_executable_extensions; do
21793   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
21794     ac_cv_prog_OBJC="$ac_tool_prefix$ac_prog"
21795     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21796     break 2
21797   fi
21798 done
21799   done
21800 IFS=$as_save_IFS
21801 
21802 fi
21803 fi
21804 OBJC=$ac_cv_prog_OBJC
21805 if test -n "$OBJC"; then
21806   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJC" >&5
21807 $as_echo "$OBJC" >&6; }
21808 else
21809   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21810 $as_echo "no" >&6; }
21811 fi
21812 
21813 
21814     test -n "$OBJC" && break
21815   done
21816 fi
21817 if test -z "$OBJC"; then
21818   ac_ct_OBJC=$OBJC
21819   for ac_prog in gcc objcc objc cc CC
21820 do
21821   # Extract the first word of "$ac_prog", so it can be a program name with args.
21822 set dummy $ac_prog; ac_word=$2
21823 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21824 $as_echo_n "checking for $ac_word... " >&6; }
21825 if test "${ac_cv_prog_ac_ct_OBJC+set}" = set; then :
21826   $as_echo_n "(cached) " >&6
21827 else
21828   if test -n "$ac_ct_OBJC"; then
21829   ac_cv_prog_ac_ct_OBJC="$ac_ct_OBJC" # Let the user override the test.
21830 else
21831 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21832 for as_dir in $PATH
21833 do
21834   IFS=$as_save_IFS
21835   test -z "$as_dir" && as_dir=.
21836     for ac_exec_ext in '' $ac_executable_extensions; do
21837   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
21838     ac_cv_prog_ac_ct_OBJC="$ac_prog"
21839     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21840     break 2
21841   fi
21842 done
21843   done
21844 IFS=$as_save_IFS
21845 
21846 fi
21847 fi
21848 ac_ct_OBJC=$ac_cv_prog_ac_ct_OBJC
21849 if test -n "$ac_ct_OBJC"; then
21850   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJC" >&5
21851 $as_echo "$ac_ct_OBJC" >&6; }
21852 else
21853   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21854 $as_echo "no" >&6; }
21855 fi
21856 
21857 
21858   test -n "$ac_ct_OBJC" && break
21859 done
21860 
21861   if test "x$ac_ct_OBJC" = x; then
21862     OBJC="gcc"
21863   else
21864     case $cross_compiling:$ac_tool_warned in
21865 yes:)
21866 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
21867 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
21868 ac_tool_warned=yes ;;
21869 esac
21870     OBJC=$ac_ct_OBJC
21871   fi
21872 fi
21873 
21874 # Provide some information about the compiler.
21875 $as_echo "$as_me:${as_lineno-$LINENO}: checking for Objective C compiler version" >&5
21876 set X $ac_compile
21877 ac_compiler=$2
21878 for ac_option in --version -v -V -qversion; do
21879   { { ac_try="$ac_compiler $ac_option >&5"
21880 case "(($ac_try" in
21881   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21882   *) ac_try_echo=$ac_try;;
21883 esac
21884 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
21885 $as_echo "$ac_try_echo"; } >&5
21886   (eval "$ac_compiler $ac_option >&5") 2>conftest.err
21887   ac_status=$?
21888   if test -s conftest.err; then
21889     sed '10a\
21890 ... rest of stderr output deleted ...
21891          10q' conftest.err >conftest.er1
21892     cat conftest.er1 >&5
21893   fi
21894   rm -f conftest.er1 conftest.err
21895   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
21896   test $ac_status = 0; }
21897 done
21898 
21899 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU Objective C compiler" >&5
21900 $as_echo_n "checking whether we are using the GNU Objective C compiler... " >&6; }
21901 if test "${ac_cv_objc_compiler_gnu+set}" = set; then :
21902   $as_echo_n "(cached) " >&6
21903 else
21904   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21905 /* end confdefs.h.  */
21906 
21907 int
21908 main ()
21909 {
21910 #ifndef __GNUC__
21911        choke me
21912 #endif
21913 
21914   ;
21915   return 0;
21916 }
21917 _ACEOF
21918 if ac_fn_objc_try_compile "$LINENO"; then :
21919   ac_compiler_gnu=yes
21920 else
21921   ac_compiler_gnu=no
21922 fi
21923 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21924 ac_cv_objc_compiler_gnu=$ac_compiler_gnu
21925 
21926 fi
21927 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objc_compiler_gnu" >&5
21928 $as_echo "$ac_cv_objc_compiler_gnu" >&6; }
21929 if test $ac_compiler_gnu = yes; then
21930   GOBJC=yes
21931 else
21932   GOBJC=
21933 fi
21934 ac_test_OBJCFLAGS=${OBJCFLAGS+set}
21935 ac_save_OBJCFLAGS=$OBJCFLAGS
21936 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $OBJC accepts -g" >&5
21937 $as_echo_n "checking whether $OBJC accepts -g... " >&6; }
21938 if test "${ac_cv_prog_objc_g+set}" = set; then :
21939   $as_echo_n "(cached) " >&6
21940 else
21941   ac_save_objc_werror_flag=$ac_objc_werror_flag
21942    ac_objc_werror_flag=yes
21943    ac_cv_prog_objc_g=no
21944    OBJCFLAGS="-g"
21945    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21946 /* end confdefs.h.  */
21947 
21948 int
21949 main ()
21950 {
21951 
21952   ;
21953   return 0;
21954 }
21955 _ACEOF
21956 if ac_fn_objc_try_compile "$LINENO"; then :
21957   ac_cv_prog_objc_g=yes
21958 else
21959   OBJCFLAGS=""
21960       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21961 /* end confdefs.h.  */
21962 
21963 int
21964 main ()
21965 {
21966 
21967   ;
21968   return 0;
21969 }
21970 _ACEOF
21971 if ac_fn_objc_try_compile "$LINENO"; then :
21972 
21973 else
21974   ac_objc_werror_flag=$ac_save_objc_werror_flag
21975          OBJCFLAGS="-g"
21976          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21977 /* end confdefs.h.  */
21978 
21979 int
21980 main ()
21981 {
21982 
21983   ;
21984   return 0;
21985 }
21986 _ACEOF
21987 if ac_fn_objc_try_compile "$LINENO"; then :
21988   ac_cv_prog_objc_g=yes
21989 fi
21990 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21991 fi
21992 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21993 fi
21994 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21995    ac_objc_werror_flag=$ac_save_objc_werror_flag
21996 fi
21997 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_objc_g" >&5
21998 $as_echo "$ac_cv_prog_objc_g" >&6; }
21999 if test "$ac_test_OBJCFLAGS" = set; then
22000   OBJCFLAGS=$ac_save_OBJCFLAGS
22001 elif test $ac_cv_prog_objc_g = yes; then
22002   if test "$GOBJC" = yes; then
22003     OBJCFLAGS="-g -O2"
22004   else
22005     OBJCFLAGS="-g"
22006   fi
22007 else
22008   if test "$GOBJC" = yes; then
22009     OBJCFLAGS="-O2"
22010   else
22011     OBJCFLAGS=
22012   fi
22013 fi
22014 ac_ext=cpp
22015 ac_cpp='$CXXCPP $CPPFLAGS'
22016 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
22017 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
22018 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
22019 
22020 
22021   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22022 
22023   # First separate the path from the arguments. This will split at the first
22024   # space.
22025   complete="$OBJC"
22026   path="${complete%% *}"
22027   tmp="$complete EOL"
22028   arguments="${tmp#* }"
22029 
22030   # Input might be given as Windows format, start by converting to
22031   # unix format.
22032   new_path=`$CYGPATH -u "$path"`
22033 
22034   # Now try to locate executable using which
22035   new_path=`$WHICH "$new_path" 2> /dev/null`
22036   # bat and cmd files are not always considered executable in cygwin causing which
22037   # to not find them
22038   if test "x$new_path" = x \
22039            && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22040            && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22041     new_path=`$CYGPATH -u "$path"`
22042   fi
22043   if test "x$new_path" = x; then
22044     # Oops. Which didn't find the executable.
22045     # The splitting of arguments from the executable at a space might have been incorrect,
22046     # since paths with space are more likely in Windows. Give it another try with the whole
22047     # argument.
22048     path="$complete"
22049     arguments="EOL"
22050     new_path=`$CYGPATH -u "$path"`
22051     new_path=`$WHICH "$new_path" 2> /dev/null`
22052     # bat and cmd files are not always considered executable in cygwin causing which
22053     # to not find them
22054     if test "x$new_path" = x \
22055              && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22056              && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22057       new_path=`$CYGPATH -u "$path"`
22058     fi
22059     if test "x$new_path" = x; then
22060       # It's still not found. Now this is an unrecoverable error.
22061       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
22062 $as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
22063       has_space=`$ECHO "$complete" | $GREP " "`
22064       if test "x$has_space" != x; then
22065         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22066 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22067       fi
22068       as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
22069     fi
22070   fi
22071 
22072   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22073   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22074   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22075   # "foo.exe" is OK but "foo" is an error.
22076   #
22077   # This test is therefore slightly more accurate than "test -f" to check for file precense.
22078   # It is also a way to make sure we got the proper file name for the real test later on.
22079   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22080   if test "x$test_shortpath" = x; then
22081     # Short path failed, file does not exist as specified.
22082     # Try adding .exe or .cmd
22083     if test -f "${new_path}.exe"; then
22084        input_to_shortpath="${new_path}.exe"
22085     elif test -f "${new_path}.cmd"; then
22086        input_to_shortpath="${new_path}.cmd"
22087     else
22088       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$new_path\", is invalid." >&5
22089 $as_echo "$as_me: The path of OBJC, which resolves as \"$new_path\", is invalid." >&6;}
22090       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
22091 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
22092       as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
22093     fi
22094   else
22095     input_to_shortpath="$new_path"
22096   fi
22097 
22098   # Call helper function which possibly converts this using DOS-style short mode.
22099   # If so, the updated path is stored in $new_path.
22100   new_path="$input_to_shortpath"
22101 
22102   input_path="$input_to_shortpath"
22103   # Check if we need to convert this using DOS-style short mode. If the path
22104   # contains just simple characters, use it. Otherwise (spaces, weird characters),
22105   # take no chances and rewrite it.
22106   # Note: m4 eats our [], so we need to use [ and ] instead.
22107   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22108   if test "x$has_forbidden_chars" != x; then
22109     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22110     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22111     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22112     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22113       # Going to short mode and back again did indeed matter. Since short mode is
22114       # case insensitive, let's make it lowercase to improve readability.
22115       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22116       # Now convert it back to Unix-stile (cygpath)
22117       input_path=`$CYGPATH -u "$shortmode_path"`
22118       new_path="$input_path"
22119     fi
22120   fi
22121 
22122   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22123   if test "x$test_cygdrive_prefix" = x; then
22124     # As a simple fix, exclude /usr/bin since it's not a real path.
22125     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
22126       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22127       # a path prefixed by /cygdrive for fixpath to work.
22128       new_path="$CYGWIN_ROOT_PATH$input_path"
22129     fi
22130   fi
22131 
22132   # remove trailing .exe if any
22133   new_path="${new_path/%.exe/}"
22134 
22135   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22136 
22137   # First separate the path from the arguments. This will split at the first
22138   # space.
22139   complete="$OBJC"
22140   path="${complete%% *}"
22141   tmp="$complete EOL"
22142   arguments="${tmp#* }"
22143 
22144   # Input might be given as Windows format, start by converting to
22145   # unix format.
22146   new_path="$path"
22147 
22148   windows_path="$new_path"
22149   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22150     unix_path=`$CYGPATH -u "$windows_path"`
22151     new_path="$unix_path"
22152   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22153     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22154     new_path="$unix_path"
22155   fi
22156 
22157 
22158   # Now try to locate executable using which
22159   new_path=`$WHICH "$new_path" 2> /dev/null`
22160 
22161   if test "x$new_path" = x; then
22162     # Oops. Which didn't find the executable.
22163     # The splitting of arguments from the executable at a space might have been incorrect,
22164     # since paths with space are more likely in Windows. Give it another try with the whole
22165     # argument.
22166     path="$complete"
22167     arguments="EOL"
22168     new_path="$path"
22169 
22170   windows_path="$new_path"
22171   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22172     unix_path=`$CYGPATH -u "$windows_path"`
22173     new_path="$unix_path"
22174   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22175     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22176     new_path="$unix_path"
22177   fi
22178 
22179 
22180     new_path=`$WHICH "$new_path" 2> /dev/null`
22181 
22182     if test "x$new_path" = x; then
22183       # It's still not found. Now this is an unrecoverable error.
22184       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
22185 $as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
22186       has_space=`$ECHO "$complete" | $GREP " "`
22187       if test "x$has_space" != x; then
22188         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22189 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22190       fi
22191       as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
22192     fi
22193   fi
22194 
22195   # Now new_path has a complete unix path to the binary
22196   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
22197     # Keep paths in /bin as-is, but remove trailing .exe if any
22198     new_path="${new_path/%.exe/}"
22199     # Do not save /bin paths to all_fixpath_prefixes!
22200   else
22201     # Not in mixed or Windows style, start by that.
22202     new_path=`cmd //c echo $new_path`
22203 
22204   input_path="$new_path"
22205   # Check if we need to convert this using DOS-style short mode. If the path
22206   # contains just simple characters, use it. Otherwise (spaces, weird characters),
22207   # take no chances and rewrite it.
22208   # Note: m4 eats our [], so we need to use [ and ] instead.
22209   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22210   if test "x$has_forbidden_chars" != x; then
22211     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22212     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22213   fi
22214 
22215     # Output is in $new_path
22216 
22217   windows_path="$new_path"
22218   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22219     unix_path=`$CYGPATH -u "$windows_path"`
22220     new_path="$unix_path"
22221   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22222     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22223     new_path="$unix_path"
22224   fi
22225 
22226     # remove trailing .exe if any
22227     new_path="${new_path/%.exe/}"
22228 
22229     # Save the first 10 bytes of this path to the storage, so fixpath can work.
22230     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22231   fi
22232 
22233   else
22234     # We're on a posix platform. Hooray! :)
22235     # First separate the path from the arguments. This will split at the first
22236     # space.
22237     complete="$OBJC"
22238     path="${complete%% *}"
22239     tmp="$complete EOL"
22240     arguments="${tmp#* }"
22241 
22242     # Cannot rely on the command "which" here since it doesn't always work.
22243     is_absolute_path=`$ECHO "$path" | $GREP ^/`
22244     if test -z "$is_absolute_path"; then
22245       # Path to executable is not absolute. Find it.
22246       IFS_save="$IFS"
22247       IFS=:
22248       for p in $PATH; do
22249         if test -f "$p/$path" && test -x "$p/$path"; then
22250           new_path="$p/$path"
22251           break
22252         fi
22253       done
22254       IFS="$IFS_save"
22255     else
22256       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving OBJC (as $path) failed, using $path directly." >&5
22257 $as_echo "$as_me: Resolving OBJC (as $path) failed, using $path directly." >&6;}
22258       new_path="$path"
22259     fi
22260 
22261     if test "x$new_path" = x; then
22262         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
22263 $as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
22264         has_space=`$ECHO "$complete" | $GREP " "`
22265         if test "x$has_space" != x; then
22266           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
22267 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
22268         fi
22269         as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
22270       fi
22271   fi
22272 
22273       # Now join together the path and the arguments once again
22274       if test "x$arguments" != xEOL; then
22275         new_complete="$new_path ${arguments% *}"
22276       else
22277         new_complete="$new_path"
22278       fi
22279 
22280   if test "x$complete" != "x$new_complete"; then
22281       OBJC="$new_complete"
22282       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJC to \"$new_complete\"" >&5
22283 $as_echo "$as_me: Rewriting OBJC to \"$new_complete\"" >&6;}
22284     fi
22285 
22286 else
22287     OBJC=
22288 fi
22289 
22290 # Restore the flags to the user specified values.
22291 # This is necessary since AC_PROG_CC defaults CFLAGS to "-g -O2"
22292 CFLAGS="$ORG_CFLAGS"
22293 CXXFLAGS="$ORG_CXXFLAGS"
22294 OBJCFLAGS="$ORG_OBJCFLAGS"
22295 
22296 LD="$CC"
22297 LDEXE="$CC"
22298 LDCXX="$CXX"
22299 LDEXECXX="$CXX"
22300 
22301 # LDEXE is the linker to use, when creating executables.
22302 
22303 # Linking C++ libraries.
22304 
22305 # Linking C++ executables.
22306 
22307 
22308 if test "x$OPENJDK_TARGET_OS" != xwindows; then
22309     if test -n "$ac_tool_prefix"; then
22310   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
22311 set dummy ${ac_tool_prefix}ar; ac_word=$2
22312 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22313 $as_echo_n "checking for $ac_word... " >&6; }
22314 if test "${ac_cv_prog_AR+set}" = set; then :
22315   $as_echo_n "(cached) " >&6
22316 else
22317   if test -n "$AR"; then
22318   ac_cv_prog_AR="$AR" # Let the user override the test.
22319 else
22320 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22321 for as_dir in $PATH
22322 do
22323   IFS=$as_save_IFS
22324   test -z "$as_dir" && as_dir=.
22325     for ac_exec_ext in '' $ac_executable_extensions; do
22326   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
22327     ac_cv_prog_AR="${ac_tool_prefix}ar"
22328     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22329     break 2
22330   fi
22331 done
22332   done
22333 IFS=$as_save_IFS
22334 
22335 fi
22336 fi
22337 AR=$ac_cv_prog_AR
22338 if test -n "$AR"; then
22339   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
22340 $as_echo "$AR" >&6; }
22341 else
22342   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22343 $as_echo "no" >&6; }
22344 fi
22345 
22346 
22347 fi
22348 if test -z "$ac_cv_prog_AR"; then
22349   ac_ct_AR=$AR
22350   # Extract the first word of "ar", so it can be a program name with args.
22351 set dummy ar; ac_word=$2
22352 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22353 $as_echo_n "checking for $ac_word... " >&6; }
22354 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then :
22355   $as_echo_n "(cached) " >&6
22356 else
22357   if test -n "$ac_ct_AR"; then
22358   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
22359 else
22360 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22361 for as_dir in $PATH
22362 do
22363   IFS=$as_save_IFS
22364   test -z "$as_dir" && as_dir=.
22365     for ac_exec_ext in '' $ac_executable_extensions; do
22366   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
22367     ac_cv_prog_ac_ct_AR="ar"
22368     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22369     break 2
22370   fi
22371 done
22372   done
22373 IFS=$as_save_IFS
22374 
22375 fi
22376 fi
22377 ac_ct_AR=$ac_cv_prog_ac_ct_AR
22378 if test -n "$ac_ct_AR"; then
22379   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
22380 $as_echo "$ac_ct_AR" >&6; }
22381 else
22382   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22383 $as_echo "no" >&6; }
22384 fi
22385 
22386   if test "x$ac_ct_AR" = x; then
22387     AR=""
22388   else
22389     case $cross_compiling:$ac_tool_warned in
22390 yes:)
22391 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
22392 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
22393 ac_tool_warned=yes ;;
22394 esac
22395     AR=$ac_ct_AR
22396   fi
22397 else
22398   AR="$ac_cv_prog_AR"
22399 fi
22400 
22401 
22402   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22403 
22404   # First separate the path from the arguments. This will split at the first
22405   # space.
22406   complete="$AR"
22407   path="${complete%% *}"
22408   tmp="$complete EOL"
22409   arguments="${tmp#* }"
22410 
22411   # Input might be given as Windows format, start by converting to
22412   # unix format.
22413   new_path=`$CYGPATH -u "$path"`
22414 
22415   # Now try to locate executable using which
22416   new_path=`$WHICH "$new_path" 2> /dev/null`
22417   # bat and cmd files are not always considered executable in cygwin causing which
22418   # to not find them
22419   if test "x$new_path" = x \
22420            && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22421            && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22422     new_path=`$CYGPATH -u "$path"`
22423   fi
22424   if test "x$new_path" = x; then
22425     # Oops. Which didn't find the executable.
22426     # The splitting of arguments from the executable at a space might have been incorrect,
22427     # since paths with space are more likely in Windows. Give it another try with the whole
22428     # argument.
22429     path="$complete"
22430     arguments="EOL"
22431     new_path=`$CYGPATH -u "$path"`
22432     new_path=`$WHICH "$new_path" 2> /dev/null`
22433     # bat and cmd files are not always considered executable in cygwin causing which
22434     # to not find them
22435     if test "x$new_path" = x \
22436              && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22437              && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22438       new_path=`$CYGPATH -u "$path"`
22439     fi
22440     if test "x$new_path" = x; then
22441       # It's still not found. Now this is an unrecoverable error.
22442       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
22443 $as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
22444       has_space=`$ECHO "$complete" | $GREP " "`
22445       if test "x$has_space" != x; then
22446         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22447 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22448       fi
22449       as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
22450     fi
22451   fi
22452 
22453   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22454   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22455   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22456   # "foo.exe" is OK but "foo" is an error.
22457   #
22458   # This test is therefore slightly more accurate than "test -f" to check for file precense.
22459   # It is also a way to make sure we got the proper file name for the real test later on.
22460   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22461   if test "x$test_shortpath" = x; then
22462     # Short path failed, file does not exist as specified.
22463     # Try adding .exe or .cmd
22464     if test -f "${new_path}.exe"; then
22465        input_to_shortpath="${new_path}.exe"
22466     elif test -f "${new_path}.cmd"; then
22467        input_to_shortpath="${new_path}.cmd"
22468     else
22469       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$new_path\", is invalid." >&5
22470 $as_echo "$as_me: The path of AR, which resolves as \"$new_path\", is invalid." >&6;}
22471       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
22472 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
22473       as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
22474     fi
22475   else
22476     input_to_shortpath="$new_path"
22477   fi
22478 
22479   # Call helper function which possibly converts this using DOS-style short mode.
22480   # If so, the updated path is stored in $new_path.
22481   new_path="$input_to_shortpath"
22482 
22483   input_path="$input_to_shortpath"
22484   # Check if we need to convert this using DOS-style short mode. If the path
22485   # contains just simple characters, use it. Otherwise (spaces, weird characters),
22486   # take no chances and rewrite it.
22487   # Note: m4 eats our [], so we need to use [ and ] instead.
22488   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22489   if test "x$has_forbidden_chars" != x; then
22490     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22491     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22492     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22493     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22494       # Going to short mode and back again did indeed matter. Since short mode is
22495       # case insensitive, let's make it lowercase to improve readability.
22496       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22497       # Now convert it back to Unix-stile (cygpath)
22498       input_path=`$CYGPATH -u "$shortmode_path"`
22499       new_path="$input_path"
22500     fi
22501   fi
22502 
22503   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22504   if test "x$test_cygdrive_prefix" = x; then
22505     # As a simple fix, exclude /usr/bin since it's not a real path.
22506     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
22507       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22508       # a path prefixed by /cygdrive for fixpath to work.
22509       new_path="$CYGWIN_ROOT_PATH$input_path"
22510     fi
22511   fi
22512 
22513   # remove trailing .exe if any
22514   new_path="${new_path/%.exe/}"
22515 
22516   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22517 
22518   # First separate the path from the arguments. This will split at the first
22519   # space.
22520   complete="$AR"
22521   path="${complete%% *}"
22522   tmp="$complete EOL"
22523   arguments="${tmp#* }"
22524 
22525   # Input might be given as Windows format, start by converting to
22526   # unix format.
22527   new_path="$path"
22528 
22529   windows_path="$new_path"
22530   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22531     unix_path=`$CYGPATH -u "$windows_path"`
22532     new_path="$unix_path"
22533   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22534     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22535     new_path="$unix_path"
22536   fi
22537 
22538 
22539   # Now try to locate executable using which
22540   new_path=`$WHICH "$new_path" 2> /dev/null`
22541 
22542   if test "x$new_path" = x; then
22543     # Oops. Which didn't find the executable.
22544     # The splitting of arguments from the executable at a space might have been incorrect,
22545     # since paths with space are more likely in Windows. Give it another try with the whole
22546     # argument.
22547     path="$complete"
22548     arguments="EOL"
22549     new_path="$path"
22550 
22551   windows_path="$new_path"
22552   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22553     unix_path=`$CYGPATH -u "$windows_path"`
22554     new_path="$unix_path"
22555   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22556     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22557     new_path="$unix_path"
22558   fi
22559 
22560 
22561     new_path=`$WHICH "$new_path" 2> /dev/null`
22562 
22563     if test "x$new_path" = x; then
22564       # It's still not found. Now this is an unrecoverable error.
22565       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
22566 $as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
22567       has_space=`$ECHO "$complete" | $GREP " "`
22568       if test "x$has_space" != x; then
22569         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22570 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22571       fi
22572       as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
22573     fi
22574   fi
22575 
22576   # Now new_path has a complete unix path to the binary
22577   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
22578     # Keep paths in /bin as-is, but remove trailing .exe if any
22579     new_path="${new_path/%.exe/}"
22580     # Do not save /bin paths to all_fixpath_prefixes!
22581   else
22582     # Not in mixed or Windows style, start by that.
22583     new_path=`cmd //c echo $new_path`
22584 
22585   input_path="$new_path"
22586   # Check if we need to convert this using DOS-style short mode. If the path
22587   # contains just simple characters, use it. Otherwise (spaces, weird characters),
22588   # take no chances and rewrite it.
22589   # Note: m4 eats our [], so we need to use [ and ] instead.
22590   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22591   if test "x$has_forbidden_chars" != x; then
22592     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22593     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22594   fi
22595 
22596     # Output is in $new_path
22597 
22598   windows_path="$new_path"
22599   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22600     unix_path=`$CYGPATH -u "$windows_path"`
22601     new_path="$unix_path"
22602   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22603     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22604     new_path="$unix_path"
22605   fi
22606 
22607     # remove trailing .exe if any
22608     new_path="${new_path/%.exe/}"
22609 
22610     # Save the first 10 bytes of this path to the storage, so fixpath can work.
22611     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22612   fi
22613 
22614   else
22615     # We're on a posix platform. Hooray! :)
22616     # First separate the path from the arguments. This will split at the first
22617     # space.
22618     complete="$AR"
22619     path="${complete%% *}"
22620     tmp="$complete EOL"
22621     arguments="${tmp#* }"
22622 
22623     # Cannot rely on the command "which" here since it doesn't always work.
22624     is_absolute_path=`$ECHO "$path" | $GREP ^/`
22625     if test -z "$is_absolute_path"; then
22626       # Path to executable is not absolute. Find it.
22627       IFS_save="$IFS"
22628       IFS=:
22629       for p in $PATH; do
22630         if test -f "$p/$path" && test -x "$p/$path"; then
22631           new_path="$p/$path"
22632           break
22633         fi
22634       done
22635       IFS="$IFS_save"
22636     else
22637       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving AR (as $path) failed, using $path directly." >&5
22638 $as_echo "$as_me: Resolving AR (as $path) failed, using $path directly." >&6;}
22639       new_path="$path"
22640     fi
22641 
22642     if test "x$new_path" = x; then
22643         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
22644 $as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
22645         has_space=`$ECHO "$complete" | $GREP " "`
22646         if test "x$has_space" != x; then
22647           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
22648 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
22649         fi
22650         as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
22651       fi
22652   fi
22653 
22654       # Now join together the path and the arguments once again
22655       if test "x$arguments" != xEOL; then
22656         new_complete="$new_path ${arguments% *}"
22657       else
22658         new_complete="$new_path"
22659       fi
22660 
22661   if test "x$complete" != "x$new_complete"; then
22662       AR="$new_complete"
22663       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AR to \"$new_complete\"" >&5
22664 $as_echo "$as_me: Rewriting AR to \"$new_complete\"" >&6;}
22665     fi
22666 
22667 fi
22668 if test "x$OPENJDK_TARGET_OS" = xmacosx; then
22669     ARFLAGS="-r"
22670 else
22671     ARFLAGS=""
22672 fi
22673 
22674 
22675 # For hotspot, we need these in Windows mixed path; other platforms keep them the same
22676 HOTSPOT_CXX="$CXX"
22677 HOTSPOT_LD="$LD"
22678 
22679 
22680 
22681 COMPILER_NAME=gcc
22682 COMPILER_TYPE=CC
22683 if test "x$OPENJDK_TARGET_OS" = xwindows; then :
22684 
22685     # For now, assume that we are always compiling using cl.exe.
22686     CC_OUT_OPTION=-Fo
22687     EXE_OUT_OPTION=-out:
22688     LD_OUT_OPTION=-out:
22689     AR_OUT_OPTION=-out:
22690     # On Windows, reject /usr/bin/link (as determined in CYGWIN_LINK), which is a cygwin
22691     # program for something completely different.
22692     # Extract the first word of "link", so it can be a program name with args.
22693 set dummy link; ac_word=$2
22694 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22695 $as_echo_n "checking for $ac_word... " >&6; }
22696 if test "${ac_cv_prog_WINLD+set}" = set; then :
22697   $as_echo_n "(cached) " >&6
22698 else
22699   if test -n "$WINLD"; then
22700   ac_cv_prog_WINLD="$WINLD" # Let the user override the test.
22701 else
22702   ac_prog_rejected=no
22703 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22704 for as_dir in $PATH
22705 do
22706   IFS=$as_save_IFS
22707   test -z "$as_dir" && as_dir=.
22708     for ac_exec_ext in '' $ac_executable_extensions; do
22709   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
22710     if test "$as_dir/$ac_word$ac_exec_ext" = "$CYGWIN_LINK"; then
22711        ac_prog_rejected=yes
22712        continue
22713      fi
22714     ac_cv_prog_WINLD="link"
22715     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22716     break 2
22717   fi
22718 done
22719   done
22720 IFS=$as_save_IFS
22721 
22722 if test $ac_prog_rejected = yes; then
22723   # We found a bogon in the path, so make sure we never use it.
22724   set dummy $ac_cv_prog_WINLD
22725   shift
22726   if test $# != 0; then
22727     # We chose a different compiler from the bogus one.
22728     # However, it has the same basename, so the bogon will be chosen
22729     # first if we set WINLD to just the basename; use the full file name.
22730     shift
22731     ac_cv_prog_WINLD="$as_dir/$ac_word${1+' '}$@"
22732   fi
22733 fi
22734 fi
22735 fi
22736 WINLD=$ac_cv_prog_WINLD
22737 if test -n "$WINLD"; then
22738   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINLD" >&5
22739 $as_echo "$WINLD" >&6; }
22740 else
22741   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22742 $as_echo "no" >&6; }
22743 fi
22744 
22745 
22746     # Since we must ignore the first found link, WINLD will contain
22747     # the full path to the link.exe program.
22748 
22749   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22750 
22751   # First separate the path from the arguments. This will split at the first
22752   # space.
22753   complete="$WINLD"
22754   path="${complete%% *}"
22755   tmp="$complete EOL"
22756   arguments="${tmp#* }"
22757 
22758   # Input might be given as Windows format, start by converting to
22759   # unix format.
22760   new_path=`$CYGPATH -u "$path"`
22761 
22762   # Now try to locate executable using which
22763   new_path=`$WHICH "$new_path" 2> /dev/null`
22764   # bat and cmd files are not always considered executable in cygwin causing which
22765   # to not find them
22766   if test "x$new_path" = x \
22767            && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22768            && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22769     new_path=`$CYGPATH -u "$path"`
22770   fi
22771   if test "x$new_path" = x; then
22772     # Oops. Which didn't find the executable.
22773     # The splitting of arguments from the executable at a space might have been incorrect,
22774     # since paths with space are more likely in Windows. Give it another try with the whole
22775     # argument.
22776     path="$complete"
22777     arguments="EOL"
22778     new_path=`$CYGPATH -u "$path"`
22779     new_path=`$WHICH "$new_path" 2> /dev/null`
22780     # bat and cmd files are not always considered executable in cygwin causing which
22781     # to not find them
22782     if test "x$new_path" = x \
22783              && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22784              && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22785       new_path=`$CYGPATH -u "$path"`
22786     fi
22787     if test "x$new_path" = x; then
22788       # It's still not found. Now this is an unrecoverable error.
22789       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$complete\", is not found." >&5
22790 $as_echo "$as_me: The path of WINLD, which resolves as \"$complete\", is not found." >&6;}
22791       has_space=`$ECHO "$complete" | $GREP " "`
22792       if test "x$has_space" != x; then
22793         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22794 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22795       fi
22796       as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
22797     fi
22798   fi
22799 
22800   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22801   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22802   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22803   # "foo.exe" is OK but "foo" is an error.
22804   #
22805   # This test is therefore slightly more accurate than "test -f" to check for file precense.
22806   # It is also a way to make sure we got the proper file name for the real test later on.
22807   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22808   if test "x$test_shortpath" = x; then
22809     # Short path failed, file does not exist as specified.
22810     # Try adding .exe or .cmd
22811     if test -f "${new_path}.exe"; then
22812        input_to_shortpath="${new_path}.exe"
22813     elif test -f "${new_path}.cmd"; then
22814        input_to_shortpath="${new_path}.cmd"
22815     else
22816       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$new_path\", is invalid." >&5
22817 $as_echo "$as_me: The path of WINLD, which resolves as \"$new_path\", is invalid." >&6;}
22818       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
22819 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
22820       as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
22821     fi
22822   else
22823     input_to_shortpath="$new_path"
22824   fi
22825 
22826   # Call helper function which possibly converts this using DOS-style short mode.
22827   # If so, the updated path is stored in $new_path.
22828   new_path="$input_to_shortpath"
22829 
22830   input_path="$input_to_shortpath"
22831   # Check if we need to convert this using DOS-style short mode. If the path
22832   # contains just simple characters, use it. Otherwise (spaces, weird characters),
22833   # take no chances and rewrite it.
22834   # Note: m4 eats our [], so we need to use [ and ] instead.
22835   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22836   if test "x$has_forbidden_chars" != x; then
22837     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22838     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22839     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22840     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22841       # Going to short mode and back again did indeed matter. Since short mode is
22842       # case insensitive, let's make it lowercase to improve readability.
22843       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22844       # Now convert it back to Unix-stile (cygpath)
22845       input_path=`$CYGPATH -u "$shortmode_path"`
22846       new_path="$input_path"
22847     fi
22848   fi
22849 
22850   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22851   if test "x$test_cygdrive_prefix" = x; then
22852     # As a simple fix, exclude /usr/bin since it's not a real path.
22853     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
22854       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22855       # a path prefixed by /cygdrive for fixpath to work.
22856       new_path="$CYGWIN_ROOT_PATH$input_path"
22857     fi
22858   fi
22859 
22860   # remove trailing .exe if any
22861   new_path="${new_path/%.exe/}"
22862 
22863   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22864 
22865   # First separate the path from the arguments. This will split at the first
22866   # space.
22867   complete="$WINLD"
22868   path="${complete%% *}"
22869   tmp="$complete EOL"
22870   arguments="${tmp#* }"
22871 
22872   # Input might be given as Windows format, start by converting to
22873   # unix format.
22874   new_path="$path"
22875 
22876   windows_path="$new_path"
22877   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22878     unix_path=`$CYGPATH -u "$windows_path"`
22879     new_path="$unix_path"
22880   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22881     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22882     new_path="$unix_path"
22883   fi
22884 
22885 
22886   # Now try to locate executable using which
22887   new_path=`$WHICH "$new_path" 2> /dev/null`
22888 
22889   if test "x$new_path" = x; then
22890     # Oops. Which didn't find the executable.
22891     # The splitting of arguments from the executable at a space might have been incorrect,
22892     # since paths with space are more likely in Windows. Give it another try with the whole
22893     # argument.
22894     path="$complete"
22895     arguments="EOL"
22896     new_path="$path"
22897 
22898   windows_path="$new_path"
22899   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22900     unix_path=`$CYGPATH -u "$windows_path"`
22901     new_path="$unix_path"
22902   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22903     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22904     new_path="$unix_path"
22905   fi
22906 
22907 
22908     new_path=`$WHICH "$new_path" 2> /dev/null`
22909 
22910     if test "x$new_path" = x; then
22911       # It's still not found. Now this is an unrecoverable error.
22912       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$complete\", is not found." >&5
22913 $as_echo "$as_me: The path of WINLD, which resolves as \"$complete\", is not found." >&6;}
22914       has_space=`$ECHO "$complete" | $GREP " "`
22915       if test "x$has_space" != x; then
22916         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22917 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22918       fi
22919       as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
22920     fi
22921   fi
22922 
22923   # Now new_path has a complete unix path to the binary
22924   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
22925     # Keep paths in /bin as-is, but remove trailing .exe if any
22926     new_path="${new_path/%.exe/}"
22927     # Do not save /bin paths to all_fixpath_prefixes!
22928   else
22929     # Not in mixed or Windows style, start by that.
22930     new_path=`cmd //c echo $new_path`
22931 
22932   input_path="$new_path"
22933   # Check if we need to convert this using DOS-style short mode. If the path
22934   # contains just simple characters, use it. Otherwise (spaces, weird characters),
22935   # take no chances and rewrite it.
22936   # Note: m4 eats our [], so we need to use [ and ] instead.
22937   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22938   if test "x$has_forbidden_chars" != x; then
22939     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22940     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22941   fi
22942 
22943     # Output is in $new_path
22944 
22945   windows_path="$new_path"
22946   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22947     unix_path=`$CYGPATH -u "$windows_path"`
22948     new_path="$unix_path"
22949   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22950     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22951     new_path="$unix_path"
22952   fi
22953 
22954     # remove trailing .exe if any
22955     new_path="${new_path/%.exe/}"
22956 
22957     # Save the first 10 bytes of this path to the storage, so fixpath can work.
22958     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22959   fi
22960 
22961   else
22962     # We're on a posix platform. Hooray! :)
22963     # First separate the path from the arguments. This will split at the first
22964     # space.
22965     complete="$WINLD"
22966     path="${complete%% *}"
22967     tmp="$complete EOL"
22968     arguments="${tmp#* }"
22969 
22970     # Cannot rely on the command "which" here since it doesn't always work.
22971     is_absolute_path=`$ECHO "$path" | $GREP ^/`
22972     if test -z "$is_absolute_path"; then
22973       # Path to executable is not absolute. Find it.
22974       IFS_save="$IFS"
22975       IFS=:
22976       for p in $PATH; do
22977         if test -f "$p/$path" && test -x "$p/$path"; then
22978           new_path="$p/$path"
22979           break
22980         fi
22981       done
22982       IFS="$IFS_save"
22983     else
22984       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving WINLD (as $path) failed, using $path directly." >&5
22985 $as_echo "$as_me: Resolving WINLD (as $path) failed, using $path directly." >&6;}
22986       new_path="$path"
22987     fi
22988 
22989     if test "x$new_path" = x; then
22990         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$complete\", is not found." >&5
22991 $as_echo "$as_me: The path of WINLD, which resolves as \"$complete\", is not found." >&6;}
22992         has_space=`$ECHO "$complete" | $GREP " "`
22993         if test "x$has_space" != x; then
22994           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
22995 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
22996         fi
22997         as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
22998       fi
22999   fi
23000 
23001       # Now join together the path and the arguments once again
23002       if test "x$arguments" != xEOL; then
23003         new_complete="$new_path ${arguments% *}"
23004       else
23005         new_complete="$new_path"
23006       fi
23007 
23008   if test "x$complete" != "x$new_complete"; then
23009       WINLD="$new_complete"
23010       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting WINLD to \"$new_complete\"" >&5
23011 $as_echo "$as_me: Rewriting WINLD to \"$new_complete\"" >&6;}
23012     fi
23013 
23014     printf "Windows linker was found at $WINLD\n"
23015     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the found link.exe is actually the Visual Studio linker" >&5
23016 $as_echo_n "checking if the found link.exe is actually the Visual Studio linker... " >&6; }
23017     "$WINLD" --version > /dev/null
23018     if test $? -eq 0 ; then
23019       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23020 $as_echo "no" >&6; }
23021       as_fn_error $? "This is the Cygwin link tool. Please check your PATH and rerun configure." "$LINENO" 5
23022     else
23023       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
23024 $as_echo "yes" >&6; }
23025     fi
23026     LD="$WINLD"
23027     LDEXE="$WINLD"
23028     LDCXX="$WINLD"
23029     LDEXECXX="$WINLD"
23030 
23031     # Extract the first word of "mt", so it can be a program name with args.
23032 set dummy mt; ac_word=$2
23033 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23034 $as_echo_n "checking for $ac_word... " >&6; }
23035 if test "${ac_cv_prog_MT+set}" = set; then :
23036   $as_echo_n "(cached) " >&6
23037 else
23038   if test -n "$MT"; then
23039   ac_cv_prog_MT="$MT" # Let the user override the test.
23040 else
23041   ac_prog_rejected=no
23042 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23043 for as_dir in $PATH
23044 do
23045   IFS=$as_save_IFS
23046   test -z "$as_dir" && as_dir=.
23047     for ac_exec_ext in '' $ac_executable_extensions; do
23048   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
23049     if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/mt"; then
23050        ac_prog_rejected=yes
23051        continue
23052      fi
23053     ac_cv_prog_MT="mt"
23054     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23055     break 2
23056   fi
23057 done
23058   done
23059 IFS=$as_save_IFS
23060 
23061 if test $ac_prog_rejected = yes; then
23062   # We found a bogon in the path, so make sure we never use it.
23063   set dummy $ac_cv_prog_MT
23064   shift
23065   if test $# != 0; then
23066     # We chose a different compiler from the bogus one.
23067     # However, it has the same basename, so the bogon will be chosen
23068     # first if we set MT to just the basename; use the full file name.
23069     shift
23070     ac_cv_prog_MT="$as_dir/$ac_word${1+' '}$@"
23071   fi
23072 fi
23073 fi
23074 fi
23075 MT=$ac_cv_prog_MT
23076 if test -n "$MT"; then
23077   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MT" >&5
23078 $as_echo "$MT" >&6; }
23079 else
23080   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23081 $as_echo "no" >&6; }
23082 fi
23083 
23084 
23085 
23086   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23087 
23088   # First separate the path from the arguments. This will split at the first
23089   # space.
23090   complete="$MT"
23091   path="${complete%% *}"
23092   tmp="$complete EOL"
23093   arguments="${tmp#* }"
23094 
23095   # Input might be given as Windows format, start by converting to
23096   # unix format.
23097   new_path=`$CYGPATH -u "$path"`
23098 
23099   # Now try to locate executable using which
23100   new_path=`$WHICH "$new_path" 2> /dev/null`
23101   # bat and cmd files are not always considered executable in cygwin causing which
23102   # to not find them
23103   if test "x$new_path" = x \
23104            && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23105            && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23106     new_path=`$CYGPATH -u "$path"`
23107   fi
23108   if test "x$new_path" = x; then
23109     # Oops. Which didn't find the executable.
23110     # The splitting of arguments from the executable at a space might have been incorrect,
23111     # since paths with space are more likely in Windows. Give it another try with the whole
23112     # argument.
23113     path="$complete"
23114     arguments="EOL"
23115     new_path=`$CYGPATH -u "$path"`
23116     new_path=`$WHICH "$new_path" 2> /dev/null`
23117     # bat and cmd files are not always considered executable in cygwin causing which
23118     # to not find them
23119     if test "x$new_path" = x \
23120              && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23121              && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23122       new_path=`$CYGPATH -u "$path"`
23123     fi
23124     if test "x$new_path" = x; then
23125       # It's still not found. Now this is an unrecoverable error.
23126       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
23127 $as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
23128       has_space=`$ECHO "$complete" | $GREP " "`
23129       if test "x$has_space" != x; then
23130         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23131 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23132       fi
23133       as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
23134     fi
23135   fi
23136 
23137   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23138   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23139   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23140   # "foo.exe" is OK but "foo" is an error.
23141   #
23142   # This test is therefore slightly more accurate than "test -f" to check for file precense.
23143   # It is also a way to make sure we got the proper file name for the real test later on.
23144   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23145   if test "x$test_shortpath" = x; then
23146     # Short path failed, file does not exist as specified.
23147     # Try adding .exe or .cmd
23148     if test -f "${new_path}.exe"; then
23149        input_to_shortpath="${new_path}.exe"
23150     elif test -f "${new_path}.cmd"; then
23151        input_to_shortpath="${new_path}.cmd"
23152     else
23153       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$new_path\", is invalid." >&5
23154 $as_echo "$as_me: The path of MT, which resolves as \"$new_path\", is invalid." >&6;}
23155       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
23156 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
23157       as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
23158     fi
23159   else
23160     input_to_shortpath="$new_path"
23161   fi
23162 
23163   # Call helper function which possibly converts this using DOS-style short mode.
23164   # If so, the updated path is stored in $new_path.
23165   new_path="$input_to_shortpath"
23166 
23167   input_path="$input_to_shortpath"
23168   # Check if we need to convert this using DOS-style short mode. If the path
23169   # contains just simple characters, use it. Otherwise (spaces, weird characters),
23170   # take no chances and rewrite it.
23171   # Note: m4 eats our [], so we need to use [ and ] instead.
23172   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23173   if test "x$has_forbidden_chars" != x; then
23174     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23175     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23176     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23177     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23178       # Going to short mode and back again did indeed matter. Since short mode is
23179       # case insensitive, let's make it lowercase to improve readability.
23180       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23181       # Now convert it back to Unix-stile (cygpath)
23182       input_path=`$CYGPATH -u "$shortmode_path"`
23183       new_path="$input_path"
23184     fi
23185   fi
23186 
23187   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23188   if test "x$test_cygdrive_prefix" = x; then
23189     # As a simple fix, exclude /usr/bin since it's not a real path.
23190     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
23191       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23192       # a path prefixed by /cygdrive for fixpath to work.
23193       new_path="$CYGWIN_ROOT_PATH$input_path"
23194     fi
23195   fi
23196 
23197   # remove trailing .exe if any
23198   new_path="${new_path/%.exe/}"
23199 
23200   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23201 
23202   # First separate the path from the arguments. This will split at the first
23203   # space.
23204   complete="$MT"
23205   path="${complete%% *}"
23206   tmp="$complete EOL"
23207   arguments="${tmp#* }"
23208 
23209   # Input might be given as Windows format, start by converting to
23210   # unix format.
23211   new_path="$path"
23212 
23213   windows_path="$new_path"
23214   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23215     unix_path=`$CYGPATH -u "$windows_path"`
23216     new_path="$unix_path"
23217   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23218     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23219     new_path="$unix_path"
23220   fi
23221 
23222 
23223   # Now try to locate executable using which
23224   new_path=`$WHICH "$new_path" 2> /dev/null`
23225 
23226   if test "x$new_path" = x; then
23227     # Oops. Which didn't find the executable.
23228     # The splitting of arguments from the executable at a space might have been incorrect,
23229     # since paths with space are more likely in Windows. Give it another try with the whole
23230     # argument.
23231     path="$complete"
23232     arguments="EOL"
23233     new_path="$path"
23234 
23235   windows_path="$new_path"
23236   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23237     unix_path=`$CYGPATH -u "$windows_path"`
23238     new_path="$unix_path"
23239   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23240     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23241     new_path="$unix_path"
23242   fi
23243 
23244 
23245     new_path=`$WHICH "$new_path" 2> /dev/null`
23246 
23247     if test "x$new_path" = x; then
23248       # It's still not found. Now this is an unrecoverable error.
23249       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
23250 $as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
23251       has_space=`$ECHO "$complete" | $GREP " "`
23252       if test "x$has_space" != x; then
23253         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23254 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23255       fi
23256       as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
23257     fi
23258   fi
23259 
23260   # Now new_path has a complete unix path to the binary
23261   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
23262     # Keep paths in /bin as-is, but remove trailing .exe if any
23263     new_path="${new_path/%.exe/}"
23264     # Do not save /bin paths to all_fixpath_prefixes!
23265   else
23266     # Not in mixed or Windows style, start by that.
23267     new_path=`cmd //c echo $new_path`
23268 
23269   input_path="$new_path"
23270   # Check if we need to convert this using DOS-style short mode. If the path
23271   # contains just simple characters, use it. Otherwise (spaces, weird characters),
23272   # take no chances and rewrite it.
23273   # Note: m4 eats our [], so we need to use [ and ] instead.
23274   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23275   if test "x$has_forbidden_chars" != x; then
23276     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23277     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23278   fi
23279 
23280     # Output is in $new_path
23281 
23282   windows_path="$new_path"
23283   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23284     unix_path=`$CYGPATH -u "$windows_path"`
23285     new_path="$unix_path"
23286   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23287     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23288     new_path="$unix_path"
23289   fi
23290 
23291     # remove trailing .exe if any
23292     new_path="${new_path/%.exe/}"
23293 
23294     # Save the first 10 bytes of this path to the storage, so fixpath can work.
23295     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23296   fi
23297 
23298   else
23299     # We're on a posix platform. Hooray! :)
23300     # First separate the path from the arguments. This will split at the first
23301     # space.
23302     complete="$MT"
23303     path="${complete%% *}"
23304     tmp="$complete EOL"
23305     arguments="${tmp#* }"
23306 
23307     # Cannot rely on the command "which" here since it doesn't always work.
23308     is_absolute_path=`$ECHO "$path" | $GREP ^/`
23309     if test -z "$is_absolute_path"; then
23310       # Path to executable is not absolute. Find it.
23311       IFS_save="$IFS"
23312       IFS=:
23313       for p in $PATH; do
23314         if test -f "$p/$path" && test -x "$p/$path"; then
23315           new_path="$p/$path"
23316           break
23317         fi
23318       done
23319       IFS="$IFS_save"
23320     else
23321       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving MT (as $path) failed, using $path directly." >&5
23322 $as_echo "$as_me: Resolving MT (as $path) failed, using $path directly." >&6;}
23323       new_path="$path"
23324     fi
23325 
23326     if test "x$new_path" = x; then
23327         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
23328 $as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
23329         has_space=`$ECHO "$complete" | $GREP " "`
23330         if test "x$has_space" != x; then
23331           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
23332 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
23333         fi
23334         as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
23335       fi
23336   fi
23337 
23338       # Now join together the path and the arguments once again
23339       if test "x$arguments" != xEOL; then
23340         new_complete="$new_path ${arguments% *}"
23341       else
23342         new_complete="$new_path"
23343       fi
23344 
23345   if test "x$complete" != "x$new_complete"; then
23346       MT="$new_complete"
23347       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MT to \"$new_complete\"" >&5
23348 $as_echo "$as_me: Rewriting MT to \"$new_complete\"" >&6;}
23349     fi
23350 
23351     # The resource compiler
23352     # Extract the first word of "rc", so it can be a program name with args.
23353 set dummy rc; ac_word=$2
23354 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23355 $as_echo_n "checking for $ac_word... " >&6; }
23356 if test "${ac_cv_prog_RC+set}" = set; then :
23357   $as_echo_n "(cached) " >&6
23358 else
23359   if test -n "$RC"; then
23360   ac_cv_prog_RC="$RC" # Let the user override the test.
23361 else
23362   ac_prog_rejected=no
23363 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23364 for as_dir in $PATH
23365 do
23366   IFS=$as_save_IFS
23367   test -z "$as_dir" && as_dir=.
23368     for ac_exec_ext in '' $ac_executable_extensions; do
23369   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
23370     if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/rc"; then
23371        ac_prog_rejected=yes
23372        continue
23373      fi
23374     ac_cv_prog_RC="rc"
23375     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23376     break 2
23377   fi
23378 done
23379   done
23380 IFS=$as_save_IFS
23381 
23382 if test $ac_prog_rejected = yes; then
23383   # We found a bogon in the path, so make sure we never use it.
23384   set dummy $ac_cv_prog_RC
23385   shift
23386   if test $# != 0; then
23387     # We chose a different compiler from the bogus one.
23388     # However, it has the same basename, so the bogon will be chosen
23389     # first if we set RC to just the basename; use the full file name.
23390     shift
23391     ac_cv_prog_RC="$as_dir/$ac_word${1+' '}$@"
23392   fi
23393 fi
23394 fi
23395 fi
23396 RC=$ac_cv_prog_RC
23397 if test -n "$RC"; then
23398   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RC" >&5
23399 $as_echo "$RC" >&6; }
23400 else
23401   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23402 $as_echo "no" >&6; }
23403 fi
23404 
23405 
23406 
23407   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23408 
23409   # First separate the path from the arguments. This will split at the first
23410   # space.
23411   complete="$RC"
23412   path="${complete%% *}"
23413   tmp="$complete EOL"
23414   arguments="${tmp#* }"
23415 
23416   # Input might be given as Windows format, start by converting to
23417   # unix format.
23418   new_path=`$CYGPATH -u "$path"`
23419 
23420   # Now try to locate executable using which
23421   new_path=`$WHICH "$new_path" 2> /dev/null`
23422   # bat and cmd files are not always considered executable in cygwin causing which
23423   # to not find them
23424   if test "x$new_path" = x \
23425            && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23426            && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23427     new_path=`$CYGPATH -u "$path"`
23428   fi
23429   if test "x$new_path" = x; then
23430     # Oops. Which didn't find the executable.
23431     # The splitting of arguments from the executable at a space might have been incorrect,
23432     # since paths with space are more likely in Windows. Give it another try with the whole
23433     # argument.
23434     path="$complete"
23435     arguments="EOL"
23436     new_path=`$CYGPATH -u "$path"`
23437     new_path=`$WHICH "$new_path" 2> /dev/null`
23438     # bat and cmd files are not always considered executable in cygwin causing which
23439     # to not find them
23440     if test "x$new_path" = x \
23441              && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23442              && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23443       new_path=`$CYGPATH -u "$path"`
23444     fi
23445     if test "x$new_path" = x; then
23446       # It's still not found. Now this is an unrecoverable error.
23447       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
23448 $as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
23449       has_space=`$ECHO "$complete" | $GREP " "`
23450       if test "x$has_space" != x; then
23451         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23452 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23453       fi
23454       as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
23455     fi
23456   fi
23457 
23458   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23459   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23460   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23461   # "foo.exe" is OK but "foo" is an error.
23462   #
23463   # This test is therefore slightly more accurate than "test -f" to check for file precense.
23464   # It is also a way to make sure we got the proper file name for the real test later on.
23465   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23466   if test "x$test_shortpath" = x; then
23467     # Short path failed, file does not exist as specified.
23468     # Try adding .exe or .cmd
23469     if test -f "${new_path}.exe"; then
23470        input_to_shortpath="${new_path}.exe"
23471     elif test -f "${new_path}.cmd"; then
23472        input_to_shortpath="${new_path}.cmd"
23473     else
23474       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$new_path\", is invalid." >&5
23475 $as_echo "$as_me: The path of RC, which resolves as \"$new_path\", is invalid." >&6;}
23476       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
23477 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
23478       as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
23479     fi
23480   else
23481     input_to_shortpath="$new_path"
23482   fi
23483 
23484   # Call helper function which possibly converts this using DOS-style short mode.
23485   # If so, the updated path is stored in $new_path.
23486   new_path="$input_to_shortpath"
23487 
23488   input_path="$input_to_shortpath"
23489   # Check if we need to convert this using DOS-style short mode. If the path
23490   # contains just simple characters, use it. Otherwise (spaces, weird characters),
23491   # take no chances and rewrite it.
23492   # Note: m4 eats our [], so we need to use [ and ] instead.
23493   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23494   if test "x$has_forbidden_chars" != x; then
23495     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23496     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23497     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23498     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23499       # Going to short mode and back again did indeed matter. Since short mode is
23500       # case insensitive, let's make it lowercase to improve readability.
23501       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23502       # Now convert it back to Unix-stile (cygpath)
23503       input_path=`$CYGPATH -u "$shortmode_path"`
23504       new_path="$input_path"
23505     fi
23506   fi
23507 
23508   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23509   if test "x$test_cygdrive_prefix" = x; then
23510     # As a simple fix, exclude /usr/bin since it's not a real path.
23511     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
23512       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23513       # a path prefixed by /cygdrive for fixpath to work.
23514       new_path="$CYGWIN_ROOT_PATH$input_path"
23515     fi
23516   fi
23517 
23518   # remove trailing .exe if any
23519   new_path="${new_path/%.exe/}"
23520 
23521   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23522 
23523   # First separate the path from the arguments. This will split at the first
23524   # space.
23525   complete="$RC"
23526   path="${complete%% *}"
23527   tmp="$complete EOL"
23528   arguments="${tmp#* }"
23529 
23530   # Input might be given as Windows format, start by converting to
23531   # unix format.
23532   new_path="$path"
23533 
23534   windows_path="$new_path"
23535   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23536     unix_path=`$CYGPATH -u "$windows_path"`
23537     new_path="$unix_path"
23538   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23539     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23540     new_path="$unix_path"
23541   fi
23542 
23543 
23544   # Now try to locate executable using which
23545   new_path=`$WHICH "$new_path" 2> /dev/null`
23546 
23547   if test "x$new_path" = x; then
23548     # Oops. Which didn't find the executable.
23549     # The splitting of arguments from the executable at a space might have been incorrect,
23550     # since paths with space are more likely in Windows. Give it another try with the whole
23551     # argument.
23552     path="$complete"
23553     arguments="EOL"
23554     new_path="$path"
23555 
23556   windows_path="$new_path"
23557   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23558     unix_path=`$CYGPATH -u "$windows_path"`
23559     new_path="$unix_path"
23560   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23561     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23562     new_path="$unix_path"
23563   fi
23564 
23565 
23566     new_path=`$WHICH "$new_path" 2> /dev/null`
23567 
23568     if test "x$new_path" = x; then
23569       # It's still not found. Now this is an unrecoverable error.
23570       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
23571 $as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
23572       has_space=`$ECHO "$complete" | $GREP " "`
23573       if test "x$has_space" != x; then
23574         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23575 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23576       fi
23577       as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
23578     fi
23579   fi
23580 
23581   # Now new_path has a complete unix path to the binary
23582   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
23583     # Keep paths in /bin as-is, but remove trailing .exe if any
23584     new_path="${new_path/%.exe/}"
23585     # Do not save /bin paths to all_fixpath_prefixes!
23586   else
23587     # Not in mixed or Windows style, start by that.
23588     new_path=`cmd //c echo $new_path`
23589 
23590   input_path="$new_path"
23591   # Check if we need to convert this using DOS-style short mode. If the path
23592   # contains just simple characters, use it. Otherwise (spaces, weird characters),
23593   # take no chances and rewrite it.
23594   # Note: m4 eats our [], so we need to use [ and ] instead.
23595   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23596   if test "x$has_forbidden_chars" != x; then
23597     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23598     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23599   fi
23600 
23601     # Output is in $new_path
23602 
23603   windows_path="$new_path"
23604   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23605     unix_path=`$CYGPATH -u "$windows_path"`
23606     new_path="$unix_path"
23607   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23608     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23609     new_path="$unix_path"
23610   fi
23611 
23612     # remove trailing .exe if any
23613     new_path="${new_path/%.exe/}"
23614 
23615     # Save the first 10 bytes of this path to the storage, so fixpath can work.
23616     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23617   fi
23618 
23619   else
23620     # We're on a posix platform. Hooray! :)
23621     # First separate the path from the arguments. This will split at the first
23622     # space.
23623     complete="$RC"
23624     path="${complete%% *}"
23625     tmp="$complete EOL"
23626     arguments="${tmp#* }"
23627 
23628     # Cannot rely on the command "which" here since it doesn't always work.
23629     is_absolute_path=`$ECHO "$path" | $GREP ^/`
23630     if test -z "$is_absolute_path"; then
23631       # Path to executable is not absolute. Find it.
23632       IFS_save="$IFS"
23633       IFS=:
23634       for p in $PATH; do
23635         if test -f "$p/$path" && test -x "$p/$path"; then
23636           new_path="$p/$path"
23637           break
23638         fi
23639       done
23640       IFS="$IFS_save"
23641     else
23642       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving RC (as $path) failed, using $path directly." >&5
23643 $as_echo "$as_me: Resolving RC (as $path) failed, using $path directly." >&6;}
23644       new_path="$path"
23645     fi
23646 
23647     if test "x$new_path" = x; then
23648         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
23649 $as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
23650         has_space=`$ECHO "$complete" | $GREP " "`
23651         if test "x$has_space" != x; then
23652           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
23653 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
23654         fi
23655         as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
23656       fi
23657   fi
23658 
23659       # Now join together the path and the arguments once again
23660       if test "x$arguments" != xEOL; then
23661         new_complete="$new_path ${arguments% *}"
23662       else
23663         new_complete="$new_path"
23664       fi
23665 
23666   if test "x$complete" != "x$new_complete"; then
23667       RC="$new_complete"
23668       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting RC to \"$new_complete\"" >&5
23669 $as_echo "$as_me: Rewriting RC to \"$new_complete\"" >&6;}
23670     fi
23671 
23672 
23673     # For hotspot, we need these in Windows mixed path,
23674     # so rewrite them all. Need added .exe suffix.
23675     HOTSPOT_CXX="$CXX.exe"
23676     HOTSPOT_LD="$LD.exe"
23677     HOTSPOT_MT="$MT.exe"
23678     HOTSPOT_RC="$RC.exe"
23679 
23680   unix_path="$HOTSPOT_CXX"
23681   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23682     windows_path=`$CYGPATH -m "$unix_path"`
23683     HOTSPOT_CXX="$windows_path"
23684   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23685     windows_path=`cmd //c echo $unix_path`
23686     HOTSPOT_CXX="$windows_path"
23687   fi
23688 
23689 
23690   unix_path="$HOTSPOT_LD"
23691   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23692     windows_path=`$CYGPATH -m "$unix_path"`
23693     HOTSPOT_LD="$windows_path"
23694   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23695     windows_path=`cmd //c echo $unix_path`
23696     HOTSPOT_LD="$windows_path"
23697   fi
23698 
23699 
23700   unix_path="$HOTSPOT_MT"
23701   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23702     windows_path=`$CYGPATH -m "$unix_path"`
23703     HOTSPOT_MT="$windows_path"
23704   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23705     windows_path=`cmd //c echo $unix_path`
23706     HOTSPOT_MT="$windows_path"
23707   fi
23708 
23709 
23710   unix_path="$HOTSPOT_RC"
23711   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23712     windows_path=`$CYGPATH -m "$unix_path"`
23713     HOTSPOT_RC="$windows_path"
23714   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23715     windows_path=`cmd //c echo $unix_path`
23716     HOTSPOT_RC="$windows_path"
23717   fi
23718 
23719 
23720 
23721 
23722     RC_FLAGS="-nologo -l 0x409 -r"
23723     if test "x$VARIANT" = xOPT; then :
23724 
23725         RC_FLAGS="$RC_FLAGS -d NDEBUG"
23726 
23727 fi
23728     JDK_UPDATE_VERSION_NOTNULL=$JDK_UPDATE_VERSION
23729     if test "x$JDK_UPDATE_VERSION" = x; then :
23730 
23731         JDK_UPDATE_VERSION_NOTNULL=0
23732 
23733 fi
23734     RC_FLAGS="$RC_FLAGS -d \"JDK_BUILD_ID=$FULL_VERSION\""
23735     RC_FLAGS="$RC_FLAGS -d \"JDK_COMPANY=$COMPANY_NAME\""
23736     RC_FLAGS="$RC_FLAGS -d \"JDK_COMPONENT=$PRODUCT_NAME $JDK_RC_PLATFORM_NAME binary\""
23737     RC_FLAGS="$RC_FLAGS -d \"JDK_VER=$JDK_MINOR_VERSION.$JDK_MICRO_VERSION.$JDK_UPDATE_VERSION_NOTNULL.$COOKED_BUILD_NUMBER\""
23738     RC_FLAGS="$RC_FLAGS -d \"JDK_COPYRIGHT=Copyright \xA9 $COPYRIGHT_YEAR\""
23739     RC_FLAGS="$RC_FLAGS -d \"JDK_NAME=$PRODUCT_NAME $JDK_RC_PLATFORM_NAME $JDK_MINOR_VERSION $JDK_UPDATE_META_TAG\""
23740     RC_FLAGS="$RC_FLAGS -d \"JDK_FVER=$JDK_MINOR_VERSION,$JDK_MICRO_VERSION,$JDK_UPDATE_VERSION_NOTNULL,$COOKED_BUILD_NUMBER\""
23741 
23742     # lib.exe is used to create static libraries.
23743     # Extract the first word of "lib", so it can be a program name with args.
23744 set dummy lib; ac_word=$2
23745 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23746 $as_echo_n "checking for $ac_word... " >&6; }
23747 if test "${ac_cv_prog_WINAR+set}" = set; then :
23748   $as_echo_n "(cached) " >&6
23749 else
23750   if test -n "$WINAR"; then
23751   ac_cv_prog_WINAR="$WINAR" # Let the user override the test.
23752 else
23753 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23754 for as_dir in $PATH
23755 do
23756   IFS=$as_save_IFS
23757   test -z "$as_dir" && as_dir=.
23758     for ac_exec_ext in '' $ac_executable_extensions; do
23759   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
23760     ac_cv_prog_WINAR="lib"
23761     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23762     break 2
23763   fi
23764 done
23765   done
23766 IFS=$as_save_IFS
23767 
23768 fi
23769 fi
23770 WINAR=$ac_cv_prog_WINAR
23771 if test -n "$WINAR"; then
23772   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINAR" >&5
23773 $as_echo "$WINAR" >&6; }
23774 else
23775   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23776 $as_echo "no" >&6; }
23777 fi
23778 
23779 
23780 
23781   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23782 
23783   # First separate the path from the arguments. This will split at the first
23784   # space.
23785   complete="$WINAR"
23786   path="${complete%% *}"
23787   tmp="$complete EOL"
23788   arguments="${tmp#* }"
23789 
23790   # Input might be given as Windows format, start by converting to
23791   # unix format.
23792   new_path=`$CYGPATH -u "$path"`
23793 
23794   # Now try to locate executable using which
23795   new_path=`$WHICH "$new_path" 2> /dev/null`
23796   # bat and cmd files are not always considered executable in cygwin causing which
23797   # to not find them
23798   if test "x$new_path" = x \
23799            && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23800            && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23801     new_path=`$CYGPATH -u "$path"`
23802   fi
23803   if test "x$new_path" = x; then
23804     # Oops. Which didn't find the executable.
23805     # The splitting of arguments from the executable at a space might have been incorrect,
23806     # since paths with space are more likely in Windows. Give it another try with the whole
23807     # argument.
23808     path="$complete"
23809     arguments="EOL"
23810     new_path=`$CYGPATH -u "$path"`
23811     new_path=`$WHICH "$new_path" 2> /dev/null`
23812     # bat and cmd files are not always considered executable in cygwin causing which
23813     # to not find them
23814     if test "x$new_path" = x \
23815              && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23816              && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23817       new_path=`$CYGPATH -u "$path"`
23818     fi
23819     if test "x$new_path" = x; then
23820       # It's still not found. Now this is an unrecoverable error.
23821       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$complete\", is not found." >&5
23822 $as_echo "$as_me: The path of WINAR, which resolves as \"$complete\", is not found." >&6;}
23823       has_space=`$ECHO "$complete" | $GREP " "`
23824       if test "x$has_space" != x; then
23825         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23826 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23827       fi
23828       as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5
23829     fi
23830   fi
23831 
23832   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23833   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23834   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23835   # "foo.exe" is OK but "foo" is an error.
23836   #
23837   # This test is therefore slightly more accurate than "test -f" to check for file precense.
23838   # It is also a way to make sure we got the proper file name for the real test later on.
23839   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23840   if test "x$test_shortpath" = x; then
23841     # Short path failed, file does not exist as specified.
23842     # Try adding .exe or .cmd
23843     if test -f "${new_path}.exe"; then
23844        input_to_shortpath="${new_path}.exe"
23845     elif test -f "${new_path}.cmd"; then
23846        input_to_shortpath="${new_path}.cmd"
23847     else
23848       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$new_path\", is invalid." >&5
23849 $as_echo "$as_me: The path of WINAR, which resolves as \"$new_path\", is invalid." >&6;}
23850       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
23851 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
23852       as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5
23853     fi
23854   else
23855     input_to_shortpath="$new_path"
23856   fi
23857 
23858   # Call helper function which possibly converts this using DOS-style short mode.
23859   # If so, the updated path is stored in $new_path.
23860   new_path="$input_to_shortpath"
23861 
23862   input_path="$input_to_shortpath"
23863   # Check if we need to convert this using DOS-style short mode. If the path
23864   # contains just simple characters, use it. Otherwise (spaces, weird characters),
23865   # take no chances and rewrite it.
23866   # Note: m4 eats our [], so we need to use [ and ] instead.
23867   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23868   if test "x$has_forbidden_chars" != x; then
23869     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23870     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23871     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23872     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23873       # Going to short mode and back again did indeed matter. Since short mode is
23874       # case insensitive, let's make it lowercase to improve readability.
23875       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23876       # Now convert it back to Unix-stile (cygpath)
23877       input_path=`$CYGPATH -u "$shortmode_path"`
23878       new_path="$input_path"
23879     fi
23880   fi
23881 
23882   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23883   if test "x$test_cygdrive_prefix" = x; then
23884     # As a sim