1 #! /bin/sh
   2 # Guess values for system-dependent variables and create Makefiles.
   3 # Generated by GNU Autoconf 2.68 for OpenJDK jdk8.
   4 #
   5 # Report bugs to <build-dev@openjdk.java.net>.
   6 #
   7 #
   8 # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
   9 # 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software
  10 # Foundation, Inc.
  11 #
  12 #
  13 # This configure script is free software; the Free Software Foundation
  14 # gives unlimited permission to copy, distribute and modify it.
  15 ## -------------------- ##
  16 ## M4sh Initialization. ##
  17 ## -------------------- ##
  18 
  19 # Be more Bourne compatible
  20 DUALCASE=1; export DUALCASE # for MKS sh
  21 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
  22   emulate sh
  23   NULLCMD=:
  24   # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
  25   # is contrary to our usage.  Disable this feature.
  26   alias -g '${1+"$@"}'='"$@"'
  27   setopt NO_GLOB_SUBST
  28 else
  29   case `(set -o) 2>/dev/null` in #(
  30   *posix*) :
  31     set -o posix ;; #(
  32   *) :
  33      ;;
  34 esac
  35 fi
  36 
  37 
  38 as_nl='
  39 '
  40 export as_nl
  41 # Printing a long string crashes Solaris 7 /usr/bin/printf.
  42 as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
  43 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
  44 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
  45 # Prefer a ksh shell builtin over an external printf program on Solaris,
  46 # but without wasting forks for bash or zsh.
  47 if test -z "$BASH_VERSION$ZSH_VERSION" \
  48     && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
  49   as_echo='print -r --'
  50   as_echo_n='print -rn --'
  51 elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
  52   as_echo='printf %s\n'
  53   as_echo_n='printf %s'
  54 else
  55   if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
  56     as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
  57     as_echo_n='/usr/ucb/echo -n'
  58   else
  59     as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
  60     as_echo_n_body='eval
  61       arg=$1;
  62       case $arg in #(
  63       *"$as_nl"*)
  64         expr "X$arg" : "X\\(.*\\)$as_nl";
  65         arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
  66       esac;
  67       expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
  68     '
  69     export as_echo_n_body
  70     as_echo_n='sh -c $as_echo_n_body as_echo'
  71   fi
  72   export as_echo_body
  73   as_echo='sh -c $as_echo_body as_echo'
  74 fi
  75 
  76 # The user is always right.
  77 if test "${PATH_SEPARATOR+set}" != set; then
  78   PATH_SEPARATOR=:
  79   (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
  80     (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
  81       PATH_SEPARATOR=';'
  82   }
  83 fi
  84 
  85 
  86 # IFS
  87 # We need space, tab and new line, in precisely that order.  Quoting is
  88 # there to prevent editors from complaining about space-tab.
  89 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
  90 # splitting by setting IFS to empty value.)
  91 IFS=" ""        $as_nl"
  92 
  93 # Find who we are.  Look in the path if we contain no directory separator.
  94 as_myself=
  95 case $0 in #((
  96   *[\\/]* ) as_myself=$0 ;;
  97   *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
  98 for as_dir in $PATH
  99 do
 100   IFS=$as_save_IFS
 101   test -z "$as_dir" && as_dir=.
 102     test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
 103   done
 104 IFS=$as_save_IFS
 105 
 106      ;;
 107 esac
 108 # We did not find ourselves, most probably we were run as `sh COMMAND'
 109 # in which case we are not to be found in the path.
 110 if test "x$as_myself" = x; then
 111   as_myself=$0
 112 fi
 113 if test ! -f "$as_myself"; then
 114   $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
 115   exit 1
 116 fi
 117 
 118 # Unset variables that we do not need and which cause bugs (e.g. in
 119 # pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
 120 # suppresses any "Segmentation fault" message there.  '((' could
 121 # trigger a bug in pdksh 5.2.14.
 122 for as_var in BASH_ENV ENV MAIL MAILPATH
 123 do eval test x\${$as_var+set} = xset \
 124   && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
 125 done
 126 PS1='$ '
 127 PS2='> '
 128 PS4='+ '
 129 
 130 # NLS nuisances.
 131 LC_ALL=C
 132 export LC_ALL
 133 LANGUAGE=C
 134 export LANGUAGE
 135 
 136 # CDPATH.
 137 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
 138 
 139 if test "x$CONFIG_SHELL" = x; then
 140   as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
 141   emulate sh
 142   NULLCMD=:
 143   # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
 144   # is contrary to our usage.  Disable this feature.
 145   alias -g '\${1+\"\$@\"}'='\"\$@\"'
 146   setopt NO_GLOB_SUBST
 147 else
 148   case \`(set -o) 2>/dev/null\` in #(
 149   *posix*) :
 150     set -o posix ;; #(
 151   *) :
 152      ;;
 153 esac
 154 fi
 155 "
 156   as_required="as_fn_return () { (exit \$1); }
 157 as_fn_success () { as_fn_return 0; }
 158 as_fn_failure () { as_fn_return 1; }
 159 as_fn_ret_success () { return 0; }
 160 as_fn_ret_failure () { return 1; }
 161 
 162 exitcode=0
 163 as_fn_success || { exitcode=1; echo as_fn_success failed.; }
 164 as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
 165 as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
 166 as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
 167 if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
 168 
 169 else
 170   exitcode=1; echo positional parameters were not saved.
 171 fi
 172 test x\$exitcode = x0 || exit 1"
 173   as_suggested="  as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
 174   as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
 175   eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
 176   test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
 177 test \$(( 1 + 1 )) = 2 || exit 1"
 178   if (eval "$as_required") 2>/dev/null; then :
 179   as_have_required=yes
 180 else
 181   as_have_required=no
 182 fi
 183   if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
 184 
 185 else
 186   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
 187 as_found=false
 188 for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
 189 do
 190   IFS=$as_save_IFS
 191   test -z "$as_dir" && as_dir=.
 192   as_found=:
 193   case $as_dir in #(
 194          /*)
 195            for as_base in sh bash ksh sh5; do
 196              # Try only shells that exist, to save several forks.
 197              as_shell=$as_dir/$as_base
 198              if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
 199                     { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
 200   CONFIG_SHELL=$as_shell as_have_required=yes
 201                    if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
 202   break 2
 203 fi
 204 fi
 205            done;;
 206        esac
 207   as_found=false
 208 done
 209 $as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
 210               { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
 211   CONFIG_SHELL=$SHELL as_have_required=yes
 212 fi; }
 213 IFS=$as_save_IFS
 214 
 215 
 216       if test "x$CONFIG_SHELL" != x; then :
 217   # We cannot yet assume a decent shell, so we have to provide a
 218         # neutralization value for shells without unset; and this also
 219         # works around shells that cannot unset nonexistent variables.
 220         # Preserve -v and -x to the replacement shell.
 221         BASH_ENV=/dev/null
 222         ENV=/dev/null
 223         (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
 224         export CONFIG_SHELL
 225         case $- in # ((((
 226           *v*x* | *x*v* ) as_opts=-vx ;;
 227           *v* ) as_opts=-v ;;
 228           *x* ) as_opts=-x ;;
 229           * ) as_opts= ;;
 230         esac
 231         exec "$CONFIG_SHELL" $as_opts "$as_myself" ${1+"$@"}
 232 fi
 233 
 234     if test x$as_have_required = xno; then :
 235   $as_echo "$0: This script requires a shell more modern than all"
 236   $as_echo "$0: the shells that I found on your system."
 237   if test x${ZSH_VERSION+set} = xset ; then
 238     $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
 239     $as_echo "$0: be upgraded to zsh 4.3.4 or later."
 240   else
 241     $as_echo "$0: Please tell bug-autoconf@gnu.org and
 242 $0: build-dev@openjdk.java.net about your system, including
 243 $0: any error possibly output before this message. Then
 244 $0: install a modern shell, or manually run the script
 245 $0: under such a shell if you do have one."
 246   fi
 247   exit 1
 248 fi
 249 fi
 250 fi
 251 SHELL=${CONFIG_SHELL-/bin/sh}
 252 export SHELL
 253 # Unset more variables known to interfere with behavior of common tools.
 254 CLICOLOR_FORCE= GREP_OPTIONS=
 255 unset CLICOLOR_FORCE GREP_OPTIONS
 256 
 257 ## --------------------- ##
 258 ## M4sh Shell Functions. ##
 259 ## --------------------- ##
 260 # as_fn_unset VAR
 261 # ---------------
 262 # Portably unset VAR.
 263 as_fn_unset ()
 264 {
 265   { eval $1=; unset $1;}
 266 }
 267 as_unset=as_fn_unset
 268 
 269 # as_fn_set_status STATUS
 270 # -----------------------
 271 # Set $? to STATUS, without forking.
 272 as_fn_set_status ()
 273 {
 274   return $1
 275 } # as_fn_set_status
 276 
 277 # as_fn_exit STATUS
 278 # -----------------
 279 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
 280 as_fn_exit ()
 281 {
 282   set +e
 283   as_fn_set_status $1
 284   exit $1
 285 } # as_fn_exit
 286 
 287 # as_fn_mkdir_p
 288 # -------------
 289 # Create "$as_dir" as a directory, including parents if necessary.
 290 as_fn_mkdir_p ()
 291 {
 292 
 293   case $as_dir in #(
 294   -*) as_dir=./$as_dir;;
 295   esac
 296   test -d "$as_dir" || eval $as_mkdir_p || {
 297     as_dirs=
 298     while :; do
 299       case $as_dir in #(
 300       *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
 301       *) as_qdir=$as_dir;;
 302       esac
 303       as_dirs="'$as_qdir' $as_dirs"
 304       as_dir=`$as_dirname -- "$as_dir" ||
 305 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
 306          X"$as_dir" : 'X\(//\)[^/]' \| \
 307          X"$as_dir" : 'X\(//\)$' \| \
 308          X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
 309 $as_echo X"$as_dir" |
 310     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
 311             s//\1/
 312             q
 313           }
 314           /^X\(\/\/\)[^/].*/{
 315             s//\1/
 316             q
 317           }
 318           /^X\(\/\/\)$/{
 319             s//\1/
 320             q
 321           }
 322           /^X\(\/\).*/{
 323             s//\1/
 324             q
 325           }
 326           s/.*/./; q'`
 327       test -d "$as_dir" && break
 328     done
 329     test -z "$as_dirs" || eval "mkdir $as_dirs"
 330   } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
 331 
 332 
 333 } # as_fn_mkdir_p
 334 # as_fn_append VAR VALUE
 335 # ----------------------
 336 # Append the text in VALUE to the end of the definition contained in VAR. Take
 337 # advantage of any shell optimizations that allow amortized linear growth over
 338 # repeated appends, instead of the typical quadratic growth present in naive
 339 # implementations.
 340 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
 341   eval 'as_fn_append ()
 342   {
 343     eval $1+=\$2
 344   }'
 345 else
 346   as_fn_append ()
 347   {
 348     eval $1=\$$1\$2
 349   }
 350 fi # as_fn_append
 351 
 352 # as_fn_arith ARG...
 353 # ------------------
 354 # Perform arithmetic evaluation on the ARGs, and store the result in the
 355 # global $as_val. Take advantage of shells that can avoid forks. The arguments
 356 # must be portable across $(()) and expr.
 357 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
 358   eval 'as_fn_arith ()
 359   {
 360     as_val=$(( $* ))
 361   }'
 362 else
 363   as_fn_arith ()
 364   {
 365     as_val=`expr "$@" || test $? -eq 1`
 366   }
 367 fi # as_fn_arith
 368 
 369 
 370 # as_fn_error STATUS ERROR [LINENO LOG_FD]
 371 # ----------------------------------------
 372 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
 373 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
 374 # script with STATUS, using 1 if that was 0.
 375 as_fn_error ()
 376 {
 377   as_status=$1; test $as_status -eq 0 && as_status=1
 378   if test "$4"; then
 379     as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
 380     $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
 381   fi
 382   $as_echo "$as_me: error: $2" >&2
 383   as_fn_exit $as_status
 384 } # as_fn_error
 385 
 386 if expr a : '\(a\)' >/dev/null 2>&1 &&
 387    test "X`expr 00001 : '.*\(...\)'`" = X001; then
 388   as_expr=expr
 389 else
 390   as_expr=false
 391 fi
 392 
 393 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
 394   as_basename=basename
 395 else
 396   as_basename=false
 397 fi
 398 
 399 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
 400   as_dirname=dirname
 401 else
 402   as_dirname=false
 403 fi
 404 
 405 as_me=`$as_basename -- "$0" ||
 406 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
 407          X"$0" : 'X\(//\)$' \| \
 408          X"$0" : 'X\(/\)' \| . 2>/dev/null ||
 409 $as_echo X/"$0" |
 410     sed '/^.*\/\([^/][^/]*\)\/*$/{
 411             s//\1/
 412             q
 413           }
 414           /^X\/\(\/\/\)$/{
 415             s//\1/
 416             q
 417           }
 418           /^X\/\(\/\).*/{
 419             s//\1/
 420             q
 421           }
 422           s/.*/./; q'`
 423 
 424 # Avoid depending upon Character Ranges.
 425 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
 426 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
 427 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
 428 as_cr_digits='0123456789'
 429 as_cr_alnum=$as_cr_Letters$as_cr_digits
 430 
 431 
 432   as_lineno_1=$LINENO as_lineno_1a=$LINENO
 433   as_lineno_2=$LINENO as_lineno_2a=$LINENO
 434   eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
 435   test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
 436   # Blame Lee E. McMahon (1931-1989) for sed's syntax.  :-)
 437   sed -n '
 438     p
 439     /[$]LINENO/=
 440   ' <$as_myself |
 441     sed '
 442       s/[$]LINENO.*/&-/
 443       t lineno
 444       b
 445       :lineno
 446       N
 447       :loop
 448       s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
 449       t loop
 450       s/-\n.*//
 451     ' >$as_me.lineno &&
 452   chmod +x "$as_me.lineno" ||
 453     { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
 454 
 455   # Don't try to exec as it changes $[0], causing all sort of problems
 456   # (the dirname of $[0] is not the place where we might find the
 457   # original and so on.  Autoconf is especially sensitive to this).
 458   . "./$as_me.lineno"
 459   # Exit status is that of the last command.
 460   exit
 461 }
 462 
 463 ECHO_C= ECHO_N= ECHO_T=
 464 case `echo -n x` in #(((((
 465 -n*)
 466   case `echo 'xy\c'` in
 467   *c*) ECHO_T=' ';;     # ECHO_T is single tab character.
 468   xy)  ECHO_C='\c';;
 469   *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
 470        ECHO_T=' ';;
 471   esac;;
 472 *)
 473   ECHO_N='-n';;
 474 esac
 475 
 476 rm -f conf$$ conf$$.exe conf$$.file
 477 if test -d conf$$.dir; then
 478   rm -f conf$$.dir/conf$$.file
 479 else
 480   rm -f conf$$.dir
 481   mkdir conf$$.dir 2>/dev/null
 482 fi
 483 if (echo >conf$$.file) 2>/dev/null; then
 484   if ln -s conf$$.file conf$$ 2>/dev/null; then
 485     as_ln_s='ln -s'
 486     # ... but there are two gotchas:
 487     # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
 488     # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
 489     # In both cases, we have to default to `cp -p'.
 490     ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
 491       as_ln_s='cp -p'
 492   elif ln conf$$.file conf$$ 2>/dev/null; then
 493     as_ln_s=ln
 494   else
 495     as_ln_s='cp -p'
 496   fi
 497 else
 498   as_ln_s='cp -p'
 499 fi
 500 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
 501 rmdir conf$$.dir 2>/dev/null
 502 
 503 if mkdir -p . 2>/dev/null; then
 504   as_mkdir_p='mkdir -p "$as_dir"'
 505 else
 506   test -d ./-p && rmdir ./-p
 507   as_mkdir_p=false
 508 fi
 509 
 510 if test -x / >/dev/null 2>&1; then
 511   as_test_x='test -x'
 512 else
 513   if ls -dL / >/dev/null 2>&1; then
 514     as_ls_L_option=L
 515   else
 516     as_ls_L_option=
 517   fi
 518   as_test_x='
 519     eval sh -c '\''
 520       if test -d "$1"; then
 521         test -d "$1/.";
 522       else
 523         case $1 in #(
 524         -*)set "./$1";;
 525         esac;
 526         case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
 527         ???[sx]*):;;*)false;;esac;fi
 528     '\'' sh
 529   '
 530 fi
 531 as_executable_p=$as_test_x
 532 
 533 # Sed expression to map a string onto a valid CPP name.
 534 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
 535 
 536 # Sed expression to map a string onto a valid variable name.
 537 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
 538 
 539 
 540 test -n "$DJDIR" || exec 7<&0 </dev/null
 541 exec 6>&1
 542 
 543 # Name of the host.
 544 # hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
 545 # so uname gets run too.
 546 ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
 547 
 548 #
 549 # Initializations.
 550 #
 551 ac_default_prefix=/usr/local
 552 ac_clean_files=
 553 ac_config_libobj_dir=.
 554 LIBOBJS=
 555 cross_compiling=no
 556 subdirs=
 557 MFLAGS=
 558 MAKEFLAGS=
 559 
 560 # Identity of this package.
 561 PACKAGE_NAME='OpenJDK'
 562 PACKAGE_TARNAME='openjdk'
 563 PACKAGE_VERSION='jdk8'
 564 PACKAGE_STRING='OpenJDK jdk8'
 565 PACKAGE_BUGREPORT='build-dev@openjdk.java.net'
 566 PACKAGE_URL='http://openjdk.java.net'
 567 
 568 # Factoring default headers for most tests.
 569 ac_includes_default="\
 570 #include <stdio.h>
 571 #ifdef HAVE_SYS_TYPES_H
 572 # include <sys/types.h>
 573 #endif
 574 #ifdef HAVE_SYS_STAT_H
 575 # include <sys/stat.h>
 576 #endif
 577 #ifdef STDC_HEADERS
 578 # include <stdlib.h>
 579 # include <stddef.h>
 580 #else
 581 # ifdef HAVE_STDLIB_H
 582 #  include <stdlib.h>
 583 # endif
 584 #endif
 585 #ifdef HAVE_STRING_H
 586 # if !defined STDC_HEADERS && defined HAVE_MEMORY_H
 587 #  include <memory.h>
 588 # endif
 589 # include <string.h>
 590 #endif
 591 #ifdef HAVE_STRINGS_H
 592 # include <strings.h>
 593 #endif
 594 #ifdef HAVE_INTTYPES_H
 595 # include <inttypes.h>
 596 #endif
 597 #ifdef HAVE_STDINT_H
 598 # include <stdint.h>
 599 #endif
 600 #ifdef HAVE_UNISTD_H
 601 # include <unistd.h>
 602 #endif"
 603 
 604 ac_subst_vars='LTLIBOBJS
 605 LIBOBJS
 606 CCACHE
 607 USE_PRECOMPILED_HEADER
 608 SJAVAC_SERVER_DIR
 609 ENABLE_SJAVAC
 610 SJAVAC_SERVER_JAVA
 611 JOBS
 612 MEMORY_SIZE
 613 NUM_CORES
 614 ENABLE_INTREE_EC
 615 SALIB_NAME
 616 HOTSPOT_MAKE_ARGS
 617 FIXPATH
 618 LIBCXX
 619 LLVM_LIBS
 620 LLVM_LDFLAGS
 621 LLVM_CFLAGS
 622 LLVM_CONFIG
 623 LIBFFI_LIBS
 624 LIBFFI_CFLAGS
 625 STATIC_CXX_SETTING
 626 LIBDL
 627 LIBM
 628 LIBZIP_CAN_USE_MMAP
 629 USE_EXTERNAL_LIBZ
 630 USE_EXTERNAL_LIBGIF
 631 USE_EXTERNAL_LIBJPEG
 632 ALSA_LIBS
 633 ALSA_CFLAGS
 634 FREETYPE2_LIB_PATH
 635 USING_SYSTEM_FT_LIB
 636 FREETYPE2_LIBS
 637 FREETYPE2_CFLAGS
 638 USE_EXTERNAL_ICU_LE
 639 ICU_LE_LIBS
 640 ICU_LE_CFLAGS
 641 CUPS_CFLAGS
 642 OPENWIN_HOME
 643 X_EXTRA_LIBS
 644 X_LIBS
 645 X_PRE_LIBS
 646 X_CFLAGS
 647 XMKMF
 648 CXXFLAGS_DEBUG_SYMBOLS
 649 CFLAGS_DEBUG_SYMBOLS
 650 ZIP_DEBUGINFO_FILES
 651 ENABLE_DEBUG_SYMBOLS
 652 COMPILER_SUPPORTS_TARGET_BITS_FLAG
 653 ZERO_ARCHFLAG
 654 LDFLAGS_CXX_JDK
 655 LDFLAGS_JDKEXE_SUFFIX
 656 LDFLAGS_JDKLIB_SUFFIX
 657 LDFLAGS_JDKEXE
 658 LDFLAGS_JDKLIB
 659 CXXFLAGS_JDKEXE
 660 CXXFLAGS_JDKLIB
 661 CFLAGS_JDKEXE
 662 CFLAGS_JDKLIB
 663 MACOSX_VERSION_MIN
 664 PACKAGE_PATH
 665 LEGACY_EXTRA_LDFLAGS
 666 LEGACY_EXTRA_CXXFLAGS
 667 LEGACY_EXTRA_CFLAGS
 668 CXX_FLAG_DEPS
 669 C_FLAG_DEPS
 670 CXX_O_FLAG_NONE
 671 CXX_O_FLAG_NORM
 672 CXX_O_FLAG_HI
 673 CXX_O_FLAG_HIGHEST
 674 C_O_FLAG_NONE
 675 C_O_FLAG_NORM
 676 C_O_FLAG_HI
 677 C_O_FLAG_HIGHEST
 678 POST_MCS_CMD
 679 POST_STRIP_CMD
 680 SET_EXECUTABLE_ORIGIN
 681 SET_SHARED_LIBRARY_ORIGIN
 682 CXX_FLAG_REORDER
 683 C_FLAG_REORDER
 684 SET_SHARED_LIBRARY_MAPFILE
 685 SET_SHARED_LIBRARY_NAME
 686 SHARED_LIBRARY_FLAGS
 687 EXE_SUFFIX
 688 STATIC_LIBRARY_SUFFIX
 689 SHARED_LIBRARY_SUFFIX
 690 LIBRARY_PREFIX
 691 STATIC_LIBRARY
 692 SHARED_LIBRARY
 693 OBJ_SUFFIX
 694 COMPILER_NAME
 695 JT_HOME
 696 JTREGEXE
 697 LIPO
 698 ac_ct_OBJDUMP
 699 OBJDUMP
 700 ac_ct_OBJCOPY
 701 OBJCOPY
 702 MCS
 703 STRIP
 704 GNM
 705 NM
 706 AS
 707 CXXCPP
 708 CPP
 709 COMPILER_TYPE
 710 RC_FLAGS
 711 DUMPBIN
 712 WINAR
 713 HOTSPOT_RC
 714 HOTSPOT_MT
 715 RC
 716 MT
 717 WINLD
 718 HOTSPOT_LD
 719 HOTSPOT_CXX
 720 ARFLAGS
 721 AR
 722 LDEXECXX
 723 LDCXX
 724 LDEXE
 725 LD
 726 ac_ct_OBJC
 727 OBJCFLAGS
 728 OBJC
 729 ac_ct_CXX
 730 CXXFLAGS
 731 CXX
 732 ac_ct_PROPER_COMPILER_CXX
 733 PROPER_COMPILER_CXX
 734 POTENTIAL_CXX
 735 TOOLS_DIR_CXX
 736 OBJEXT
 737 EXEEXT
 738 ac_ct_CC
 739 CPPFLAGS
 740 LDFLAGS
 741 CFLAGS
 742 CC
 743 ac_ct_PROPER_COMPILER_CC
 744 PROPER_COMPILER_CC
 745 POTENTIAL_CC
 746 TOOLS_DIR_CC
 747 BUILD_LD
 748 BUILD_CXX
 749 BUILD_CC
 750 MSVCR_DLL
 751 DXSDK_INCLUDE_PATH
 752 DXSDK_LIB_PATH
 753 VS_PATH
 754 VS_LIB
 755 VS_INCLUDE
 756 CYGWIN_LINK
 757 AR_OUT_OPTION
 758 LD_OUT_OPTION
 759 EXE_OUT_OPTION
 760 CC_OUT_OPTION
 761 BUILD_HOTSPOT
 762 HOTSPOT_DIST
 763 BUILD_OUTPUT
 764 OVERRIDE_SRC_ROOT
 765 ADD_SRC_ROOT
 766 JDK_TOPDIR
 767 NASHORN_TOPDIR
 768 HOTSPOT_TOPDIR
 769 JAXWS_TOPDIR
 770 JAXP_TOPDIR
 771 CORBA_TOPDIR
 772 LANGTOOLS_TOPDIR
 773 BOOT_JDK_JVMARGS
 774 JAVAC_FLAGS
 775 BOOT_JDK_SOURCETARGET
 776 BOOT_JDK
 777 BOOT_TOOLSJAR
 778 BOOT_RTJAR
 779 JAVA_CHECK
 780 JAVAC_CHECK
 781 COOKED_BUILD_NUMBER
 782 JDK_VERSION
 783 COPYRIGHT_YEAR
 784 MACOSX_BUNDLE_ID_BASE
 785 MACOSX_BUNDLE_NAME_BASE
 786 COMPANY_NAME
 787 JDK_RC_PLATFORM_NAME
 788 PRODUCT_SUFFIX
 789 PRODUCT_NAME
 790 LAUNCHER_NAME
 791 MILESTONE
 792 JDK_BUILD_NUMBER
 793 JDK_UPDATE_VERSION
 794 JDK_MICRO_VERSION
 795 JDK_MINOR_VERSION
 796 JDK_MAJOR_VERSION
 797 USER_RELEASE_SUFFIX
 798 COMPRESS_JARS
 799 UNLIMITED_CRYPTO
 800 CACERTS_FILE
 801 TEST_IN_BUILD
 802 BUILD_HEADLESS
 803 SUPPORT_HEADFUL
 804 SUPPORT_HEADLESS
 805 BDEPS_FTP
 806 BDEPS_UNZIP
 807 OS_VERSION_MICRO
 808 OS_VERSION_MINOR
 809 OS_VERSION_MAJOR
 810 PKG_CONFIG
 811 CODESIGN
 812 XATTR
 813 TIME
 814 STAT
 815 HG
 816 READELF
 817 OTOOL
 818 LDD
 819 ZIP
 820 UNZIP
 821 FIND_DELETE
 822 MAKE
 823 CHECK_TOOLSDIR_MAKE
 824 CHECK_TOOLSDIR_GMAKE
 825 CHECK_MAKE
 826 CHECK_GMAKE
 827 PKGHANDLER
 828 OUTPUT_ROOT
 829 CONF_NAME
 830 SPEC
 831 BUILD_VARIANT_RELEASE
 832 DEBUG_CLASSFILES
 833 FASTDEBUG
 834 VARIANT
 835 DEBUG_LEVEL
 836 MACOSX_UNIVERSAL
 837 INCLUDE_SA
 838 JVM_VARIANT_ZEROSHARK
 839 JVM_VARIANT_ZERO
 840 JVM_VARIANT_KERNEL
 841 JVM_VARIANT_MINIMAL1
 842 JVM_VARIANT_CLIENT
 843 JVM_VARIANT_SERVER
 844 JVM_VARIANTS
 845 JDK_VARIANT
 846 SET_OPENJDK
 847 BUILD_LOG_WRAPPER
 848 BUILD_LOG_PREVIOUS
 849 BUILD_LOG
 850 SYS_ROOT
 851 PATH_SEP
 852 SRC_ROOT
 853 ZERO_ARCHDEF
 854 DEFINE_CROSS_COMPILE_ARCH
 855 LP64
 856 OPENJDK_TARGET_OS_API_DIR
 857 OPENJDK_TARGET_CPU_JLI_CFLAGS
 858 OPENJDK_TARGET_CPU_OSARCH
 859 OPENJDK_TARGET_CPU_ISADIR
 860 OPENJDK_TARGET_CPU_LIBDIR
 861 OPENJDK_TARGET_CPU_LEGACY_LIB
 862 OPENJDK_TARGET_CPU_LEGACY
 863 REQUIRED_OS_VERSION
 864 REQUIRED_OS_NAME
 865 COMPILE_TYPE
 866 OPENJDK_TARGET_CPU_ENDIAN
 867 OPENJDK_TARGET_CPU_BITS
 868 OPENJDK_TARGET_CPU_ARCH
 869 OPENJDK_TARGET_CPU
 870 OPENJDK_TARGET_OS_API
 871 OPENJDK_TARGET_OS
 872 OPENJDK_BUILD_CPU_ENDIAN
 873 OPENJDK_BUILD_CPU_BITS
 874 OPENJDK_BUILD_CPU_ARCH
 875 OPENJDK_BUILD_CPU
 876 OPENJDK_BUILD_OS_API
 877 OPENJDK_BUILD_OS
 878 OPENJDK_BUILD_AUTOCONF_NAME
 879 OPENJDK_TARGET_AUTOCONF_NAME
 880 target_os
 881 target_vendor
 882 target_cpu
 883 target
 884 host_os
 885 host_vendor
 886 host_cpu
 887 host
 888 build_os
 889 build_vendor
 890 build_cpu
 891 build
 892 SETFILE
 893 DF
 894 READLINK
 895 CYGPATH
 896 NAWK
 897 SED
 898 FGREP
 899 EGREP
 900 GREP
 901 AWK
 902 XARGS
 903 WHICH
 904 WC
 905 UNIQ
 906 UNAME
 907 TR
 908 TOUCH
 909 TEE
 910 TAR
 911 TAIL
 912 SORT
 913 SH
 914 RM
 915 PRINTF
 916 MV
 917 MKTEMP
 918 MKDIR
 919 LS
 920 LN
 921 HEAD
 922 FIND
 923 FILE
 924 EXPR
 925 ECHO
 926 DIRNAME
 927 DIFF
 928 DATE
 929 CUT
 930 CPIO
 931 CP
 932 COMM
 933 CMP
 934 CHMOD
 935 CAT
 936 BASH
 937 BASENAME
 938 DATE_WHEN_CONFIGURED
 939 CONFIGURE_COMMAND_LINE
 940 CUSTOM_MAKE_DIR
 941 target_alias
 942 host_alias
 943 build_alias
 944 LIBS
 945 ECHO_T
 946 ECHO_N
 947 ECHO_C
 948 DEFS
 949 mandir
 950 localedir
 951 libdir
 952 psdir
 953 pdfdir
 954 dvidir
 955 htmldir
 956 infodir
 957 docdir
 958 oldincludedir
 959 includedir
 960 localstatedir
 961 sharedstatedir
 962 sysconfdir
 963 datadir
 964 datarootdir
 965 libexecdir
 966 sbindir
 967 bindir
 968 program_transform_name
 969 prefix
 970 exec_prefix
 971 PACKAGE_URL
 972 PACKAGE_BUGREPORT
 973 PACKAGE_STRING
 974 PACKAGE_VERSION
 975 PACKAGE_TARNAME
 976 PACKAGE_NAME
 977 PATH_SEPARATOR
 978 SHELL'
 979 ac_subst_files=''
 980 ac_user_opts='
 981 enable_option_checking
 982 with_custom_make_dir
 983 with_target_bits
 984 with_sys_root
 985 with_tools_dir
 986 with_devkit
 987 enable_openjdk_only
 988 with_jdk_variant
 989 with_jvm_variants
 990 enable_debug
 991 with_debug_level
 992 with_conf_name
 993 with_builddeps_conf
 994 with_builddeps_server
 995 with_builddeps_dir
 996 with_builddeps_group
 997 enable_headful
 998 enable_hotspot_test_in_build
 999 with_cacerts_file
1000 enable_unlimited_crypto
1001 with_milestone
1002 with_update_version
1003 with_build_number
1004 with_user_release_suffix
1005 with_boot_jdk
1006 with_boot_jdk_jvmargs
1007 with_add_source_root
1008 with_override_source_root
1009 with_adds_and_overrides
1010 with_override_langtools
1011 with_override_corba
1012 with_override_jaxp
1013 with_override_jaxws
1014 with_override_hotspot
1015 with_override_jdk
1016 with_import_hotspot
1017 with_msvcr_dll
1018 with_dxsdk
1019 with_dxsdk_lib
1020 with_dxsdk_include
1021 with_jtreg
1022 with_extra_cflags
1023 with_extra_cxxflags
1024 with_extra_ldflags
1025 enable_debug_symbols
1026 enable_zip_debug_info
1027 enable_macosx_runtime_support
1028 with_x
1029 with_cups
1030 with_cups_include
1031 with_icu_le
1032 with_freetype
1033 with_alsa
1034 with_alsa_include
1035 with_alsa_lib
1036 with_giflib
1037 with_zlib
1038 with_stdc__lib
1039 with_num_cores
1040 with_memory_size
1041 with_jobs
1042 with_sjavac_server_java
1043 enable_sjavac
1044 enable_precompiled_headers
1045 enable_ccache
1046 with_ccache_dir
1047 '
1048       ac_precious_vars='build_alias
1049 host_alias
1050 target_alias
1051 PKG_CONFIG
1052 CC
1053 CFLAGS
1054 LDFLAGS
1055 LIBS
1056 CPPFLAGS
1057 CXX
1058 CXXFLAGS
1059 CCC
1060 OBJC
1061 OBJCFLAGS
1062 CPP
1063 CXXCPP
1064 XMKMF
1065 ICU_LE_CFLAGS
1066 ICU_LE_LIBS
1067 FREETYPE2_CFLAGS
1068 FREETYPE2_LIBS
1069 ALSA_CFLAGS
1070 ALSA_LIBS
1071 LIBFFI_CFLAGS
1072 LIBFFI_LIBS'
1073 
1074 
1075 # Initialize some variables set by options.
1076 ac_init_help=
1077 ac_init_version=false
1078 ac_unrecognized_opts=
1079 ac_unrecognized_sep=
1080 # The variables have the same names as the options, with
1081 # dashes changed to underlines.
1082 cache_file=/dev/null
1083 exec_prefix=NONE
1084 no_create=
1085 no_recursion=
1086 prefix=NONE
1087 program_prefix=NONE
1088 program_suffix=NONE
1089 program_transform_name=s,x,x,
1090 silent=
1091 site=
1092 srcdir=
1093 verbose=
1094 x_includes=NONE
1095 x_libraries=NONE
1096 
1097 # Installation directory options.
1098 # These are left unexpanded so users can "make install exec_prefix=/foo"
1099 # and all the variables that are supposed to be based on exec_prefix
1100 # by default will actually change.
1101 # Use braces instead of parens because sh, perl, etc. also accept them.
1102 # (The list follows the same order as the GNU Coding Standards.)
1103 bindir='${exec_prefix}/bin'
1104 sbindir='${exec_prefix}/sbin'
1105 libexecdir='${exec_prefix}/libexec'
1106 datarootdir='${prefix}/share'
1107 datadir='${datarootdir}'
1108 sysconfdir='${prefix}/etc'
1109 sharedstatedir='${prefix}/com'
1110 localstatedir='${prefix}/var'
1111 includedir='${prefix}/include'
1112 oldincludedir='/usr/include'
1113 docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
1114 infodir='${datarootdir}/info'
1115 htmldir='${docdir}'
1116 dvidir='${docdir}'
1117 pdfdir='${docdir}'
1118 psdir='${docdir}'
1119 libdir='${exec_prefix}/lib'
1120 localedir='${datarootdir}/locale'
1121 mandir='${datarootdir}/man'
1122 
1123 ac_prev=
1124 ac_dashdash=
1125 for ac_option
1126 do
1127   # If the previous option needs an argument, assign it.
1128   if test -n "$ac_prev"; then
1129     eval $ac_prev=\$ac_option
1130     ac_prev=
1131     continue
1132   fi
1133 
1134   case $ac_option in
1135   *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
1136   *=)   ac_optarg= ;;
1137   *)    ac_optarg=yes ;;
1138   esac
1139 
1140   # Accept the important Cygnus configure options, so we can diagnose typos.
1141 
1142   case $ac_dashdash$ac_option in
1143   --)
1144     ac_dashdash=yes ;;
1145 
1146   -bindir | --bindir | --bindi | --bind | --bin | --bi)
1147     ac_prev=bindir ;;
1148   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
1149     bindir=$ac_optarg ;;
1150 
1151   -build | --build | --buil | --bui | --bu)
1152     ac_prev=build_alias ;;
1153   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
1154     build_alias=$ac_optarg ;;
1155 
1156   -cache-file | --cache-file | --cache-fil | --cache-fi \
1157   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1158     ac_prev=cache_file ;;
1159   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1160   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
1161     cache_file=$ac_optarg ;;
1162 
1163   --config-cache | -C)
1164     cache_file=config.cache ;;
1165 
1166   -datadir | --datadir | --datadi | --datad)
1167     ac_prev=datadir ;;
1168   -datadir=* | --datadir=* | --datadi=* | --datad=*)
1169     datadir=$ac_optarg ;;
1170 
1171   -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1172   | --dataroo | --dataro | --datar)
1173     ac_prev=datarootdir ;;
1174   -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1175   | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1176     datarootdir=$ac_optarg ;;
1177 
1178   -disable-* | --disable-*)
1179     ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1180     # Reject names that are not valid shell variable names.
1181     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1182       as_fn_error $? "invalid feature name: $ac_useropt"
1183     ac_useropt_orig=$ac_useropt
1184     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1185     case $ac_user_opts in
1186       *"
1187 "enable_$ac_useropt"
1188 "*) ;;
1189       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1190          ac_unrecognized_sep=', ';;
1191     esac
1192     eval enable_$ac_useropt=no ;;
1193 
1194   -docdir | --docdir | --docdi | --doc | --do)
1195     ac_prev=docdir ;;
1196   -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1197     docdir=$ac_optarg ;;
1198 
1199   -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1200     ac_prev=dvidir ;;
1201   -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1202     dvidir=$ac_optarg ;;
1203 
1204   -enable-* | --enable-*)
1205     ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1206     # Reject names that are not valid shell variable names.
1207     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1208       as_fn_error $? "invalid feature name: $ac_useropt"
1209     ac_useropt_orig=$ac_useropt
1210     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1211     case $ac_user_opts in
1212       *"
1213 "enable_$ac_useropt"
1214 "*) ;;
1215       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1216          ac_unrecognized_sep=', ';;
1217     esac
1218     eval enable_$ac_useropt=\$ac_optarg ;;
1219 
1220   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1221   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1222   | --exec | --exe | --ex)
1223     ac_prev=exec_prefix ;;
1224   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1225   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1226   | --exec=* | --exe=* | --ex=*)
1227     exec_prefix=$ac_optarg ;;
1228 
1229   -gas | --gas | --ga | --g)
1230     # Obsolete; use --with-gas.
1231     with_gas=yes ;;
1232 
1233   -help | --help | --hel | --he | -h)
1234     ac_init_help=long ;;
1235   -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1236     ac_init_help=recursive ;;
1237   -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1238     ac_init_help=short ;;
1239 
1240   -host | --host | --hos | --ho)
1241     ac_prev=host_alias ;;
1242   -host=* | --host=* | --hos=* | --ho=*)
1243     host_alias=$ac_optarg ;;
1244 
1245   -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1246     ac_prev=htmldir ;;
1247   -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1248   | --ht=*)
1249     htmldir=$ac_optarg ;;
1250 
1251   -includedir | --includedir | --includedi | --included | --include \
1252   | --includ | --inclu | --incl | --inc)
1253     ac_prev=includedir ;;
1254   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1255   | --includ=* | --inclu=* | --incl=* | --inc=*)
1256     includedir=$ac_optarg ;;
1257 
1258   -infodir | --infodir | --infodi | --infod | --info | --inf)
1259     ac_prev=infodir ;;
1260   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1261     infodir=$ac_optarg ;;
1262 
1263   -libdir | --libdir | --libdi | --libd)
1264     ac_prev=libdir ;;
1265   -libdir=* | --libdir=* | --libdi=* | --libd=*)
1266     libdir=$ac_optarg ;;
1267 
1268   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1269   | --libexe | --libex | --libe)
1270     ac_prev=libexecdir ;;
1271   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1272   | --libexe=* | --libex=* | --libe=*)
1273     libexecdir=$ac_optarg ;;
1274 
1275   -localedir | --localedir | --localedi | --localed | --locale)
1276     ac_prev=localedir ;;
1277   -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1278     localedir=$ac_optarg ;;
1279 
1280   -localstatedir | --localstatedir | --localstatedi | --localstated \
1281   | --localstate | --localstat | --localsta | --localst | --locals)
1282     ac_prev=localstatedir ;;
1283   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1284   | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1285     localstatedir=$ac_optarg ;;
1286 
1287   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1288     ac_prev=mandir ;;
1289   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1290     mandir=$ac_optarg ;;
1291 
1292   -nfp | --nfp | --nf)
1293     # Obsolete; use --without-fp.
1294     with_fp=no ;;
1295 
1296   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1297   | --no-cr | --no-c | -n)
1298     no_create=yes ;;
1299 
1300   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1301   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1302     no_recursion=yes ;;
1303 
1304   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1305   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1306   | --oldin | --oldi | --old | --ol | --o)
1307     ac_prev=oldincludedir ;;
1308   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1309   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1310   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1311     oldincludedir=$ac_optarg ;;
1312 
1313   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1314     ac_prev=prefix ;;
1315   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1316     prefix=$ac_optarg ;;
1317 
1318   -program-prefix | --program-prefix | --program-prefi | --program-pref \
1319   | --program-pre | --program-pr | --program-p)
1320     ac_prev=program_prefix ;;
1321   -program-prefix=* | --program-prefix=* | --program-prefi=* \
1322   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1323     program_prefix=$ac_optarg ;;
1324 
1325   -program-suffix | --program-suffix | --program-suffi | --program-suff \
1326   | --program-suf | --program-su | --program-s)
1327     ac_prev=program_suffix ;;
1328   -program-suffix=* | --program-suffix=* | --program-suffi=* \
1329   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1330     program_suffix=$ac_optarg ;;
1331 
1332   -program-transform-name | --program-transform-name \
1333   | --program-transform-nam | --program-transform-na \
1334   | --program-transform-n | --program-transform- \
1335   | --program-transform | --program-transfor \
1336   | --program-transfo | --program-transf \
1337   | --program-trans | --program-tran \
1338   | --progr-tra | --program-tr | --program-t)
1339     ac_prev=program_transform_name ;;
1340   -program-transform-name=* | --program-transform-name=* \
1341   | --program-transform-nam=* | --program-transform-na=* \
1342   | --program-transform-n=* | --program-transform-=* \
1343   | --program-transform=* | --program-transfor=* \
1344   | --program-transfo=* | --program-transf=* \
1345   | --program-trans=* | --program-tran=* \
1346   | --progr-tra=* | --program-tr=* | --program-t=*)
1347     program_transform_name=$ac_optarg ;;
1348 
1349   -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1350     ac_prev=pdfdir ;;
1351   -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1352     pdfdir=$ac_optarg ;;
1353 
1354   -psdir | --psdir | --psdi | --psd | --ps)
1355     ac_prev=psdir ;;
1356   -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1357     psdir=$ac_optarg ;;
1358 
1359   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1360   | -silent | --silent | --silen | --sile | --sil)
1361     silent=yes ;;
1362 
1363   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1364     ac_prev=sbindir ;;
1365   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1366   | --sbi=* | --sb=*)
1367     sbindir=$ac_optarg ;;
1368 
1369   -sharedstatedir | --sharedstatedir | --sharedstatedi \
1370   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1371   | --sharedst | --shareds | --shared | --share | --shar \
1372   | --sha | --sh)
1373     ac_prev=sharedstatedir ;;
1374   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1375   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1376   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1377   | --sha=* | --sh=*)
1378     sharedstatedir=$ac_optarg ;;
1379 
1380   -site | --site | --sit)
1381     ac_prev=site ;;
1382   -site=* | --site=* | --sit=*)
1383     site=$ac_optarg ;;
1384 
1385   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1386     ac_prev=srcdir ;;
1387   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1388     srcdir=$ac_optarg ;;
1389 
1390   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1391   | --syscon | --sysco | --sysc | --sys | --sy)
1392     ac_prev=sysconfdir ;;
1393   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1394   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1395     sysconfdir=$ac_optarg ;;
1396 
1397   -target | --target | --targe | --targ | --tar | --ta | --t)
1398     ac_prev=target_alias ;;
1399   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1400     target_alias=$ac_optarg ;;
1401 
1402   -v | -verbose | --verbose | --verbos | --verbo | --verb)
1403     verbose=yes ;;
1404 
1405   -version | --version | --versio | --versi | --vers | -V)
1406     ac_init_version=: ;;
1407 
1408   -with-* | --with-*)
1409     ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1410     # Reject names that are not valid shell variable names.
1411     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1412       as_fn_error $? "invalid package name: $ac_useropt"
1413     ac_useropt_orig=$ac_useropt
1414     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1415     case $ac_user_opts in
1416       *"
1417 "with_$ac_useropt"
1418 "*) ;;
1419       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1420          ac_unrecognized_sep=', ';;
1421     esac
1422     eval with_$ac_useropt=\$ac_optarg ;;
1423 
1424   -without-* | --without-*)
1425     ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1426     # Reject names that are not valid shell variable names.
1427     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1428       as_fn_error $? "invalid package name: $ac_useropt"
1429     ac_useropt_orig=$ac_useropt
1430     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1431     case $ac_user_opts in
1432       *"
1433 "with_$ac_useropt"
1434 "*) ;;
1435       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1436          ac_unrecognized_sep=', ';;
1437     esac
1438     eval with_$ac_useropt=no ;;
1439 
1440   --x)
1441     # Obsolete; use --with-x.
1442     with_x=yes ;;
1443 
1444   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1445   | --x-incl | --x-inc | --x-in | --x-i)
1446     ac_prev=x_includes ;;
1447   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1448   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1449     x_includes=$ac_optarg ;;
1450 
1451   -x-libraries | --x-libraries | --x-librarie | --x-librari \
1452   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1453     ac_prev=x_libraries ;;
1454   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1455   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1456     x_libraries=$ac_optarg ;;
1457 
1458   -*) as_fn_error $? "unrecognized option: \`$ac_option'
1459 Try \`$0 --help' for more information"
1460     ;;
1461 
1462   *=*)
1463     ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1464     # Reject names that are not valid shell variable names.
1465     case $ac_envvar in #(
1466       '' | [0-9]* | *[!_$as_cr_alnum]* )
1467       as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1468     esac
1469     eval $ac_envvar=\$ac_optarg
1470     export $ac_envvar ;;
1471 
1472   *)
1473     # FIXME: should be removed in autoconf 3.0.
1474     $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1475     expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1476       $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1477     : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1478     ;;
1479 
1480   esac
1481 done
1482 
1483 if test -n "$ac_prev"; then
1484   ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1485   as_fn_error $? "missing argument to $ac_option"
1486 fi
1487 
1488 if test -n "$ac_unrecognized_opts"; then
1489   case $enable_option_checking in
1490     no) ;;
1491     fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1492     *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1493   esac
1494 fi
1495 
1496 # Check all directory arguments for consistency.
1497 for ac_var in   exec_prefix prefix bindir sbindir libexecdir datarootdir \
1498                 datadir sysconfdir sharedstatedir localstatedir includedir \
1499                 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1500                 libdir localedir mandir
1501 do
1502   eval ac_val=\$$ac_var
1503   # Remove trailing slashes.
1504   case $ac_val in
1505     */ )
1506       ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1507       eval $ac_var=\$ac_val;;
1508   esac
1509   # Be sure to have absolute directory names.
1510   case $ac_val in
1511     [\\/$]* | ?:[\\/]* )  continue;;
1512     NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1513   esac
1514   as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1515 done
1516 
1517 # There might be people who depend on the old broken behavior: `$host'
1518 # used to hold the argument of --host etc.
1519 # FIXME: To remove some day.
1520 build=$build_alias
1521 host=$host_alias
1522 target=$target_alias
1523 
1524 # FIXME: To remove some day.
1525 if test "x$host_alias" != x; then
1526   if test "x$build_alias" = x; then
1527     cross_compiling=maybe
1528     $as_echo "$as_me: WARNING: if you wanted to set the --build type, don't use --host.
1529     If a cross compiler is detected then cross compile mode will be used" >&2
1530   elif test "x$build_alias" != "x$host_alias"; then
1531     cross_compiling=yes
1532   fi
1533 fi
1534 
1535 ac_tool_prefix=
1536 test -n "$host_alias" && ac_tool_prefix=$host_alias-
1537 
1538 test "$silent" = yes && exec 6>/dev/null
1539 
1540 
1541 ac_pwd=`pwd` && test -n "$ac_pwd" &&
1542 ac_ls_di=`ls -di .` &&
1543 ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1544   as_fn_error $? "working directory cannot be determined"
1545 test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1546   as_fn_error $? "pwd does not report name of working directory"
1547 
1548 
1549 # Find the source files, if location was not specified.
1550 if test -z "$srcdir"; then
1551   ac_srcdir_defaulted=yes
1552   # Try the directory containing this script, then the parent directory.
1553   ac_confdir=`$as_dirname -- "$as_myself" ||
1554 $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1555          X"$as_myself" : 'X\(//\)[^/]' \| \
1556          X"$as_myself" : 'X\(//\)$' \| \
1557          X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1558 $as_echo X"$as_myself" |
1559     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1560             s//\1/
1561             q
1562           }
1563           /^X\(\/\/\)[^/].*/{
1564             s//\1/
1565             q
1566           }
1567           /^X\(\/\/\)$/{
1568             s//\1/
1569             q
1570           }
1571           /^X\(\/\).*/{
1572             s//\1/
1573             q
1574           }
1575           s/.*/./; q'`
1576   srcdir=$ac_confdir
1577   if test ! -r "$srcdir/$ac_unique_file"; then
1578     srcdir=..
1579   fi
1580 else
1581   ac_srcdir_defaulted=no
1582 fi
1583 if test ! -r "$srcdir/$ac_unique_file"; then
1584   test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1585   as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1586 fi
1587 ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1588 ac_abs_confdir=`(
1589         cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1590         pwd)`
1591 # When building in place, set srcdir=.
1592 if test "$ac_abs_confdir" = "$ac_pwd"; then
1593   srcdir=.
1594 fi
1595 # Remove unnecessary trailing slashes from srcdir.
1596 # Double slashes in file names in object file debugging info
1597 # mess up M-x gdb in Emacs.
1598 case $srcdir in
1599 */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1600 esac
1601 for ac_var in $ac_precious_vars; do
1602   eval ac_env_${ac_var}_set=\${${ac_var}+set}
1603   eval ac_env_${ac_var}_value=\$${ac_var}
1604   eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1605   eval ac_cv_env_${ac_var}_value=\$${ac_var}
1606 done
1607 
1608 #
1609 # Report the --help message.
1610 #
1611 if test "$ac_init_help" = "long"; then
1612   # Omit some internal or obsolete options to make the list less imposing.
1613   # This message is too long to be a string in the A/UX 3.1 sh.
1614   cat <<_ACEOF
1615 \`configure' configures OpenJDK jdk8 to adapt to many kinds of systems.
1616 
1617 Usage: $0 [OPTION]... [VAR=VALUE]...
1618 
1619 To assign environment variables (e.g., CC, CFLAGS...), specify them as
1620 VAR=VALUE.  See below for descriptions of some of the useful variables.
1621 
1622 Defaults for the options are specified in brackets.
1623 
1624 Configuration:
1625   -h, --help              display this help and exit
1626       --help=short        display options specific to this package
1627       --help=recursive    display the short help of all the included packages
1628   -V, --version           display version information and exit
1629   -q, --quiet, --silent   do not print \`checking ...' messages
1630       --cache-file=FILE   cache test results in FILE [disabled]
1631   -C, --config-cache      alias for \`--cache-file=config.cache'
1632   -n, --no-create         do not create output files
1633       --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1634 
1635 Installation directories:
1636   --prefix=PREFIX         install architecture-independent files in PREFIX
1637                           [$ac_default_prefix]
1638   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1639                           [PREFIX]
1640 
1641 By default, \`make install' will install all the files in
1642 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1643 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1644 for instance \`--prefix=\$HOME'.
1645 
1646 For better control, use the options below.
1647 
1648 Fine tuning of the installation directories:
1649   --bindir=DIR            user executables [EPREFIX/bin]
1650   --sbindir=DIR           system admin executables [EPREFIX/sbin]
1651   --libexecdir=DIR        program executables [EPREFIX/libexec]
1652   --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
1653   --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
1654   --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
1655   --libdir=DIR            object code libraries [EPREFIX/lib]
1656   --includedir=DIR        C header files [PREFIX/include]
1657   --oldincludedir=DIR     C header files for non-gcc [/usr/include]
1658   --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
1659   --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
1660   --infodir=DIR           info documentation [DATAROOTDIR/info]
1661   --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
1662   --mandir=DIR            man documentation [DATAROOTDIR/man]
1663   --docdir=DIR            documentation root [DATAROOTDIR/doc/openjdk]
1664   --htmldir=DIR           html documentation [DOCDIR]
1665   --dvidir=DIR            dvi documentation [DOCDIR]
1666   --pdfdir=DIR            pdf documentation [DOCDIR]
1667   --psdir=DIR             ps documentation [DOCDIR]
1668 _ACEOF
1669 
1670   cat <<\_ACEOF
1671 
1672 X features:
1673   --x-includes=DIR    X include files are in DIR
1674   --x-libraries=DIR   X library files are in DIR
1675 
1676 System types:
1677   --build=BUILD     configure for building on BUILD [guessed]
1678   --host=HOST       cross-compile to build programs to run on HOST [BUILD]
1679   --target=TARGET   configure for building compilers for TARGET [HOST]
1680 _ACEOF
1681 fi
1682 
1683 if test -n "$ac_init_help"; then
1684   case $ac_init_help in
1685      short | recursive ) echo "Configuration of OpenJDK jdk8:";;
1686    esac
1687   cat <<\_ACEOF
1688 
1689 Optional Features:
1690   --disable-option-checking  ignore unrecognized --enable/--with options
1691   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1692   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1693   --enable-openjdk-only   suppress building custom source even if present
1694                           [disabled]
1695   --enable-debug          set the debug level to fastdebug (shorthand for
1696                           --with-debug-level=fastdebug) [disabled]
1697   --disable-headful       disable building headful support (graphical UI
1698                           support) [enabled]
1699   --enable-hotspot-test-in-build
1700                           run the Queens test after Hotspot build [disabled]
1701   --enable-unlimited-crypto
1702                           Enable unlimited crypto policy [disabled]
1703   --disable-debug-symbols disable generation of debug symbols [enabled]
1704   --disable-zip-debug-info
1705                           disable zipping of debug-info files [enabled]
1706   --disable-macosx-runtime-support
1707                           disable the use of MacOSX Java runtime support
1708                           framework [enabled]
1709   --enable-sjavac         use sjavac to do fast incremental compiles
1710                           [disabled]
1711   --disable-precompiled-headers
1712                           disable using precompiled headers when compiling C++
1713                           [enabled]
1714   --disable-ccache        disable using ccache to speed up recompilations
1715                           [enabled]
1716 
1717 Optional Packages:
1718   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
1719   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
1720   --with-custom-make-dir  use this directory for custom build/make files
1721   --with-target-bits      build 32-bit or 64-bit binaries (for platforms that
1722                           support it), e.g. --with-target-bits=32 [guessed]
1723   --with-sys-root         pass this sys-root to the compilers and tools (for
1724                           cross-compiling)
1725   --with-tools-dir        search this directory for compilers and tools (for
1726                           cross-compiling)
1727   --with-devkit           use this directory as base for tools-dir and
1728                           sys-root (for cross-compiling)
1729   --with-jdk-variant      JDK variant to build (normal) [normal]
1730   --with-jvm-variants     JVM variants (separated by commas) to build (server,
1731                           client, minimal1, kernel, zero, zeroshark) [server]
1732   --with-debug-level      set the debug level (release, fastdebug, slowdebug)
1733                           [release]
1734   --with-conf-name        use this as the name of the configuration [generated
1735                           from important configuration options]
1736   --with-builddeps-conf   use this configuration file for the builddeps
1737   --with-builddeps-server download and use build dependencies from this server
1738                           url
1739   --with-builddeps-dir    store downloaded build dependencies here
1740                           [/localhome/builddeps]
1741   --with-builddeps-group  chgrp the downloaded build dependencies to this
1742                           group
1743   --with-cacerts-file     specify alternative cacerts file
1744   --with-milestone        Set milestone value for build [internal]
1745   --with-update-version   Set update version value for build [b00]
1746   --with-build-number     Set build number value for build [b00]
1747   --with-user-release-suffix
1748                           Add a custom string to the version string if build
1749                           number isn't set.[username_builddateb00]
1750   --with-boot-jdk         path to Boot JDK (used to bootstrap build) [probed]
1751   --with-boot-jdk-jvmargs specify JVM arguments to be passed to all
1752                           invocations of the Boot JDK, overriding the default
1753                           values, e.g --with-boot-jdk-jvmargs="-Xmx8G
1754                           -enableassertions"
1755   --with-add-source-root  for each and every source directory, look in this
1756                           additional source root for the same directory; if it
1757                           exists and have files in it, include it in the build
1758   --with-override-source-root
1759                           for each and every source directory, look in this
1760                           override source root for the same directory; if it
1761                           exists, use that directory instead and ignore the
1762                           directory in the original source root
1763   --with-adds-and-overrides
1764                           use the subdirs 'adds' and 'overrides' in the
1765                           specified directory as add-source-root and
1766                           override-source-root
1767   --with-override-langtools
1768                           use this langtools dir for the build
1769   --with-override-corba   use this corba dir for the build
1770   --with-override-jaxp    use this jaxp dir for the build
1771   --with-override-jaxws   use this jaxws dir for the build
1772   --with-override-hotspot use this hotspot dir for the build
1773   --with-override-jdk     use this jdk dir for the build
1774   --with-import-hotspot   import hotspot binaries from this jdk image or
1775                           hotspot build dist dir instead of building from
1776                           source
1777   --with-msvcr-dll        copy this msvcr100.dll into the built JDK (Windows
1778                           only) [probed]
1779   --with-dxsdk            the DirectX SDK (Windows only) [probed]
1780   --with-dxsdk-lib        the DirectX SDK lib directory (Windows only)
1781                           [probed]
1782   --with-dxsdk-include    the DirectX SDK include directory (Windows only)
1783                           [probed]
1784   --with-jtreg            Regression Test Harness [probed]
1785   --with-extra-cflags     extra flags to be used when compiling jdk c-files
1786   --with-extra-cxxflags   extra flags to be used when compiling jdk c++-files
1787   --with-extra-ldflags    extra flags to be used when linking jdk
1788   --with-x                use the X Window System
1789   --with-cups             specify prefix directory for the cups package
1790                           (expecting the headers under PATH/include)
1791   --with-cups-include     specify directory for the cups include files
1792   --with-icu-le           use icu-le from build system or OpenJDK source
1793                           (system, bundled) [bundled]
1794   --with-freetype         specify prefix directory for the freetype2 package
1795                           (expecting the libraries under PATH/lib and the
1796                           headers under PATH/include)
1797   --with-alsa             specify prefix directory for the alsa package
1798                           (expecting the libraries under PATH/lib and the
1799                           headers under PATH/include)
1800   --with-alsa-include     specify directory for the alsa include files
1801   --with-alsa-lib         specify directory for the alsa library
1802   --with-giflib           use giflib from build system or OpenJDK source
1803                           (system, bundled) [bundled]
1804   --with-zlib             use zlib from build system or OpenJDK source
1805                           (system, bundled) [bundled]
1806   --with-stdc++lib=<static>,<dynamic>,<default>
1807                           force linking of the C++ runtime on Linux to either
1808                           static or dynamic, default is static with dynamic as
1809                           fallback
1810   --with-num-cores        number of cores in the build system, e.g.
1811                           --with-num-cores=8 [probed]
1812   --with-memory-size      memory (in MB) available in the build system, e.g.
1813                           --with-memory-size=1024 [probed]
1814   --with-jobs             number of parallel jobs to let make run [calculated
1815                           based on cores and memory]
1816   --with-sjavac-server-java
1817                           use this java binary for running the sjavac
1818                           background server [Boot JDK java]
1819   --with-ccache-dir       where to store ccache files [~/.ccache]
1820 
1821 Some influential environment variables:
1822   PKG_CONFIG  path to pkg-config utility
1823   CC          C compiler command
1824   CFLAGS      C compiler flags
1825   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
1826               nonstandard directory <lib dir>
1827   LIBS        libraries to pass to the linker, e.g. -l<library>
1828   CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
1829               you have headers in a nonstandard directory <include dir>
1830   CXX         C++ compiler command
1831   CXXFLAGS    C++ compiler flags
1832   OBJC        Objective C compiler command
1833   OBJCFLAGS   Objective C compiler flags
1834   CPP         C preprocessor
1835   CXXCPP      C++ preprocessor
1836   XMKMF       Path to xmkmf, Makefile generator for X Window System
1837   ICU_LE_CFLAGS
1838               C compiler flags for ICU_LE, overriding pkg-config
1839   ICU_LE_LIBS linker flags for ICU_LE, overriding pkg-config
1840   FREETYPE2_CFLAGS
1841               C compiler flags for FREETYPE2, overriding pkg-config
1842   FREETYPE2_LIBS
1843               linker flags for FREETYPE2, overriding pkg-config
1844   ALSA_CFLAGS C compiler flags for ALSA, overriding pkg-config
1845   ALSA_LIBS   linker flags for ALSA, overriding pkg-config
1846   LIBFFI_CFLAGS
1847               C compiler flags for LIBFFI, overriding pkg-config
1848   LIBFFI_LIBS linker flags for LIBFFI, overriding pkg-config
1849 
1850 Use these variables to override the choices made by `configure' or to help
1851 it to find libraries and programs with nonstandard names/locations.
1852 
1853 Report bugs to <build-dev@openjdk.java.net>.
1854 OpenJDK home page: <http://openjdk.java.net>.
1855 _ACEOF
1856 ac_status=$?
1857 fi
1858 
1859 if test "$ac_init_help" = "recursive"; then
1860   # If there are subdirs, report their specific --help.
1861   for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
1862     test -d "$ac_dir" ||
1863       { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1864       continue
1865     ac_builddir=.
1866 
1867 case "$ac_dir" in
1868 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1869 *)
1870   ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
1871   # A ".." for each directory in $ac_dir_suffix.
1872   ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
1873   case $ac_top_builddir_sub in
1874   "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1875   *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1876   esac ;;
1877 esac
1878 ac_abs_top_builddir=$ac_pwd
1879 ac_abs_builddir=$ac_pwd$ac_dir_suffix
1880 # for backward compatibility:
1881 ac_top_builddir=$ac_top_build_prefix
1882 
1883 case $srcdir in
1884   .)  # We are building in place.
1885     ac_srcdir=.
1886     ac_top_srcdir=$ac_top_builddir_sub
1887     ac_abs_top_srcdir=$ac_pwd ;;
1888   [\\/]* | ?:[\\/]* )  # Absolute name.
1889     ac_srcdir=$srcdir$ac_dir_suffix;
1890     ac_top_srcdir=$srcdir
1891     ac_abs_top_srcdir=$srcdir ;;
1892   *) # Relative name.
1893     ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1894     ac_top_srcdir=$ac_top_build_prefix$srcdir
1895     ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
1896 esac
1897 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
1898 
1899     cd "$ac_dir" || { ac_status=$?; continue; }
1900     # Check for guested configure.
1901     if test -f "$ac_srcdir/configure.gnu"; then
1902       echo &&
1903       $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1904     elif test -f "$ac_srcdir/configure"; then
1905       echo &&
1906       $SHELL "$ac_srcdir/configure" --help=recursive
1907     else
1908       $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1909     fi || ac_status=$?
1910     cd "$ac_pwd" || { ac_status=$?; break; }
1911   done
1912 fi
1913 
1914 test -n "$ac_init_help" && exit $ac_status
1915 if $ac_init_version; then
1916   cat <<\_ACEOF
1917 OpenJDK configure jdk8
1918 generated by GNU Autoconf 2.68
1919 
1920 Copyright (C) 2010 Free Software Foundation, Inc.
1921 This configure script is free software; the Free Software Foundation
1922 gives unlimited permission to copy, distribute and modify it.
1923 _ACEOF
1924   exit
1925 fi
1926 
1927 ## ------------------------ ##
1928 ## Autoconf initialization. ##
1929 ## ------------------------ ##
1930 
1931 # ac_fn_c_try_compile LINENO
1932 # --------------------------
1933 # Try to compile conftest.$ac_ext, and return whether this succeeded.
1934 ac_fn_c_try_compile ()
1935 {
1936   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1937   rm -f conftest.$ac_objext
1938   if { { ac_try="$ac_compile"
1939 case "(($ac_try" in
1940   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1941   *) ac_try_echo=$ac_try;;
1942 esac
1943 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1944 $as_echo "$ac_try_echo"; } >&5
1945   (eval "$ac_compile") 2>conftest.err
1946   ac_status=$?
1947   if test -s conftest.err; then
1948     grep -v '^ *+' conftest.err >conftest.er1
1949     cat conftest.er1 >&5
1950     mv -f conftest.er1 conftest.err
1951   fi
1952   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1953   test $ac_status = 0; } && {
1954          test -z "$ac_c_werror_flag" ||
1955          test ! -s conftest.err
1956        } && test -s conftest.$ac_objext; then :
1957   ac_retval=0
1958 else
1959   $as_echo "$as_me: failed program was:" >&5
1960 sed 's/^/| /' conftest.$ac_ext >&5
1961 
1962         ac_retval=1
1963 fi
1964   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1965   as_fn_set_status $ac_retval
1966 
1967 } # ac_fn_c_try_compile
1968 
1969 # ac_fn_cxx_try_compile LINENO
1970 # ----------------------------
1971 # Try to compile conftest.$ac_ext, and return whether this succeeded.
1972 ac_fn_cxx_try_compile ()
1973 {
1974   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1975   rm -f conftest.$ac_objext
1976   if { { ac_try="$ac_compile"
1977 case "(($ac_try" in
1978   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1979   *) ac_try_echo=$ac_try;;
1980 esac
1981 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1982 $as_echo "$ac_try_echo"; } >&5
1983   (eval "$ac_compile") 2>conftest.err
1984   ac_status=$?
1985   if test -s conftest.err; then
1986     grep -v '^ *+' conftest.err >conftest.er1
1987     cat conftest.er1 >&5
1988     mv -f conftest.er1 conftest.err
1989   fi
1990   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1991   test $ac_status = 0; } && {
1992          test -z "$ac_cxx_werror_flag" ||
1993          test ! -s conftest.err
1994        } && test -s conftest.$ac_objext; then :
1995   ac_retval=0
1996 else
1997   $as_echo "$as_me: failed program was:" >&5
1998 sed 's/^/| /' conftest.$ac_ext >&5
1999 
2000         ac_retval=1
2001 fi
2002   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2003   as_fn_set_status $ac_retval
2004 
2005 } # ac_fn_cxx_try_compile
2006 
2007 # ac_fn_objc_try_compile LINENO
2008 # -----------------------------
2009 # Try to compile conftest.$ac_ext, and return whether this succeeded.
2010 ac_fn_objc_try_compile ()
2011 {
2012   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2013   rm -f conftest.$ac_objext
2014   if { { ac_try="$ac_compile"
2015 case "(($ac_try" in
2016   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2017   *) ac_try_echo=$ac_try;;
2018 esac
2019 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2020 $as_echo "$ac_try_echo"; } >&5
2021   (eval "$ac_compile") 2>conftest.err
2022   ac_status=$?
2023   if test -s conftest.err; then
2024     grep -v '^ *+' conftest.err >conftest.er1
2025     cat conftest.er1 >&5
2026     mv -f conftest.er1 conftest.err
2027   fi
2028   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2029   test $ac_status = 0; } && {
2030          test -z "$ac_objc_werror_flag" ||
2031          test ! -s conftest.err
2032        } && test -s conftest.$ac_objext; then :
2033   ac_retval=0
2034 else
2035   $as_echo "$as_me: failed program was:" >&5
2036 sed 's/^/| /' conftest.$ac_ext >&5
2037 
2038         ac_retval=1
2039 fi
2040   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2041   as_fn_set_status $ac_retval
2042 
2043 } # ac_fn_objc_try_compile
2044 
2045 # ac_fn_c_try_cpp LINENO
2046 # ----------------------
2047 # Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2048 ac_fn_c_try_cpp ()
2049 {
2050   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2051   if { { ac_try="$ac_cpp conftest.$ac_ext"
2052 case "(($ac_try" in
2053   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2054   *) ac_try_echo=$ac_try;;
2055 esac
2056 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2057 $as_echo "$ac_try_echo"; } >&5
2058   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2059   ac_status=$?
2060   if test -s conftest.err; then
2061     grep -v '^ *+' conftest.err >conftest.er1
2062     cat conftest.er1 >&5
2063     mv -f conftest.er1 conftest.err
2064   fi
2065   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2066   test $ac_status = 0; } > conftest.i && {
2067          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
2068          test ! -s conftest.err
2069        }; then :
2070   ac_retval=0
2071 else
2072   $as_echo "$as_me: failed program was:" >&5
2073 sed 's/^/| /' conftest.$ac_ext >&5
2074 
2075     ac_retval=1
2076 fi
2077   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2078   as_fn_set_status $ac_retval
2079 
2080 } # ac_fn_c_try_cpp
2081 
2082 # ac_fn_cxx_try_cpp LINENO
2083 # ------------------------
2084 # Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2085 ac_fn_cxx_try_cpp ()
2086 {
2087   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2088   if { { ac_try="$ac_cpp conftest.$ac_ext"
2089 case "(($ac_try" in
2090   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2091   *) ac_try_echo=$ac_try;;
2092 esac
2093 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2094 $as_echo "$ac_try_echo"; } >&5
2095   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2096   ac_status=$?
2097   if test -s conftest.err; then
2098     grep -v '^ *+' conftest.err >conftest.er1
2099     cat conftest.er1 >&5
2100     mv -f conftest.er1 conftest.err
2101   fi
2102   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2103   test $ac_status = 0; } > conftest.i && {
2104          test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
2105          test ! -s conftest.err
2106        }; then :
2107   ac_retval=0
2108 else
2109   $as_echo "$as_me: failed program was:" >&5
2110 sed 's/^/| /' conftest.$ac_ext >&5
2111 
2112     ac_retval=1
2113 fi
2114   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2115   as_fn_set_status $ac_retval
2116 
2117 } # ac_fn_cxx_try_cpp
2118 
2119 # ac_fn_cxx_check_header_mongrel LINENO HEADER VAR INCLUDES
2120 # ---------------------------------------------------------
2121 # Tests whether HEADER exists, giving a warning if it cannot be compiled using
2122 # the include files in INCLUDES and setting the cache variable VAR
2123 # accordingly.
2124 ac_fn_cxx_check_header_mongrel ()
2125 {
2126   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2127   if eval \${$3+:} false; then :
2128   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2129 $as_echo_n "checking for $2... " >&6; }
2130 if eval \${$3+:} false; then :
2131   $as_echo_n "(cached) " >&6
2132 fi
2133 eval ac_res=\$$3
2134                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2135 $as_echo "$ac_res" >&6; }
2136 else
2137   # Is the header compilable?
2138 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
2139 $as_echo_n "checking $2 usability... " >&6; }
2140 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2141 /* end confdefs.h.  */
2142 $4
2143 #include <$2>
2144 _ACEOF
2145 if ac_fn_cxx_try_compile "$LINENO"; then :
2146   ac_header_compiler=yes
2147 else
2148   ac_header_compiler=no
2149 fi
2150 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2151 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
2152 $as_echo "$ac_header_compiler" >&6; }
2153 
2154 # Is the header present?
2155 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
2156 $as_echo_n "checking $2 presence... " >&6; }
2157 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2158 /* end confdefs.h.  */
2159 #include <$2>
2160 _ACEOF
2161 if ac_fn_cxx_try_cpp "$LINENO"; then :
2162   ac_header_preproc=yes
2163 else
2164   ac_header_preproc=no
2165 fi
2166 rm -f conftest.err conftest.i conftest.$ac_ext
2167 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
2168 $as_echo "$ac_header_preproc" >&6; }
2169 
2170 # So?  What about this header?
2171 case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in #((
2172   yes:no: )
2173     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
2174 $as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
2175     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2176 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2177     ;;
2178   no:yes:* )
2179     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
2180 $as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
2181     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
2182 $as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
2183     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
2184 $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
2185     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
2186 $as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
2187     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2188 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2189 ( $as_echo "## ----------------------------------------- ##
2190 ## Report this to build-dev@openjdk.java.net ##
2191 ## ----------------------------------------- ##"
2192      ) | sed "s/^/$as_me: WARNING:     /" >&2
2193     ;;
2194 esac
2195   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2196 $as_echo_n "checking for $2... " >&6; }
2197 if eval \${$3+:} false; then :
2198   $as_echo_n "(cached) " >&6
2199 else
2200   eval "$3=\$ac_header_compiler"
2201 fi
2202 eval ac_res=\$$3
2203                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2204 $as_echo "$ac_res" >&6; }
2205 fi
2206   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2207 
2208 } # ac_fn_cxx_check_header_mongrel
2209 
2210 # ac_fn_cxx_try_run LINENO
2211 # ------------------------
2212 # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
2213 # that executables *can* be run.
2214 ac_fn_cxx_try_run ()
2215 {
2216   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2217   if { { ac_try="$ac_link"
2218 case "(($ac_try" in
2219   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2220   *) ac_try_echo=$ac_try;;
2221 esac
2222 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2223 $as_echo "$ac_try_echo"; } >&5
2224   (eval "$ac_link") 2>&5
2225   ac_status=$?
2226   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2227   test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
2228   { { case "(($ac_try" in
2229   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2230   *) ac_try_echo=$ac_try;;
2231 esac
2232 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2233 $as_echo "$ac_try_echo"; } >&5
2234   (eval "$ac_try") 2>&5
2235   ac_status=$?
2236   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2237   test $ac_status = 0; }; }; then :
2238   ac_retval=0
2239 else
2240   $as_echo "$as_me: program exited with status $ac_status" >&5
2241        $as_echo "$as_me: failed program was:" >&5
2242 sed 's/^/| /' conftest.$ac_ext >&5
2243 
2244        ac_retval=$ac_status
2245 fi
2246   rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2247   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2248   as_fn_set_status $ac_retval
2249 
2250 } # ac_fn_cxx_try_run
2251 
2252 # ac_fn_cxx_check_header_compile LINENO HEADER VAR INCLUDES
2253 # ---------------------------------------------------------
2254 # Tests whether HEADER exists and can be compiled using the include files in
2255 # INCLUDES, setting the cache variable VAR accordingly.
2256 ac_fn_cxx_check_header_compile ()
2257 {
2258   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2259   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2260 $as_echo_n "checking for $2... " >&6; }
2261 if eval \${$3+:} false; then :
2262   $as_echo_n "(cached) " >&6
2263 else
2264   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2265 /* end confdefs.h.  */
2266 $4
2267 #include <$2>
2268 _ACEOF
2269 if ac_fn_cxx_try_compile "$LINENO"; then :
2270   eval "$3=yes"
2271 else
2272   eval "$3=no"
2273 fi
2274 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2275 fi
2276 eval ac_res=\$$3
2277                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2278 $as_echo "$ac_res" >&6; }
2279   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2280 
2281 } # ac_fn_cxx_check_header_compile
2282 
2283 # ac_fn_cxx_compute_int LINENO EXPR VAR INCLUDES
2284 # ----------------------------------------------
2285 # Tries to find the compile-time value of EXPR in a program that includes
2286 # INCLUDES, setting VAR accordingly. Returns whether the value could be
2287 # computed
2288 ac_fn_cxx_compute_int ()
2289 {
2290   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2291   if test "$cross_compiling" = yes; then
2292     # Depending upon the size, compute the lo and hi bounds.
2293 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2294 /* end confdefs.h.  */
2295 $4
2296 int
2297 main ()
2298 {
2299 static int test_array [1 - 2 * !(($2) >= 0)];
2300 test_array [0] = 0
2301 
2302   ;
2303   return 0;
2304 }
2305 _ACEOF
2306 if ac_fn_cxx_try_compile "$LINENO"; then :
2307   ac_lo=0 ac_mid=0
2308   while :; do
2309     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2310 /* end confdefs.h.  */
2311 $4
2312 int
2313 main ()
2314 {
2315 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2316 test_array [0] = 0
2317 
2318   ;
2319   return 0;
2320 }
2321 _ACEOF
2322 if ac_fn_cxx_try_compile "$LINENO"; then :
2323   ac_hi=$ac_mid; break
2324 else
2325   as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2326                         if test $ac_lo -le $ac_mid; then
2327                           ac_lo= ac_hi=
2328                           break
2329                         fi
2330                         as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2331 fi
2332 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2333   done
2334 else
2335   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2336 /* end confdefs.h.  */
2337 $4
2338 int
2339 main ()
2340 {
2341 static int test_array [1 - 2 * !(($2) < 0)];
2342 test_array [0] = 0
2343 
2344   ;
2345   return 0;
2346 }
2347 _ACEOF
2348 if ac_fn_cxx_try_compile "$LINENO"; then :
2349   ac_hi=-1 ac_mid=-1
2350   while :; do
2351     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2352 /* end confdefs.h.  */
2353 $4
2354 int
2355 main ()
2356 {
2357 static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2358 test_array [0] = 0
2359 
2360   ;
2361   return 0;
2362 }
2363 _ACEOF
2364 if ac_fn_cxx_try_compile "$LINENO"; then :
2365   ac_lo=$ac_mid; break
2366 else
2367   as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2368                         if test $ac_mid -le $ac_hi; then
2369                           ac_lo= ac_hi=
2370                           break
2371                         fi
2372                         as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2373 fi
2374 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2375   done
2376 else
2377   ac_lo= ac_hi=
2378 fi
2379 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2380 fi
2381 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2382 # Binary search between lo and hi bounds.
2383 while test "x$ac_lo" != "x$ac_hi"; do
2384   as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2385   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2386 /* end confdefs.h.  */
2387 $4
2388 int
2389 main ()
2390 {
2391 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2392 test_array [0] = 0
2393 
2394   ;
2395   return 0;
2396 }
2397 _ACEOF
2398 if ac_fn_cxx_try_compile "$LINENO"; then :
2399   ac_hi=$ac_mid
2400 else
2401   as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2402 fi
2403 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2404 done
2405 case $ac_lo in #((
2406 ?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2407 '') ac_retval=1 ;;
2408 esac
2409   else
2410     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2411 /* end confdefs.h.  */
2412 $4
2413 static long int longval () { return $2; }
2414 static unsigned long int ulongval () { return $2; }
2415 #include <stdio.h>
2416 #include <stdlib.h>
2417 int
2418 main ()
2419 {
2420 
2421   FILE *f = fopen ("conftest.val", "w");
2422   if (! f)
2423     return 1;
2424   if (($2) < 0)
2425     {
2426       long int i = longval ();
2427       if (i != ($2))
2428         return 1;
2429       fprintf (f, "%ld", i);
2430     }
2431   else
2432     {
2433       unsigned long int i = ulongval ();
2434       if (i != ($2))
2435         return 1;
2436       fprintf (f, "%lu", i);
2437     }
2438   /* Do not output a trailing newline, as this causes \r\n confusion
2439      on some platforms.  */
2440   return ferror (f) || fclose (f) != 0;
2441 
2442   ;
2443   return 0;
2444 }
2445 _ACEOF
2446 if ac_fn_cxx_try_run "$LINENO"; then :
2447   echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2448 else
2449   ac_retval=1
2450 fi
2451 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2452   conftest.$ac_objext conftest.beam conftest.$ac_ext
2453 rm -f conftest.val
2454 
2455   fi
2456   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2457   as_fn_set_status $ac_retval
2458 
2459 } # ac_fn_cxx_compute_int
2460 
2461 # ac_fn_cxx_try_link LINENO
2462 # -------------------------
2463 # Try to link conftest.$ac_ext, and return whether this succeeded.
2464 ac_fn_cxx_try_link ()
2465 {
2466   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2467   rm -f conftest.$ac_objext conftest$ac_exeext
2468   if { { ac_try="$ac_link"
2469 case "(($ac_try" in
2470   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2471   *) ac_try_echo=$ac_try;;
2472 esac
2473 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2474 $as_echo "$ac_try_echo"; } >&5
2475   (eval "$ac_link") 2>conftest.err
2476   ac_status=$?
2477   if test -s conftest.err; then
2478     grep -v '^ *+' conftest.err >conftest.er1
2479     cat conftest.er1 >&5
2480     mv -f conftest.er1 conftest.err
2481   fi
2482   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2483   test $ac_status = 0; } && {
2484          test -z "$ac_cxx_werror_flag" ||
2485          test ! -s conftest.err
2486        } && test -s conftest$ac_exeext && {
2487          test "$cross_compiling" = yes ||
2488          $as_test_x conftest$ac_exeext
2489        }; then :
2490   ac_retval=0
2491 else
2492   $as_echo "$as_me: failed program was:" >&5
2493 sed 's/^/| /' conftest.$ac_ext >&5
2494 
2495         ac_retval=1
2496 fi
2497   # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2498   # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2499   # interfere with the next link command; also delete a directory that is
2500   # left behind by Apple's compiler.  We do this before executing the actions.
2501   rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2502   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2503   as_fn_set_status $ac_retval
2504 
2505 } # ac_fn_cxx_try_link
2506 
2507 # ac_fn_cxx_check_func LINENO FUNC VAR
2508 # ------------------------------------
2509 # Tests whether FUNC exists, setting the cache variable VAR accordingly
2510 ac_fn_cxx_check_func ()
2511 {
2512   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2513   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2514 $as_echo_n "checking for $2... " >&6; }
2515 if eval \${$3+:} false; then :
2516   $as_echo_n "(cached) " >&6
2517 else
2518   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2519 /* end confdefs.h.  */
2520 /* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2521    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
2522 #define $2 innocuous_$2
2523 
2524 /* System header to define __stub macros and hopefully few prototypes,
2525     which can conflict with char $2 (); below.
2526     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2527     <limits.h> exists even on freestanding compilers.  */
2528 
2529 #ifdef __STDC__
2530 # include <limits.h>
2531 #else
2532 # include <assert.h>
2533 #endif
2534 
2535 #undef $2
2536 
2537 /* Override any GCC internal prototype to avoid an error.
2538    Use char because int might match the return type of a GCC
2539    builtin and then its argument prototype would still apply.  */
2540 #ifdef __cplusplus
2541 extern "C"
2542 #endif
2543 char $2 ();
2544 /* The GNU C library defines this for functions which it implements
2545     to always fail with ENOSYS.  Some functions are actually named
2546     something starting with __ and the normal name is an alias.  */
2547 #if defined __stub_$2 || defined __stub___$2
2548 choke me
2549 #endif
2550 
2551 int
2552 main ()
2553 {
2554 return $2 ();
2555   ;
2556   return 0;
2557 }
2558 _ACEOF
2559 if ac_fn_cxx_try_link "$LINENO"; then :
2560   eval "$3=yes"
2561 else
2562   eval "$3=no"
2563 fi
2564 rm -f core conftest.err conftest.$ac_objext \
2565     conftest$ac_exeext conftest.$ac_ext
2566 fi
2567 eval ac_res=\$$3
2568                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2569 $as_echo "$ac_res" >&6; }
2570   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2571 
2572 } # ac_fn_cxx_check_func
2573 
2574 # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
2575 # -------------------------------------------------------
2576 # Tests whether HEADER exists and can be compiled using the include files in
2577 # INCLUDES, setting the cache variable VAR accordingly.
2578 ac_fn_c_check_header_compile ()
2579 {
2580   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2581   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2582 $as_echo_n "checking for $2... " >&6; }
2583 if eval \${$3+:} false; then :
2584   $as_echo_n "(cached) " >&6
2585 else
2586   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2587 /* end confdefs.h.  */
2588 $4
2589 #include <$2>
2590 _ACEOF
2591 if ac_fn_c_try_compile "$LINENO"; then :
2592   eval "$3=yes"
2593 else
2594   eval "$3=no"
2595 fi
2596 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2597 fi
2598 eval ac_res=\$$3
2599                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2600 $as_echo "$ac_res" >&6; }
2601   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2602 
2603 } # ac_fn_c_check_header_compile
2604 cat >config.log <<_ACEOF
2605 This file contains any messages produced by compilers while
2606 running configure, to aid debugging if configure makes a mistake.
2607 
2608 It was created by OpenJDK $as_me jdk8, which was
2609 generated by GNU Autoconf 2.68.  Invocation command line was
2610 
2611   $ $0 $@
2612 
2613 _ACEOF
2614 exec 5>>config.log
2615 {
2616 cat <<_ASUNAME
2617 ## --------- ##
2618 ## Platform. ##
2619 ## --------- ##
2620 
2621 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2622 uname -m = `(uname -m) 2>/dev/null || echo unknown`
2623 uname -r = `(uname -r) 2>/dev/null || echo unknown`
2624 uname -s = `(uname -s) 2>/dev/null || echo unknown`
2625 uname -v = `(uname -v) 2>/dev/null || echo unknown`
2626 
2627 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2628 /bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
2629 
2630 /bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
2631 /usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
2632 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2633 /usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
2634 /bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
2635 /usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
2636 /bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
2637 
2638 _ASUNAME
2639 
2640 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2641 for as_dir in $PATH
2642 do
2643   IFS=$as_save_IFS
2644   test -z "$as_dir" && as_dir=.
2645     $as_echo "PATH: $as_dir"
2646   done
2647 IFS=$as_save_IFS
2648 
2649 } >&5
2650 
2651 cat >&5 <<_ACEOF
2652 
2653 
2654 ## ----------- ##
2655 ## Core tests. ##
2656 ## ----------- ##
2657 
2658 _ACEOF
2659 
2660 
2661 # Keep a trace of the command line.
2662 # Strip out --no-create and --no-recursion so they do not pile up.
2663 # Strip out --silent because we don't want to record it for future runs.
2664 # Also quote any args containing shell meta-characters.
2665 # Make two passes to allow for proper duplicate-argument suppression.
2666 ac_configure_args=
2667 ac_configure_args0=
2668 ac_configure_args1=
2669 ac_must_keep_next=false
2670 for ac_pass in 1 2
2671 do
2672   for ac_arg
2673   do
2674     case $ac_arg in
2675     -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2676     -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2677     | -silent | --silent | --silen | --sile | --sil)
2678       continue ;;
2679     *\'*)
2680       ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2681     esac
2682     case $ac_pass in
2683     1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2684     2)
2685       as_fn_append ac_configure_args1 " '$ac_arg'"
2686       if test $ac_must_keep_next = true; then
2687         ac_must_keep_next=false # Got value, back to normal.
2688       else
2689         case $ac_arg in
2690           *=* | --config-cache | -C | -disable-* | --disable-* \
2691           | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2692           | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2693           | -with-* | --with-* | -without-* | --without-* | --x)
2694             case "$ac_configure_args0 " in
2695               "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2696             esac
2697             ;;
2698           -* ) ac_must_keep_next=true ;;
2699         esac
2700       fi
2701       as_fn_append ac_configure_args " '$ac_arg'"
2702       ;;
2703     esac
2704   done
2705 done
2706 { ac_configure_args0=; unset ac_configure_args0;}
2707 { ac_configure_args1=; unset ac_configure_args1;}
2708 
2709 # When interrupted or exit'd, cleanup temporary files, and complete
2710 # config.log.  We remove comments because anyway the quotes in there
2711 # would cause problems or look ugly.
2712 # WARNING: Use '\'' to represent an apostrophe within the trap.
2713 # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2714 trap 'exit_status=$?
2715   # Save into config.log some information that might help in debugging.
2716   {
2717     echo
2718 
2719     $as_echo "## ---------------- ##
2720 ## Cache variables. ##
2721 ## ---------------- ##"
2722     echo
2723     # The following way of writing the cache mishandles newlines in values,
2724 (
2725   for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2726     eval ac_val=\$$ac_var
2727     case $ac_val in #(
2728     *${as_nl}*)
2729       case $ac_var in #(
2730       *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2731 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
2732       esac
2733       case $ac_var in #(
2734       _ | IFS | as_nl) ;; #(
2735       BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2736       *) { eval $ac_var=; unset $ac_var;} ;;
2737       esac ;;
2738     esac
2739   done
2740   (set) 2>&1 |
2741     case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2742     *${as_nl}ac_space=\ *)
2743       sed -n \
2744         "s/'\''/'\''\\\\'\'''\''/g;
2745           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2746       ;; #(
2747     *)
2748       sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
2749       ;;
2750     esac |
2751     sort
2752 )
2753     echo
2754 
2755     $as_echo "## ----------------- ##
2756 ## Output variables. ##
2757 ## ----------------- ##"
2758     echo
2759     for ac_var in $ac_subst_vars
2760     do
2761       eval ac_val=\$$ac_var
2762       case $ac_val in
2763       *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2764       esac
2765       $as_echo "$ac_var='\''$ac_val'\''"
2766     done | sort
2767     echo
2768 
2769     if test -n "$ac_subst_files"; then
2770       $as_echo "## ------------------- ##
2771 ## File substitutions. ##
2772 ## ------------------- ##"
2773       echo
2774       for ac_var in $ac_subst_files
2775       do
2776         eval ac_val=\$$ac_var
2777         case $ac_val in
2778         *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2779         esac
2780         $as_echo "$ac_var='\''$ac_val'\''"
2781       done | sort
2782       echo
2783     fi
2784 
2785     if test -s confdefs.h; then
2786       $as_echo "## ----------- ##
2787 ## confdefs.h. ##
2788 ## ----------- ##"
2789       echo
2790       cat confdefs.h
2791       echo
2792     fi
2793     test "$ac_signal" != 0 &&
2794       $as_echo "$as_me: caught signal $ac_signal"
2795     $as_echo "$as_me: exit $exit_status"
2796   } >&5
2797   rm -f core *.core core.conftest.* &&
2798     rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
2799     exit $exit_status
2800 ' 0
2801 for ac_signal in 1 2 13 15; do
2802   trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
2803 done
2804 ac_signal=0
2805 
2806 # confdefs.h avoids OS command line length limits that DEFS can exceed.
2807 rm -f -r conftest* confdefs.h
2808 
2809 $as_echo "/* confdefs.h */" > confdefs.h
2810 
2811 # Predefined preprocessor variables.
2812 
2813 cat >>confdefs.h <<_ACEOF
2814 #define PACKAGE_NAME "$PACKAGE_NAME"
2815 _ACEOF
2816 
2817 cat >>confdefs.h <<_ACEOF
2818 #define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2819 _ACEOF
2820 
2821 cat >>confdefs.h <<_ACEOF
2822 #define PACKAGE_VERSION "$PACKAGE_VERSION"
2823 _ACEOF
2824 
2825 cat >>confdefs.h <<_ACEOF
2826 #define PACKAGE_STRING "$PACKAGE_STRING"
2827 _ACEOF
2828 
2829 cat >>confdefs.h <<_ACEOF
2830 #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2831 _ACEOF
2832 
2833 cat >>confdefs.h <<_ACEOF
2834 #define PACKAGE_URL "$PACKAGE_URL"
2835 _ACEOF
2836 
2837 
2838 # Let the site file select an alternate cache file if it wants to.
2839 # Prefer an explicitly selected file to automatically selected ones.
2840 ac_site_file1=NONE
2841 ac_site_file2=NONE
2842 if test -n "$CONFIG_SITE"; then
2843   # We do not want a PATH search for config.site.
2844   case $CONFIG_SITE in #((
2845     -*)  ac_site_file1=./$CONFIG_SITE;;
2846     */*) ac_site_file1=$CONFIG_SITE;;
2847     *)   ac_site_file1=./$CONFIG_SITE;;
2848   esac
2849 elif test "x$prefix" != xNONE; then
2850   ac_site_file1=$prefix/share/config.site
2851   ac_site_file2=$prefix/etc/config.site
2852 else
2853   ac_site_file1=$ac_default_prefix/share/config.site
2854   ac_site_file2=$ac_default_prefix/etc/config.site
2855 fi
2856 for ac_site_file in "$ac_site_file1" "$ac_site_file2"
2857 do
2858   test "x$ac_site_file" = xNONE && continue
2859   if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2860     { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2861 $as_echo "$as_me: loading site script $ac_site_file" >&6;}
2862     sed 's/^/| /' "$ac_site_file" >&5
2863     . "$ac_site_file" \
2864       || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2865 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2866 as_fn_error $? "failed to load site script $ac_site_file
2867 See \`config.log' for more details" "$LINENO" 5; }
2868   fi
2869 done
2870 
2871 if test -r "$cache_file"; then
2872   # Some versions of bash will fail to source /dev/null (special files
2873   # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
2874   if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2875     { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2876 $as_echo "$as_me: loading cache $cache_file" >&6;}
2877     case $cache_file in
2878       [\\/]* | ?:[\\/]* ) . "$cache_file";;
2879       *)                      . "./$cache_file";;
2880     esac
2881   fi
2882 else
2883   { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2884 $as_echo "$as_me: creating cache $cache_file" >&6;}
2885   >$cache_file
2886 fi
2887 
2888 # Check that the precious variables saved in the cache have kept the same
2889 # value.
2890 ac_cache_corrupted=false
2891 for ac_var in $ac_precious_vars; do
2892   eval ac_old_set=\$ac_cv_env_${ac_var}_set
2893   eval ac_new_set=\$ac_env_${ac_var}_set
2894   eval ac_old_val=\$ac_cv_env_${ac_var}_value
2895   eval ac_new_val=\$ac_env_${ac_var}_value
2896   case $ac_old_set,$ac_new_set in
2897     set,)
2898       { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2899 $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
2900       ac_cache_corrupted=: ;;
2901     ,set)
2902       { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2903 $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
2904       ac_cache_corrupted=: ;;
2905     ,);;
2906     *)
2907       if test "x$ac_old_val" != "x$ac_new_val"; then
2908         # differences in whitespace do not lead to failure.
2909         ac_old_val_w=`echo x $ac_old_val`
2910         ac_new_val_w=`echo x $ac_new_val`
2911         if test "$ac_old_val_w" != "$ac_new_val_w"; then
2912           { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2913 $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2914           ac_cache_corrupted=:
2915         else
2916           { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2917 $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2918           eval $ac_var=\$ac_old_val
2919         fi
2920         { $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
2921 $as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
2922         { $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
2923 $as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
2924       fi;;
2925   esac
2926   # Pass precious variables to config.status.
2927   if test "$ac_new_set" = set; then
2928     case $ac_new_val in
2929     *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
2930     *) ac_arg=$ac_var=$ac_new_val ;;
2931     esac
2932     case " $ac_configure_args " in
2933       *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
2934       *) as_fn_append ac_configure_args " '$ac_arg'" ;;
2935     esac
2936   fi
2937 done
2938 if $ac_cache_corrupted; then
2939   { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2940 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2941   { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2942 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
2943   as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
2944 fi
2945 ## -------------------- ##
2946 ## Main body of script. ##
2947 ## -------------------- ##
2948 
2949 ac_ext=c
2950 ac_cpp='$CPP $CPPFLAGS'
2951 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2952 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2953 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2954 
2955 
2956 
2957 ac_aux_dir=
2958 for ac_dir in build-aux "$srcdir"/build-aux; do
2959   if test -f "$ac_dir/install-sh"; then
2960     ac_aux_dir=$ac_dir
2961     ac_install_sh="$ac_aux_dir/install-sh -c"
2962     break
2963   elif test -f "$ac_dir/install.sh"; then
2964     ac_aux_dir=$ac_dir
2965     ac_install_sh="$ac_aux_dir/install.sh -c"
2966     break
2967   elif test -f "$ac_dir/shtool"; then
2968     ac_aux_dir=$ac_dir
2969     ac_install_sh="$ac_aux_dir/shtool install -c"
2970     break
2971   fi
2972 done
2973 if test -z "$ac_aux_dir"; then
2974   as_fn_error $? "cannot find install-sh, install.sh, or shtool in build-aux \"$srcdir\"/build-aux" "$LINENO" 5
2975 fi
2976 
2977 # These three variables are undocumented and unsupported,
2978 # and are intended to be withdrawn in a future Autoconf release.
2979 # They can cause serious problems if a builder's source tree is in a directory
2980 # whose full name contains unusual characters.
2981 ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
2982 ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
2983 ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
2984 
2985 
2986 # pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
2987 
2988 #
2989 # Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
2990 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
2991 #
2992 # This code is free software; you can redistribute it and/or modify it
2993 # under the terms of the GNU General Public License version 2 only, as
2994 # published by the Free Software Foundation.  Oracle designates this
2995 # particular file as subject to the "Classpath" exception as provided
2996 # by Oracle in the LICENSE file that accompanied this code.
2997 #
2998 # This code is distributed in the hope that it will be useful, but WITHOUT
2999 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3000 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3001 # version 2 for more details (a copy is included in the LICENSE file that
3002 # accompanied this code).
3003 #
3004 # You should have received a copy of the GNU General Public License version
3005 # 2 along with this work; if not, write to the Free Software Foundation,
3006 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3007 #
3008 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3009 # or visit www.oracle.com if you need additional information or have any
3010 # questions.
3011 #
3012 
3013 #
3014 # Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
3015 #
3016 # This program is free software; you can redistribute it and/or modify
3017 # it under the terms of the GNU General Public License as published by
3018 # the Free Software Foundation; either version 2 of the License, or
3019 # (at your option) any later version.
3020 #
3021 # This program is distributed in the hope that it will be useful, but
3022 # WITHOUT ANY WARRANTY; without even the implied warranty of
3023 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
3024 # General Public License for more details.
3025 #
3026 # You should have received a copy of the GNU General Public License
3027 # along with this program; if not, write to the Free Software
3028 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
3029 #
3030 # As a special exception to the GNU General Public License, if you
3031 # distribute this file as part of a program that contains a
3032 # configuration script generated by Autoconf, you may include it under
3033 # the same distribution terms that you use for the rest of that program.
3034 
3035 # PKG_PROG_PKG_CONFIG([MIN-VERSION])
3036 # ----------------------------------
3037 # PKG_PROG_PKG_CONFIG
3038 
3039 # PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
3040 #
3041 # Check to see whether a particular set of modules exists.  Similar
3042 # to PKG_CHECK_MODULES(), but does not set variables or print errors.
3043 #
3044 #
3045 # Similar to PKG_CHECK_MODULES, make sure that the first instance of
3046 # this or PKG_CHECK_MODULES is called, or make sure to call
3047 # PKG_CHECK_EXISTS manually
3048 # --------------------------------------------------------------
3049 
3050 
3051 
3052 # _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
3053 # ---------------------------------------------
3054 # _PKG_CONFIG
3055 
3056 # _PKG_SHORT_ERRORS_SUPPORTED
3057 # -----------------------------
3058 # _PKG_SHORT_ERRORS_SUPPORTED
3059 
3060 
3061 # PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
3062 # [ACTION-IF-NOT-FOUND])
3063 #
3064 #
3065 # Note that if there is a possibility the first call to
3066 # PKG_CHECK_MODULES might not happen, you should be sure to include an
3067 # explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
3068 #
3069 #
3070 # --------------------------------------------------------------
3071 # PKG_CHECK_MODULES
3072 
3073 
3074 # Include these first...
3075 #
3076 # Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
3077 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3078 #
3079 # This code is free software; you can redistribute it and/or modify it
3080 # under the terms of the GNU General Public License version 2 only, as
3081 # published by the Free Software Foundation.  Oracle designates this
3082 # particular file as subject to the "Classpath" exception as provided
3083 # by Oracle in the LICENSE file that accompanied this code.
3084 #
3085 # This code is distributed in the hope that it will be useful, but WITHOUT
3086 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3087 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3088 # version 2 for more details (a copy is included in the LICENSE file that
3089 # accompanied this code).
3090 #
3091 # You should have received a copy of the GNU General Public License version
3092 # 2 along with this work; if not, write to the Free Software Foundation,
3093 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3094 #
3095 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3096 # or visit www.oracle.com if you need additional information or have any
3097 # questions.
3098 #
3099 
3100 # Test if $1 is a valid argument to $3 (often is $JAVA passed as $3)
3101 # If so, then append $1 to $2\
3102 # Also set JVM_ARG_OK to true/false depending on outcome.
3103 
3104 
3105 # This will make sure the given variable points to a full and proper
3106 # path. This means:
3107 # 1) There will be no spaces in the path. On posix platforms,
3108 #    spaces in the path will result in an error. On Windows,
3109 #    the path will be rewritten using short-style to be space-free.
3110 # 2) The path will be absolute, and it will be in unix-style (on
3111 #     cygwin).
3112 # $1: The name of the variable to fix
3113 
3114 
3115 # This will make sure the given variable points to a executable
3116 # with a full and proper path. This means:
3117 # 1) There will be no spaces in the path. On posix platforms,
3118 #    spaces in the path will result in an error. On Windows,
3119 #    the path will be rewritten using short-style to be space-free.
3120 # 2) The path will be absolute, and it will be in unix-style (on
3121 #     cygwin).
3122 # Any arguments given to the executable is preserved.
3123 # If the input variable does not have a directory specification, then
3124 # it need to be in the PATH.
3125 # $1: The name of the variable to fix
3126 
3127 
3128 
3129 
3130 
3131 
3132 # Test that variable $1 denoting a program is not empty. If empty, exit with an error.
3133 # $1: variable to check
3134 # $2: executable name to print in warning (optional)
3135 
3136 
3137 # Does AC_PATH_PROG followed by BASIC_CHECK_NONEMPTY.
3138 # Arguments as AC_PATH_PROG:
3139 # $1: variable to set
3140 # $2: executable name to look for
3141 
3142 
3143 # Setup the most fundamental tools that relies on not much else to set up,
3144 # but is used by much of the early bootstrap code.
3145 
3146 
3147 # Setup basic configuration paths, and platform-specific stuff related to PATHs.
3148 
3149 
3150 
3151 
3152 
3153 
3154 
3155 #%%% Simple tools %%%
3156 
3157 # Check if we have found a usable version of make
3158 # $1: the path to a potential make binary (or empty)
3159 # $2: the description on how we found this
3160 
3161 
3162 # Goes looking for a usable version of GNU make.
3163 
3164 
3165 
3166 
3167 
3168 
3169 # Check if build directory is on local disk. If not possible to determine,
3170 # we prefer to claim it's local.
3171 # Argument 1: directory to test
3172 # Argument 2: what to do if it is on local disk
3173 # Argument 3: what to do otherwise (remote disk or failure)
3174 
3175 
3176 # Check that source files have basic read permissions set. This might
3177 # not be the case in cygwin in certain conditions.
3178 
3179 
3180 
3181 
3182 #
3183 # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3184 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3185 #
3186 # This code is free software; you can redistribute it and/or modify it
3187 # under the terms of the GNU General Public License version 2 only, as
3188 # published by the Free Software Foundation.  Oracle designates this
3189 # particular file as subject to the "Classpath" exception as provided
3190 # by Oracle in the LICENSE file that accompanied this code.
3191 #
3192 # This code is distributed in the hope that it will be useful, but WITHOUT
3193 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3194 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3195 # version 2 for more details (a copy is included in the LICENSE file that
3196 # accompanied this code).
3197 #
3198 # You should have received a copy of the GNU General Public License version
3199 # 2 along with this work; if not, write to the Free Software Foundation,
3200 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3201 #
3202 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3203 # or visit www.oracle.com if you need additional information or have any
3204 # questions.
3205 #
3206 
3207 
3208 
3209 
3210 
3211 # Helper function which possibly converts a path using DOS-style short mode.
3212 # If so, the updated path is stored in $new_path.
3213 # $1: The path to check
3214 
3215 
3216 # Helper function which possibly converts a path using DOS-style short mode.
3217 # If so, the updated path is stored in $new_path.
3218 # $1: The path to check
3219 
3220 
3221 # FIXME: The BASIC_FIXUP_*_CYGWIN/MSYS is most likely too convoluted
3222 # and could probably be heavily simplified. However, all changes in this
3223 # area tend to need lot of testing in different scenarios, and in lack of
3224 # proper unit testing, cleaning this up has not been deemed worth the effort
3225 # at the moment.
3226 
3227 
3228 
3229 
3230 
3231 
3232 
3233 
3234 
3235 # Setup basic configuration paths, and platform-specific stuff related to PATHs.
3236 
3237 
3238 
3239 
3240 #
3241 # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3242 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3243 #
3244 # This code is free software; you can redistribute it and/or modify it
3245 # under the terms of the GNU General Public License version 2 only, as
3246 # published by the Free Software Foundation.  Oracle designates this
3247 # particular file as subject to the "Classpath" exception as provided
3248 # by Oracle in the LICENSE file that accompanied this code.
3249 #
3250 # This code is distributed in the hope that it will be useful, but WITHOUT
3251 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3252 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3253 # version 2 for more details (a copy is included in the LICENSE file that
3254 # accompanied this code).
3255 #
3256 # You should have received a copy of the GNU General Public License version
3257 # 2 along with this work; if not, write to the Free Software Foundation,
3258 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3259 #
3260 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3261 # or visit www.oracle.com if you need additional information or have any
3262 # questions.
3263 #
3264 
3265 
3266 
3267 
3268 
3269 
3270 
3271 
3272 
3273 
3274 
3275 # ... then the rest
3276 #
3277 # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3278 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3279 #
3280 # This code is free software; you can redistribute it and/or modify it
3281 # under the terms of the GNU General Public License version 2 only, as
3282 # published by the Free Software Foundation.  Oracle designates this
3283 # particular file as subject to the "Classpath" exception as provided
3284 # by Oracle in the LICENSE file that accompanied this code.
3285 #
3286 # This code is distributed in the hope that it will be useful, but WITHOUT
3287 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3288 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3289 # version 2 for more details (a copy is included in the LICENSE file that
3290 # accompanied this code).
3291 #
3292 # You should have received a copy of the GNU General Public License version
3293 # 2 along with this work; if not, write to the Free Software Foundation,
3294 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3295 #
3296 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3297 # or visit www.oracle.com if you need additional information or have any
3298 # questions.
3299 #
3300 
3301 # Execute the check given as argument, and verify the result
3302 # If the Boot JDK was previously found, do nothing
3303 # $1 A command line (typically autoconf macro) to execute
3304 
3305 
3306 # Test: Is bootjdk explicitely set by command line arguments?
3307 
3308 
3309 # Test: Is bootjdk available from builddeps?
3310 
3311 
3312 # Test: Is $JAVA_HOME set?
3313 
3314 
3315 # Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
3316 
3317 
3318 # Test: Is there a /usr/libexec/java_home? (Typically on MacOSX)
3319 
3320 
3321 # Look for a jdk in the given path. If there are multiple, try to select the newest.
3322 # If found, set BOOT_JDK and BOOT_JDK_FOUND.
3323 # $1 = Path to directory containing jdk installations.
3324 # $2 = String to append to the found JDK directory to get the proper JDK home
3325 
3326 
3327 # Call BOOTJDK_FIND_BEST_JDK_IN_DIRECTORY, but use the given
3328 # environmental variable as base for where to look.
3329 # $1 Name of an environmal variable, assumed to point to the Program Files directory.
3330 
3331 
3332 # Test: Is there a JDK installed in default, well-known locations?
3333 
3334 
3335 # Check that a command-line tool in the Boot JDK is correct
3336 # $1 = name of variable to assign
3337 # $2 = name of binary
3338 
3339 
3340 ###############################################################################
3341 #
3342 # We need a Boot JDK to bootstrap the build.
3343 #
3344 
3345 
3346 
3347 
3348 
3349 #
3350 # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3351 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3352 #
3353 # This code is free software; you can redistribute it and/or modify it
3354 # under the terms of the GNU General Public License version 2 only, as
3355 # published by the Free Software Foundation.  Oracle designates this
3356 # particular file as subject to the "Classpath" exception as provided
3357 # by Oracle in the LICENSE file that accompanied this code.
3358 #
3359 # This code is distributed in the hope that it will be useful, but WITHOUT
3360 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3361 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3362 # version 2 for more details (a copy is included in the LICENSE file that
3363 # accompanied this code).
3364 #
3365 # You should have received a copy of the GNU General Public License version
3366 # 2 along with this work; if not, write to the Free Software Foundation,
3367 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3368 #
3369 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3370 # or visit www.oracle.com if you need additional information or have any
3371 # questions.
3372 #
3373 
3374 
3375 
3376 
3377 
3378 
3379 
3380 
3381 
3382 
3383 
3384 
3385 
3386 
3387 
3388 
3389 
3390 
3391 
3392 
3393 #
3394 # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3395 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3396 #
3397 # This code is free software; you can redistribute it and/or modify it
3398 # under the terms of the GNU General Public License version 2 only, as
3399 # published by the Free Software Foundation.  Oracle designates this
3400 # particular file as subject to the "Classpath" exception as provided
3401 # by Oracle in the LICENSE file that accompanied this code.
3402 #
3403 # This code is distributed in the hope that it will be useful, but WITHOUT
3404 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3405 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3406 # version 2 for more details (a copy is included in the LICENSE file that
3407 # accompanied this code).
3408 #
3409 # You should have received a copy of the GNU General Public License version
3410 # 2 along with this work; if not, write to the Free Software Foundation,
3411 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3412 #
3413 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3414 # or visit www.oracle.com if you need additional information or have any
3415 # questions.
3416 #
3417 
3418 
3419 
3420 
3421 
3422 cygwin_help() {
3423     case $1 in
3424     unzip)
3425         PKGHANDLER_COMMAND="cd <location of cygwin setup.exe> && cmd /c setup -q -P unzip" ;;
3426     zip)
3427         PKGHANDLER_COMMAND="cd <location of cygwin setup.exe> && cmd /c setup -q -P zip" ;;
3428     make)
3429         PKGHANDLER_COMMAND="cd <location of cygwin setup.exe> && cmd /c setup -q -P make" ;;
3430     * )
3431        break ;;
3432     esac
3433 }
3434 
3435 apt_help() {
3436     case $1 in
3437     devkit)
3438         PKGHANDLER_COMMAND="sudo apt-get install build-essential" ;;
3439     openjdk)
3440         PKGHANDLER_COMMAND="sudo apt-get install openjdk-7-jdk" ;;
3441     alsa)
3442         PKGHANDLER_COMMAND="sudo apt-get install libasound2-dev" ;;
3443     cups)
3444         PKGHANDLER_COMMAND="sudo apt-get install libcups2-dev" ;;
3445     freetype2)
3446         PKGHANDLER_COMMAND="sudo apt-get install libfreetype6-dev" ;;
3447     pulse)
3448         PKGHANDLER_COMMAND="sudo apt-get install libpulse-dev" ;;
3449     x11)
3450         PKGHANDLER_COMMAND="sudo apt-get install libX11-dev libxext-dev libxrender-dev libxtst-dev" ;;
3451     ccache)
3452         PKGHANDLER_COMMAND="sudo apt-get install ccache" ;;
3453     * )
3454        break ;;
3455     esac
3456 }
3457 
3458 yum_help() {
3459     case $1 in
3460     devkit)
3461         PKGHANDLER_COMMAND="sudo yum groupinstall \"Development Tools\"" ;;
3462     openjdk)
3463         PKGHANDLER_COMMAND="sudo yum install java-1.7.0-openjdk" ;;
3464     alsa)
3465         PKGHANDLER_COMMAND="sudo yum install alsa-lib-devel" ;;
3466     cups)
3467         PKGHANDLER_COMMAND="sudo yum install cups-devel" ;;
3468     freetype2)
3469         PKGHANDLER_COMMAND="sudo yum install freetype2-devel" ;;
3470     pulse)
3471         PKGHANDLER_COMMAND="sudo yum install pulseaudio-libs-devel" ;;
3472     x11)
3473         PKGHANDLER_COMMAND="sudo yum install libXtst-devel" ;;
3474     ccache)
3475         PKGHANDLER_COMMAND="sudo yum install ccache" ;;
3476     * )
3477        break ;;
3478     esac
3479 }
3480 
3481 port_help() {
3482     PKGHANDLER_COMMAND=""
3483 }
3484 
3485 pkgutil_help() {
3486     PKGHANDLER_COMMAND=""
3487 }
3488 
3489 pkgadd_help() {
3490     PKGHANDLER_COMMAND=""
3491 }
3492 
3493 
3494 
3495 #
3496 # Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
3497 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3498 #
3499 # This code is free software; you can redistribute it and/or modify it
3500 # under the terms of the GNU General Public License version 2 only, as
3501 # published by the Free Software Foundation.  Oracle designates this
3502 # particular file as subject to the "Classpath" exception as provided
3503 # by Oracle in the LICENSE file that accompanied this code.
3504 #
3505 # This code is distributed in the hope that it will be useful, but WITHOUT
3506 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3507 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3508 # version 2 for more details (a copy is included in the LICENSE file that
3509 # accompanied this code).
3510 #
3511 # You should have received a copy of the GNU General Public License version
3512 # 2 along with this work; if not, write to the Free Software Foundation,
3513 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3514 #
3515 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3516 # or visit www.oracle.com if you need additional information or have any
3517 # questions.
3518 #
3519 
3520 
3521 
3522 
3523 
3524 
3525 
3526 
3527 ###############################################################################
3528 #
3529 # Should we build only OpenJDK even if closed sources are present?
3530 #
3531 
3532 
3533 
3534 
3535 ###############################################################################
3536 #
3537 # Setup version numbers
3538 #
3539 
3540 
3541 
3542 
3543 
3544 
3545 # Support for customization of the build process. Some build files
3546 # will include counterparts from this location, if they exist. This allows
3547 # for a degree of customization of the build targets and the rules/recipes
3548 # to create them
3549 
3550 # Check whether --with-custom-make-dir was given.
3551 if test "${with_custom_make_dir+set}" = set; then :
3552   withval=$with_custom_make_dir; CUSTOM_MAKE_DIR=$with_custom_make_dir
3553 fi
3554 
3555 
3556 
3557 #
3558 # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3559 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3560 #
3561 # This code is free software; you can redistribute it and/or modify it
3562 # under the terms of the GNU General Public License version 2 only, as
3563 # published by the Free Software Foundation.  Oracle designates this
3564 # particular file as subject to the "Classpath" exception as provided
3565 # by Oracle in the LICENSE file that accompanied this code.
3566 #
3567 # This code is distributed in the hope that it will be useful, but WITHOUT
3568 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3569 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3570 # version 2 for more details (a copy is included in the LICENSE file that
3571 # accompanied this code).
3572 #
3573 # You should have received a copy of the GNU General Public License version
3574 # 2 along with this work; if not, write to the Free Software Foundation,
3575 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3576 #
3577 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3578 # or visit www.oracle.com if you need additional information or have any
3579 # questions.
3580 #
3581 
3582 
3583 
3584 
3585 
3586 
3587 
3588 
3589 
3590 
3591 
3592 
3593 
3594 
3595 
3596 
3597 
3598 #
3599 # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3600 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3601 #
3602 # This code is free software; you can redistribute it and/or modify it
3603 # under the terms of the GNU General Public License version 2 only, as
3604 # published by the Free Software Foundation.  Oracle designates this
3605 # particular file as subject to the "Classpath" exception as provided
3606 # by Oracle in the LICENSE file that accompanied this code.
3607 #
3608 # This code is distributed in the hope that it will be useful, but WITHOUT
3609 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3610 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3611 # version 2 for more details (a copy is included in the LICENSE file that
3612 # accompanied this code).
3613 #
3614 # You should have received a copy of the GNU General Public License version
3615 # 2 along with this work; if not, write to the Free Software Foundation,
3616 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3617 #
3618 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3619 # or visit www.oracle.com if you need additional information or have any
3620 # questions.
3621 #
3622 
3623 # Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
3624 # Converts autoconf style CPU name to OpenJDK style, into
3625 # VAR_CPU, VAR_CPU_ARCH, VAR_CPU_BITS and VAR_CPU_ENDIAN.
3626 
3627 
3628 # Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
3629 # Converts autoconf style OS name to OpenJDK style, into
3630 # VAR_OS and VAR_OS_API.
3631 
3632 
3633 # Expects $host_os $host_cpu $build_os and $build_cpu
3634 # and $with_target_bits to have been setup!
3635 #
3636 # Translate the standard triplet(quadruplet) definition
3637 # of the target/build system into OPENJDK_TARGET_OS, OPENJDK_TARGET_CPU,
3638 # OPENJDK_BUILD_OS, etc.
3639 
3640 
3641 # Check if a reduced build (32-bit on 64-bit platforms) is requested, and modify behaviour
3642 # accordingly. Must be done after setting up build and target system, but before
3643 # doing anything else with these values.
3644 
3645 
3646     # Setup the legacy variables, for controlling the old makefiles.
3647     #
3648 
3649 
3650 
3651 
3652 #%%% Build and target systems %%%
3653 
3654 
3655 
3656 
3657 # Support macro for PLATFORM_SETUP_OPENJDK_TARGET_BITS.
3658 # Add -mX to various FLAGS variables.
3659 
3660 
3661 
3662 
3663 
3664 
3665 #
3666 # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3667 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3668 #
3669 # This code is free software; you can redistribute it and/or modify it
3670 # under the terms of the GNU General Public License version 2 only, as
3671 # published by the Free Software Foundation.  Oracle designates this
3672 # particular file as subject to the "Classpath" exception as provided
3673 # by Oracle in the LICENSE file that accompanied this code.
3674 #
3675 # This code is distributed in the hope that it will be useful, but WITHOUT
3676 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3677 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3678 # version 2 for more details (a copy is included in the LICENSE file that
3679 # accompanied this code).
3680 #
3681 # You should have received a copy of the GNU General Public License version
3682 # 2 along with this work; if not, write to the Free Software Foundation,
3683 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3684 #
3685 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3686 # or visit www.oracle.com if you need additional information or have any
3687 # questions.
3688 #
3689 
3690 
3691 
3692 
3693 
3694 
3695 
3696 
3697 #
3698 # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3699 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3700 #
3701 # This code is free software; you can redistribute it and/or modify it
3702 # under the terms of the GNU General Public License version 2 only, as
3703 # published by the Free Software Foundation.  Oracle designates this
3704 # particular file as subject to the "Classpath" exception as provided
3705 # by Oracle in the LICENSE file that accompanied this code.
3706 #
3707 # This code is distributed in the hope that it will be useful, but WITHOUT
3708 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3709 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3710 # version 2 for more details (a copy is included in the LICENSE file that
3711 # accompanied this code).
3712 #
3713 # You should have received a copy of the GNU General Public License version
3714 # 2 along with this work; if not, write to the Free Software Foundation,
3715 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3716 #
3717 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3718 # or visit www.oracle.com if you need additional information or have any
3719 # questions.
3720 #
3721 
3722 # $1 = compiler to test (CC or CXX)
3723 # $2 = human readable name of compiler (C or C++)
3724 
3725 
3726 
3727 
3728 
3729 # $1 = compiler to test (CC or CXX)
3730 # $2 = human readable name of compiler (C or C++)
3731 # $3 = list of compiler names to search for
3732 
3733 
3734 
3735 
3736 
3737 
3738 
3739 
3740 
3741 
3742 
3743 
3744 
3745 # TOOLCHAIN_COMPILER_CHECK_ARGUMENTS([ARGUMENT], [RUN-IF-TRUE],
3746 #                                   [RUN-IF-FALSE])
3747 # ------------------------------------------------------------
3748 # Check that the c and c++ compilers support an argument
3749 
3750 
3751 
3752 
3753 # Setup the JTREG paths
3754 
3755 
3756 #
3757 # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3758 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3759 #
3760 # This code is free software; you can redistribute it and/or modify it
3761 # under the terms of the GNU General Public License version 2 only, as
3762 # published by the Free Software Foundation.  Oracle designates this
3763 # particular file as subject to the "Classpath" exception as provided
3764 # by Oracle in the LICENSE file that accompanied this code.
3765 #
3766 # This code is distributed in the hope that it will be useful, but WITHOUT
3767 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3768 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3769 # version 2 for more details (a copy is included in the LICENSE file that
3770 # accompanied this code).
3771 #
3772 # You should have received a copy of the GNU General Public License version
3773 # 2 along with this work; if not, write to the Free Software Foundation,
3774 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3775 #
3776 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3777 # or visit www.oracle.com if you need additional information or have any
3778 # questions.
3779 #
3780 
3781 
3782 
3783 
3784 
3785 
3786 
3787 # Check if the VS env variables were setup prior to running configure.
3788 # If not, then find vcvarsall.bat and run it automatically, and integrate
3789 # the set env variables into the spec file.
3790 
3791 
3792 
3793 # Setup the DXSDK paths
3794 
3795 
3796 
3797 
3798 
3799 
3800 # This line needs to be here, verbatim, after all includes and the dummy hook
3801 # definitions. It is replaced with custom functionality when building
3802 # custom sources.
3803 #CUSTOM_AUTOCONF_INCLUDE
3804 
3805 # Do not change or remove the following line, it is needed for consistency checks:
3806 DATE_WHEN_GENERATED=1371547824
3807 
3808 ###############################################################################
3809 #
3810 # Initialization / Boot-strapping
3811 #
3812 # The bootstrapping process needs to solve the "chicken or the egg" problem,
3813 # thus it jumps back and forth, each time gaining something needed later on.
3814 #
3815 ###############################################################################
3816 
3817 # Basic initialization that must happen first of all
3818 
3819 # Save the original command line. This is passed to us by the wrapper configure script.
3820 
3821 DATE_WHEN_CONFIGURED=`LANG=C date`
3822 
3823 { $as_echo "$as_me:${as_lineno-$LINENO}: Configuration created at $DATE_WHEN_CONFIGURED." >&5
3824 $as_echo "$as_me: Configuration created at $DATE_WHEN_CONFIGURED." >&6;}
3825 { $as_echo "$as_me:${as_lineno-$LINENO}: configure script generated at timestamp $DATE_WHEN_GENERATED." >&5
3826 $as_echo "$as_me: configure script generated at timestamp $DATE_WHEN_GENERATED." >&6;}
3827 
3828 
3829 
3830 # Start with tools that do not need have cross compilation support
3831 # and can be expected to be found in the default PATH. These tools are
3832 # used by configure. Nor are these tools expected to be found in the
3833 # devkit from the builddeps server either, since they are
3834 # needed to download the devkit.
3835 
3836 # First are all the simple required tools.
3837 
3838     for ac_prog in basename
3839 do
3840   # Extract the first word of "$ac_prog", so it can be a program name with args.
3841 set dummy $ac_prog; ac_word=$2
3842 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3843 $as_echo_n "checking for $ac_word... " >&6; }
3844 if ${ac_cv_path_BASENAME+:} false; then :
3845   $as_echo_n "(cached) " >&6
3846 else
3847   case $BASENAME in
3848   [\\/]* | ?:[\\/]*)
3849   ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
3850   ;;
3851   *)
3852   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3853 for as_dir in $PATH
3854 do
3855   IFS=$as_save_IFS
3856   test -z "$as_dir" && as_dir=.
3857     for ac_exec_ext in '' $ac_executable_extensions; do
3858   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3859     ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
3860     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3861     break 2
3862   fi
3863 done
3864   done
3865 IFS=$as_save_IFS
3866 
3867   ;;
3868 esac
3869 fi
3870 BASENAME=$ac_cv_path_BASENAME
3871 if test -n "$BASENAME"; then
3872   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
3873 $as_echo "$BASENAME" >&6; }
3874 else
3875   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3876 $as_echo "no" >&6; }
3877 fi
3878 
3879 
3880   test -n "$BASENAME" && break
3881 done
3882 
3883 
3884     if test "x$BASENAME" = x; then
3885         if test "xbasename" = x; then
3886           PROG_NAME=basename
3887         else
3888           PROG_NAME=basename
3889         fi
3890         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
3891 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
3892         as_fn_error $? "Cannot continue" "$LINENO" 5
3893     fi
3894 
3895 
3896 
3897     for ac_prog in bash
3898 do
3899   # Extract the first word of "$ac_prog", so it can be a program name with args.
3900 set dummy $ac_prog; ac_word=$2
3901 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3902 $as_echo_n "checking for $ac_word... " >&6; }
3903 if ${ac_cv_path_BASH+:} false; then :
3904   $as_echo_n "(cached) " >&6
3905 else
3906   case $BASH in
3907   [\\/]* | ?:[\\/]*)
3908   ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
3909   ;;
3910   *)
3911   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3912 for as_dir in $PATH
3913 do
3914   IFS=$as_save_IFS
3915   test -z "$as_dir" && as_dir=.
3916     for ac_exec_ext in '' $ac_executable_extensions; do
3917   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3918     ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
3919     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3920     break 2
3921   fi
3922 done
3923   done
3924 IFS=$as_save_IFS
3925 
3926   ;;
3927 esac
3928 fi
3929 BASH=$ac_cv_path_BASH
3930 if test -n "$BASH"; then
3931   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
3932 $as_echo "$BASH" >&6; }
3933 else
3934   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3935 $as_echo "no" >&6; }
3936 fi
3937 
3938 
3939   test -n "$BASH" && break
3940 done
3941 
3942 
3943     if test "x$BASH" = x; then
3944         if test "xbash" = x; then
3945           PROG_NAME=bash
3946         else
3947           PROG_NAME=bash
3948         fi
3949         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
3950 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
3951         as_fn_error $? "Cannot continue" "$LINENO" 5
3952     fi
3953 
3954 
3955 
3956     for ac_prog in cat
3957 do
3958   # Extract the first word of "$ac_prog", so it can be a program name with args.
3959 set dummy $ac_prog; ac_word=$2
3960 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3961 $as_echo_n "checking for $ac_word... " >&6; }
3962 if ${ac_cv_path_CAT+:} false; then :
3963   $as_echo_n "(cached) " >&6
3964 else
3965   case $CAT in
3966   [\\/]* | ?:[\\/]*)
3967   ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
3968   ;;
3969   *)
3970   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3971 for as_dir in $PATH
3972 do
3973   IFS=$as_save_IFS
3974   test -z "$as_dir" && as_dir=.
3975     for ac_exec_ext in '' $ac_executable_extensions; do
3976   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3977     ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
3978     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3979     break 2
3980   fi
3981 done
3982   done
3983 IFS=$as_save_IFS
3984 
3985   ;;
3986 esac
3987 fi
3988 CAT=$ac_cv_path_CAT
3989 if test -n "$CAT"; then
3990   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
3991 $as_echo "$CAT" >&6; }
3992 else
3993   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3994 $as_echo "no" >&6; }
3995 fi
3996 
3997 
3998   test -n "$CAT" && break
3999 done
4000 
4001 
4002     if test "x$CAT" = x; then
4003         if test "xcat" = x; then
4004           PROG_NAME=cat
4005         else
4006           PROG_NAME=cat
4007         fi
4008         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4009 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4010         as_fn_error $? "Cannot continue" "$LINENO" 5
4011     fi
4012 
4013 
4014 
4015     for ac_prog in chmod
4016 do
4017   # Extract the first word of "$ac_prog", so it can be a program name with args.
4018 set dummy $ac_prog; ac_word=$2
4019 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4020 $as_echo_n "checking for $ac_word... " >&6; }
4021 if ${ac_cv_path_CHMOD+:} false; then :
4022   $as_echo_n "(cached) " >&6
4023 else
4024   case $CHMOD in
4025   [\\/]* | ?:[\\/]*)
4026   ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
4027   ;;
4028   *)
4029   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4030 for as_dir in $PATH
4031 do
4032   IFS=$as_save_IFS
4033   test -z "$as_dir" && as_dir=.
4034     for ac_exec_ext in '' $ac_executable_extensions; do
4035   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4036     ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
4037     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4038     break 2
4039   fi
4040 done
4041   done
4042 IFS=$as_save_IFS
4043 
4044   ;;
4045 esac
4046 fi
4047 CHMOD=$ac_cv_path_CHMOD
4048 if test -n "$CHMOD"; then
4049   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
4050 $as_echo "$CHMOD" >&6; }
4051 else
4052   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4053 $as_echo "no" >&6; }
4054 fi
4055 
4056 
4057   test -n "$CHMOD" && break
4058 done
4059 
4060 
4061     if test "x$CHMOD" = x; then
4062         if test "xchmod" = x; then
4063           PROG_NAME=chmod
4064         else
4065           PROG_NAME=chmod
4066         fi
4067         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4068 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4069         as_fn_error $? "Cannot continue" "$LINENO" 5
4070     fi
4071 
4072 
4073 
4074     for ac_prog in cmp
4075 do
4076   # Extract the first word of "$ac_prog", so it can be a program name with args.
4077 set dummy $ac_prog; ac_word=$2
4078 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4079 $as_echo_n "checking for $ac_word... " >&6; }
4080 if ${ac_cv_path_CMP+:} false; then :
4081   $as_echo_n "(cached) " >&6
4082 else
4083   case $CMP in
4084   [\\/]* | ?:[\\/]*)
4085   ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
4086   ;;
4087   *)
4088   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4089 for as_dir in $PATH
4090 do
4091   IFS=$as_save_IFS
4092   test -z "$as_dir" && as_dir=.
4093     for ac_exec_ext in '' $ac_executable_extensions; do
4094   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4095     ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
4096     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4097     break 2
4098   fi
4099 done
4100   done
4101 IFS=$as_save_IFS
4102 
4103   ;;
4104 esac
4105 fi
4106 CMP=$ac_cv_path_CMP
4107 if test -n "$CMP"; then
4108   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
4109 $as_echo "$CMP" >&6; }
4110 else
4111   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4112 $as_echo "no" >&6; }
4113 fi
4114 
4115 
4116   test -n "$CMP" && break
4117 done
4118 
4119 
4120     if test "x$CMP" = x; then
4121         if test "xcmp" = x; then
4122           PROG_NAME=cmp
4123         else
4124           PROG_NAME=cmp
4125         fi
4126         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4127 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4128         as_fn_error $? "Cannot continue" "$LINENO" 5
4129     fi
4130 
4131 
4132 
4133     for ac_prog in comm
4134 do
4135   # Extract the first word of "$ac_prog", so it can be a program name with args.
4136 set dummy $ac_prog; ac_word=$2
4137 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4138 $as_echo_n "checking for $ac_word... " >&6; }
4139 if ${ac_cv_path_COMM+:} false; then :
4140   $as_echo_n "(cached) " >&6
4141 else
4142   case $COMM in
4143   [\\/]* | ?:[\\/]*)
4144   ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
4145   ;;
4146   *)
4147   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4148 for as_dir in $PATH
4149 do
4150   IFS=$as_save_IFS
4151   test -z "$as_dir" && as_dir=.
4152     for ac_exec_ext in '' $ac_executable_extensions; do
4153   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4154     ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
4155     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4156     break 2
4157   fi
4158 done
4159   done
4160 IFS=$as_save_IFS
4161 
4162   ;;
4163 esac
4164 fi
4165 COMM=$ac_cv_path_COMM
4166 if test -n "$COMM"; then
4167   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
4168 $as_echo "$COMM" >&6; }
4169 else
4170   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4171 $as_echo "no" >&6; }
4172 fi
4173 
4174 
4175   test -n "$COMM" && break
4176 done
4177 
4178 
4179     if test "x$COMM" = x; then
4180         if test "xcomm" = x; then
4181           PROG_NAME=comm
4182         else
4183           PROG_NAME=comm
4184         fi
4185         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4186 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4187         as_fn_error $? "Cannot continue" "$LINENO" 5
4188     fi
4189 
4190 
4191 
4192     for ac_prog in cp
4193 do
4194   # Extract the first word of "$ac_prog", so it can be a program name with args.
4195 set dummy $ac_prog; ac_word=$2
4196 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4197 $as_echo_n "checking for $ac_word... " >&6; }
4198 if ${ac_cv_path_CP+:} false; then :
4199   $as_echo_n "(cached) " >&6
4200 else
4201   case $CP in
4202   [\\/]* | ?:[\\/]*)
4203   ac_cv_path_CP="$CP" # Let the user override the test with a path.
4204   ;;
4205   *)
4206   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4207 for as_dir in $PATH
4208 do
4209   IFS=$as_save_IFS
4210   test -z "$as_dir" && as_dir=.
4211     for ac_exec_ext in '' $ac_executable_extensions; do
4212   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4213     ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
4214     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4215     break 2
4216   fi
4217 done
4218   done
4219 IFS=$as_save_IFS
4220 
4221   ;;
4222 esac
4223 fi
4224 CP=$ac_cv_path_CP
4225 if test -n "$CP"; then
4226   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
4227 $as_echo "$CP" >&6; }
4228 else
4229   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4230 $as_echo "no" >&6; }
4231 fi
4232 
4233 
4234   test -n "$CP" && break
4235 done
4236 
4237 
4238     if test "x$CP" = x; then
4239         if test "xcp" = x; then
4240           PROG_NAME=cp
4241         else
4242           PROG_NAME=cp
4243         fi
4244         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4245 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4246         as_fn_error $? "Cannot continue" "$LINENO" 5
4247     fi
4248 
4249 
4250 
4251     for ac_prog in cpio
4252 do
4253   # Extract the first word of "$ac_prog", so it can be a program name with args.
4254 set dummy $ac_prog; ac_word=$2
4255 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4256 $as_echo_n "checking for $ac_word... " >&6; }
4257 if ${ac_cv_path_CPIO+:} false; then :
4258   $as_echo_n "(cached) " >&6
4259 else
4260   case $CPIO in
4261   [\\/]* | ?:[\\/]*)
4262   ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
4263   ;;
4264   *)
4265   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4266 for as_dir in $PATH
4267 do
4268   IFS=$as_save_IFS
4269   test -z "$as_dir" && as_dir=.
4270     for ac_exec_ext in '' $ac_executable_extensions; do
4271   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4272     ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
4273     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4274     break 2
4275   fi
4276 done
4277   done
4278 IFS=$as_save_IFS
4279 
4280   ;;
4281 esac
4282 fi
4283 CPIO=$ac_cv_path_CPIO
4284 if test -n "$CPIO"; then
4285   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
4286 $as_echo "$CPIO" >&6; }
4287 else
4288   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4289 $as_echo "no" >&6; }
4290 fi
4291 
4292 
4293   test -n "$CPIO" && break
4294 done
4295 
4296 
4297     if test "x$CPIO" = x; then
4298         if test "xcpio" = x; then
4299           PROG_NAME=cpio
4300         else
4301           PROG_NAME=cpio
4302         fi
4303         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4304 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4305         as_fn_error $? "Cannot continue" "$LINENO" 5
4306     fi
4307 
4308 
4309 
4310     for ac_prog in cut
4311 do
4312   # Extract the first word of "$ac_prog", so it can be a program name with args.
4313 set dummy $ac_prog; ac_word=$2
4314 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4315 $as_echo_n "checking for $ac_word... " >&6; }
4316 if ${ac_cv_path_CUT+:} false; then :
4317   $as_echo_n "(cached) " >&6
4318 else
4319   case $CUT in
4320   [\\/]* | ?:[\\/]*)
4321   ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
4322   ;;
4323   *)
4324   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4325 for as_dir in $PATH
4326 do
4327   IFS=$as_save_IFS
4328   test -z "$as_dir" && as_dir=.
4329     for ac_exec_ext in '' $ac_executable_extensions; do
4330   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4331     ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
4332     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4333     break 2
4334   fi
4335 done
4336   done
4337 IFS=$as_save_IFS
4338 
4339   ;;
4340 esac
4341 fi
4342 CUT=$ac_cv_path_CUT
4343 if test -n "$CUT"; then
4344   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
4345 $as_echo "$CUT" >&6; }
4346 else
4347   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4348 $as_echo "no" >&6; }
4349 fi
4350 
4351 
4352   test -n "$CUT" && break
4353 done
4354 
4355 
4356     if test "x$CUT" = x; then
4357         if test "xcut" = x; then
4358           PROG_NAME=cut
4359         else
4360           PROG_NAME=cut
4361         fi
4362         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4363 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4364         as_fn_error $? "Cannot continue" "$LINENO" 5
4365     fi
4366 
4367 
4368 
4369     for ac_prog in date
4370 do
4371   # Extract the first word of "$ac_prog", so it can be a program name with args.
4372 set dummy $ac_prog; ac_word=$2
4373 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4374 $as_echo_n "checking for $ac_word... " >&6; }
4375 if ${ac_cv_path_DATE+:} false; then :
4376   $as_echo_n "(cached) " >&6
4377 else
4378   case $DATE in
4379   [\\/]* | ?:[\\/]*)
4380   ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
4381   ;;
4382   *)
4383   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4384 for as_dir in $PATH
4385 do
4386   IFS=$as_save_IFS
4387   test -z "$as_dir" && as_dir=.
4388     for ac_exec_ext in '' $ac_executable_extensions; do
4389   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4390     ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
4391     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4392     break 2
4393   fi
4394 done
4395   done
4396 IFS=$as_save_IFS
4397 
4398   ;;
4399 esac
4400 fi
4401 DATE=$ac_cv_path_DATE
4402 if test -n "$DATE"; then
4403   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
4404 $as_echo "$DATE" >&6; }
4405 else
4406   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4407 $as_echo "no" >&6; }
4408 fi
4409 
4410 
4411   test -n "$DATE" && break
4412 done
4413 
4414 
4415     if test "x$DATE" = x; then
4416         if test "xdate" = x; then
4417           PROG_NAME=date
4418         else
4419           PROG_NAME=date
4420         fi
4421         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4422 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4423         as_fn_error $? "Cannot continue" "$LINENO" 5
4424     fi
4425 
4426 
4427 
4428     for ac_prog in gdiff diff
4429 do
4430   # Extract the first word of "$ac_prog", so it can be a program name with args.
4431 set dummy $ac_prog; ac_word=$2
4432 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4433 $as_echo_n "checking for $ac_word... " >&6; }
4434 if ${ac_cv_path_DIFF+:} false; then :
4435   $as_echo_n "(cached) " >&6
4436 else
4437   case $DIFF in
4438   [\\/]* | ?:[\\/]*)
4439   ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
4440   ;;
4441   *)
4442   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4443 for as_dir in $PATH
4444 do
4445   IFS=$as_save_IFS
4446   test -z "$as_dir" && as_dir=.
4447     for ac_exec_ext in '' $ac_executable_extensions; do
4448   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4449     ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
4450     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4451     break 2
4452   fi
4453 done
4454   done
4455 IFS=$as_save_IFS
4456 
4457   ;;
4458 esac
4459 fi
4460 DIFF=$ac_cv_path_DIFF
4461 if test -n "$DIFF"; then
4462   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
4463 $as_echo "$DIFF" >&6; }
4464 else
4465   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4466 $as_echo "no" >&6; }
4467 fi
4468 
4469 
4470   test -n "$DIFF" && break
4471 done
4472 
4473 
4474     if test "x$DIFF" = x; then
4475         if test "xgdiff diff" = x; then
4476           PROG_NAME=diff
4477         else
4478           PROG_NAME=gdiff diff
4479         fi
4480         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4481 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4482         as_fn_error $? "Cannot continue" "$LINENO" 5
4483     fi
4484 
4485 
4486 
4487     for ac_prog in dirname
4488 do
4489   # Extract the first word of "$ac_prog", so it can be a program name with args.
4490 set dummy $ac_prog; ac_word=$2
4491 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4492 $as_echo_n "checking for $ac_word... " >&6; }
4493 if ${ac_cv_path_DIRNAME+:} false; then :
4494   $as_echo_n "(cached) " >&6
4495 else
4496   case $DIRNAME in
4497   [\\/]* | ?:[\\/]*)
4498   ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
4499   ;;
4500   *)
4501   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4502 for as_dir in $PATH
4503 do
4504   IFS=$as_save_IFS
4505   test -z "$as_dir" && as_dir=.
4506     for ac_exec_ext in '' $ac_executable_extensions; do
4507   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4508     ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
4509     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4510     break 2
4511   fi
4512 done
4513   done
4514 IFS=$as_save_IFS
4515 
4516   ;;
4517 esac
4518 fi
4519 DIRNAME=$ac_cv_path_DIRNAME
4520 if test -n "$DIRNAME"; then
4521   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
4522 $as_echo "$DIRNAME" >&6; }
4523 else
4524   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4525 $as_echo "no" >&6; }
4526 fi
4527 
4528 
4529   test -n "$DIRNAME" && break
4530 done
4531 
4532 
4533     if test "x$DIRNAME" = x; then
4534         if test "xdirname" = x; then
4535           PROG_NAME=dirname
4536         else
4537           PROG_NAME=dirname
4538         fi
4539         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4540 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4541         as_fn_error $? "Cannot continue" "$LINENO" 5
4542     fi
4543 
4544 
4545 
4546     for ac_prog in echo
4547 do
4548   # Extract the first word of "$ac_prog", so it can be a program name with args.
4549 set dummy $ac_prog; ac_word=$2
4550 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4551 $as_echo_n "checking for $ac_word... " >&6; }
4552 if ${ac_cv_path_ECHO+:} false; then :
4553   $as_echo_n "(cached) " >&6
4554 else
4555   case $ECHO in
4556   [\\/]* | ?:[\\/]*)
4557   ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
4558   ;;
4559   *)
4560   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4561 for as_dir in $PATH
4562 do
4563   IFS=$as_save_IFS
4564   test -z "$as_dir" && as_dir=.
4565     for ac_exec_ext in '' $ac_executable_extensions; do
4566   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4567     ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
4568     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4569     break 2
4570   fi
4571 done
4572   done
4573 IFS=$as_save_IFS
4574 
4575   ;;
4576 esac
4577 fi
4578 ECHO=$ac_cv_path_ECHO
4579 if test -n "$ECHO"; then
4580   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
4581 $as_echo "$ECHO" >&6; }
4582 else
4583   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4584 $as_echo "no" >&6; }
4585 fi
4586 
4587 
4588   test -n "$ECHO" && break
4589 done
4590 
4591 
4592     if test "x$ECHO" = x; then
4593         if test "xecho" = x; then
4594           PROG_NAME=echo
4595         else
4596           PROG_NAME=echo
4597         fi
4598         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4599 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4600         as_fn_error $? "Cannot continue" "$LINENO" 5
4601     fi
4602 
4603 
4604 
4605     for ac_prog in expr
4606 do
4607   # Extract the first word of "$ac_prog", so it can be a program name with args.
4608 set dummy $ac_prog; ac_word=$2
4609 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4610 $as_echo_n "checking for $ac_word... " >&6; }
4611 if ${ac_cv_path_EXPR+:} false; then :
4612   $as_echo_n "(cached) " >&6
4613 else
4614   case $EXPR in
4615   [\\/]* | ?:[\\/]*)
4616   ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
4617   ;;
4618   *)
4619   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4620 for as_dir in $PATH
4621 do
4622   IFS=$as_save_IFS
4623   test -z "$as_dir" && as_dir=.
4624     for ac_exec_ext in '' $ac_executable_extensions; do
4625   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4626     ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
4627     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4628     break 2
4629   fi
4630 done
4631   done
4632 IFS=$as_save_IFS
4633 
4634   ;;
4635 esac
4636 fi
4637 EXPR=$ac_cv_path_EXPR
4638 if test -n "$EXPR"; then
4639   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
4640 $as_echo "$EXPR" >&6; }
4641 else
4642   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4643 $as_echo "no" >&6; }
4644 fi
4645 
4646 
4647   test -n "$EXPR" && break
4648 done
4649 
4650 
4651     if test "x$EXPR" = x; then
4652         if test "xexpr" = x; then
4653           PROG_NAME=expr
4654         else
4655           PROG_NAME=expr
4656         fi
4657         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4658 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4659         as_fn_error $? "Cannot continue" "$LINENO" 5
4660     fi
4661 
4662 
4663 
4664     for ac_prog in file
4665 do
4666   # Extract the first word of "$ac_prog", so it can be a program name with args.
4667 set dummy $ac_prog; ac_word=$2
4668 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4669 $as_echo_n "checking for $ac_word... " >&6; }
4670 if ${ac_cv_path_FILE+:} false; then :
4671   $as_echo_n "(cached) " >&6
4672 else
4673   case $FILE in
4674   [\\/]* | ?:[\\/]*)
4675   ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
4676   ;;
4677   *)
4678   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4679 for as_dir in $PATH
4680 do
4681   IFS=$as_save_IFS
4682   test -z "$as_dir" && as_dir=.
4683     for ac_exec_ext in '' $ac_executable_extensions; do
4684   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4685     ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
4686     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4687     break 2
4688   fi
4689 done
4690   done
4691 IFS=$as_save_IFS
4692 
4693   ;;
4694 esac
4695 fi
4696 FILE=$ac_cv_path_FILE
4697 if test -n "$FILE"; then
4698   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
4699 $as_echo "$FILE" >&6; }
4700 else
4701   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4702 $as_echo "no" >&6; }
4703 fi
4704 
4705 
4706   test -n "$FILE" && break
4707 done
4708 
4709 
4710     if test "x$FILE" = x; then
4711         if test "xfile" = x; then
4712           PROG_NAME=file
4713         else
4714           PROG_NAME=file
4715         fi
4716         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4717 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4718         as_fn_error $? "Cannot continue" "$LINENO" 5
4719     fi
4720 
4721 
4722 
4723     for ac_prog in find
4724 do
4725   # Extract the first word of "$ac_prog", so it can be a program name with args.
4726 set dummy $ac_prog; ac_word=$2
4727 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4728 $as_echo_n "checking for $ac_word... " >&6; }
4729 if ${ac_cv_path_FIND+:} false; then :
4730   $as_echo_n "(cached) " >&6
4731 else
4732   case $FIND in
4733   [\\/]* | ?:[\\/]*)
4734   ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
4735   ;;
4736   *)
4737   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4738 for as_dir in $PATH
4739 do
4740   IFS=$as_save_IFS
4741   test -z "$as_dir" && as_dir=.
4742     for ac_exec_ext in '' $ac_executable_extensions; do
4743   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4744     ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
4745     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4746     break 2
4747   fi
4748 done
4749   done
4750 IFS=$as_save_IFS
4751 
4752   ;;
4753 esac
4754 fi
4755 FIND=$ac_cv_path_FIND
4756 if test -n "$FIND"; then
4757   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
4758 $as_echo "$FIND" >&6; }
4759 else
4760   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4761 $as_echo "no" >&6; }
4762 fi
4763 
4764 
4765   test -n "$FIND" && break
4766 done
4767 
4768 
4769     if test "x$FIND" = x; then
4770         if test "xfind" = x; then
4771           PROG_NAME=find
4772         else
4773           PROG_NAME=find
4774         fi
4775         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4776 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4777         as_fn_error $? "Cannot continue" "$LINENO" 5
4778     fi
4779 
4780 
4781 
4782     for ac_prog in head
4783 do
4784   # Extract the first word of "$ac_prog", so it can be a program name with args.
4785 set dummy $ac_prog; ac_word=$2
4786 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4787 $as_echo_n "checking for $ac_word... " >&6; }
4788 if ${ac_cv_path_HEAD+:} false; then :
4789   $as_echo_n "(cached) " >&6
4790 else
4791   case $HEAD in
4792   [\\/]* | ?:[\\/]*)
4793   ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
4794   ;;
4795   *)
4796   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4797 for as_dir in $PATH
4798 do
4799   IFS=$as_save_IFS
4800   test -z "$as_dir" && as_dir=.
4801     for ac_exec_ext in '' $ac_executable_extensions; do
4802   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4803     ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
4804     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4805     break 2
4806   fi
4807 done
4808   done
4809 IFS=$as_save_IFS
4810 
4811   ;;
4812 esac
4813 fi
4814 HEAD=$ac_cv_path_HEAD
4815 if test -n "$HEAD"; then
4816   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
4817 $as_echo "$HEAD" >&6; }
4818 else
4819   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4820 $as_echo "no" >&6; }
4821 fi
4822 
4823 
4824   test -n "$HEAD" && break
4825 done
4826 
4827 
4828     if test "x$HEAD" = x; then
4829         if test "xhead" = x; then
4830           PROG_NAME=head
4831         else
4832           PROG_NAME=head
4833         fi
4834         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4835 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4836         as_fn_error $? "Cannot continue" "$LINENO" 5
4837     fi
4838 
4839 
4840 
4841     for ac_prog in ln
4842 do
4843   # Extract the first word of "$ac_prog", so it can be a program name with args.
4844 set dummy $ac_prog; ac_word=$2
4845 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4846 $as_echo_n "checking for $ac_word... " >&6; }
4847 if ${ac_cv_path_LN+:} false; then :
4848   $as_echo_n "(cached) " >&6
4849 else
4850   case $LN in
4851   [\\/]* | ?:[\\/]*)
4852   ac_cv_path_LN="$LN" # Let the user override the test with a path.
4853   ;;
4854   *)
4855   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4856 for as_dir in $PATH
4857 do
4858   IFS=$as_save_IFS
4859   test -z "$as_dir" && as_dir=.
4860     for ac_exec_ext in '' $ac_executable_extensions; do
4861   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4862     ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
4863     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4864     break 2
4865   fi
4866 done
4867   done
4868 IFS=$as_save_IFS
4869 
4870   ;;
4871 esac
4872 fi
4873 LN=$ac_cv_path_LN
4874 if test -n "$LN"; then
4875   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
4876 $as_echo "$LN" >&6; }
4877 else
4878   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4879 $as_echo "no" >&6; }
4880 fi
4881 
4882 
4883   test -n "$LN" && break
4884 done
4885 
4886 
4887     if test "x$LN" = x; then
4888         if test "xln" = x; then
4889           PROG_NAME=ln
4890         else
4891           PROG_NAME=ln
4892         fi
4893         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4894 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4895         as_fn_error $? "Cannot continue" "$LINENO" 5
4896     fi
4897 
4898 
4899 
4900     for ac_prog in ls
4901 do
4902   # Extract the first word of "$ac_prog", so it can be a program name with args.
4903 set dummy $ac_prog; ac_word=$2
4904 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4905 $as_echo_n "checking for $ac_word... " >&6; }
4906 if ${ac_cv_path_LS+:} false; then :
4907   $as_echo_n "(cached) " >&6
4908 else
4909   case $LS in
4910   [\\/]* | ?:[\\/]*)
4911   ac_cv_path_LS="$LS" # Let the user override the test with a path.
4912   ;;
4913   *)
4914   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4915 for as_dir in $PATH
4916 do
4917   IFS=$as_save_IFS
4918   test -z "$as_dir" && as_dir=.
4919     for ac_exec_ext in '' $ac_executable_extensions; do
4920   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4921     ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
4922     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4923     break 2
4924   fi
4925 done
4926   done
4927 IFS=$as_save_IFS
4928 
4929   ;;
4930 esac
4931 fi
4932 LS=$ac_cv_path_LS
4933 if test -n "$LS"; then
4934   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
4935 $as_echo "$LS" >&6; }
4936 else
4937   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4938 $as_echo "no" >&6; }
4939 fi
4940 
4941 
4942   test -n "$LS" && break
4943 done
4944 
4945 
4946     if test "x$LS" = x; then
4947         if test "xls" = x; then
4948           PROG_NAME=ls
4949         else
4950           PROG_NAME=ls
4951         fi
4952         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4953 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4954         as_fn_error $? "Cannot continue" "$LINENO" 5
4955     fi
4956 
4957 
4958 
4959     for ac_prog in mkdir
4960 do
4961   # Extract the first word of "$ac_prog", so it can be a program name with args.
4962 set dummy $ac_prog; ac_word=$2
4963 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4964 $as_echo_n "checking for $ac_word... " >&6; }
4965 if ${ac_cv_path_MKDIR+:} false; then :
4966   $as_echo_n "(cached) " >&6
4967 else
4968   case $MKDIR in
4969   [\\/]* | ?:[\\/]*)
4970   ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
4971   ;;
4972   *)
4973   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4974 for as_dir in $PATH
4975 do
4976   IFS=$as_save_IFS
4977   test -z "$as_dir" && as_dir=.
4978     for ac_exec_ext in '' $ac_executable_extensions; do
4979   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4980     ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
4981     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4982     break 2
4983   fi
4984 done
4985   done
4986 IFS=$as_save_IFS
4987 
4988   ;;
4989 esac
4990 fi
4991 MKDIR=$ac_cv_path_MKDIR
4992 if test -n "$MKDIR"; then
4993   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
4994 $as_echo "$MKDIR" >&6; }
4995 else
4996   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4997 $as_echo "no" >&6; }
4998 fi
4999 
5000 
5001   test -n "$MKDIR" && break
5002 done
5003 
5004 
5005     if test "x$MKDIR" = x; then
5006         if test "xmkdir" = x; then
5007           PROG_NAME=mkdir
5008         else
5009           PROG_NAME=mkdir
5010         fi
5011         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5012 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5013         as_fn_error $? "Cannot continue" "$LINENO" 5
5014     fi
5015 
5016 
5017 
5018     for ac_prog in mktemp
5019 do
5020   # Extract the first word of "$ac_prog", so it can be a program name with args.
5021 set dummy $ac_prog; ac_word=$2
5022 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5023 $as_echo_n "checking for $ac_word... " >&6; }
5024 if ${ac_cv_path_MKTEMP+:} false; then :
5025   $as_echo_n "(cached) " >&6
5026 else
5027   case $MKTEMP in
5028   [\\/]* | ?:[\\/]*)
5029   ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
5030   ;;
5031   *)
5032   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5033 for as_dir in $PATH
5034 do
5035   IFS=$as_save_IFS
5036   test -z "$as_dir" && as_dir=.
5037     for ac_exec_ext in '' $ac_executable_extensions; do
5038   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5039     ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
5040     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5041     break 2
5042   fi
5043 done
5044   done
5045 IFS=$as_save_IFS
5046 
5047   ;;
5048 esac
5049 fi
5050 MKTEMP=$ac_cv_path_MKTEMP
5051 if test -n "$MKTEMP"; then
5052   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
5053 $as_echo "$MKTEMP" >&6; }
5054 else
5055   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5056 $as_echo "no" >&6; }
5057 fi
5058 
5059 
5060   test -n "$MKTEMP" && break
5061 done
5062 
5063 
5064     if test "x$MKTEMP" = x; then
5065         if test "xmktemp" = x; then
5066           PROG_NAME=mktemp
5067         else
5068           PROG_NAME=mktemp
5069         fi
5070         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5071 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5072         as_fn_error $? "Cannot continue" "$LINENO" 5
5073     fi
5074 
5075 
5076 
5077     for ac_prog in mv
5078 do
5079   # Extract the first word of "$ac_prog", so it can be a program name with args.
5080 set dummy $ac_prog; ac_word=$2
5081 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5082 $as_echo_n "checking for $ac_word... " >&6; }
5083 if ${ac_cv_path_MV+:} false; then :
5084   $as_echo_n "(cached) " >&6
5085 else
5086   case $MV in
5087   [\\/]* | ?:[\\/]*)
5088   ac_cv_path_MV="$MV" # Let the user override the test with a path.
5089   ;;
5090   *)
5091   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5092 for as_dir in $PATH
5093 do
5094   IFS=$as_save_IFS
5095   test -z "$as_dir" && as_dir=.
5096     for ac_exec_ext in '' $ac_executable_extensions; do
5097   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5098     ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
5099     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5100     break 2
5101   fi
5102 done
5103   done
5104 IFS=$as_save_IFS
5105 
5106   ;;
5107 esac
5108 fi
5109 MV=$ac_cv_path_MV
5110 if test -n "$MV"; then
5111   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
5112 $as_echo "$MV" >&6; }
5113 else
5114   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5115 $as_echo "no" >&6; }
5116 fi
5117 
5118 
5119   test -n "$MV" && break
5120 done
5121 
5122 
5123     if test "x$MV" = x; then
5124         if test "xmv" = x; then
5125           PROG_NAME=mv
5126         else
5127           PROG_NAME=mv
5128         fi
5129         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5130 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5131         as_fn_error $? "Cannot continue" "$LINENO" 5
5132     fi
5133 
5134 
5135 
5136     for ac_prog in printf
5137 do
5138   # Extract the first word of "$ac_prog", so it can be a program name with args.
5139 set dummy $ac_prog; ac_word=$2
5140 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5141 $as_echo_n "checking for $ac_word... " >&6; }
5142 if ${ac_cv_path_PRINTF+:} false; then :
5143   $as_echo_n "(cached) " >&6
5144 else
5145   case $PRINTF in
5146   [\\/]* | ?:[\\/]*)
5147   ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
5148   ;;
5149   *)
5150   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5151 for as_dir in $PATH
5152 do
5153   IFS=$as_save_IFS
5154   test -z "$as_dir" && as_dir=.
5155     for ac_exec_ext in '' $ac_executable_extensions; do
5156   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5157     ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
5158     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5159     break 2
5160   fi
5161 done
5162   done
5163 IFS=$as_save_IFS
5164 
5165   ;;
5166 esac
5167 fi
5168 PRINTF=$ac_cv_path_PRINTF
5169 if test -n "$PRINTF"; then
5170   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
5171 $as_echo "$PRINTF" >&6; }
5172 else
5173   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5174 $as_echo "no" >&6; }
5175 fi
5176 
5177 
5178   test -n "$PRINTF" && break
5179 done
5180 
5181 
5182     if test "x$PRINTF" = x; then
5183         if test "xprintf" = x; then
5184           PROG_NAME=printf
5185         else
5186           PROG_NAME=printf
5187         fi
5188         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5189 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5190         as_fn_error $? "Cannot continue" "$LINENO" 5
5191     fi
5192 
5193 
5194 
5195     for ac_prog in rm
5196 do
5197   # Extract the first word of "$ac_prog", so it can be a program name with args.
5198 set dummy $ac_prog; ac_word=$2
5199 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5200 $as_echo_n "checking for $ac_word... " >&6; }
5201 if ${ac_cv_path_RM+:} false; then :
5202   $as_echo_n "(cached) " >&6
5203 else
5204   case $RM in
5205   [\\/]* | ?:[\\/]*)
5206   ac_cv_path_RM="$RM" # Let the user override the test with a path.
5207   ;;
5208   *)
5209   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5210 for as_dir in $PATH
5211 do
5212   IFS=$as_save_IFS
5213   test -z "$as_dir" && as_dir=.
5214     for ac_exec_ext in '' $ac_executable_extensions; do
5215   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5216     ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
5217     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5218     break 2
5219   fi
5220 done
5221   done
5222 IFS=$as_save_IFS
5223 
5224   ;;
5225 esac
5226 fi
5227 RM=$ac_cv_path_RM
5228 if test -n "$RM"; then
5229   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
5230 $as_echo "$RM" >&6; }
5231 else
5232   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5233 $as_echo "no" >&6; }
5234 fi
5235 
5236 
5237   test -n "$RM" && break
5238 done
5239 
5240 
5241     if test "x$RM" = x; then
5242         if test "xrm" = x; then
5243           PROG_NAME=rm
5244         else
5245           PROG_NAME=rm
5246         fi
5247         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5248 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5249         as_fn_error $? "Cannot continue" "$LINENO" 5
5250     fi
5251 
5252 
5253 
5254     for ac_prog in sh
5255 do
5256   # Extract the first word of "$ac_prog", so it can be a program name with args.
5257 set dummy $ac_prog; ac_word=$2
5258 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5259 $as_echo_n "checking for $ac_word... " >&6; }
5260 if ${ac_cv_path_SH+:} false; then :
5261   $as_echo_n "(cached) " >&6
5262 else
5263   case $SH in
5264   [\\/]* | ?:[\\/]*)
5265   ac_cv_path_SH="$SH" # Let the user override the test with a path.
5266   ;;
5267   *)
5268   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5269 for as_dir in $PATH
5270 do
5271   IFS=$as_save_IFS
5272   test -z "$as_dir" && as_dir=.
5273     for ac_exec_ext in '' $ac_executable_extensions; do
5274   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5275     ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
5276     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5277     break 2
5278   fi
5279 done
5280   done
5281 IFS=$as_save_IFS
5282 
5283   ;;
5284 esac
5285 fi
5286 SH=$ac_cv_path_SH
5287 if test -n "$SH"; then
5288   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
5289 $as_echo "$SH" >&6; }
5290 else
5291   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5292 $as_echo "no" >&6; }
5293 fi
5294 
5295 
5296   test -n "$SH" && break
5297 done
5298 
5299 
5300     if test "x$SH" = x; then
5301         if test "xsh" = x; then
5302           PROG_NAME=sh
5303         else
5304           PROG_NAME=sh
5305         fi
5306         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5307 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5308         as_fn_error $? "Cannot continue" "$LINENO" 5
5309     fi
5310 
5311 
5312 
5313     for ac_prog in sort
5314 do
5315   # Extract the first word of "$ac_prog", so it can be a program name with args.
5316 set dummy $ac_prog; ac_word=$2
5317 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5318 $as_echo_n "checking for $ac_word... " >&6; }
5319 if ${ac_cv_path_SORT+:} false; then :
5320   $as_echo_n "(cached) " >&6
5321 else
5322   case $SORT in
5323   [\\/]* | ?:[\\/]*)
5324   ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
5325   ;;
5326   *)
5327   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5328 for as_dir in $PATH
5329 do
5330   IFS=$as_save_IFS
5331   test -z "$as_dir" && as_dir=.
5332     for ac_exec_ext in '' $ac_executable_extensions; do
5333   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5334     ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
5335     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5336     break 2
5337   fi
5338 done
5339   done
5340 IFS=$as_save_IFS
5341 
5342   ;;
5343 esac
5344 fi
5345 SORT=$ac_cv_path_SORT
5346 if test -n "$SORT"; then
5347   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
5348 $as_echo "$SORT" >&6; }
5349 else
5350   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5351 $as_echo "no" >&6; }
5352 fi
5353 
5354 
5355   test -n "$SORT" && break
5356 done
5357 
5358 
5359     if test "x$SORT" = x; then
5360         if test "xsort" = x; then
5361           PROG_NAME=sort
5362         else
5363           PROG_NAME=sort
5364         fi
5365         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5366 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5367         as_fn_error $? "Cannot continue" "$LINENO" 5
5368     fi
5369 
5370 
5371 
5372     for ac_prog in tail
5373 do
5374   # Extract the first word of "$ac_prog", so it can be a program name with args.
5375 set dummy $ac_prog; ac_word=$2
5376 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5377 $as_echo_n "checking for $ac_word... " >&6; }
5378 if ${ac_cv_path_TAIL+:} false; then :
5379   $as_echo_n "(cached) " >&6
5380 else
5381   case $TAIL in
5382   [\\/]* | ?:[\\/]*)
5383   ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
5384   ;;
5385   *)
5386   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5387 for as_dir in $PATH
5388 do
5389   IFS=$as_save_IFS
5390   test -z "$as_dir" && as_dir=.
5391     for ac_exec_ext in '' $ac_executable_extensions; do
5392   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5393     ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
5394     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5395     break 2
5396   fi
5397 done
5398   done
5399 IFS=$as_save_IFS
5400 
5401   ;;
5402 esac
5403 fi
5404 TAIL=$ac_cv_path_TAIL
5405 if test -n "$TAIL"; then
5406   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
5407 $as_echo "$TAIL" >&6; }
5408 else
5409   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5410 $as_echo "no" >&6; }
5411 fi
5412 
5413 
5414   test -n "$TAIL" && break
5415 done
5416 
5417 
5418     if test "x$TAIL" = x; then
5419         if test "xtail" = x; then
5420           PROG_NAME=tail
5421         else
5422           PROG_NAME=tail
5423         fi
5424         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5425 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5426         as_fn_error $? "Cannot continue" "$LINENO" 5
5427     fi
5428 
5429 
5430 
5431     for ac_prog in tar
5432 do
5433   # Extract the first word of "$ac_prog", so it can be a program name with args.
5434 set dummy $ac_prog; ac_word=$2
5435 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5436 $as_echo_n "checking for $ac_word... " >&6; }
5437 if ${ac_cv_path_TAR+:} false; then :
5438   $as_echo_n "(cached) " >&6
5439 else
5440   case $TAR in
5441   [\\/]* | ?:[\\/]*)
5442   ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
5443   ;;
5444   *)
5445   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5446 for as_dir in $PATH
5447 do
5448   IFS=$as_save_IFS
5449   test -z "$as_dir" && as_dir=.
5450     for ac_exec_ext in '' $ac_executable_extensions; do
5451   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5452     ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
5453     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5454     break 2
5455   fi
5456 done
5457   done
5458 IFS=$as_save_IFS
5459 
5460   ;;
5461 esac
5462 fi
5463 TAR=$ac_cv_path_TAR
5464 if test -n "$TAR"; then
5465   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
5466 $as_echo "$TAR" >&6; }
5467 else
5468   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5469 $as_echo "no" >&6; }
5470 fi
5471 
5472 
5473   test -n "$TAR" && break
5474 done
5475 
5476 
5477     if test "x$TAR" = x; then
5478         if test "xtar" = x; then
5479           PROG_NAME=tar
5480         else
5481           PROG_NAME=tar
5482         fi
5483         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5484 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5485         as_fn_error $? "Cannot continue" "$LINENO" 5
5486     fi
5487 
5488 
5489 
5490     for ac_prog in tee
5491 do
5492   # Extract the first word of "$ac_prog", so it can be a program name with args.
5493 set dummy $ac_prog; ac_word=$2
5494 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5495 $as_echo_n "checking for $ac_word... " >&6; }
5496 if ${ac_cv_path_TEE+:} false; then :
5497   $as_echo_n "(cached) " >&6
5498 else
5499   case $TEE in
5500   [\\/]* | ?:[\\/]*)
5501   ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
5502   ;;
5503   *)
5504   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5505 for as_dir in $PATH
5506 do
5507   IFS=$as_save_IFS
5508   test -z "$as_dir" && as_dir=.
5509     for ac_exec_ext in '' $ac_executable_extensions; do
5510   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5511     ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
5512     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5513     break 2
5514   fi
5515 done
5516   done
5517 IFS=$as_save_IFS
5518 
5519   ;;
5520 esac
5521 fi
5522 TEE=$ac_cv_path_TEE
5523 if test -n "$TEE"; then
5524   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
5525 $as_echo "$TEE" >&6; }
5526 else
5527   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5528 $as_echo "no" >&6; }
5529 fi
5530 
5531 
5532   test -n "$TEE" && break
5533 done
5534 
5535 
5536     if test "x$TEE" = x; then
5537         if test "xtee" = x; then
5538           PROG_NAME=tee
5539         else
5540           PROG_NAME=tee
5541         fi
5542         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5543 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5544         as_fn_error $? "Cannot continue" "$LINENO" 5
5545     fi
5546 
5547 
5548 
5549     for ac_prog in touch
5550 do
5551   # Extract the first word of "$ac_prog", so it can be a program name with args.
5552 set dummy $ac_prog; ac_word=$2
5553 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5554 $as_echo_n "checking for $ac_word... " >&6; }
5555 if ${ac_cv_path_TOUCH+:} false; then :
5556   $as_echo_n "(cached) " >&6
5557 else
5558   case $TOUCH in
5559   [\\/]* | ?:[\\/]*)
5560   ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
5561   ;;
5562   *)
5563   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5564 for as_dir in $PATH
5565 do
5566   IFS=$as_save_IFS
5567   test -z "$as_dir" && as_dir=.
5568     for ac_exec_ext in '' $ac_executable_extensions; do
5569   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5570     ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
5571     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5572     break 2
5573   fi
5574 done
5575   done
5576 IFS=$as_save_IFS
5577 
5578   ;;
5579 esac
5580 fi
5581 TOUCH=$ac_cv_path_TOUCH
5582 if test -n "$TOUCH"; then
5583   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
5584 $as_echo "$TOUCH" >&6; }
5585 else
5586   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5587 $as_echo "no" >&6; }
5588 fi
5589 
5590 
5591   test -n "$TOUCH" && break
5592 done
5593 
5594 
5595     if test "x$TOUCH" = x; then
5596         if test "xtouch" = x; then
5597           PROG_NAME=touch
5598         else
5599           PROG_NAME=touch
5600         fi
5601         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5602 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5603         as_fn_error $? "Cannot continue" "$LINENO" 5
5604     fi
5605 
5606 
5607 
5608     for ac_prog in tr
5609 do
5610   # Extract the first word of "$ac_prog", so it can be a program name with args.
5611 set dummy $ac_prog; ac_word=$2
5612 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5613 $as_echo_n "checking for $ac_word... " >&6; }
5614 if ${ac_cv_path_TR+:} false; then :
5615   $as_echo_n "(cached) " >&6
5616 else
5617   case $TR in
5618   [\\/]* | ?:[\\/]*)
5619   ac_cv_path_TR="$TR" # Let the user override the test with a path.
5620   ;;
5621   *)
5622   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5623 for as_dir in $PATH
5624 do
5625   IFS=$as_save_IFS
5626   test -z "$as_dir" && as_dir=.
5627     for ac_exec_ext in '' $ac_executable_extensions; do
5628   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5629     ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
5630     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5631     break 2
5632   fi
5633 done
5634   done
5635 IFS=$as_save_IFS
5636 
5637   ;;
5638 esac
5639 fi
5640 TR=$ac_cv_path_TR
5641 if test -n "$TR"; then
5642   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
5643 $as_echo "$TR" >&6; }
5644 else
5645   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5646 $as_echo "no" >&6; }
5647 fi
5648 
5649 
5650   test -n "$TR" && break
5651 done
5652 
5653 
5654     if test "x$TR" = x; then
5655         if test "xtr" = x; then
5656           PROG_NAME=tr
5657         else
5658           PROG_NAME=tr
5659         fi
5660         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5661 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5662         as_fn_error $? "Cannot continue" "$LINENO" 5
5663     fi
5664 
5665 
5666 
5667     for ac_prog in uname
5668 do
5669   # Extract the first word of "$ac_prog", so it can be a program name with args.
5670 set dummy $ac_prog; ac_word=$2
5671 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5672 $as_echo_n "checking for $ac_word... " >&6; }
5673 if ${ac_cv_path_UNAME+:} false; then :
5674   $as_echo_n "(cached) " >&6
5675 else
5676   case $UNAME in
5677   [\\/]* | ?:[\\/]*)
5678   ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
5679   ;;
5680   *)
5681   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5682 for as_dir in $PATH
5683 do
5684   IFS=$as_save_IFS
5685   test -z "$as_dir" && as_dir=.
5686     for ac_exec_ext in '' $ac_executable_extensions; do
5687   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5688     ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
5689     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5690     break 2
5691   fi
5692 done
5693   done
5694 IFS=$as_save_IFS
5695 
5696   ;;
5697 esac
5698 fi
5699 UNAME=$ac_cv_path_UNAME
5700 if test -n "$UNAME"; then
5701   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
5702 $as_echo "$UNAME" >&6; }
5703 else
5704   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5705 $as_echo "no" >&6; }
5706 fi
5707 
5708 
5709   test -n "$UNAME" && break
5710 done
5711 
5712 
5713     if test "x$UNAME" = x; then
5714         if test "xuname" = x; then
5715           PROG_NAME=uname
5716         else
5717           PROG_NAME=uname
5718         fi
5719         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5720 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5721         as_fn_error $? "Cannot continue" "$LINENO" 5
5722     fi
5723 
5724 
5725 
5726     for ac_prog in uniq
5727 do
5728   # Extract the first word of "$ac_prog", so it can be a program name with args.
5729 set dummy $ac_prog; ac_word=$2
5730 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5731 $as_echo_n "checking for $ac_word... " >&6; }
5732 if ${ac_cv_path_UNIQ+:} false; then :
5733   $as_echo_n "(cached) " >&6
5734 else
5735   case $UNIQ in
5736   [\\/]* | ?:[\\/]*)
5737   ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
5738   ;;
5739   *)
5740   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5741 for as_dir in $PATH
5742 do
5743   IFS=$as_save_IFS
5744   test -z "$as_dir" && as_dir=.
5745     for ac_exec_ext in '' $ac_executable_extensions; do
5746   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5747     ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
5748     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5749     break 2
5750   fi
5751 done
5752   done
5753 IFS=$as_save_IFS
5754 
5755   ;;
5756 esac
5757 fi
5758 UNIQ=$ac_cv_path_UNIQ
5759 if test -n "$UNIQ"; then
5760   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
5761 $as_echo "$UNIQ" >&6; }
5762 else
5763   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5764 $as_echo "no" >&6; }
5765 fi
5766 
5767 
5768   test -n "$UNIQ" && break
5769 done
5770 
5771 
5772     if test "x$UNIQ" = x; then
5773         if test "xuniq" = x; then
5774           PROG_NAME=uniq
5775         else
5776           PROG_NAME=uniq
5777         fi
5778         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5779 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5780         as_fn_error $? "Cannot continue" "$LINENO" 5
5781     fi
5782 
5783 
5784 
5785     for ac_prog in wc
5786 do
5787   # Extract the first word of "$ac_prog", so it can be a program name with args.
5788 set dummy $ac_prog; ac_word=$2
5789 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5790 $as_echo_n "checking for $ac_word... " >&6; }
5791 if ${ac_cv_path_WC+:} false; then :
5792   $as_echo_n "(cached) " >&6
5793 else
5794   case $WC in
5795   [\\/]* | ?:[\\/]*)
5796   ac_cv_path_WC="$WC" # Let the user override the test with a path.
5797   ;;
5798   *)
5799   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5800 for as_dir in $PATH
5801 do
5802   IFS=$as_save_IFS
5803   test -z "$as_dir" && as_dir=.
5804     for ac_exec_ext in '' $ac_executable_extensions; do
5805   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5806     ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
5807     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5808     break 2
5809   fi
5810 done
5811   done
5812 IFS=$as_save_IFS
5813 
5814   ;;
5815 esac
5816 fi
5817 WC=$ac_cv_path_WC
5818 if test -n "$WC"; then
5819   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
5820 $as_echo "$WC" >&6; }
5821 else
5822   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5823 $as_echo "no" >&6; }
5824 fi
5825 
5826 
5827   test -n "$WC" && break
5828 done
5829 
5830 
5831     if test "x$WC" = x; then
5832         if test "xwc" = x; then
5833           PROG_NAME=wc
5834         else
5835           PROG_NAME=wc
5836         fi
5837         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5838 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5839         as_fn_error $? "Cannot continue" "$LINENO" 5
5840     fi
5841 
5842 
5843 
5844     for ac_prog in which
5845 do
5846   # Extract the first word of "$ac_prog", so it can be a program name with args.
5847 set dummy $ac_prog; ac_word=$2
5848 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5849 $as_echo_n "checking for $ac_word... " >&6; }
5850 if ${ac_cv_path_WHICH+:} false; then :
5851   $as_echo_n "(cached) " >&6
5852 else
5853   case $WHICH in
5854   [\\/]* | ?:[\\/]*)
5855   ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
5856   ;;
5857   *)
5858   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5859 for as_dir in $PATH
5860 do
5861   IFS=$as_save_IFS
5862   test -z "$as_dir" && as_dir=.
5863     for ac_exec_ext in '' $ac_executable_extensions; do
5864   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5865     ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
5866     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5867     break 2
5868   fi
5869 done
5870   done
5871 IFS=$as_save_IFS
5872 
5873   ;;
5874 esac
5875 fi
5876 WHICH=$ac_cv_path_WHICH
5877 if test -n "$WHICH"; then
5878   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
5879 $as_echo "$WHICH" >&6; }
5880 else
5881   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5882 $as_echo "no" >&6; }
5883 fi
5884 
5885 
5886   test -n "$WHICH" && break
5887 done
5888 
5889 
5890     if test "x$WHICH" = x; then
5891         if test "xwhich" = x; then
5892           PROG_NAME=which
5893         else
5894           PROG_NAME=which
5895         fi
5896         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5897 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5898         as_fn_error $? "Cannot continue" "$LINENO" 5
5899     fi
5900 
5901 
5902 
5903     for ac_prog in xargs
5904 do
5905   # Extract the first word of "$ac_prog", so it can be a program name with args.
5906 set dummy $ac_prog; ac_word=$2
5907 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5908 $as_echo_n "checking for $ac_word... " >&6; }
5909 if ${ac_cv_path_XARGS+:} false; then :
5910   $as_echo_n "(cached) " >&6
5911 else
5912   case $XARGS in
5913   [\\/]* | ?:[\\/]*)
5914   ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
5915   ;;
5916   *)
5917   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5918 for as_dir in $PATH
5919 do
5920   IFS=$as_save_IFS
5921   test -z "$as_dir" && as_dir=.
5922     for ac_exec_ext in '' $ac_executable_extensions; do
5923   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5924     ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
5925     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5926     break 2
5927   fi
5928 done
5929   done
5930 IFS=$as_save_IFS
5931 
5932   ;;
5933 esac
5934 fi
5935 XARGS=$ac_cv_path_XARGS
5936 if test -n "$XARGS"; then
5937   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
5938 $as_echo "$XARGS" >&6; }
5939 else
5940   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5941 $as_echo "no" >&6; }
5942 fi
5943 
5944 
5945   test -n "$XARGS" && break
5946 done
5947 
5948 
5949     if test "x$XARGS" = x; then
5950         if test "xxargs" = x; then
5951           PROG_NAME=xargs
5952         else
5953           PROG_NAME=xargs
5954         fi
5955         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5956 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5957         as_fn_error $? "Cannot continue" "$LINENO" 5
5958     fi
5959 
5960 
5961 
5962 # Then required tools that require some special treatment.
5963 for ac_prog in gawk mawk nawk awk
5964 do
5965   # Extract the first word of "$ac_prog", so it can be a program name with args.
5966 set dummy $ac_prog; ac_word=$2
5967 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5968 $as_echo_n "checking for $ac_word... " >&6; }
5969 if ${ac_cv_prog_AWK+:} false; then :
5970   $as_echo_n "(cached) " >&6
5971 else
5972   if test -n "$AWK"; then
5973   ac_cv_prog_AWK="$AWK" # Let the user override the test.
5974 else
5975 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5976 for as_dir in $PATH
5977 do
5978   IFS=$as_save_IFS
5979   test -z "$as_dir" && as_dir=.
5980     for ac_exec_ext in '' $ac_executable_extensions; do
5981   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5982     ac_cv_prog_AWK="$ac_prog"
5983     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5984     break 2
5985   fi
5986 done
5987   done
5988 IFS=$as_save_IFS
5989 
5990 fi
5991 fi
5992 AWK=$ac_cv_prog_AWK
5993 if test -n "$AWK"; then
5994   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
5995 $as_echo "$AWK" >&6; }
5996 else
5997   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5998 $as_echo "no" >&6; }
5999 fi
6000 
6001 
6002   test -n "$AWK" && break
6003 done
6004 
6005 
6006     if test "x$AWK" = x; then
6007         if test "x" = x; then
6008           PROG_NAME=awk
6009         else
6010           PROG_NAME=
6011         fi
6012         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6013 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6014         as_fn_error $? "Cannot continue" "$LINENO" 5
6015     fi
6016 
6017 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
6018 $as_echo_n "checking for grep that handles long lines and -e... " >&6; }
6019 if ${ac_cv_path_GREP+:} false; then :
6020   $as_echo_n "(cached) " >&6
6021 else
6022   if test -z "$GREP"; then
6023   ac_path_GREP_found=false
6024   # Loop through the user's path and test for each of PROGNAME-LIST
6025   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6026 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
6027 do
6028   IFS=$as_save_IFS
6029   test -z "$as_dir" && as_dir=.
6030     for ac_prog in grep ggrep; do
6031     for ac_exec_ext in '' $ac_executable_extensions; do
6032       ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
6033       { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
6034 # Check for GNU ac_path_GREP and select it if it is found.
6035   # Check for GNU $ac_path_GREP
6036 case `"$ac_path_GREP" --version 2>&1` in
6037 *GNU*)
6038   ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
6039 *)
6040   ac_count=0
6041   $as_echo_n 0123456789 >"conftest.in"
6042   while :
6043   do
6044     cat "conftest.in" "conftest.in" >"conftest.tmp"
6045     mv "conftest.tmp" "conftest.in"
6046     cp "conftest.in" "conftest.nl"
6047     $as_echo 'GREP' >> "conftest.nl"
6048     "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
6049     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6050     as_fn_arith $ac_count + 1 && ac_count=$as_val
6051     if test $ac_count -gt ${ac_path_GREP_max-0}; then
6052       # Best one so far, save it but keep looking for a better one
6053       ac_cv_path_GREP="$ac_path_GREP"
6054       ac_path_GREP_max=$ac_count
6055     fi
6056     # 10*(2^10) chars as input seems more than enough
6057     test $ac_count -gt 10 && break
6058   done
6059   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6060 esac
6061 
6062       $ac_path_GREP_found && break 3
6063     done
6064   done
6065   done
6066 IFS=$as_save_IFS
6067   if test -z "$ac_cv_path_GREP"; then
6068     as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
6069   fi
6070 else
6071   ac_cv_path_GREP=$GREP
6072 fi
6073 
6074 fi
6075 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
6076 $as_echo "$ac_cv_path_GREP" >&6; }
6077  GREP="$ac_cv_path_GREP"
6078 
6079 
6080 
6081     if test "x$GREP" = x; then
6082         if test "x" = x; then
6083           PROG_NAME=grep
6084         else
6085           PROG_NAME=
6086         fi
6087         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6088 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6089         as_fn_error $? "Cannot continue" "$LINENO" 5
6090     fi
6091 
6092 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
6093 $as_echo_n "checking for egrep... " >&6; }
6094 if ${ac_cv_path_EGREP+:} false; then :
6095   $as_echo_n "(cached) " >&6
6096 else
6097   if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
6098    then ac_cv_path_EGREP="$GREP -E"
6099    else
6100      if test -z "$EGREP"; then
6101   ac_path_EGREP_found=false
6102   # Loop through the user's path and test for each of PROGNAME-LIST
6103   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6104 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
6105 do
6106   IFS=$as_save_IFS
6107   test -z "$as_dir" && as_dir=.
6108     for ac_prog in egrep; do
6109     for ac_exec_ext in '' $ac_executable_extensions; do
6110       ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
6111       { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
6112 # Check for GNU ac_path_EGREP and select it if it is found.
6113   # Check for GNU $ac_path_EGREP
6114 case `"$ac_path_EGREP" --version 2>&1` in
6115 *GNU*)
6116   ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
6117 *)
6118   ac_count=0
6119   $as_echo_n 0123456789 >"conftest.in"
6120   while :
6121   do
6122     cat "conftest.in" "conftest.in" >"conftest.tmp"
6123     mv "conftest.tmp" "conftest.in"
6124     cp "conftest.in" "conftest.nl"
6125     $as_echo 'EGREP' >> "conftest.nl"
6126     "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
6127     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6128     as_fn_arith $ac_count + 1 && ac_count=$as_val
6129     if test $ac_count -gt ${ac_path_EGREP_max-0}; then
6130       # Best one so far, save it but keep looking for a better one
6131       ac_cv_path_EGREP="$ac_path_EGREP"
6132       ac_path_EGREP_max=$ac_count
6133     fi
6134     # 10*(2^10) chars as input seems more than enough
6135     test $ac_count -gt 10 && break
6136   done
6137   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6138 esac
6139 
6140       $ac_path_EGREP_found && break 3
6141     done
6142   done
6143   done
6144 IFS=$as_save_IFS
6145   if test -z "$ac_cv_path_EGREP"; then
6146     as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
6147   fi
6148 else
6149   ac_cv_path_EGREP=$EGREP
6150 fi
6151 
6152    fi
6153 fi
6154 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
6155 $as_echo "$ac_cv_path_EGREP" >&6; }
6156  EGREP="$ac_cv_path_EGREP"
6157 
6158 
6159 
6160     if test "x$EGREP" = x; then
6161         if test "x" = x; then
6162           PROG_NAME=egrep
6163         else
6164           PROG_NAME=
6165         fi
6166         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6167 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6168         as_fn_error $? "Cannot continue" "$LINENO" 5
6169     fi
6170 
6171 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
6172 $as_echo_n "checking for fgrep... " >&6; }
6173 if ${ac_cv_path_FGREP+:} false; then :
6174   $as_echo_n "(cached) " >&6
6175 else
6176   if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
6177    then ac_cv_path_FGREP="$GREP -F"
6178    else
6179      if test -z "$FGREP"; then
6180   ac_path_FGREP_found=false
6181   # Loop through the user's path and test for each of PROGNAME-LIST
6182   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6183 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
6184 do
6185   IFS=$as_save_IFS
6186   test -z "$as_dir" && as_dir=.
6187     for ac_prog in fgrep; do
6188     for ac_exec_ext in '' $ac_executable_extensions; do
6189       ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
6190       { test -f "$ac_path_FGREP" && $as_test_x "$ac_path_FGREP"; } || continue
6191 # Check for GNU ac_path_FGREP and select it if it is found.
6192   # Check for GNU $ac_path_FGREP
6193 case `"$ac_path_FGREP" --version 2>&1` in
6194 *GNU*)
6195   ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
6196 *)
6197   ac_count=0
6198   $as_echo_n 0123456789 >"conftest.in"
6199   while :
6200   do
6201     cat "conftest.in" "conftest.in" >"conftest.tmp"
6202     mv "conftest.tmp" "conftest.in"
6203     cp "conftest.in" "conftest.nl"
6204     $as_echo 'FGREP' >> "conftest.nl"
6205     "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
6206     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6207     as_fn_arith $ac_count + 1 && ac_count=$as_val
6208     if test $ac_count -gt ${ac_path_FGREP_max-0}; then
6209       # Best one so far, save it but keep looking for a better one
6210       ac_cv_path_FGREP="$ac_path_FGREP"
6211       ac_path_FGREP_max=$ac_count
6212     fi
6213     # 10*(2^10) chars as input seems more than enough
6214     test $ac_count -gt 10 && break
6215   done
6216   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6217 esac
6218 
6219       $ac_path_FGREP_found && break 3
6220     done
6221   done
6222   done
6223 IFS=$as_save_IFS
6224   if test -z "$ac_cv_path_FGREP"; then
6225     as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
6226   fi
6227 else
6228   ac_cv_path_FGREP=$FGREP
6229 fi
6230 
6231    fi
6232 fi
6233 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
6234 $as_echo "$ac_cv_path_FGREP" >&6; }
6235  FGREP="$ac_cv_path_FGREP"
6236 
6237 
6238 
6239     if test "x$FGREP" = x; then
6240         if test "x" = x; then
6241           PROG_NAME=fgrep
6242         else
6243           PROG_NAME=
6244         fi
6245         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6246 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6247         as_fn_error $? "Cannot continue" "$LINENO" 5
6248     fi
6249 
6250 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
6251 $as_echo_n "checking for a sed that does not truncate output... " >&6; }
6252 if ${ac_cv_path_SED+:} false; then :
6253   $as_echo_n "(cached) " >&6
6254 else
6255             ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
6256      for ac_i in 1 2 3 4 5 6 7; do
6257        ac_script="$ac_script$as_nl$ac_script"
6258      done
6259      echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
6260      { ac_script=; unset ac_script;}
6261      if test -z "$SED"; then
6262   ac_path_SED_found=false
6263   # Loop through the user's path and test for each of PROGNAME-LIST
6264   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6265 for as_dir in $PATH
6266 do
6267   IFS=$as_save_IFS
6268   test -z "$as_dir" && as_dir=.
6269     for ac_prog in sed gsed; do
6270     for ac_exec_ext in '' $ac_executable_extensions; do
6271       ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
6272       { test -f "$ac_path_SED" && $as_test_x "$ac_path_SED"; } || continue
6273 # Check for GNU ac_path_SED and select it if it is found.
6274   # Check for GNU $ac_path_SED
6275 case `"$ac_path_SED" --version 2>&1` in
6276 *GNU*)
6277   ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
6278 *)
6279   ac_count=0
6280   $as_echo_n 0123456789 >"conftest.in"
6281   while :
6282   do
6283     cat "conftest.in" "conftest.in" >"conftest.tmp"
6284     mv "conftest.tmp" "conftest.in"
6285     cp "conftest.in" "conftest.nl"
6286     $as_echo '' >> "conftest.nl"
6287     "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
6288     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6289     as_fn_arith $ac_count + 1 && ac_count=$as_val
6290     if test $ac_count -gt ${ac_path_SED_max-0}; then
6291       # Best one so far, save it but keep looking for a better one
6292       ac_cv_path_SED="$ac_path_SED"
6293       ac_path_SED_max=$ac_count
6294     fi
6295     # 10*(2^10) chars as input seems more than enough
6296     test $ac_count -gt 10 && break
6297   done
6298   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6299 esac
6300 
6301       $ac_path_SED_found && break 3
6302     done
6303   done
6304   done
6305 IFS=$as_save_IFS
6306   if test -z "$ac_cv_path_SED"; then
6307     as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
6308   fi
6309 else
6310   ac_cv_path_SED=$SED
6311 fi
6312 
6313 fi
6314 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
6315 $as_echo "$ac_cv_path_SED" >&6; }
6316  SED="$ac_cv_path_SED"
6317   rm -f conftest.sed
6318 
6319 
6320     if test "x$SED" = x; then
6321         if test "x" = x; then
6322           PROG_NAME=sed
6323         else
6324           PROG_NAME=
6325         fi
6326         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6327 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6328         as_fn_error $? "Cannot continue" "$LINENO" 5
6329     fi
6330 
6331 
6332 for ac_prog in nawk gawk awk
6333 do
6334   # Extract the first word of "$ac_prog", so it can be a program name with args.
6335 set dummy $ac_prog; ac_word=$2
6336 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6337 $as_echo_n "checking for $ac_word... " >&6; }
6338 if ${ac_cv_path_NAWK+:} false; then :
6339   $as_echo_n "(cached) " >&6
6340 else
6341   case $NAWK in
6342   [\\/]* | ?:[\\/]*)
6343   ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
6344   ;;
6345   *)
6346   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6347 for as_dir in $PATH
6348 do
6349   IFS=$as_save_IFS
6350   test -z "$as_dir" && as_dir=.
6351     for ac_exec_ext in '' $ac_executable_extensions; do
6352   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6353     ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
6354     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6355     break 2
6356   fi
6357 done
6358   done
6359 IFS=$as_save_IFS
6360 
6361   ;;
6362 esac
6363 fi
6364 NAWK=$ac_cv_path_NAWK
6365 if test -n "$NAWK"; then
6366   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
6367 $as_echo "$NAWK" >&6; }
6368 else
6369   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6370 $as_echo "no" >&6; }
6371 fi
6372 
6373 
6374   test -n "$NAWK" && break
6375 done
6376 
6377 
6378     if test "x$NAWK" = x; then
6379         if test "x" = x; then
6380           PROG_NAME=nawk
6381         else
6382           PROG_NAME=
6383         fi
6384         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6385 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6386         as_fn_error $? "Cannot continue" "$LINENO" 5
6387     fi
6388 
6389 
6390 # Always force rm.
6391 RM="$RM -f"
6392 
6393 # pwd behaves differently on various platforms and some don't support the -L flag.
6394 # Always use the bash builtin pwd to get uniform behavior.
6395 THEPWDCMD=pwd
6396 
6397 # These are not required on all platforms
6398 # Extract the first word of "cygpath", so it can be a program name with args.
6399 set dummy cygpath; ac_word=$2
6400 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6401 $as_echo_n "checking for $ac_word... " >&6; }
6402 if ${ac_cv_path_CYGPATH+:} false; then :
6403   $as_echo_n "(cached) " >&6
6404 else
6405   case $CYGPATH in
6406   [\\/]* | ?:[\\/]*)
6407   ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
6408   ;;
6409   *)
6410   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6411 for as_dir in $PATH
6412 do
6413   IFS=$as_save_IFS
6414   test -z "$as_dir" && as_dir=.
6415     for ac_exec_ext in '' $ac_executable_extensions; do
6416   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6417     ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
6418     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6419     break 2
6420   fi
6421 done
6422   done
6423 IFS=$as_save_IFS
6424 
6425   ;;
6426 esac
6427 fi
6428 CYGPATH=$ac_cv_path_CYGPATH
6429 if test -n "$CYGPATH"; then
6430   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
6431 $as_echo "$CYGPATH" >&6; }
6432 else
6433   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6434 $as_echo "no" >&6; }
6435 fi
6436 
6437 
6438 # Extract the first word of "readlink", so it can be a program name with args.
6439 set dummy readlink; ac_word=$2
6440 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6441 $as_echo_n "checking for $ac_word... " >&6; }
6442 if ${ac_cv_path_READLINK+:} false; then :
6443   $as_echo_n "(cached) " >&6
6444 else
6445   case $READLINK in
6446   [\\/]* | ?:[\\/]*)
6447   ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
6448   ;;
6449   *)
6450   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6451 for as_dir in $PATH
6452 do
6453   IFS=$as_save_IFS
6454   test -z "$as_dir" && as_dir=.
6455     for ac_exec_ext in '' $ac_executable_extensions; do
6456   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6457     ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
6458     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6459     break 2
6460   fi
6461 done
6462   done
6463 IFS=$as_save_IFS
6464 
6465   ;;
6466 esac
6467 fi
6468 READLINK=$ac_cv_path_READLINK
6469 if test -n "$READLINK"; then
6470   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
6471 $as_echo "$READLINK" >&6; }
6472 else
6473   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6474 $as_echo "no" >&6; }
6475 fi
6476 
6477 
6478 # Extract the first word of "df", so it can be a program name with args.
6479 set dummy df; ac_word=$2
6480 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6481 $as_echo_n "checking for $ac_word... " >&6; }
6482 if ${ac_cv_path_DF+:} false; then :
6483   $as_echo_n "(cached) " >&6
6484 else
6485   case $DF in
6486   [\\/]* | ?:[\\/]*)
6487   ac_cv_path_DF="$DF" # Let the user override the test with a path.
6488   ;;
6489   *)
6490   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6491 for as_dir in $PATH
6492 do
6493   IFS=$as_save_IFS
6494   test -z "$as_dir" && as_dir=.
6495     for ac_exec_ext in '' $ac_executable_extensions; do
6496   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6497     ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
6498     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6499     break 2
6500   fi
6501 done
6502   done
6503 IFS=$as_save_IFS
6504 
6505   ;;
6506 esac
6507 fi
6508 DF=$ac_cv_path_DF
6509 if test -n "$DF"; then
6510   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
6511 $as_echo "$DF" >&6; }
6512 else
6513   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6514 $as_echo "no" >&6; }
6515 fi
6516 
6517 
6518 # Extract the first word of "SetFile", so it can be a program name with args.
6519 set dummy SetFile; ac_word=$2
6520 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6521 $as_echo_n "checking for $ac_word... " >&6; }
6522 if ${ac_cv_path_SETFILE+:} false; then :
6523   $as_echo_n "(cached) " >&6
6524 else
6525   case $SETFILE in
6526   [\\/]* | ?:[\\/]*)
6527   ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
6528   ;;
6529   *)
6530   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6531 for as_dir in $PATH
6532 do
6533   IFS=$as_save_IFS
6534   test -z "$as_dir" && as_dir=.
6535     for ac_exec_ext in '' $ac_executable_extensions; do
6536   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6537     ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
6538     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6539     break 2
6540   fi
6541 done
6542   done
6543 IFS=$as_save_IFS
6544 
6545   ;;
6546 esac
6547 fi
6548 SETFILE=$ac_cv_path_SETFILE
6549 if test -n "$SETFILE"; then
6550   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
6551 $as_echo "$SETFILE" >&6; }
6552 else
6553   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6554 $as_echo "no" >&6; }
6555 fi
6556 
6557 
6558 
6559 
6560 # Now we can determine OpenJDK build and target platforms. This is required to
6561 # have early on.
6562 # Make sure we can run config.sub.
6563 $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
6564   as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
6565 
6566 { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
6567 $as_echo_n "checking build system type... " >&6; }
6568 if ${ac_cv_build+:} false; then :
6569   $as_echo_n "(cached) " >&6
6570 else
6571   ac_build_alias=$build_alias
6572 test "x$ac_build_alias" = x &&
6573   ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
6574 test "x$ac_build_alias" = x &&
6575   as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
6576 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
6577   as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
6578 
6579 fi
6580 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
6581 $as_echo "$ac_cv_build" >&6; }
6582 case $ac_cv_build in
6583 *-*-*) ;;
6584 *) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
6585 esac
6586 build=$ac_cv_build
6587 ac_save_IFS=$IFS; IFS='-'
6588 set x $ac_cv_build
6589 shift
6590 build_cpu=$1
6591 build_vendor=$2
6592 shift; shift
6593 # Remember, the first character of IFS is used to create $*,
6594 # except with old shells:
6595 build_os=$*
6596 IFS=$ac_save_IFS
6597 case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
6598 
6599 
6600 { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
6601 $as_echo_n "checking host system type... " >&6; }
6602 if ${ac_cv_host+:} false; then :
6603   $as_echo_n "(cached) " >&6
6604 else
6605   if test "x$host_alias" = x; then
6606   ac_cv_host=$ac_cv_build
6607 else
6608   ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
6609     as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
6610 fi
6611 
6612 fi
6613 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
6614 $as_echo "$ac_cv_host" >&6; }
6615 case $ac_cv_host in
6616 *-*-*) ;;
6617 *) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
6618 esac
6619 host=$ac_cv_host
6620 ac_save_IFS=$IFS; IFS='-'
6621 set x $ac_cv_host
6622 shift
6623 host_cpu=$1
6624 host_vendor=$2
6625 shift; shift
6626 # Remember, the first character of IFS is used to create $*,
6627 # except with old shells:
6628 host_os=$*
6629 IFS=$ac_save_IFS
6630 case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
6631 
6632 
6633 { $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
6634 $as_echo_n "checking target system type... " >&6; }
6635 if ${ac_cv_target+:} false; then :
6636   $as_echo_n "(cached) " >&6
6637 else
6638   if test "x$target_alias" = x; then
6639   ac_cv_target=$ac_cv_host
6640 else
6641   ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
6642     as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
6643 fi
6644 
6645 fi
6646 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
6647 $as_echo "$ac_cv_target" >&6; }
6648 case $ac_cv_target in
6649 *-*-*) ;;
6650 *) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
6651 esac
6652 target=$ac_cv_target
6653 ac_save_IFS=$IFS; IFS='-'
6654 set x $ac_cv_target
6655 shift
6656 target_cpu=$1
6657 target_vendor=$2
6658 shift; shift
6659 # Remember, the first character of IFS is used to create $*,
6660 # except with old shells:
6661 target_os=$*
6662 IFS=$ac_save_IFS
6663 case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
6664 
6665 
6666 # The aliases save the names the user supplied, while $host etc.
6667 # will get canonicalized.
6668 test -n "$target_alias" &&
6669   test "$program_prefix$program_suffix$program_transform_name" = \
6670     NONENONEs,x,x, &&
6671   program_prefix=${target_alias}-
6672 
6673 # Figure out the build and target systems. # Note that in autoconf terminology, "build" is obvious, but "target"
6674 # is confusing; it assumes you are cross-compiling a cross-compiler (!)  and "target" is thus the target of the
6675 # product you're building. The target of this build is called "host". Since this is confusing to most people, we
6676 # have not adopted that system, but use "target" as the platform we are building for. In some places though we need
6677 # to use the configure naming style.
6678 
6679 
6680 
6681 
6682 
6683     # Copy the autoconf trip/quadruplet verbatim to OPENJDK_TARGET_AUTOCONF_NAME
6684     # (from the autoconf "host") and OPENJDK_BUILD_AUTOCONF_NAME
6685     # Note that we might later on rewrite e.g. OPENJDK_TARGET_CPU due to reduced build,
6686     # but this will not change the value of OPENJDK_TARGET_AUTOCONF_NAME.
6687     OPENJDK_TARGET_AUTOCONF_NAME="$host"
6688     OPENJDK_BUILD_AUTOCONF_NAME="$build"
6689 
6690 
6691 
6692     # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
6693 
6694   case "$build_os" in
6695     *linux*)
6696       VAR_OS=linux
6697       VAR_OS_API=posix
6698       VAR_OS_ENV=linux
6699       ;;
6700     *solaris*)
6701       VAR_OS=solaris
6702       VAR_OS_API=posix
6703       VAR_OS_ENV=solaris
6704       ;;
6705     *darwin*)
6706       VAR_OS=macosx
6707       VAR_OS_API=posix
6708       VAR_OS_ENV=macosx
6709       ;;
6710     *bsd*)
6711       VAR_OS=bsd
6712       VAR_OS_API=posix
6713       VAR_OS_ENV=bsd
6714       ;;
6715     *cygwin*)
6716       VAR_OS=windows
6717       VAR_OS_API=winapi
6718       VAR_OS_ENV=windows.cygwin
6719       ;;
6720     *mingw*)
6721       VAR_OS=windows
6722       VAR_OS_API=winapi
6723       VAR_OS_ENV=windows.msys
6724       ;;
6725     *)
6726       as_fn_error $? "unsupported operating system $build_os" "$LINENO" 5
6727       ;;
6728   esac
6729 
6730 
6731   # First argument is the cpu name from the trip/quad
6732   case "$build_cpu" in
6733     x86_64)
6734       VAR_CPU=x86_64
6735       VAR_CPU_ARCH=x86
6736       VAR_CPU_BITS=64
6737       VAR_CPU_ENDIAN=little
6738       ;;
6739     i?86)
6740       VAR_CPU=x86
6741       VAR_CPU_ARCH=x86
6742       VAR_CPU_BITS=32
6743       VAR_CPU_ENDIAN=little
6744       ;;
6745     arm*)
6746       VAR_CPU=arm
6747       VAR_CPU_ARCH=arm
6748       VAR_CPU_BITS=32
6749       VAR_CPU_ENDIAN=little
6750       ;;
6751     powerpc)
6752       VAR_CPU=ppc
6753       VAR_CPU_ARCH=ppc
6754       VAR_CPU_BITS=32
6755       VAR_CPU_ENDIAN=big
6756        ;;
6757     powerpc64)
6758       VAR_CPU=ppc64
6759       VAR_CPU_ARCH=ppc
6760       VAR_CPU_BITS=64
6761       VAR_CPU_ENDIAN=big
6762        ;;
6763     sparc)
6764       VAR_CPU=sparc
6765       VAR_CPU_ARCH=sparc
6766       VAR_CPU_BITS=32
6767       VAR_CPU_ENDIAN=big
6768        ;;
6769     sparcv9)
6770       VAR_CPU=sparcv9
6771       VAR_CPU_ARCH=sparc
6772       VAR_CPU_BITS=64
6773       VAR_CPU_ENDIAN=big
6774        ;;
6775     *)
6776       as_fn_error $? "unsupported cpu $build_cpu" "$LINENO" 5
6777       ;;
6778   esac
6779 
6780     # ..and setup our own variables. (Do this explicitely to facilitate searching)
6781     OPENJDK_BUILD_OS="$VAR_OS"
6782     OPENJDK_BUILD_OS_API="$VAR_OS_API"
6783     OPENJDK_BUILD_OS_ENV="$VAR_OS_ENV"
6784     OPENJDK_BUILD_CPU="$VAR_CPU"
6785     OPENJDK_BUILD_CPU_ARCH="$VAR_CPU_ARCH"
6786     OPENJDK_BUILD_CPU_BITS="$VAR_CPU_BITS"
6787     OPENJDK_BUILD_CPU_ENDIAN="$VAR_CPU_ENDIAN"
6788 
6789 
6790 
6791 
6792 
6793 
6794 
6795     { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-build os-cpu" >&5
6796 $as_echo_n "checking openjdk-build os-cpu... " >&6; }
6797     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&5
6798 $as_echo "$OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&6; }
6799 
6800     # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
6801 
6802   case "$host_os" in
6803     *linux*)
6804       VAR_OS=linux
6805       VAR_OS_API=posix
6806       VAR_OS_ENV=linux
6807       ;;
6808     *solaris*)
6809       VAR_OS=solaris
6810       VAR_OS_API=posix
6811       VAR_OS_ENV=solaris
6812       ;;
6813     *darwin*)
6814       VAR_OS=macosx
6815       VAR_OS_API=posix
6816       VAR_OS_ENV=macosx
6817       ;;
6818     *bsd*)
6819       VAR_OS=bsd
6820       VAR_OS_API=posix
6821       VAR_OS_ENV=bsd
6822       ;;
6823     *cygwin*)
6824       VAR_OS=windows
6825       VAR_OS_API=winapi
6826       VAR_OS_ENV=windows.cygwin
6827       ;;
6828     *mingw*)
6829       VAR_OS=windows
6830       VAR_OS_API=winapi
6831       VAR_OS_ENV=windows.msys
6832       ;;
6833     *)
6834       as_fn_error $? "unsupported operating system $host_os" "$LINENO" 5
6835       ;;
6836   esac
6837 
6838 
6839   # First argument is the cpu name from the trip/quad
6840   case "$host_cpu" in
6841     x86_64)
6842       VAR_CPU=x86_64
6843       VAR_CPU_ARCH=x86
6844       VAR_CPU_BITS=64
6845       VAR_CPU_ENDIAN=little
6846       ;;
6847     i?86)
6848       VAR_CPU=x86
6849       VAR_CPU_ARCH=x86
6850       VAR_CPU_BITS=32
6851       VAR_CPU_ENDIAN=little
6852       ;;
6853     arm*)
6854       VAR_CPU=arm
6855       VAR_CPU_ARCH=arm
6856       VAR_CPU_BITS=32
6857       VAR_CPU_ENDIAN=little
6858       ;;
6859     powerpc)
6860       VAR_CPU=ppc
6861       VAR_CPU_ARCH=ppc
6862       VAR_CPU_BITS=32
6863       VAR_CPU_ENDIAN=big
6864        ;;
6865     powerpc64)
6866       VAR_CPU=ppc64
6867       VAR_CPU_ARCH=ppc
6868       VAR_CPU_BITS=64
6869       VAR_CPU_ENDIAN=big
6870        ;;
6871     sparc)
6872       VAR_CPU=sparc
6873       VAR_CPU_ARCH=sparc
6874       VAR_CPU_BITS=32
6875       VAR_CPU_ENDIAN=big
6876        ;;
6877     sparcv9)
6878       VAR_CPU=sparcv9
6879       VAR_CPU_ARCH=sparc
6880       VAR_CPU_BITS=64
6881       VAR_CPU_ENDIAN=big
6882        ;;
6883     *)
6884       as_fn_error $? "unsupported cpu $host_cpu" "$LINENO" 5
6885       ;;
6886   esac
6887 
6888     # ... and setup our own variables. (Do this explicitely to facilitate searching)
6889     OPENJDK_TARGET_OS="$VAR_OS"
6890     OPENJDK_TARGET_OS_API="$VAR_OS_API"
6891     OPENJDK_TARGET_OS_ENV="$VAR_OS_ENV"
6892     OPENJDK_TARGET_CPU="$VAR_CPU"
6893     OPENJDK_TARGET_CPU_ARCH="$VAR_CPU_ARCH"
6894     OPENJDK_TARGET_CPU_BITS="$VAR_CPU_BITS"
6895     OPENJDK_TARGET_CPU_ENDIAN="$VAR_CPU_ENDIAN"
6896 
6897 
6898 
6899 
6900 
6901 
6902 
6903     { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-target os-cpu" >&5
6904 $as_echo_n "checking openjdk-target os-cpu... " >&6; }
6905     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&5
6906 $as_echo "$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&6; }
6907 
6908 
6909 
6910 # Check whether --with-target-bits was given.
6911 if test "${with_target_bits+set}" = set; then :
6912   withval=$with_target_bits;
6913 fi
6914 
6915 
6916   # We have three types of compiles:
6917   # native  == normal compilation, target system == build system
6918   # cross   == traditional cross compilation, target system != build system; special toolchain needed
6919   # reduced == using native compilers, but with special flags (e.g. -m32) to produce 32-bit builds on 64-bit machines
6920   #
6921   if test "x$OPENJDK_BUILD_AUTOCONF_NAME" != "x$OPENJDK_TARGET_AUTOCONF_NAME"; then
6922     # We're doing a proper cross-compilation
6923     COMPILE_TYPE="cross"
6924   else
6925     COMPILE_TYPE="native"
6926   fi
6927 
6928   if test "x$with_target_bits" != x; then
6929     if test "x$COMPILE_TYPE" = "xcross"; then
6930       as_fn_error $? "It is not possible to combine --with-target-bits=X and proper cross-compilation. Choose either." "$LINENO" 5
6931     fi
6932 
6933     if test "x$with_target_bits" = x32 && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
6934       # A reduced build is requested
6935       COMPILE_TYPE="reduced"
6936       OPENJDK_TARGET_CPU_BITS=32
6937       if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
6938         OPENJDK_TARGET_CPU=x86
6939       elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
6940         OPENJDK_TARGET_CPU=sparc
6941       else
6942         as_fn_error $? "Reduced build (--with-target-bits=32) is only supported on x86_64 and sparcv9" "$LINENO" 5
6943       fi
6944     elif test "x$with_target_bits" = x64 && test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
6945       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
6946     elif test "x$with_target_bits" = "x$OPENJDK_TARGET_CPU_BITS"; then
6947       { $as_echo "$as_me:${as_lineno-$LINENO}: --with-target-bits are set to build platform address size; argument has no meaning" >&5
6948 $as_echo "$as_me: --with-target-bits are set to build platform address size; argument has no meaning" >&6;}
6949     else
6950       as_fn_error $? "--with-target-bits can only be 32 or 64, you specified $with_target_bits!" "$LINENO" 5
6951     fi
6952   fi
6953 
6954 
6955 { $as_echo "$as_me:${as_lineno-$LINENO}: checking compilation type" >&5
6956 $as_echo_n "checking compilation type... " >&6; }
6957 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMPILE_TYPE" >&5
6958 $as_echo "$COMPILE_TYPE" >&6; }
6959 
6960 
6961     if test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
6962        REQUIRED_OS_NAME=SunOS
6963        REQUIRED_OS_VERSION=5.10
6964     fi
6965     if test "x$OPENJDK_TARGET_OS" = "xlinux"; then
6966        REQUIRED_OS_NAME=Linux
6967        REQUIRED_OS_VERSION=2.6
6968     fi
6969     if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
6970         REQUIRED_OS_NAME=Windows
6971         if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
6972             REQUIRED_OS_VERSION=5.2
6973         else
6974             REQUIRED_OS_VERSION=5.1
6975         fi
6976     fi
6977     if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
6978         REQUIRED_OS_NAME=Darwin
6979         REQUIRED_OS_VERSION=11.2
6980     fi
6981 
6982 
6983 
6984 
6985 
6986     # Also store the legacy naming of the cpu.
6987     # Ie i586 and amd64 instead of x86 and x86_64
6988     OPENJDK_TARGET_CPU_LEGACY="$OPENJDK_TARGET_CPU"
6989     if test "x$OPENJDK_TARGET_CPU" = xx86; then
6990       OPENJDK_TARGET_CPU_LEGACY="i586"
6991     elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
6992       # On all platforms except MacOSX replace x86_64 with amd64.
6993       OPENJDK_TARGET_CPU_LEGACY="amd64"
6994     fi
6995 
6996 
6997     # And the second legacy naming of the cpu.
6998     # Ie i386 and amd64 instead of x86 and x86_64.
6999     OPENJDK_TARGET_CPU_LEGACY_LIB="$OPENJDK_TARGET_CPU"
7000     if test "x$OPENJDK_TARGET_CPU" = xx86; then
7001       OPENJDK_TARGET_CPU_LEGACY_LIB="i386"
7002     elif test "x$OPENJDK_TARGET_CPU" = xx86_64; then
7003       OPENJDK_TARGET_CPU_LEGACY_LIB="amd64"
7004     fi
7005 
7006 
7007     # This is the name of the cpu (but using i386 and amd64 instead of
7008     # x86 and x86_64, respectively), preceeded by a /, to be used when
7009     # locating libraries. On macosx, it's empty, though.
7010     OPENJDK_TARGET_CPU_LIBDIR="/$OPENJDK_TARGET_CPU_LEGACY_LIB"
7011     if test "x$OPENJDK_TARGET_OS" = xmacosx; then
7012         OPENJDK_TARGET_CPU_LIBDIR=""
7013     fi
7014 
7015 
7016     # OPENJDK_TARGET_CPU_ISADIR is normally empty. On 64-bit Solaris systems, it is set to
7017     # /amd64 or /sparcv9. This string is appended to some library paths, like this:
7018     # /usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libexample.so
7019     OPENJDK_TARGET_CPU_ISADIR=""
7020     if test "x$OPENJDK_TARGET_OS" = xsolaris; then
7021       if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
7022           OPENJDK_TARGET_CPU_ISADIR="/amd64"
7023       elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
7024           OPENJDK_TARGET_CPU_ISADIR="/sparcv9"
7025       fi
7026     fi
7027 
7028 
7029     # Setup OPENJDK_TARGET_CPU_OSARCH, which is used to set the os.arch Java system property
7030     OPENJDK_TARGET_CPU_OSARCH="$OPENJDK_TARGET_CPU"
7031     if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$OPENJDK_TARGET_CPU" = xx86; then
7032       # On linux only, we replace x86 with i386.
7033       OPENJDK_TARGET_CPU_OSARCH="i386"
7034     elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
7035       # On all platforms except macosx, we replace x86_64 with amd64.
7036       OPENJDK_TARGET_CPU_OSARCH="amd64"
7037     fi
7038 
7039 
7040     OPENJDK_TARGET_CPU_JLI="$OPENJDK_TARGET_CPU"
7041     if test "x$OPENJDK_TARGET_CPU" = xx86; then
7042       OPENJDK_TARGET_CPU_JLI="i386"
7043     elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
7044       # On all platforms except macosx, we replace x86_64 with amd64.
7045       OPENJDK_TARGET_CPU_JLI="amd64"
7046     fi
7047     # Now setup the -D flags for building libjli.
7048     OPENJDK_TARGET_CPU_JLI_CFLAGS="-DLIBARCHNAME='\"$OPENJDK_TARGET_CPU_JLI\"'"
7049     if test "x$OPENJDK_TARGET_OS" = xsolaris; then
7050       if test "x$OPENJDK_TARGET_CPU_ARCH" = xsparc; then
7051         OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"sparc\"' -DLIBARCH64NAME='\"sparcv9\"'"
7052       elif test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
7053         OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"i386\"' -DLIBARCH64NAME='\"amd64\"'"
7054       fi
7055     fi
7056 
7057 
7058     # Setup OPENJDK_TARGET_OS_API_DIR, used in source paths.
7059     if test "x$OPENJDK_TARGET_OS_API" = xposix; then
7060         OPENJDK_TARGET_OS_API_DIR="solaris"
7061     fi
7062     if test "x$OPENJDK_TARGET_OS_API" = xwinapi; then
7063         OPENJDK_TARGET_OS_API_DIR="windows"
7064     fi
7065 
7066 
7067     if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
7068         A_LP64="LP64:="
7069         # -D_LP64=1 is only set on linux and mac. Setting on windows causes diff in
7070         # unpack200.exe
7071         if test "x$OPENJDK_TARGET_OS" = xlinux || test "x$OPENJDK_TARGET_OS" = xmacosx; then
7072             ADD_LP64="-D_LP64=1"
7073         fi
7074     fi
7075     LP64=$A_LP64
7076 
7077 
7078     if test "x$COMPILE_TYPE" = "xcross"; then
7079       # FIXME: ... or should this include reduced builds..?
7080       DEFINE_CROSS_COMPILE_ARCH="CROSS_COMPILE_ARCH:=$OPENJDK_TARGET_CPU_LEGACY"
7081     else
7082       DEFINE_CROSS_COMPILE_ARCH=""
7083     fi
7084 
7085 
7086     # ZERO_ARCHDEF is used to enable architecture-specific code
7087     case "${OPENJDK_TARGET_CPU}" in
7088       ppc*)    ZERO_ARCHDEF=PPC   ;;
7089       s390*)   ZERO_ARCHDEF=S390  ;;
7090       sparc*)  ZERO_ARCHDEF=SPARC ;;
7091       x86_64*) ZERO_ARCHDEF=AMD64 ;;
7092       x86)     ZERO_ARCHDEF=IA32  ;;
7093       *)      ZERO_ARCHDEF=$(echo "${OPENJDK_TARGET_CPU_LEGACY_LIB}" | tr a-z A-Z)
7094     esac
7095 
7096 
7097 
7098 
7099 
7100 # Continue setting up basic stuff. Most remaining code require fundamental tools.
7101 
7102 # Locate the directory of this script.
7103 SCRIPT="$0"
7104 AUTOCONF_DIR=`cd \`$DIRNAME $SCRIPT\`; $THEPWDCMD -L`
7105 
7106 # Where is the source? It is located two levels above the configure script.
7107 CURDIR="$PWD"
7108 cd "$AUTOCONF_DIR/../.."
7109 SRC_ROOT="`$THEPWDCMD -L`"
7110 
7111 if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
7112   PATH_SEP=";"
7113 
7114   SRC_ROOT_LENGTH=`$THEPWDCMD -L|$WC -m`
7115   if test $SRC_ROOT_LENGTH -gt 100; then
7116       as_fn_error $? "Your base path is too long. It is $SRC_ROOT_LENGTH characters long, but only 100 is supported" "$LINENO" 5
7117   fi
7118 
7119   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7120     { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin release" >&5
7121 $as_echo_n "checking cygwin release... " >&6; }
7122     CYGWIN_VERSION=`$UNAME -r`
7123     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_VERSION" >&5
7124 $as_echo "$CYGWIN_VERSION" >&6; }
7125     WINDOWS_ENV_VENDOR='cygwin'
7126     WINDOWS_ENV_VERSION="$CYGWIN_VERSION"
7127 
7128     CYGWIN_VERSION_OK=`$ECHO $CYGWIN_VERSION | $GREP ^1.7.`
7129     if test "x$CYGWIN_VERSION_OK" = x; then
7130       { $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
7131 $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;}
7132       as_fn_error $? "Cannot continue" "$LINENO" 5
7133     fi
7134     if test "x$CYGPATH" = x; then
7135         as_fn_error $? "Something is wrong with your cygwin installation since I cannot find cygpath.exe in your path" "$LINENO" 5
7136     fi
7137     { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin root directory as unix-style path" >&5
7138 $as_echo_n "checking cygwin root directory as unix-style path... " >&6; }
7139     # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
7140     cygwin_winpath_root=`cd / ; cmd /c cd | grep ".*"`
7141     # Force cygpath to report the proper root by including a trailing space, and then stripping it off again.
7142     CYGWIN_ROOT_PATH=`$CYGPATH -u "$cygwin_winpath_root " | $CUT -f 1 -d " "`
7143     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_ROOT_PATH" >&5
7144 $as_echo "$CYGWIN_ROOT_PATH" >&6; }
7145     WINDOWS_ENV_ROOT_PATH="$CYGWIN_ROOT_PATH"
7146     test_cygdrive_prefix=`$ECHO $CYGWIN_ROOT_PATH | $GREP ^/cygdrive/`
7147     if test "x$test_cygdrive_prefix" = x; then
7148         as_fn_error $? "Your cygdrive prefix is not /cygdrive. This is currently not supported. Change with mount -c." "$LINENO" 5
7149     fi
7150   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7151     { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys release" >&5
7152 $as_echo_n "checking msys release... " >&6; }
7153     MSYS_VERSION=`$UNAME -r`
7154     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_VERSION" >&5
7155 $as_echo "$MSYS_VERSION" >&6; }
7156 
7157     WINDOWS_ENV_VENDOR='msys'
7158     WINDOWS_ENV_VERSION="$MSYS_VERSION"
7159 
7160     { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys root directory as unix-style path" >&5
7161 $as_echo_n "checking msys root directory as unix-style path... " >&6; }
7162     # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
7163     MSYS_ROOT_PATH=`cd / ; cmd /c cd | grep ".*"`
7164 
7165   windows_path="$MSYS_ROOT_PATH"
7166   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7167     unix_path=`$CYGPATH -u "$windows_path"`
7168     MSYS_ROOT_PATH="$unix_path"
7169   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7170     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
7171     MSYS_ROOT_PATH="$unix_path"
7172   fi
7173 
7174     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_ROOT_PATH" >&5
7175 $as_echo "$MSYS_ROOT_PATH" >&6; }
7176     WINDOWS_ENV_ROOT_PATH="$MSYS_ROOT_PATH"
7177   else
7178     as_fn_error $? "Unknown Windows environment. Neither cygwin nor msys was detected." "$LINENO" 5
7179   fi
7180 
7181   # Test if windows or unix (cygwin/msys) find is first in path.
7182   { $as_echo "$as_me:${as_lineno-$LINENO}: checking what kind of 'find' is first on the PATH" >&5
7183 $as_echo_n "checking what kind of 'find' is first on the PATH... " >&6; }
7184   FIND_BINARY_OUTPUT=`find --version 2>&1`
7185   if test "x`echo $FIND_BINARY_OUTPUT | $GREP GNU`" != x; then
7186     { $as_echo "$as_me:${as_lineno-$LINENO}: result: unix style" >&5
7187 $as_echo "unix style" >&6; }
7188   elif test "x`echo $FIND_BINARY_OUTPUT | $GREP FIND`" != x; then
7189     { $as_echo "$as_me:${as_lineno-$LINENO}: result: Windows" >&5
7190 $as_echo "Windows" >&6; }
7191     { $as_echo "$as_me:${as_lineno-$LINENO}: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&5
7192 $as_echo "$as_me: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&6;}
7193     { $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
7194 $as_echo "$as_me: This will not work. Please correct and make sure /usr/bin (or similar) is first in path." >&6;}
7195     as_fn_error $? "Cannot continue" "$LINENO" 5
7196   else
7197     { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
7198 $as_echo "unknown" >&6; }
7199     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: It seems that your find utility is non-standard." >&5
7200 $as_echo "$as_me: WARNING: It seems that your find utility is non-standard." >&2;}
7201   fi
7202 
7203 else
7204   PATH_SEP=":"
7205 fi
7206 
7207 
7208 
7209 cd "$CURDIR"
7210 
7211 
7212   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7213 
7214   # Input might be given as Windows format, start by converting to
7215   # unix format.
7216   path="$SRC_ROOT"
7217   new_path=`$CYGPATH -u "$path"`
7218 
7219   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
7220   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
7221   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
7222   # "foo.exe" is OK but "foo" is an error.
7223   #
7224   # This test is therefore slightly more accurate than "test -f" to check for file precense.
7225   # It is also a way to make sure we got the proper file name for the real test later on.
7226   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
7227   if test "x$test_shortpath" = x; then
7228     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&5
7229 $as_echo "$as_me: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&6;}
7230     as_fn_error $? "Cannot locate the the path of SRC_ROOT" "$LINENO" 5
7231   fi
7232 
7233   # Call helper function which possibly converts this using DOS-style short mode.
7234   # If so, the updated path is stored in $new_path.
7235 
7236   input_path="$new_path"
7237   # Check if we need to convert this using DOS-style short mode. If the path
7238   # contains just simple characters, use it. Otherwise (spaces, weird characters),
7239   # take no chances and rewrite it.
7240   # Note: m4 eats our [], so we need to use [ and ] instead.
7241   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
7242   if test "x$has_forbidden_chars" != x; then
7243     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7244     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
7245     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
7246     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
7247       # Going to short mode and back again did indeed matter. Since short mode is
7248       # case insensitive, let's make it lowercase to improve readability.
7249       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7250       # Now convert it back to Unix-stile (cygpath)
7251       input_path=`$CYGPATH -u "$shortmode_path"`
7252       new_path="$input_path"
7253     fi
7254   fi
7255 
7256   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
7257   if test "x$test_cygdrive_prefix" = x; then
7258     # As a simple fix, exclude /usr/bin since it's not a real path.
7259     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
7260       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
7261       # a path prefixed by /cygdrive for fixpath to work.
7262       new_path="$CYGWIN_ROOT_PATH$input_path"
7263     fi
7264   fi
7265 
7266 
7267   if test "x$path" != "x$new_path"; then
7268     SRC_ROOT="$new_path"
7269     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting SRC_ROOT to \"$new_path\"" >&5
7270 $as_echo "$as_me: Rewriting SRC_ROOT to \"$new_path\"" >&6;}
7271   fi
7272 
7273   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7274 
7275   path="$SRC_ROOT"
7276   has_colon=`$ECHO $path | $GREP ^.:`
7277   new_path="$path"
7278   if test "x$has_colon" = x; then
7279     # Not in mixed or Windows style, start by that.
7280     new_path=`cmd //c echo $path`
7281   fi
7282 
7283 
7284   input_path="$new_path"
7285   # Check if we need to convert this using DOS-style short mode. If the path
7286   # contains just simple characters, use it. Otherwise (spaces, weird characters),
7287   # take no chances and rewrite it.
7288   # Note: m4 eats our [], so we need to use [ and ] instead.
7289   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
7290   if test "x$has_forbidden_chars" != x; then
7291     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7292     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7293   fi
7294 
7295 
7296   windows_path="$new_path"
7297   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7298     unix_path=`$CYGPATH -u "$windows_path"`
7299     new_path="$unix_path"
7300   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7301     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
7302     new_path="$unix_path"
7303   fi
7304 
7305   if test "x$path" != "x$new_path"; then
7306     SRC_ROOT="$new_path"
7307     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting SRC_ROOT to \"$new_path\"" >&5
7308 $as_echo "$as_me: Rewriting SRC_ROOT to \"$new_path\"" >&6;}
7309   fi
7310 
7311   # Save the first 10 bytes of this path to the storage, so fixpath can work.
7312   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
7313 
7314   else
7315     # We're on a posix platform. Hooray! :)
7316     path="$SRC_ROOT"
7317     has_space=`$ECHO "$path" | $GREP " "`
7318     if test "x$has_space" != x; then
7319       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&5
7320 $as_echo "$as_me: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&6;}
7321       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
7322     fi
7323 
7324     # Use eval to expand a potential ~
7325     eval path="$path"
7326     if test ! -f "$path" && test ! -d "$path"; then
7327       as_fn_error $? "The path of SRC_ROOT, which resolves as \"$path\", is not found." "$LINENO" 5
7328     fi
7329 
7330     SRC_ROOT="`cd "$path"; $THEPWDCMD -L`"
7331   fi
7332 
7333 
7334   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7335 
7336   # Input might be given as Windows format, start by converting to
7337   # unix format.
7338   path="$CURDIR"
7339   new_path=`$CYGPATH -u "$path"`
7340 
7341   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
7342   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
7343   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
7344   # "foo.exe" is OK but "foo" is an error.
7345   #
7346   # This test is therefore slightly more accurate than "test -f" to check for file precense.
7347   # It is also a way to make sure we got the proper file name for the real test later on.
7348   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
7349   if test "x$test_shortpath" = x; then
7350     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
7351 $as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
7352     as_fn_error $? "Cannot locate the the path of CURDIR" "$LINENO" 5
7353   fi
7354 
7355   # Call helper function which possibly converts this using DOS-style short mode.
7356   # If so, the updated path is stored in $new_path.
7357 
7358   input_path="$new_path"
7359   # Check if we need to convert this using DOS-style short mode. If the path
7360   # contains just simple characters, use it. Otherwise (spaces, weird characters),
7361   # take no chances and rewrite it.
7362   # Note: m4 eats our [], so we need to use [ and ] instead.
7363   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
7364   if test "x$has_forbidden_chars" != x; then
7365     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7366     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
7367     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
7368     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
7369       # Going to short mode and back again did indeed matter. Since short mode is
7370       # case insensitive, let's make it lowercase to improve readability.
7371       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7372       # Now convert it back to Unix-stile (cygpath)
7373       input_path=`$CYGPATH -u "$shortmode_path"`
7374       new_path="$input_path"
7375     fi
7376   fi
7377 
7378   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
7379   if test "x$test_cygdrive_prefix" = x; then
7380     # As a simple fix, exclude /usr/bin since it's not a real path.
7381     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
7382       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
7383       # a path prefixed by /cygdrive for fixpath to work.
7384       new_path="$CYGWIN_ROOT_PATH$input_path"
7385     fi
7386   fi
7387 
7388 
7389   if test "x$path" != "x$new_path"; then
7390     CURDIR="$new_path"
7391     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
7392 $as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
7393   fi
7394 
7395   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7396 
7397   path="$CURDIR"
7398   has_colon=`$ECHO $path | $GREP ^.:`
7399   new_path="$path"
7400   if test "x$has_colon" = x; then
7401     # Not in mixed or Windows style, start by that.
7402     new_path=`cmd //c echo $path`
7403   fi
7404 
7405 
7406   input_path="$new_path"
7407   # Check if we need to convert this using DOS-style short mode. If the path
7408   # contains just simple characters, use it. Otherwise (spaces, weird characters),
7409   # take no chances and rewrite it.
7410   # Note: m4 eats our [], so we need to use [ and ] instead.
7411   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
7412   if test "x$has_forbidden_chars" != x; then
7413     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7414     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7415   fi
7416 
7417 
7418   windows_path="$new_path"
7419   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7420     unix_path=`$CYGPATH -u "$windows_path"`
7421     new_path="$unix_path"
7422   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7423     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
7424     new_path="$unix_path"
7425   fi
7426 
7427   if test "x$path" != "x$new_path"; then
7428     CURDIR="$new_path"
7429     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
7430 $as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
7431   fi
7432 
7433   # Save the first 10 bytes of this path to the storage, so fixpath can work.
7434   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
7435 
7436   else
7437     # We're on a posix platform. Hooray! :)
7438     path="$CURDIR"
7439     has_space=`$ECHO "$path" | $GREP " "`
7440     if test "x$has_space" != x; then
7441       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
7442 $as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
7443       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
7444     fi
7445 
7446     # Use eval to expand a potential ~
7447     eval path="$path"
7448     if test ! -f "$path" && test ! -d "$path"; then
7449       as_fn_error $? "The path of CURDIR, which resolves as \"$path\", is not found." "$LINENO" 5
7450     fi
7451 
7452     CURDIR="`cd "$path"; $THEPWDCMD -L`"
7453   fi
7454 
7455 
7456 if test "x$OPENJDK_BUILD_OS" = "xsolaris"; then
7457     # Add extra search paths on solaris for utilities like ar and as etc...
7458     PATH="$PATH:/usr/ccs/bin:/usr/sfw/bin:/opt/csw/bin"
7459 fi
7460 
7461 # You can force the sys-root if the sys-root encoded into the cross compiler tools
7462 # is not correct.
7463 
7464 # Check whether --with-sys-root was given.
7465 if test "${with_sys_root+set}" = set; then :
7466   withval=$with_sys_root;
7467 fi
7468 
7469 
7470 if test "x$with_sys_root" != x; then
7471   SYS_ROOT=$with_sys_root
7472 else
7473   SYS_ROOT=/
7474 fi
7475 
7476 
7477 
7478 # Check whether --with-tools-dir was given.
7479 if test "${with_tools_dir+set}" = set; then :
7480   withval=$with_tools_dir; TOOLS_DIR=$with_tools_dir
7481 fi
7482 
7483 
7484 
7485 # Check whether --with-devkit was given.
7486 if test "${with_devkit+set}" = set; then :
7487   withval=$with_devkit;
7488     if test "x$with_sys_root" != x; then
7489       as_fn_error $? "Cannot specify both --with-devkit and --with-sys-root at the same time" "$LINENO" 5
7490     fi
7491     if test "x$with_tools_dir" != x; then
7492       as_fn_error $? "Cannot specify both --with-devkit and --with-tools-dir at the same time" "$LINENO" 5
7493     fi
7494     TOOLS_DIR=$with_devkit/bin
7495     if test -d "$with_devkit/$host_alias/libc"; then
7496       SYS_ROOT=$with_devkit/$host_alias/libc
7497     elif test -d "$with_devkit/$host/sys-root"; then
7498       SYS_ROOT=$with_devkit/$host/sys-root
7499     fi
7500 
7501 fi
7502 
7503 
7504 
7505 
7506 # Setup default logging of stdout and stderr to build.log in the output root.
7507 BUILD_LOG='$(OUTPUT_ROOT)/build.log'
7508 BUILD_LOG_PREVIOUS='$(OUTPUT_ROOT)/build.log.old'
7509 BUILD_LOG_WRAPPER='$(BASH) $(SRC_ROOT)/common/bin/logger.sh $(BUILD_LOG)'
7510 
7511 
7512 
7513 
7514 
7515 # Check if it's a pure open build or if custom sources are to be used.
7516 
7517   # Check whether --enable-openjdk-only was given.
7518 if test "${enable_openjdk_only+set}" = set; then :
7519   enableval=$enable_openjdk_only;
7520 else
7521   enable_openjdk_only="no"
7522 fi
7523 
7524 
7525   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for presence of closed sources" >&5
7526 $as_echo_n "checking for presence of closed sources... " >&6; }
7527   if test -d "$SRC_ROOT/jdk/src/closed"; then
7528     CLOSED_SOURCE_PRESENT=yes
7529   else
7530     CLOSED_SOURCE_PRESENT=no
7531   fi
7532   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CLOSED_SOURCE_PRESENT" >&5
7533 $as_echo "$CLOSED_SOURCE_PRESENT" >&6; }
7534 
7535   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if closed source is suppressed (openjdk-only)" >&5
7536 $as_echo_n "checking if closed source is suppressed (openjdk-only)... " >&6; }
7537   SUPPRESS_CLOSED_SOURCE="$enable_openjdk_only"
7538   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SUPPRESS_CLOSED_SOURCE" >&5
7539 $as_echo "$SUPPRESS_CLOSED_SOURCE" >&6; }
7540 
7541   if test "x$CLOSED_SOURCE_PRESENT" = xno; then
7542     OPENJDK=true
7543     if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then
7544       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&5
7545 $as_echo "$as_me: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&2;}
7546     fi
7547   else
7548     if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then
7549       OPENJDK=true
7550     else
7551       OPENJDK=false
7552     fi
7553   fi
7554 
7555   if test "x$OPENJDK" = "xtrue"; then
7556     SET_OPENJDK="OPENJDK=true"
7557   fi
7558 
7559 
7560 
7561 
7562 # These are needed to be able to create a configuration name (and thus the output directory)
7563 
7564 ###############################################################################
7565 #
7566 # Check which variant of the JDK that we want to build.
7567 # Currently we have:
7568 #    normal:   standard edition
7569 # but the custom make system may add other variants
7570 #
7571 # Effectively the JDK variant gives a name to a specific set of
7572 # modules to compile into the JDK. In the future, these modules
7573 # might even be Jigsaw modules.
7574 #
7575 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variant of the JDK to build" >&5
7576 $as_echo_n "checking which variant of the JDK to build... " >&6; }
7577 
7578 # Check whether --with-jdk-variant was given.
7579 if test "${with_jdk_variant+set}" = set; then :
7580   withval=$with_jdk_variant;
7581 fi
7582 
7583 
7584 if test "x$with_jdk_variant" = xnormal || test "x$with_jdk_variant" = x; then
7585     JDK_VARIANT="normal"
7586 else
7587     as_fn_error $? "The available JDK variants are: normal" "$LINENO" 5
7588 fi
7589 
7590 
7591 
7592 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JDK_VARIANT" >&5
7593 $as_echo "$JDK_VARIANT" >&6; }
7594 
7595 
7596 
7597 ###############################################################################
7598 #
7599 # Check which variants of the JVM that we want to build.
7600 # Currently we have:
7601 #    server: normal interpreter and a tiered C1/C2 compiler
7602 #    client: normal interpreter and C1 (no C2 compiler) (only 32-bit platforms)
7603 #    minimal1: reduced form of client with optional VM services and features stripped out
7604 #    kernel: kernel footprint JVM that passes the TCK without major performance problems,
7605 #             ie normal interpreter and C1, only the serial GC, kernel jvmti etc
7606 #    zero: no machine code interpreter, no compiler
7607 #    zeroshark: zero interpreter and shark/llvm compiler backend
7608 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variants of the JVM to build" >&5
7609 $as_echo_n "checking which variants of the JVM to build... " >&6; }
7610 
7611 # Check whether --with-jvm-variants was given.
7612 if test "${with_jvm_variants+set}" = set; then :
7613   withval=$with_jvm_variants;
7614 fi
7615 
7616 
7617 if test "x$with_jvm_variants" = x; then
7618      with_jvm_variants="server"
7619 fi
7620 
7621 JVM_VARIANTS=",$with_jvm_variants,"
7622 TEST_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/server,//' -e 's/client,//'  -e 's/minimal1,//' -e 's/kernel,//' -e 's/zero,//' -e 's/zeroshark,//'`
7623 
7624 if test "x$TEST_VARIANTS" != "x,"; then
7625    as_fn_error $? "The available JVM variants are: server, client, minimal1, kernel, zero, zeroshark" "$LINENO" 5
7626 fi
7627 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_jvm_variants" >&5
7628 $as_echo "$with_jvm_variants" >&6; }
7629 
7630 JVM_VARIANT_SERVER=`$ECHO "$JVM_VARIANTS" | $SED -e '/,server,/!s/.*/false/g' -e '/,server,/s/.*/true/g'`
7631 JVM_VARIANT_CLIENT=`$ECHO "$JVM_VARIANTS" | $SED -e '/,client,/!s/.*/false/g' -e '/,client,/s/.*/true/g'`
7632 JVM_VARIANT_MINIMAL1=`$ECHO "$JVM_VARIANTS" | $SED -e '/,minimal1,/!s/.*/false/g' -e '/,minimal1,/s/.*/true/g'`
7633 JVM_VARIANT_KERNEL=`$ECHO "$JVM_VARIANTS" | $SED -e '/,kernel,/!s/.*/false/g' -e '/,kernel,/s/.*/true/g'`
7634 JVM_VARIANT_ZERO=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zero,/!s/.*/false/g' -e '/,zero,/s/.*/true/g'`
7635 JVM_VARIANT_ZEROSHARK=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zeroshark,/!s/.*/false/g' -e '/,zeroshark,/s/.*/true/g'`
7636 
7637 if test "x$JVM_VARIANT_CLIENT" = xtrue; then
7638     if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
7639         as_fn_error $? "You cannot build a client JVM for a 64-bit machine." "$LINENO" 5
7640     fi
7641 fi
7642 if test "x$JVM_VARIANT_KERNEL" = xtrue; then
7643     if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
7644         as_fn_error $? "You cannot build a kernel JVM for a 64-bit machine." "$LINENO" 5
7645     fi
7646 fi
7647 if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
7648     if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
7649         as_fn_error $? "You cannot build a minimal JVM for a 64-bit machine." "$LINENO" 5
7650     fi
7651 fi
7652 
7653 # Replace the commas with AND for use in the build directory name.
7654 ANDED_JVM_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/^,//' -e 's/,$//' -e 's/,/AND/'`
7655 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/'`
7656 if test "x$COUNT_VARIANTS" != "x,1"; then
7657     BUILDING_MULTIPLE_JVM_VARIANTS=yes
7658 else
7659     BUILDING_MULTIPLE_JVM_VARIANTS=no
7660 fi
7661 
7662 
7663 
7664 
7665 
7666 
7667 
7668 
7669 
7670 INCLUDE_SA=true
7671 if test "x$JVM_VARIANT_ZERO" = xtrue ; then
7672     INCLUDE_SA=false
7673 fi
7674 if test "x$JVM_VARIANT_ZEROSHARK" = xtrue ; then
7675     INCLUDE_SA=false
7676 fi
7677 
7678 
7679 if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
7680    MACOSX_UNIVERSAL="true"
7681 fi
7682 
7683 
7684 
7685 
7686 
7687 ###############################################################################
7688 #
7689 # Set the debug level
7690 #    release: no debug information, all optimizations, no asserts.
7691 #    fastdebug: debug information (-g), all optimizations, all asserts
7692 #    slowdebug: debug information (-g), no optimizations, all asserts
7693 #
7694 DEBUG_LEVEL="release"
7695 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which debug level to use" >&5
7696 $as_echo_n "checking which debug level to use... " >&6; }
7697 # Check whether --enable-debug was given.
7698 if test "${enable_debug+set}" = set; then :
7699   enableval=$enable_debug;
7700         ENABLE_DEBUG="${enableval}"
7701         DEBUG_LEVEL="fastdebug"
7702 
7703 else
7704   ENABLE_DEBUG="no"
7705 fi
7706 
7707 
7708 
7709 # Check whether --with-debug-level was given.
7710 if test "${with_debug_level+set}" = set; then :
7711   withval=$with_debug_level;
7712         DEBUG_LEVEL="${withval}"
7713         if test "x$ENABLE_DEBUG" = xyes; then
7714                         as_fn_error $? "You cannot use both --enable-debug and --with-debug-level at the same time." "$LINENO" 5
7715         fi
7716 
7717 fi
7718 
7719 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEBUG_LEVEL" >&5
7720 $as_echo "$DEBUG_LEVEL" >&6; }
7721 
7722 if test "x$DEBUG_LEVEL" != xrelease && \
7723    test "x$DEBUG_LEVEL" != xfastdebug && \
7724    test "x$DEBUG_LEVEL" != xslowdebug; then
7725    as_fn_error $? "Allowed debug levels are: release, fastdebug and slowdebug" "$LINENO" 5
7726 fi
7727 
7728 
7729 ###############################################################################
7730 #
7731 # Setup legacy vars/targets and new vars to deal with different debug levels.
7732 #
7733 
7734 case $DEBUG_LEVEL in
7735       release )
7736           VARIANT="OPT"
7737           FASTDEBUG="false"
7738           DEBUG_CLASSFILES="false"
7739           BUILD_VARIANT_RELEASE=""
7740           HOTSPOT_DEBUG_LEVEL="product"
7741           HOTSPOT_EXPORT="product"
7742            ;;
7743       fastdebug )
7744           VARIANT="DBG"
7745           FASTDEBUG="true"
7746           DEBUG_CLASSFILES="true"
7747           BUILD_VARIANT_RELEASE="-fastdebug"
7748           HOTSPOT_DEBUG_LEVEL="fastdebug"
7749           HOTSPOT_EXPORT="fastdebug"
7750            ;;
7751       slowdebug )
7752           VARIANT="DBG"
7753           FASTDEBUG="false"
7754           DEBUG_CLASSFILES="true"
7755           BUILD_VARIANT_RELEASE="-debug"
7756           HOTSPOT_DEBUG_LEVEL="jvmg"
7757           HOTSPOT_EXPORT="debug"
7758            ;;
7759 esac
7760 
7761 #####
7762 # Generate the legacy makefile targets for hotspot.
7763 # The hotspot api for selecting the build artifacts, really, needs to be improved.
7764 # JDK-7195896 will fix this on the hotspot side by using the JVM_VARIANT_* variables to
7765 # determine what needs to be built. All we will need to set here is all_product, all_fastdebug etc
7766 # But until then ...
7767 HOTSPOT_TARGET=""
7768 
7769 if test "x$JVM_VARIANT_SERVER" = xtrue; then
7770     HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL} "
7771 fi
7772 
7773 if test "x$JVM_VARIANT_CLIENT" = xtrue; then
7774     HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}1 "
7775 fi
7776 
7777 if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
7778     HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}minimal1 "
7779 fi
7780 
7781 if test "x$JVM_VARIANT_KERNEL" = xtrue; then
7782     HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}kernel "
7783 fi
7784 
7785 if test "x$JVM_VARIANT_ZERO" = xtrue; then
7786     HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}zero "
7787 fi
7788 
7789 if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
7790     HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}shark "
7791 fi
7792 
7793 HOTSPOT_TARGET="$HOTSPOT_TARGET docs export_$HOTSPOT_EXPORT"
7794 
7795 # On Macosx universal binaries are produced, but they only contain
7796 # 64 bit intel. This invalidates control of which jvms are built
7797 # from configure, but only server is valid anyway. Fix this
7798 # when hotspot makefiles are rewritten.
7799 if test "x$MACOSX_UNIVERSAL" = xtrue; then
7800     HOTSPOT_TARGET=universal_${HOTSPOT_EXPORT}
7801 fi
7802 
7803 #####
7804 
7805 
7806 
7807 
7808 
7809 
7810 
7811 
7812 # With basic setup done, call the custom early hook.
7813 
7814 
7815 # To properly create a configuration name, we need to have the OpenJDK target
7816 # and options (variants and debug level) parsed.
7817 
7818 
7819 
7820 # Check whether --with-conf-name was given.
7821 if test "${with_conf_name+set}" = set; then :
7822   withval=$with_conf_name;  CONF_NAME=${with_conf_name}
7823 fi
7824 
7825 
7826 # Test from where we are running configure, in or outside of src root.
7827 if test "x$CURDIR" = "x$SRC_ROOT" || test "x$CURDIR" = "x$SRC_ROOT/common" \
7828         || test "x$CURDIR" = "x$SRC_ROOT/common/autoconf" \
7829         || test "x$CURDIR" = "x$SRC_ROOT/common/makefiles" ; then
7830     # We are running configure from the src root.
7831     # Create a default ./build/target-variant-debuglevel output root.
7832     if test "x${CONF_NAME}" = x; then
7833         CONF_NAME="${OPENJDK_TARGET_OS}-${OPENJDK_TARGET_CPU}-${JDK_VARIANT}-${ANDED_JVM_VARIANTS}-${DEBUG_LEVEL}"
7834     fi
7835     OUTPUT_ROOT="$SRC_ROOT/build/${CONF_NAME}"
7836     $MKDIR -p "$OUTPUT_ROOT"
7837     if test ! -d "$OUTPUT_ROOT"; then
7838         as_fn_error $? "Could not create build directory $OUTPUT_ROOT" "$LINENO" 5
7839     fi
7840 else
7841     # We are running configure from outside of the src dir.
7842     # Then use the current directory as output dir!
7843     # If configuration is situated in normal build directory, just use the build
7844     # directory name as configuration name, otherwise use the complete path.
7845     if test "x${CONF_NAME}" = x; then
7846         CONF_NAME=`$ECHO $CURDIR | $SED -e "s!^${SRC_ROOT}/build/!!"`
7847     fi
7848     OUTPUT_ROOT="$CURDIR"
7849 
7850     # WARNING: This might be a bad thing to do. You need to be sure you want to
7851     # have a configuration in this directory. Do some sanity checks!
7852 
7853     if test ! -e "$OUTPUT_ROOT/spec.gmk"; then
7854       # If we have a spec.gmk, we have run here before and we are OK. Otherwise, check for
7855       # other files
7856       files_present=`$LS $OUTPUT_ROOT`
7857       # Configure has already touched config.log and confdefs.h in the current dir when this check
7858       # is performed.
7859       filtered_files=`$ECHO "$files_present" | $SED -e 's/config.log//g' -e 's/confdefs.h//g' -e 's/ //g' \
7860                                              | $TR -d '\n'`
7861       if test "x$filtered_files" != x; then
7862         { $as_echo "$as_me:${as_lineno-$LINENO}: Current directory is $CURDIR." >&5
7863 $as_echo "$as_me: Current directory is $CURDIR." >&6;}
7864         { $as_echo "$as_me:${as_lineno-$LINENO}: Since this is not the source root, configure will output the configuration here" >&5
7865 $as_echo "$as_me: Since this is not the source root, configure will output the configuration here" >&6;}
7866         { $as_echo "$as_me:${as_lineno-$LINENO}: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&5
7867 $as_echo "$as_me: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&6;}
7868         { $as_echo "$as_me:${as_lineno-$LINENO}: However, this directory is not empty. This is not allowed, since it could" >&5
7869 $as_echo "$as_me: However, this directory is not empty. This is not allowed, since it could" >&6;}
7870         { $as_echo "$as_me:${as_lineno-$LINENO}: seriously mess up just about everything." >&5
7871 $as_echo "$as_me: seriously mess up just about everything." >&6;}
7872         { $as_echo "$as_me:${as_lineno-$LINENO}: Try 'cd $SRC_ROOT' and restart configure" >&5
7873 $as_echo "$as_me: Try 'cd $SRC_ROOT' and restart configure" >&6;}
7874         { $as_echo "$as_me:${as_lineno-$LINENO}: (or create a new empty directory and cd to it)." >&5
7875 $as_echo "$as_me: (or create a new empty directory and cd to it)." >&6;}
7876         as_fn_error $? "Will not continue creating configuration in $CURDIR" "$LINENO" 5
7877       fi
7878     fi
7879 fi
7880 { $as_echo "$as_me:${as_lineno-$LINENO}: checking what configuration name to use" >&5
7881 $as_echo_n "checking what configuration name to use... " >&6; }
7882 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CONF_NAME" >&5
7883 $as_echo "$CONF_NAME" >&6; }
7884 
7885 
7886   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7887 
7888   # Input might be given as Windows format, start by converting to
7889   # unix format.
7890   path="$OUTPUT_ROOT"
7891   new_path=`$CYGPATH -u "$path"`
7892 
7893   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
7894   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
7895   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
7896   # "foo.exe" is OK but "foo" is an error.
7897   #
7898   # This test is therefore slightly more accurate than "test -f" to check for file precense.
7899   # It is also a way to make sure we got the proper file name for the real test later on.
7900   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
7901   if test "x$test_shortpath" = x; then
7902     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
7903 $as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
7904     as_fn_error $? "Cannot locate the the path of OUTPUT_ROOT" "$LINENO" 5
7905   fi
7906 
7907   # Call helper function which possibly converts this using DOS-style short mode.
7908   # If so, the updated path is stored in $new_path.
7909 
7910   input_path="$new_path"
7911   # Check if we need to convert this using DOS-style short mode. If the path
7912   # contains just simple characters, use it. Otherwise (spaces, weird characters),
7913   # take no chances and rewrite it.
7914   # Note: m4 eats our [], so we need to use [ and ] instead.
7915   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
7916   if test "x$has_forbidden_chars" != x; then
7917     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7918     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
7919     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
7920     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
7921       # Going to short mode and back again did indeed matter. Since short mode is
7922       # case insensitive, let's make it lowercase to improve readability.
7923       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7924       # Now convert it back to Unix-stile (cygpath)
7925       input_path=`$CYGPATH -u "$shortmode_path"`
7926       new_path="$input_path"
7927     fi
7928   fi
7929 
7930   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
7931   if test "x$test_cygdrive_prefix" = x; then
7932     # As a simple fix, exclude /usr/bin since it's not a real path.
7933     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
7934       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
7935       # a path prefixed by /cygdrive for fixpath to work.
7936       new_path="$CYGWIN_ROOT_PATH$input_path"
7937     fi
7938   fi
7939 
7940 
7941   if test "x$path" != "x$new_path"; then
7942     OUTPUT_ROOT="$new_path"
7943     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
7944 $as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
7945   fi
7946 
7947   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7948 
7949   path="$OUTPUT_ROOT"
7950   has_colon=`$ECHO $path | $GREP ^.:`
7951   new_path="$path"
7952   if test "x$has_colon" = x; then
7953     # Not in mixed or Windows style, start by that.
7954     new_path=`cmd //c echo $path`
7955   fi
7956 
7957 
7958   input_path="$new_path"
7959   # Check if we need to convert this using DOS-style short mode. If the path
7960   # contains just simple characters, use it. Otherwise (spaces, weird characters),
7961   # take no chances and rewrite it.
7962   # Note: m4 eats our [], so we need to use [ and ] instead.
7963   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
7964   if test "x$has_forbidden_chars" != x; then
7965     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7966     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7967   fi
7968 
7969 
7970   windows_path="$new_path"
7971   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7972     unix_path=`$CYGPATH -u "$windows_path"`
7973     new_path="$unix_path"
7974   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7975     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
7976     new_path="$unix_path"
7977   fi
7978 
7979   if test "x$path" != "x$new_path"; then
7980     OUTPUT_ROOT="$new_path"
7981     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
7982 $as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
7983   fi
7984 
7985   # Save the first 10 bytes of this path to the storage, so fixpath can work.
7986   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
7987 
7988   else
7989     # We're on a posix platform. Hooray! :)
7990     path="$OUTPUT_ROOT"
7991     has_space=`$ECHO "$path" | $GREP " "`
7992     if test "x$has_space" != x; then
7993       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
7994 $as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
7995       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
7996     fi
7997 
7998     # Use eval to expand a potential ~
7999     eval path="$path"
8000     if test ! -f "$path" && test ! -d "$path"; then
8001       as_fn_error $? "The path of OUTPUT_ROOT, which resolves as \"$path\", is not found." "$LINENO" 5
8002     fi
8003 
8004     OUTPUT_ROOT="`cd "$path"; $THEPWDCMD -L`"
8005   fi
8006 
8007 
8008 SPEC=$OUTPUT_ROOT/spec.gmk
8009 
8010 CONF_NAME=$CONF_NAME
8011 
8012 OUTPUT_ROOT=$OUTPUT_ROOT
8013 
8014 
8015 # Most of the probed defines are put into config.h
8016 ac_config_headers="$ac_config_headers $OUTPUT_ROOT/config.h:$AUTOCONF_DIR/config.h.in"
8017 
8018 # The spec.gmk file contains all variables for the make system.
8019 ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in"
8020 
8021 # The hotspot-spec.gmk file contains legacy variables for the hotspot make system.
8022 ac_config_files="$ac_config_files $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in"
8023 
8024 # The bootcycle-spec.gmk file contains support for boot cycle builds.
8025 ac_config_files="$ac_config_files $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in"
8026 
8027 # The compare.sh is used to compare the build output to other builds.
8028 ac_config_files="$ac_config_files $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in"
8029 
8030 # Spec.sh is currently used by compare-objects.sh
8031 ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.sh:$AUTOCONF_DIR/spec.sh.in"
8032 
8033 # The generated Makefile knows where the spec.gmk is and where the source is.
8034 # You can run make from the OUTPUT_ROOT, or from the top-level Makefile
8035 # which will look for generated configurations
8036 ac_config_files="$ac_config_files $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in"
8037 
8038 
8039 # Save the arguments given to us
8040 echo "$CONFIGURE_COMMAND_LINE" > $OUTPUT_ROOT/configure-arguments
8041 
8042 
8043 # Must be done before we can call HELP_MSG_MISSING_DEPENDENCY.
8044 
8045     for ac_prog in apt-get yum port pkgutil pkgadd
8046 do
8047   # Extract the first word of "$ac_prog", so it can be a program name with args.
8048 set dummy $ac_prog; ac_word=$2
8049 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8050 $as_echo_n "checking for $ac_word... " >&6; }
8051 if ${ac_cv_prog_PKGHANDLER+:} false; then :
8052   $as_echo_n "(cached) " >&6
8053 else
8054   if test -n "$PKGHANDLER"; then
8055   ac_cv_prog_PKGHANDLER="$PKGHANDLER" # Let the user override the test.
8056 else
8057 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8058 for as_dir in $PATH
8059 do
8060   IFS=$as_save_IFS
8061   test -z "$as_dir" && as_dir=.
8062     for ac_exec_ext in '' $ac_executable_extensions; do
8063   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8064     ac_cv_prog_PKGHANDLER="$ac_prog"
8065     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8066     break 2
8067   fi
8068 done
8069   done
8070 IFS=$as_save_IFS
8071 
8072 fi
8073 fi
8074 PKGHANDLER=$ac_cv_prog_PKGHANDLER
8075 if test -n "$PKGHANDLER"; then
8076   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKGHANDLER" >&5
8077 $as_echo "$PKGHANDLER" >&6; }
8078 else
8079   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8080 $as_echo "no" >&6; }
8081 fi
8082 
8083 
8084   test -n "$PKGHANDLER" && break
8085 done
8086 
8087 
8088 
8089 # Setup tools that requires more complex handling, or that is not needed by the configure script.
8090 
8091 
8092   # We need to find a recent version of GNU make. Especially on Solaris, this can be tricky.
8093   if test "x$MAKE" != x; then
8094     # User has supplied a make, test it.
8095     if test ! -f "$MAKE"; then
8096       as_fn_error $? "The specified make (by MAKE=$MAKE) is not found." "$LINENO" 5
8097     fi
8098 
8099   MAKE_CANDIDATE=""$MAKE""
8100   DESCRIPTION="user supplied MAKE=$MAKE"
8101   if test "x$MAKE_CANDIDATE" != x; then
8102     { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
8103 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
8104     MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
8105     IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
8106     if test "x$IS_GNU_MAKE" = x; then
8107       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
8108 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
8109     else
8110       IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'`
8111       if test "x$IS_MODERN_MAKE" = x; then
8112         { $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
8113 $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;}
8114       else
8115         if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
8116           if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8117             MAKE_EXPECTED_ENV='cygwin'
8118           elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8119             MAKE_EXPECTED_ENV='msys'
8120           else
8121             as_fn_error $? "Unknown Windows environment" "$LINENO" 5
8122           fi
8123           MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
8124           IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
8125         else
8126           # Not relevant for non-Windows
8127           IS_MAKE_CORRECT_ENV=true
8128         fi
8129         if test "x$IS_MAKE_CORRECT_ENV" = x; then
8130           { $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
8131 $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;}
8132         else
8133           FOUND_MAKE=$MAKE_CANDIDATE
8134 
8135   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8136 
8137   # First separate the path from the arguments. This will split at the first
8138   # space.
8139   complete="$FOUND_MAKE"
8140   path="${complete%% *}"
8141   tmp="$complete EOL"
8142   arguments="${tmp#* }"
8143 
8144   # Input might be given as Windows format, start by converting to
8145   # unix format.
8146   new_path=`$CYGPATH -u "$path"`
8147 
8148   # Now try to locate executable using which
8149   new_path=`$WHICH "$new_path" 2> /dev/null`
8150   # bat and cmd files are not always considered executable in cygwin causing which
8151   # to not find them
8152   if test "x$new_path" = x \
8153            && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8154            && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8155     new_path=`$CYGPATH -u "$path"`
8156   fi
8157   if test "x$new_path" = x; then
8158     # Oops. Which didn't find the executable.
8159     # The splitting of arguments from the executable at a space might have been incorrect,
8160     # since paths with space are more likely in Windows. Give it another try with the whole
8161     # argument.
8162     path="$complete"
8163     arguments="EOL"
8164     new_path=`$CYGPATH -u "$path"`
8165     new_path=`$WHICH "$new_path" 2> /dev/null`
8166     # bat and cmd files are not always considered executable in cygwin causing which
8167     # to not find them
8168     if test "x$new_path" = x \
8169              && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8170              && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8171       new_path=`$CYGPATH -u "$path"`
8172     fi
8173     if test "x$new_path" = x; then
8174       # It's still not found. Now this is an unrecoverable error.
8175       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8176 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8177       has_space=`$ECHO "$complete" | $GREP " "`
8178       if test "x$has_space" != x; then
8179         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8180 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8181       fi
8182       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8183     fi
8184   fi
8185 
8186   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
8187   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
8188   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
8189   # "foo.exe" is OK but "foo" is an error.
8190   #
8191   # This test is therefore slightly more accurate than "test -f" to check for file precense.
8192   # It is also a way to make sure we got the proper file name for the real test later on.
8193   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
8194   if test "x$test_shortpath" = x; then
8195     # Short path failed, file does not exist as specified.
8196     # Try adding .exe or .cmd
8197     if test -f "${new_path}.exe"; then
8198        input_to_shortpath="${new_path}.exe"
8199     elif test -f "${new_path}.cmd"; then
8200        input_to_shortpath="${new_path}.cmd"
8201     else
8202       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
8203 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
8204       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
8205 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
8206       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8207     fi
8208   else
8209     input_to_shortpath="$new_path"
8210   fi
8211 
8212   # Call helper function which possibly converts this using DOS-style short mode.
8213   # If so, the updated path is stored in $new_path.
8214   new_path="$input_to_shortpath"
8215 
8216   input_path="$input_to_shortpath"
8217   # Check if we need to convert this using DOS-style short mode. If the path
8218   # contains just simple characters, use it. Otherwise (spaces, weird characters),
8219   # take no chances and rewrite it.
8220   # Note: m4 eats our [], so we need to use [ and ] instead.
8221   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
8222   if test "x$has_forbidden_chars" != x; then
8223     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8224     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
8225     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
8226     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
8227       # Going to short mode and back again did indeed matter. Since short mode is
8228       # case insensitive, let's make it lowercase to improve readability.
8229       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8230       # Now convert it back to Unix-stile (cygpath)
8231       input_path=`$CYGPATH -u "$shortmode_path"`
8232       new_path="$input_path"
8233     fi
8234   fi
8235 
8236   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
8237   if test "x$test_cygdrive_prefix" = x; then
8238     # As a simple fix, exclude /usr/bin since it's not a real path.
8239     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
8240       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
8241       # a path prefixed by /cygdrive for fixpath to work.
8242       new_path="$CYGWIN_ROOT_PATH$input_path"
8243     fi
8244   fi
8245 
8246   # remove trailing .exe if any
8247   new_path="${new_path/%.exe/}"
8248 
8249   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8250 
8251   # First separate the path from the arguments. This will split at the first
8252   # space.
8253   complete="$FOUND_MAKE"
8254   path="${complete%% *}"
8255   tmp="$complete EOL"
8256   arguments="${tmp#* }"
8257 
8258   # Input might be given as Windows format, start by converting to
8259   # unix format.
8260   new_path="$path"
8261 
8262   windows_path="$new_path"
8263   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8264     unix_path=`$CYGPATH -u "$windows_path"`
8265     new_path="$unix_path"
8266   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8267     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8268     new_path="$unix_path"
8269   fi
8270 
8271 
8272   # Now try to locate executable using which
8273   new_path=`$WHICH "$new_path" 2> /dev/null`
8274 
8275   if test "x$new_path" = x; then
8276     # Oops. Which didn't find the executable.
8277     # The splitting of arguments from the executable at a space might have been incorrect,
8278     # since paths with space are more likely in Windows. Give it another try with the whole
8279     # argument.
8280     path="$complete"
8281     arguments="EOL"
8282     new_path="$path"
8283 
8284   windows_path="$new_path"
8285   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8286     unix_path=`$CYGPATH -u "$windows_path"`
8287     new_path="$unix_path"
8288   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8289     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8290     new_path="$unix_path"
8291   fi
8292 
8293 
8294     new_path=`$WHICH "$new_path" 2> /dev/null`
8295 
8296     if test "x$new_path" = x; then
8297       # It's still not found. Now this is an unrecoverable error.
8298       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8299 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8300       has_space=`$ECHO "$complete" | $GREP " "`
8301       if test "x$has_space" != x; then
8302         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8303 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8304       fi
8305       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8306     fi
8307   fi
8308 
8309   # Now new_path has a complete unix path to the binary
8310   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
8311     # Keep paths in /bin as-is, but remove trailing .exe if any
8312     new_path="${new_path/%.exe/}"
8313     # Do not save /bin paths to all_fixpath_prefixes!
8314   else
8315     # Not in mixed or Windows style, start by that.
8316     new_path=`cmd //c echo $new_path`
8317 
8318   input_path="$new_path"
8319   # Check if we need to convert this using DOS-style short mode. If the path
8320   # contains just simple characters, use it. Otherwise (spaces, weird characters),
8321   # take no chances and rewrite it.
8322   # Note: m4 eats our [], so we need to use [ and ] instead.
8323   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
8324   if test "x$has_forbidden_chars" != x; then
8325     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8326     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8327   fi
8328 
8329     # Output is in $new_path
8330 
8331   windows_path="$new_path"
8332   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8333     unix_path=`$CYGPATH -u "$windows_path"`
8334     new_path="$unix_path"
8335   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8336     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8337     new_path="$unix_path"
8338   fi
8339 
8340     # remove trailing .exe if any
8341     new_path="${new_path/%.exe/}"
8342 
8343     # Save the first 10 bytes of this path to the storage, so fixpath can work.
8344     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
8345   fi
8346 
8347   else
8348     # We're on a posix platform. Hooray! :)
8349     # First separate the path from the arguments. This will split at the first
8350     # space.
8351     complete="$FOUND_MAKE"
8352     path="${complete%% *}"
8353     tmp="$complete EOL"
8354     arguments="${tmp#* }"
8355 
8356     # Cannot rely on the command "which" here since it doesn't always work.
8357     is_absolute_path=`$ECHO "$path" | $GREP ^/`
8358     if test -z "$is_absolute_path"; then
8359       # Path to executable is not absolute. Find it.
8360       IFS_save="$IFS"
8361       IFS=:
8362       for p in $PATH; do
8363         if test -f "$p/$path" && test -x "$p/$path"; then
8364           new_path="$p/$path"
8365           break
8366         fi
8367       done
8368       IFS="$IFS_save"
8369     else
8370       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
8371 $as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
8372       new_path="$path"
8373     fi
8374 
8375     if test "x$new_path" = x; then
8376         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8377 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8378         has_space=`$ECHO "$complete" | $GREP " "`
8379         if test "x$has_space" != x; then
8380           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
8381 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
8382         fi
8383         as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8384       fi
8385   fi
8386 
8387       # Now join together the path and the arguments once again
8388       if test "x$arguments" != xEOL; then
8389         new_complete="$new_path ${arguments% *}"
8390       else
8391         new_complete="$new_path"
8392       fi
8393 
8394   if test "x$complete" != "x$new_complete"; then
8395       FOUND_MAKE="$new_complete"
8396       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
8397 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
8398     fi
8399 
8400         fi
8401       fi
8402     fi
8403   fi
8404 
8405     if test "x$FOUND_MAKE" = x; then
8406       as_fn_error $? "The specified make (by MAKE=$MAKE) is not GNU make 3.81 or newer." "$LINENO" 5
8407     fi
8408   else
8409     # Try our hardest to locate a correct version of GNU make
8410     for ac_prog in gmake
8411 do
8412   # Extract the first word of "$ac_prog", so it can be a program name with args.
8413 set dummy $ac_prog; ac_word=$2
8414 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8415 $as_echo_n "checking for $ac_word... " >&6; }
8416 if ${ac_cv_path_CHECK_GMAKE+:} false; then :
8417   $as_echo_n "(cached) " >&6
8418 else
8419   case $CHECK_GMAKE in
8420   [\\/]* | ?:[\\/]*)
8421   ac_cv_path_CHECK_GMAKE="$CHECK_GMAKE" # Let the user override the test with a path.
8422   ;;
8423   *)
8424   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8425 for as_dir in $PATH
8426 do
8427   IFS=$as_save_IFS
8428   test -z "$as_dir" && as_dir=.
8429     for ac_exec_ext in '' $ac_executable_extensions; do
8430   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8431     ac_cv_path_CHECK_GMAKE="$as_dir/$ac_word$ac_exec_ext"
8432     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8433     break 2
8434   fi
8435 done
8436   done
8437 IFS=$as_save_IFS
8438 
8439   ;;
8440 esac
8441 fi
8442 CHECK_GMAKE=$ac_cv_path_CHECK_GMAKE
8443 if test -n "$CHECK_GMAKE"; then
8444   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_GMAKE" >&5
8445 $as_echo "$CHECK_GMAKE" >&6; }
8446 else
8447   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8448 $as_echo "no" >&6; }
8449 fi
8450 
8451 
8452   test -n "$CHECK_GMAKE" && break
8453 done
8454 
8455 
8456   MAKE_CANDIDATE=""$CHECK_GMAKE""
8457   DESCRIPTION="gmake in PATH"
8458   if test "x$MAKE_CANDIDATE" != x; then
8459     { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
8460 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
8461     MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
8462     IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
8463     if test "x$IS_GNU_MAKE" = x; then
8464       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
8465 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
8466     else
8467       IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'`
8468       if test "x$IS_MODERN_MAKE" = x; then
8469         { $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
8470 $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;}
8471       else
8472         if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
8473           if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8474             MAKE_EXPECTED_ENV='cygwin'
8475           elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8476             MAKE_EXPECTED_ENV='msys'
8477           else
8478             as_fn_error $? "Unknown Windows environment" "$LINENO" 5
8479           fi
8480           MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
8481           IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
8482         else
8483           # Not relevant for non-Windows
8484           IS_MAKE_CORRECT_ENV=true
8485         fi
8486         if test "x$IS_MAKE_CORRECT_ENV" = x; then
8487           { $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
8488 $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;}
8489         else
8490           FOUND_MAKE=$MAKE_CANDIDATE
8491 
8492   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8493 
8494   # First separate the path from the arguments. This will split at the first
8495   # space.
8496   complete="$FOUND_MAKE"
8497   path="${complete%% *}"
8498   tmp="$complete EOL"
8499   arguments="${tmp#* }"
8500 
8501   # Input might be given as Windows format, start by converting to
8502   # unix format.
8503   new_path=`$CYGPATH -u "$path"`
8504 
8505   # Now try to locate executable using which
8506   new_path=`$WHICH "$new_path" 2> /dev/null`
8507   # bat and cmd files are not always considered executable in cygwin causing which
8508   # to not find them
8509   if test "x$new_path" = x \
8510            && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8511            && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8512     new_path=`$CYGPATH -u "$path"`
8513   fi
8514   if test "x$new_path" = x; then
8515     # Oops. Which didn't find the executable.
8516     # The splitting of arguments from the executable at a space might have been incorrect,
8517     # since paths with space are more likely in Windows. Give it another try with the whole
8518     # argument.
8519     path="$complete"
8520     arguments="EOL"
8521     new_path=`$CYGPATH -u "$path"`
8522     new_path=`$WHICH "$new_path" 2> /dev/null`
8523     # bat and cmd files are not always considered executable in cygwin causing which
8524     # to not find them
8525     if test "x$new_path" = x \
8526              && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8527              && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8528       new_path=`$CYGPATH -u "$path"`
8529     fi
8530     if test "x$new_path" = x; then
8531       # It's still not found. Now this is an unrecoverable error.
8532       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8533 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8534       has_space=`$ECHO "$complete" | $GREP " "`
8535       if test "x$has_space" != x; then
8536         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8537 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8538       fi
8539       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8540     fi
8541   fi
8542 
8543   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
8544   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
8545   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
8546   # "foo.exe" is OK but "foo" is an error.
8547   #
8548   # This test is therefore slightly more accurate than "test -f" to check for file precense.
8549   # It is also a way to make sure we got the proper file name for the real test later on.
8550   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
8551   if test "x$test_shortpath" = x; then
8552     # Short path failed, file does not exist as specified.
8553     # Try adding .exe or .cmd
8554     if test -f "${new_path}.exe"; then
8555        input_to_shortpath="${new_path}.exe"
8556     elif test -f "${new_path}.cmd"; then
8557        input_to_shortpath="${new_path}.cmd"
8558     else
8559       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
8560 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
8561       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
8562 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
8563       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8564     fi
8565   else
8566     input_to_shortpath="$new_path"
8567   fi
8568 
8569   # Call helper function which possibly converts this using DOS-style short mode.
8570   # If so, the updated path is stored in $new_path.
8571   new_path="$input_to_shortpath"
8572 
8573   input_path="$input_to_shortpath"
8574   # Check if we need to convert this using DOS-style short mode. If the path
8575   # contains just simple characters, use it. Otherwise (spaces, weird characters),
8576   # take no chances and rewrite it.
8577   # Note: m4 eats our [], so we need to use [ and ] instead.
8578   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
8579   if test "x$has_forbidden_chars" != x; then
8580     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8581     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
8582     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
8583     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
8584       # Going to short mode and back again did indeed matter. Since short mode is
8585       # case insensitive, let's make it lowercase to improve readability.
8586       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8587       # Now convert it back to Unix-stile (cygpath)
8588       input_path=`$CYGPATH -u "$shortmode_path"`
8589       new_path="$input_path"
8590     fi
8591   fi
8592 
8593   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
8594   if test "x$test_cygdrive_prefix" = x; then
8595     # As a simple fix, exclude /usr/bin since it's not a real path.
8596     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
8597       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
8598       # a path prefixed by /cygdrive for fixpath to work.
8599       new_path="$CYGWIN_ROOT_PATH$input_path"
8600     fi
8601   fi
8602 
8603   # remove trailing .exe if any
8604   new_path="${new_path/%.exe/}"
8605 
8606   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8607 
8608   # First separate the path from the arguments. This will split at the first
8609   # space.
8610   complete="$FOUND_MAKE"
8611   path="${complete%% *}"
8612   tmp="$complete EOL"
8613   arguments="${tmp#* }"
8614 
8615   # Input might be given as Windows format, start by converting to
8616   # unix format.
8617   new_path="$path"
8618 
8619   windows_path="$new_path"
8620   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8621     unix_path=`$CYGPATH -u "$windows_path"`
8622     new_path="$unix_path"
8623   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8624     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8625     new_path="$unix_path"
8626   fi
8627 
8628 
8629   # Now try to locate executable using which
8630   new_path=`$WHICH "$new_path" 2> /dev/null`
8631 
8632   if test "x$new_path" = x; then
8633     # Oops. Which didn't find the executable.
8634     # The splitting of arguments from the executable at a space might have been incorrect,
8635     # since paths with space are more likely in Windows. Give it another try with the whole
8636     # argument.
8637     path="$complete"
8638     arguments="EOL"
8639     new_path="$path"
8640 
8641   windows_path="$new_path"
8642   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8643     unix_path=`$CYGPATH -u "$windows_path"`
8644     new_path="$unix_path"
8645   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8646     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8647     new_path="$unix_path"
8648   fi
8649 
8650 
8651     new_path=`$WHICH "$new_path" 2> /dev/null`
8652 
8653     if test "x$new_path" = x; then
8654       # It's still not found. Now this is an unrecoverable error.
8655       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8656 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8657       has_space=`$ECHO "$complete" | $GREP " "`
8658       if test "x$has_space" != x; then
8659         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8660 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8661       fi
8662       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8663     fi
8664   fi
8665 
8666   # Now new_path has a complete unix path to the binary
8667   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
8668     # Keep paths in /bin as-is, but remove trailing .exe if any
8669     new_path="${new_path/%.exe/}"
8670     # Do not save /bin paths to all_fixpath_prefixes!
8671   else
8672     # Not in mixed or Windows style, start by that.
8673     new_path=`cmd //c echo $new_path`
8674 
8675   input_path="$new_path"
8676   # Check if we need to convert this using DOS-style short mode. If the path
8677   # contains just simple characters, use it. Otherwise (spaces, weird characters),
8678   # take no chances and rewrite it.
8679   # Note: m4 eats our [], so we need to use [ and ] instead.
8680   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
8681   if test "x$has_forbidden_chars" != x; then
8682     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8683     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8684   fi
8685 
8686     # Output is in $new_path
8687 
8688   windows_path="$new_path"
8689   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8690     unix_path=`$CYGPATH -u "$windows_path"`
8691     new_path="$unix_path"
8692   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8693     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8694     new_path="$unix_path"
8695   fi
8696 
8697     # remove trailing .exe if any
8698     new_path="${new_path/%.exe/}"
8699 
8700     # Save the first 10 bytes of this path to the storage, so fixpath can work.
8701     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
8702   fi
8703 
8704   else
8705     # We're on a posix platform. Hooray! :)
8706     # First separate the path from the arguments. This will split at the first
8707     # space.
8708     complete="$FOUND_MAKE"
8709     path="${complete%% *}"
8710     tmp="$complete EOL"
8711     arguments="${tmp#* }"
8712 
8713     # Cannot rely on the command "which" here since it doesn't always work.
8714     is_absolute_path=`$ECHO "$path" | $GREP ^/`
8715     if test -z "$is_absolute_path"; then
8716       # Path to executable is not absolute. Find it.
8717       IFS_save="$IFS"
8718       IFS=:
8719       for p in $PATH; do
8720         if test -f "$p/$path" && test -x "$p/$path"; then
8721           new_path="$p/$path"
8722           break
8723         fi
8724       done
8725       IFS="$IFS_save"
8726     else
8727       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
8728 $as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
8729       new_path="$path"
8730     fi
8731 
8732     if test "x$new_path" = x; then
8733         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8734 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8735         has_space=`$ECHO "$complete" | $GREP " "`
8736         if test "x$has_space" != x; then
8737           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
8738 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
8739         fi
8740         as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8741       fi
8742   fi
8743 
8744       # Now join together the path and the arguments once again
8745       if test "x$arguments" != xEOL; then
8746         new_complete="$new_path ${arguments% *}"
8747       else
8748         new_complete="$new_path"
8749       fi
8750 
8751   if test "x$complete" != "x$new_complete"; then
8752       FOUND_MAKE="$new_complete"
8753       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
8754 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
8755     fi
8756 
8757         fi
8758       fi
8759     fi
8760   fi
8761 
8762 
8763     if test "x$FOUND_MAKE" = x; then
8764       for ac_prog in make
8765 do
8766   # Extract the first word of "$ac_prog", so it can be a program name with args.
8767 set dummy $ac_prog; ac_word=$2
8768 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8769 $as_echo_n "checking for $ac_word... " >&6; }
8770 if ${ac_cv_path_CHECK_MAKE+:} false; then :
8771   $as_echo_n "(cached) " >&6
8772 else
8773   case $CHECK_MAKE in
8774   [\\/]* | ?:[\\/]*)
8775   ac_cv_path_CHECK_MAKE="$CHECK_MAKE" # Let the user override the test with a path.
8776   ;;
8777   *)
8778   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8779 for as_dir in $PATH
8780 do
8781   IFS=$as_save_IFS
8782   test -z "$as_dir" && as_dir=.
8783     for ac_exec_ext in '' $ac_executable_extensions; do
8784   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8785     ac_cv_path_CHECK_MAKE="$as_dir/$ac_word$ac_exec_ext"
8786     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8787     break 2
8788   fi
8789 done
8790   done
8791 IFS=$as_save_IFS
8792 
8793   ;;
8794 esac
8795 fi
8796 CHECK_MAKE=$ac_cv_path_CHECK_MAKE
8797 if test -n "$CHECK_MAKE"; then
8798   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_MAKE" >&5
8799 $as_echo "$CHECK_MAKE" >&6; }
8800 else
8801   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8802 $as_echo "no" >&6; }
8803 fi
8804 
8805 
8806   test -n "$CHECK_MAKE" && break
8807 done
8808 
8809 
8810   MAKE_CANDIDATE=""$CHECK_MAKE""
8811   DESCRIPTION="make in PATH"
8812   if test "x$MAKE_CANDIDATE" != x; then
8813     { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
8814 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
8815     MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
8816     IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
8817     if test "x$IS_GNU_MAKE" = x; then
8818       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
8819 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
8820     else
8821       IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'`
8822       if test "x$IS_MODERN_MAKE" = x; then
8823         { $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
8824 $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;}
8825       else
8826         if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
8827           if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8828             MAKE_EXPECTED_ENV='cygwin'
8829           elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8830             MAKE_EXPECTED_ENV='msys'
8831           else
8832             as_fn_error $? "Unknown Windows environment" "$LINENO" 5
8833           fi
8834           MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
8835           IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
8836         else
8837           # Not relevant for non-Windows
8838           IS_MAKE_CORRECT_ENV=true
8839         fi
8840         if test "x$IS_MAKE_CORRECT_ENV" = x; then
8841           { $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
8842 $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;}
8843         else
8844           FOUND_MAKE=$MAKE_CANDIDATE
8845 
8846   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8847 
8848   # First separate the path from the arguments. This will split at the first
8849   # space.
8850   complete="$FOUND_MAKE"
8851   path="${complete%% *}"
8852   tmp="$complete EOL"
8853   arguments="${tmp#* }"
8854 
8855   # Input might be given as Windows format, start by converting to
8856   # unix format.
8857   new_path=`$CYGPATH -u "$path"`
8858 
8859   # Now try to locate executable using which
8860   new_path=`$WHICH "$new_path" 2> /dev/null`
8861   # bat and cmd files are not always considered executable in cygwin causing which
8862   # to not find them
8863   if test "x$new_path" = x \
8864            && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8865            && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8866     new_path=`$CYGPATH -u "$path"`
8867   fi
8868   if test "x$new_path" = x; then
8869     # Oops. Which didn't find the executable.
8870     # The splitting of arguments from the executable at a space might have been incorrect,
8871     # since paths with space are more likely in Windows. Give it another try with the whole
8872     # argument.
8873     path="$complete"
8874     arguments="EOL"
8875     new_path=`$CYGPATH -u "$path"`
8876     new_path=`$WHICH "$new_path" 2> /dev/null`
8877     # bat and cmd files are not always considered executable in cygwin causing which
8878     # to not find them
8879     if test "x$new_path" = x \
8880              && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8881              && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8882       new_path=`$CYGPATH -u "$path"`
8883     fi
8884     if test "x$new_path" = x; then
8885       # It's still not found. Now this is an unrecoverable error.
8886       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8887 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8888       has_space=`$ECHO "$complete" | $GREP " "`
8889       if test "x$has_space" != x; then
8890         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8891 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8892       fi
8893       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8894     fi
8895   fi
8896 
8897   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
8898   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
8899   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
8900   # "foo.exe" is OK but "foo" is an error.
8901   #
8902   # This test is therefore slightly more accurate than "test -f" to check for file precense.
8903   # It is also a way to make sure we got the proper file name for the real test later on.
8904   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
8905   if test "x$test_shortpath" = x; then
8906     # Short path failed, file does not exist as specified.
8907     # Try adding .exe or .cmd
8908     if test -f "${new_path}.exe"; then
8909        input_to_shortpath="${new_path}.exe"
8910     elif test -f "${new_path}.cmd"; then
8911        input_to_shortpath="${new_path}.cmd"
8912     else
8913       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
8914 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
8915       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
8916 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
8917       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8918     fi
8919   else
8920     input_to_shortpath="$new_path"
8921   fi
8922 
8923   # Call helper function which possibly converts this using DOS-style short mode.
8924   # If so, the updated path is stored in $new_path.
8925   new_path="$input_to_shortpath"
8926 
8927   input_path="$input_to_shortpath"
8928   # Check if we need to convert this using DOS-style short mode. If the path
8929   # contains just simple characters, use it. Otherwise (spaces, weird characters),
8930   # take no chances and rewrite it.
8931   # Note: m4 eats our [], so we need to use [ and ] instead.
8932   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
8933   if test "x$has_forbidden_chars" != x; then
8934     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8935     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
8936     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
8937     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
8938       # Going to short mode and back again did indeed matter. Since short mode is
8939       # case insensitive, let's make it lowercase to improve readability.
8940       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8941       # Now convert it back to Unix-stile (cygpath)
8942       input_path=`$CYGPATH -u "$shortmode_path"`
8943       new_path="$input_path"
8944     fi
8945   fi
8946 
8947   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
8948   if test "x$test_cygdrive_prefix" = x; then
8949     # As a simple fix, exclude /usr/bin since it's not a real path.
8950     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
8951       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
8952       # a path prefixed by /cygdrive for fixpath to work.
8953       new_path="$CYGWIN_ROOT_PATH$input_path"
8954     fi
8955   fi
8956 
8957   # remove trailing .exe if any
8958   new_path="${new_path/%.exe/}"
8959 
8960   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8961 
8962   # First separate the path from the arguments. This will split at the first
8963   # space.
8964   complete="$FOUND_MAKE"
8965   path="${complete%% *}"
8966   tmp="$complete EOL"
8967   arguments="${tmp#* }"
8968 
8969   # Input might be given as Windows format, start by converting to
8970   # unix format.
8971   new_path="$path"
8972 
8973   windows_path="$new_path"
8974   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8975     unix_path=`$CYGPATH -u "$windows_path"`
8976     new_path="$unix_path"
8977   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8978     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8979     new_path="$unix_path"
8980   fi
8981 
8982 
8983   # Now try to locate executable using which
8984   new_path=`$WHICH "$new_path" 2> /dev/null`
8985 
8986   if test "x$new_path" = x; then
8987     # Oops. Which didn't find the executable.
8988     # The splitting of arguments from the executable at a space might have been incorrect,
8989     # since paths with space are more likely in Windows. Give it another try with the whole
8990     # argument.
8991     path="$complete"
8992     arguments="EOL"
8993     new_path="$path"
8994 
8995   windows_path="$new_path"
8996   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8997     unix_path=`$CYGPATH -u "$windows_path"`
8998     new_path="$unix_path"
8999   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9000     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9001     new_path="$unix_path"
9002   fi
9003 
9004 
9005     new_path=`$WHICH "$new_path" 2> /dev/null`
9006 
9007     if test "x$new_path" = x; then
9008       # It's still not found. Now this is an unrecoverable error.
9009       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9010 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9011       has_space=`$ECHO "$complete" | $GREP " "`
9012       if test "x$has_space" != x; then
9013         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9014 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9015       fi
9016       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9017     fi
9018   fi
9019 
9020   # Now new_path has a complete unix path to the binary
9021   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
9022     # Keep paths in /bin as-is, but remove trailing .exe if any
9023     new_path="${new_path/%.exe/}"
9024     # Do not save /bin paths to all_fixpath_prefixes!
9025   else
9026     # Not in mixed or Windows style, start by that.
9027     new_path=`cmd //c echo $new_path`
9028 
9029   input_path="$new_path"
9030   # Check if we need to convert this using DOS-style short mode. If the path
9031   # contains just simple characters, use it. Otherwise (spaces, weird characters),
9032   # take no chances and rewrite it.
9033   # Note: m4 eats our [], so we need to use [ and ] instead.
9034   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
9035   if test "x$has_forbidden_chars" != x; then
9036     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9037     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9038   fi
9039 
9040     # Output is in $new_path
9041 
9042   windows_path="$new_path"
9043   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9044     unix_path=`$CYGPATH -u "$windows_path"`
9045     new_path="$unix_path"
9046   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9047     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9048     new_path="$unix_path"
9049   fi
9050 
9051     # remove trailing .exe if any
9052     new_path="${new_path/%.exe/}"
9053 
9054     # Save the first 10 bytes of this path to the storage, so fixpath can work.
9055     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
9056   fi
9057 
9058   else
9059     # We're on a posix platform. Hooray! :)
9060     # First separate the path from the arguments. This will split at the first
9061     # space.
9062     complete="$FOUND_MAKE"
9063     path="${complete%% *}"
9064     tmp="$complete EOL"
9065     arguments="${tmp#* }"
9066 
9067     # Cannot rely on the command "which" here since it doesn't always work.
9068     is_absolute_path=`$ECHO "$path" | $GREP ^/`
9069     if test -z "$is_absolute_path"; then
9070       # Path to executable is not absolute. Find it.
9071       IFS_save="$IFS"
9072       IFS=:
9073       for p in $PATH; do
9074         if test -f "$p/$path" && test -x "$p/$path"; then
9075           new_path="$p/$path"
9076           break
9077         fi
9078       done
9079       IFS="$IFS_save"
9080     else
9081       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
9082 $as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
9083       new_path="$path"
9084     fi
9085 
9086     if test "x$new_path" = x; then
9087         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9088 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9089         has_space=`$ECHO "$complete" | $GREP " "`
9090         if test "x$has_space" != x; then
9091           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
9092 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
9093         fi
9094         as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9095       fi
9096   fi
9097 
9098       # Now join together the path and the arguments once again
9099       if test "x$arguments" != xEOL; then
9100         new_complete="$new_path ${arguments% *}"
9101       else
9102         new_complete="$new_path"
9103       fi
9104 
9105   if test "x$complete" != "x$new_complete"; then
9106       FOUND_MAKE="$new_complete"
9107       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
9108 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
9109     fi
9110 
9111         fi
9112       fi
9113     fi
9114   fi
9115 
9116     fi
9117 
9118     if test "x$FOUND_MAKE" = x; then
9119       if test "x$TOOLS_DIR" != x; then
9120         # We have a tools-dir, check that as well before giving up.
9121         OLD_PATH=$PATH
9122         PATH=$TOOLS_DIR:$PATH
9123         for ac_prog in gmake
9124 do
9125   # Extract the first word of "$ac_prog", so it can be a program name with args.
9126 set dummy $ac_prog; ac_word=$2
9127 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9128 $as_echo_n "checking for $ac_word... " >&6; }
9129 if ${ac_cv_path_CHECK_TOOLSDIR_GMAKE+:} false; then :
9130   $as_echo_n "(cached) " >&6
9131 else
9132   case $CHECK_TOOLSDIR_GMAKE in
9133   [\\/]* | ?:[\\/]*)
9134   ac_cv_path_CHECK_TOOLSDIR_GMAKE="$CHECK_TOOLSDIR_GMAKE" # Let the user override the test with a path.
9135   ;;
9136   *)
9137   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9138 for as_dir in $PATH
9139 do
9140   IFS=$as_save_IFS
9141   test -z "$as_dir" && as_dir=.
9142     for ac_exec_ext in '' $ac_executable_extensions; do
9143   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9144     ac_cv_path_CHECK_TOOLSDIR_GMAKE="$as_dir/$ac_word$ac_exec_ext"
9145     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9146     break 2
9147   fi
9148 done
9149   done
9150 IFS=$as_save_IFS
9151 
9152   ;;
9153 esac
9154 fi
9155 CHECK_TOOLSDIR_GMAKE=$ac_cv_path_CHECK_TOOLSDIR_GMAKE
9156 if test -n "$CHECK_TOOLSDIR_GMAKE"; then
9157   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_GMAKE" >&5
9158 $as_echo "$CHECK_TOOLSDIR_GMAKE" >&6; }
9159 else
9160   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9161 $as_echo "no" >&6; }
9162 fi
9163 
9164 
9165   test -n "$CHECK_TOOLSDIR_GMAKE" && break
9166 done
9167 
9168 
9169   MAKE_CANDIDATE=""$CHECK_TOOLSDIR_GMAKE""
9170   DESCRIPTION="gmake in tools-dir"
9171   if test "x$MAKE_CANDIDATE" != x; then
9172     { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
9173 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
9174     MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
9175     IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
9176     if test "x$IS_GNU_MAKE" = x; then
9177       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
9178 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
9179     else
9180       IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'`
9181       if test "x$IS_MODERN_MAKE" = x; then
9182         { $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
9183 $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;}
9184       else
9185         if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
9186           if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9187             MAKE_EXPECTED_ENV='cygwin'
9188           elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9189             MAKE_EXPECTED_ENV='msys'
9190           else
9191             as_fn_error $? "Unknown Windows environment" "$LINENO" 5
9192           fi
9193           MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
9194           IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
9195         else
9196           # Not relevant for non-Windows
9197           IS_MAKE_CORRECT_ENV=true
9198         fi
9199         if test "x$IS_MAKE_CORRECT_ENV" = x; then
9200           { $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
9201 $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;}
9202         else
9203           FOUND_MAKE=$MAKE_CANDIDATE
9204 
9205   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9206 
9207   # First separate the path from the arguments. This will split at the first
9208   # space.
9209   complete="$FOUND_MAKE"
9210   path="${complete%% *}"
9211   tmp="$complete EOL"
9212   arguments="${tmp#* }"
9213 
9214   # Input might be given as Windows format, start by converting to
9215   # unix format.
9216   new_path=`$CYGPATH -u "$path"`
9217 
9218   # Now try to locate executable using which
9219   new_path=`$WHICH "$new_path" 2> /dev/null`
9220   # bat and cmd files are not always considered executable in cygwin causing which
9221   # to not find them
9222   if test "x$new_path" = x \
9223            && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
9224            && test "x`$LS \"$path\" 2>/dev/null`" != x; then
9225     new_path=`$CYGPATH -u "$path"`
9226   fi
9227   if test "x$new_path" = x; then
9228     # Oops. Which didn't find the executable.
9229     # The splitting of arguments from the executable at a space might have been incorrect,
9230     # since paths with space are more likely in Windows. Give it another try with the whole
9231     # argument.
9232     path="$complete"
9233     arguments="EOL"
9234     new_path=`$CYGPATH -u "$path"`
9235     new_path=`$WHICH "$new_path" 2> /dev/null`
9236     # bat and cmd files are not always considered executable in cygwin causing which
9237     # to not find them
9238     if test "x$new_path" = x \
9239              && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
9240              && test "x`$LS \"$path\" 2>/dev/null`" != x; then
9241       new_path=`$CYGPATH -u "$path"`
9242     fi
9243     if test "x$new_path" = x; then
9244       # It's still not found. Now this is an unrecoverable error.
9245       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9246 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9247       has_space=`$ECHO "$complete" | $GREP " "`
9248       if test "x$has_space" != x; then
9249         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9250 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9251       fi
9252       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9253     fi
9254   fi
9255 
9256   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
9257   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
9258   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
9259   # "foo.exe" is OK but "foo" is an error.
9260   #
9261   # This test is therefore slightly more accurate than "test -f" to check for file precense.
9262   # It is also a way to make sure we got the proper file name for the real test later on.
9263   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
9264   if test "x$test_shortpath" = x; then
9265     # Short path failed, file does not exist as specified.
9266     # Try adding .exe or .cmd
9267     if test -f "${new_path}.exe"; then
9268        input_to_shortpath="${new_path}.exe"
9269     elif test -f "${new_path}.cmd"; then
9270        input_to_shortpath="${new_path}.cmd"
9271     else
9272       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
9273 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
9274       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
9275 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
9276       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9277     fi
9278   else
9279     input_to_shortpath="$new_path"
9280   fi
9281 
9282   # Call helper function which possibly converts this using DOS-style short mode.
9283   # If so, the updated path is stored in $new_path.
9284   new_path="$input_to_shortpath"
9285 
9286   input_path="$input_to_shortpath"
9287   # Check if we need to convert this using DOS-style short mode. If the path
9288   # contains just simple characters, use it. Otherwise (spaces, weird characters),
9289   # take no chances and rewrite it.
9290   # Note: m4 eats our [], so we need to use [ and ] instead.
9291   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
9292   if test "x$has_forbidden_chars" != x; then
9293     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9294     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
9295     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
9296     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
9297       # Going to short mode and back again did indeed matter. Since short mode is
9298       # case insensitive, let's make it lowercase to improve readability.
9299       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9300       # Now convert it back to Unix-stile (cygpath)
9301       input_path=`$CYGPATH -u "$shortmode_path"`
9302       new_path="$input_path"
9303     fi
9304   fi
9305 
9306   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
9307   if test "x$test_cygdrive_prefix" = x; then
9308     # As a simple fix, exclude /usr/bin since it's not a real path.
9309     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
9310       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
9311       # a path prefixed by /cygdrive for fixpath to work.
9312       new_path="$CYGWIN_ROOT_PATH$input_path"
9313     fi
9314   fi
9315 
9316   # remove trailing .exe if any
9317   new_path="${new_path/%.exe/}"
9318 
9319   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9320 
9321   # First separate the path from the arguments. This will split at the first
9322   # space.
9323   complete="$FOUND_MAKE"
9324   path="${complete%% *}"
9325   tmp="$complete EOL"
9326   arguments="${tmp#* }"
9327 
9328   # Input might be given as Windows format, start by converting to
9329   # unix format.
9330   new_path="$path"
9331 
9332   windows_path="$new_path"
9333   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9334     unix_path=`$CYGPATH -u "$windows_path"`
9335     new_path="$unix_path"
9336   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9337     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9338     new_path="$unix_path"
9339   fi
9340 
9341 
9342   # Now try to locate executable using which
9343   new_path=`$WHICH "$new_path" 2> /dev/null`
9344 
9345   if test "x$new_path" = x; then
9346     # Oops. Which didn't find the executable.
9347     # The splitting of arguments from the executable at a space might have been incorrect,
9348     # since paths with space are more likely in Windows. Give it another try with the whole
9349     # argument.
9350     path="$complete"
9351     arguments="EOL"
9352     new_path="$path"
9353 
9354   windows_path="$new_path"
9355   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9356     unix_path=`$CYGPATH -u "$windows_path"`
9357     new_path="$unix_path"
9358   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9359     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9360     new_path="$unix_path"
9361   fi
9362 
9363 
9364     new_path=`$WHICH "$new_path" 2> /dev/null`
9365 
9366     if test "x$new_path" = x; then
9367       # It's still not found. Now this is an unrecoverable error.
9368       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9369 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9370       has_space=`$ECHO "$complete" | $GREP " "`
9371       if test "x$has_space" != x; then
9372         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9373 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9374       fi
9375       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9376     fi
9377   fi
9378 
9379   # Now new_path has a complete unix path to the binary
9380   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
9381     # Keep paths in /bin as-is, but remove trailing .exe if any
9382     new_path="${new_path/%.exe/}"
9383     # Do not save /bin paths to all_fixpath_prefixes!
9384   else
9385     # Not in mixed or Windows style, start by that.
9386     new_path=`cmd //c echo $new_path`
9387 
9388   input_path="$new_path"
9389   # Check if we need to convert this using DOS-style short mode. If the path
9390   # contains just simple characters, use it. Otherwise (spaces, weird characters),
9391   # take no chances and rewrite it.
9392   # Note: m4 eats our [], so we need to use [ and ] instead.
9393   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
9394   if test "x$has_forbidden_chars" != x; then
9395     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9396     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9397   fi
9398 
9399     # Output is in $new_path
9400 
9401   windows_path="$new_path"
9402   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9403     unix_path=`$CYGPATH -u "$windows_path"`
9404     new_path="$unix_path"
9405   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9406     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9407     new_path="$unix_path"
9408   fi
9409 
9410     # remove trailing .exe if any
9411     new_path="${new_path/%.exe/}"
9412 
9413     # Save the first 10 bytes of this path to the storage, so fixpath can work.
9414     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
9415   fi
9416 
9417   else
9418     # We're on a posix platform. Hooray! :)
9419     # First separate the path from the arguments. This will split at the first
9420     # space.
9421     complete="$FOUND_MAKE"
9422     path="${complete%% *}"
9423     tmp="$complete EOL"
9424     arguments="${tmp#* }"
9425 
9426     # Cannot rely on the command "which" here since it doesn't always work.
9427     is_absolute_path=`$ECHO "$path" | $GREP ^/`
9428     if test -z "$is_absolute_path"; then
9429       # Path to executable is not absolute. Find it.
9430       IFS_save="$IFS"
9431       IFS=:
9432       for p in $PATH; do
9433         if test -f "$p/$path" && test -x "$p/$path"; then
9434           new_path="$p/$path"
9435           break
9436         fi
9437       done
9438       IFS="$IFS_save"
9439     else
9440       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
9441 $as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
9442       new_path="$path"
9443     fi
9444 
9445     if test "x$new_path" = x; then
9446         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9447 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9448         has_space=`$ECHO "$complete" | $GREP " "`
9449         if test "x$has_space" != x; then
9450           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
9451 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
9452         fi
9453         as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9454       fi
9455   fi
9456 
9457       # Now join together the path and the arguments once again
9458       if test "x$arguments" != xEOL; then
9459         new_complete="$new_path ${arguments% *}"
9460       else
9461         new_complete="$new_path"
9462       fi
9463 
9464   if test "x$complete" != "x$new_complete"; then
9465       FOUND_MAKE="$new_complete"
9466       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
9467 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
9468     fi
9469 
9470         fi
9471       fi
9472     fi
9473   fi
9474 
9475         if test "x$FOUND_MAKE" = x; then
9476           for ac_prog in make
9477 do
9478   # Extract the first word of "$ac_prog", so it can be a program name with args.
9479 set dummy $ac_prog; ac_word=$2
9480 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9481 $as_echo_n "checking for $ac_word... " >&6; }
9482 if ${ac_cv_path_CHECK_TOOLSDIR_MAKE+:} false; then :
9483   $as_echo_n "(cached) " >&6
9484 else
9485   case $CHECK_TOOLSDIR_MAKE in
9486   [\\/]* | ?:[\\/]*)
9487   ac_cv_path_CHECK_TOOLSDIR_MAKE="$CHECK_TOOLSDIR_MAKE" # Let the user override the test with a path.
9488   ;;
9489   *)
9490   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9491 for as_dir in $PATH
9492 do
9493   IFS=$as_save_IFS
9494   test -z "$as_dir" && as_dir=.
9495     for ac_exec_ext in '' $ac_executable_extensions; do
9496   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9497     ac_cv_path_CHECK_TOOLSDIR_MAKE="$as_dir/$ac_word$ac_exec_ext"
9498     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9499     break 2
9500   fi
9501 done
9502   done
9503 IFS=$as_save_IFS
9504 
9505   ;;
9506 esac
9507 fi
9508 CHECK_TOOLSDIR_MAKE=$ac_cv_path_CHECK_TOOLSDIR_MAKE
9509 if test -n "$CHECK_TOOLSDIR_MAKE"; then
9510   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_MAKE" >&5
9511 $as_echo "$CHECK_TOOLSDIR_MAKE" >&6; }
9512 else
9513   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9514 $as_echo "no" >&6; }
9515 fi
9516 
9517 
9518   test -n "$CHECK_TOOLSDIR_MAKE" && break
9519 done
9520 
9521 
9522   MAKE_CANDIDATE=""$CHECK_TOOLSDIR_MAKE""
9523   DESCRIPTION="make in tools-dir"
9524   if test "x$MAKE_CANDIDATE" != x; then
9525     { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
9526 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
9527     MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
9528     IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
9529     if test "x$IS_GNU_MAKE" = x; then
9530       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
9531 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
9532     else
9533       IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'`
9534       if test "x$IS_MODERN_MAKE" = x; then
9535         { $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
9536 $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;}
9537       else
9538         if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
9539           if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9540             MAKE_EXPECTED_ENV='cygwin'
9541           elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9542             MAKE_EXPECTED_ENV='msys'
9543           else
9544             as_fn_error $? "Unknown Windows environment" "$LINENO" 5
9545           fi
9546           MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
9547           IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
9548         else
9549           # Not relevant for non-Windows
9550           IS_MAKE_CORRECT_ENV=true
9551         fi
9552         if test "x$IS_MAKE_CORRECT_ENV" = x; then
9553           { $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
9554 $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;}
9555         else
9556           FOUND_MAKE=$MAKE_CANDIDATE
9557 
9558   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9559 
9560   # First separate the path from the arguments. This will split at the first
9561   # space.
9562   complete="$FOUND_MAKE"
9563   path="${complete%% *}"
9564   tmp="$complete EOL"
9565   arguments="${tmp#* }"
9566 
9567   # Input might be given as Windows format, start by converting to
9568   # unix format.
9569   new_path=`$CYGPATH -u "$path"`
9570 
9571   # Now try to locate executable using which
9572   new_path=`$WHICH "$new_path" 2> /dev/null`
9573   # bat and cmd files are not always considered executable in cygwin causing which
9574   # to not find them
9575   if test "x$new_path" = x \
9576            && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
9577            && test "x`$LS \"$path\" 2>/dev/null`" != x; then
9578     new_path=`$CYGPATH -u "$path"`
9579   fi
9580   if test "x$new_path" = x; then
9581     # Oops. Which didn't find the executable.
9582     # The splitting of arguments from the executable at a space might have been incorrect,
9583     # since paths with space are more likely in Windows. Give it another try with the whole
9584     # argument.
9585     path="$complete"
9586     arguments="EOL"
9587     new_path=`$CYGPATH -u "$path"`
9588     new_path=`$WHICH "$new_path" 2> /dev/null`
9589     # bat and cmd files are not always considered executable in cygwin causing which
9590     # to not find them
9591     if test "x$new_path" = x \
9592              && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
9593              && test "x`$LS \"$path\" 2>/dev/null`" != x; then
9594       new_path=`$CYGPATH -u "$path"`
9595     fi
9596     if test "x$new_path" = x; then
9597       # It's still not found. Now this is an unrecoverable error.
9598       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9599 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9600       has_space=`$ECHO "$complete" | $GREP " "`
9601       if test "x$has_space" != x; then
9602         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9603 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9604       fi
9605       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9606     fi
9607   fi
9608 
9609   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
9610   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
9611   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
9612   # "foo.exe" is OK but "foo" is an error.
9613   #
9614   # This test is therefore slightly more accurate than "test -f" to check for file precense.
9615   # It is also a way to make sure we got the proper file name for the real test later on.
9616   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
9617   if test "x$test_shortpath" = x; then
9618     # Short path failed, file does not exist as specified.
9619     # Try adding .exe or .cmd
9620     if test -f "${new_path}.exe"; then
9621        input_to_shortpath="${new_path}.exe"
9622     elif test -f "${new_path}.cmd"; then
9623        input_to_shortpath="${new_path}.cmd"
9624     else
9625       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
9626 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
9627       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
9628 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
9629       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9630     fi
9631   else
9632     input_to_shortpath="$new_path"
9633   fi
9634 
9635   # Call helper function which possibly converts this using DOS-style short mode.
9636   # If so, the updated path is stored in $new_path.
9637   new_path="$input_to_shortpath"
9638 
9639   input_path="$input_to_shortpath"
9640   # Check if we need to convert this using DOS-style short mode. If the path
9641   # contains just simple characters, use it. Otherwise (spaces, weird characters),
9642   # take no chances and rewrite it.
9643   # Note: m4 eats our [], so we need to use [ and ] instead.
9644   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
9645   if test "x$has_forbidden_chars" != x; then
9646     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9647     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
9648     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
9649     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
9650       # Going to short mode and back again did indeed matter. Since short mode is
9651       # case insensitive, let's make it lowercase to improve readability.
9652       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9653       # Now convert it back to Unix-stile (cygpath)
9654       input_path=`$CYGPATH -u "$shortmode_path"`
9655       new_path="$input_path"
9656     fi
9657   fi
9658 
9659   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
9660   if test "x$test_cygdrive_prefix" = x; then
9661     # As a simple fix, exclude /usr/bin since it's not a real path.
9662     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
9663       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
9664       # a path prefixed by /cygdrive for fixpath to work.
9665       new_path="$CYGWIN_ROOT_PATH$input_path"
9666     fi
9667   fi
9668 
9669   # remove trailing .exe if any
9670   new_path="${new_path/%.exe/}"
9671 
9672   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9673 
9674   # First separate the path from the arguments. This will split at the first
9675   # space.
9676   complete="$FOUND_MAKE"
9677   path="${complete%% *}"
9678   tmp="$complete EOL"
9679   arguments="${tmp#* }"
9680 
9681   # Input might be given as Windows format, start by converting to
9682   # unix format.
9683   new_path="$path"
9684 
9685   windows_path="$new_path"
9686   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9687     unix_path=`$CYGPATH -u "$windows_path"`
9688     new_path="$unix_path"
9689   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9690     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9691     new_path="$unix_path"
9692   fi
9693 
9694 
9695   # Now try to locate executable using which
9696   new_path=`$WHICH "$new_path" 2> /dev/null`
9697 
9698   if test "x$new_path" = x; then
9699     # Oops. Which didn't find the executable.
9700     # The splitting of arguments from the executable at a space might have been incorrect,
9701     # since paths with space are more likely in Windows. Give it another try with the whole
9702     # argument.
9703     path="$complete"
9704     arguments="EOL"
9705     new_path="$path"
9706 
9707   windows_path="$new_path"
9708   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9709     unix_path=`$CYGPATH -u "$windows_path"`
9710     new_path="$unix_path"
9711   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9712     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9713     new_path="$unix_path"
9714   fi
9715 
9716 
9717     new_path=`$WHICH "$new_path" 2> /dev/null`
9718 
9719     if test "x$new_path" = x; then
9720       # It's still not found. Now this is an unrecoverable error.
9721       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9722 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9723       has_space=`$ECHO "$complete" | $GREP " "`
9724       if test "x$has_space" != x; then
9725         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9726 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9727       fi
9728       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9729     fi
9730   fi
9731 
9732   # Now new_path has a complete unix path to the binary
9733   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
9734     # Keep paths in /bin as-is, but remove trailing .exe if any
9735     new_path="${new_path/%.exe/}"
9736     # Do not save /bin paths to all_fixpath_prefixes!
9737   else
9738     # Not in mixed or Windows style, start by that.
9739     new_path=`cmd //c echo $new_path`
9740 
9741   input_path="$new_path"
9742   # Check if we need to convert this using DOS-style short mode. If the path
9743   # contains just simple characters, use it. Otherwise (spaces, weird characters),
9744   # take no chances and rewrite it.
9745   # Note: m4 eats our [], so we need to use [ and ] instead.
9746   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
9747   if test "x$has_forbidden_chars" != x; then
9748     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9749     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9750   fi
9751 
9752     # Output is in $new_path
9753 
9754   windows_path="$new_path"
9755   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9756     unix_path=`$CYGPATH -u "$windows_path"`
9757     new_path="$unix_path"
9758   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9759     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9760     new_path="$unix_path"
9761   fi
9762 
9763     # remove trailing .exe if any
9764     new_path="${new_path/%.exe/}"
9765 
9766     # Save the first 10 bytes of this path to the storage, so fixpath can work.
9767     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
9768   fi
9769 
9770   else
9771     # We're on a posix platform. Hooray! :)
9772     # First separate the path from the arguments. This will split at the first
9773     # space.
9774     complete="$FOUND_MAKE"
9775     path="${complete%% *}"
9776     tmp="$complete EOL"
9777     arguments="${tmp#* }"
9778 
9779     # Cannot rely on the command "which" here since it doesn't always work.
9780     is_absolute_path=`$ECHO "$path" | $GREP ^/`
9781     if test -z "$is_absolute_path"; then
9782       # Path to executable is not absolute. Find it.
9783       IFS_save="$IFS"
9784       IFS=:
9785       for p in $PATH; do
9786         if test -f "$p/$path" && test -x "$p/$path"; then
9787           new_path="$p/$path"
9788           break
9789         fi
9790       done
9791       IFS="$IFS_save"
9792     else
9793       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
9794 $as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
9795       new_path="$path"
9796     fi
9797 
9798     if test "x$new_path" = x; then
9799         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9800 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9801         has_space=`$ECHO "$complete" | $GREP " "`
9802         if test "x$has_space" != x; then
9803           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
9804 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
9805         fi
9806         as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9807       fi
9808   fi
9809 
9810       # Now join together the path and the arguments once again
9811       if test "x$arguments" != xEOL; then
9812         new_complete="$new_path ${arguments% *}"
9813       else
9814         new_complete="$new_path"
9815       fi
9816 
9817   if test "x$complete" != "x$new_complete"; then
9818       FOUND_MAKE="$new_complete"
9819       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
9820 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
9821     fi
9822 
9823         fi
9824       fi
9825     fi
9826   fi
9827 
9828         fi
9829         PATH=$OLD_PATH
9830       fi
9831     fi
9832 
9833     if test "x$FOUND_MAKE" = x; then
9834       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
9835     fi
9836   fi
9837 
9838   MAKE=$FOUND_MAKE
9839 
9840   { $as_echo "$as_me:${as_lineno-$LINENO}: Using GNU make 3.81 (or later) at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&5
9841 $as_echo "$as_me: Using GNU make 3.81 (or later) at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&6;}
9842 
9843 
9844 
9845     # Test if find supports -delete
9846     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if find supports -delete" >&5
9847 $as_echo_n "checking if find supports -delete... " >&6; }
9848     FIND_DELETE="-delete"
9849 
9850     DELETEDIR=`$MKTEMP -d tmp.XXXXXXXXXX` || (echo Could not create temporary directory!; exit $?)
9851 
9852     echo Hejsan > $DELETEDIR/TestIfFindSupportsDelete
9853 
9854     TEST_DELETE=`$FIND "$DELETEDIR" -name TestIfFindSupportsDelete $FIND_DELETE 2>&1`
9855     if test -f $DELETEDIR/TestIfFindSupportsDelete; then
9856         # No, it does not.
9857         rm $DELETEDIR/TestIfFindSupportsDelete
9858         FIND_DELETE="-exec rm \{\} \+"
9859         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9860 $as_echo "no" >&6; }
9861     else
9862         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9863 $as_echo "yes" >&6; }
9864     fi
9865     rmdir $DELETEDIR
9866 
9867 
9868 
9869 # These tools might not be installed by default,
9870 # need hint on how to install them.
9871 
9872     for ac_prog in unzip
9873 do
9874   # Extract the first word of "$ac_prog", so it can be a program name with args.
9875 set dummy $ac_prog; ac_word=$2
9876 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9877 $as_echo_n "checking for $ac_word... " >&6; }
9878 if ${ac_cv_path_UNZIP+:} false; then :
9879   $as_echo_n "(cached) " >&6
9880 else
9881   case $UNZIP in
9882   [\\/]* | ?:[\\/]*)
9883   ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
9884   ;;
9885   *)
9886   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9887 for as_dir in $PATH
9888 do
9889   IFS=$as_save_IFS
9890   test -z "$as_dir" && as_dir=.
9891     for ac_exec_ext in '' $ac_executable_extensions; do
9892   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9893     ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
9894     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9895     break 2
9896   fi
9897 done
9898   done
9899 IFS=$as_save_IFS
9900 
9901   ;;
9902 esac
9903 fi
9904 UNZIP=$ac_cv_path_UNZIP
9905 if test -n "$UNZIP"; then
9906   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
9907 $as_echo "$UNZIP" >&6; }
9908 else
9909   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9910 $as_echo "no" >&6; }
9911 fi
9912 
9913 
9914   test -n "$UNZIP" && break
9915 done
9916 
9917 
9918     if test "x$UNZIP" = x; then
9919         if test "xunzip" = x; then
9920           PROG_NAME=unzip
9921         else
9922           PROG_NAME=unzip
9923         fi
9924         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
9925 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
9926         as_fn_error $? "Cannot continue" "$LINENO" 5
9927     fi
9928 
9929 
9930 
9931     for ac_prog in zip
9932 do
9933   # Extract the first word of "$ac_prog", so it can be a program name with args.
9934 set dummy $ac_prog; ac_word=$2
9935 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9936 $as_echo_n "checking for $ac_word... " >&6; }
9937 if ${ac_cv_path_ZIP+:} false; then :
9938   $as_echo_n "(cached) " >&6
9939 else
9940   case $ZIP in
9941   [\\/]* | ?:[\\/]*)
9942   ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
9943   ;;
9944   *)
9945   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9946 for as_dir in $PATH
9947 do
9948   IFS=$as_save_IFS
9949   test -z "$as_dir" && as_dir=.
9950     for ac_exec_ext in '' $ac_executable_extensions; do
9951   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9952     ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
9953     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9954     break 2
9955   fi
9956 done
9957   done
9958 IFS=$as_save_IFS
9959 
9960   ;;
9961 esac
9962 fi
9963 ZIP=$ac_cv_path_ZIP
9964 if test -n "$ZIP"; then
9965   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
9966 $as_echo "$ZIP" >&6; }
9967 else
9968   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9969 $as_echo "no" >&6; }
9970 fi
9971 
9972 
9973   test -n "$ZIP" && break
9974 done
9975 
9976 
9977     if test "x$ZIP" = x; then
9978         if test "xzip" = x; then
9979           PROG_NAME=zip
9980         else
9981           PROG_NAME=zip
9982         fi
9983         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
9984 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
9985         as_fn_error $? "Cannot continue" "$LINENO" 5
9986     fi
9987 
9988 
9989 
9990 # Non-required basic tools
9991 
9992 # Extract the first word of "ldd", so it can be a program name with args.
9993 set dummy ldd; ac_word=$2
9994 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9995 $as_echo_n "checking for $ac_word... " >&6; }
9996 if ${ac_cv_path_LDD+:} false; then :
9997   $as_echo_n "(cached) " >&6
9998 else
9999   case $LDD in
10000   [\\/]* | ?:[\\/]*)
10001   ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
10002   ;;
10003   *)
10004   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10005 for as_dir in $PATH
10006 do
10007   IFS=$as_save_IFS
10008   test -z "$as_dir" && as_dir=.
10009     for ac_exec_ext in '' $ac_executable_extensions; do
10010   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10011     ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
10012     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10013     break 2
10014   fi
10015 done
10016   done
10017 IFS=$as_save_IFS
10018 
10019   ;;
10020 esac
10021 fi
10022 LDD=$ac_cv_path_LDD
10023 if test -n "$LDD"; then
10024   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
10025 $as_echo "$LDD" >&6; }
10026 else
10027   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10028 $as_echo "no" >&6; }
10029 fi
10030 
10031 
10032 if test "x$LDD" = "x"; then
10033     # List shared lib dependencies is used for
10034     # debug output and checking for forbidden dependencies.
10035     # We can build without it.
10036     LDD="true"
10037 fi
10038 # Extract the first word of "otool", so it can be a program name with args.
10039 set dummy otool; ac_word=$2
10040 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10041 $as_echo_n "checking for $ac_word... " >&6; }
10042 if ${ac_cv_path_OTOOL+:} false; then :
10043   $as_echo_n "(cached) " >&6
10044 else
10045   case $OTOOL in
10046   [\\/]* | ?:[\\/]*)
10047   ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
10048   ;;
10049   *)
10050   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10051 for as_dir in $PATH
10052 do
10053   IFS=$as_save_IFS
10054   test -z "$as_dir" && as_dir=.
10055     for ac_exec_ext in '' $ac_executable_extensions; do
10056   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10057     ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
10058     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10059     break 2
10060   fi
10061 done
10062   done
10063 IFS=$as_save_IFS
10064 
10065   ;;
10066 esac
10067 fi
10068 OTOOL=$ac_cv_path_OTOOL
10069 if test -n "$OTOOL"; then
10070   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
10071 $as_echo "$OTOOL" >&6; }
10072 else
10073   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10074 $as_echo "no" >&6; }
10075 fi
10076 
10077 
10078 if test "x$OTOOL" = "x"; then
10079    OTOOL="true"
10080 fi
10081 for ac_prog in readelf greadelf
10082 do
10083   # Extract the first word of "$ac_prog", so it can be a program name with args.
10084 set dummy $ac_prog; ac_word=$2
10085 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10086 $as_echo_n "checking for $ac_word... " >&6; }
10087 if ${ac_cv_path_READELF+:} false; then :
10088   $as_echo_n "(cached) " >&6
10089 else
10090   case $READELF in
10091   [\\/]* | ?:[\\/]*)
10092   ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
10093   ;;
10094   *)
10095   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10096 for as_dir in $PATH
10097 do
10098   IFS=$as_save_IFS
10099   test -z "$as_dir" && as_dir=.
10100     for ac_exec_ext in '' $ac_executable_extensions; do
10101   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10102     ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
10103     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10104     break 2
10105   fi
10106 done
10107   done
10108 IFS=$as_save_IFS
10109 
10110   ;;
10111 esac
10112 fi
10113 READELF=$ac_cv_path_READELF
10114 if test -n "$READELF"; then
10115   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
10116 $as_echo "$READELF" >&6; }
10117 else
10118   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10119 $as_echo "no" >&6; }
10120 fi
10121 
10122 
10123   test -n "$READELF" && break
10124 done
10125 
10126 # Extract the first word of "hg", so it can be a program name with args.
10127 set dummy hg; ac_word=$2
10128 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10129 $as_echo_n "checking for $ac_word... " >&6; }
10130 if ${ac_cv_path_HG+:} false; then :
10131   $as_echo_n "(cached) " >&6
10132 else
10133   case $HG in
10134   [\\/]* | ?:[\\/]*)
10135   ac_cv_path_HG="$HG" # Let the user override the test with a path.
10136   ;;
10137   *)
10138   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10139 for as_dir in $PATH
10140 do
10141   IFS=$as_save_IFS
10142   test -z "$as_dir" && as_dir=.
10143     for ac_exec_ext in '' $ac_executable_extensions; do
10144   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10145     ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
10146     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10147     break 2
10148   fi
10149 done
10150   done
10151 IFS=$as_save_IFS
10152 
10153   ;;
10154 esac
10155 fi
10156 HG=$ac_cv_path_HG
10157 if test -n "$HG"; then
10158   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
10159 $as_echo "$HG" >&6; }
10160 else
10161   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10162 $as_echo "no" >&6; }
10163 fi
10164 
10165 
10166 # Extract the first word of "stat", so it can be a program name with args.
10167 set dummy stat; ac_word=$2
10168 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10169 $as_echo_n "checking for $ac_word... " >&6; }
10170 if ${ac_cv_path_STAT+:} false; then :
10171   $as_echo_n "(cached) " >&6
10172 else
10173   case $STAT in
10174   [\\/]* | ?:[\\/]*)
10175   ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
10176   ;;
10177   *)
10178   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10179 for as_dir in $PATH
10180 do
10181   IFS=$as_save_IFS
10182   test -z "$as_dir" && as_dir=.
10183     for ac_exec_ext in '' $ac_executable_extensions; do
10184   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10185     ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
10186     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10187     break 2
10188   fi
10189 done
10190   done
10191 IFS=$as_save_IFS
10192 
10193   ;;
10194 esac
10195 fi
10196 STAT=$ac_cv_path_STAT
10197 if test -n "$STAT"; then
10198   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
10199 $as_echo "$STAT" >&6; }
10200 else
10201   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10202 $as_echo "no" >&6; }
10203 fi
10204 
10205 
10206 # Extract the first word of "time", so it can be a program name with args.
10207 set dummy time; ac_word=$2
10208 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10209 $as_echo_n "checking for $ac_word... " >&6; }
10210 if ${ac_cv_path_TIME+:} false; then :
10211   $as_echo_n "(cached) " >&6
10212 else
10213   case $TIME in
10214   [\\/]* | ?:[\\/]*)
10215   ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
10216   ;;
10217   *)
10218   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10219 for as_dir in $PATH
10220 do
10221   IFS=$as_save_IFS
10222   test -z "$as_dir" && as_dir=.
10223     for ac_exec_ext in '' $ac_executable_extensions; do
10224   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10225     ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
10226     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10227     break 2
10228   fi
10229 done
10230   done
10231 IFS=$as_save_IFS
10232 
10233   ;;
10234 esac
10235 fi
10236 TIME=$ac_cv_path_TIME
10237 if test -n "$TIME"; then
10238   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
10239 $as_echo "$TIME" >&6; }
10240 else
10241   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10242 $as_echo "no" >&6; }
10243 fi
10244 
10245 
10246 
10247 if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
10248 
10249     for ac_prog in comm
10250 do
10251   # Extract the first word of "$ac_prog", so it can be a program name with args.
10252 set dummy $ac_prog; ac_word=$2
10253 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10254 $as_echo_n "checking for $ac_word... " >&6; }
10255 if ${ac_cv_path_COMM+:} false; then :
10256   $as_echo_n "(cached) " >&6
10257 else
10258   case $COMM in
10259   [\\/]* | ?:[\\/]*)
10260   ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
10261   ;;
10262   *)
10263   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10264 for as_dir in $PATH
10265 do
10266   IFS=$as_save_IFS
10267   test -z "$as_dir" && as_dir=.
10268     for ac_exec_ext in '' $ac_executable_extensions; do
10269   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10270     ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
10271     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10272     break 2
10273   fi
10274 done
10275   done
10276 IFS=$as_save_IFS
10277 
10278   ;;
10279 esac
10280 fi
10281 COMM=$ac_cv_path_COMM
10282 if test -n "$COMM"; then
10283   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
10284 $as_echo "$COMM" >&6; }
10285 else
10286   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10287 $as_echo "no" >&6; }
10288 fi
10289 
10290 
10291   test -n "$COMM" && break
10292 done
10293 
10294 
10295     if test "x$COMM" = x; then
10296         if test "xcomm" = x; then
10297           PROG_NAME=comm
10298         else
10299           PROG_NAME=comm
10300         fi
10301         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
10302 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
10303         as_fn_error $? "Cannot continue" "$LINENO" 5
10304     fi
10305 
10306 
10307 fi
10308 
10309 if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
10310 
10311     for ac_prog in xattr
10312 do
10313   # Extract the first word of "$ac_prog", so it can be a program name with args.
10314 set dummy $ac_prog; ac_word=$2
10315 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10316 $as_echo_n "checking for $ac_word... " >&6; }
10317 if ${ac_cv_path_XATTR+:} false; then :
10318   $as_echo_n "(cached) " >&6
10319 else
10320   case $XATTR in
10321   [\\/]* | ?:[\\/]*)
10322   ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
10323   ;;
10324   *)
10325   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10326 for as_dir in $PATH
10327 do
10328   IFS=$as_save_IFS
10329   test -z "$as_dir" && as_dir=.
10330     for ac_exec_ext in '' $ac_executable_extensions; do
10331   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10332     ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
10333     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10334     break 2
10335   fi
10336 done
10337   done
10338 IFS=$as_save_IFS
10339 
10340   ;;
10341 esac
10342 fi
10343 XATTR=$ac_cv_path_XATTR
10344 if test -n "$XATTR"; then
10345   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
10346 $as_echo "$XATTR" >&6; }
10347 else
10348   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10349 $as_echo "no" >&6; }
10350 fi
10351 
10352 
10353   test -n "$XATTR" && break
10354 done
10355 
10356 
10357     if test "x$XATTR" = x; then
10358         if test "xxattr" = x; then
10359           PROG_NAME=xattr
10360         else
10361           PROG_NAME=xattr
10362         fi
10363         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
10364 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
10365         as_fn_error $? "Cannot continue" "$LINENO" 5
10366     fi
10367 
10368 
10369   # Extract the first word of "codesign", so it can be a program name with args.
10370 set dummy codesign; ac_word=$2
10371 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10372 $as_echo_n "checking for $ac_word... " >&6; }
10373 if ${ac_cv_path_CODESIGN+:} false; then :
10374   $as_echo_n "(cached) " >&6
10375 else
10376   case $CODESIGN in
10377   [\\/]* | ?:[\\/]*)
10378   ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
10379   ;;
10380   *)
10381   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10382 for as_dir in $PATH
10383 do
10384   IFS=$as_save_IFS
10385   test -z "$as_dir" && as_dir=.
10386     for ac_exec_ext in '' $ac_executable_extensions; do
10387   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10388     ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
10389     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10390     break 2
10391   fi
10392 done
10393   done
10394 IFS=$as_save_IFS
10395 
10396   ;;
10397 esac
10398 fi
10399 CODESIGN=$ac_cv_path_CODESIGN
10400 if test -n "$CODESIGN"; then
10401   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
10402 $as_echo "$CODESIGN" >&6; }
10403 else
10404   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10405 $as_echo "no" >&6; }
10406 fi
10407 
10408 
10409   if test "x$CODESIGN" != "x"; then
10410     # Verify that the openjdk_codesign certificate is present
10411     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if openjdk_codesign certificate is present" >&5
10412 $as_echo_n "checking if openjdk_codesign certificate is present... " >&6; }
10413     rm -f codesign-testfile
10414     touch codesign-testfile
10415     codesign -s openjdk_codesign codesign-testfile 2>&5 >&5 || CODESIGN=
10416     rm -f codesign-testfile
10417     if test "x$CODESIGN" = x; then
10418       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10419 $as_echo "no" >&6; }
10420     else
10421       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10422 $as_echo "yes" >&6; }
10423     fi
10424   fi
10425 fi
10426 
10427 
10428 # Check if pkg-config is available.
10429 
10430 
10431 if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
10432         if test -n "$ac_tool_prefix"; then
10433   # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
10434 set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
10435 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10436 $as_echo_n "checking for $ac_word... " >&6; }
10437 if ${ac_cv_path_PKG_CONFIG+:} false; then :
10438   $as_echo_n "(cached) " >&6
10439 else
10440   case $PKG_CONFIG in
10441   [\\/]* | ?:[\\/]*)
10442   ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
10443   ;;
10444   *)
10445   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10446 for as_dir in $PATH
10447 do
10448   IFS=$as_save_IFS
10449   test -z "$as_dir" && as_dir=.
10450     for ac_exec_ext in '' $ac_executable_extensions; do
10451   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10452     ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
10453     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10454     break 2
10455   fi
10456 done
10457   done
10458 IFS=$as_save_IFS
10459 
10460   ;;
10461 esac
10462 fi
10463 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
10464 if test -n "$PKG_CONFIG"; then
10465   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
10466 $as_echo "$PKG_CONFIG" >&6; }
10467 else
10468   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10469 $as_echo "no" >&6; }
10470 fi
10471 
10472 
10473 fi
10474 if test -z "$ac_cv_path_PKG_CONFIG"; then
10475   ac_pt_PKG_CONFIG=$PKG_CONFIG
10476   # Extract the first word of "pkg-config", so it can be a program name with args.
10477 set dummy pkg-config; ac_word=$2
10478 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10479 $as_echo_n "checking for $ac_word... " >&6; }
10480 if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
10481   $as_echo_n "(cached) " >&6
10482 else
10483   case $ac_pt_PKG_CONFIG in
10484   [\\/]* | ?:[\\/]*)
10485   ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
10486   ;;
10487   *)
10488   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10489 for as_dir in $PATH
10490 do
10491   IFS=$as_save_IFS
10492   test -z "$as_dir" && as_dir=.
10493     for ac_exec_ext in '' $ac_executable_extensions; do
10494   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10495     ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
10496     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10497     break 2
10498   fi
10499 done
10500   done
10501 IFS=$as_save_IFS
10502 
10503   ;;
10504 esac
10505 fi
10506 ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
10507 if test -n "$ac_pt_PKG_CONFIG"; then
10508   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
10509 $as_echo "$ac_pt_PKG_CONFIG" >&6; }
10510 else
10511   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10512 $as_echo "no" >&6; }
10513 fi
10514 
10515   if test "x$ac_pt_PKG_CONFIG" = x; then
10516     PKG_CONFIG=""
10517   else
10518     case $cross_compiling:$ac_tool_warned in
10519 yes:)
10520 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
10521 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
10522 ac_tool_warned=yes ;;
10523 esac
10524     PKG_CONFIG=$ac_pt_PKG_CONFIG
10525   fi
10526 else
10527   PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
10528 fi
10529 
10530 fi
10531 if test -n "$PKG_CONFIG"; then
10532         _pkg_min_version=0.9.0
10533         { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
10534 $as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
10535         if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
10536                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10537 $as_echo "yes" >&6; }
10538         else
10539                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10540 $as_echo "no" >&6; }
10541                 PKG_CONFIG=""
10542         fi
10543 
10544 fi
10545 
10546 # After basic tools have been setup, we can check build os specific details.
10547 
10548 ###############################################################################
10549 
10550 # Note that this is the build platform OS version!
10551 
10552 OS_VERSION="`uname -r | ${SED} 's!\.! !g' | ${SED} 's!-! !g'`"
10553 OS_VERSION_MAJOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 1 -d ' '`"
10554 OS_VERSION_MINOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 2 -d ' '`"
10555 OS_VERSION_MICRO="`${ECHO} ${OS_VERSION} | ${CUT} -f 3 -d ' '`"
10556 
10557 
10558 
10559 
10560 
10561 # Setup builddeps, for automatic downloading of tools we need.
10562 # This is needed before we can call BDEPS_CHECK_MODULE, which is done in
10563 # boot-jdk setup, but we need to have basic tools setup first.
10564 
10565 
10566 # Check whether --with-builddeps-conf was given.
10567 if test "${with_builddeps_conf+set}" = set; then :
10568   withval=$with_builddeps_conf;
10569 fi
10570 
10571 
10572 
10573 # Check whether --with-builddeps-server was given.
10574 if test "${with_builddeps_server+set}" = set; then :
10575   withval=$with_builddeps_server;
10576 fi
10577 
10578 
10579 
10580 # Check whether --with-builddeps-dir was given.
10581 if test "${with_builddeps_dir+set}" = set; then :
10582   withval=$with_builddeps_dir;
10583 else
10584   with_builddeps_dir=/localhome/builddeps
10585 fi
10586 
10587 
10588 
10589 # Check whether --with-builddeps-group was given.
10590 if test "${with_builddeps_group+set}" = set; then :
10591   withval=$with_builddeps_group;
10592 fi
10593 
10594 
10595 
10596 
10597     if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
10598         if test "x$with_builddeps_conf" != x; then
10599             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for supplied builddeps configuration file" >&5
10600 $as_echo_n "checking for supplied builddeps configuration file... " >&6; }
10601             builddepsfile=$with_builddeps_conf
10602             if test -s $builddepsfile; then
10603                 . $builddepsfile
10604                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: loaded!" >&5
10605 $as_echo "loaded!" >&6; }
10606             else
10607                as_fn_error $? "The given builddeps conf file $with_builddeps_conf could not be loaded!" "$LINENO" 5
10608            fi
10609         else
10610             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builddeps.conf files in sources..." >&5
10611 $as_echo_n "checking for builddeps.conf files in sources...... " >&6; }
10612             builddepsfile=`mktemp`
10613             touch $builddepsfile
10614             # Put all found confs into a single file.
10615             find ${SRC_ROOT} -name builddeps.conf -exec cat \{\} \; >> $builddepsfile
10616             # Source the file to acquire the variables
10617             if test -s $builddepsfile; then
10618                 . $builddepsfile
10619                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: found at least one!" >&5
10620 $as_echo "found at least one!" >&6; }
10621             else
10622                as_fn_error $? "Could not find any builddeps.conf at all!" "$LINENO" 5
10623            fi
10624         fi
10625         # Create build and target names that use _ instead of "-" and ".".
10626         # This is necessary to use them in variable names.
10627         build_var=`echo ${OPENJDK_BUILD_AUTOCONF_NAME} | tr '-' '_' | tr '.' '_'`
10628         target_var=`echo ${OPENJDK_TARGET_AUTOCONF_NAME} | tr '-' '_' | tr '.' '_'`
10629         # Extract rewrite information for build and target
10630         eval rewritten_build=\${REWRITE_${build_var}}
10631         if test "x$rewritten_build" = x; then
10632             rewritten_build=${OPENJDK_BUILD_AUTOCONF_NAME}
10633             echo Build stays the same $rewritten_build
10634         else
10635             echo Rewriting build for builddeps into $rewritten_build
10636         fi
10637         eval rewritten_target=\${REWRITE_${target_var}}
10638         if test "x$rewritten_target" = x; then
10639             rewritten_target=${OPENJDK_TARGET_AUTOCONF_NAME}
10640             echo Target stays the same $rewritten_target
10641         else
10642             echo Rewriting target for builddeps into $rewritten_target
10643         fi
10644         rewritten_build_var=`echo ${rewritten_build} | tr '-' '_' | tr '.' '_'`
10645         rewritten_target_var=`echo ${rewritten_target} | tr '-' '_' | tr '.' '_'`
10646     fi
10647     for ac_prog in 7z unzip
10648 do
10649   # Extract the first word of "$ac_prog", so it can be a program name with args.
10650 set dummy $ac_prog; ac_word=$2
10651 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10652 $as_echo_n "checking for $ac_word... " >&6; }
10653 if ${ac_cv_prog_BDEPS_UNZIP+:} false; then :
10654   $as_echo_n "(cached) " >&6
10655 else
10656   if test -n "$BDEPS_UNZIP"; then
10657   ac_cv_prog_BDEPS_UNZIP="$BDEPS_UNZIP" # Let the user override the test.
10658 else
10659 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10660 for as_dir in $PATH
10661 do
10662   IFS=$as_save_IFS
10663   test -z "$as_dir" && as_dir=.
10664     for ac_exec_ext in '' $ac_executable_extensions; do
10665   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10666     ac_cv_prog_BDEPS_UNZIP="$ac_prog"
10667     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10668     break 2
10669   fi
10670 done
10671   done
10672 IFS=$as_save_IFS
10673 
10674 fi
10675 fi
10676 BDEPS_UNZIP=$ac_cv_prog_BDEPS_UNZIP
10677 if test -n "$BDEPS_UNZIP"; then
10678   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BDEPS_UNZIP" >&5
10679 $as_echo "$BDEPS_UNZIP" >&6; }
10680 else
10681   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10682 $as_echo "no" >&6; }
10683 fi
10684 
10685 
10686   test -n "$BDEPS_UNZIP" && break
10687 done
10688 
10689     if test "x$BDEPS_UNZIP" = x7z; then
10690         BDEPS_UNZIP="7z x"
10691     fi
10692 
10693     for ac_prog in wget lftp ftp
10694 do
10695   # Extract the first word of "$ac_prog", so it can be a program name with args.
10696 set dummy $ac_prog; ac_word=$2
10697 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10698 $as_echo_n "checking for $ac_word... " >&6; }
10699 if ${ac_cv_prog_BDEPS_FTP+:} false; then :
10700   $as_echo_n "(cached) " >&6
10701 else
10702   if test -n "$BDEPS_FTP"; then
10703   ac_cv_prog_BDEPS_FTP="$BDEPS_FTP" # Let the user override the test.
10704 else
10705 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10706 for as_dir in $PATH
10707 do
10708   IFS=$as_save_IFS
10709   test -z "$as_dir" && as_dir=.
10710     for ac_exec_ext in '' $ac_executable_extensions; do
10711   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10712     ac_cv_prog_BDEPS_FTP="$ac_prog"
10713     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10714     break 2
10715   fi
10716 done
10717   done
10718 IFS=$as_save_IFS
10719 
10720 fi
10721 fi
10722 BDEPS_FTP=$ac_cv_prog_BDEPS_FTP
10723 if test -n "$BDEPS_FTP"; then
10724   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BDEPS_FTP" >&5
10725 $as_echo "$BDEPS_FTP" >&6; }
10726 else
10727   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10728 $as_echo "no" >&6; }
10729 fi
10730 
10731 
10732   test -n "$BDEPS_FTP" && break
10733 done
10734 
10735 
10736 
10737 ###############################################################################
10738 #
10739 # Determine OpenJDK variants, options and version numbers.
10740 #
10741 ###############################################################################
10742 
10743 # We need build & target for this.
10744 
10745 
10746 ###############################################################################
10747 #
10748 # Should we build a JDK/JVM with headful support (ie a graphical ui)?
10749 # We always build headless support.
10750 #
10751 { $as_echo "$as_me:${as_lineno-$LINENO}: checking headful support" >&5
10752 $as_echo_n "checking headful support... " >&6; }
10753 # Check whether --enable-headful was given.
10754 if test "${enable_headful+set}" = set; then :
10755   enableval=$enable_headful; SUPPORT_HEADFUL=${enable_headful}
10756 else
10757   SUPPORT_HEADFUL=yes
10758 fi
10759 
10760 
10761 SUPPORT_HEADLESS=yes
10762 BUILD_HEADLESS="BUILD_HEADLESS:=true"
10763 
10764 if test "x$SUPPORT_HEADFUL" = xyes; then
10765     # We are building both headful and headless.
10766     headful_msg="inlude support for both headful and headless"
10767 fi
10768 
10769 if test "x$SUPPORT_HEADFUL" = xno; then
10770     # Thus we are building headless only.
10771     BUILD_HEADLESS="BUILD_HEADLESS:=true"
10772     headful_msg="headless only"
10773 fi
10774 
10775 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $headful_msg" >&5
10776 $as_echo "$headful_msg" >&6; }
10777 
10778 
10779 
10780 
10781 
10782 # Control wether Hotspot runs Queens test after build.
10783 # Check whether --enable-hotspot-test-in-build was given.
10784 if test "${enable_hotspot_test_in_build+set}" = set; then :
10785   enableval=$enable_hotspot_test_in_build;
10786 else
10787   enable_hotspot_test_in_build=no
10788 fi
10789 
10790 if test "x$enable_hotspot_test_in_build" = "xyes"; then
10791     TEST_IN_BUILD=true
10792 else
10793     TEST_IN_BUILD=false
10794 fi
10795 
10796 
10797 ###############################################################################
10798 #
10799 # Choose cacerts source file
10800 #
10801 
10802 # Check whether --with-cacerts-file was given.
10803 if test "${with_cacerts_file+set}" = set; then :
10804   withval=$with_cacerts_file;
10805 fi
10806 
10807 if test "x$with_cacerts_file" != x; then
10808     CACERTS_FILE=$with_cacerts_file
10809 else
10810     CACERTS_FILE=${SRC_ROOT}/jdk/src/share/lib/security/cacerts
10811 fi
10812 
10813 
10814 ###############################################################################
10815 #
10816 # Enable or disable unlimited crypto
10817 #
10818 # Check whether --enable-unlimited-crypto was given.
10819 if test "${enable_unlimited_crypto+set}" = set; then :
10820   enableval=$enable_unlimited_crypto;
10821 else
10822   enable_unlimited_crypto=no
10823 fi
10824 
10825 if test "x$enable_unlimited_crypto" = "xyes"; then
10826     UNLIMITED_CRYPTO=true
10827 else
10828     UNLIMITED_CRYPTO=false
10829 fi
10830 
10831 
10832 ###############################################################################
10833 #
10834 # Enable or disable the elliptic curve crypto implementation
10835 #
10836 
10837 
10838 ###############################################################################
10839 #
10840 # Compress jars
10841 #
10842 COMPRESS_JARS=false
10843 
10844 
10845 
10846 
10847 # Source the version numbers
10848 . $AUTOCONF_DIR/version-numbers
10849 
10850 # Get the settings from parameters
10851 
10852 # Check whether --with-milestone was given.
10853 if test "${with_milestone+set}" = set; then :
10854   withval=$with_milestone;
10855 fi
10856 
10857 if test "x$with_milestone" = xyes; then
10858   as_fn_error $? "Milestone must have a value" "$LINENO" 5
10859 elif test "x$with_milestone" != x; then
10860     MILESTONE="$with_milestone"
10861 fi
10862 if test "x$MILESTONE" = x; then
10863   MILESTONE=internal
10864 fi
10865 
10866 
10867 # Check whether --with-update-version was given.
10868 if test "${with_update_version+set}" = set; then :
10869   withval=$with_update_version;
10870 fi
10871 
10872 if test "x$with_update_version" = xyes; then
10873   as_fn_error $? "Update version must have a value" "$LINENO" 5
10874 elif test "x$with_update_version" != x; then
10875   JDK_UPDATE_VERSION="$with_update_version"
10876 fi
10877 
10878 
10879 # Check whether --with-build-number was given.
10880 if test "${with_build_number+set}" = set; then :
10881   withval=$with_build_number;
10882 fi
10883 
10884 if test "x$with_build_number" = xyes; then
10885   as_fn_error $? "Build number must have a value" "$LINENO" 5
10886 elif test "x$with_build_number" != x; then
10887   JDK_BUILD_NUMBER="$with_build_number"
10888 fi
10889 if test "x$JDK_BUILD_NUMBER" = x; then
10890   JDK_BUILD_NUMBER=b00
10891 fi
10892 
10893 
10894 # Check whether --with-user-release-suffix was given.
10895 if test "${with_user_release_suffix+set}" = set; then :
10896   withval=$with_user_release_suffix;
10897 fi
10898 
10899 if test "x$with_user_release_suffix" = xyes; then
10900   as_fn_error $? "Release suffix must have a value" "$LINENO" 5
10901 elif test "x$with_user_release_suffix" != x; then
10902   USER_RELEASE_SUFFIX="$with_user_release_suffix"
10903 else
10904   BUILD_DATE=`date '+%Y_%m_%d_%H_%M'`
10905   # Avoid [:alnum:] since it depends on the locale.
10906   CLEAN_USERNAME=`echo "$USER" | $TR -d -c 'abcdefghijklmnopqrstuvqxyz0123456789'`
10907   USER_RELEASE_SUFFIX=`echo "${CLEAN_USERNAME}_${BUILD_DATE}" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
10908 fi
10909 
10910 
10911 # Now set the JDK version, milestone, build number etc.
10912 
10913 
10914 
10915 
10916 
10917 
10918 
10919 
10920 
10921 
10922 
10923 
10924 
10925 
10926 COPYRIGHT_YEAR=`date +'%Y'`
10927 
10928 
10929 if test "x$JDK_UPDATE_VERSION" != x; then
10930   JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}_${JDK_UPDATE_VERSION}"
10931 else
10932   JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}"
10933 fi
10934 
10935 
10936 COOKED_BUILD_NUMBER=`$ECHO $JDK_BUILD_NUMBER | $SED -e 's/^b//' -e 's/^0//'`
10937 
10938 
10939 
10940 ###############################################################################
10941 #
10942 # Setup BootJDK, used to bootstrap the build.
10943 #
10944 ###############################################################################
10945 
10946 
10947 BOOT_JDK_FOUND=no
10948 
10949 # Check whether --with-boot-jdk was given.
10950 if test "${with_boot_jdk+set}" = set; then :
10951   withval=$with_boot_jdk;
10952 fi
10953 
10954 
10955 # We look for the Boot JDK through various means, going from more certain to
10956 # more of a guess-work. After each test, BOOT_JDK_FOUND is set to "yes" if
10957 # we detected something (if so, the path to the jdk is in BOOT_JDK). But we
10958 # must check if this is indeed valid; otherwise we'll continue looking.
10959 
10960 # Test: Is bootjdk explicitely set by command line arguments?
10961 
10962   if test "x$BOOT_JDK_FOUND" = xno; then
10963     # Now execute the test
10964 
10965 if test "x$with_boot_jdk" != x; then
10966     BOOT_JDK=$with_boot_jdk
10967     BOOT_JDK_FOUND=maybe
10968     { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using configure arguments" >&5
10969 $as_echo "$as_me: Found potential Boot JDK using configure arguments" >&6;}
10970 fi
10971 
10972 
10973     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
10974     if test "x$BOOT_JDK_FOUND" = xmaybe; then
10975       # Do we have a bin/java?
10976       if test ! -x "$BOOT_JDK/bin/java"; then
10977         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
10978 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
10979         BOOT_JDK_FOUND=no
10980       else
10981         # Do we have a bin/javac?
10982         if test ! -x "$BOOT_JDK/bin/javac"; then
10983           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
10984 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
10985           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
10986 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
10987           BOOT_JDK_FOUND=no
10988         else
10989           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
10990           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
10991             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
10992 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
10993             BOOT_JDK_FOUND=no
10994           else
10995             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
10996             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
10997 
10998             # Extra M4 quote needed to protect [] in grep expression.
10999             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
11000             if test "x$FOUND_VERSION_78" = x; then
11001               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
11002 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
11003               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
11004 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
11005               BOOT_JDK_FOUND=no
11006             else
11007               # We're done! :-)
11008               BOOT_JDK_FOUND=yes
11009 
11010   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11011 
11012   # Input might be given as Windows format, start by converting to
11013   # unix format.
11014   path="$BOOT_JDK"
11015   new_path=`$CYGPATH -u "$path"`
11016 
11017   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
11018   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
11019   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
11020   # "foo.exe" is OK but "foo" is an error.
11021   #
11022   # This test is therefore slightly more accurate than "test -f" to check for file precense.
11023   # It is also a way to make sure we got the proper file name for the real test later on.
11024   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
11025   if test "x$test_shortpath" = x; then
11026     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11027 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11028     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
11029   fi
11030 
11031   # Call helper function which possibly converts this using DOS-style short mode.
11032   # If so, the updated path is stored in $new_path.
11033 
11034   input_path="$new_path"
11035   # Check if we need to convert this using DOS-style short mode. If the path
11036   # contains just simple characters, use it. Otherwise (spaces, weird characters),
11037   # take no chances and rewrite it.
11038   # Note: m4 eats our [], so we need to use [ and ] instead.
11039   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
11040   if test "x$has_forbidden_chars" != x; then
11041     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11042     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
11043     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
11044     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
11045       # Going to short mode and back again did indeed matter. Since short mode is
11046       # case insensitive, let's make it lowercase to improve readability.
11047       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11048       # Now convert it back to Unix-stile (cygpath)
11049       input_path=`$CYGPATH -u "$shortmode_path"`
11050       new_path="$input_path"
11051     fi
11052   fi
11053 
11054   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
11055   if test "x$test_cygdrive_prefix" = x; then
11056     # As a simple fix, exclude /usr/bin since it's not a real path.
11057     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
11058       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
11059       # a path prefixed by /cygdrive for fixpath to work.
11060       new_path="$CYGWIN_ROOT_PATH$input_path"
11061     fi
11062   fi
11063 
11064 
11065   if test "x$path" != "x$new_path"; then
11066     BOOT_JDK="$new_path"
11067     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11068 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11069   fi
11070 
11071   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11072 
11073   path="$BOOT_JDK"
11074   has_colon=`$ECHO $path | $GREP ^.:`
11075   new_path="$path"
11076   if test "x$has_colon" = x; then
11077     # Not in mixed or Windows style, start by that.
11078     new_path=`cmd //c echo $path`
11079   fi
11080 
11081 
11082   input_path="$new_path"
11083   # Check if we need to convert this using DOS-style short mode. If the path
11084   # contains just simple characters, use it. Otherwise (spaces, weird characters),
11085   # take no chances and rewrite it.
11086   # Note: m4 eats our [], so we need to use [ and ] instead.
11087   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
11088   if test "x$has_forbidden_chars" != x; then
11089     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11090     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11091   fi
11092 
11093 
11094   windows_path="$new_path"
11095   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11096     unix_path=`$CYGPATH -u "$windows_path"`
11097     new_path="$unix_path"
11098   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11099     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11100     new_path="$unix_path"
11101   fi
11102 
11103   if test "x$path" != "x$new_path"; then
11104     BOOT_JDK="$new_path"
11105     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11106 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11107   fi
11108 
11109   # Save the first 10 bytes of this path to the storage, so fixpath can work.
11110   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
11111 
11112   else
11113     # We're on a posix platform. Hooray! :)
11114     path="$BOOT_JDK"
11115     has_space=`$ECHO "$path" | $GREP " "`
11116     if test "x$has_space" != x; then
11117       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11118 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11119       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
11120     fi
11121 
11122     # Use eval to expand a potential ~
11123     eval path="$path"
11124     if test ! -f "$path" && test ! -d "$path"; then
11125       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
11126     fi
11127 
11128     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
11129   fi
11130 
11131               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
11132 $as_echo_n "checking for Boot JDK... " >&6; }
11133               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
11134 $as_echo "$BOOT_JDK" >&6; }
11135               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
11136 $as_echo_n "checking Boot JDK version... " >&6; }
11137               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
11138               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
11139 $as_echo "$BOOT_JDK_VERSION" >&6; }
11140             fi # end check jdk version
11141           fi # end check rt.jar
11142         fi # end check javac
11143       fi # end check java
11144     fi # end check boot jdk found
11145   fi
11146 
11147 if test "x$with_boot_jdk" != x && test "x$BOOT_JDK_FOUND" = xno; then
11148   # Having specified an argument which is incorrect will produce an instant failure;
11149   # we should not go on looking
11150   as_fn_error $? "The path given by --with-boot-jdk does not contain a valid Boot JDK" "$LINENO" 5
11151 fi
11152 
11153 # Test: Is bootjdk available from builddeps?
11154 
11155   if test "x$BOOT_JDK_FOUND" = xno; then
11156     # Now execute the test
11157 
11158 
11159 
11160     if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
11161         # Source the builddeps file again, to make sure it uses the latest variables!
11162         . $builddepsfile
11163         # Look for a target and build machine specific resource!
11164         eval resource=\${builddep_bootjdk_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
11165         if test "x$resource" = x; then
11166             # Ok, lets instead look for a target specific resource
11167             eval resource=\${builddep_bootjdk_TARGET_${rewritten_target_var}}
11168         fi
11169         if test "x$resource" = x; then
11170             # Ok, lets instead look for a build specific resource
11171             eval resource=\${builddep_bootjdk_BUILD_${rewritten_build_var}}
11172         fi
11173         if test "x$resource" = x; then
11174             # Ok, lets instead look for a generic resource
11175             # (The bootjdk comes from M4 and not the shell, thus no need for eval here.)
11176             resource=${builddep_bootjdk}
11177         fi
11178         if test "x$resource" != x; then
11179             { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for bootjdk" >&5
11180 $as_echo "$as_me: Using builddeps $resource for bootjdk" >&6;}
11181             # If the resource in the builddeps.conf file is an existing directory,
11182             # for example /java/linux/cups
11183             if test -d ${resource}; then
11184                depdir=${resource}
11185             else
11186 
11187 # bootjdk is for example mymodule
11188 # $resource is for example libs/general/libmymod_1_2_3.zip
11189 # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
11190 # $with_builddeps_dir is for example /localhome/builddeps
11191 # depdir is the name of the variable into which we store the depdir, eg MYMOD
11192 # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
11193 # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
11194     filename=`basename $resource`
11195     filebase=`echo $filename | sed 's/\.[^\.]*$//'`
11196     filebase=${filename%%.*}
11197     extension=${filename#*.}
11198     installdir=$with_builddeps_dir/$filebase
11199     if test ! -f $installdir/$filename.unpacked; then
11200         { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency bootjdk from $with_builddeps_server/$resource and installing into $installdir" >&5
11201 $as_echo "$as_me: Downloading build dependency bootjdk from $with_builddeps_server/$resource and installing into $installdir" >&6;}
11202         if test ! -d $installdir; then
11203             mkdir -p $installdir
11204         fi
11205         if test ! -d $installdir; then
11206             as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
11207         fi
11208         tmpfile=`mktemp $installdir/bootjdk.XXXXXXXXX`
11209         touch $tmpfile
11210         if test ! -f $tmpfile; then
11211             as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
11212         fi
11213 
11214     # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
11215     # $tmpfile is the local file name for the downloaded file.
11216     VALID_TOOL=no
11217     if test "x$BDEPS_FTP" = xwget; then
11218        VALID_TOOL=yes
11219        wget -O $tmpfile $with_builddeps_server/$resource
11220     fi
11221     if test "x$BDEPS_FTP" = xlftp; then
11222        VALID_TOOL=yes
11223        lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
11224     fi
11225     if test "x$BDEPS_FTP" = xftp; then
11226         VALID_TOOL=yes
11227         FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
11228         FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
11229         FTPUSERPWD=${FTPSERVER%%@*}
11230         if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
11231             FTPUSER=${userpwd%%:*}
11232             FTPPWD=${userpwd#*@}
11233             FTPSERVER=${FTPSERVER#*@}
11234         else
11235             FTPUSER=ftp
11236             FTPPWD=ftp
11237         fi
11238         # the "pass" command does not work on some
11239         # ftp clients (read ftp.exe) but if it works,
11240         # passive mode is better!
11241         (\
11242             echo "user $FTPUSER $FTPPWD"        ;\
11243             echo "pass"                         ;\
11244             echo "bin"                          ;\
11245             echo "get $FTPPATH $tmpfile"              ;\
11246         ) | ftp -in $FTPSERVER
11247     fi
11248     if test "x$VALID_TOOL" != xyes; then
11249        as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
11250     fi
11251 
11252         mv $tmpfile $installdir/$filename
11253         if test ! -s $installdir/$filename; then
11254             as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
11255         fi
11256         case "$extension" in
11257             zip)  echo "Unzipping $installdir/$filename..."
11258                (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
11259             ;;
11260             tar.gz) echo "Untaring $installdir/$filename..."
11261                (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
11262             ;;
11263             tgz) echo "Untaring $installdir/$filename..."
11264                (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
11265             ;;
11266             *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
11267             ;;
11268         esac
11269     fi
11270     if test -f $installdir/$filename.unpacked; then
11271         depdir=$installdir
11272     fi
11273 
11274             fi
11275             # Source the builddeps file again, because in the previous command, the depdir
11276             # was updated to point at the current build dependency install directory.
11277             . $builddepsfile
11278             # Now extract variables from the builddeps.conf files.
11279             theroot=${builddep_bootjdk_ROOT}
11280             thecflags=${builddep_bootjdk_CFLAGS}
11281             thelibs=${builddep_bootjdk_LIBS}
11282             if test "x$depdir" = x; then
11283                 as_fn_error $? "Could not download build dependency bootjdk" "$LINENO" 5
11284             fi
11285             BOOT_JDK=$depdir
11286             if test "x$theroot" != x; then
11287                BOOT_JDK="$theroot"
11288             fi
11289             if test "x$thecflags" != x; then
11290                BOOT_JDK_CFLAGS="$thecflags"
11291             fi
11292             if test "x$thelibs" != x; then
11293                BOOT_JDK_LIBS="$thelibs"
11294             fi
11295             BOOT_JDK_FOUND=maybe
11296             else BOOT_JDK_FOUND=no
11297 
11298         fi
11299         else BOOT_JDK_FOUND=no
11300 
11301     fi
11302 
11303 
11304 
11305     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
11306     if test "x$BOOT_JDK_FOUND" = xmaybe; then
11307       # Do we have a bin/java?
11308       if test ! -x "$BOOT_JDK/bin/java"; then
11309         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
11310 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
11311         BOOT_JDK_FOUND=no
11312       else
11313         # Do we have a bin/javac?
11314         if test ! -x "$BOOT_JDK/bin/javac"; then
11315           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
11316 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
11317           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
11318 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
11319           BOOT_JDK_FOUND=no
11320         else
11321           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
11322           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
11323             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
11324 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
11325             BOOT_JDK_FOUND=no
11326           else
11327             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
11328             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
11329 
11330             # Extra M4 quote needed to protect [] in grep expression.
11331             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
11332             if test "x$FOUND_VERSION_78" = x; then
11333               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
11334 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
11335               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
11336 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
11337               BOOT_JDK_FOUND=no
11338             else
11339               # We're done! :-)
11340               BOOT_JDK_FOUND=yes
11341 
11342   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11343 
11344   # Input might be given as Windows format, start by converting to
11345   # unix format.
11346   path="$BOOT_JDK"
11347   new_path=`$CYGPATH -u "$path"`
11348 
11349   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
11350   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
11351   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
11352   # "foo.exe" is OK but "foo" is an error.
11353   #
11354   # This test is therefore slightly more accurate than "test -f" to check for file precense.
11355   # It is also a way to make sure we got the proper file name for the real test later on.
11356   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
11357   if test "x$test_shortpath" = x; then
11358     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11359 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11360     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
11361   fi
11362 
11363   # Call helper function which possibly converts this using DOS-style short mode.
11364   # If so, the updated path is stored in $new_path.
11365 
11366   input_path="$new_path"
11367   # Check if we need to convert this using DOS-style short mode. If the path
11368   # contains just simple characters, use it. Otherwise (spaces, weird characters),
11369   # take no chances and rewrite it.
11370   # Note: m4 eats our [], so we need to use [ and ] instead.
11371   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
11372   if test "x$has_forbidden_chars" != x; then
11373     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11374     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
11375     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
11376     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
11377       # Going to short mode and back again did indeed matter. Since short mode is
11378       # case insensitive, let's make it lowercase to improve readability.
11379       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11380       # Now convert it back to Unix-stile (cygpath)
11381       input_path=`$CYGPATH -u "$shortmode_path"`
11382       new_path="$input_path"
11383     fi
11384   fi
11385 
11386   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
11387   if test "x$test_cygdrive_prefix" = x; then
11388     # As a simple fix, exclude /usr/bin since it's not a real path.
11389     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
11390       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
11391       # a path prefixed by /cygdrive for fixpath to work.
11392       new_path="$CYGWIN_ROOT_PATH$input_path"
11393     fi
11394   fi
11395 
11396 
11397   if test "x$path" != "x$new_path"; then
11398     BOOT_JDK="$new_path"
11399     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11400 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11401   fi
11402 
11403   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11404 
11405   path="$BOOT_JDK"
11406   has_colon=`$ECHO $path | $GREP ^.:`
11407   new_path="$path"
11408   if test "x$has_colon" = x; then
11409     # Not in mixed or Windows style, start by that.
11410     new_path=`cmd //c echo $path`
11411   fi
11412 
11413 
11414   input_path="$new_path"
11415   # Check if we need to convert this using DOS-style short mode. If the path
11416   # contains just simple characters, use it. Otherwise (spaces, weird characters),
11417   # take no chances and rewrite it.
11418   # Note: m4 eats our [], so we need to use [ and ] instead.
11419   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
11420   if test "x$has_forbidden_chars" != x; then
11421     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11422     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11423   fi
11424 
11425 
11426   windows_path="$new_path"
11427   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11428     unix_path=`$CYGPATH -u "$windows_path"`
11429     new_path="$unix_path"
11430   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11431     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11432     new_path="$unix_path"
11433   fi
11434 
11435   if test "x$path" != "x$new_path"; then
11436     BOOT_JDK="$new_path"
11437     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11438 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11439   fi
11440 
11441   # Save the first 10 bytes of this path to the storage, so fixpath can work.
11442   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
11443 
11444   else
11445     # We're on a posix platform. Hooray! :)
11446     path="$BOOT_JDK"
11447     has_space=`$ECHO "$path" | $GREP " "`
11448     if test "x$has_space" != x; then
11449       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11450 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11451       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
11452     fi
11453 
11454     # Use eval to expand a potential ~
11455     eval path="$path"
11456     if test ! -f "$path" && test ! -d "$path"; then
11457       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
11458     fi
11459 
11460     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
11461   fi
11462 
11463               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
11464 $as_echo_n "checking for Boot JDK... " >&6; }
11465               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
11466 $as_echo "$BOOT_JDK" >&6; }
11467               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
11468 $as_echo_n "checking Boot JDK version... " >&6; }
11469               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
11470               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
11471 $as_echo "$BOOT_JDK_VERSION" >&6; }
11472             fi # end check jdk version
11473           fi # end check rt.jar
11474         fi # end check javac
11475       fi # end check java
11476     fi # end check boot jdk found
11477   fi
11478 
11479 
11480 # Test: Is $JAVA_HOME set?
11481 
11482   if test "x$BOOT_JDK_FOUND" = xno; then
11483     # Now execute the test
11484 
11485     if test "x$JAVA_HOME" != x; then
11486         JAVA_HOME_PROCESSED="$JAVA_HOME"
11487 
11488   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11489 
11490   # Input might be given as Windows format, start by converting to
11491   # unix format.
11492   path="$JAVA_HOME_PROCESSED"
11493   new_path=`$CYGPATH -u "$path"`
11494 
11495   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
11496   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
11497   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
11498   # "foo.exe" is OK but "foo" is an error.
11499   #
11500   # This test is therefore slightly more accurate than "test -f" to check for file precense.
11501   # It is also a way to make sure we got the proper file name for the real test later on.
11502   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
11503   if test "x$test_shortpath" = x; then
11504     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
11505 $as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
11506     as_fn_error $? "Cannot locate the the path of JAVA_HOME_PROCESSED" "$LINENO" 5
11507   fi
11508 
11509   # Call helper function which possibly converts this using DOS-style short mode.
11510   # If so, the updated path is stored in $new_path.
11511 
11512   input_path="$new_path"
11513   # Check if we need to convert this using DOS-style short mode. If the path
11514   # contains just simple characters, use it. Otherwise (spaces, weird characters),
11515   # take no chances and rewrite it.
11516   # Note: m4 eats our [], so we need to use [ and ] instead.
11517   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
11518   if test "x$has_forbidden_chars" != x; then
11519     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11520     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
11521     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
11522     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
11523       # Going to short mode and back again did indeed matter. Since short mode is
11524       # case insensitive, let's make it lowercase to improve readability.
11525       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11526       # Now convert it back to Unix-stile (cygpath)
11527       input_path=`$CYGPATH -u "$shortmode_path"`
11528       new_path="$input_path"
11529     fi
11530   fi
11531 
11532   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
11533   if test "x$test_cygdrive_prefix" = x; then
11534     # As a simple fix, exclude /usr/bin since it's not a real path.
11535     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
11536       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
11537       # a path prefixed by /cygdrive for fixpath to work.
11538       new_path="$CYGWIN_ROOT_PATH$input_path"
11539     fi
11540   fi
11541 
11542 
11543   if test "x$path" != "x$new_path"; then
11544     JAVA_HOME_PROCESSED="$new_path"
11545     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
11546 $as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
11547   fi
11548 
11549   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11550 
11551   path="$JAVA_HOME_PROCESSED"
11552   has_colon=`$ECHO $path | $GREP ^.:`
11553   new_path="$path"
11554   if test "x$has_colon" = x; then
11555     # Not in mixed or Windows style, start by that.
11556     new_path=`cmd //c echo $path`
11557   fi
11558 
11559 
11560   input_path="$new_path"
11561   # Check if we need to convert this using DOS-style short mode. If the path
11562   # contains just simple characters, use it. Otherwise (spaces, weird characters),
11563   # take no chances and rewrite it.
11564   # Note: m4 eats our [], so we need to use [ and ] instead.
11565   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
11566   if test "x$has_forbidden_chars" != x; then
11567     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11568     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11569   fi
11570 
11571 
11572   windows_path="$new_path"
11573   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11574     unix_path=`$CYGPATH -u "$windows_path"`
11575     new_path="$unix_path"
11576   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11577     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11578     new_path="$unix_path"
11579   fi
11580 
11581   if test "x$path" != "x$new_path"; then
11582     JAVA_HOME_PROCESSED="$new_path"
11583     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
11584 $as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
11585   fi
11586 
11587   # Save the first 10 bytes of this path to the storage, so fixpath can work.
11588   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
11589 
11590   else
11591     # We're on a posix platform. Hooray! :)
11592     path="$JAVA_HOME_PROCESSED"
11593     has_space=`$ECHO "$path" | $GREP " "`
11594     if test "x$has_space" != x; then
11595       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
11596 $as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
11597       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
11598     fi
11599 
11600     # Use eval to expand a potential ~
11601     eval path="$path"
11602     if test ! -f "$path" && test ! -d "$path"; then
11603       as_fn_error $? "The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is not found." "$LINENO" 5
11604     fi
11605 
11606     JAVA_HOME_PROCESSED="`cd "$path"; $THEPWDCMD -L`"
11607   fi
11608 
11609         if test ! -d "$JAVA_HOME_PROCESSED"; then
11610             { $as_echo "$as_me:${as_lineno-$LINENO}: Your JAVA_HOME points to a non-existing directory!" >&5
11611 $as_echo "$as_me: Your JAVA_HOME points to a non-existing directory!" >&6;}
11612         else
11613           # Aha, the user has set a JAVA_HOME
11614           # let us use that as the Boot JDK.
11615           BOOT_JDK="$JAVA_HOME_PROCESSED"
11616           BOOT_JDK_FOUND=maybe
11617           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using JAVA_HOME" >&5
11618 $as_echo "$as_me: Found potential Boot JDK using JAVA_HOME" >&6;}
11619         fi
11620     fi
11621 
11622 
11623     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
11624     if test "x$BOOT_JDK_FOUND" = xmaybe; then
11625       # Do we have a bin/java?
11626       if test ! -x "$BOOT_JDK/bin/java"; then
11627         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
11628 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
11629         BOOT_JDK_FOUND=no
11630       else
11631         # Do we have a bin/javac?
11632         if test ! -x "$BOOT_JDK/bin/javac"; then
11633           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
11634 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
11635           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
11636 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
11637           BOOT_JDK_FOUND=no
11638         else
11639           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
11640           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
11641             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
11642 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
11643             BOOT_JDK_FOUND=no
11644           else
11645             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
11646             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
11647 
11648             # Extra M4 quote needed to protect [] in grep expression.
11649             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
11650             if test "x$FOUND_VERSION_78" = x; then
11651               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
11652 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
11653               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
11654 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
11655               BOOT_JDK_FOUND=no
11656             else
11657               # We're done! :-)
11658               BOOT_JDK_FOUND=yes
11659 
11660   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11661 
11662   # Input might be given as Windows format, start by converting to
11663   # unix format.
11664   path="$BOOT_JDK"
11665   new_path=`$CYGPATH -u "$path"`
11666 
11667   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
11668   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
11669   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
11670   # "foo.exe" is OK but "foo" is an error.
11671   #
11672   # This test is therefore slightly more accurate than "test -f" to check for file precense.
11673   # It is also a way to make sure we got the proper file name for the real test later on.
11674   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
11675   if test "x$test_shortpath" = x; then
11676     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11677 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11678     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
11679   fi
11680 
11681   # Call helper function which possibly converts this using DOS-style short mode.
11682   # If so, the updated path is stored in $new_path.
11683 
11684   input_path="$new_path"
11685   # Check if we need to convert this using DOS-style short mode. If the path
11686   # contains just simple characters, use it. Otherwise (spaces, weird characters),
11687   # take no chances and rewrite it.
11688   # Note: m4 eats our [], so we need to use [ and ] instead.
11689   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
11690   if test "x$has_forbidden_chars" != x; then
11691     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11692     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
11693     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
11694     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
11695       # Going to short mode and back again did indeed matter. Since short mode is
11696       # case insensitive, let's make it lowercase to improve readability.
11697       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11698       # Now convert it back to Unix-stile (cygpath)
11699       input_path=`$CYGPATH -u "$shortmode_path"`
11700       new_path="$input_path"
11701     fi
11702   fi
11703 
11704   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
11705   if test "x$test_cygdrive_prefix" = x; then
11706     # As a simple fix, exclude /usr/bin since it's not a real path.
11707     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
11708       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
11709       # a path prefixed by /cygdrive for fixpath to work.
11710       new_path="$CYGWIN_ROOT_PATH$input_path"
11711     fi
11712   fi
11713 
11714 
11715   if test "x$path" != "x$new_path"; then
11716     BOOT_JDK="$new_path"
11717     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11718 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11719   fi
11720 
11721   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11722 
11723   path="$BOOT_JDK"
11724   has_colon=`$ECHO $path | $GREP ^.:`
11725   new_path="$path"
11726   if test "x$has_colon" = x; then
11727     # Not in mixed or Windows style, start by that.
11728     new_path=`cmd //c echo $path`
11729   fi
11730 
11731 
11732   input_path="$new_path"
11733   # Check if we need to convert this using DOS-style short mode. If the path
11734   # contains just simple characters, use it. Otherwise (spaces, weird characters),
11735   # take no chances and rewrite it.
11736   # Note: m4 eats our [], so we need to use [ and ] instead.
11737   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
11738   if test "x$has_forbidden_chars" != x; then
11739     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11740     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11741   fi
11742 
11743 
11744   windows_path="$new_path"
11745   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11746     unix_path=`$CYGPATH -u "$windows_path"`
11747     new_path="$unix_path"
11748   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11749     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11750     new_path="$unix_path"
11751   fi
11752 
11753   if test "x$path" != "x$new_path"; then
11754     BOOT_JDK="$new_path"
11755     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11756 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11757   fi
11758 
11759   # Save the first 10 bytes of this path to the storage, so fixpath can work.
11760   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
11761 
11762   else
11763     # We're on a posix platform. Hooray! :)
11764     path="$BOOT_JDK"
11765     has_space=`$ECHO "$path" | $GREP " "`
11766     if test "x$has_space" != x; then
11767       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11768 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11769       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
11770     fi
11771 
11772     # Use eval to expand a potential ~
11773     eval path="$path"
11774     if test ! -f "$path" && test ! -d "$path"; then
11775       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
11776     fi
11777 
11778     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
11779   fi
11780 
11781               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
11782 $as_echo_n "checking for Boot JDK... " >&6; }
11783               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
11784 $as_echo "$BOOT_JDK" >&6; }
11785               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
11786 $as_echo_n "checking Boot JDK version... " >&6; }
11787               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
11788               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
11789 $as_echo "$BOOT_JDK_VERSION" >&6; }
11790             fi # end check jdk version
11791           fi # end check rt.jar
11792         fi # end check javac
11793       fi # end check java
11794     fi # end check boot jdk found
11795   fi
11796 
11797 
11798 # Test: Is there a /usr/libexec/java_home? (Typically on MacOSX)
11799 
11800   if test "x$BOOT_JDK_FOUND" = xno; then
11801     # Now execute the test
11802 
11803     if test -x /usr/libexec/java_home; then
11804         BOOT_JDK=`/usr/libexec/java_home`
11805         BOOT_JDK_FOUND=maybe
11806         { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home" >&5
11807 $as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home" >&6;}
11808     fi
11809 
11810 
11811     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
11812     if test "x$BOOT_JDK_FOUND" = xmaybe; then
11813       # Do we have a bin/java?
11814       if test ! -x "$BOOT_JDK/bin/java"; then
11815         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
11816 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
11817         BOOT_JDK_FOUND=no
11818       else
11819         # Do we have a bin/javac?
11820         if test ! -x "$BOOT_JDK/bin/javac"; then
11821           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
11822 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
11823           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
11824 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
11825           BOOT_JDK_FOUND=no
11826         else
11827           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
11828           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
11829             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
11830 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
11831             BOOT_JDK_FOUND=no
11832           else
11833             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
11834             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
11835 
11836             # Extra M4 quote needed to protect [] in grep expression.
11837             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
11838             if test "x$FOUND_VERSION_78" = x; then
11839               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
11840 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
11841               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
11842 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
11843               BOOT_JDK_FOUND=no
11844             else
11845               # We're done! :-)
11846               BOOT_JDK_FOUND=yes
11847 
11848   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11849 
11850   # Input might be given as Windows format, start by converting to
11851   # unix format.
11852   path="$BOOT_JDK"
11853   new_path=`$CYGPATH -u "$path"`
11854 
11855   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
11856   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
11857   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
11858   # "foo.exe" is OK but "foo" is an error.
11859   #
11860   # This test is therefore slightly more accurate than "test -f" to check for file precense.
11861   # It is also a way to make sure we got the proper file name for the real test later on.
11862   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
11863   if test "x$test_shortpath" = x; then
11864     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11865 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11866     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
11867   fi
11868 
11869   # Call helper function which possibly converts this using DOS-style short mode.
11870   # If so, the updated path is stored in $new_path.
11871 
11872   input_path="$new_path"
11873   # Check if we need to convert this using DOS-style short mode. If the path
11874   # contains just simple characters, use it. Otherwise (spaces, weird characters),
11875   # take no chances and rewrite it.
11876   # Note: m4 eats our [], so we need to use [ and ] instead.
11877   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
11878   if test "x$has_forbidden_chars" != x; then
11879     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11880     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
11881     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
11882     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
11883       # Going to short mode and back again did indeed matter. Since short mode is
11884       # case insensitive, let's make it lowercase to improve readability.
11885       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11886       # Now convert it back to Unix-stile (cygpath)
11887       input_path=`$CYGPATH -u "$shortmode_path"`
11888       new_path="$input_path"
11889     fi
11890   fi
11891 
11892   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
11893   if test "x$test_cygdrive_prefix" = x; then
11894     # As a simple fix, exclude /usr/bin since it's not a real path.
11895     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
11896       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
11897       # a path prefixed by /cygdrive for fixpath to work.
11898       new_path="$CYGWIN_ROOT_PATH$input_path"
11899     fi
11900   fi
11901 
11902 
11903   if test "x$path" != "x$new_path"; then
11904     BOOT_JDK="$new_path"
11905     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11906 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11907   fi
11908 
11909   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11910 
11911   path="$BOOT_JDK"
11912   has_colon=`$ECHO $path | $GREP ^.:`
11913   new_path="$path"
11914   if test "x$has_colon" = x; then
11915     # Not in mixed or Windows style, start by that.
11916     new_path=`cmd //c echo $path`
11917   fi
11918 
11919 
11920   input_path="$new_path"
11921   # Check if we need to convert this using DOS-style short mode. If the path
11922   # contains just simple characters, use it. Otherwise (spaces, weird characters),
11923   # take no chances and rewrite it.
11924   # Note: m4 eats our [], so we need to use [ and ] instead.
11925   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
11926   if test "x$has_forbidden_chars" != x; then
11927     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11928     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11929   fi
11930 
11931 
11932   windows_path="$new_path"
11933   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11934     unix_path=`$CYGPATH -u "$windows_path"`
11935     new_path="$unix_path"
11936   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11937     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11938     new_path="$unix_path"
11939   fi
11940 
11941   if test "x$path" != "x$new_path"; then
11942     BOOT_JDK="$new_path"
11943     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11944 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11945   fi
11946 
11947   # Save the first 10 bytes of this path to the storage, so fixpath can work.
11948   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
11949 
11950   else
11951     # We're on a posix platform. Hooray! :)
11952     path="$BOOT_JDK"
11953     has_space=`$ECHO "$path" | $GREP " "`
11954     if test "x$has_space" != x; then
11955       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11956 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11957       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
11958     fi
11959 
11960     # Use eval to expand a potential ~
11961     eval path="$path"
11962     if test ! -f "$path" && test ! -d "$path"; then
11963       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
11964     fi
11965 
11966     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
11967   fi
11968 
11969               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
11970 $as_echo_n "checking for Boot JDK... " >&6; }
11971               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
11972 $as_echo "$BOOT_JDK" >&6; }
11973               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
11974 $as_echo_n "checking Boot JDK version... " >&6; }
11975               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
11976               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
11977 $as_echo "$BOOT_JDK_VERSION" >&6; }
11978             fi # end check jdk version
11979           fi # end check rt.jar
11980         fi # end check javac
11981       fi # end check java
11982     fi # end check boot jdk found
11983   fi
11984 
11985 
11986 # Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
11987 
11988   if test "x$BOOT_JDK_FOUND" = xno; then
11989     # Now execute the test
11990 
11991     # Extract the first word of "javac", so it can be a program name with args.
11992 set dummy javac; ac_word=$2
11993 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11994 $as_echo_n "checking for $ac_word... " >&6; }
11995 if ${ac_cv_path_JAVAC_CHECK+:} false; then :
11996   $as_echo_n "(cached) " >&6
11997 else
11998   case $JAVAC_CHECK in
11999   [\\/]* | ?:[\\/]*)
12000   ac_cv_path_JAVAC_CHECK="$JAVAC_CHECK" # Let the user override the test with a path.
12001   ;;
12002   *)
12003   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12004 for as_dir in $PATH
12005 do
12006   IFS=$as_save_IFS
12007   test -z "$as_dir" && as_dir=.
12008     for ac_exec_ext in '' $ac_executable_extensions; do
12009   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
12010     ac_cv_path_JAVAC_CHECK="$as_dir/$ac_word$ac_exec_ext"
12011     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12012     break 2
12013   fi
12014 done
12015   done
12016 IFS=$as_save_IFS
12017 
12018   ;;
12019 esac
12020 fi
12021 JAVAC_CHECK=$ac_cv_path_JAVAC_CHECK
12022 if test -n "$JAVAC_CHECK"; then
12023   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC_CHECK" >&5
12024 $as_echo "$JAVAC_CHECK" >&6; }
12025 else
12026   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12027 $as_echo "no" >&6; }
12028 fi
12029 
12030 
12031     # Extract the first word of "java", so it can be a program name with args.
12032 set dummy java; ac_word=$2
12033 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12034 $as_echo_n "checking for $ac_word... " >&6; }
12035 if ${ac_cv_path_JAVA_CHECK+:} false; then :
12036   $as_echo_n "(cached) " >&6
12037 else
12038   case $JAVA_CHECK in
12039   [\\/]* | ?:[\\/]*)
12040   ac_cv_path_JAVA_CHECK="$JAVA_CHECK" # Let the user override the test with a path.
12041   ;;
12042   *)
12043   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12044 for as_dir in $PATH
12045 do
12046   IFS=$as_save_IFS
12047   test -z "$as_dir" && as_dir=.
12048     for ac_exec_ext in '' $ac_executable_extensions; do
12049   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
12050     ac_cv_path_JAVA_CHECK="$as_dir/$ac_word$ac_exec_ext"
12051     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12052     break 2
12053   fi
12054 done
12055   done
12056 IFS=$as_save_IFS
12057 
12058   ;;
12059 esac
12060 fi
12061 JAVA_CHECK=$ac_cv_path_JAVA_CHECK
12062 if test -n "$JAVA_CHECK"; then
12063   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA_CHECK" >&5
12064 $as_echo "$JAVA_CHECK" >&6; }
12065 else
12066   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12067 $as_echo "no" >&6; }
12068 fi
12069 
12070 
12071     BINARY="$JAVAC_CHECK"
12072     if test "x$JAVAC_CHECK" = x; then
12073         BINARY="$JAVA_CHECK"
12074     fi
12075     if test "x$BINARY" != x; then
12076         # So there is a java(c) binary, it might be part of a JDK.
12077         # Lets find the JDK/JRE directory by following symbolic links.
12078         # Linux/GNU systems often have links from /usr/bin/java to
12079         # /etc/alternatives/java to the real JDK binary.
12080 
12081     if test "x$OPENJDK_BUILD_OS" != xwindows; then
12082         # Follow a chain of symbolic links. Use readlink
12083         # where it exists, else fall back to horribly
12084         # complicated shell code.
12085         if test "x$READLINK_TESTED" != yes; then
12086             # On MacOSX there is a readlink tool with a different
12087             # purpose than the GNU readlink tool. Check the found readlink.
12088             ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
12089             if test "x$ISGNU" = x; then
12090                  # A readlink that we do not know how to use.
12091                  # Are there other non-GNU readlinks out there?
12092                  READLINK_TESTED=yes
12093                  READLINK=
12094             fi
12095         fi
12096 
12097         if test "x$READLINK" != x; then
12098             BINARY=`$READLINK -f $BINARY`
12099         else
12100             # Save the current directory for restoring afterwards
12101             STARTDIR=$PWD
12102             COUNTER=0
12103             sym_link_dir=`$DIRNAME $BINARY`
12104             sym_link_file=`$BASENAME $BINARY`
12105             cd $sym_link_dir
12106             # Use -P flag to resolve symlinks in directories.
12107             cd `$THEPWDCMD -P`
12108             sym_link_dir=`$THEPWDCMD -P`
12109             # Resolve file symlinks
12110             while test $COUNTER -lt 20; do
12111                 ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
12112                 if test "x$ISLINK" == x; then
12113                     # This is not a symbolic link! We are done!
12114                     break
12115                 fi
12116                 # Again resolve directory symlinks since the target of the just found
12117                 # link could be in a different directory
12118                 cd `$DIRNAME $ISLINK`
12119                 sym_link_dir=`$THEPWDCMD -P`
12120                 sym_link_file=`$BASENAME $ISLINK`
12121                 let COUNTER=COUNTER+1
12122             done
12123             cd $STARTDIR
12124             BINARY=$sym_link_dir/$sym_link_file
12125         fi
12126     fi
12127 
12128         BOOT_JDK=`dirname "$BINARY"`
12129         BOOT_JDK=`cd "$BOOT_JDK/.."; pwd`
12130         if test -x "$BOOT_JDK/bin/javac" && test -x "$BOOT_JDK/bin/java"; then
12131             # Looks like we found ourselves an JDK
12132             BOOT_JDK_FOUND=maybe
12133             { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using java(c) in PATH" >&5
12134 $as_echo "$as_me: Found potential Boot JDK using java(c) in PATH" >&6;}
12135         fi
12136     fi
12137 
12138 
12139     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12140     if test "x$BOOT_JDK_FOUND" = xmaybe; then
12141       # Do we have a bin/java?
12142       if test ! -x "$BOOT_JDK/bin/java"; then
12143         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12144 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12145         BOOT_JDK_FOUND=no
12146       else
12147         # Do we have a bin/javac?
12148         if test ! -x "$BOOT_JDK/bin/javac"; then
12149           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12150 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12151           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12152 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12153           BOOT_JDK_FOUND=no
12154         else
12155           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12156           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12157             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12158 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12159             BOOT_JDK_FOUND=no
12160           else
12161             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12162             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12163 
12164             # Extra M4 quote needed to protect [] in grep expression.
12165             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12166             if test "x$FOUND_VERSION_78" = x; then
12167               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12168 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12169               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12170 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12171               BOOT_JDK_FOUND=no
12172             else
12173               # We're done! :-)
12174               BOOT_JDK_FOUND=yes
12175 
12176   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12177 
12178   # Input might be given as Windows format, start by converting to
12179   # unix format.
12180   path="$BOOT_JDK"
12181   new_path=`$CYGPATH -u "$path"`
12182 
12183   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12184   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12185   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12186   # "foo.exe" is OK but "foo" is an error.
12187   #
12188   # This test is therefore slightly more accurate than "test -f" to check for file precense.
12189   # It is also a way to make sure we got the proper file name for the real test later on.
12190   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12191   if test "x$test_shortpath" = x; then
12192     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12193 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12194     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12195   fi
12196 
12197   # Call helper function which possibly converts this using DOS-style short mode.
12198   # If so, the updated path is stored in $new_path.
12199 
12200   input_path="$new_path"
12201   # Check if we need to convert this using DOS-style short mode. If the path
12202   # contains just simple characters, use it. Otherwise (spaces, weird characters),
12203   # take no chances and rewrite it.
12204   # Note: m4 eats our [], so we need to use [ and ] instead.
12205   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12206   if test "x$has_forbidden_chars" != x; then
12207     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12208     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12209     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12210     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12211       # Going to short mode and back again did indeed matter. Since short mode is
12212       # case insensitive, let's make it lowercase to improve readability.
12213       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12214       # Now convert it back to Unix-stile (cygpath)
12215       input_path=`$CYGPATH -u "$shortmode_path"`
12216       new_path="$input_path"
12217     fi
12218   fi
12219 
12220   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12221   if test "x$test_cygdrive_prefix" = x; then
12222     # As a simple fix, exclude /usr/bin since it's not a real path.
12223     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12224       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12225       # a path prefixed by /cygdrive for fixpath to work.
12226       new_path="$CYGWIN_ROOT_PATH$input_path"
12227     fi
12228   fi
12229 
12230 
12231   if test "x$path" != "x$new_path"; then
12232     BOOT_JDK="$new_path"
12233     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12234 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12235   fi
12236 
12237   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12238 
12239   path="$BOOT_JDK"
12240   has_colon=`$ECHO $path | $GREP ^.:`
12241   new_path="$path"
12242   if test "x$has_colon" = x; then
12243     # Not in mixed or Windows style, start by that.
12244     new_path=`cmd //c echo $path`
12245   fi
12246 
12247 
12248   input_path="$new_path"
12249   # Check if we need to convert this using DOS-style short mode. If the path
12250   # contains just simple characters, use it. Otherwise (spaces, weird characters),
12251   # take no chances and rewrite it.
12252   # Note: m4 eats our [], so we need to use [ and ] instead.
12253   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12254   if test "x$has_forbidden_chars" != x; then
12255     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12256     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12257   fi
12258 
12259 
12260   windows_path="$new_path"
12261   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12262     unix_path=`$CYGPATH -u "$windows_path"`
12263     new_path="$unix_path"
12264   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12265     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12266     new_path="$unix_path"
12267   fi
12268 
12269   if test "x$path" != "x$new_path"; then
12270     BOOT_JDK="$new_path"
12271     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12272 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12273   fi
12274 
12275   # Save the first 10 bytes of this path to the storage, so fixpath can work.
12276   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12277 
12278   else
12279     # We're on a posix platform. Hooray! :)
12280     path="$BOOT_JDK"
12281     has_space=`$ECHO "$path" | $GREP " "`
12282     if test "x$has_space" != x; then
12283       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12284 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12285       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
12286     fi
12287 
12288     # Use eval to expand a potential ~
12289     eval path="$path"
12290     if test ! -f "$path" && test ! -d "$path"; then
12291       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
12292     fi
12293 
12294     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
12295   fi
12296 
12297               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12298 $as_echo_n "checking for Boot JDK... " >&6; }
12299               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12300 $as_echo "$BOOT_JDK" >&6; }
12301               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12302 $as_echo_n "checking Boot JDK version... " >&6; }
12303               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12304               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12305 $as_echo "$BOOT_JDK_VERSION" >&6; }
12306             fi # end check jdk version
12307           fi # end check rt.jar
12308         fi # end check javac
12309       fi # end check java
12310     fi # end check boot jdk found
12311   fi
12312 
12313 
12314 # Test: Is there a JDK installed in default, well-known locations?
12315 
12316   if test "x$BOOT_JDK_FOUND" = xno; then
12317     # Now execute the test
12318 
12319   if test "x$OPENJDK_TARGET_OS" = xwindows; then
12320 
12321   if test "x$BOOT_JDK_FOUND" = xno; then
12322     # Now execute the test
12323 
12324   if test "x$ProgramW6432" != x; then
12325     VIRTUAL_DIR="$ProgramW6432/Java"
12326 
12327   windows_path="$VIRTUAL_DIR"
12328   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12329     unix_path=`$CYGPATH -u "$windows_path"`
12330     VIRTUAL_DIR="$unix_path"
12331   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12332     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12333     VIRTUAL_DIR="$unix_path"
12334   fi
12335 
12336 
12337   BOOT_JDK_PREFIX="$VIRTUAL_DIR"
12338   BOOT_JDK_SUFFIX=""
12339   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
12340   if test "x$ALL_JDKS_FOUND" != x; then
12341     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
12342 
12343   if test "x$BOOT_JDK_FOUND" = xno; then
12344     # Now execute the test
12345 
12346         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
12347         if test -d "$BOOT_JDK"; then
12348           BOOT_JDK_FOUND=maybe
12349           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
12350 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
12351         fi
12352 
12353 
12354     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12355     if test "x$BOOT_JDK_FOUND" = xmaybe; then
12356       # Do we have a bin/java?
12357       if test ! -x "$BOOT_JDK/bin/java"; then
12358         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12359 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12360         BOOT_JDK_FOUND=no
12361       else
12362         # Do we have a bin/javac?
12363         if test ! -x "$BOOT_JDK/bin/javac"; then
12364           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12365 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12366           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12367 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12368           BOOT_JDK_FOUND=no
12369         else
12370           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12371           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12372             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12373 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12374             BOOT_JDK_FOUND=no
12375           else
12376             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12377             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12378 
12379             # Extra M4 quote needed to protect [] in grep expression.
12380             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12381             if test "x$FOUND_VERSION_78" = x; then
12382               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12383 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12384               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12385 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12386               BOOT_JDK_FOUND=no
12387             else
12388               # We're done! :-)
12389               BOOT_JDK_FOUND=yes
12390 
12391   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12392 
12393   # Input might be given as Windows format, start by converting to
12394   # unix format.
12395   path="$BOOT_JDK"
12396   new_path=`$CYGPATH -u "$path"`
12397 
12398   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12399   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12400   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12401   # "foo.exe" is OK but "foo" is an error.
12402   #
12403   # This test is therefore slightly more accurate than "test -f" to check for file precense.
12404   # It is also a way to make sure we got the proper file name for the real test later on.
12405   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12406   if test "x$test_shortpath" = x; then
12407     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12408 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12409     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12410   fi
12411 
12412   # Call helper function which possibly converts this using DOS-style short mode.
12413   # If so, the updated path is stored in $new_path.
12414 
12415   input_path="$new_path"
12416   # Check if we need to convert this using DOS-style short mode. If the path
12417   # contains just simple characters, use it. Otherwise (spaces, weird characters),
12418   # take no chances and rewrite it.
12419   # Note: m4 eats our [], so we need to use [ and ] instead.
12420   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12421   if test "x$has_forbidden_chars" != x; then
12422     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12423     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12424     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12425     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12426       # Going to short mode and back again did indeed matter. Since short mode is
12427       # case insensitive, let's make it lowercase to improve readability.
12428       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12429       # Now convert it back to Unix-stile (cygpath)
12430       input_path=`$CYGPATH -u "$shortmode_path"`
12431       new_path="$input_path"
12432     fi
12433   fi
12434 
12435   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12436   if test "x$test_cygdrive_prefix" = x; then
12437     # As a simple fix, exclude /usr/bin since it's not a real path.
12438     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12439       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12440       # a path prefixed by /cygdrive for fixpath to work.
12441       new_path="$CYGWIN_ROOT_PATH$input_path"
12442     fi
12443   fi
12444 
12445 
12446   if test "x$path" != "x$new_path"; then
12447     BOOT_JDK="$new_path"
12448     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12449 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12450   fi
12451 
12452   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12453 
12454   path="$BOOT_JDK"
12455   has_colon=`$ECHO $path | $GREP ^.:`
12456   new_path="$path"
12457   if test "x$has_colon" = x; then
12458     # Not in mixed or Windows style, start by that.
12459     new_path=`cmd //c echo $path`
12460   fi
12461 
12462 
12463   input_path="$new_path"
12464   # Check if we need to convert this using DOS-style short mode. If the path
12465   # contains just simple characters, use it. Otherwise (spaces, weird characters),
12466   # take no chances and rewrite it.
12467   # Note: m4 eats our [], so we need to use [ and ] instead.
12468   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12469   if test "x$has_forbidden_chars" != x; then
12470     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12471     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12472   fi
12473 
12474 
12475   windows_path="$new_path"
12476   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12477     unix_path=`$CYGPATH -u "$windows_path"`
12478     new_path="$unix_path"
12479   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12480     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12481     new_path="$unix_path"
12482   fi
12483 
12484   if test "x$path" != "x$new_path"; then
12485     BOOT_JDK="$new_path"
12486     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12487 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12488   fi
12489 
12490   # Save the first 10 bytes of this path to the storage, so fixpath can work.
12491   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12492 
12493   else
12494     # We're on a posix platform. Hooray! :)
12495     path="$BOOT_JDK"
12496     has_space=`$ECHO "$path" | $GREP " "`
12497     if test "x$has_space" != x; then
12498       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12499 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12500       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
12501     fi
12502 
12503     # Use eval to expand a potential ~
12504     eval path="$path"
12505     if test ! -f "$path" && test ! -d "$path"; then
12506       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
12507     fi
12508 
12509     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
12510   fi
12511 
12512               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12513 $as_echo_n "checking for Boot JDK... " >&6; }
12514               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12515 $as_echo "$BOOT_JDK" >&6; }
12516               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12517 $as_echo_n "checking Boot JDK version... " >&6; }
12518               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12519               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12520 $as_echo "$BOOT_JDK_VERSION" >&6; }
12521             fi # end check jdk version
12522           fi # end check rt.jar
12523         fi # end check javac
12524       fi # end check java
12525     fi # end check boot jdk found
12526   fi
12527 
12528     done
12529   fi
12530 
12531   fi
12532 
12533 
12534     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12535     if test "x$BOOT_JDK_FOUND" = xmaybe; then
12536       # Do we have a bin/java?
12537       if test ! -x "$BOOT_JDK/bin/java"; then
12538         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12539 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12540         BOOT_JDK_FOUND=no
12541       else
12542         # Do we have a bin/javac?
12543         if test ! -x "$BOOT_JDK/bin/javac"; then
12544           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12545 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12546           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12547 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12548           BOOT_JDK_FOUND=no
12549         else
12550           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12551           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12552             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12553 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12554             BOOT_JDK_FOUND=no
12555           else
12556             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12557             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12558 
12559             # Extra M4 quote needed to protect [] in grep expression.
12560             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12561             if test "x$FOUND_VERSION_78" = x; then
12562               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12563 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12564               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12565 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12566               BOOT_JDK_FOUND=no
12567             else
12568               # We're done! :-)
12569               BOOT_JDK_FOUND=yes
12570 
12571   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12572 
12573   # Input might be given as Windows format, start by converting to
12574   # unix format.
12575   path="$BOOT_JDK"
12576   new_path=`$CYGPATH -u "$path"`
12577 
12578   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12579   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12580   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12581   # "foo.exe" is OK but "foo" is an error.
12582   #
12583   # This test is therefore slightly more accurate than "test -f" to check for file precense.
12584   # It is also a way to make sure we got the proper file name for the real test later on.
12585   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12586   if test "x$test_shortpath" = x; then
12587     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12588 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12589     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12590   fi
12591 
12592   # Call helper function which possibly converts this using DOS-style short mode.
12593   # If so, the updated path is stored in $new_path.
12594 
12595   input_path="$new_path"
12596   # Check if we need to convert this using DOS-style short mode. If the path
12597   # contains just simple characters, use it. Otherwise (spaces, weird characters),
12598   # take no chances and rewrite it.
12599   # Note: m4 eats our [], so we need to use [ and ] instead.
12600   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12601   if test "x$has_forbidden_chars" != x; then
12602     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12603     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12604     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12605     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12606       # Going to short mode and back again did indeed matter. Since short mode is
12607       # case insensitive, let's make it lowercase to improve readability.
12608       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12609       # Now convert it back to Unix-stile (cygpath)
12610       input_path=`$CYGPATH -u "$shortmode_path"`
12611       new_path="$input_path"
12612     fi
12613   fi
12614 
12615   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12616   if test "x$test_cygdrive_prefix" = x; then
12617     # As a simple fix, exclude /usr/bin since it's not a real path.
12618     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12619       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12620       # a path prefixed by /cygdrive for fixpath to work.
12621       new_path="$CYGWIN_ROOT_PATH$input_path"
12622     fi
12623   fi
12624 
12625 
12626   if test "x$path" != "x$new_path"; then
12627     BOOT_JDK="$new_path"
12628     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12629 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12630   fi
12631 
12632   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12633 
12634   path="$BOOT_JDK"
12635   has_colon=`$ECHO $path | $GREP ^.:`
12636   new_path="$path"
12637   if test "x$has_colon" = x; then
12638     # Not in mixed or Windows style, start by that.
12639     new_path=`cmd //c echo $path`
12640   fi
12641 
12642 
12643   input_path="$new_path"
12644   # Check if we need to convert this using DOS-style short mode. If the path
12645   # contains just simple characters, use it. Otherwise (spaces, weird characters),
12646   # take no chances and rewrite it.
12647   # Note: m4 eats our [], so we need to use [ and ] instead.
12648   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12649   if test "x$has_forbidden_chars" != x; then
12650     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12651     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12652   fi
12653 
12654 
12655   windows_path="$new_path"
12656   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12657     unix_path=`$CYGPATH -u "$windows_path"`
12658     new_path="$unix_path"
12659   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12660     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12661     new_path="$unix_path"
12662   fi
12663 
12664   if test "x$path" != "x$new_path"; then
12665     BOOT_JDK="$new_path"
12666     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12667 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12668   fi
12669 
12670   # Save the first 10 bytes of this path to the storage, so fixpath can work.
12671   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12672 
12673   else
12674     # We're on a posix platform. Hooray! :)
12675     path="$BOOT_JDK"
12676     has_space=`$ECHO "$path" | $GREP " "`
12677     if test "x$has_space" != x; then
12678       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12679 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12680       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
12681     fi
12682 
12683     # Use eval to expand a potential ~
12684     eval path="$path"
12685     if test ! -f "$path" && test ! -d "$path"; then
12686       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
12687     fi
12688 
12689     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
12690   fi
12691 
12692               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12693 $as_echo_n "checking for Boot JDK... " >&6; }
12694               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12695 $as_echo "$BOOT_JDK" >&6; }
12696               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12697 $as_echo_n "checking Boot JDK version... " >&6; }
12698               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12699               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12700 $as_echo "$BOOT_JDK_VERSION" >&6; }
12701             fi # end check jdk version
12702           fi # end check rt.jar
12703         fi # end check javac
12704       fi # end check java
12705     fi # end check boot jdk found
12706   fi
12707 
12708 
12709   if test "x$BOOT_JDK_FOUND" = xno; then
12710     # Now execute the test
12711 
12712   if test "x$PROGRAMW6432" != x; then
12713     VIRTUAL_DIR="$PROGRAMW6432/Java"
12714 
12715   windows_path="$VIRTUAL_DIR"
12716   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12717     unix_path=`$CYGPATH -u "$windows_path"`
12718     VIRTUAL_DIR="$unix_path"
12719   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12720     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12721     VIRTUAL_DIR="$unix_path"
12722   fi
12723 
12724 
12725   BOOT_JDK_PREFIX="$VIRTUAL_DIR"
12726   BOOT_JDK_SUFFIX=""
12727   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
12728   if test "x$ALL_JDKS_FOUND" != x; then
12729     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
12730 
12731   if test "x$BOOT_JDK_FOUND" = xno; then
12732     # Now execute the test
12733 
12734         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
12735         if test -d "$BOOT_JDK"; then
12736           BOOT_JDK_FOUND=maybe
12737           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
12738 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
12739         fi
12740 
12741 
12742     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12743     if test "x$BOOT_JDK_FOUND" = xmaybe; then
12744       # Do we have a bin/java?
12745       if test ! -x "$BOOT_JDK/bin/java"; then
12746         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12747 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12748         BOOT_JDK_FOUND=no
12749       else
12750         # Do we have a bin/javac?
12751         if test ! -x "$BOOT_JDK/bin/javac"; then
12752           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12753 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12754           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12755 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12756           BOOT_JDK_FOUND=no
12757         else
12758           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12759           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12760             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12761 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12762             BOOT_JDK_FOUND=no
12763           else
12764             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12765             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12766 
12767             # Extra M4 quote needed to protect [] in grep expression.
12768             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12769             if test "x$FOUND_VERSION_78" = x; then
12770               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12771 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12772               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12773 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12774               BOOT_JDK_FOUND=no
12775             else
12776               # We're done! :-)
12777               BOOT_JDK_FOUND=yes
12778 
12779   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12780 
12781   # Input might be given as Windows format, start by converting to
12782   # unix format.
12783   path="$BOOT_JDK"
12784   new_path=`$CYGPATH -u "$path"`
12785 
12786   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12787   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12788   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12789   # "foo.exe" is OK but "foo" is an error.
12790   #
12791   # This test is therefore slightly more accurate than "test -f" to check for file precense.
12792   # It is also a way to make sure we got the proper file name for the real test later on.
12793   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12794   if test "x$test_shortpath" = x; then
12795     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12796 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12797     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12798   fi
12799 
12800   # Call helper function which possibly converts this using DOS-style short mode.
12801   # If so, the updated path is stored in $new_path.
12802 
12803   input_path="$new_path"
12804   # Check if we need to convert this using DOS-style short mode. If the path
12805   # contains just simple characters, use it. Otherwise (spaces, weird characters),
12806   # take no chances and rewrite it.
12807   # Note: m4 eats our [], so we need to use [ and ] instead.
12808   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12809   if test "x$has_forbidden_chars" != x; then
12810     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12811     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12812     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12813     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12814       # Going to short mode and back again did indeed matter. Since short mode is
12815       # case insensitive, let's make it lowercase to improve readability.
12816       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12817       # Now convert it back to Unix-stile (cygpath)
12818       input_path=`$CYGPATH -u "$shortmode_path"`
12819       new_path="$input_path"
12820     fi
12821   fi
12822 
12823   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12824   if test "x$test_cygdrive_prefix" = x; then
12825     # As a simple fix, exclude /usr/bin since it's not a real path.
12826     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12827       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12828       # a path prefixed by /cygdrive for fixpath to work.
12829       new_path="$CYGWIN_ROOT_PATH$input_path"
12830     fi
12831   fi
12832 
12833 
12834   if test "x$path" != "x$new_path"; then
12835     BOOT_JDK="$new_path"
12836     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12837 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12838   fi
12839 
12840   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12841 
12842   path="$BOOT_JDK"
12843   has_colon=`$ECHO $path | $GREP ^.:`
12844   new_path="$path"
12845   if test "x$has_colon" = x; then
12846     # Not in mixed or Windows style, start by that.
12847     new_path=`cmd //c echo $path`
12848   fi
12849 
12850 
12851   input_path="$new_path"
12852   # Check if we need to convert this using DOS-style short mode. If the path
12853   # contains just simple characters, use it. Otherwise (spaces, weird characters),
12854   # take no chances and rewrite it.
12855   # Note: m4 eats our [], so we need to use [ and ] instead.
12856   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12857   if test "x$has_forbidden_chars" != x; then
12858     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12859     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12860   fi
12861 
12862 
12863   windows_path="$new_path"
12864   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12865     unix_path=`$CYGPATH -u "$windows_path"`
12866     new_path="$unix_path"
12867   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12868     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12869     new_path="$unix_path"
12870   fi
12871 
12872   if test "x$path" != "x$new_path"; then
12873     BOOT_JDK="$new_path"
12874     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12875 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12876   fi
12877 
12878   # Save the first 10 bytes of this path to the storage, so fixpath can work.
12879   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12880 
12881   else
12882     # We're on a posix platform. Hooray! :)
12883     path="$BOOT_JDK"
12884     has_space=`$ECHO "$path" | $GREP " "`
12885     if test "x$has_space" != x; then
12886       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12887 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12888       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
12889     fi
12890 
12891     # Use eval to expand a potential ~
12892     eval path="$path"
12893     if test ! -f "$path" && test ! -d "$path"; then
12894       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
12895     fi
12896 
12897     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
12898   fi
12899 
12900               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12901 $as_echo_n "checking for Boot JDK... " >&6; }
12902               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12903 $as_echo "$BOOT_JDK" >&6; }
12904               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12905 $as_echo_n "checking Boot JDK version... " >&6; }
12906               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12907               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12908 $as_echo "$BOOT_JDK_VERSION" >&6; }
12909             fi # end check jdk version
12910           fi # end check rt.jar
12911         fi # end check javac
12912       fi # end check java
12913     fi # end check boot jdk found
12914   fi
12915 
12916     done
12917   fi
12918 
12919   fi
12920 
12921 
12922     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12923     if test "x$BOOT_JDK_FOUND" = xmaybe; then
12924       # Do we have a bin/java?
12925       if test ! -x "$BOOT_JDK/bin/java"; then
12926         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12927 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12928         BOOT_JDK_FOUND=no
12929       else
12930         # Do we have a bin/javac?
12931         if test ! -x "$BOOT_JDK/bin/javac"; then
12932           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12933 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12934           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12935 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12936           BOOT_JDK_FOUND=no
12937         else
12938           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12939           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12940             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12941 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12942             BOOT_JDK_FOUND=no
12943           else
12944             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12945             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12946 
12947             # Extra M4 quote needed to protect [] in grep expression.
12948             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12949             if test "x$FOUND_VERSION_78" = x; then
12950               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12951 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12952               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12953 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12954               BOOT_JDK_FOUND=no
12955             else
12956               # We're done! :-)
12957               BOOT_JDK_FOUND=yes
12958 
12959   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12960 
12961   # Input might be given as Windows format, start by converting to
12962   # unix format.
12963   path="$BOOT_JDK"
12964   new_path=`$CYGPATH -u "$path"`
12965 
12966   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12967   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12968   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12969   # "foo.exe" is OK but "foo" is an error.
12970   #
12971   # This test is therefore slightly more accurate than "test -f" to check for file precense.
12972   # It is also a way to make sure we got the proper file name for the real test later on.
12973   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12974   if test "x$test_shortpath" = x; then
12975     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12976 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12977     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12978   fi
12979 
12980   # Call helper function which possibly converts this using DOS-style short mode.
12981   # If so, the updated path is stored in $new_path.
12982 
12983   input_path="$new_path"
12984   # Check if we need to convert this using DOS-style short mode. If the path
12985   # contains just simple characters, use it. Otherwise (spaces, weird characters),
12986   # take no chances and rewrite it.
12987   # Note: m4 eats our [], so we need to use [ and ] instead.
12988   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12989   if test "x$has_forbidden_chars" != x; then
12990     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12991     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12992     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12993     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12994       # Going to short mode and back again did indeed matter. Since short mode is
12995       # case insensitive, let's make it lowercase to improve readability.
12996       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12997       # Now convert it back to Unix-stile (cygpath)
12998       input_path=`$CYGPATH -u "$shortmode_path"`
12999       new_path="$input_path"
13000     fi
13001   fi
13002 
13003   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13004   if test "x$test_cygdrive_prefix" = x; then
13005     # As a simple fix, exclude /usr/bin since it's not a real path.
13006     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13007       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13008       # a path prefixed by /cygdrive for fixpath to work.
13009       new_path="$CYGWIN_ROOT_PATH$input_path"
13010     fi
13011   fi
13012 
13013 
13014   if test "x$path" != "x$new_path"; then
13015     BOOT_JDK="$new_path"
13016     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13017 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13018   fi
13019 
13020   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13021 
13022   path="$BOOT_JDK"
13023   has_colon=`$ECHO $path | $GREP ^.:`
13024   new_path="$path"
13025   if test "x$has_colon" = x; then
13026     # Not in mixed or Windows style, start by that.
13027     new_path=`cmd //c echo $path`
13028   fi
13029 
13030 
13031   input_path="$new_path"
13032   # Check if we need to convert this using DOS-style short mode. If the path
13033   # contains just simple characters, use it. Otherwise (spaces, weird characters),
13034   # take no chances and rewrite it.
13035   # Note: m4 eats our [], so we need to use [ and ] instead.
13036   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13037   if test "x$has_forbidden_chars" != x; then
13038     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13039     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13040   fi
13041 
13042 
13043   windows_path="$new_path"
13044   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13045     unix_path=`$CYGPATH -u "$windows_path"`
13046     new_path="$unix_path"
13047   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13048     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13049     new_path="$unix_path"
13050   fi
13051 
13052   if test "x$path" != "x$new_path"; then
13053     BOOT_JDK="$new_path"
13054     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13055 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13056   fi
13057 
13058   # Save the first 10 bytes of this path to the storage, so fixpath can work.
13059   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13060 
13061   else
13062     # We're on a posix platform. Hooray! :)
13063     path="$BOOT_JDK"
13064     has_space=`$ECHO "$path" | $GREP " "`
13065     if test "x$has_space" != x; then
13066       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13067 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13068       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13069     fi
13070 
13071     # Use eval to expand a potential ~
13072     eval path="$path"
13073     if test ! -f "$path" && test ! -d "$path"; then
13074       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13075     fi
13076 
13077     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
13078   fi
13079 
13080               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13081 $as_echo_n "checking for Boot JDK... " >&6; }
13082               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13083 $as_echo "$BOOT_JDK" >&6; }
13084               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13085 $as_echo_n "checking Boot JDK version... " >&6; }
13086               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13087               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13088 $as_echo "$BOOT_JDK_VERSION" >&6; }
13089             fi # end check jdk version
13090           fi # end check rt.jar
13091         fi # end check javac
13092       fi # end check java
13093     fi # end check boot jdk found
13094   fi
13095 
13096 
13097   if test "x$BOOT_JDK_FOUND" = xno; then
13098     # Now execute the test
13099 
13100   if test "x$PROGRAMFILES" != x; then
13101     VIRTUAL_DIR="$PROGRAMFILES/Java"
13102 
13103   windows_path="$VIRTUAL_DIR"
13104   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13105     unix_path=`$CYGPATH -u "$windows_path"`
13106     VIRTUAL_DIR="$unix_path"
13107   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13108     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13109     VIRTUAL_DIR="$unix_path"
13110   fi
13111 
13112 
13113   BOOT_JDK_PREFIX="$VIRTUAL_DIR"
13114   BOOT_JDK_SUFFIX=""
13115   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
13116   if test "x$ALL_JDKS_FOUND" != x; then
13117     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
13118 
13119   if test "x$BOOT_JDK_FOUND" = xno; then
13120     # Now execute the test
13121 
13122         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
13123         if test -d "$BOOT_JDK"; then
13124           BOOT_JDK_FOUND=maybe
13125           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
13126 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
13127         fi
13128 
13129 
13130     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13131     if test "x$BOOT_JDK_FOUND" = xmaybe; then
13132       # Do we have a bin/java?
13133       if test ! -x "$BOOT_JDK/bin/java"; then
13134         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13135 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13136         BOOT_JDK_FOUND=no
13137       else
13138         # Do we have a bin/javac?
13139         if test ! -x "$BOOT_JDK/bin/javac"; then
13140           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13141 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13142           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13143 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13144           BOOT_JDK_FOUND=no
13145         else
13146           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13147           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13148             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13149 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13150             BOOT_JDK_FOUND=no
13151           else
13152             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13153             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13154 
13155             # Extra M4 quote needed to protect [] in grep expression.
13156             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13157             if test "x$FOUND_VERSION_78" = x; then
13158               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13159 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13160               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13161 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13162               BOOT_JDK_FOUND=no
13163             else
13164               # We're done! :-)
13165               BOOT_JDK_FOUND=yes
13166 
13167   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13168 
13169   # Input might be given as Windows format, start by converting to
13170   # unix format.
13171   path="$BOOT_JDK"
13172   new_path=`$CYGPATH -u "$path"`
13173 
13174   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13175   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13176   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13177   # "foo.exe" is OK but "foo" is an error.
13178   #
13179   # This test is therefore slightly more accurate than "test -f" to check for file precense.
13180   # It is also a way to make sure we got the proper file name for the real test later on.
13181   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13182   if test "x$test_shortpath" = x; then
13183     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13184 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13185     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13186   fi
13187 
13188   # Call helper function which possibly converts this using DOS-style short mode.
13189   # If so, the updated path is stored in $new_path.
13190 
13191   input_path="$new_path"
13192   # Check if we need to convert this using DOS-style short mode. If the path
13193   # contains just simple characters, use it. Otherwise (spaces, weird characters),
13194   # take no chances and rewrite it.
13195   # Note: m4 eats our [], so we need to use [ and ] instead.
13196   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13197   if test "x$has_forbidden_chars" != x; then
13198     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13199     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13200     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13201     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13202       # Going to short mode and back again did indeed matter. Since short mode is
13203       # case insensitive, let's make it lowercase to improve readability.
13204       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13205       # Now convert it back to Unix-stile (cygpath)
13206       input_path=`$CYGPATH -u "$shortmode_path"`
13207       new_path="$input_path"
13208     fi
13209   fi
13210 
13211   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13212   if test "x$test_cygdrive_prefix" = x; then
13213     # As a simple fix, exclude /usr/bin since it's not a real path.
13214     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13215       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13216       # a path prefixed by /cygdrive for fixpath to work.
13217       new_path="$CYGWIN_ROOT_PATH$input_path"
13218     fi
13219   fi
13220 
13221 
13222   if test "x$path" != "x$new_path"; then
13223     BOOT_JDK="$new_path"
13224     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13225 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13226   fi
13227 
13228   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13229 
13230   path="$BOOT_JDK"
13231   has_colon=`$ECHO $path | $GREP ^.:`
13232   new_path="$path"
13233   if test "x$has_colon" = x; then
13234     # Not in mixed or Windows style, start by that.
13235     new_path=`cmd //c echo $path`
13236   fi
13237 
13238 
13239   input_path="$new_path"
13240   # Check if we need to convert this using DOS-style short mode. If the path
13241   # contains just simple characters, use it. Otherwise (spaces, weird characters),
13242   # take no chances and rewrite it.
13243   # Note: m4 eats our [], so we need to use [ and ] instead.
13244   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13245   if test "x$has_forbidden_chars" != x; then
13246     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13247     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13248   fi
13249 
13250 
13251   windows_path="$new_path"
13252   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13253     unix_path=`$CYGPATH -u "$windows_path"`
13254     new_path="$unix_path"
13255   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13256     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13257     new_path="$unix_path"
13258   fi
13259 
13260   if test "x$path" != "x$new_path"; then
13261     BOOT_JDK="$new_path"
13262     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13263 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13264   fi
13265 
13266   # Save the first 10 bytes of this path to the storage, so fixpath can work.
13267   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13268 
13269   else
13270     # We're on a posix platform. Hooray! :)
13271     path="$BOOT_JDK"
13272     has_space=`$ECHO "$path" | $GREP " "`
13273     if test "x$has_space" != x; then
13274       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13275 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13276       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13277     fi
13278 
13279     # Use eval to expand a potential ~
13280     eval path="$path"
13281     if test ! -f "$path" && test ! -d "$path"; then
13282       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13283     fi
13284 
13285     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
13286   fi
13287 
13288               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13289 $as_echo_n "checking for Boot JDK... " >&6; }
13290               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13291 $as_echo "$BOOT_JDK" >&6; }
13292               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13293 $as_echo_n "checking Boot JDK version... " >&6; }
13294               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13295               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13296 $as_echo "$BOOT_JDK_VERSION" >&6; }
13297             fi # end check jdk version
13298           fi # end check rt.jar
13299         fi # end check javac
13300       fi # end check java
13301     fi # end check boot jdk found
13302   fi
13303 
13304     done
13305   fi
13306 
13307   fi
13308 
13309 
13310     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13311     if test "x$BOOT_JDK_FOUND" = xmaybe; then
13312       # Do we have a bin/java?
13313       if test ! -x "$BOOT_JDK/bin/java"; then
13314         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13315 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13316         BOOT_JDK_FOUND=no
13317       else
13318         # Do we have a bin/javac?
13319         if test ! -x "$BOOT_JDK/bin/javac"; then
13320           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13321 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13322           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13323 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13324           BOOT_JDK_FOUND=no
13325         else
13326           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13327           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13328             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13329 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13330             BOOT_JDK_FOUND=no
13331           else
13332             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13333             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13334 
13335             # Extra M4 quote needed to protect [] in grep expression.
13336             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13337             if test "x$FOUND_VERSION_78" = x; then
13338               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13339 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13340               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13341 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13342               BOOT_JDK_FOUND=no
13343             else
13344               # We're done! :-)
13345               BOOT_JDK_FOUND=yes
13346 
13347   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13348 
13349   # Input might be given as Windows format, start by converting to
13350   # unix format.
13351   path="$BOOT_JDK"
13352   new_path=`$CYGPATH -u "$path"`
13353 
13354   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13355   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13356   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13357   # "foo.exe" is OK but "foo" is an error.
13358   #
13359   # This test is therefore slightly more accurate than "test -f" to check for file precense.
13360   # It is also a way to make sure we got the proper file name for the real test later on.
13361   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13362   if test "x$test_shortpath" = x; then
13363     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13364 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13365     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13366   fi
13367 
13368   # Call helper function which possibly converts this using DOS-style short mode.
13369   # If so, the updated path is stored in $new_path.
13370 
13371   input_path="$new_path"
13372   # Check if we need to convert this using DOS-style short mode. If the path
13373   # contains just simple characters, use it. Otherwise (spaces, weird characters),
13374   # take no chances and rewrite it.
13375   # Note: m4 eats our [], so we need to use [ and ] instead.
13376   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13377   if test "x$has_forbidden_chars" != x; then
13378     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13379     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13380     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13381     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13382       # Going to short mode and back again did indeed matter. Since short mode is
13383       # case insensitive, let's make it lowercase to improve readability.
13384       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13385       # Now convert it back to Unix-stile (cygpath)
13386       input_path=`$CYGPATH -u "$shortmode_path"`
13387       new_path="$input_path"
13388     fi
13389   fi
13390 
13391   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13392   if test "x$test_cygdrive_prefix" = x; then
13393     # As a simple fix, exclude /usr/bin since it's not a real path.
13394     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13395       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13396       # a path prefixed by /cygdrive for fixpath to work.
13397       new_path="$CYGWIN_ROOT_PATH$input_path"
13398     fi
13399   fi
13400 
13401 
13402   if test "x$path" != "x$new_path"; then
13403     BOOT_JDK="$new_path"
13404     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13405 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13406   fi
13407 
13408   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13409 
13410   path="$BOOT_JDK"
13411   has_colon=`$ECHO $path | $GREP ^.:`
13412   new_path="$path"
13413   if test "x$has_colon" = x; then
13414     # Not in mixed or Windows style, start by that.
13415     new_path=`cmd //c echo $path`
13416   fi
13417 
13418 
13419   input_path="$new_path"
13420   # Check if we need to convert this using DOS-style short mode. If the path
13421   # contains just simple characters, use it. Otherwise (spaces, weird characters),
13422   # take no chances and rewrite it.
13423   # Note: m4 eats our [], so we need to use [ and ] instead.
13424   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13425   if test "x$has_forbidden_chars" != x; then
13426     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13427     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13428   fi
13429 
13430 
13431   windows_path="$new_path"
13432   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13433     unix_path=`$CYGPATH -u "$windows_path"`
13434     new_path="$unix_path"
13435   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13436     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13437     new_path="$unix_path"
13438   fi
13439 
13440   if test "x$path" != "x$new_path"; then
13441     BOOT_JDK="$new_path"
13442     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13443 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13444   fi
13445 
13446   # Save the first 10 bytes of this path to the storage, so fixpath can work.
13447   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13448 
13449   else
13450     # We're on a posix platform. Hooray! :)
13451     path="$BOOT_JDK"
13452     has_space=`$ECHO "$path" | $GREP " "`
13453     if test "x$has_space" != x; then
13454       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13455 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13456       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13457     fi
13458 
13459     # Use eval to expand a potential ~
13460     eval path="$path"
13461     if test ! -f "$path" && test ! -d "$path"; then
13462       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13463     fi
13464 
13465     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
13466   fi
13467 
13468               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13469 $as_echo_n "checking for Boot JDK... " >&6; }
13470               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13471 $as_echo "$BOOT_JDK" >&6; }
13472               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13473 $as_echo_n "checking Boot JDK version... " >&6; }
13474               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13475               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13476 $as_echo "$BOOT_JDK_VERSION" >&6; }
13477             fi # end check jdk version
13478           fi # end check rt.jar
13479         fi # end check javac
13480       fi # end check java
13481     fi # end check boot jdk found
13482   fi
13483 
13484 
13485   if test "x$BOOT_JDK_FOUND" = xno; then
13486     # Now execute the test
13487 
13488   if test "x$ProgramFiles" != x; then
13489     VIRTUAL_DIR="$ProgramFiles/Java"
13490 
13491   windows_path="$VIRTUAL_DIR"
13492   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13493     unix_path=`$CYGPATH -u "$windows_path"`
13494     VIRTUAL_DIR="$unix_path"
13495   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13496     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13497     VIRTUAL_DIR="$unix_path"
13498   fi
13499 
13500 
13501   BOOT_JDK_PREFIX="$VIRTUAL_DIR"
13502   BOOT_JDK_SUFFIX=""
13503   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
13504   if test "x$ALL_JDKS_FOUND" != x; then
13505     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
13506 
13507   if test "x$BOOT_JDK_FOUND" = xno; then
13508     # Now execute the test
13509 
13510         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
13511         if test -d "$BOOT_JDK"; then
13512           BOOT_JDK_FOUND=maybe
13513           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
13514 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
13515         fi
13516 
13517 
13518     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13519     if test "x$BOOT_JDK_FOUND" = xmaybe; then
13520       # Do we have a bin/java?
13521       if test ! -x "$BOOT_JDK/bin/java"; then
13522         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13523 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13524         BOOT_JDK_FOUND=no
13525       else
13526         # Do we have a bin/javac?
13527         if test ! -x "$BOOT_JDK/bin/javac"; then
13528           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13529 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13530           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13531 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13532           BOOT_JDK_FOUND=no
13533         else
13534           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13535           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13536             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13537 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13538             BOOT_JDK_FOUND=no
13539           else
13540             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13541             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13542 
13543             # Extra M4 quote needed to protect [] in grep expression.
13544             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13545             if test "x$FOUND_VERSION_78" = x; then
13546               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13547 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13548               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13549 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13550               BOOT_JDK_FOUND=no
13551             else
13552               # We're done! :-)
13553               BOOT_JDK_FOUND=yes
13554 
13555   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13556 
13557   # Input might be given as Windows format, start by converting to
13558   # unix format.
13559   path="$BOOT_JDK"
13560   new_path=`$CYGPATH -u "$path"`
13561 
13562   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13563   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13564   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13565   # "foo.exe" is OK but "foo" is an error.
13566   #
13567   # This test is therefore slightly more accurate than "test -f" to check for file precense.
13568   # It is also a way to make sure we got the proper file name for the real test later on.
13569   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13570   if test "x$test_shortpath" = x; then
13571     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13572 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13573     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13574   fi
13575 
13576   # Call helper function which possibly converts this using DOS-style short mode.
13577   # If so, the updated path is stored in $new_path.
13578 
13579   input_path="$new_path"
13580   # Check if we need to convert this using DOS-style short mode. If the path
13581   # contains just simple characters, use it. Otherwise (spaces, weird characters),
13582   # take no chances and rewrite it.
13583   # Note: m4 eats our [], so we need to use [ and ] instead.
13584   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13585   if test "x$has_forbidden_chars" != x; then
13586     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13587     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13588     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13589     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13590       # Going to short mode and back again did indeed matter. Since short mode is
13591       # case insensitive, let's make it lowercase to improve readability.
13592       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13593       # Now convert it back to Unix-stile (cygpath)
13594       input_path=`$CYGPATH -u "$shortmode_path"`
13595       new_path="$input_path"
13596     fi
13597   fi
13598 
13599   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13600   if test "x$test_cygdrive_prefix" = x; then
13601     # As a simple fix, exclude /usr/bin since it's not a real path.
13602     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13603       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13604       # a path prefixed by /cygdrive for fixpath to work.
13605       new_path="$CYGWIN_ROOT_PATH$input_path"
13606     fi
13607   fi
13608 
13609 
13610   if test "x$path" != "x$new_path"; then
13611     BOOT_JDK="$new_path"
13612     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13613 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13614   fi
13615 
13616   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13617 
13618   path="$BOOT_JDK"
13619   has_colon=`$ECHO $path | $GREP ^.:`
13620   new_path="$path"
13621   if test "x$has_colon" = x; then
13622     # Not in mixed or Windows style, start by that.
13623     new_path=`cmd //c echo $path`
13624   fi
13625 
13626 
13627   input_path="$new_path"
13628   # Check if we need to convert this using DOS-style short mode. If the path
13629   # contains just simple characters, use it. Otherwise (spaces, weird characters),
13630   # take no chances and rewrite it.
13631   # Note: m4 eats our [], so we need to use [ and ] instead.
13632   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13633   if test "x$has_forbidden_chars" != x; then
13634     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13635     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13636   fi
13637 
13638 
13639   windows_path="$new_path"
13640   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13641     unix_path=`$CYGPATH -u "$windows_path"`
13642     new_path="$unix_path"
13643   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13644     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13645     new_path="$unix_path"
13646   fi
13647 
13648   if test "x$path" != "x$new_path"; then
13649     BOOT_JDK="$new_path"
13650     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13651 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13652   fi
13653 
13654   # Save the first 10 bytes of this path to the storage, so fixpath can work.
13655   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13656 
13657   else
13658     # We're on a posix platform. Hooray! :)
13659     path="$BOOT_JDK"
13660     has_space=`$ECHO "$path" | $GREP " "`
13661     if test "x$has_space" != x; then
13662       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13663 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13664       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13665     fi
13666 
13667     # Use eval to expand a potential ~
13668     eval path="$path"
13669     if test ! -f "$path" && test ! -d "$path"; then
13670       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13671     fi
13672 
13673     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
13674   fi
13675 
13676               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13677 $as_echo_n "checking for Boot JDK... " >&6; }
13678               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13679 $as_echo "$BOOT_JDK" >&6; }
13680               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13681 $as_echo_n "checking Boot JDK version... " >&6; }
13682               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13683               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13684 $as_echo "$BOOT_JDK_VERSION" >&6; }
13685             fi # end check jdk version
13686           fi # end check rt.jar
13687         fi # end check javac
13688       fi # end check java
13689     fi # end check boot jdk found
13690   fi
13691 
13692     done
13693   fi
13694 
13695   fi
13696 
13697 
13698     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13699     if test "x$BOOT_JDK_FOUND" = xmaybe; then
13700       # Do we have a bin/java?
13701       if test ! -x "$BOOT_JDK/bin/java"; then
13702         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13703 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13704         BOOT_JDK_FOUND=no
13705       else
13706         # Do we have a bin/javac?
13707         if test ! -x "$BOOT_JDK/bin/javac"; then
13708           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13709 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13710           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13711 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13712           BOOT_JDK_FOUND=no
13713         else
13714           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13715           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13716             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13717 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13718             BOOT_JDK_FOUND=no
13719           else
13720             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13721             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13722 
13723             # Extra M4 quote needed to protect [] in grep expression.
13724             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13725             if test "x$FOUND_VERSION_78" = x; then
13726               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13727 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13728               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13729 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13730               BOOT_JDK_FOUND=no
13731             else
13732               # We're done! :-)
13733               BOOT_JDK_FOUND=yes
13734 
13735   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13736 
13737   # Input might be given as Windows format, start by converting to
13738   # unix format.
13739   path="$BOOT_JDK"
13740   new_path=`$CYGPATH -u "$path"`
13741 
13742   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13743   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13744   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13745   # "foo.exe" is OK but "foo" is an error.
13746   #
13747   # This test is therefore slightly more accurate than "test -f" to check for file precense.
13748   # It is also a way to make sure we got the proper file name for the real test later on.
13749   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13750   if test "x$test_shortpath" = x; then
13751     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13752 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13753     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13754   fi
13755 
13756   # Call helper function which possibly converts this using DOS-style short mode.
13757   # If so, the updated path is stored in $new_path.
13758 
13759   input_path="$new_path"
13760   # Check if we need to convert this using DOS-style short mode. If the path
13761   # contains just simple characters, use it. Otherwise (spaces, weird characters),
13762   # take no chances and rewrite it.
13763   # Note: m4 eats our [], so we need to use [ and ] instead.
13764   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13765   if test "x$has_forbidden_chars" != x; then
13766     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13767     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13768     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13769     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13770       # Going to short mode and back again did indeed matter. Since short mode is
13771       # case insensitive, let's make it lowercase to improve readability.
13772       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13773       # Now convert it back to Unix-stile (cygpath)
13774       input_path=`$CYGPATH -u "$shortmode_path"`
13775       new_path="$input_path"
13776     fi
13777   fi
13778 
13779   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13780   if test "x$test_cygdrive_prefix" = x; then
13781     # As a simple fix, exclude /usr/bin since it's not a real path.
13782     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13783       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13784       # a path prefixed by /cygdrive for fixpath to work.
13785       new_path="$CYGWIN_ROOT_PATH$input_path"
13786     fi
13787   fi
13788 
13789 
13790   if test "x$path" != "x$new_path"; then
13791     BOOT_JDK="$new_path"
13792     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13793 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13794   fi
13795 
13796   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13797 
13798   path="$BOOT_JDK"
13799   has_colon=`$ECHO $path | $GREP ^.:`
13800   new_path="$path"
13801   if test "x$has_colon" = x; then
13802     # Not in mixed or Windows style, start by that.
13803     new_path=`cmd //c echo $path`
13804   fi
13805 
13806 
13807   input_path="$new_path"
13808   # Check if we need to convert this using DOS-style short mode. If the path
13809   # contains just simple characters, use it. Otherwise (spaces, weird characters),
13810   # take no chances and rewrite it.
13811   # Note: m4 eats our [], so we need to use [ and ] instead.
13812   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13813   if test "x$has_forbidden_chars" != x; then
13814     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13815     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13816   fi
13817 
13818 
13819   windows_path="$new_path"
13820   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13821     unix_path=`$CYGPATH -u "$windows_path"`
13822     new_path="$unix_path"
13823   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13824     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13825     new_path="$unix_path"
13826   fi
13827 
13828   if test "x$path" != "x$new_path"; then
13829     BOOT_JDK="$new_path"
13830     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13831 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13832   fi
13833 
13834   # Save the first 10 bytes of this path to the storage, so fixpath can work.
13835   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13836 
13837   else
13838     # We're on a posix platform. Hooray! :)
13839     path="$BOOT_JDK"
13840     has_space=`$ECHO "$path" | $GREP " "`
13841     if test "x$has_space" != x; then
13842       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13843 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13844       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13845     fi
13846 
13847     # Use eval to expand a potential ~
13848     eval path="$path"
13849     if test ! -f "$path" && test ! -d "$path"; then
13850       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13851     fi
13852 
13853     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
13854   fi
13855 
13856               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13857 $as_echo_n "checking for Boot JDK... " >&6; }
13858               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13859 $as_echo "$BOOT_JDK" >&6; }
13860               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13861 $as_echo_n "checking Boot JDK version... " >&6; }
13862               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13863               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13864 $as_echo "$BOOT_JDK_VERSION" >&6; }
13865             fi # end check jdk version
13866           fi # end check rt.jar
13867         fi # end check javac
13868       fi # end check java
13869     fi # end check boot jdk found
13870   fi
13871 
13872 
13873   if test "x$BOOT_JDK_FOUND" = xno; then
13874     # Now execute the test
13875 
13876   BOOT_JDK_PREFIX="/cygdrive/c/Program Files/Java"
13877   BOOT_JDK_SUFFIX=""
13878   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
13879   if test "x$ALL_JDKS_FOUND" != x; then
13880     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
13881 
13882   if test "x$BOOT_JDK_FOUND" = xno; then
13883     # Now execute the test
13884 
13885         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
13886         if test -d "$BOOT_JDK"; then
13887           BOOT_JDK_FOUND=maybe
13888           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
13889 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
13890         fi
13891 
13892 
13893     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13894     if test "x$BOOT_JDK_FOUND" = xmaybe; then
13895       # Do we have a bin/java?
13896       if test ! -x "$BOOT_JDK/bin/java"; then
13897         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13898 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13899         BOOT_JDK_FOUND=no
13900       else
13901         # Do we have a bin/javac?
13902         if test ! -x "$BOOT_JDK/bin/javac"; then
13903           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13904 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13905           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13906 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13907           BOOT_JDK_FOUND=no
13908         else
13909           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13910           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13911             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13912 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13913             BOOT_JDK_FOUND=no
13914           else
13915             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13916             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13917 
13918             # Extra M4 quote needed to protect [] in grep expression.
13919             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13920             if test "x$FOUND_VERSION_78" = x; then
13921               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13922 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13923               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13924 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13925               BOOT_JDK_FOUND=no
13926             else
13927               # We're done! :-)
13928               BOOT_JDK_FOUND=yes
13929 
13930   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13931 
13932   # Input might be given as Windows format, start by converting to
13933   # unix format.
13934   path="$BOOT_JDK"
13935   new_path=`$CYGPATH -u "$path"`
13936 
13937   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13938   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13939   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13940   # "foo.exe" is OK but "foo" is an error.
13941   #
13942   # This test is therefore slightly more accurate than "test -f" to check for file precense.
13943   # It is also a way to make sure we got the proper file name for the real test later on.
13944   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13945   if test "x$test_shortpath" = x; then
13946     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13947 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13948     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13949   fi
13950 
13951   # Call helper function which possibly converts this using DOS-style short mode.
13952   # If so, the updated path is stored in $new_path.
13953 
13954   input_path="$new_path"
13955   # Check if we need to convert this using DOS-style short mode. If the path
13956   # contains just simple characters, use it. Otherwise (spaces, weird characters),
13957   # take no chances and rewrite it.
13958   # Note: m4 eats our [], so we need to use [ and ] instead.
13959   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13960   if test "x$has_forbidden_chars" != x; then
13961     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13962     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13963     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13964     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13965       # Going to short mode and back again did indeed matter. Since short mode is
13966       # case insensitive, let's make it lowercase to improve readability.
13967       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13968       # Now convert it back to Unix-stile (cygpath)
13969       input_path=`$CYGPATH -u "$shortmode_path"`
13970       new_path="$input_path"
13971     fi
13972   fi
13973 
13974   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13975   if test "x$test_cygdrive_prefix" = x; then
13976     # As a simple fix, exclude /usr/bin since it's not a real path.
13977     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13978       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13979       # a path prefixed by /cygdrive for fixpath to work.
13980       new_path="$CYGWIN_ROOT_PATH$input_path"
13981     fi
13982   fi
13983 
13984 
13985   if test "x$path" != "x$new_path"; then
13986     BOOT_JDK="$new_path"
13987     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13988 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13989   fi
13990 
13991   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13992 
13993   path="$BOOT_JDK"
13994   has_colon=`$ECHO $path | $GREP ^.:`
13995   new_path="$path"
13996   if test "x$has_colon" = x; then
13997     # Not in mixed or Windows style, start by that.
13998     new_path=`cmd //c echo $path`
13999   fi
14000 
14001 
14002   input_path="$new_path"
14003   # Check if we need to convert this using DOS-style short mode. If the path
14004   # contains just simple characters, use it. Otherwise (spaces, weird characters),
14005   # take no chances and rewrite it.
14006   # Note: m4 eats our [], so we need to use [ and ] instead.
14007   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14008   if test "x$has_forbidden_chars" != x; then
14009     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14010     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14011   fi
14012 
14013 
14014   windows_path="$new_path"
14015   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14016     unix_path=`$CYGPATH -u "$windows_path"`
14017     new_path="$unix_path"
14018   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14019     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14020     new_path="$unix_path"
14021   fi
14022 
14023   if test "x$path" != "x$new_path"; then
14024     BOOT_JDK="$new_path"
14025     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14026 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14027   fi
14028 
14029   # Save the first 10 bytes of this path to the storage, so fixpath can work.
14030   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14031 
14032   else
14033     # We're on a posix platform. Hooray! :)
14034     path="$BOOT_JDK"
14035     has_space=`$ECHO "$path" | $GREP " "`
14036     if test "x$has_space" != x; then
14037       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14038 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14039       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14040     fi
14041 
14042     # Use eval to expand a potential ~
14043     eval path="$path"
14044     if test ! -f "$path" && test ! -d "$path"; then
14045       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14046     fi
14047 
14048     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
14049   fi
14050 
14051               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14052 $as_echo_n "checking for Boot JDK... " >&6; }
14053               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14054 $as_echo "$BOOT_JDK" >&6; }
14055               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14056 $as_echo_n "checking Boot JDK version... " >&6; }
14057               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14058               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14059 $as_echo "$BOOT_JDK_VERSION" >&6; }
14060             fi # end check jdk version
14061           fi # end check rt.jar
14062         fi # end check javac
14063       fi # end check java
14064     fi # end check boot jdk found
14065   fi
14066 
14067     done
14068   fi
14069 
14070 
14071     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14072     if test "x$BOOT_JDK_FOUND" = xmaybe; then
14073       # Do we have a bin/java?
14074       if test ! -x "$BOOT_JDK/bin/java"; then
14075         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14076 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14077         BOOT_JDK_FOUND=no
14078       else
14079         # Do we have a bin/javac?
14080         if test ! -x "$BOOT_JDK/bin/javac"; then
14081           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14082 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14083           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14084 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14085           BOOT_JDK_FOUND=no
14086         else
14087           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14088           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14089             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14090 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14091             BOOT_JDK_FOUND=no
14092           else
14093             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14094             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14095 
14096             # Extra M4 quote needed to protect [] in grep expression.
14097             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14098             if test "x$FOUND_VERSION_78" = x; then
14099               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14100 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14101               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14102 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14103               BOOT_JDK_FOUND=no
14104             else
14105               # We're done! :-)
14106               BOOT_JDK_FOUND=yes
14107 
14108   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14109 
14110   # Input might be given as Windows format, start by converting to
14111   # unix format.
14112   path="$BOOT_JDK"
14113   new_path=`$CYGPATH -u "$path"`
14114 
14115   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14116   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14117   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14118   # "foo.exe" is OK but "foo" is an error.
14119   #
14120   # This test is therefore slightly more accurate than "test -f" to check for file precense.
14121   # It is also a way to make sure we got the proper file name for the real test later on.
14122   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14123   if test "x$test_shortpath" = x; then
14124     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14125 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14126     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14127   fi
14128 
14129   # Call helper function which possibly converts this using DOS-style short mode.
14130   # If so, the updated path is stored in $new_path.
14131 
14132   input_path="$new_path"
14133   # Check if we need to convert this using DOS-style short mode. If the path
14134   # contains just simple characters, use it. Otherwise (spaces, weird characters),
14135   # take no chances and rewrite it.
14136   # Note: m4 eats our [], so we need to use [ and ] instead.
14137   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14138   if test "x$has_forbidden_chars" != x; then
14139     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14140     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14141     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14142     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14143       # Going to short mode and back again did indeed matter. Since short mode is
14144       # case insensitive, let's make it lowercase to improve readability.
14145       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14146       # Now convert it back to Unix-stile (cygpath)
14147       input_path=`$CYGPATH -u "$shortmode_path"`
14148       new_path="$input_path"
14149     fi
14150   fi
14151 
14152   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14153   if test "x$test_cygdrive_prefix" = x; then
14154     # As a simple fix, exclude /usr/bin since it's not a real path.
14155     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14156       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14157       # a path prefixed by /cygdrive for fixpath to work.
14158       new_path="$CYGWIN_ROOT_PATH$input_path"
14159     fi
14160   fi
14161 
14162 
14163   if test "x$path" != "x$new_path"; then
14164     BOOT_JDK="$new_path"
14165     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14166 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14167   fi
14168 
14169   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14170 
14171   path="$BOOT_JDK"
14172   has_colon=`$ECHO $path | $GREP ^.:`
14173   new_path="$path"
14174   if test "x$has_colon" = x; then
14175     # Not in mixed or Windows style, start by that.
14176     new_path=`cmd //c echo $path`
14177   fi
14178 
14179 
14180   input_path="$new_path"
14181   # Check if we need to convert this using DOS-style short mode. If the path
14182   # contains just simple characters, use it. Otherwise (spaces, weird characters),
14183   # take no chances and rewrite it.
14184   # Note: m4 eats our [], so we need to use [ and ] instead.
14185   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14186   if test "x$has_forbidden_chars" != x; then
14187     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14188     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14189   fi
14190 
14191 
14192   windows_path="$new_path"
14193   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14194     unix_path=`$CYGPATH -u "$windows_path"`
14195     new_path="$unix_path"
14196   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14197     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14198     new_path="$unix_path"
14199   fi
14200 
14201   if test "x$path" != "x$new_path"; then
14202     BOOT_JDK="$new_path"
14203     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14204 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14205   fi
14206 
14207   # Save the first 10 bytes of this path to the storage, so fixpath can work.
14208   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14209 
14210   else
14211     # We're on a posix platform. Hooray! :)
14212     path="$BOOT_JDK"
14213     has_space=`$ECHO "$path" | $GREP " "`
14214     if test "x$has_space" != x; then
14215       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14216 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14217       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14218     fi
14219 
14220     # Use eval to expand a potential ~
14221     eval path="$path"
14222     if test ! -f "$path" && test ! -d "$path"; then
14223       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14224     fi
14225 
14226     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
14227   fi
14228 
14229               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14230 $as_echo_n "checking for Boot JDK... " >&6; }
14231               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14232 $as_echo "$BOOT_JDK" >&6; }
14233               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14234 $as_echo_n "checking Boot JDK version... " >&6; }
14235               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14236               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14237 $as_echo "$BOOT_JDK_VERSION" >&6; }
14238             fi # end check jdk version
14239           fi # end check rt.jar
14240         fi # end check javac
14241       fi # end check java
14242     fi # end check boot jdk found
14243   fi
14244 
14245   elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
14246 
14247   if test "x$BOOT_JDK_FOUND" = xno; then
14248     # Now execute the test
14249 
14250   BOOT_JDK_PREFIX="/Library/Java/JavaVirtualMachines"
14251   BOOT_JDK_SUFFIX="/Contents/Home"
14252   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
14253   if test "x$ALL_JDKS_FOUND" != x; then
14254     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
14255 
14256   if test "x$BOOT_JDK_FOUND" = xno; then
14257     # Now execute the test
14258 
14259         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
14260         if test -d "$BOOT_JDK"; then
14261           BOOT_JDK_FOUND=maybe
14262           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
14263 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
14264         fi
14265 
14266 
14267     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14268     if test "x$BOOT_JDK_FOUND" = xmaybe; then
14269       # Do we have a bin/java?
14270       if test ! -x "$BOOT_JDK/bin/java"; then
14271         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14272 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14273         BOOT_JDK_FOUND=no
14274       else
14275         # Do we have a bin/javac?
14276         if test ! -x "$BOOT_JDK/bin/javac"; then
14277           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14278 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14279           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14280 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14281           BOOT_JDK_FOUND=no
14282         else
14283           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14284           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14285             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14286 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14287             BOOT_JDK_FOUND=no
14288           else
14289             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14290             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14291 
14292             # Extra M4 quote needed to protect [] in grep expression.
14293             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14294             if test "x$FOUND_VERSION_78" = x; then
14295               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14296 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14297               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14298 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14299               BOOT_JDK_FOUND=no
14300             else
14301               # We're done! :-)
14302               BOOT_JDK_FOUND=yes
14303 
14304   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14305 
14306   # Input might be given as Windows format, start by converting to
14307   # unix format.
14308   path="$BOOT_JDK"
14309   new_path=`$CYGPATH -u "$path"`
14310 
14311   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14312   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14313   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14314   # "foo.exe" is OK but "foo" is an error.
14315   #
14316   # This test is therefore slightly more accurate than "test -f" to check for file precense.
14317   # It is also a way to make sure we got the proper file name for the real test later on.
14318   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14319   if test "x$test_shortpath" = x; then
14320     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14321 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14322     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14323   fi
14324 
14325   # Call helper function which possibly converts this using DOS-style short mode.
14326   # If so, the updated path is stored in $new_path.
14327 
14328   input_path="$new_path"
14329   # Check if we need to convert this using DOS-style short mode. If the path
14330   # contains just simple characters, use it. Otherwise (spaces, weird characters),
14331   # take no chances and rewrite it.
14332   # Note: m4 eats our [], so we need to use [ and ] instead.
14333   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14334   if test "x$has_forbidden_chars" != x; then
14335     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14336     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14337     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14338     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14339       # Going to short mode and back again did indeed matter. Since short mode is
14340       # case insensitive, let's make it lowercase to improve readability.
14341       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14342       # Now convert it back to Unix-stile (cygpath)
14343       input_path=`$CYGPATH -u "$shortmode_path"`
14344       new_path="$input_path"
14345     fi
14346   fi
14347 
14348   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14349   if test "x$test_cygdrive_prefix" = x; then
14350     # As a simple fix, exclude /usr/bin since it's not a real path.
14351     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14352       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14353       # a path prefixed by /cygdrive for fixpath to work.
14354       new_path="$CYGWIN_ROOT_PATH$input_path"
14355     fi
14356   fi
14357 
14358 
14359   if test "x$path" != "x$new_path"; then
14360     BOOT_JDK="$new_path"
14361     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14362 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14363   fi
14364 
14365   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14366 
14367   path="$BOOT_JDK"
14368   has_colon=`$ECHO $path | $GREP ^.:`
14369   new_path="$path"
14370   if test "x$has_colon" = x; then
14371     # Not in mixed or Windows style, start by that.
14372     new_path=`cmd //c echo $path`
14373   fi
14374 
14375 
14376   input_path="$new_path"
14377   # Check if we need to convert this using DOS-style short mode. If the path
14378   # contains just simple characters, use it. Otherwise (spaces, weird characters),
14379   # take no chances and rewrite it.
14380   # Note: m4 eats our [], so we need to use [ and ] instead.
14381   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14382   if test "x$has_forbidden_chars" != x; then
14383     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14384     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14385   fi
14386 
14387 
14388   windows_path="$new_path"
14389   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14390     unix_path=`$CYGPATH -u "$windows_path"`
14391     new_path="$unix_path"
14392   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14393     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14394     new_path="$unix_path"
14395   fi
14396 
14397   if test "x$path" != "x$new_path"; then
14398     BOOT_JDK="$new_path"
14399     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14400 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14401   fi
14402 
14403   # Save the first 10 bytes of this path to the storage, so fixpath can work.
14404   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14405 
14406   else
14407     # We're on a posix platform. Hooray! :)
14408     path="$BOOT_JDK"
14409     has_space=`$ECHO "$path" | $GREP " "`
14410     if test "x$has_space" != x; then
14411       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14412 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14413       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14414     fi
14415 
14416     # Use eval to expand a potential ~
14417     eval path="$path"
14418     if test ! -f "$path" && test ! -d "$path"; then
14419       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14420     fi
14421 
14422     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
14423   fi
14424 
14425               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14426 $as_echo_n "checking for Boot JDK... " >&6; }
14427               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14428 $as_echo "$BOOT_JDK" >&6; }
14429               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14430 $as_echo_n "checking Boot JDK version... " >&6; }
14431               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14432               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14433 $as_echo "$BOOT_JDK_VERSION" >&6; }
14434             fi # end check jdk version
14435           fi # end check rt.jar
14436         fi # end check javac
14437       fi # end check java
14438     fi # end check boot jdk found
14439   fi
14440 
14441     done
14442   fi
14443 
14444 
14445     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14446     if test "x$BOOT_JDK_FOUND" = xmaybe; then
14447       # Do we have a bin/java?
14448       if test ! -x "$BOOT_JDK/bin/java"; then
14449         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14450 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14451         BOOT_JDK_FOUND=no
14452       else
14453         # Do we have a bin/javac?
14454         if test ! -x "$BOOT_JDK/bin/javac"; then
14455           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14456 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14457           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14458 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14459           BOOT_JDK_FOUND=no
14460         else
14461           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14462           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14463             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14464 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14465             BOOT_JDK_FOUND=no
14466           else
14467             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14468             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14469 
14470             # Extra M4 quote needed to protect [] in grep expression.
14471             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14472             if test "x$FOUND_VERSION_78" = x; then
14473               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14474 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14475               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14476 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14477               BOOT_JDK_FOUND=no
14478             else
14479               # We're done! :-)
14480               BOOT_JDK_FOUND=yes
14481 
14482   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14483 
14484   # Input might be given as Windows format, start by converting to
14485   # unix format.
14486   path="$BOOT_JDK"
14487   new_path=`$CYGPATH -u "$path"`
14488 
14489   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14490   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14491   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14492   # "foo.exe" is OK but "foo" is an error.
14493   #
14494   # This test is therefore slightly more accurate than "test -f" to check for file precense.
14495   # It is also a way to make sure we got the proper file name for the real test later on.
14496   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14497   if test "x$test_shortpath" = x; then
14498     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14499 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14500     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14501   fi
14502 
14503   # Call helper function which possibly converts this using DOS-style short mode.
14504   # If so, the updated path is stored in $new_path.
14505 
14506   input_path="$new_path"
14507   # Check if we need to convert this using DOS-style short mode. If the path
14508   # contains just simple characters, use it. Otherwise (spaces, weird characters),
14509   # take no chances and rewrite it.
14510   # Note: m4 eats our [], so we need to use [ and ] instead.
14511   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14512   if test "x$has_forbidden_chars" != x; then
14513     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14514     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14515     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14516     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14517       # Going to short mode and back again did indeed matter. Since short mode is
14518       # case insensitive, let's make it lowercase to improve readability.
14519       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14520       # Now convert it back to Unix-stile (cygpath)
14521       input_path=`$CYGPATH -u "$shortmode_path"`
14522       new_path="$input_path"
14523     fi
14524   fi
14525 
14526   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14527   if test "x$test_cygdrive_prefix" = x; then
14528     # As a simple fix, exclude /usr/bin since it's not a real path.
14529     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14530       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14531       # a path prefixed by /cygdrive for fixpath to work.
14532       new_path="$CYGWIN_ROOT_PATH$input_path"
14533     fi
14534   fi
14535 
14536 
14537   if test "x$path" != "x$new_path"; then
14538     BOOT_JDK="$new_path"
14539     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14540 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14541   fi
14542 
14543   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14544 
14545   path="$BOOT_JDK"
14546   has_colon=`$ECHO $path | $GREP ^.:`
14547   new_path="$path"
14548   if test "x$has_colon" = x; then
14549     # Not in mixed or Windows style, start by that.
14550     new_path=`cmd //c echo $path`
14551   fi
14552 
14553 
14554   input_path="$new_path"
14555   # Check if we need to convert this using DOS-style short mode. If the path
14556   # contains just simple characters, use it. Otherwise (spaces, weird characters),
14557   # take no chances and rewrite it.
14558   # Note: m4 eats our [], so we need to use [ and ] instead.
14559   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14560   if test "x$has_forbidden_chars" != x; then
14561     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14562     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14563   fi
14564 
14565 
14566   windows_path="$new_path"
14567   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14568     unix_path=`$CYGPATH -u "$windows_path"`
14569     new_path="$unix_path"
14570   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14571     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14572     new_path="$unix_path"
14573   fi
14574 
14575   if test "x$path" != "x$new_path"; then
14576     BOOT_JDK="$new_path"
14577     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14578 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14579   fi
14580 
14581   # Save the first 10 bytes of this path to the storage, so fixpath can work.
14582   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14583 
14584   else
14585     # We're on a posix platform. Hooray! :)
14586     path="$BOOT_JDK"
14587     has_space=`$ECHO "$path" | $GREP " "`
14588     if test "x$has_space" != x; then
14589       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14590 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14591       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14592     fi
14593 
14594     # Use eval to expand a potential ~
14595     eval path="$path"
14596     if test ! -f "$path" && test ! -d "$path"; then
14597       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14598     fi
14599 
14600     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
14601   fi
14602 
14603               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14604 $as_echo_n "checking for Boot JDK... " >&6; }
14605               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14606 $as_echo "$BOOT_JDK" >&6; }
14607               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14608 $as_echo_n "checking Boot JDK version... " >&6; }
14609               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14610               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14611 $as_echo "$BOOT_JDK_VERSION" >&6; }
14612             fi # end check jdk version
14613           fi # end check rt.jar
14614         fi # end check javac
14615       fi # end check java
14616     fi # end check boot jdk found
14617   fi
14618 
14619 
14620   if test "x$BOOT_JDK_FOUND" = xno; then
14621     # Now execute the test
14622 
14623   BOOT_JDK_PREFIX="/System/Library/Java/JavaVirtualMachines"
14624   BOOT_JDK_SUFFIX="/Contents/Home"
14625   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
14626   if test "x$ALL_JDKS_FOUND" != x; then
14627     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
14628 
14629   if test "x$BOOT_JDK_FOUND" = xno; then
14630     # Now execute the test
14631 
14632         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
14633         if test -d "$BOOT_JDK"; then
14634           BOOT_JDK_FOUND=maybe
14635           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
14636 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
14637         fi
14638 
14639 
14640     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14641     if test "x$BOOT_JDK_FOUND" = xmaybe; then
14642       # Do we have a bin/java?
14643       if test ! -x "$BOOT_JDK/bin/java"; then
14644         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14645 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14646         BOOT_JDK_FOUND=no
14647       else
14648         # Do we have a bin/javac?
14649         if test ! -x "$BOOT_JDK/bin/javac"; then
14650           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14651 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14652           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14653 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14654           BOOT_JDK_FOUND=no
14655         else
14656           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14657           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14658             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14659 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14660             BOOT_JDK_FOUND=no
14661           else
14662             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14663             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14664 
14665             # Extra M4 quote needed to protect [] in grep expression.
14666             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14667             if test "x$FOUND_VERSION_78" = x; then
14668               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14669 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14670               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14671 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14672               BOOT_JDK_FOUND=no
14673             else
14674               # We're done! :-)
14675               BOOT_JDK_FOUND=yes
14676 
14677   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14678 
14679   # Input might be given as Windows format, start by converting to
14680   # unix format.
14681   path="$BOOT_JDK"
14682   new_path=`$CYGPATH -u "$path"`
14683 
14684   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14685   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14686   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14687   # "foo.exe" is OK but "foo" is an error.
14688   #
14689   # This test is therefore slightly more accurate than "test -f" to check for file precense.
14690   # It is also a way to make sure we got the proper file name for the real test later on.
14691   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14692   if test "x$test_shortpath" = x; then
14693     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14694 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14695     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14696   fi
14697 
14698   # Call helper function which possibly converts this using DOS-style short mode.
14699   # If so, the updated path is stored in $new_path.
14700 
14701   input_path="$new_path"
14702   # Check if we need to convert this using DOS-style short mode. If the path
14703   # contains just simple characters, use it. Otherwise (spaces, weird characters),
14704   # take no chances and rewrite it.
14705   # Note: m4 eats our [], so we need to use [ and ] instead.
14706   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14707   if test "x$has_forbidden_chars" != x; then
14708     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14709     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14710     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14711     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14712       # Going to short mode and back again did indeed matter. Since short mode is
14713       # case insensitive, let's make it lowercase to improve readability.
14714       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14715       # Now convert it back to Unix-stile (cygpath)
14716       input_path=`$CYGPATH -u "$shortmode_path"`
14717       new_path="$input_path"
14718     fi
14719   fi
14720 
14721   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14722   if test "x$test_cygdrive_prefix" = x; then
14723     # As a simple fix, exclude /usr/bin since it's not a real path.
14724     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14725       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14726       # a path prefixed by /cygdrive for fixpath to work.
14727       new_path="$CYGWIN_ROOT_PATH$input_path"
14728     fi
14729   fi
14730 
14731 
14732   if test "x$path" != "x$new_path"; then
14733     BOOT_JDK="$new_path"
14734     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14735 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14736   fi
14737 
14738   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14739 
14740   path="$BOOT_JDK"
14741   has_colon=`$ECHO $path | $GREP ^.:`
14742   new_path="$path"
14743   if test "x$has_colon" = x; then
14744     # Not in mixed or Windows style, start by that.
14745     new_path=`cmd //c echo $path`
14746   fi
14747 
14748 
14749   input_path="$new_path"
14750   # Check if we need to convert this using DOS-style short mode. If the path
14751   # contains just simple characters, use it. Otherwise (spaces, weird characters),
14752   # take no chances and rewrite it.
14753   # Note: m4 eats our [], so we need to use [ and ] instead.
14754   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14755   if test "x$has_forbidden_chars" != x; then
14756     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14757     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14758   fi
14759 
14760 
14761   windows_path="$new_path"
14762   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14763     unix_path=`$CYGPATH -u "$windows_path"`
14764     new_path="$unix_path"
14765   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14766     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14767     new_path="$unix_path"
14768   fi
14769 
14770   if test "x$path" != "x$new_path"; then
14771     BOOT_JDK="$new_path"
14772     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14773 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14774   fi
14775 
14776   # Save the first 10 bytes of this path to the storage, so fixpath can work.
14777   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14778 
14779   else
14780     # We're on a posix platform. Hooray! :)
14781     path="$BOOT_JDK"
14782     has_space=`$ECHO "$path" | $GREP " "`
14783     if test "x$has_space" != x; then
14784       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14785 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14786       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14787     fi
14788 
14789     # Use eval to expand a potential ~
14790     eval path="$path"
14791     if test ! -f "$path" && test ! -d "$path"; then
14792       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14793     fi
14794 
14795     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
14796   fi
14797 
14798               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14799 $as_echo_n "checking for Boot JDK... " >&6; }
14800               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14801 $as_echo "$BOOT_JDK" >&6; }
14802               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14803 $as_echo_n "checking Boot JDK version... " >&6; }
14804               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14805               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14806 $as_echo "$BOOT_JDK_VERSION" >&6; }
14807             fi # end check jdk version
14808           fi # end check rt.jar
14809         fi # end check javac
14810       fi # end check java
14811     fi # end check boot jdk found
14812   fi
14813 
14814     done
14815   fi
14816 
14817 
14818     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14819     if test "x$BOOT_JDK_FOUND" = xmaybe; then
14820       # Do we have a bin/java?
14821       if test ! -x "$BOOT_JDK/bin/java"; then
14822         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14823 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14824         BOOT_JDK_FOUND=no
14825       else
14826         # Do we have a bin/javac?
14827         if test ! -x "$BOOT_JDK/bin/javac"; then
14828           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14829 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14830           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14831 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14832           BOOT_JDK_FOUND=no
14833         else
14834           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14835           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14836             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14837 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14838             BOOT_JDK_FOUND=no
14839           else
14840             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14841             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14842 
14843             # Extra M4 quote needed to protect [] in grep expression.
14844             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14845             if test "x$FOUND_VERSION_78" = x; then
14846               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14847 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14848               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14849 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14850               BOOT_JDK_FOUND=no
14851             else
14852               # We're done! :-)
14853               BOOT_JDK_FOUND=yes
14854 
14855   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14856 
14857   # Input might be given as Windows format, start by converting to
14858   # unix format.
14859   path="$BOOT_JDK"
14860   new_path=`$CYGPATH -u "$path"`
14861 
14862   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14863   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14864   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14865   # "foo.exe" is OK but "foo" is an error.
14866   #
14867   # This test is therefore slightly more accurate than "test -f" to check for file precense.
14868   # It is also a way to make sure we got the proper file name for the real test later on.
14869   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14870   if test "x$test_shortpath" = x; then
14871     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14872 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14873     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14874   fi
14875 
14876   # Call helper function which possibly converts this using DOS-style short mode.
14877   # If so, the updated path is stored in $new_path.
14878 
14879   input_path="$new_path"
14880   # Check if we need to convert this using DOS-style short mode. If the path
14881   # contains just simple characters, use it. Otherwise (spaces, weird characters),
14882   # take no chances and rewrite it.
14883   # Note: m4 eats our [], so we need to use [ and ] instead.
14884   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14885   if test "x$has_forbidden_chars" != x; then
14886     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14887     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14888     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14889     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14890       # Going to short mode and back again did indeed matter. Since short mode is
14891       # case insensitive, let's make it lowercase to improve readability.
14892       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14893       # Now convert it back to Unix-stile (cygpath)
14894       input_path=`$CYGPATH -u "$shortmode_path"`
14895       new_path="$input_path"
14896     fi
14897   fi
14898 
14899   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14900   if test "x$test_cygdrive_prefix" = x; then
14901     # As a simple fix, exclude /usr/bin since it's not a real path.
14902     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14903       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14904       # a path prefixed by /cygdrive for fixpath to work.
14905       new_path="$CYGWIN_ROOT_PATH$input_path"
14906     fi
14907   fi
14908 
14909 
14910   if test "x$path" != "x$new_path"; then
14911     BOOT_JDK="$new_path"
14912     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14913 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14914   fi
14915 
14916   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14917 
14918   path="$BOOT_JDK"
14919   has_colon=`$ECHO $path | $GREP ^.:`
14920   new_path="$path"
14921   if test "x$has_colon" = x; then
14922     # Not in mixed or Windows style, start by that.
14923     new_path=`cmd //c echo $path`
14924   fi
14925 
14926 
14927   input_path="$new_path"
14928   # Check if we need to convert this using DOS-style short mode. If the path
14929   # contains just simple characters, use it. Otherwise (spaces, weird characters),
14930   # take no chances and rewrite it.
14931   # Note: m4 eats our [], so we need to use [ and ] instead.
14932   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14933   if test "x$has_forbidden_chars" != x; then
14934     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14935     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14936   fi
14937 
14938 
14939   windows_path="$new_path"
14940   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14941     unix_path=`$CYGPATH -u "$windows_path"`
14942     new_path="$unix_path"
14943   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14944     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14945     new_path="$unix_path"
14946   fi
14947 
14948   if test "x$path" != "x$new_path"; then
14949     BOOT_JDK="$new_path"
14950     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14951 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14952   fi
14953 
14954   # Save the first 10 bytes of this path to the storage, so fixpath can work.
14955   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14956 
14957   else
14958     # We're on a posix platform. Hooray! :)
14959     path="$BOOT_JDK"
14960     has_space=`$ECHO "$path" | $GREP " "`
14961     if test "x$has_space" != x; then
14962       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14963 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14964       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14965     fi
14966 
14967     # Use eval to expand a potential ~
14968     eval path="$path"
14969     if test ! -f "$path" && test ! -d "$path"; then
14970       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14971     fi
14972 
14973     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
14974   fi
14975 
14976               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14977 $as_echo_n "checking for Boot JDK... " >&6; }
14978               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14979 $as_echo "$BOOT_JDK" >&6; }
14980               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14981 $as_echo_n "checking Boot JDK version... " >&6; }
14982               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14983               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14984 $as_echo "$BOOT_JDK_VERSION" >&6; }
14985             fi # end check jdk version
14986           fi # end check rt.jar
14987         fi # end check javac
14988       fi # end check java
14989     fi # end check boot jdk found
14990   fi
14991 
14992   elif test "x$OPENJDK_TARGET_OS" = xlinux; then
14993 
14994   if test "x$BOOT_JDK_FOUND" = xno; then
14995     # Now execute the test
14996 
14997   BOOT_JDK_PREFIX="/usr/lib/jvm"
14998   BOOT_JDK_SUFFIX=""
14999   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
15000   if test "x$ALL_JDKS_FOUND" != x; then
15001     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
15002 
15003   if test "x$BOOT_JDK_FOUND" = xno; then
15004     # Now execute the test
15005 
15006         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
15007         if test -d "$BOOT_JDK"; then
15008           BOOT_JDK_FOUND=maybe
15009           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
15010 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
15011         fi
15012 
15013 
15014     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
15015     if test "x$BOOT_JDK_FOUND" = xmaybe; then
15016       # Do we have a bin/java?
15017       if test ! -x "$BOOT_JDK/bin/java"; then
15018         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
15019 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
15020         BOOT_JDK_FOUND=no
15021       else
15022         # Do we have a bin/javac?
15023         if test ! -x "$BOOT_JDK/bin/javac"; then
15024           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
15025 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
15026           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
15027 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
15028           BOOT_JDK_FOUND=no
15029         else
15030           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
15031           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
15032             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
15033 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
15034             BOOT_JDK_FOUND=no
15035           else
15036             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
15037             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
15038 
15039             # Extra M4 quote needed to protect [] in grep expression.
15040             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
15041             if test "x$FOUND_VERSION_78" = x; then
15042               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
15043 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
15044               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
15045 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
15046               BOOT_JDK_FOUND=no
15047             else
15048               # We're done! :-)
15049               BOOT_JDK_FOUND=yes
15050 
15051   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15052 
15053   # Input might be given as Windows format, start by converting to
15054   # unix format.
15055   path="$BOOT_JDK"
15056   new_path=`$CYGPATH -u "$path"`
15057 
15058   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15059   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15060   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15061   # "foo.exe" is OK but "foo" is an error.
15062   #
15063   # This test is therefore slightly more accurate than "test -f" to check for file precense.
15064   # It is also a way to make sure we got the proper file name for the real test later on.
15065   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15066   if test "x$test_shortpath" = x; then
15067     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15068 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15069     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
15070   fi
15071 
15072   # Call helper function which possibly converts this using DOS-style short mode.
15073   # If so, the updated path is stored in $new_path.
15074 
15075   input_path="$new_path"
15076   # Check if we need to convert this using DOS-style short mode. If the path
15077   # contains just simple characters, use it. Otherwise (spaces, weird characters),
15078   # take no chances and rewrite it.
15079   # Note: m4 eats our [], so we need to use [ and ] instead.
15080   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15081   if test "x$has_forbidden_chars" != x; then
15082     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15083     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15084     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15085     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15086       # Going to short mode and back again did indeed matter. Since short mode is
15087       # case insensitive, let's make it lowercase to improve readability.
15088       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15089       # Now convert it back to Unix-stile (cygpath)
15090       input_path=`$CYGPATH -u "$shortmode_path"`
15091       new_path="$input_path"
15092     fi
15093   fi
15094 
15095   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15096   if test "x$test_cygdrive_prefix" = x; then
15097     # As a simple fix, exclude /usr/bin since it's not a real path.
15098     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15099       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15100       # a path prefixed by /cygdrive for fixpath to work.
15101       new_path="$CYGWIN_ROOT_PATH$input_path"
15102     fi
15103   fi
15104 
15105 
15106   if test "x$path" != "x$new_path"; then
15107     BOOT_JDK="$new_path"
15108     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15109 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15110   fi
15111 
15112   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15113 
15114   path="$BOOT_JDK"
15115   has_colon=`$ECHO $path | $GREP ^.:`
15116   new_path="$path"
15117   if test "x$has_colon" = x; then
15118     # Not in mixed or Windows style, start by that.
15119     new_path=`cmd //c echo $path`
15120   fi
15121 
15122 
15123   input_path="$new_path"
15124   # Check if we need to convert this using DOS-style short mode. If the path
15125   # contains just simple characters, use it. Otherwise (spaces, weird characters),
15126   # take no chances and rewrite it.
15127   # Note: m4 eats our [], so we need to use [ and ] instead.
15128   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15129   if test "x$has_forbidden_chars" != x; then
15130     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15131     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15132   fi
15133 
15134 
15135   windows_path="$new_path"
15136   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15137     unix_path=`$CYGPATH -u "$windows_path"`
15138     new_path="$unix_path"
15139   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15140     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15141     new_path="$unix_path"
15142   fi
15143 
15144   if test "x$path" != "x$new_path"; then
15145     BOOT_JDK="$new_path"
15146     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15147 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15148   fi
15149 
15150   # Save the first 10 bytes of this path to the storage, so fixpath can work.
15151   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15152 
15153   else
15154     # We're on a posix platform. Hooray! :)
15155     path="$BOOT_JDK"
15156     has_space=`$ECHO "$path" | $GREP " "`
15157     if test "x$has_space" != x; then
15158       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15159 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15160       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15161     fi
15162 
15163     # Use eval to expand a potential ~
15164     eval path="$path"
15165     if test ! -f "$path" && test ! -d "$path"; then
15166       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
15167     fi
15168 
15169     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
15170   fi
15171 
15172               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
15173 $as_echo_n "checking for Boot JDK... " >&6; }
15174               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
15175 $as_echo "$BOOT_JDK" >&6; }
15176               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
15177 $as_echo_n "checking Boot JDK version... " >&6; }
15178               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
15179               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
15180 $as_echo "$BOOT_JDK_VERSION" >&6; }
15181             fi # end check jdk version
15182           fi # end check rt.jar
15183         fi # end check javac
15184       fi # end check java
15185     fi # end check boot jdk found
15186   fi
15187 
15188     done
15189   fi
15190 
15191 
15192     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
15193     if test "x$BOOT_JDK_FOUND" = xmaybe; then
15194       # Do we have a bin/java?
15195       if test ! -x "$BOOT_JDK/bin/java"; then
15196         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
15197 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
15198         BOOT_JDK_FOUND=no
15199       else
15200         # Do we have a bin/javac?
15201         if test ! -x "$BOOT_JDK/bin/javac"; then
15202           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
15203 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
15204           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
15205 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
15206           BOOT_JDK_FOUND=no
15207         else
15208           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
15209           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
15210             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
15211 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
15212             BOOT_JDK_FOUND=no
15213           else
15214             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
15215             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
15216 
15217             # Extra M4 quote needed to protect [] in grep expression.
15218             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
15219             if test "x$FOUND_VERSION_78" = x; then
15220               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
15221 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
15222               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
15223 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
15224               BOOT_JDK_FOUND=no
15225             else
15226               # We're done! :-)
15227               BOOT_JDK_FOUND=yes
15228 
15229   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15230 
15231   # Input might be given as Windows format, start by converting to
15232   # unix format.
15233   path="$BOOT_JDK"
15234   new_path=`$CYGPATH -u "$path"`
15235 
15236   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15237   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15238   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15239   # "foo.exe" is OK but "foo" is an error.
15240   #
15241   # This test is therefore slightly more accurate than "test -f" to check for file precense.
15242   # It is also a way to make sure we got the proper file name for the real test later on.
15243   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15244   if test "x$test_shortpath" = x; then
15245     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15246 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15247     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
15248   fi
15249 
15250   # Call helper function which possibly converts this using DOS-style short mode.
15251   # If so, the updated path is stored in $new_path.
15252 
15253   input_path="$new_path"
15254   # Check if we need to convert this using DOS-style short mode. If the path
15255   # contains just simple characters, use it. Otherwise (spaces, weird characters),
15256   # take no chances and rewrite it.
15257   # Note: m4 eats our [], so we need to use [ and ] instead.
15258   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15259   if test "x$has_forbidden_chars" != x; then
15260     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15261     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15262     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15263     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15264       # Going to short mode and back again did indeed matter. Since short mode is
15265       # case insensitive, let's make it lowercase to improve readability.
15266       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15267       # Now convert it back to Unix-stile (cygpath)
15268       input_path=`$CYGPATH -u "$shortmode_path"`
15269       new_path="$input_path"
15270     fi
15271   fi
15272 
15273   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15274   if test "x$test_cygdrive_prefix" = x; then
15275     # As a simple fix, exclude /usr/bin since it's not a real path.
15276     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15277       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15278       # a path prefixed by /cygdrive for fixpath to work.
15279       new_path="$CYGWIN_ROOT_PATH$input_path"
15280     fi
15281   fi
15282 
15283 
15284   if test "x$path" != "x$new_path"; then
15285     BOOT_JDK="$new_path"
15286     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15287 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15288   fi
15289 
15290   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15291 
15292   path="$BOOT_JDK"
15293   has_colon=`$ECHO $path | $GREP ^.:`
15294   new_path="$path"
15295   if test "x$has_colon" = x; then
15296     # Not in mixed or Windows style, start by that.
15297     new_path=`cmd //c echo $path`
15298   fi
15299 
15300 
15301   input_path="$new_path"
15302   # Check if we need to convert this using DOS-style short mode. If the path
15303   # contains just simple characters, use it. Otherwise (spaces, weird characters),
15304   # take no chances and rewrite it.
15305   # Note: m4 eats our [], so we need to use [ and ] instead.
15306   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15307   if test "x$has_forbidden_chars" != x; then
15308     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15309     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15310   fi
15311 
15312 
15313   windows_path="$new_path"
15314   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15315     unix_path=`$CYGPATH -u "$windows_path"`
15316     new_path="$unix_path"
15317   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15318     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15319     new_path="$unix_path"
15320   fi
15321 
15322   if test "x$path" != "x$new_path"; then
15323     BOOT_JDK="$new_path"
15324     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15325 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15326   fi
15327 
15328   # Save the first 10 bytes of this path to the storage, so fixpath can work.
15329   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15330 
15331   else
15332     # We're on a posix platform. Hooray! :)
15333     path="$BOOT_JDK"
15334     has_space=`$ECHO "$path" | $GREP " "`
15335     if test "x$has_space" != x; then
15336       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15337 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15338       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15339     fi
15340 
15341     # Use eval to expand a potential ~
15342     eval path="$path"
15343     if test ! -f "$path" && test ! -d "$path"; then
15344       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
15345     fi
15346 
15347     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
15348   fi
15349 
15350               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
15351 $as_echo_n "checking for Boot JDK... " >&6; }
15352               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
15353 $as_echo "$BOOT_JDK" >&6; }
15354               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
15355 $as_echo_n "checking Boot JDK version... " >&6; }
15356               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
15357               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
15358 $as_echo "$BOOT_JDK_VERSION" >&6; }
15359             fi # end check jdk version
15360           fi # end check rt.jar
15361         fi # end check javac
15362       fi # end check java
15363     fi # end check boot jdk found
15364   fi
15365 
15366   fi
15367 
15368 
15369     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
15370     if test "x$BOOT_JDK_FOUND" = xmaybe; then
15371       # Do we have a bin/java?
15372       if test ! -x "$BOOT_JDK/bin/java"; then
15373         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
15374 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
15375         BOOT_JDK_FOUND=no
15376       else
15377         # Do we have a bin/javac?
15378         if test ! -x "$BOOT_JDK/bin/javac"; then
15379           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
15380 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
15381           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
15382 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
15383           BOOT_JDK_FOUND=no
15384         else
15385           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
15386           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
15387             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
15388 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
15389             BOOT_JDK_FOUND=no
15390           else
15391             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
15392             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
15393 
15394             # Extra M4 quote needed to protect [] in grep expression.
15395             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
15396             if test "x$FOUND_VERSION_78" = x; then
15397               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
15398 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
15399               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
15400 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
15401               BOOT_JDK_FOUND=no
15402             else
15403               # We're done! :-)
15404               BOOT_JDK_FOUND=yes
15405 
15406   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15407 
15408   # Input might be given as Windows format, start by converting to
15409   # unix format.
15410   path="$BOOT_JDK"
15411   new_path=`$CYGPATH -u "$path"`
15412 
15413   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15414   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15415   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15416   # "foo.exe" is OK but "foo" is an error.
15417   #
15418   # This test is therefore slightly more accurate than "test -f" to check for file precense.
15419   # It is also a way to make sure we got the proper file name for the real test later on.
15420   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15421   if test "x$test_shortpath" = x; then
15422     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15423 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15424     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
15425   fi
15426 
15427   # Call helper function which possibly converts this using DOS-style short mode.
15428   # If so, the updated path is stored in $new_path.
15429 
15430   input_path="$new_path"
15431   # Check if we need to convert this using DOS-style short mode. If the path
15432   # contains just simple characters, use it. Otherwise (spaces, weird characters),
15433   # take no chances and rewrite it.
15434   # Note: m4 eats our [], so we need to use [ and ] instead.
15435   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15436   if test "x$has_forbidden_chars" != x; then
15437     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15438     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15439     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15440     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15441       # Going to short mode and back again did indeed matter. Since short mode is
15442       # case insensitive, let's make it lowercase to improve readability.
15443       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15444       # Now convert it back to Unix-stile (cygpath)
15445       input_path=`$CYGPATH -u "$shortmode_path"`
15446       new_path="$input_path"
15447     fi
15448   fi
15449 
15450   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15451   if test "x$test_cygdrive_prefix" = x; then
15452     # As a simple fix, exclude /usr/bin since it's not a real path.
15453     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15454       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15455       # a path prefixed by /cygdrive for fixpath to work.
15456       new_path="$CYGWIN_ROOT_PATH$input_path"
15457     fi
15458   fi
15459 
15460 
15461   if test "x$path" != "x$new_path"; then
15462     BOOT_JDK="$new_path"
15463     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15464 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15465   fi
15466 
15467   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15468 
15469   path="$BOOT_JDK"
15470   has_colon=`$ECHO $path | $GREP ^.:`
15471   new_path="$path"
15472   if test "x$has_colon" = x; then
15473     # Not in mixed or Windows style, start by that.
15474     new_path=`cmd //c echo $path`
15475   fi
15476 
15477 
15478   input_path="$new_path"
15479   # Check if we need to convert this using DOS-style short mode. If the path
15480   # contains just simple characters, use it. Otherwise (spaces, weird characters),
15481   # take no chances and rewrite it.
15482   # Note: m4 eats our [], so we need to use [ and ] instead.
15483   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15484   if test "x$has_forbidden_chars" != x; then
15485     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15486     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15487   fi
15488 
15489 
15490   windows_path="$new_path"
15491   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15492     unix_path=`$CYGPATH -u "$windows_path"`
15493     new_path="$unix_path"
15494   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15495     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15496     new_path="$unix_path"
15497   fi
15498 
15499   if test "x$path" != "x$new_path"; then
15500     BOOT_JDK="$new_path"
15501     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15502 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15503   fi
15504 
15505   # Save the first 10 bytes of this path to the storage, so fixpath can work.
15506   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15507 
15508   else
15509     # We're on a posix platform. Hooray! :)
15510     path="$BOOT_JDK"
15511     has_space=`$ECHO "$path" | $GREP " "`
15512     if test "x$has_space" != x; then
15513       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15514 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15515       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15516     fi
15517 
15518     # Use eval to expand a potential ~
15519     eval path="$path"
15520     if test ! -f "$path" && test ! -d "$path"; then
15521       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
15522     fi
15523 
15524     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
15525   fi
15526 
15527               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
15528 $as_echo_n "checking for Boot JDK... " >&6; }
15529               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
15530 $as_echo "$BOOT_JDK" >&6; }
15531               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
15532 $as_echo_n "checking Boot JDK version... " >&6; }
15533               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
15534               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
15535 $as_echo "$BOOT_JDK_VERSION" >&6; }
15536             fi # end check jdk version
15537           fi # end check rt.jar
15538         fi # end check javac
15539       fi # end check java
15540     fi # end check boot jdk found
15541   fi
15542 
15543 
15544 # If we haven't found anything yet, we've truly lost. Give up.
15545 if test "x$BOOT_JDK_FOUND" = xno; then
15546 
15547     # Print a helpful message on how to acquire the necessary build dependency.
15548     # openjdk is the help tag: freetyp2, cups, pulse, alsa etc
15549     MISSING_DEPENDENCY=openjdk
15550     PKGHANDLER_COMMAND=
15551 
15552     case $PKGHANDLER in
15553         apt-get)
15554                 apt_help     $MISSING_DEPENDENCY ;;
15555     yum)
15556                 yum_help     $MISSING_DEPENDENCY ;;
15557         port)
15558                 port_help    $MISSING_DEPENDENCY ;;
15559         pkgutil)
15560                 pkgutil_help $MISSING_DEPENDENCY ;;
15561         pkgadd)
15562                 pkgadd_help  $MISSING_DEPENDENCY ;;
15563     * )
15564       break ;;
15565     esac
15566 
15567     if test "x$PKGHANDLER_COMMAND" != x; then
15568         HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
15569     fi
15570 
15571   { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find a valid Boot JDK. $HELP_MSG" >&5
15572 $as_echo "$as_me: Could not find a valid Boot JDK. $HELP_MSG" >&6;}
15573   { $as_echo "$as_me:${as_lineno-$LINENO}: This might be fixed by explicitely setting --with-boot-jdk" >&5
15574 $as_echo "$as_me: This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15575   as_fn_error $? "Cannot continue" "$LINENO" 5
15576 fi
15577 
15578 # Setup proper paths for what we found
15579 BOOT_RTJAR="$BOOT_JDK/jre/lib/rt.jar"
15580 if test ! -f "$BOOT_RTJAR"; then
15581     # On MacOSX it is called classes.jar
15582     BOOT_RTJAR="$BOOT_JDK/../Classes/classes.jar"
15583     if test -f "$BOOT_RTJAR"; then
15584       # Remove the ..
15585       BOOT_RTJAR="`cd ${BOOT_RTJAR%/*} && pwd`/${BOOT_RTJAR##*/}"
15586     fi
15587 fi
15588 BOOT_TOOLSJAR="$BOOT_JDK/lib/tools.jar"
15589 BOOT_JDK="$BOOT_JDK"
15590 
15591 
15592 
15593 
15594 # Setup tools from the Boot JDK.
15595 
15596   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
15597 $as_echo_n "checking for java in Boot JDK... " >&6; }
15598   JAVA=$BOOT_JDK/bin/java
15599   if test ! -x $JAVA; then
15600       { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15601 $as_echo "not found" >&6; }
15602       { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15603 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15604       as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
15605   fi
15606   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15607 $as_echo "ok" >&6; }
15608 
15609 
15610   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
15611 $as_echo_n "checking for javac in Boot JDK... " >&6; }
15612   JAVAC=$BOOT_JDK/bin/javac
15613   if test ! -x $JAVAC; then
15614       { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15615 $as_echo "not found" >&6; }
15616       { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15617 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15618       as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
15619   fi
15620   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15621 $as_echo "ok" >&6; }
15622 
15623 
15624   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
15625 $as_echo_n "checking for javah in Boot JDK... " >&6; }
15626   JAVAH=$BOOT_JDK/bin/javah
15627   if test ! -x $JAVAH; then
15628       { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15629 $as_echo "not found" >&6; }
15630       { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15631 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15632       as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
15633   fi
15634   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15635 $as_echo "ok" >&6; }
15636 
15637 
15638   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javap in Boot JDK" >&5
15639 $as_echo_n "checking for javap in Boot JDK... " >&6; }
15640   JAVAP=$BOOT_JDK/bin/javap
15641   if test ! -x $JAVAP; then
15642       { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15643 $as_echo "not found" >&6; }
15644       { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15645 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15646       as_fn_error $? "Could not find javap in the Boot JDK" "$LINENO" 5
15647   fi
15648   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15649 $as_echo "ok" >&6; }
15650 
15651 
15652   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
15653 $as_echo_n "checking for jar in Boot JDK... " >&6; }
15654   JAR=$BOOT_JDK/bin/jar
15655   if test ! -x $JAR; then
15656       { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15657 $as_echo "not found" >&6; }
15658       { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15659 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15660       as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
15661   fi
15662   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15663 $as_echo "ok" >&6; }
15664 
15665 
15666   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for rmic in Boot JDK" >&5
15667 $as_echo_n "checking for rmic in Boot JDK... " >&6; }
15668   RMIC=$BOOT_JDK/bin/rmic
15669   if test ! -x $RMIC; then
15670       { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15671 $as_echo "not found" >&6; }
15672       { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15673 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15674       as_fn_error $? "Could not find rmic in the Boot JDK" "$LINENO" 5
15675   fi
15676   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15677 $as_echo "ok" >&6; }
15678 
15679 
15680   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for native2ascii in Boot JDK" >&5
15681 $as_echo_n "checking for native2ascii in Boot JDK... " >&6; }
15682   NATIVE2ASCII=$BOOT_JDK/bin/native2ascii
15683   if test ! -x $NATIVE2ASCII; then
15684       { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15685 $as_echo "not found" >&6; }
15686       { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15687 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15688       as_fn_error $? "Could not find native2ascii in the Boot JDK" "$LINENO" 5
15689   fi
15690   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15691 $as_echo "ok" >&6; }
15692 
15693 
15694 # Finally, set some other options...
15695 
15696 # When compiling code to be executed by the Boot JDK, force jdk7 compatibility.
15697 BOOT_JDK_SOURCETARGET="-source 7 -target 7"
15698 
15699 
15700 
15701 
15702 ##############################################################################
15703 #
15704 # Specify options for anything that is run with the Boot JDK.
15705 #
15706 
15707 # Check whether --with-boot-jdk-jvmargs was given.
15708 if test "${with_boot_jdk_jvmargs+set}" = set; then :
15709   withval=$with_boot_jdk_jvmargs;
15710 fi
15711 
15712 
15713 if test "x$with_boot_jdk_jvmargs" = x; then
15714     # Not all JVM:s accept the same arguments on the command line.
15715     # OpenJDK specific increase in thread stack for JDK build,
15716     # well more specifically, when running javac.
15717     if test "x$BUILD_NUM_BITS" = x32; then
15718        STACK_SIZE=768
15719     else
15720        # Running Javac on a JVM on a 64-bit machine, the stack takes more space
15721        # since 64-bit pointers are pushed on the stach. Apparently, we need
15722        # to increase the stack space when javacing the JDK....
15723        STACK_SIZE=1536
15724     fi
15725 
15726     # Minimum amount of heap memory.
15727 
15728     $ECHO "Check if jvm arg is ok: -Xms64M" >&5
15729     $ECHO "Command: $JAVA -Xms64M -version" >&5
15730     OUTPUT=`$JAVA -Xms64M -version 2>&1`
15731     FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
15732     FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
15733     if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15734         boot_jdk_jvmargs="$boot_jdk_jvmargs -Xms64M"
15735         JVM_ARG_OK=true
15736     else
15737         $ECHO "Arg failed:" >&5
15738         $ECHO "$OUTPUT" >&5
15739         JVM_ARG_OK=false
15740     fi
15741 
15742     if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
15743         # Why does macosx need more heap? Its the huge JDK batch.
15744 
15745     $ECHO "Check if jvm arg is ok: -Xmx1600M" >&5
15746     $ECHO "Command: $JAVA -Xmx1600M -version" >&5
15747     OUTPUT=`$JAVA -Xmx1600M -version 2>&1`
15748     FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
15749     FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
15750     if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15751         boot_jdk_jvmargs="$boot_jdk_jvmargs -Xmx1600M"
15752         JVM_ARG_OK=true
15753     else
15754         $ECHO "Arg failed:" >&5
15755         $ECHO "$OUTPUT" >&5
15756         JVM_ARG_OK=false
15757     fi
15758 
15759     else
15760 
15761     $ECHO "Check if jvm arg is ok: -Xmx1100M" >&5
15762     $ECHO "Command: $JAVA -Xmx1100M -version" >&5
15763     OUTPUT=`$JAVA -Xmx1100M -version 2>&1`
15764     FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
15765     FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
15766     if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15767         boot_jdk_jvmargs="$boot_jdk_jvmargs -Xmx1100M"
15768         JVM_ARG_OK=true
15769     else
15770         $ECHO "Arg failed:" >&5
15771         $ECHO "$OUTPUT" >&5
15772         JVM_ARG_OK=false
15773     fi
15774 
15775     fi
15776     # When is adding -client something that speeds up the JVM?
15777     # ADD_JVM_ARG_IF_OK([-client],boot_jdk_jvmargs,[$JAVA])
15778 
15779     $ECHO "Check if jvm arg is ok: -XX:PermSize=32m" >&5
15780     $ECHO "Command: $JAVA -XX:PermSize=32m -version" >&5
15781     OUTPUT=`$JAVA -XX:PermSize=32m -version 2>&1`
15782     FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
15783     FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
15784     if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15785         boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:PermSize=32m"
15786         JVM_ARG_OK=true
15787     else
15788         $ECHO "Arg failed:" >&5
15789         $ECHO "$OUTPUT" >&5
15790         JVM_ARG_OK=false
15791     fi
15792 
15793 
15794     $ECHO "Check if jvm arg is ok: -XX:MaxPermSize=160m" >&5
15795     $ECHO "Command: $JAVA -XX:MaxPermSize=160m -version" >&5
15796     OUTPUT=`$JAVA -XX:MaxPermSize=160m -version 2>&1`
15797     FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
15798     FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
15799     if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15800         boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:MaxPermSize=160m"
15801         JVM_ARG_OK=true
15802     else
15803         $ECHO "Arg failed:" >&5
15804         $ECHO "$OUTPUT" >&5
15805         JVM_ARG_OK=false
15806     fi
15807 
15808 
15809     $ECHO "Check if jvm arg is ok: -XX:ThreadStackSize=$STACK_SIZE" >&5
15810     $ECHO "Command: $JAVA -XX:ThreadStackSize=$STACK_SIZE -version" >&5
15811     OUTPUT=`$JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1`
15812     FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
15813     FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
15814     if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15815         boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:ThreadStackSize=$STACK_SIZE"
15816         JVM_ARG_OK=true
15817     else
15818         $ECHO "Arg failed:" >&5
15819         $ECHO "$OUTPUT" >&5
15820         JVM_ARG_OK=false
15821     fi
15822 
15823     # Disable special log output when a debug build is used as Boot JDK...
15824 
15825     $ECHO "Check if jvm arg is ok: -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput" >&5
15826     $ECHO "Command: $JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version" >&5
15827     OUTPUT=`$JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version 2>&1`
15828     FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
15829     FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
15830     if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15831         boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput"
15832         JVM_ARG_OK=true
15833     else
15834         $ECHO "Arg failed:" >&5
15835         $ECHO "$OUTPUT" >&5
15836         JVM_ARG_OK=false
15837     fi
15838 
15839 fi
15840 
15841 BOOT_JDK_JVMARGS=$boot_jdk_jvmargs
15842 
15843 
15844 
15845 ###############################################################################
15846 #
15847 # Configure the sources to use. We can add or override individual directories.
15848 #
15849 ###############################################################################
15850 
15851 
15852 
15853 # Where are the sources. Any of these can be overridden
15854 # using --with-override-corba and the likes.
15855 LANGTOOLS_TOPDIR="$SRC_ROOT/langtools"
15856 CORBA_TOPDIR="$SRC_ROOT/corba"
15857 JAXP_TOPDIR="$SRC_ROOT/jaxp"
15858 JAXWS_TOPDIR="$SRC_ROOT/jaxws"
15859 HOTSPOT_TOPDIR="$SRC_ROOT/hotspot"
15860 NASHORN_TOPDIR="$SRC_ROOT/nashorn"
15861 JDK_TOPDIR="$SRC_ROOT/jdk"
15862 
15863 
15864 
15865 
15866 
15867 
15868 
15869 
15870 
15871 
15872 ###############################################################################
15873 #
15874 # Pickup additional source for a component from outside of the source root
15875 # or override source for a component.
15876 #
15877 
15878 # Check whether --with-add-source-root was given.
15879 if test "${with_add_source_root+set}" = set; then :
15880   withval=$with_add_source_root;
15881 fi
15882 
15883 
15884 
15885 # Check whether --with-override-source-root was given.
15886 if test "${with_override_source_root+set}" = set; then :
15887   withval=$with_override_source_root;
15888 fi
15889 
15890 
15891 
15892 # Check whether --with-adds-and-overrides was given.
15893 if test "${with_adds_and_overrides+set}" = set; then :
15894   withval=$with_adds_and_overrides;
15895 fi
15896 
15897 
15898 if test "x$with_adds_and_overrides" != x; then
15899     with_add_source_root="$with_adds_and_overrides/adds"
15900     with_override_source_root="$with_adds_and_overrides/overrides"
15901 fi
15902 
15903 if test "x$with_add_source_root" != x; then
15904     if ! test -d $with_add_source_root; then
15905        as_fn_error $? "Trying to use a non-existant add-source-root $with_add_source_root" "$LINENO" 5
15906     fi
15907     CURDIR="$PWD"
15908     cd "$with_add_source_root"
15909     ADD_SRC_ROOT="`pwd`"
15910     cd "$CURDIR"
15911     # Verify that the addon source root does not have any root makefiles.
15912     # If it does, then it is usually an error, prevent this.
15913     if test -f $with_add_source_root/langtools/makefiles/Makefile || \
15914        test -f $with_add_source_root/langtools/make/Makefile; then
15915         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
15916     fi
15917     if test -f $with_add_source_root/corba/makefiles/Makefile || \
15918        test -f $with_add_source_root/corba/make/Makefile; then
15919         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
15920     fi
15921     if test -f $with_add_source_root/jaxp/makefiles/Makefile || \
15922        test -f $with_add_source_root/jaxp/make/Makefile; then
15923         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
15924     fi
15925     if test -f $with_add_source_root/jaxws/makefiles/Makefile || \
15926        test -f $with_add_source_root/jaxws/make/Makefile; then
15927         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
15928     fi
15929     if test -f $with_add_source_root/hotspot/makefiles/Makefile || \
15930        test -f $with_add_source_root/hotspot/make/Makefile; then
15931         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
15932     fi
15933     if test -f $with_add_source_root/jdk/makefiles/Makefile || \
15934        test -f $with_add_source_root/jdk/make/Makefile; then
15935         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
15936     fi
15937 fi
15938 
15939 
15940 if test "x$with_override_source_root" != x; then
15941     if ! test -d $with_override_source_root; then
15942        as_fn_error $? "Trying to use a non-existant override-source-root $with_override_source_root" "$LINENO" 5
15943     fi
15944     CURDIR="$PWD"
15945     cd "$with_override_source_root"
15946     OVERRIDE_SRC_ROOT="`pwd`"
15947     cd "$CURDIR"
15948     if test -f $with_override_source_root/langtools/makefiles/Makefile || \
15949        test -f $with_override_source_root/langtools/make/Makefile; then
15950         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
15951     fi
15952     if test -f $with_override_source_root/corba/makefiles/Makefile || \
15953        test -f $with_override_source_root/corba/make/Makefile; then
15954         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
15955     fi
15956     if test -f $with_override_source_root/jaxp/makefiles/Makefile || \
15957        test -f $with_override_source_root/jaxp/make/Makefile; then
15958         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
15959     fi
15960     if test -f $with_override_source_root/jaxws/makefiles/Makefile || \
15961        test -f $with_override_source_root/jaxws/make/Makefile; then
15962         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
15963     fi
15964     if test -f $with_override_source_root/hotspot/makefiles/Makefile || \
15965        test -f $with_override_source_root/hotspot/make/Makefile; then
15966         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
15967     fi
15968     if test -f $with_override_source_root/jdk/makefiles/Makefile || \
15969        test -f $with_override_source_root/jdk/make/Makefile; then
15970         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
15971     fi
15972 fi
15973 
15974 
15975 ###############################################################################
15976 #
15977 # Override a repo completely, this is used for example when you have 3 small
15978 # development sandboxes of the langtools sources and want to avoid having 3 full
15979 # OpenJDK sources checked out on disk.
15980 #
15981 # Assuming that the 3 langtools sandboxes are located here:
15982 # /home/fredrik/sandbox1/langtools
15983 # /home/fredrik/sandbox2/langtools
15984 # /home/fredrik/sandbox3/langtools
15985 #
15986 # From the source root you create build subdirs manually:
15987 #     mkdir -p build1 build2 build3
15988 # in each build directory run:
15989 #     (cd build1 && ../configure --with-override-langtools=/home/fredrik/sandbox1 && make)
15990 #     (cd build2 && ../configure --with-override-langtools=/home/fredrik/sandbox2 && make)
15991 #     (cd build3 && ../configure --with-override-langtools=/home/fredrik/sandbox3 && make)
15992 #
15993 
15994 
15995 # Check whether --with-override-langtools was given.
15996 if test "${with_override_langtools+set}" = set; then :
15997   withval=$with_override_langtools;
15998 fi
15999 
16000 
16001 
16002 # Check whether --with-override-corba was given.
16003 if test "${with_override_corba+set}" = set; then :
16004   withval=$with_override_corba;
16005 fi
16006 
16007 
16008 
16009 # Check whether --with-override-jaxp was given.
16010 if test "${with_override_jaxp+set}" = set; then :
16011   withval=$with_override_jaxp;
16012 fi
16013 
16014 
16015 
16016 # Check whether --with-override-jaxws was given.
16017 if test "${with_override_jaxws+set}" = set; then :
16018   withval=$with_override_jaxws;
16019 fi
16020 
16021 
16022 
16023 # Check whether --with-override-hotspot was given.
16024 if test "${with_override_hotspot+set}" = set; then :
16025   withval=$with_override_hotspot;
16026 fi
16027 
16028 
16029 
16030 # Check whether --with-override-jdk was given.
16031 if test "${with_override_jdk+set}" = set; then :
16032   withval=$with_override_jdk;
16033 fi
16034 
16035 
16036 if test "x$with_override_langtools" != x; then
16037     CURDIR="$PWD"
16038     cd "$with_override_langtools"
16039     LANGTOOLS_TOPDIR="`pwd`"
16040     cd "$CURDIR"
16041     if ! test -f $LANGTOOLS_TOPDIR/makefiles/Makefile; then
16042         as_fn_error $? "You have to override langtools with a full langtools repo!" "$LINENO" 5
16043     fi
16044     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if langtools should be overridden" >&5
16045 $as_echo_n "checking if langtools should be overridden... " >&6; }
16046     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $LANGTOOLS_TOPDIR" >&5
16047 $as_echo "yes with $LANGTOOLS_TOPDIR" >&6; }
16048 fi
16049 if test "x$with_override_corba" != x; then
16050     CURDIR="$PWD"
16051     cd "$with_override_corba"
16052     CORBA_TOPDIR="`pwd`"
16053     cd "$CURDIR"
16054     if ! test -f $CORBA_TOPDIR/makefiles/Makefile; then
16055         as_fn_error $? "You have to override corba with a full corba repo!" "$LINENO" 5
16056     fi
16057     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if corba should be overridden" >&5
16058 $as_echo_n "checking if corba should be overridden... " >&6; }
16059     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $CORBA_TOPDIR" >&5
16060 $as_echo "yes with $CORBA_TOPDIR" >&6; }
16061 fi
16062 if test "x$with_override_jaxp" != x; then
16063     CURDIR="$PWD"
16064     cd "$with_override_jaxp"
16065     JAXP_TOPDIR="`pwd`"
16066     cd "$CURDIR"
16067     if ! test -f $JAXP_TOPDIR/makefiles/Makefile; then
16068         as_fn_error $? "You have to override jaxp with a full jaxp repo!" "$LINENO" 5
16069     fi
16070     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jaxp should be overridden" >&5
16071 $as_echo_n "checking if jaxp should be overridden... " >&6; }
16072     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JAXP_TOPDIR" >&5
16073 $as_echo "yes with $JAXP_TOPDIR" >&6; }
16074 fi
16075 if test "x$with_override_jaxws" != x; then
16076     CURDIR="$PWD"
16077     cd "$with_override_jaxws"
16078     JAXWS_TOPDIR="`pwd`"
16079     cd "$CURDIR"
16080     if ! test -f $JAXWS_TOPDIR/makefiles/Makefile; then
16081         as_fn_error $? "You have to override jaxws with a full jaxws repo!" "$LINENO" 5
16082     fi
16083     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jaxws should be overridden" >&5
16084 $as_echo_n "checking if jaxws should be overridden... " >&6; }
16085     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JAXWS_TOPDIR" >&5
16086 $as_echo "yes with $JAXWS_TOPDIR" >&6; }
16087 fi
16088 if test "x$with_override_hotspot" != x; then
16089     CURDIR="$PWD"
16090     cd "$with_override_hotspot"
16091     HOTSPOT_TOPDIR="`pwd`"
16092     cd "$CURDIR"
16093     if ! test -f $HOTSPOT_TOPDIR/make/Makefile && \
16094        ! test -f $HOTSPOT_TOPDIR/makefiles/Makefile; then
16095         as_fn_error $? "You have to override hotspot with a full hotspot repo!" "$LINENO" 5
16096     fi
16097     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be overridden" >&5
16098 $as_echo_n "checking if hotspot should be overridden... " >&6; }
16099     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $HOTSPOT_TOPDIR" >&5
16100 $as_echo "yes with $HOTSPOT_TOPDIR" >&6; }
16101 fi
16102 if test "x$with_override_nashorn" != x; then
16103     CURDIR="$PWD"
16104     cd "$with_override_nashorn"
16105     NASHORN_TOPDIR="`pwd`"
16106     cd "$CURDIR"
16107     if ! test -f $NASHORN_TOPDIR/makefiles/BuildNashorn.gmk; then
16108         as_fn_error $? "You have to override nashorn with a full nashorn repo!" "$LINENO" 5
16109     fi
16110     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if nashorn should be overridden" >&5
16111 $as_echo_n "checking if nashorn should be overridden... " >&6; }
16112     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $NASHORN_TOPDIR" >&5
16113 $as_echo "yes with $NASHORN_TOPDIR" >&6; }
16114 fi
16115 if test "x$with_override_jdk" != x; then
16116     CURDIR="$PWD"
16117     cd "$with_override_jdk"
16118     JDK_TOPDIR="`pwd`"
16119     cd "$CURDIR"
16120     if ! test -f $JDK_TOPDIR/makefiles/Makefile; then
16121         as_fn_error $? "You have to override JDK with a full JDK repo!" "$LINENO" 5
16122     fi
16123     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if JDK should be overridden" >&5
16124 $as_echo_n "checking if JDK should be overridden... " >&6; }
16125     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JDK_TOPDIR" >&5
16126 $as_echo "yes with $JDK_TOPDIR" >&6; }
16127 fi
16128 
16129 
16130 
16131 BUILD_OUTPUT="$OUTPUT_ROOT"
16132 
16133 
16134 HOTSPOT_DIST="$OUTPUT_ROOT/hotspot/dist"
16135 BUILD_HOTSPOT=true
16136 
16137 
16138 
16139 # Check whether --with-import-hotspot was given.
16140 if test "${with_import_hotspot+set}" = set; then :
16141   withval=$with_import_hotspot;
16142 fi
16143 
16144 if test "x$with_import_hotspot" != x; then
16145     CURDIR="$PWD"
16146     cd "$with_import_hotspot"
16147     HOTSPOT_DIST="`pwd`"
16148     cd "$CURDIR"
16149     if ! (test -d $HOTSPOT_DIST/lib && test -d $HOTSPOT_DIST/jre/lib); then
16150         as_fn_error $? "You have to import hotspot from a full jdk image or hotspot build dist dir!" "$LINENO" 5
16151     fi
16152     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be imported" >&5
16153 $as_echo_n "checking if hotspot should be imported... " >&6; }
16154     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes from $HOTSPOT_DIST" >&5
16155 $as_echo "yes from $HOTSPOT_DIST" >&6; }
16156     BUILD_HOTSPOT=false
16157 fi
16158 
16159 JDK_OUTPUTDIR="$OUTPUT_ROOT/jdk"
16160 
16161 
16162 ###############################################################################
16163 #
16164 # Setup the toolchain (compilers etc), i.e. the tools that need to be
16165 # cross-compilation aware.
16166 #
16167 ###############################################################################
16168 
16169 
16170 ###############################################################################
16171 #
16172 # Configure the development tool paths and potential sysroot.
16173 #
16174 ac_ext=cpp
16175 ac_cpp='$CXXCPP $CPPFLAGS'
16176 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
16177 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
16178 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
16179 
16180 
16181 # The option used to specify the target .o,.a or .so file.
16182 # When compiling, how to specify the to be created object file.
16183 CC_OUT_OPTION='-o$(SPACE)'
16184 # When linking, how to specify the to be created executable.
16185 EXE_OUT_OPTION='-o$(SPACE)'
16186 # When linking, how to specify the to be created dynamically linkable library.
16187 LD_OUT_OPTION='-o$(SPACE)'
16188 # When archiving, how to specify the to be create static archive for object files.
16189 AR_OUT_OPTION='rcs$(SPACE)'
16190 
16191 
16192 
16193 
16194 
16195 # Locate the actual tools
16196 
16197 
16198 # Check whether --with-jtreg was given.
16199 if test "${with_jtreg+set}" = set; then :
16200   withval=$with_jtreg;
16201 else
16202   with_jtreg=no
16203 fi
16204 
16205 
16206   if test "x$with_jtreg" = xno; then
16207     # jtreg disabled
16208     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
16209 $as_echo_n "checking for jtreg... " >&6; }
16210     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16211 $as_echo "no" >&6; }
16212   else
16213     if test "x$with_jtreg" != xyes; then
16214       # with path specified.
16215       JT_HOME="$with_jtreg"
16216     fi
16217 
16218     if test "x$JT_HOME" != x; then
16219       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
16220 $as_echo_n "checking for jtreg... " >&6; }
16221 
16222       # use JT_HOME enviroment var.
16223 
16224   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16225 
16226   # Input might be given as Windows format, start by converting to
16227   # unix format.
16228   path="$JT_HOME"
16229   new_path=`$CYGPATH -u "$path"`
16230 
16231   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16232   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16233   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16234   # "foo.exe" is OK but "foo" is an error.
16235   #
16236   # This test is therefore slightly more accurate than "test -f" to check for file precense.
16237   # It is also a way to make sure we got the proper file name for the real test later on.
16238   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16239   if test "x$test_shortpath" = x; then
16240     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
16241 $as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
16242     as_fn_error $? "Cannot locate the the path of JT_HOME" "$LINENO" 5
16243   fi
16244 
16245   # Call helper function which possibly converts this using DOS-style short mode.
16246   # If so, the updated path is stored in $new_path.
16247 
16248   input_path="$new_path"
16249   # Check if we need to convert this using DOS-style short mode. If the path
16250   # contains just simple characters, use it. Otherwise (spaces, weird characters),
16251   # take no chances and rewrite it.
16252   # Note: m4 eats our [], so we need to use [ and ] instead.
16253   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16254   if test "x$has_forbidden_chars" != x; then
16255     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16256     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16257     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16258     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16259       # Going to short mode and back again did indeed matter. Since short mode is
16260       # case insensitive, let's make it lowercase to improve readability.
16261       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16262       # Now convert it back to Unix-stile (cygpath)
16263       input_path=`$CYGPATH -u "$shortmode_path"`
16264       new_path="$input_path"
16265     fi
16266   fi
16267 
16268   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16269   if test "x$test_cygdrive_prefix" = x; then
16270     # As a simple fix, exclude /usr/bin since it's not a real path.
16271     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
16272       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16273       # a path prefixed by /cygdrive for fixpath to work.
16274       new_path="$CYGWIN_ROOT_PATH$input_path"
16275     fi
16276   fi
16277 
16278 
16279   if test "x$path" != "x$new_path"; then
16280     JT_HOME="$new_path"
16281     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
16282 $as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
16283   fi
16284 
16285   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16286 
16287   path="$JT_HOME"
16288   has_colon=`$ECHO $path | $GREP ^.:`
16289   new_path="$path"
16290   if test "x$has_colon" = x; then
16291     # Not in mixed or Windows style, start by that.
16292     new_path=`cmd //c echo $path`
16293   fi
16294 
16295 
16296   input_path="$new_path"
16297   # Check if we need to convert this using DOS-style short mode. If the path
16298   # contains just simple characters, use it. Otherwise (spaces, weird characters),
16299   # take no chances and rewrite it.
16300   # Note: m4 eats our [], so we need to use [ and ] instead.
16301   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16302   if test "x$has_forbidden_chars" != x; then
16303     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16304     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16305   fi
16306 
16307 
16308   windows_path="$new_path"
16309   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16310     unix_path=`$CYGPATH -u "$windows_path"`
16311     new_path="$unix_path"
16312   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16313     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16314     new_path="$unix_path"
16315   fi
16316 
16317   if test "x$path" != "x$new_path"; then
16318     JT_HOME="$new_path"
16319     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
16320 $as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
16321   fi
16322 
16323   # Save the first 10 bytes of this path to the storage, so fixpath can work.
16324   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16325 
16326   else
16327     # We're on a posix platform. Hooray! :)
16328     path="$JT_HOME"
16329     has_space=`$ECHO "$path" | $GREP " "`
16330     if test "x$has_space" != x; then
16331       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
16332 $as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
16333       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
16334     fi
16335 
16336     # Use eval to expand a potential ~
16337     eval path="$path"
16338     if test ! -f "$path" && test ! -d "$path"; then
16339       as_fn_error $? "The path of JT_HOME, which resolves as \"$path\", is not found." "$LINENO" 5
16340     fi
16341 
16342     JT_HOME="`cd "$path"; $THEPWDCMD -L`"
16343   fi
16344 
16345 
16346       # jtreg win32 script works for everybody
16347       JTREGEXE="$JT_HOME/win32/bin/jtreg"
16348 
16349       if test ! -f "$JTREGEXE"; then
16350         as_fn_error $? "JTReg executable does not exist: $JTREGEXE" "$LINENO" 5
16351       fi
16352 
16353       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
16354 $as_echo "$JTREGEXE" >&6; }
16355     else
16356       # try to find jtreg on path
16357 
16358     for ac_prog in jtreg
16359 do
16360   # Extract the first word of "$ac_prog", so it can be a program name with args.
16361 set dummy $ac_prog; ac_word=$2
16362 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16363 $as_echo_n "checking for $ac_word... " >&6; }
16364 if ${ac_cv_path_JTREGEXE+:} false; then :
16365   $as_echo_n "(cached) " >&6
16366 else
16367   case $JTREGEXE in
16368   [\\/]* | ?:[\\/]*)
16369   ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
16370   ;;
16371   *)
16372   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16373 for as_dir in $PATH
16374 do
16375   IFS=$as_save_IFS
16376   test -z "$as_dir" && as_dir=.
16377     for ac_exec_ext in '' $ac_executable_extensions; do
16378   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
16379     ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
16380     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16381     break 2
16382   fi
16383 done
16384   done
16385 IFS=$as_save_IFS
16386 
16387   ;;
16388 esac
16389 fi
16390 JTREGEXE=$ac_cv_path_JTREGEXE
16391 if test -n "$JTREGEXE"; then
16392   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
16393 $as_echo "$JTREGEXE" >&6; }
16394 else
16395   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16396 $as_echo "no" >&6; }
16397 fi
16398 
16399 
16400   test -n "$JTREGEXE" && break
16401 done
16402 
16403 
16404     if test "x$JTREGEXE" = x; then
16405         if test "xjtreg" = x; then
16406           PROG_NAME=jtregexe
16407         else
16408           PROG_NAME=jtreg
16409         fi
16410         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
16411 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
16412         as_fn_error $? "Cannot continue" "$LINENO" 5
16413     fi
16414 
16415 
16416       JT_HOME="`$DIRNAME $JTREGEXE`"
16417     fi
16418   fi
16419 
16420 
16421 
16422 
16423 
16424 if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
16425 
16426   # Store path to cygwin link.exe to help excluding it when searching for
16427   # VS linker. This must be done before changing the PATH when looking for VS.
16428   # Extract the first word of "link", so it can be a program name with args.
16429 set dummy link; ac_word=$2
16430 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16431 $as_echo_n "checking for $ac_word... " >&6; }
16432 if ${ac_cv_path_CYGWIN_LINK+:} false; then :
16433   $as_echo_n "(cached) " >&6
16434 else
16435   case $CYGWIN_LINK in
16436   [\\/]* | ?:[\\/]*)
16437   ac_cv_path_CYGWIN_LINK="$CYGWIN_LINK" # Let the user override the test with a path.
16438   ;;
16439   *)
16440   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16441 for as_dir in $PATH
16442 do
16443   IFS=$as_save_IFS
16444   test -z "$as_dir" && as_dir=.
16445     for ac_exec_ext in '' $ac_executable_extensions; do
16446   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
16447     ac_cv_path_CYGWIN_LINK="$as_dir/$ac_word$ac_exec_ext"
16448     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16449     break 2
16450   fi
16451 done
16452   done
16453 IFS=$as_save_IFS
16454 
16455   ;;
16456 esac
16457 fi
16458 CYGWIN_LINK=$ac_cv_path_CYGWIN_LINK
16459 if test -n "$CYGWIN_LINK"; then
16460   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_LINK" >&5
16461 $as_echo "$CYGWIN_LINK" >&6; }
16462 else
16463   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16464 $as_echo "no" >&6; }
16465 fi
16466 
16467 
16468   if test "x$CYGWIN_LINK" != x; then
16469     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the first found link.exe is actually the Cygwin link tool" >&5
16470 $as_echo_n "checking if the first found link.exe is actually the Cygwin link tool... " >&6; }
16471     "$CYGWIN_LINK" --version > /dev/null
16472     if test $? -eq 0 ; then
16473       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16474 $as_echo "yes" >&6; }
16475     else
16476       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16477 $as_echo "no" >&6; }
16478       # This might be the VS linker. Don't exclude it later on.
16479       CYGWIN_LINK=""
16480     fi
16481   fi
16482 
16483   # First-hand choice is to locate and run the vsvars bat file.
16484 
16485   if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
16486     VCVARSFILE="vc/bin/vcvars32.bat"
16487   else
16488     VCVARSFILE="vc/bin/amd64/vcvars64.bat"
16489   fi
16490 
16491   VS_ENV_CMD=""
16492   VS_ENV_ARGS=""
16493   if test "x$with_toolsdir" != x; then
16494 
16495   if test "x$VS_ENV_CMD" = x; then
16496     VS100BASE="$with_toolsdir/../.."
16497     METHOD="--with-tools-dir"
16498 
16499   windows_path="$VS100BASE"
16500   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16501     unix_path=`$CYGPATH -u "$windows_path"`
16502     VS100BASE="$unix_path"
16503   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16504     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16505     VS100BASE="$unix_path"
16506   fi
16507 
16508     if test -d "$VS100BASE"; then
16509       if test -f "$VS100BASE/$VCVARSFILE"; then
16510         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16511 $as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16512         VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16513       else
16514         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16515 $as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16516         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16517 $as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16518       fi
16519     fi
16520   fi
16521 
16522   fi
16523 
16524   if test "x$with_toolsdir" != x && test "x$VS_ENV_CMD" = x; then
16525     # Having specified an argument which is incorrect will produce an instant failure;
16526     # we should not go on looking
16527     { $as_echo "$as_me:${as_lineno-$LINENO}: The path given by --with-tools-dir does not contain a valid Visual Studio installation" >&5
16528 $as_echo "$as_me: The path given by --with-tools-dir does not contain a valid Visual Studio installation" >&6;}
16529     { $as_echo "$as_me:${as_lineno-$LINENO}: Please point to the VC/bin directory within the Visual Studio installation" >&5
16530 $as_echo "$as_me: Please point to the VC/bin directory within the Visual Studio installation" >&6;}
16531     as_fn_error $? "Cannot locate a valid Visual Studio installation" "$LINENO" 5
16532   fi
16533 
16534   if test "x$VS100COMNTOOLS" != x; then
16535 
16536   if test "x$VS_ENV_CMD" = x; then
16537     VS100BASE="$VS100COMNTOOLS/../.."
16538     METHOD="VS100COMNTOOLS variable"
16539 
16540   windows_path="$VS100BASE"
16541   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16542     unix_path=`$CYGPATH -u "$windows_path"`
16543     VS100BASE="$unix_path"
16544   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16545     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16546     VS100BASE="$unix_path"
16547   fi
16548 
16549     if test -d "$VS100BASE"; then
16550       if test -f "$VS100BASE/$VCVARSFILE"; then
16551         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16552 $as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16553         VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16554       else
16555         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16556 $as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16557         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16558 $as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16559       fi
16560     fi
16561   fi
16562 
16563   fi
16564   if test "x$PROGRAMFILES" != x; then
16565 
16566   if test "x$VS_ENV_CMD" = x; then
16567     VS100BASE="$PROGRAMFILES/Microsoft Visual Studio 10.0"
16568     METHOD="well-known name"
16569 
16570   windows_path="$VS100BASE"
16571   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16572     unix_path=`$CYGPATH -u "$windows_path"`
16573     VS100BASE="$unix_path"
16574   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16575     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16576     VS100BASE="$unix_path"
16577   fi
16578 
16579     if test -d "$VS100BASE"; then
16580       if test -f "$VS100BASE/$VCVARSFILE"; then
16581         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16582 $as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16583         VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16584       else
16585         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16586 $as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16587         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16588 $as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16589       fi
16590     fi
16591   fi
16592 
16593   fi
16594 
16595   if test "x$VS_ENV_CMD" = x; then
16596     VS100BASE="C:/Program Files/Microsoft Visual Studio 10.0"
16597     METHOD="well-known name"
16598 
16599   windows_path="$VS100BASE"
16600   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16601     unix_path=`$CYGPATH -u "$windows_path"`
16602     VS100BASE="$unix_path"
16603   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16604     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16605     VS100BASE="$unix_path"
16606   fi
16607 
16608     if test -d "$VS100BASE"; then
16609       if test -f "$VS100BASE/$VCVARSFILE"; then
16610         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16611 $as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16612         VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16613       else
16614         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16615 $as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16616         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16617 $as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16618       fi
16619     fi
16620   fi
16621 
16622 
16623   if test "x$VS_ENV_CMD" = x; then
16624     VS100BASE="C:/Program Files (x86)/Microsoft Visual Studio 10.0"
16625     METHOD="well-known name"
16626 
16627   windows_path="$VS100BASE"
16628   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16629     unix_path=`$CYGPATH -u "$windows_path"`
16630     VS100BASE="$unix_path"
16631   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16632     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16633     VS100BASE="$unix_path"
16634   fi
16635 
16636     if test -d "$VS100BASE"; then
16637       if test -f "$VS100BASE/$VCVARSFILE"; then
16638         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16639 $as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16640         VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16641       else
16642         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16643 $as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16644         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16645 $as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16646       fi
16647     fi
16648   fi
16649 
16650 
16651   if test "x$ProgramW6432" != x; then
16652 
16653   if test "x$VS_ENV_CMD" = x; then
16654     WIN_SDK_BASE="$ProgramW6432/Microsoft SDKs/Windows/v7.1/Bin"
16655     METHOD="well-known name"
16656 
16657   windows_path="$WIN_SDK_BASE"
16658   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16659     unix_path=`$CYGPATH -u "$windows_path"`
16660     WIN_SDK_BASE="$unix_path"
16661   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16662     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16663     WIN_SDK_BASE="$unix_path"
16664   fi
16665 
16666     if test -d "$WIN_SDK_BASE"; then
16667       # There have been cases of partial or broken SDK installations. A missing
16668       # lib dir is not going to work.
16669       if test ! -d "$WIN_SDK_BASE/../lib"; then
16670         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16671 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16672         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
16673 $as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
16674       elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
16675         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16676 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16677         VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
16678         if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
16679           VS_ENV_ARGS="/x86"
16680         else
16681           VS_ENV_ARGS="/x64"
16682         fi
16683       else
16684         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16685 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16686         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
16687 $as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
16688       fi
16689     fi
16690   fi
16691 
16692   fi
16693   if test "x$PROGRAMW6432" != x; then
16694 
16695   if test "x$VS_ENV_CMD" = x; then
16696     WIN_SDK_BASE="$PROGRAMW6432/Microsoft SDKs/Windows/v7.1/Bin"
16697     METHOD="well-known name"
16698 
16699   windows_path="$WIN_SDK_BASE"
16700   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16701     unix_path=`$CYGPATH -u "$windows_path"`
16702     WIN_SDK_BASE="$unix_path"
16703   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16704     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16705     WIN_SDK_BASE="$unix_path"
16706   fi
16707 
16708     if test -d "$WIN_SDK_BASE"; then
16709       # There have been cases of partial or broken SDK installations. A missing
16710       # lib dir is not going to work.
16711       if test ! -d "$WIN_SDK_BASE/../lib"; then
16712         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16713 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16714         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
16715 $as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
16716       elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
16717         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16718 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16719         VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
16720         if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
16721           VS_ENV_ARGS="/x86"
16722         else
16723           VS_ENV_ARGS="/x64"
16724         fi
16725       else
16726         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16727 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16728         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
16729 $as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
16730       fi
16731     fi
16732   fi
16733 
16734   fi
16735   if test "x$PROGRAMFILES" != x; then
16736 
16737   if test "x$VS_ENV_CMD" = x; then
16738     WIN_SDK_BASE="$PROGRAMFILES/Microsoft SDKs/Windows/v7.1/Bin"
16739     METHOD="well-known name"
16740 
16741   windows_path="$WIN_SDK_BASE"
16742   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16743     unix_path=`$CYGPATH -u "$windows_path"`
16744     WIN_SDK_BASE="$unix_path"
16745   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16746     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16747     WIN_SDK_BASE="$unix_path"
16748   fi
16749 
16750     if test -d "$WIN_SDK_BASE"; then
16751       # There have been cases of partial or broken SDK installations. A missing
16752       # lib dir is not going to work.
16753       if test ! -d "$WIN_SDK_BASE/../lib"; then
16754         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16755 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16756         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
16757 $as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
16758       elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
16759         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16760 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16761         VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
16762         if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
16763           VS_ENV_ARGS="/x86"
16764         else
16765           VS_ENV_ARGS="/x64"
16766         fi
16767       else
16768         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16769 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16770         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
16771 $as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
16772       fi
16773     fi
16774   fi
16775 
16776   fi
16777 
16778   if test "x$VS_ENV_CMD" = x; then
16779     WIN_SDK_BASE="C:/Program Files/Microsoft SDKs/Windows/v7.1/Bin"
16780     METHOD="well-known name"
16781 
16782   windows_path="$WIN_SDK_BASE"
16783   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16784     unix_path=`$CYGPATH -u "$windows_path"`
16785     WIN_SDK_BASE="$unix_path"
16786   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16787     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16788     WIN_SDK_BASE="$unix_path"
16789   fi
16790 
16791     if test -d "$WIN_SDK_BASE"; then
16792       # There have been cases of partial or broken SDK installations. A missing
16793       # lib dir is not going to work.
16794       if test ! -d "$WIN_SDK_BASE/../lib"; then
16795         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16796 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16797         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
16798 $as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
16799       elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
16800         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16801 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16802         VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
16803         if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
16804           VS_ENV_ARGS="/x86"
16805         else
16806           VS_ENV_ARGS="/x64"
16807         fi
16808       else
16809         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16810 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16811         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
16812 $as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
16813       fi
16814     fi
16815   fi
16816 
16817 
16818   if test "x$VS_ENV_CMD" = x; then
16819     WIN_SDK_BASE="C:/Program Files (x86)/Microsoft SDKs/Windows/v7.1/Bin"
16820     METHOD="well-known name"
16821 
16822   windows_path="$WIN_SDK_BASE"
16823   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16824     unix_path=`$CYGPATH -u "$windows_path"`
16825     WIN_SDK_BASE="$unix_path"
16826   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16827     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16828     WIN_SDK_BASE="$unix_path"
16829   fi
16830 
16831     if test -d "$WIN_SDK_BASE"; then
16832       # There have been cases of partial or broken SDK installations. A missing
16833       # lib dir is not going to work.
16834       if test ! -d "$WIN_SDK_BASE/../lib"; then
16835         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16836 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16837         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
16838 $as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
16839       elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
16840         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16841 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16842         VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
16843         if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
16844           VS_ENV_ARGS="/x86"
16845         else
16846           VS_ENV_ARGS="/x64"
16847         fi
16848       else
16849         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16850 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16851         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
16852 $as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
16853       fi
16854     fi
16855   fi
16856 
16857 
16858   if test "x$VS_ENV_CMD" != x; then
16859     # We have found a Visual Studio environment on disk, let's extract variables from the vsvars bat file.
16860 
16861   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16862 
16863   # First separate the path from the arguments. This will split at the first
16864   # space.
16865   complete="$VS_ENV_CMD"
16866   path="${complete%% *}"
16867   tmp="$complete EOL"
16868   arguments="${tmp#* }"
16869 
16870   # Input might be given as Windows format, start by converting to
16871   # unix format.
16872   new_path=`$CYGPATH -u "$path"`
16873 
16874   # Now try to locate executable using which
16875   new_path=`$WHICH "$new_path" 2> /dev/null`
16876   # bat and cmd files are not always considered executable in cygwin causing which
16877   # to not find them
16878   if test "x$new_path" = x \
16879            && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16880            && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16881     new_path=`$CYGPATH -u "$path"`
16882   fi
16883   if test "x$new_path" = x; then
16884     # Oops. Which didn't find the executable.
16885     # The splitting of arguments from the executable at a space might have been incorrect,
16886     # since paths with space are more likely in Windows. Give it another try with the whole
16887     # argument.
16888     path="$complete"
16889     arguments="EOL"
16890     new_path=`$CYGPATH -u "$path"`
16891     new_path=`$WHICH "$new_path" 2> /dev/null`
16892     # bat and cmd files are not always considered executable in cygwin causing which
16893     # to not find them
16894     if test "x$new_path" = x \
16895              && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16896              && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16897       new_path=`$CYGPATH -u "$path"`
16898     fi
16899     if test "x$new_path" = x; then
16900       # It's still not found. Now this is an unrecoverable error.
16901       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
16902 $as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
16903       has_space=`$ECHO "$complete" | $GREP " "`
16904       if test "x$has_space" != x; then
16905         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16906 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16907       fi
16908       as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
16909     fi
16910   fi
16911 
16912   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16913   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16914   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16915   # "foo.exe" is OK but "foo" is an error.
16916   #
16917   # This test is therefore slightly more accurate than "test -f" to check for file precense.
16918   # It is also a way to make sure we got the proper file name for the real test later on.
16919   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16920   if test "x$test_shortpath" = x; then
16921     # Short path failed, file does not exist as specified.
16922     # Try adding .exe or .cmd
16923     if test -f "${new_path}.exe"; then
16924        input_to_shortpath="${new_path}.exe"
16925     elif test -f "${new_path}.cmd"; then
16926        input_to_shortpath="${new_path}.cmd"
16927     else
16928       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&5
16929 $as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&6;}
16930       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
16931 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
16932       as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
16933     fi
16934   else
16935     input_to_shortpath="$new_path"
16936   fi
16937 
16938   # Call helper function which possibly converts this using DOS-style short mode.
16939   # If so, the updated path is stored in $new_path.
16940   new_path="$input_to_shortpath"
16941 
16942   input_path="$input_to_shortpath"
16943   # Check if we need to convert this using DOS-style short mode. If the path
16944   # contains just simple characters, use it. Otherwise (spaces, weird characters),
16945   # take no chances and rewrite it.
16946   # Note: m4 eats our [], so we need to use [ and ] instead.
16947   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16948   if test "x$has_forbidden_chars" != x; then
16949     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16950     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16951     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16952     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16953       # Going to short mode and back again did indeed matter. Since short mode is
16954       # case insensitive, let's make it lowercase to improve readability.
16955       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16956       # Now convert it back to Unix-stile (cygpath)
16957       input_path=`$CYGPATH -u "$shortmode_path"`
16958       new_path="$input_path"
16959     fi
16960   fi
16961 
16962   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16963   if test "x$test_cygdrive_prefix" = x; then
16964     # As a simple fix, exclude /usr/bin since it's not a real path.
16965     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
16966       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16967       # a path prefixed by /cygdrive for fixpath to work.
16968       new_path="$CYGWIN_ROOT_PATH$input_path"
16969     fi
16970   fi
16971 
16972   # remove trailing .exe if any
16973   new_path="${new_path/%.exe/}"
16974 
16975   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16976 
16977   # First separate the path from the arguments. This will split at the first
16978   # space.
16979   complete="$VS_ENV_CMD"
16980   path="${complete%% *}"
16981   tmp="$complete EOL"
16982   arguments="${tmp#* }"
16983 
16984   # Input might be given as Windows format, start by converting to
16985   # unix format.
16986   new_path="$path"
16987 
16988   windows_path="$new_path"
16989   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16990     unix_path=`$CYGPATH -u "$windows_path"`
16991     new_path="$unix_path"
16992   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16993     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16994     new_path="$unix_path"
16995   fi
16996 
16997 
16998   # Now try to locate executable using which
16999   new_path=`$WHICH "$new_path" 2> /dev/null`
17000 
17001   if test "x$new_path" = x; then
17002     # Oops. Which didn't find the executable.
17003     # The splitting of arguments from the executable at a space might have been incorrect,
17004     # since paths with space are more likely in Windows. Give it another try with the whole
17005     # argument.
17006     path="$complete"
17007     arguments="EOL"
17008     new_path="$path"
17009 
17010   windows_path="$new_path"
17011   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17012     unix_path=`$CYGPATH -u "$windows_path"`
17013     new_path="$unix_path"
17014   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17015     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17016     new_path="$unix_path"
17017   fi
17018 
17019 
17020     new_path=`$WHICH "$new_path" 2> /dev/null`
17021 
17022     if test "x$new_path" = x; then
17023       # It's still not found. Now this is an unrecoverable error.
17024       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
17025 $as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
17026       has_space=`$ECHO "$complete" | $GREP " "`
17027       if test "x$has_space" != x; then
17028         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17029 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17030       fi
17031       as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
17032     fi
17033   fi
17034 
17035   # Now new_path has a complete unix path to the binary
17036   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
17037     # Keep paths in /bin as-is, but remove trailing .exe if any
17038     new_path="${new_path/%.exe/}"
17039     # Do not save /bin paths to all_fixpath_prefixes!
17040   else
17041     # Not in mixed or Windows style, start by that.
17042     new_path=`cmd //c echo $new_path`
17043 
17044   input_path="$new_path"
17045   # Check if we need to convert this using DOS-style short mode. If the path
17046   # contains just simple characters, use it. Otherwise (spaces, weird characters),
17047   # take no chances and rewrite it.
17048   # Note: m4 eats our [], so we need to use [ and ] instead.
17049   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17050   if test "x$has_forbidden_chars" != x; then
17051     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17052     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17053   fi
17054 
17055     # Output is in $new_path
17056 
17057   windows_path="$new_path"
17058   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17059     unix_path=`$CYGPATH -u "$windows_path"`
17060     new_path="$unix_path"
17061   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17062     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17063     new_path="$unix_path"
17064   fi
17065 
17066     # remove trailing .exe if any
17067     new_path="${new_path/%.exe/}"
17068 
17069     # Save the first 10 bytes of this path to the storage, so fixpath can work.
17070     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17071   fi
17072 
17073   else
17074     # We're on a posix platform. Hooray! :)
17075     # First separate the path from the arguments. This will split at the first
17076     # space.
17077     complete="$VS_ENV_CMD"
17078     path="${complete%% *}"
17079     tmp="$complete EOL"
17080     arguments="${tmp#* }"
17081 
17082     # Cannot rely on the command "which" here since it doesn't always work.
17083     is_absolute_path=`$ECHO "$path" | $GREP ^/`
17084     if test -z "$is_absolute_path"; then
17085       # Path to executable is not absolute. Find it.
17086       IFS_save="$IFS"
17087       IFS=:
17088       for p in $PATH; do
17089         if test -f "$p/$path" && test -x "$p/$path"; then
17090           new_path="$p/$path"
17091           break
17092         fi
17093       done
17094       IFS="$IFS_save"
17095     else
17096       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving VS_ENV_CMD (as $path) failed, using $path directly." >&5
17097 $as_echo "$as_me: Resolving VS_ENV_CMD (as $path) failed, using $path directly." >&6;}
17098       new_path="$path"
17099     fi
17100 
17101     if test "x$new_path" = x; then
17102         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
17103 $as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
17104         has_space=`$ECHO "$complete" | $GREP " "`
17105         if test "x$has_space" != x; then
17106           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
17107 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
17108         fi
17109         as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
17110       fi
17111   fi
17112 
17113       # Now join together the path and the arguments once again
17114       if test "x$arguments" != xEOL; then
17115         new_complete="$new_path ${arguments% *}"
17116       else
17117         new_complete="$new_path"
17118       fi
17119 
17120   if test "x$complete" != "x$new_complete"; then
17121       VS_ENV_CMD="$new_complete"
17122       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting VS_ENV_CMD to \"$new_complete\"" >&5
17123 $as_echo "$as_me: Rewriting VS_ENV_CMD to \"$new_complete\"" >&6;}
17124     fi
17125 
17126 
17127     # Lets extract the variables that are set by vcvarsall.bat/vsvars32.bat/vsvars64.bat
17128     { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to extract Visual Studio environment variables" >&5
17129 $as_echo "$as_me: Trying to extract Visual Studio environment variables" >&6;}
17130     cd $OUTPUT_ROOT
17131     # FIXME: The code betweeen ---- was inlined from a separate script and is not properly adapted
17132     # to autoconf standards.
17133 
17134     #----
17135 
17136     # Cannot use the VS10 setup script directly (since it only updates the DOS subshell environment)
17137     # but calculate the difference in Cygwin environment before/after running it and then
17138     # apply the diff.
17139 
17140     if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
17141       _vs10varsall=`cygpath -a -m -s "$VS_ENV_CMD"`
17142       _dosvs10varsall=`cygpath -a -w -s $_vs10varsall`
17143       _dosbash=`cygpath -a -w -s \`which bash\`.*`
17144     else
17145       _dosvs10varsall=`cmd //c echo $VS_ENV_CMD`
17146       _dosbash=`cmd //c echo \`which bash\``
17147     fi
17148 
17149     # generate the set of exported vars before/after the vs10 setup
17150     $ECHO "@echo off"                                           >  localdevenvtmp.bat
17151     $ECHO "$_dosbash -c \"export -p\" > localdevenvtmp.export0" >> localdevenvtmp.bat
17152     $ECHO "call $_dosvs10varsall $VS_ENV_ARGS"                  >> localdevenvtmp.bat
17153     $ECHO "$_dosbash -c \"export -p\" > localdevenvtmp.export1" >> localdevenvtmp.bat
17154 
17155     # Now execute the newly created bat file.
17156     # The | cat is to stop SetEnv.Cmd to mess with system colors on msys
17157     cmd /c localdevenvtmp.bat | cat
17158 
17159     # apply the diff (less some non-vs10 vars named by "!")
17160     $SORT localdevenvtmp.export0 | $GREP -v "!" > localdevenvtmp.export0.sort
17161     $SORT localdevenvtmp.export1 | $GREP -v "!" > localdevenvtmp.export1.sort
17162     $COMM -1 -3 localdevenvtmp.export0.sort localdevenvtmp.export1.sort > localdevenv.sh
17163 
17164     # cleanup
17165     $RM localdevenvtmp*
17166     #----
17167     cd $CURDIR
17168     if test ! -s $OUTPUT_ROOT/localdevenv.sh; then
17169       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17170 $as_echo "no" >&6; }
17171       { $as_echo "$as_me:${as_lineno-$LINENO}: Could not succesfully extract the envionment variables needed for the VS setup." >&5
17172 $as_echo "$as_me: Could not succesfully extract the envionment variables needed for the VS setup." >&6;}
17173       { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
17174 $as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
17175       { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
17176 $as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
17177       as_fn_error $? "Cannot continue" "$LINENO" 5
17178     fi
17179 
17180     # Now set all paths and other env variables. This will allow the rest of
17181     # the configure script to find and run the compiler in the proper way.
17182     { $as_echo "$as_me:${as_lineno-$LINENO}: Setting extracted environment variables" >&5
17183 $as_echo "$as_me: Setting extracted environment variables" >&6;}
17184     . $OUTPUT_ROOT/localdevenv.sh
17185   else
17186     # We did not find a vsvars bat file, let's hope we are run from a VS command prompt.
17187     { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio installation, checking current environment" >&5
17188 $as_echo "$as_me: Cannot locate a valid Visual Studio installation, checking current environment" >&6;}
17189   fi
17190 
17191   # At this point, we should have corrent variables in the environment, or we can't continue.
17192   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Visual Studio variables" >&5
17193 $as_echo_n "checking for Visual Studio variables... " >&6; }
17194 
17195   if test "x$VCINSTALLDIR" != x || test "x$WindowsSDKDir" != x || test "x$WINDOWSSDKDIR" != x; then
17196     if test "x$INCLUDE" = x || test "x$LIB" = x; then
17197       { $as_echo "$as_me:${as_lineno-$LINENO}: result: present but broken" >&5
17198 $as_echo "present but broken" >&6; }
17199       as_fn_error $? "Your VC command prompt seems broken, INCLUDE and/or LIB is missing." "$LINENO" 5
17200     else
17201       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
17202 $as_echo "ok" >&6; }
17203       # Remove any trailing \ from INCLUDE and LIB to avoid trouble in spec.gmk.
17204       VS_INCLUDE=`$ECHO "$INCLUDE" | $SED 's/\\\\$//'`
17205       VS_LIB=`$ECHO "$LIB" | $SED 's/\\\\$//'`
17206       VS_PATH="$PATH"
17207 
17208 
17209 
17210     fi
17211   else
17212     { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
17213 $as_echo "not found" >&6; }
17214 
17215     if test "x$VS_ENV_CMD" = x; then
17216       { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&5
17217 $as_echo "$as_me: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&6;}
17218       { $as_echo "$as_me:${as_lineno-$LINENO}: nor is this script run from a Visual Studio command prompt." >&5
17219 $as_echo "$as_me: nor is this script run from a Visual Studio command prompt." >&6;}
17220     else
17221       { $as_echo "$as_me:${as_lineno-$LINENO}: Running the extraction script failed." >&5
17222 $as_echo "$as_me: Running the extraction script failed." >&6;}
17223     fi
17224     { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
17225 $as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
17226     { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
17227 $as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
17228     as_fn_error $? "Cannot continue" "$LINENO" 5
17229   fi
17230 
17231   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
17232 $as_echo_n "checking for msvcr100.dll... " >&6; }
17233 
17234 # Check whether --with-msvcr-dll was given.
17235 if test "${with_msvcr_dll+set}" = set; then :
17236   withval=$with_msvcr_dll;
17237 fi
17238 
17239   if test "x$with_msvcr_dll" != x; then
17240     MSVCR_DLL="$with_msvcr_dll"
17241   else
17242     if test "x$VCINSTALLDIR" != x; then
17243       if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
17244         MSVCR_DLL=`find "$VCINSTALLDIR" -name msvcr100.dll | grep x64 | head --lines 1`
17245       else
17246         MSVCR_DLL=`find "$VCINSTALLDIR" -name msvcr100.dll | grep x86 | grep -v ia64 | grep -v x64 | head --lines 1`
17247         if test "x$MSVCR_DLL" = x; then
17248           MSVCR_DLL=`find "$VCINSTALLDIR" -name msvcr100.dll | head --lines 1`
17249         fi
17250       fi
17251       if test "x$MSVCR_DLL" != x; then
17252         { $as_echo "$as_me:${as_lineno-$LINENO}: msvcr100.dll found in VCINSTALLDIR: $VCINSTALLDIR" >&5
17253 $as_echo "$as_me: msvcr100.dll found in VCINSTALLDIR: $VCINSTALLDIR" >&6;}
17254       else
17255         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: msvcr100.dll not found in VCINSTALLDIR: $VCINSTALLDIR" >&5
17256 $as_echo "$as_me: Warning: msvcr100.dll not found in VCINSTALLDIR: $VCINSTALLDIR" >&6;}
17257       fi
17258     fi
17259     # Try some fallback alternatives
17260     if test "x$MSVCR_DLL" = x; then
17261       # If visual studio express is installed, there is usually one with the debugger
17262       if test "x$VS100COMNTOOLS" != x; then
17263         if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
17264           MSVCR_DLL=`find "$VS100COMNTOOLS/.." -name msvcr100.dll | grep -i x64 | head --lines 1`
17265           { $as_echo "$as_me:${as_lineno-$LINENO}: msvcr100.dll found in $VS100COMNTOOLS..: $VS100COMNTOOLS.." >&5
17266 $as_echo "$as_me: msvcr100.dll found in $VS100COMNTOOLS..: $VS100COMNTOOLS.." >&6;}
17267         fi
17268       fi
17269     fi
17270     if test "x$MSVCR_DLL" = x; then
17271       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
17272         # Fallback for 32bit builds, look in the windows directory.
17273         if test -f "$SYSTEMROOT/system32/msvcr100.dll"; then
17274           { $as_echo "$as_me:${as_lineno-$LINENO}: msvcr100.dll found in $SYSTEMROOT/system32" >&5
17275 $as_echo "$as_me: msvcr100.dll found in $SYSTEMROOT/system32" >&6;}
17276           MSVCR_DLL="$SYSTEMROOT/system32/msvcr100.dll"
17277         fi
17278       fi
17279     fi
17280   fi
17281   if test "x$MSVCR_DLL" = x; then
17282     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17283 $as_echo "no" >&6; }
17284     as_fn_error $? "Could not find msvcr100.dll !" "$LINENO" 5
17285   fi
17286   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
17287 $as_echo "$MSVCR_DLL" >&6; }
17288 
17289   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17290 
17291   # Input might be given as Windows format, start by converting to
17292   # unix format.
17293   path="$MSVCR_DLL"
17294   new_path=`$CYGPATH -u "$path"`
17295 
17296   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17297   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17298   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17299   # "foo.exe" is OK but "foo" is an error.
17300   #
17301   # This test is therefore slightly more accurate than "test -f" to check for file precense.
17302   # It is also a way to make sure we got the proper file name for the real test later on.
17303   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17304   if test "x$test_shortpath" = x; then
17305     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&5
17306 $as_echo "$as_me: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&6;}
17307     as_fn_error $? "Cannot locate the the path of MSVCR_DLL" "$LINENO" 5
17308   fi
17309 
17310   # Call helper function which possibly converts this using DOS-style short mode.
17311   # If so, the updated path is stored in $new_path.
17312 
17313   input_path="$new_path"
17314   # Check if we need to convert this using DOS-style short mode. If the path
17315   # contains just simple characters, use it. Otherwise (spaces, weird characters),
17316   # take no chances and rewrite it.
17317   # Note: m4 eats our [], so we need to use [ and ] instead.
17318   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17319   if test "x$has_forbidden_chars" != x; then
17320     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17321     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17322     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17323     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17324       # Going to short mode and back again did indeed matter. Since short mode is
17325       # case insensitive, let's make it lowercase to improve readability.
17326       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17327       # Now convert it back to Unix-stile (cygpath)
17328       input_path=`$CYGPATH -u "$shortmode_path"`
17329       new_path="$input_path"
17330     fi
17331   fi
17332 
17333   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17334   if test "x$test_cygdrive_prefix" = x; then
17335     # As a simple fix, exclude /usr/bin since it's not a real path.
17336     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
17337       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17338       # a path prefixed by /cygdrive for fixpath to work.
17339       new_path="$CYGWIN_ROOT_PATH$input_path"
17340     fi
17341   fi
17342 
17343 
17344   if test "x$path" != "x$new_path"; then
17345     MSVCR_DLL="$new_path"
17346     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVCR_DLL to \"$new_path\"" >&5
17347 $as_echo "$as_me: Rewriting MSVCR_DLL to \"$new_path\"" >&6;}
17348   fi
17349 
17350   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17351 
17352   path="$MSVCR_DLL"
17353   has_colon=`$ECHO $path | $GREP ^.:`
17354   new_path="$path"
17355   if test "x$has_colon" = x; then
17356     # Not in mixed or Windows style, start by that.
17357     new_path=`cmd //c echo $path`
17358   fi
17359 
17360 
17361   input_path="$new_path"
17362   # Check if we need to convert this using DOS-style short mode. If the path
17363   # contains just simple characters, use it. Otherwise (spaces, weird characters),
17364   # take no chances and rewrite it.
17365   # Note: m4 eats our [], so we need to use [ and ] instead.
17366   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17367   if test "x$has_forbidden_chars" != x; then
17368     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17369     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17370   fi
17371 
17372 
17373   windows_path="$new_path"
17374   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17375     unix_path=`$CYGPATH -u "$windows_path"`
17376     new_path="$unix_path"
17377   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17378     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17379     new_path="$unix_path"
17380   fi
17381 
17382   if test "x$path" != "x$new_path"; then
17383     MSVCR_DLL="$new_path"
17384     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVCR_DLL to \"$new_path\"" >&5
17385 $as_echo "$as_me: Rewriting MSVCR_DLL to \"$new_path\"" >&6;}
17386   fi
17387 
17388   # Save the first 10 bytes of this path to the storage, so fixpath can work.
17389   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17390 
17391   else
17392     # We're on a posix platform. Hooray! :)
17393     path="$MSVCR_DLL"
17394     has_space=`$ECHO "$path" | $GREP " "`
17395     if test "x$has_space" != x; then
17396       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&5
17397 $as_echo "$as_me: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&6;}
17398       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
17399     fi
17400 
17401     # Use eval to expand a potential ~
17402     eval path="$path"
17403     if test ! -f "$path" && test ! -d "$path"; then
17404       as_fn_error $? "The path of MSVCR_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
17405     fi
17406 
17407     MSVCR_DLL="`cd "$path"; $THEPWDCMD -L`"
17408   fi
17409 
17410 
17411 
17412 
17413 # Check whether --with-dxsdk was given.
17414 if test "${with_dxsdk+set}" = set; then :
17415   withval=$with_dxsdk;
17416 fi
17417 
17418 
17419 # Check whether --with-dxsdk-lib was given.
17420 if test "${with_dxsdk_lib+set}" = set; then :
17421   withval=$with_dxsdk_lib;
17422 fi
17423 
17424 
17425 # Check whether --with-dxsdk-include was given.
17426 if test "${with_dxsdk_include+set}" = set; then :
17427   withval=$with_dxsdk_include;
17428 fi
17429 
17430 
17431   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DirectX SDK" >&5
17432 $as_echo_n "checking for DirectX SDK... " >&6; }
17433 
17434   if test "x$with_dxsdk" != x; then
17435     dxsdk_path="$with_dxsdk"
17436   elif test "x$DXSDK_DIR" != x; then
17437     dxsdk_path="$DXSDK_DIR"
17438   elif test -d "C:/DXSDK"; then
17439     dxsdk_path="C:/DXSDK"
17440   else
17441     as_fn_error $? "Could not find the DirectX SDK" "$LINENO" 5
17442   fi
17443   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $dxsdk_path" >&5
17444 $as_echo "$dxsdk_path" >&6; }
17445 
17446   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17447 
17448   # Input might be given as Windows format, start by converting to
17449   # unix format.
17450   path="$dxsdk_path"
17451   new_path=`$CYGPATH -u "$path"`
17452 
17453   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17454   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17455   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17456   # "foo.exe" is OK but "foo" is an error.
17457   #
17458   # This test is therefore slightly more accurate than "test -f" to check for file precense.
17459   # It is also a way to make sure we got the proper file name for the real test later on.
17460   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17461   if test "x$test_shortpath" = x; then
17462     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of dxsdk_path, which resolves as \"$path\", is invalid." >&5
17463 $as_echo "$as_me: The path of dxsdk_path, which resolves as \"$path\", is invalid." >&6;}
17464     as_fn_error $? "Cannot locate the the path of dxsdk_path" "$LINENO" 5
17465   fi
17466 
17467   # Call helper function which possibly converts this using DOS-style short mode.
17468   # If so, the updated path is stored in $new_path.
17469 
17470   input_path="$new_path"
17471   # Check if we need to convert this using DOS-style short mode. If the path
17472   # contains just simple characters, use it. Otherwise (spaces, weird characters),
17473   # take no chances and rewrite it.
17474   # Note: m4 eats our [], so we need to use [ and ] instead.
17475   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17476   if test "x$has_forbidden_chars" != x; then
17477     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17478     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17479     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17480     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17481       # Going to short mode and back again did indeed matter. Since short mode is
17482       # case insensitive, let's make it lowercase to improve readability.
17483       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17484       # Now convert it back to Unix-stile (cygpath)
17485       input_path=`$CYGPATH -u "$shortmode_path"`
17486       new_path="$input_path"
17487     fi
17488   fi
17489 
17490   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17491   if test "x$test_cygdrive_prefix" = x; then
17492     # As a simple fix, exclude /usr/bin since it's not a real path.
17493     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
17494       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17495       # a path prefixed by /cygdrive for fixpath to work.
17496       new_path="$CYGWIN_ROOT_PATH$input_path"
17497     fi
17498   fi
17499 
17500 
17501   if test "x$path" != "x$new_path"; then
17502     dxsdk_path="$new_path"
17503     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting dxsdk_path to \"$new_path\"" >&5
17504 $as_echo "$as_me: Rewriting dxsdk_path to \"$new_path\"" >&6;}
17505   fi
17506 
17507   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17508 
17509   path="$dxsdk_path"
17510   has_colon=`$ECHO $path | $GREP ^.:`
17511   new_path="$path"
17512   if test "x$has_colon" = x; then
17513     # Not in mixed or Windows style, start by that.
17514     new_path=`cmd //c echo $path`
17515   fi
17516 
17517 
17518   input_path="$new_path"
17519   # Check if we need to convert this using DOS-style short mode. If the path
17520   # contains just simple characters, use it. Otherwise (spaces, weird characters),
17521   # take no chances and rewrite it.
17522   # Note: m4 eats our [], so we need to use [ and ] instead.
17523   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17524   if test "x$has_forbidden_chars" != x; then
17525     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17526     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17527   fi
17528 
17529 
17530   windows_path="$new_path"
17531   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17532     unix_path=`$CYGPATH -u "$windows_path"`
17533     new_path="$unix_path"
17534   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17535     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17536     new_path="$unix_path"
17537   fi
17538 
17539   if test "x$path" != "x$new_path"; then
17540     dxsdk_path="$new_path"
17541     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting dxsdk_path to \"$new_path\"" >&5
17542 $as_echo "$as_me: Rewriting dxsdk_path to \"$new_path\"" >&6;}
17543   fi
17544 
17545   # Save the first 10 bytes of this path to the storage, so fixpath can work.
17546   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17547 
17548   else
17549     # We're on a posix platform. Hooray! :)
17550     path="$dxsdk_path"
17551     has_space=`$ECHO "$path" | $GREP " "`
17552     if test "x$has_space" != x; then
17553       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of dxsdk_path, which resolves as \"$path\", is invalid." >&5
17554 $as_echo "$as_me: The path of dxsdk_path, which resolves as \"$path\", is invalid." >&6;}
17555       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
17556     fi
17557 
17558     # Use eval to expand a potential ~
17559     eval path="$path"
17560     if test ! -f "$path" && test ! -d "$path"; then
17561       as_fn_error $? "The path of dxsdk_path, which resolves as \"$path\", is not found." "$LINENO" 5
17562     fi
17563 
17564     dxsdk_path="`cd "$path"; $THEPWDCMD -L`"
17565   fi
17566 
17567 
17568   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DirectX SDK lib dir" >&5
17569 $as_echo_n "checking for DirectX SDK lib dir... " >&6; }
17570   if test "x$with_dxsdk_lib" != x; then
17571     DXSDK_LIB_PATH="$with_dxsdk_lib"
17572   elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
17573     DXSDK_LIB_PATH="$dxsdk_path/Lib/x64"
17574   else
17575     DXSDK_LIB_PATH="$dxsdk_path/Lib"
17576   fi
17577   # dsound.lib is linked to in jsoundds
17578   if test ! -f "$DXSDK_LIB_PATH/dsound.lib"; then
17579     as_fn_error $? "Invalid DirectX SDK lib dir" "$LINENO" 5
17580   fi
17581   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DXSDK_LIB_PATH" >&5
17582 $as_echo "$DXSDK_LIB_PATH" >&6; }
17583 
17584   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17585 
17586   # Input might be given as Windows format, start by converting to
17587   # unix format.
17588   path="$DXSDK_LIB_PATH"
17589   new_path=`$CYGPATH -u "$path"`
17590 
17591   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17592   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17593   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17594   # "foo.exe" is OK but "foo" is an error.
17595   #
17596   # This test is therefore slightly more accurate than "test -f" to check for file precense.
17597   # It is also a way to make sure we got the proper file name for the real test later on.
17598   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17599   if test "x$test_shortpath" = x; then
17600     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DXSDK_LIB_PATH, which resolves as \"$path\", is invalid." >&5
17601 $as_echo "$as_me: The path of DXSDK_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
17602     as_fn_error $? "Cannot locate the the path of DXSDK_LIB_PATH" "$LINENO" 5
17603   fi
17604 
17605   # Call helper function which possibly converts this using DOS-style short mode.
17606   # If so, the updated path is stored in $new_path.
17607 
17608   input_path="$new_path"
17609   # Check if we need to convert this using DOS-style short mode. If the path
17610   # contains just simple characters, use it. Otherwise (spaces, weird characters),
17611   # take no chances and rewrite it.
17612   # Note: m4 eats our [], so we need to use [ and ] instead.
17613   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17614   if test "x$has_forbidden_chars" != x; then
17615     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17616     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17617     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17618     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17619       # Going to short mode and back again did indeed matter. Since short mode is
17620       # case insensitive, let's make it lowercase to improve readability.
17621       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17622       # Now convert it back to Unix-stile (cygpath)
17623       input_path=`$CYGPATH -u "$shortmode_path"`
17624       new_path="$input_path"
17625     fi
17626   fi
17627 
17628   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17629   if test "x$test_cygdrive_prefix" = x; then
17630     # As a simple fix, exclude /usr/bin since it's not a real path.
17631     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
17632       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17633       # a path prefixed by /cygdrive for fixpath to work.
17634       new_path="$CYGWIN_ROOT_PATH$input_path"
17635     fi
17636   fi
17637 
17638 
17639   if test "x$path" != "x$new_path"; then
17640     DXSDK_LIB_PATH="$new_path"
17641     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DXSDK_LIB_PATH to \"$new_path\"" >&5
17642 $as_echo "$as_me: Rewriting DXSDK_LIB_PATH to \"$new_path\"" >&6;}
17643   fi
17644 
17645   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17646 
17647   path="$DXSDK_LIB_PATH"
17648   has_colon=`$ECHO $path | $GREP ^.:`
17649   new_path="$path"
17650   if test "x$has_colon" = x; then
17651     # Not in mixed or Windows style, start by that.
17652     new_path=`cmd //c echo $path`
17653   fi
17654 
17655 
17656   input_path="$new_path"
17657   # Check if we need to convert this using DOS-style short mode. If the path
17658   # contains just simple characters, use it. Otherwise (spaces, weird characters),
17659   # take no chances and rewrite it.
17660   # Note: m4 eats our [], so we need to use [ and ] instead.
17661   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17662   if test "x$has_forbidden_chars" != x; then
17663     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17664     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17665   fi
17666 
17667 
17668   windows_path="$new_path"
17669   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17670     unix_path=`$CYGPATH -u "$windows_path"`
17671     new_path="$unix_path"
17672   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17673     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17674     new_path="$unix_path"
17675   fi
17676 
17677   if test "x$path" != "x$new_path"; then
17678     DXSDK_LIB_PATH="$new_path"
17679     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DXSDK_LIB_PATH to \"$new_path\"" >&5
17680 $as_echo "$as_me: Rewriting DXSDK_LIB_PATH to \"$new_path\"" >&6;}
17681   fi
17682 
17683   # Save the first 10 bytes of this path to the storage, so fixpath can work.
17684   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17685 
17686   else
17687     # We're on a posix platform. Hooray! :)
17688     path="$DXSDK_LIB_PATH"
17689     has_space=`$ECHO "$path" | $GREP " "`
17690     if test "x$has_space" != x; then
17691       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DXSDK_LIB_PATH, which resolves as \"$path\", is invalid." >&5
17692 $as_echo "$as_me: The path of DXSDK_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
17693       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
17694     fi
17695 
17696     # Use eval to expand a potential ~
17697     eval path="$path"
17698     if test ! -f "$path" && test ! -d "$path"; then
17699       as_fn_error $? "The path of DXSDK_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
17700     fi
17701 
17702     DXSDK_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
17703   fi
17704 
17705 
17706   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DirectX SDK include dir" >&5
17707 $as_echo_n "checking for DirectX SDK include dir... " >&6; }
17708   if test "x$with_dxsdk_include" != x; then
17709     DXSDK_INCLUDE_PATH="$with_dxsdk_include"
17710   else
17711     DXSDK_INCLUDE_PATH="$dxsdk_path/Include"
17712   fi
17713   # dsound.h is included in jsoundds
17714   if test ! -f "$DXSDK_INCLUDE_PATH/dsound.h"; then
17715     as_fn_error $? "Invalid DirectX SDK lib dir" "$LINENO" 5
17716   fi
17717   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DXSDK_INCLUDE_PATH" >&5
17718 $as_echo "$DXSDK_INCLUDE_PATH" >&6; }
17719 
17720   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17721 
17722   # Input might be given as Windows format, start by converting to
17723   # unix format.
17724   path="$DXSDK_INCLUDE_PATH"
17725   new_path=`$CYGPATH -u "$path"`
17726 
17727   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17728   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17729   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17730   # "foo.exe" is OK but "foo" is an error.
17731   #
17732   # This test is therefore slightly more accurate than "test -f" to check for file precense.
17733   # It is also a way to make sure we got the proper file name for the real test later on.
17734   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17735   if test "x$test_shortpath" = x; then
17736     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DXSDK_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
17737 $as_echo "$as_me: The path of DXSDK_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
17738     as_fn_error $? "Cannot locate the the path of DXSDK_INCLUDE_PATH" "$LINENO" 5
17739   fi
17740 
17741   # Call helper function which possibly converts this using DOS-style short mode.
17742   # If so, the updated path is stored in $new_path.
17743 
17744   input_path="$new_path"
17745   # Check if we need to convert this using DOS-style short mode. If the path
17746   # contains just simple characters, use it. Otherwise (spaces, weird characters),
17747   # take no chances and rewrite it.
17748   # Note: m4 eats our [], so we need to use [ and ] instead.
17749   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17750   if test "x$has_forbidden_chars" != x; then
17751     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17752     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17753     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17754     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17755       # Going to short mode and back again did indeed matter. Since short mode is
17756       # case insensitive, let's make it lowercase to improve readability.
17757       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17758       # Now convert it back to Unix-stile (cygpath)
17759       input_path=`$CYGPATH -u "$shortmode_path"`
17760       new_path="$input_path"
17761     fi
17762   fi
17763 
17764   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17765   if test "x$test_cygdrive_prefix" = x; then
17766     # As a simple fix, exclude /usr/bin since it's not a real path.
17767     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
17768       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17769       # a path prefixed by /cygdrive for fixpath to work.
17770       new_path="$CYGWIN_ROOT_PATH$input_path"
17771     fi
17772   fi
17773 
17774 
17775   if test "x$path" != "x$new_path"; then
17776     DXSDK_INCLUDE_PATH="$new_path"
17777     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DXSDK_INCLUDE_PATH to \"$new_path\"" >&5
17778 $as_echo "$as_me: Rewriting DXSDK_INCLUDE_PATH to \"$new_path\"" >&6;}
17779   fi
17780 
17781   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17782 
17783   path="$DXSDK_INCLUDE_PATH"
17784   has_colon=`$ECHO $path | $GREP ^.:`
17785   new_path="$path"
17786   if test "x$has_colon" = x; then
17787     # Not in mixed or Windows style, start by that.
17788     new_path=`cmd //c echo $path`
17789   fi
17790 
17791 
17792   input_path="$new_path"
17793   # Check if we need to convert this using DOS-style short mode. If the path
17794   # contains just simple characters, use it. Otherwise (spaces, weird characters),
17795   # take no chances and rewrite it.
17796   # Note: m4 eats our [], so we need to use [ and ] instead.
17797   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17798   if test "x$has_forbidden_chars" != x; then
17799     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17800     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17801   fi
17802 
17803 
17804   windows_path="$new_path"
17805   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17806     unix_path=`$CYGPATH -u "$windows_path"`
17807     new_path="$unix_path"
17808   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17809     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17810     new_path="$unix_path"
17811   fi
17812 
17813   if test "x$path" != "x$new_path"; then
17814     DXSDK_INCLUDE_PATH="$new_path"
17815     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DXSDK_INCLUDE_PATH to \"$new_path\"" >&5
17816 $as_echo "$as_me: Rewriting DXSDK_INCLUDE_PATH to \"$new_path\"" >&6;}
17817   fi
17818 
17819   # Save the first 10 bytes of this path to the storage, so fixpath can work.
17820   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17821 
17822   else
17823     # We're on a posix platform. Hooray! :)
17824     path="$DXSDK_INCLUDE_PATH"
17825     has_space=`$ECHO "$path" | $GREP " "`
17826     if test "x$has_space" != x; then
17827       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DXSDK_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
17828 $as_echo "$as_me: The path of DXSDK_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
17829       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
17830     fi
17831 
17832     # Use eval to expand a potential ~
17833     eval path="$path"
17834     if test ! -f "$path" && test ! -d "$path"; then
17835       as_fn_error $? "The path of DXSDK_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
17836     fi
17837 
17838     DXSDK_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
17839   fi
17840 
17841 
17842 
17843 
17844   LDFLAGS_JDK="$LDFLAGS_JDK -libpath:$DXSDK_LIB_PATH"
17845 
17846 fi
17847 
17848 
17849 
17850 # If --build AND --host is set, then the configure script will find any
17851 # cross compilation tools in the PATH. Cross compilation tools
17852 # follows the cross compilation standard where they are prefixed with ${host}.
17853 # For example the binary i686-sun-solaris2.10-gcc
17854 # will cross compile for i686-sun-solaris2.10
17855 # If neither of build and host is not set, then build=host and the
17856 # default compiler found in the path will be used.
17857 # Setting only --host, does not seem to be really supported.
17858 # Please set both --build and --host if you want to cross compile.
17859 
17860 if test "x$COMPILE_TYPE" = "xcross"; then
17861     # Now we to find a C/C++ compiler that can build executables for the build
17862     # platform. We can't use the AC_PROG_CC macro, since it can only be used
17863     # once. Also, we need to do this before adding a tools dir to the path,
17864     # otherwise we might pick up cross-compilers which don't use standard naming.
17865     # Otherwise, we'll set the BUILD_tools to the native tools, but that'll have
17866     # to wait until they are properly discovered.
17867     for ac_prog in cl cc gcc
17868 do
17869   # Extract the first word of "$ac_prog", so it can be a program name with args.
17870 set dummy $ac_prog; ac_word=$2
17871 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17872 $as_echo_n "checking for $ac_word... " >&6; }
17873 if ${ac_cv_path_BUILD_CC+:} false; then :
17874   $as_echo_n "(cached) " >&6
17875 else
17876   case $BUILD_CC in
17877   [\\/]* | ?:[\\/]*)
17878   ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
17879   ;;
17880   *)
17881   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17882 for as_dir in $PATH
17883 do
17884   IFS=$as_save_IFS
17885   test -z "$as_dir" && as_dir=.
17886     for ac_exec_ext in '' $ac_executable_extensions; do
17887   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
17888     ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
17889     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17890     break 2
17891   fi
17892 done
17893   done
17894 IFS=$as_save_IFS
17895 
17896   ;;
17897 esac
17898 fi
17899 BUILD_CC=$ac_cv_path_BUILD_CC
17900 if test -n "$BUILD_CC"; then
17901   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
17902 $as_echo "$BUILD_CC" >&6; }
17903 else
17904   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17905 $as_echo "no" >&6; }
17906 fi
17907 
17908 
17909   test -n "$BUILD_CC" && break
17910 done
17911 
17912 
17913   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17914 
17915   # First separate the path from the arguments. This will split at the first
17916   # space.
17917   complete="$BUILD_CC"
17918   path="${complete%% *}"
17919   tmp="$complete EOL"
17920   arguments="${tmp#* }"
17921 
17922   # Input might be given as Windows format, start by converting to
17923   # unix format.
17924   new_path=`$CYGPATH -u "$path"`
17925 
17926   # Now try to locate executable using which
17927   new_path=`$WHICH "$new_path" 2> /dev/null`
17928   # bat and cmd files are not always considered executable in cygwin causing which
17929   # to not find them
17930   if test "x$new_path" = x \
17931            && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17932            && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17933     new_path=`$CYGPATH -u "$path"`
17934   fi
17935   if test "x$new_path" = x; then
17936     # Oops. Which didn't find the executable.
17937     # The splitting of arguments from the executable at a space might have been incorrect,
17938     # since paths with space are more likely in Windows. Give it another try with the whole
17939     # argument.
17940     path="$complete"
17941     arguments="EOL"
17942     new_path=`$CYGPATH -u "$path"`
17943     new_path=`$WHICH "$new_path" 2> /dev/null`
17944     # bat and cmd files are not always considered executable in cygwin causing which
17945     # to not find them
17946     if test "x$new_path" = x \
17947              && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17948              && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17949       new_path=`$CYGPATH -u "$path"`
17950     fi
17951     if test "x$new_path" = x; then
17952       # It's still not found. Now this is an unrecoverable error.
17953       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
17954 $as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
17955       has_space=`$ECHO "$complete" | $GREP " "`
17956       if test "x$has_space" != x; then
17957         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17958 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17959       fi
17960       as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
17961     fi
17962   fi
17963 
17964   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17965   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17966   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17967   # "foo.exe" is OK but "foo" is an error.
17968   #
17969   # This test is therefore slightly more accurate than "test -f" to check for file precense.
17970   # It is also a way to make sure we got the proper file name for the real test later on.
17971   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17972   if test "x$test_shortpath" = x; then
17973     # Short path failed, file does not exist as specified.
17974     # Try adding .exe or .cmd
17975     if test -f "${new_path}.exe"; then
17976        input_to_shortpath="${new_path}.exe"
17977     elif test -f "${new_path}.cmd"; then
17978        input_to_shortpath="${new_path}.cmd"
17979     else
17980       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&5
17981 $as_echo "$as_me: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&6;}
17982       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
17983 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
17984       as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
17985     fi
17986   else
17987     input_to_shortpath="$new_path"
17988   fi
17989 
17990   # Call helper function which possibly converts this using DOS-style short mode.
17991   # If so, the updated path is stored in $new_path.
17992   new_path="$input_to_shortpath"
17993 
17994   input_path="$input_to_shortpath"
17995   # Check if we need to convert this using DOS-style short mode. If the path
17996   # contains just simple characters, use it. Otherwise (spaces, weird characters),
17997   # take no chances and rewrite it.
17998   # Note: m4 eats our [], so we need to use [ and ] instead.
17999   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18000   if test "x$has_forbidden_chars" != x; then
18001     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18002     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18003     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18004     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18005       # Going to short mode and back again did indeed matter. Since short mode is
18006       # case insensitive, let's make it lowercase to improve readability.
18007       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18008       # Now convert it back to Unix-stile (cygpath)
18009       input_path=`$CYGPATH -u "$shortmode_path"`
18010       new_path="$input_path"
18011     fi
18012   fi
18013 
18014   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18015   if test "x$test_cygdrive_prefix" = x; then
18016     # As a simple fix, exclude /usr/bin since it's not a real path.
18017     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18018       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18019       # a path prefixed by /cygdrive for fixpath to work.
18020       new_path="$CYGWIN_ROOT_PATH$input_path"
18021     fi
18022   fi
18023 
18024   # remove trailing .exe if any
18025   new_path="${new_path/%.exe/}"
18026 
18027   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18028 
18029   # First separate the path from the arguments. This will split at the first
18030   # space.
18031   complete="$BUILD_CC"
18032   path="${complete%% *}"
18033   tmp="$complete EOL"
18034   arguments="${tmp#* }"
18035 
18036   # Input might be given as Windows format, start by converting to
18037   # unix format.
18038   new_path="$path"
18039 
18040   windows_path="$new_path"
18041   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18042     unix_path=`$CYGPATH -u "$windows_path"`
18043     new_path="$unix_path"
18044   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18045     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18046     new_path="$unix_path"
18047   fi
18048 
18049 
18050   # Now try to locate executable using which
18051   new_path=`$WHICH "$new_path" 2> /dev/null`
18052 
18053   if test "x$new_path" = x; then
18054     # Oops. Which didn't find the executable.
18055     # The splitting of arguments from the executable at a space might have been incorrect,
18056     # since paths with space are more likely in Windows. Give it another try with the whole
18057     # argument.
18058     path="$complete"
18059     arguments="EOL"
18060     new_path="$path"
18061 
18062   windows_path="$new_path"
18063   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18064     unix_path=`$CYGPATH -u "$windows_path"`
18065     new_path="$unix_path"
18066   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18067     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18068     new_path="$unix_path"
18069   fi
18070 
18071 
18072     new_path=`$WHICH "$new_path" 2> /dev/null`
18073 
18074     if test "x$new_path" = x; then
18075       # It's still not found. Now this is an unrecoverable error.
18076       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
18077 $as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
18078       has_space=`$ECHO "$complete" | $GREP " "`
18079       if test "x$has_space" != x; then
18080         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18081 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18082       fi
18083       as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
18084     fi
18085   fi
18086 
18087   # Now new_path has a complete unix path to the binary
18088   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18089     # Keep paths in /bin as-is, but remove trailing .exe if any
18090     new_path="${new_path/%.exe/}"
18091     # Do not save /bin paths to all_fixpath_prefixes!
18092   else
18093     # Not in mixed or Windows style, start by that.
18094     new_path=`cmd //c echo $new_path`
18095 
18096   input_path="$new_path"
18097   # Check if we need to convert this using DOS-style short mode. If the path
18098   # contains just simple characters, use it. Otherwise (spaces, weird characters),
18099   # take no chances and rewrite it.
18100   # Note: m4 eats our [], so we need to use [ and ] instead.
18101   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18102   if test "x$has_forbidden_chars" != x; then
18103     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18104     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18105   fi
18106 
18107     # Output is in $new_path
18108 
18109   windows_path="$new_path"
18110   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18111     unix_path=`$CYGPATH -u "$windows_path"`
18112     new_path="$unix_path"
18113   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18114     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18115     new_path="$unix_path"
18116   fi
18117 
18118     # remove trailing .exe if any
18119     new_path="${new_path/%.exe/}"
18120 
18121     # Save the first 10 bytes of this path to the storage, so fixpath can work.
18122     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18123   fi
18124 
18125   else
18126     # We're on a posix platform. Hooray! :)
18127     # First separate the path from the arguments. This will split at the first
18128     # space.
18129     complete="$BUILD_CC"
18130     path="${complete%% *}"
18131     tmp="$complete EOL"
18132     arguments="${tmp#* }"
18133 
18134     # Cannot rely on the command "which" here since it doesn't always work.
18135     is_absolute_path=`$ECHO "$path" | $GREP ^/`
18136     if test -z "$is_absolute_path"; then
18137       # Path to executable is not absolute. Find it.
18138       IFS_save="$IFS"
18139       IFS=:
18140       for p in $PATH; do
18141         if test -f "$p/$path" && test -x "$p/$path"; then
18142           new_path="$p/$path"
18143           break
18144         fi
18145       done
18146       IFS="$IFS_save"
18147     else
18148       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving BUILD_CC (as $path) failed, using $path directly." >&5
18149 $as_echo "$as_me: Resolving BUILD_CC (as $path) failed, using $path directly." >&6;}
18150       new_path="$path"
18151     fi
18152 
18153     if test "x$new_path" = x; then
18154         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
18155 $as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
18156         has_space=`$ECHO "$complete" | $GREP " "`
18157         if test "x$has_space" != x; then
18158           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18159 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18160         fi
18161         as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
18162       fi
18163   fi
18164 
18165       # Now join together the path and the arguments once again
18166       if test "x$arguments" != xEOL; then
18167         new_complete="$new_path ${arguments% *}"
18168       else
18169         new_complete="$new_path"
18170       fi
18171 
18172   if test "x$complete" != "x$new_complete"; then
18173       BUILD_CC="$new_complete"
18174       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CC to \"$new_complete\"" >&5
18175 $as_echo "$as_me: Rewriting BUILD_CC to \"$new_complete\"" >&6;}
18176     fi
18177 
18178     for ac_prog in cl CC g++
18179 do
18180   # Extract the first word of "$ac_prog", so it can be a program name with args.
18181 set dummy $ac_prog; ac_word=$2
18182 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18183 $as_echo_n "checking for $ac_word... " >&6; }
18184 if ${ac_cv_path_BUILD_CXX+:} false; then :
18185   $as_echo_n "(cached) " >&6
18186 else
18187   case $BUILD_CXX in
18188   [\\/]* | ?:[\\/]*)
18189   ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
18190   ;;
18191   *)
18192   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18193 for as_dir in $PATH
18194 do
18195   IFS=$as_save_IFS
18196   test -z "$as_dir" && as_dir=.
18197     for ac_exec_ext in '' $ac_executable_extensions; do
18198   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
18199     ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
18200     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18201     break 2
18202   fi
18203 done
18204   done
18205 IFS=$as_save_IFS
18206 
18207   ;;
18208 esac
18209 fi
18210 BUILD_CXX=$ac_cv_path_BUILD_CXX
18211 if test -n "$BUILD_CXX"; then
18212   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
18213 $as_echo "$BUILD_CXX" >&6; }
18214 else
18215   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18216 $as_echo "no" >&6; }
18217 fi
18218 
18219 
18220   test -n "$BUILD_CXX" && break
18221 done
18222 
18223 
18224   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18225 
18226   # First separate the path from the arguments. This will split at the first
18227   # space.
18228   complete="$BUILD_CXX"
18229   path="${complete%% *}"
18230   tmp="$complete EOL"
18231   arguments="${tmp#* }"
18232 
18233   # Input might be given as Windows format, start by converting to
18234   # unix format.
18235   new_path=`$CYGPATH -u "$path"`
18236 
18237   # Now try to locate executable using which
18238   new_path=`$WHICH "$new_path" 2> /dev/null`
18239   # bat and cmd files are not always considered executable in cygwin causing which
18240   # to not find them
18241   if test "x$new_path" = x \
18242            && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18243            && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18244     new_path=`$CYGPATH -u "$path"`
18245   fi
18246   if test "x$new_path" = x; then
18247     # Oops. Which didn't find the executable.
18248     # The splitting of arguments from the executable at a space might have been incorrect,
18249     # since paths with space are more likely in Windows. Give it another try with the whole
18250     # argument.
18251     path="$complete"
18252     arguments="EOL"
18253     new_path=`$CYGPATH -u "$path"`
18254     new_path=`$WHICH "$new_path" 2> /dev/null`
18255     # bat and cmd files are not always considered executable in cygwin causing which
18256     # to not find them
18257     if test "x$new_path" = x \
18258              && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18259              && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18260       new_path=`$CYGPATH -u "$path"`
18261     fi
18262     if test "x$new_path" = x; then
18263       # It's still not found. Now this is an unrecoverable error.
18264       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
18265 $as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
18266       has_space=`$ECHO "$complete" | $GREP " "`
18267       if test "x$has_space" != x; then
18268         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18269 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18270       fi
18271       as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
18272     fi
18273   fi
18274 
18275   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18276   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18277   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18278   # "foo.exe" is OK but "foo" is an error.
18279   #
18280   # This test is therefore slightly more accurate than "test -f" to check for file precense.
18281   # It is also a way to make sure we got the proper file name for the real test later on.
18282   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18283   if test "x$test_shortpath" = x; then
18284     # Short path failed, file does not exist as specified.
18285     # Try adding .exe or .cmd
18286     if test -f "${new_path}.exe"; then
18287        input_to_shortpath="${new_path}.exe"
18288     elif test -f "${new_path}.cmd"; then
18289        input_to_shortpath="${new_path}.cmd"
18290     else
18291       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&5
18292 $as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&6;}
18293       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18294 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18295       as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
18296     fi
18297   else
18298     input_to_shortpath="$new_path"
18299   fi
18300 
18301   # Call helper function which possibly converts this using DOS-style short mode.
18302   # If so, the updated path is stored in $new_path.
18303   new_path="$input_to_shortpath"
18304 
18305   input_path="$input_to_shortpath"
18306   # Check if we need to convert this using DOS-style short mode. If the path
18307   # contains just simple characters, use it. Otherwise (spaces, weird characters),
18308   # take no chances and rewrite it.
18309   # Note: m4 eats our [], so we need to use [ and ] instead.
18310   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18311   if test "x$has_forbidden_chars" != x; then
18312     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18313     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18314     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18315     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18316       # Going to short mode and back again did indeed matter. Since short mode is
18317       # case insensitive, let's make it lowercase to improve readability.
18318       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18319       # Now convert it back to Unix-stile (cygpath)
18320       input_path=`$CYGPATH -u "$shortmode_path"`
18321       new_path="$input_path"
18322     fi
18323   fi
18324 
18325   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18326   if test "x$test_cygdrive_prefix" = x; then
18327     # As a simple fix, exclude /usr/bin since it's not a real path.
18328     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18329       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18330       # a path prefixed by /cygdrive for fixpath to work.
18331       new_path="$CYGWIN_ROOT_PATH$input_path"
18332     fi
18333   fi
18334 
18335   # remove trailing .exe if any
18336   new_path="${new_path/%.exe/}"
18337 
18338   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18339 
18340   # First separate the path from the arguments. This will split at the first
18341   # space.
18342   complete="$BUILD_CXX"
18343   path="${complete%% *}"
18344   tmp="$complete EOL"
18345   arguments="${tmp#* }"
18346 
18347   # Input might be given as Windows format, start by converting to
18348   # unix format.
18349   new_path="$path"
18350 
18351   windows_path="$new_path"
18352   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18353     unix_path=`$CYGPATH -u "$windows_path"`
18354     new_path="$unix_path"
18355   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18356     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18357     new_path="$unix_path"
18358   fi
18359 
18360 
18361   # Now try to locate executable using which
18362   new_path=`$WHICH "$new_path" 2> /dev/null`
18363 
18364   if test "x$new_path" = x; then
18365     # Oops. Which didn't find the executable.
18366     # The splitting of arguments from the executable at a space might have been incorrect,
18367     # since paths with space are more likely in Windows. Give it another try with the whole
18368     # argument.
18369     path="$complete"
18370     arguments="EOL"
18371     new_path="$path"
18372 
18373   windows_path="$new_path"
18374   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18375     unix_path=`$CYGPATH -u "$windows_path"`
18376     new_path="$unix_path"
18377   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18378     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18379     new_path="$unix_path"
18380   fi
18381 
18382 
18383     new_path=`$WHICH "$new_path" 2> /dev/null`
18384 
18385     if test "x$new_path" = x; then
18386       # It's still not found. Now this is an unrecoverable error.
18387       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
18388 $as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
18389       has_space=`$ECHO "$complete" | $GREP " "`
18390       if test "x$has_space" != x; then
18391         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18392 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18393       fi
18394       as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
18395     fi
18396   fi
18397 
18398   # Now new_path has a complete unix path to the binary
18399   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18400     # Keep paths in /bin as-is, but remove trailing .exe if any
18401     new_path="${new_path/%.exe/}"
18402     # Do not save /bin paths to all_fixpath_prefixes!
18403   else
18404     # Not in mixed or Windows style, start by that.
18405     new_path=`cmd //c echo $new_path`
18406 
18407   input_path="$new_path"
18408   # Check if we need to convert this using DOS-style short mode. If the path
18409   # contains just simple characters, use it. Otherwise (spaces, weird characters),
18410   # take no chances and rewrite it.
18411   # Note: m4 eats our [], so we need to use [ and ] instead.
18412   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18413   if test "x$has_forbidden_chars" != x; then
18414     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18415     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18416   fi
18417 
18418     # Output is in $new_path
18419 
18420   windows_path="$new_path"
18421   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18422     unix_path=`$CYGPATH -u "$windows_path"`
18423     new_path="$unix_path"
18424   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18425     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18426     new_path="$unix_path"
18427   fi
18428 
18429     # remove trailing .exe if any
18430     new_path="${new_path/%.exe/}"
18431 
18432     # Save the first 10 bytes of this path to the storage, so fixpath can work.
18433     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18434   fi
18435 
18436   else
18437     # We're on a posix platform. Hooray! :)
18438     # First separate the path from the arguments. This will split at the first
18439     # space.
18440     complete="$BUILD_CXX"
18441     path="${complete%% *}"
18442     tmp="$complete EOL"
18443     arguments="${tmp#* }"
18444 
18445     # Cannot rely on the command "which" here since it doesn't always work.
18446     is_absolute_path=`$ECHO "$path" | $GREP ^/`
18447     if test -z "$is_absolute_path"; then
18448       # Path to executable is not absolute. Find it.
18449       IFS_save="$IFS"
18450       IFS=:
18451       for p in $PATH; do
18452         if test -f "$p/$path" && test -x "$p/$path"; then
18453           new_path="$p/$path"
18454           break
18455         fi
18456       done
18457       IFS="$IFS_save"
18458     else
18459       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving BUILD_CXX (as $path) failed, using $path directly." >&5
18460 $as_echo "$as_me: Resolving BUILD_CXX (as $path) failed, using $path directly." >&6;}
18461       new_path="$path"
18462     fi
18463 
18464     if test "x$new_path" = x; then
18465         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
18466 $as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
18467         has_space=`$ECHO "$complete" | $GREP " "`
18468         if test "x$has_space" != x; then
18469           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18470 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18471         fi
18472         as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
18473       fi
18474   fi
18475 
18476       # Now join together the path and the arguments once again
18477       if test "x$arguments" != xEOL; then
18478         new_complete="$new_path ${arguments% *}"
18479       else
18480         new_complete="$new_path"
18481       fi
18482 
18483   if test "x$complete" != "x$new_complete"; then
18484       BUILD_CXX="$new_complete"
18485       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CXX to \"$new_complete\"" >&5
18486 $as_echo "$as_me: Rewriting BUILD_CXX to \"$new_complete\"" >&6;}
18487     fi
18488 
18489     # Extract the first word of "ld", so it can be a program name with args.
18490 set dummy ld; ac_word=$2
18491 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18492 $as_echo_n "checking for $ac_word... " >&6; }
18493 if ${ac_cv_path_BUILD_LD+:} false; then :
18494   $as_echo_n "(cached) " >&6
18495 else
18496   case $BUILD_LD in
18497   [\\/]* | ?:[\\/]*)
18498   ac_cv_path_BUILD_LD="$BUILD_LD" # Let the user override the test with a path.
18499   ;;
18500   *)
18501   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18502 for as_dir in $PATH
18503 do
18504   IFS=$as_save_IFS
18505   test -z "$as_dir" && as_dir=.
18506     for ac_exec_ext in '' $ac_executable_extensions; do
18507   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
18508     ac_cv_path_BUILD_LD="$as_dir/$ac_word$ac_exec_ext"
18509     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18510     break 2
18511   fi
18512 done
18513   done
18514 IFS=$as_save_IFS
18515 
18516   ;;
18517 esac
18518 fi
18519 BUILD_LD=$ac_cv_path_BUILD_LD
18520 if test -n "$BUILD_LD"; then
18521   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_LD" >&5
18522 $as_echo "$BUILD_LD" >&6; }
18523 else
18524   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18525 $as_echo "no" >&6; }
18526 fi
18527 
18528 
18529 
18530   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18531 
18532   # First separate the path from the arguments. This will split at the first
18533   # space.
18534   complete="$BUILD_LD"
18535   path="${complete%% *}"
18536   tmp="$complete EOL"
18537   arguments="${tmp#* }"
18538 
18539   # Input might be given as Windows format, start by converting to
18540   # unix format.
18541   new_path=`$CYGPATH -u "$path"`
18542 
18543   # Now try to locate executable using which
18544   new_path=`$WHICH "$new_path" 2> /dev/null`
18545   # bat and cmd files are not always considered executable in cygwin causing which
18546   # to not find them
18547   if test "x$new_path" = x \
18548            && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18549            && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18550     new_path=`$CYGPATH -u "$path"`
18551   fi
18552   if test "x$new_path" = x; then
18553     # Oops. Which didn't find the executable.
18554     # The splitting of arguments from the executable at a space might have been incorrect,
18555     # since paths with space are more likely in Windows. Give it another try with the whole
18556     # argument.
18557     path="$complete"
18558     arguments="EOL"
18559     new_path=`$CYGPATH -u "$path"`
18560     new_path=`$WHICH "$new_path" 2> /dev/null`
18561     # bat and cmd files are not always considered executable in cygwin causing which
18562     # to not find them
18563     if test "x$new_path" = x \
18564              && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18565              && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18566       new_path=`$CYGPATH -u "$path"`
18567     fi
18568     if test "x$new_path" = x; then
18569       # It's still not found. Now this is an unrecoverable error.
18570       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
18571 $as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
18572       has_space=`$ECHO "$complete" | $GREP " "`
18573       if test "x$has_space" != x; then
18574         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18575 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18576       fi
18577       as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
18578     fi
18579   fi
18580 
18581   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18582   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18583   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18584   # "foo.exe" is OK but "foo" is an error.
18585   #
18586   # This test is therefore slightly more accurate than "test -f" to check for file precense.
18587   # It is also a way to make sure we got the proper file name for the real test later on.
18588   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18589   if test "x$test_shortpath" = x; then
18590     # Short path failed, file does not exist as specified.
18591     # Try adding .exe or .cmd
18592     if test -f "${new_path}.exe"; then
18593        input_to_shortpath="${new_path}.exe"
18594     elif test -f "${new_path}.cmd"; then
18595        input_to_shortpath="${new_path}.cmd"
18596     else
18597       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$new_path\", is invalid." >&5
18598 $as_echo "$as_me: The path of BUILD_LD, which resolves as \"$new_path\", is invalid." >&6;}
18599       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18600 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18601       as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
18602     fi
18603   else
18604     input_to_shortpath="$new_path"
18605   fi
18606 
18607   # Call helper function which possibly converts this using DOS-style short mode.
18608   # If so, the updated path is stored in $new_path.
18609   new_path="$input_to_shortpath"
18610 
18611   input_path="$input_to_shortpath"
18612   # Check if we need to convert this using DOS-style short mode. If the path
18613   # contains just simple characters, use it. Otherwise (spaces, weird characters),
18614   # take no chances and rewrite it.
18615   # Note: m4 eats our [], so we need to use [ and ] instead.
18616   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18617   if test "x$has_forbidden_chars" != x; then
18618     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18619     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18620     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18621     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18622       # Going to short mode and back again did indeed matter. Since short mode is
18623       # case insensitive, let's make it lowercase to improve readability.
18624       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18625       # Now convert it back to Unix-stile (cygpath)
18626       input_path=`$CYGPATH -u "$shortmode_path"`
18627       new_path="$input_path"
18628     fi
18629   fi
18630 
18631   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18632   if test "x$test_cygdrive_prefix" = x; then
18633     # As a simple fix, exclude /usr/bin since it's not a real path.
18634     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18635       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18636       # a path prefixed by /cygdrive for fixpath to work.
18637       new_path="$CYGWIN_ROOT_PATH$input_path"
18638     fi
18639   fi
18640 
18641   # remove trailing .exe if any
18642   new_path="${new_path/%.exe/}"
18643 
18644   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18645 
18646   # First separate the path from the arguments. This will split at the first
18647   # space.
18648   complete="$BUILD_LD"
18649   path="${complete%% *}"
18650   tmp="$complete EOL"
18651   arguments="${tmp#* }"
18652 
18653   # Input might be given as Windows format, start by converting to
18654   # unix format.
18655   new_path="$path"
18656 
18657   windows_path="$new_path"
18658   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18659     unix_path=`$CYGPATH -u "$windows_path"`
18660     new_path="$unix_path"
18661   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18662     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18663     new_path="$unix_path"
18664   fi
18665 
18666 
18667   # Now try to locate executable using which
18668   new_path=`$WHICH "$new_path" 2> /dev/null`
18669 
18670   if test "x$new_path" = x; then
18671     # Oops. Which didn't find the executable.
18672     # The splitting of arguments from the executable at a space might have been incorrect,
18673     # since paths with space are more likely in Windows. Give it another try with the whole
18674     # argument.
18675     path="$complete"
18676     arguments="EOL"
18677     new_path="$path"
18678 
18679   windows_path="$new_path"
18680   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18681     unix_path=`$CYGPATH -u "$windows_path"`
18682     new_path="$unix_path"
18683   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18684     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18685     new_path="$unix_path"
18686   fi
18687 
18688 
18689     new_path=`$WHICH "$new_path" 2> /dev/null`
18690 
18691     if test "x$new_path" = x; then
18692       # It's still not found. Now this is an unrecoverable error.
18693       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
18694 $as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
18695       has_space=`$ECHO "$complete" | $GREP " "`
18696       if test "x$has_space" != x; then
18697         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18698 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18699       fi
18700       as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
18701     fi
18702   fi
18703 
18704   # Now new_path has a complete unix path to the binary
18705   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18706     # Keep paths in /bin as-is, but remove trailing .exe if any
18707     new_path="${new_path/%.exe/}"
18708     # Do not save /bin paths to all_fixpath_prefixes!
18709   else
18710     # Not in mixed or Windows style, start by that.
18711     new_path=`cmd //c echo $new_path`
18712 
18713   input_path="$new_path"
18714   # Check if we need to convert this using DOS-style short mode. If the path
18715   # contains just simple characters, use it. Otherwise (spaces, weird characters),
18716   # take no chances and rewrite it.
18717   # Note: m4 eats our [], so we need to use [ and ] instead.
18718   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18719   if test "x$has_forbidden_chars" != x; then
18720     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18721     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18722   fi
18723 
18724     # Output is in $new_path
18725 
18726   windows_path="$new_path"
18727   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18728     unix_path=`$CYGPATH -u "$windows_path"`
18729     new_path="$unix_path"
18730   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18731     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18732     new_path="$unix_path"
18733   fi
18734 
18735     # remove trailing .exe if any
18736     new_path="${new_path/%.exe/}"
18737 
18738     # Save the first 10 bytes of this path to the storage, so fixpath can work.
18739     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18740   fi
18741 
18742   else
18743     # We're on a posix platform. Hooray! :)
18744     # First separate the path from the arguments. This will split at the first
18745     # space.
18746     complete="$BUILD_LD"
18747     path="${complete%% *}"
18748     tmp="$complete EOL"
18749     arguments="${tmp#* }"
18750 
18751     # Cannot rely on the command "which" here since it doesn't always work.
18752     is_absolute_path=`$ECHO "$path" | $GREP ^/`
18753     if test -z "$is_absolute_path"; then
18754       # Path to executable is not absolute. Find it.
18755       IFS_save="$IFS"
18756       IFS=:
18757       for p in $PATH; do
18758         if test -f "$p/$path" && test -x "$p/$path"; then
18759           new_path="$p/$path"
18760           break
18761         fi
18762       done
18763       IFS="$IFS_save"
18764     else
18765       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving BUILD_LD (as $path) failed, using $path directly." >&5
18766 $as_echo "$as_me: Resolving BUILD_LD (as $path) failed, using $path directly." >&6;}
18767       new_path="$path"
18768     fi
18769 
18770     if test "x$new_path" = x; then
18771         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
18772 $as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
18773         has_space=`$ECHO "$complete" | $GREP " "`
18774         if test "x$has_space" != x; then
18775           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18776 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18777         fi
18778         as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
18779       fi
18780   fi
18781 
18782       # Now join together the path and the arguments once again
18783       if test "x$arguments" != xEOL; then
18784         new_complete="$new_path ${arguments% *}"
18785       else
18786         new_complete="$new_path"
18787       fi
18788 
18789   if test "x$complete" != "x$new_complete"; then
18790       BUILD_LD="$new_complete"
18791       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_LD to \"$new_complete\"" >&5
18792 $as_echo "$as_me: Rewriting BUILD_LD to \"$new_complete\"" >&6;}
18793     fi
18794 
18795 fi
18796 
18797 
18798 
18799 
18800 # If a devkit is found on the builddeps server, then prepend its path to the
18801 # PATH variable. If there are cross compilers available in the devkit, these
18802 # will be found by AC_PROG_CC et al.
18803 DEVKIT=
18804 
18805 
18806     if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
18807         # Source the builddeps file again, to make sure it uses the latest variables!
18808         . $builddepsfile
18809         # Look for a target and build machine specific resource!
18810         eval resource=\${builddep_devkit_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
18811         if test "x$resource" = x; then
18812             # Ok, lets instead look for a target specific resource
18813             eval resource=\${builddep_devkit_TARGET_${rewritten_target_var}}
18814         fi
18815         if test "x$resource" = x; then
18816             # Ok, lets instead look for a build specific resource
18817             eval resource=\${builddep_devkit_BUILD_${rewritten_build_var}}
18818         fi
18819         if test "x$resource" = x; then
18820             # Ok, lets instead look for a generic resource
18821             # (The devkit comes from M4 and not the shell, thus no need for eval here.)
18822             resource=${builddep_devkit}
18823         fi
18824         if test "x$resource" != x; then
18825             { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for devkit" >&5
18826 $as_echo "$as_me: Using builddeps $resource for devkit" >&6;}
18827             # If the resource in the builddeps.conf file is an existing directory,
18828             # for example /java/linux/cups
18829             if test -d ${resource}; then
18830                depdir=${resource}
18831             else
18832 
18833 # devkit is for example mymodule
18834 # $resource is for example libs/general/libmymod_1_2_3.zip
18835 # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
18836 # $with_builddeps_dir is for example /localhome/builddeps
18837 # depdir is the name of the variable into which we store the depdir, eg MYMOD
18838 # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
18839 # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
18840     filename=`basename $resource`
18841     filebase=`echo $filename | sed 's/\.[^\.]*$//'`
18842     filebase=${filename%%.*}
18843     extension=${filename#*.}
18844     installdir=$with_builddeps_dir/$filebase
18845     if test ! -f $installdir/$filename.unpacked; then
18846         { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency devkit from $with_builddeps_server/$resource and installing into $installdir" >&5
18847 $as_echo "$as_me: Downloading build dependency devkit from $with_builddeps_server/$resource and installing into $installdir" >&6;}
18848         if test ! -d $installdir; then
18849             mkdir -p $installdir
18850         fi
18851         if test ! -d $installdir; then
18852             as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
18853         fi
18854         tmpfile=`mktemp $installdir/devkit.XXXXXXXXX`
18855         touch $tmpfile
18856         if test ! -f $tmpfile; then
18857             as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
18858         fi
18859 
18860     # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
18861     # $tmpfile is the local file name for the downloaded file.
18862     VALID_TOOL=no
18863     if test "x$BDEPS_FTP" = xwget; then
18864        VALID_TOOL=yes
18865        wget -O $tmpfile $with_builddeps_server/$resource
18866     fi
18867     if test "x$BDEPS_FTP" = xlftp; then
18868        VALID_TOOL=yes
18869        lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
18870     fi
18871     if test "x$BDEPS_FTP" = xftp; then
18872         VALID_TOOL=yes
18873         FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
18874         FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
18875         FTPUSERPWD=${FTPSERVER%%@*}
18876         if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
18877             FTPUSER=${userpwd%%:*}
18878             FTPPWD=${userpwd#*@}
18879             FTPSERVER=${FTPSERVER#*@}
18880         else
18881             FTPUSER=ftp
18882             FTPPWD=ftp
18883         fi
18884         # the "pass" command does not work on some
18885         # ftp clients (read ftp.exe) but if it works,
18886         # passive mode is better!
18887         (\
18888             echo "user $FTPUSER $FTPPWD"        ;\
18889             echo "pass"                         ;\
18890             echo "bin"                          ;\
18891             echo "get $FTPPATH $tmpfile"              ;\
18892         ) | ftp -in $FTPSERVER
18893     fi
18894     if test "x$VALID_TOOL" != xyes; then
18895        as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
18896     fi
18897 
18898         mv $tmpfile $installdir/$filename
18899         if test ! -s $installdir/$filename; then
18900             as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
18901         fi
18902         case "$extension" in
18903             zip)  echo "Unzipping $installdir/$filename..."
18904                (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
18905             ;;
18906             tar.gz) echo "Untaring $installdir/$filename..."
18907                (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
18908             ;;
18909             tgz) echo "Untaring $installdir/$filename..."
18910                (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
18911             ;;
18912             *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
18913             ;;
18914         esac
18915     fi
18916     if test -f $installdir/$filename.unpacked; then
18917         depdir=$installdir
18918     fi
18919 
18920             fi
18921             # Source the builddeps file again, because in the previous command, the depdir
18922             # was updated to point at the current build dependency install directory.
18923             . $builddepsfile
18924             # Now extract variables from the builddeps.conf files.
18925             theroot=${builddep_devkit_ROOT}
18926             thecflags=${builddep_devkit_CFLAGS}
18927             thelibs=${builddep_devkit_LIBS}
18928             if test "x$depdir" = x; then
18929                 as_fn_error $? "Could not download build dependency devkit" "$LINENO" 5
18930             fi
18931             DEVKIT=$depdir
18932             if test "x$theroot" != x; then
18933                DEVKIT="$theroot"
18934             fi
18935             if test "x$thecflags" != x; then
18936                DEVKIT_CFLAGS="$thecflags"
18937             fi
18938             if test "x$thelibs" != x; then
18939                DEVKIT_LIBS="$thelibs"
18940             fi
18941             # Found devkit
18942                      PATH="$DEVKIT/bin:$PATH"
18943                      SYS_ROOT="$DEVKIT/${rewritten_target}/sys-root"
18944                      if test "x$x_includes" = "xNONE"; then
18945                          x_includes="$SYS_ROOT/usr/include/X11"
18946                      fi
18947                      if test "x$x_libraries" = "xNONE"; then
18948                          x_libraries="$SYS_ROOT/usr/lib"
18949                      fi
18950 
18951 
18952         fi
18953 
18954     fi
18955 
18956 
18957 if test "x$SYS_ROOT" != "x/" ; then
18958     CFLAGS="--sysroot=$SYS_ROOT $CFLAGS"
18959     CXXFLAGS="--sysroot=$SYS_ROOT $CXXFLAGS"
18960     OBJCFLAGS="--sysroot=$SYS_ROOT $OBJCFLAGS"
18961     OBJCXXFLAGS="--sysroot=$SYS_ROOT $OBJCFLAGS"
18962     CPPFLAGS="--sysroot=$SYS_ROOT $CPPFLAGS"
18963     LDFLAGS="--sysroot=$SYS_ROOT $LDFLAGS"
18964 fi
18965 
18966 # Store the CFLAGS etal passed to the configure script.
18967 ORG_CFLAGS="$CFLAGS"
18968 ORG_CXXFLAGS="$CXXFLAGS"
18969 ORG_OBJCFLAGS="$OBJCFLAGS"
18970 
18971 # autoconf magic only relies on PATH, so update it if tools dir is specified
18972 OLD_PATH="$PATH"
18973 if test "x$TOOLS_DIR" != x; then
18974   PATH=$TOOLS_DIR:$PATH
18975 fi
18976 
18977 
18978 ### Locate C compiler (CC)
18979 
18980 # On windows, only cl.exe is supported.
18981 # On Solaris, cc is preferred to gcc.
18982 # Elsewhere, gcc is preferred to cc.
18983 
18984 if test "x$CC" != x; then
18985   COMPILER_CHECK_LIST="$CC"
18986 elif test "x$OPENJDK_TARGET_OS" = "xwindows"; then
18987   COMPILER_CHECK_LIST="cl"
18988 elif test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
18989   COMPILER_CHECK_LIST="cc gcc"
18990 else
18991   COMPILER_CHECK_LIST="gcc cc"
18992 fi
18993 
18994 
18995   COMPILER_NAME=C
18996 
18997   CC=
18998   # If TOOLS_DIR is set, check for all compiler names in there first
18999   # before checking the rest of the PATH.
19000   if test -n "$TOOLS_DIR"; then
19001     PATH_save="$PATH"
19002     PATH="$TOOLS_DIR"
19003     for ac_prog in $COMPILER_CHECK_LIST
19004 do
19005   # Extract the first word of "$ac_prog", so it can be a program name with args.
19006 set dummy $ac_prog; ac_word=$2
19007 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19008 $as_echo_n "checking for $ac_word... " >&6; }
19009 if ${ac_cv_path_TOOLS_DIR_CC+:} false; then :
19010   $as_echo_n "(cached) " >&6
19011 else
19012   case $TOOLS_DIR_CC in
19013   [\\/]* | ?:[\\/]*)
19014   ac_cv_path_TOOLS_DIR_CC="$TOOLS_DIR_CC" # Let the user override the test with a path.
19015   ;;
19016   *)
19017   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19018 for as_dir in $PATH
19019 do
19020   IFS=$as_save_IFS
19021   test -z "$as_dir" && as_dir=.
19022     for ac_exec_ext in '' $ac_executable_extensions; do
19023   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
19024     ac_cv_path_TOOLS_DIR_CC="$as_dir/$ac_word$ac_exec_ext"
19025     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19026     break 2
19027   fi
19028 done
19029   done
19030 IFS=$as_save_IFS
19031 
19032   ;;
19033 esac
19034 fi
19035 TOOLS_DIR_CC=$ac_cv_path_TOOLS_DIR_CC
19036 if test -n "$TOOLS_DIR_CC"; then
19037   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLS_DIR_CC" >&5
19038 $as_echo "$TOOLS_DIR_CC" >&6; }
19039 else
19040   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19041 $as_echo "no" >&6; }
19042 fi
19043 
19044 
19045   test -n "$TOOLS_DIR_CC" && break
19046 done
19047 
19048     CC=$TOOLS_DIR_CC
19049     PATH="$PATH_save"
19050   fi
19051 
19052   # AC_PATH_PROGS can't be run multiple times with the same variable,
19053   # so create a new name for this run.
19054   if test "x$CC" = x; then
19055     for ac_prog in $COMPILER_CHECK_LIST
19056 do
19057   # Extract the first word of "$ac_prog", so it can be a program name with args.
19058 set dummy $ac_prog; ac_word=$2
19059 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19060 $as_echo_n "checking for $ac_word... " >&6; }
19061 if ${ac_cv_path_POTENTIAL_CC+:} false; then :
19062   $as_echo_n "(cached) " >&6
19063 else
19064   case $POTENTIAL_CC in
19065   [\\/]* | ?:[\\/]*)
19066   ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
19067   ;;
19068   *)
19069   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19070 for as_dir in $PATH
19071 do
19072   IFS=$as_save_IFS
19073   test -z "$as_dir" && as_dir=.
19074     for ac_exec_ext in '' $ac_executable_extensions; do
19075   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
19076     ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
19077     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19078     break 2
19079   fi
19080 done
19081   done
19082 IFS=$as_save_IFS
19083 
19084   ;;
19085 esac
19086 fi
19087 POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
19088 if test -n "$POTENTIAL_CC"; then
19089   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
19090 $as_echo "$POTENTIAL_CC" >&6; }
19091 else
19092   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19093 $as_echo "no" >&6; }
19094 fi
19095 
19096 
19097   test -n "$POTENTIAL_CC" && break
19098 done
19099 
19100     CC=$POTENTIAL_CC
19101   fi
19102 
19103   if test "x$CC" = x; then
19104 
19105     # Print a helpful message on how to acquire the necessary build dependency.
19106     # devkit is the help tag: freetyp2, cups, pulse, alsa etc
19107     MISSING_DEPENDENCY=devkit
19108     PKGHANDLER_COMMAND=
19109 
19110     case $PKGHANDLER in
19111         apt-get)
19112                 apt_help     $MISSING_DEPENDENCY ;;
19113     yum)
19114                 yum_help     $MISSING_DEPENDENCY ;;
19115         port)
19116                 port_help    $MISSING_DEPENDENCY ;;
19117         pkgutil)
19118                 pkgutil_help $MISSING_DEPENDENCY ;;
19119         pkgadd)
19120                 pkgadd_help  $MISSING_DEPENDENCY ;;
19121     * )
19122       break ;;
19123     esac
19124 
19125     if test "x$PKGHANDLER_COMMAND" != x; then
19126         HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
19127     fi
19128 
19129       as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
19130   fi
19131 
19132   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19133 
19134   # First separate the path from the arguments. This will split at the first
19135   # space.
19136   complete="$CC"
19137   path="${complete%% *}"
19138   tmp="$complete EOL"
19139   arguments="${tmp#* }"
19140 
19141   # Input might be given as Windows format, start by converting to
19142   # unix format.
19143   new_path=`$CYGPATH -u "$path"`
19144 
19145   # Now try to locate executable using which
19146   new_path=`$WHICH "$new_path" 2> /dev/null`
19147   # bat and cmd files are not always considered executable in cygwin causing which
19148   # to not find them
19149   if test "x$new_path" = x \
19150            && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19151            && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19152     new_path=`$CYGPATH -u "$path"`
19153   fi
19154   if test "x$new_path" = x; then
19155     # Oops. Which didn't find the executable.
19156     # The splitting of arguments from the executable at a space might have been incorrect,
19157     # since paths with space are more likely in Windows. Give it another try with the whole
19158     # argument.
19159     path="$complete"
19160     arguments="EOL"
19161     new_path=`$CYGPATH -u "$path"`
19162     new_path=`$WHICH "$new_path" 2> /dev/null`
19163     # bat and cmd files are not always considered executable in cygwin causing which
19164     # to not find them
19165     if test "x$new_path" = x \
19166              && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19167              && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19168       new_path=`$CYGPATH -u "$path"`
19169     fi
19170     if test "x$new_path" = x; then
19171       # It's still not found. Now this is an unrecoverable error.
19172       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
19173 $as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
19174       has_space=`$ECHO "$complete" | $GREP " "`
19175       if test "x$has_space" != x; then
19176         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19177 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19178       fi
19179       as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
19180     fi
19181   fi
19182 
19183   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19184   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19185   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19186   # "foo.exe" is OK but "foo" is an error.
19187   #
19188   # This test is therefore slightly more accurate than "test -f" to check for file precense.
19189   # It is also a way to make sure we got the proper file name for the real test later on.
19190   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19191   if test "x$test_shortpath" = x; then
19192     # Short path failed, file does not exist as specified.
19193     # Try adding .exe or .cmd
19194     if test -f "${new_path}.exe"; then
19195        input_to_shortpath="${new_path}.exe"
19196     elif test -f "${new_path}.cmd"; then
19197        input_to_shortpath="${new_path}.cmd"
19198     else
19199       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$new_path\", is invalid." >&5
19200 $as_echo "$as_me: The path of CC, which resolves as \"$new_path\", is invalid." >&6;}
19201       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19202 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19203       as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
19204     fi
19205   else
19206     input_to_shortpath="$new_path"
19207   fi
19208 
19209   # Call helper function which possibly converts this using DOS-style short mode.
19210   # If so, the updated path is stored in $new_path.
19211   new_path="$input_to_shortpath"
19212 
19213   input_path="$input_to_shortpath"
19214   # Check if we need to convert this using DOS-style short mode. If the path
19215   # contains just simple characters, use it. Otherwise (spaces, weird characters),
19216   # take no chances and rewrite it.
19217   # Note: m4 eats our [], so we need to use [ and ] instead.
19218   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19219   if test "x$has_forbidden_chars" != x; then
19220     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19221     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19222     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19223     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19224       # Going to short mode and back again did indeed matter. Since short mode is
19225       # case insensitive, let's make it lowercase to improve readability.
19226       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19227       # Now convert it back to Unix-stile (cygpath)
19228       input_path=`$CYGPATH -u "$shortmode_path"`
19229       new_path="$input_path"
19230     fi
19231   fi
19232 
19233   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19234   if test "x$test_cygdrive_prefix" = x; then
19235     # As a simple fix, exclude /usr/bin since it's not a real path.
19236     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19237       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19238       # a path prefixed by /cygdrive for fixpath to work.
19239       new_path="$CYGWIN_ROOT_PATH$input_path"
19240     fi
19241   fi
19242 
19243   # remove trailing .exe if any
19244   new_path="${new_path/%.exe/}"
19245 
19246   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19247 
19248   # First separate the path from the arguments. This will split at the first
19249   # space.
19250   complete="$CC"
19251   path="${complete%% *}"
19252   tmp="$complete EOL"
19253   arguments="${tmp#* }"
19254 
19255   # Input might be given as Windows format, start by converting to
19256   # unix format.
19257   new_path="$path"
19258 
19259   windows_path="$new_path"
19260   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19261     unix_path=`$CYGPATH -u "$windows_path"`
19262     new_path="$unix_path"
19263   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19264     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19265     new_path="$unix_path"
19266   fi
19267 
19268 
19269   # Now try to locate executable using which
19270   new_path=`$WHICH "$new_path" 2> /dev/null`
19271 
19272   if test "x$new_path" = x; then
19273     # Oops. Which didn't find the executable.
19274     # The splitting of arguments from the executable at a space might have been incorrect,
19275     # since paths with space are more likely in Windows. Give it another try with the whole
19276     # argument.
19277     path="$complete"
19278     arguments="EOL"
19279     new_path="$path"
19280 
19281   windows_path="$new_path"
19282   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19283     unix_path=`$CYGPATH -u "$windows_path"`
19284     new_path="$unix_path"
19285   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19286     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19287     new_path="$unix_path"
19288   fi
19289 
19290 
19291     new_path=`$WHICH "$new_path" 2> /dev/null`
19292 
19293     if test "x$new_path" = x; then
19294       # It's still not found. Now this is an unrecoverable error.
19295       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
19296 $as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
19297       has_space=`$ECHO "$complete" | $GREP " "`
19298       if test "x$has_space" != x; then
19299         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19300 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19301       fi
19302       as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
19303     fi
19304   fi
19305 
19306   # Now new_path has a complete unix path to the binary
19307   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
19308     # Keep paths in /bin as-is, but remove trailing .exe if any
19309     new_path="${new_path/%.exe/}"
19310     # Do not save /bin paths to all_fixpath_prefixes!
19311   else
19312     # Not in mixed or Windows style, start by that.
19313     new_path=`cmd //c echo $new_path`
19314 
19315   input_path="$new_path"
19316   # Check if we need to convert this using DOS-style short mode. If the path
19317   # contains just simple characters, use it. Otherwise (spaces, weird characters),
19318   # take no chances and rewrite it.
19319   # Note: m4 eats our [], so we need to use [ and ] instead.
19320   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19321   if test "x$has_forbidden_chars" != x; then
19322     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19323     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19324   fi
19325 
19326     # Output is in $new_path
19327 
19328   windows_path="$new_path"
19329   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19330     unix_path=`$CYGPATH -u "$windows_path"`
19331     new_path="$unix_path"
19332   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19333     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19334     new_path="$unix_path"
19335   fi
19336 
19337     # remove trailing .exe if any
19338     new_path="${new_path/%.exe/}"
19339 
19340     # Save the first 10 bytes of this path to the storage, so fixpath can work.
19341     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19342   fi
19343 
19344   else
19345     # We're on a posix platform. Hooray! :)
19346     # First separate the path from the arguments. This will split at the first
19347     # space.
19348     complete="$CC"
19349     path="${complete%% *}"
19350     tmp="$complete EOL"
19351     arguments="${tmp#* }"
19352 
19353     # Cannot rely on the command "which" here since it doesn't always work.
19354     is_absolute_path=`$ECHO "$path" | $GREP ^/`
19355     if test -z "$is_absolute_path"; then
19356       # Path to executable is not absolute. Find it.
19357       IFS_save="$IFS"
19358       IFS=:
19359       for p in $PATH; do
19360         if test -f "$p/$path" && test -x "$p/$path"; then
19361           new_path="$p/$path"
19362           break
19363         fi
19364       done
19365       IFS="$IFS_save"
19366     else
19367       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CC (as $path) failed, using $path directly." >&5
19368 $as_echo "$as_me: Resolving CC (as $path) failed, using $path directly." >&6;}
19369       new_path="$path"
19370     fi
19371 
19372     if test "x$new_path" = x; then
19373         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
19374 $as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
19375         has_space=`$ECHO "$complete" | $GREP " "`
19376         if test "x$has_space" != x; then
19377           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19378 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19379         fi
19380         as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
19381       fi
19382   fi
19383 
19384       # Now join together the path and the arguments once again
19385       if test "x$arguments" != xEOL; then
19386         new_complete="$new_path ${arguments% *}"
19387       else
19388         new_complete="$new_path"
19389       fi
19390 
19391   if test "x$complete" != "x$new_complete"; then
19392       CC="$new_complete"
19393       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CC to \"$new_complete\"" >&5
19394 $as_echo "$as_me: Rewriting CC to \"$new_complete\"" >&6;}
19395     fi
19396 
19397   { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CC" >&5
19398 $as_echo_n "checking resolved symbolic links for CC... " >&6; }
19399   TEST_COMPILER="$CC"
19400 
19401     if test "x$OPENJDK_BUILD_OS" != xwindows; then
19402         # Follow a chain of symbolic links. Use readlink
19403         # where it exists, else fall back to horribly
19404         # complicated shell code.
19405         if test "x$READLINK_TESTED" != yes; then
19406             # On MacOSX there is a readlink tool with a different
19407             # purpose than the GNU readlink tool. Check the found readlink.
19408             ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
19409             if test "x$ISGNU" = x; then
19410                  # A readlink that we do not know how to use.
19411                  # Are there other non-GNU readlinks out there?
19412                  READLINK_TESTED=yes
19413                  READLINK=
19414             fi
19415         fi
19416 
19417         if test "x$READLINK" != x; then
19418             TEST_COMPILER=`$READLINK -f $TEST_COMPILER`
19419         else
19420             # Save the current directory for restoring afterwards
19421             STARTDIR=$PWD
19422             COUNTER=0
19423             sym_link_dir=`$DIRNAME $TEST_COMPILER`
19424             sym_link_file=`$BASENAME $TEST_COMPILER`
19425             cd $sym_link_dir
19426             # Use -P flag to resolve symlinks in directories.
19427             cd `$THEPWDCMD -P`
19428             sym_link_dir=`$THEPWDCMD -P`
19429             # Resolve file symlinks
19430             while test $COUNTER -lt 20; do
19431                 ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
19432                 if test "x$ISLINK" == x; then
19433                     # This is not a symbolic link! We are done!
19434                     break
19435                 fi
19436                 # Again resolve directory symlinks since the target of the just found
19437                 # link could be in a different directory
19438                 cd `$DIRNAME $ISLINK`
19439                 sym_link_dir=`$THEPWDCMD -P`
19440                 sym_link_file=`$BASENAME $ISLINK`
19441                 let COUNTER=COUNTER+1
19442             done
19443             cd $STARTDIR
19444             TEST_COMPILER=$sym_link_dir/$sym_link_file
19445         fi
19446     fi
19447 
19448   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_COMPILER" >&5
19449 $as_echo "$TEST_COMPILER" >&6; }
19450   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CC is disguised ccache" >&5
19451 $as_echo_n "checking if CC is disguised ccache... " >&6; }
19452 
19453   COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"`
19454   if test "x$COMPILER_BASENAME" = "xccache"; then
19455     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5
19456 $as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; }
19457     # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache.
19458     # We want to control ccache invocation ourselves, so ignore this cc and try
19459     # searching again.
19460 
19461     # Remove the path to the fake ccache cc from the PATH
19462     RETRY_COMPILER_SAVED_PATH="$PATH"
19463     COMPILER_DIRNAME=`$DIRNAME $CC`
19464     PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`"
19465 
19466     # Try again looking for our compiler
19467     if test -n "$ac_tool_prefix"; then
19468   for ac_prog in $COMPILER_CHECK_LIST
19469   do
19470     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
19471 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
19472 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19473 $as_echo_n "checking for $ac_word... " >&6; }
19474 if ${ac_cv_prog_PROPER_COMPILER_CC+:} false; then :
19475   $as_echo_n "(cached) " >&6
19476 else
19477   if test -n "$PROPER_COMPILER_CC"; then
19478   ac_cv_prog_PROPER_COMPILER_CC="$PROPER_COMPILER_CC" # Let the user override the test.
19479 else
19480 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19481 for as_dir in $PATH
19482 do
19483   IFS=$as_save_IFS
19484   test -z "$as_dir" && as_dir=.
19485     for ac_exec_ext in '' $ac_executable_extensions; do
19486   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
19487     ac_cv_prog_PROPER_COMPILER_CC="$ac_tool_prefix$ac_prog"
19488     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19489     break 2
19490   fi
19491 done
19492   done
19493 IFS=$as_save_IFS
19494 
19495 fi
19496 fi
19497 PROPER_COMPILER_CC=$ac_cv_prog_PROPER_COMPILER_CC
19498 if test -n "$PROPER_COMPILER_CC"; then
19499   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5
19500 $as_echo "$PROPER_COMPILER_CC" >&6; }
19501 else
19502   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19503 $as_echo "no" >&6; }
19504 fi
19505 
19506 
19507     test -n "$PROPER_COMPILER_CC" && break
19508   done
19509 fi
19510 if test -z "$PROPER_COMPILER_CC"; then
19511   ac_ct_PROPER_COMPILER_CC=$PROPER_COMPILER_CC
19512   for ac_prog in $COMPILER_CHECK_LIST
19513 do
19514   # Extract the first word of "$ac_prog", so it can be a program name with args.
19515 set dummy $ac_prog; ac_word=$2
19516 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19517 $as_echo_n "checking for $ac_word... " >&6; }
19518 if ${ac_cv_prog_ac_ct_PROPER_COMPILER_CC+:} false; then :
19519   $as_echo_n "(cached) " >&6
19520 else
19521   if test -n "$ac_ct_PROPER_COMPILER_CC"; then
19522   ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_ct_PROPER_COMPILER_CC" # Let the user override the test.
19523 else
19524 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19525 for as_dir in $PATH
19526 do
19527   IFS=$as_save_IFS
19528   test -z "$as_dir" && as_dir=.
19529     for ac_exec_ext in '' $ac_executable_extensions; do
19530   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
19531     ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_prog"
19532     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19533     break 2
19534   fi
19535 done
19536   done
19537 IFS=$as_save_IFS
19538 
19539 fi
19540 fi
19541 ac_ct_PROPER_COMPILER_CC=$ac_cv_prog_ac_ct_PROPER_COMPILER_CC
19542 if test -n "$ac_ct_PROPER_COMPILER_CC"; then
19543   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CC" >&5
19544 $as_echo "$ac_ct_PROPER_COMPILER_CC" >&6; }
19545 else
19546   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19547 $as_echo "no" >&6; }
19548 fi
19549 
19550 
19551   test -n "$ac_ct_PROPER_COMPILER_CC" && break
19552 done
19553 
19554   if test "x$ac_ct_PROPER_COMPILER_CC" = x; then
19555     PROPER_COMPILER_CC=""
19556   else
19557     case $cross_compiling:$ac_tool_warned in
19558 yes:)
19559 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
19560 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
19561 ac_tool_warned=yes ;;
19562 esac
19563     PROPER_COMPILER_CC=$ac_ct_PROPER_COMPILER_CC
19564   fi
19565 fi
19566 
19567 
19568   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19569 
19570   # First separate the path from the arguments. This will split at the first
19571   # space.
19572   complete="$PROPER_COMPILER_CC"
19573   path="${complete%% *}"
19574   tmp="$complete EOL"
19575   arguments="${tmp#* }"
19576 
19577   # Input might be given as Windows format, start by converting to
19578   # unix format.
19579   new_path=`$CYGPATH -u "$path"`
19580 
19581   # Now try to locate executable using which
19582   new_path=`$WHICH "$new_path" 2> /dev/null`
19583   # bat and cmd files are not always considered executable in cygwin causing which
19584   # to not find them
19585   if test "x$new_path" = x \
19586            && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19587            && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19588     new_path=`$CYGPATH -u "$path"`
19589   fi
19590   if test "x$new_path" = x; then
19591     # Oops. Which didn't find the executable.
19592     # The splitting of arguments from the executable at a space might have been incorrect,
19593     # since paths with space are more likely in Windows. Give it another try with the whole
19594     # argument.
19595     path="$complete"
19596     arguments="EOL"
19597     new_path=`$CYGPATH -u "$path"`
19598     new_path=`$WHICH "$new_path" 2> /dev/null`
19599     # bat and cmd files are not always considered executable in cygwin causing which
19600     # to not find them
19601     if test "x$new_path" = x \
19602              && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19603              && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19604       new_path=`$CYGPATH -u "$path"`
19605     fi
19606     if test "x$new_path" = x; then
19607       # It's still not found. Now this is an unrecoverable error.
19608       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
19609 $as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
19610       has_space=`$ECHO "$complete" | $GREP " "`
19611       if test "x$has_space" != x; then
19612         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19613 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19614       fi
19615       as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
19616     fi
19617   fi
19618 
19619   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19620   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19621   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19622   # "foo.exe" is OK but "foo" is an error.
19623   #
19624   # This test is therefore slightly more accurate than "test -f" to check for file precense.
19625   # It is also a way to make sure we got the proper file name for the real test later on.
19626   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19627   if test "x$test_shortpath" = x; then
19628     # Short path failed, file does not exist as specified.
19629     # Try adding .exe or .cmd
19630     if test -f "${new_path}.exe"; then
19631        input_to_shortpath="${new_path}.exe"
19632     elif test -f "${new_path}.cmd"; then
19633        input_to_shortpath="${new_path}.cmd"
19634     else
19635       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&5
19636 $as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&6;}
19637       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19638 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19639       as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
19640     fi
19641   else
19642     input_to_shortpath="$new_path"
19643   fi
19644 
19645   # Call helper function which possibly converts this using DOS-style short mode.
19646   # If so, the updated path is stored in $new_path.
19647   new_path="$input_to_shortpath"
19648 
19649   input_path="$input_to_shortpath"
19650   # Check if we need to convert this using DOS-style short mode. If the path
19651   # contains just simple characters, use it. Otherwise (spaces, weird characters),
19652   # take no chances and rewrite it.
19653   # Note: m4 eats our [], so we need to use [ and ] instead.
19654   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19655   if test "x$has_forbidden_chars" != x; then
19656     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19657     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19658     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19659     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19660       # Going to short mode and back again did indeed matter. Since short mode is
19661       # case insensitive, let's make it lowercase to improve readability.
19662       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19663       # Now convert it back to Unix-stile (cygpath)
19664       input_path=`$CYGPATH -u "$shortmode_path"`
19665       new_path="$input_path"
19666     fi
19667   fi
19668 
19669   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19670   if test "x$test_cygdrive_prefix" = x; then
19671     # As a simple fix, exclude /usr/bin since it's not a real path.
19672     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19673       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19674       # a path prefixed by /cygdrive for fixpath to work.
19675       new_path="$CYGWIN_ROOT_PATH$input_path"
19676     fi
19677   fi
19678 
19679   # remove trailing .exe if any
19680   new_path="${new_path/%.exe/}"
19681 
19682   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19683 
19684   # First separate the path from the arguments. This will split at the first
19685   # space.
19686   complete="$PROPER_COMPILER_CC"
19687   path="${complete%% *}"
19688   tmp="$complete EOL"
19689   arguments="${tmp#* }"
19690 
19691   # Input might be given as Windows format, start by converting to
19692   # unix format.
19693   new_path="$path"
19694 
19695   windows_path="$new_path"
19696   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19697     unix_path=`$CYGPATH -u "$windows_path"`
19698     new_path="$unix_path"
19699   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19700     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19701     new_path="$unix_path"
19702   fi
19703 
19704 
19705   # Now try to locate executable using which
19706   new_path=`$WHICH "$new_path" 2> /dev/null`
19707 
19708   if test "x$new_path" = x; then
19709     # Oops. Which didn't find the executable.
19710     # The splitting of arguments from the executable at a space might have been incorrect,
19711     # since paths with space are more likely in Windows. Give it another try with the whole
19712     # argument.
19713     path="$complete"
19714     arguments="EOL"
19715     new_path="$path"
19716 
19717   windows_path="$new_path"
19718   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19719     unix_path=`$CYGPATH -u "$windows_path"`
19720     new_path="$unix_path"
19721   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19722     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19723     new_path="$unix_path"
19724   fi
19725 
19726 
19727     new_path=`$WHICH "$new_path" 2> /dev/null`
19728 
19729     if test "x$new_path" = x; then
19730       # It's still not found. Now this is an unrecoverable error.
19731       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
19732 $as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
19733       has_space=`$ECHO "$complete" | $GREP " "`
19734       if test "x$has_space" != x; then
19735         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19736 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19737       fi
19738       as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
19739     fi
19740   fi
19741 
19742   # Now new_path has a complete unix path to the binary
19743   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
19744     # Keep paths in /bin as-is, but remove trailing .exe if any
19745     new_path="${new_path/%.exe/}"
19746     # Do not save /bin paths to all_fixpath_prefixes!
19747   else
19748     # Not in mixed or Windows style, start by that.
19749     new_path=`cmd //c echo $new_path`
19750 
19751   input_path="$new_path"
19752   # Check if we need to convert this using DOS-style short mode. If the path
19753   # contains just simple characters, use it. Otherwise (spaces, weird characters),
19754   # take no chances and rewrite it.
19755   # Note: m4 eats our [], so we need to use [ and ] instead.
19756   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19757   if test "x$has_forbidden_chars" != x; then
19758     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19759     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19760   fi
19761 
19762     # Output is in $new_path
19763 
19764   windows_path="$new_path"
19765   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19766     unix_path=`$CYGPATH -u "$windows_path"`
19767     new_path="$unix_path"
19768   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19769     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19770     new_path="$unix_path"
19771   fi
19772 
19773     # remove trailing .exe if any
19774     new_path="${new_path/%.exe/}"
19775 
19776     # Save the first 10 bytes of this path to the storage, so fixpath can work.
19777     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19778   fi
19779 
19780   else
19781     # We're on a posix platform. Hooray! :)
19782     # First separate the path from the arguments. This will split at the first
19783     # space.
19784     complete="$PROPER_COMPILER_CC"
19785     path="${complete%% *}"
19786     tmp="$complete EOL"
19787     arguments="${tmp#* }"
19788 
19789     # Cannot rely on the command "which" here since it doesn't always work.
19790     is_absolute_path=`$ECHO "$path" | $GREP ^/`
19791     if test -z "$is_absolute_path"; then
19792       # Path to executable is not absolute. Find it.
19793       IFS_save="$IFS"
19794       IFS=:
19795       for p in $PATH; do
19796         if test -f "$p/$path" && test -x "$p/$path"; then
19797           new_path="$p/$path"
19798           break
19799         fi
19800       done
19801       IFS="$IFS_save"
19802     else
19803       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving PROPER_COMPILER_CC (as $path) failed, using $path directly." >&5
19804 $as_echo "$as_me: Resolving PROPER_COMPILER_CC (as $path) failed, using $path directly." >&6;}
19805       new_path="$path"
19806     fi
19807 
19808     if test "x$new_path" = x; then
19809         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
19810 $as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
19811         has_space=`$ECHO "$complete" | $GREP " "`
19812         if test "x$has_space" != x; then
19813           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19814 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19815         fi
19816         as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
19817       fi
19818   fi
19819 
19820       # Now join together the path and the arguments once again
19821       if test "x$arguments" != xEOL; then
19822         new_complete="$new_path ${arguments% *}"
19823       else
19824         new_complete="$new_path"
19825       fi
19826 
19827   if test "x$complete" != "x$new_complete"; then
19828       PROPER_COMPILER_CC="$new_complete"
19829       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&5
19830 $as_echo "$as_me: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&6;}
19831     fi
19832 
19833     PATH="$RETRY_COMPILER_SAVED_PATH"
19834 
19835     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CC" >&5
19836 $as_echo_n "checking for resolved symbolic links for CC... " >&6; }
19837 
19838     if test "x$OPENJDK_BUILD_OS" != xwindows; then
19839         # Follow a chain of symbolic links. Use readlink
19840         # where it exists, else fall back to horribly
19841         # complicated shell code.
19842         if test "x$READLINK_TESTED" != yes; then
19843             # On MacOSX there is a readlink tool with a different
19844             # purpose than the GNU readlink tool. Check the found readlink.
19845             ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
19846             if test "x$ISGNU" = x; then
19847                  # A readlink that we do not know how to use.
19848                  # Are there other non-GNU readlinks out there?
19849                  READLINK_TESTED=yes
19850                  READLINK=
19851             fi
19852         fi
19853 
19854         if test "x$READLINK" != x; then
19855             PROPER_COMPILER_CC=`$READLINK -f $PROPER_COMPILER_CC`
19856         else
19857             # Save the current directory for restoring afterwards
19858             STARTDIR=$PWD
19859             COUNTER=0
19860             sym_link_dir=`$DIRNAME $PROPER_COMPILER_CC`
19861             sym_link_file=`$BASENAME $PROPER_COMPILER_CC`
19862             cd $sym_link_dir
19863             # Use -P flag to resolve symlinks in directories.
19864             cd `$THEPWDCMD -P`
19865             sym_link_dir=`$THEPWDCMD -P`
19866             # Resolve file symlinks
19867             while test $COUNTER -lt 20; do
19868                 ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
19869                 if test "x$ISLINK" == x; then
19870                     # This is not a symbolic link! We are done!
19871                     break
19872                 fi
19873                 # Again resolve directory symlinks since the target of the just found
19874                 # link could be in a different directory
19875                 cd `$DIRNAME $ISLINK`
19876                 sym_link_dir=`$THEPWDCMD -P`
19877                 sym_link_file=`$BASENAME $ISLINK`
19878                 let COUNTER=COUNTER+1
19879             done
19880             cd $STARTDIR
19881             PROPER_COMPILER_CC=$sym_link_dir/$sym_link_file
19882         fi
19883     fi
19884 
19885     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5
19886 $as_echo "$PROPER_COMPILER_CC" >&6; }
19887     CC="$PROPER_COMPILER_CC"
19888   else
19889     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CC" >&5
19890 $as_echo "no, keeping CC" >&6; }
19891     CC="$TEST_COMPILER"
19892   fi
19893 
19894   COMPILER=$CC
19895   COMPILER_NAME=$COMPILER_NAME
19896 
19897   if test "x$OPENJDK_TARGET_OS" = xsolaris; then
19898     # Make sure we use the Sun Studio compiler and not gcc on Solaris, which won't work
19899     COMPILER_VERSION_TEST=`$COMPILER -V 2>&1 | $HEAD -n 1`
19900     $ECHO $COMPILER_VERSION_TEST | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
19901     if test $? -ne 0; then
19902       GCC_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
19903 
19904       { $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
19905 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required Sun Studio compiler." >&6;}
19906       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&5
19907 $as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&6;}
19908       as_fn_error $? "Sun Studio compiler is required. Try setting --with-tools-dir." "$LINENO" 5
19909     else
19910       COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/p"`
19911       COMPILER_VENDOR="Sun Studio"
19912     fi
19913   elif test  "x$OPENJDK_TARGET_OS" = xwindows; then
19914     # First line typically looks something like:
19915     # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.30319.01 for 80x86
19916     COMPILER_VERSION_TEST=`$COMPILER 2>&1 | $HEAD -n 1`
19917     COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*Version \([1-9][0-9.]*\) .*/\1/p"`
19918     COMPILER_VENDOR="Microsoft CL.EXE"
19919     COMPILER_CPU_TEST=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* for \(.*\)$/\1/p"`
19920     if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
19921       if test "x$COMPILER_CPU_TEST" != "x80x86"; then
19922         as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"80x86\"." "$LINENO" 5
19923       fi
19924     elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
19925       if test "x$COMPILER_CPU_TEST" != "xx64"; then
19926         as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." "$LINENO" 5
19927       fi
19928     fi
19929   else
19930     COMPILER_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
19931     # Check that this is likely to be GCC.
19932     $COMPILER --version 2>&1 | $GREP "Free Software Foundation" > /dev/null
19933     if test $? -ne 0; then
19934       { $as_echo "$as_me:${as_lineno-$LINENO}: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&5
19935 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&6;}
19936       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&5
19937 $as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&6;}
19938       as_fn_error $? "GCC compiler is required. Try setting --with-tools-dir." "$LINENO" 5
19939     fi
19940 
19941     # First line typically looks something like:
19942     # gcc (Ubuntu/Linaro 4.5.2-8ubuntu4) 4.5.2
19943     COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* \([1-9][0-9.]*\)/\1/p"`
19944     COMPILER_VENDOR=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^\(.*\) [1-9][0-9.]*/\1/p"`
19945   fi
19946   # This sets CC_VERSION or CXX_VERSION. (This comment is a grep marker)
19947   CC_VERSION="$COMPILER_VERSION"
19948   # This sets CC_VENDOR or CXX_VENDOR. (This comment is a grep marker)
19949   CC_VENDOR="$COMPILER_VENDOR"
19950 
19951   { $as_echo "$as_me:${as_lineno-$LINENO}: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&5
19952 $as_echo "$as_me: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&6;}
19953 
19954 
19955 # Now that we have resolved CC ourself, let autoconf have its go at it
19956 ac_ext=c
19957 ac_cpp='$CPP $CPPFLAGS'
19958 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
19959 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
19960 ac_compiler_gnu=$ac_cv_c_compiler_gnu
19961 if test -n "$ac_tool_prefix"; then
19962   for ac_prog in $CC
19963   do
19964     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
19965 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
19966 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19967 $as_echo_n "checking for $ac_word... " >&6; }
19968 if ${ac_cv_prog_CC+:} false; then :
19969   $as_echo_n "(cached) " >&6
19970 else
19971   if test -n "$CC"; then
19972   ac_cv_prog_CC="$CC" # Let the user override the test.
19973 else
19974 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19975 for as_dir in $PATH
19976 do
19977   IFS=$as_save_IFS
19978   test -z "$as_dir" && as_dir=.
19979     for ac_exec_ext in '' $ac_executable_extensions; do
19980   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
19981     ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
19982     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19983     break 2
19984   fi
19985 done
19986   done
19987 IFS=$as_save_IFS
19988 
19989 fi
19990 fi
19991 CC=$ac_cv_prog_CC
19992 if test -n "$CC"; then
19993   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
19994 $as_echo "$CC" >&6; }
19995 else
19996   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19997 $as_echo "no" >&6; }
19998 fi
19999 
20000 
20001     test -n "$CC" && break
20002   done
20003 fi
20004 if test -z "$CC"; then
20005   ac_ct_CC=$CC
20006   for ac_prog in $CC
20007 do
20008   # Extract the first word of "$ac_prog", so it can be a program name with args.
20009 set dummy $ac_prog; ac_word=$2
20010 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20011 $as_echo_n "checking for $ac_word... " >&6; }
20012 if ${ac_cv_prog_ac_ct_CC+:} false; then :
20013   $as_echo_n "(cached) " >&6
20014 else
20015   if test -n "$ac_ct_CC"; then
20016   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
20017 else
20018 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20019 for as_dir in $PATH
20020 do
20021   IFS=$as_save_IFS
20022   test -z "$as_dir" && as_dir=.
20023     for ac_exec_ext in '' $ac_executable_extensions; do
20024   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
20025     ac_cv_prog_ac_ct_CC="$ac_prog"
20026     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20027     break 2
20028   fi
20029 done
20030   done
20031 IFS=$as_save_IFS
20032 
20033 fi
20034 fi
20035 ac_ct_CC=$ac_cv_prog_ac_ct_CC
20036 if test -n "$ac_ct_CC"; then
20037   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
20038 $as_echo "$ac_ct_CC" >&6; }
20039 else
20040   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20041 $as_echo "no" >&6; }
20042 fi
20043 
20044 
20045   test -n "$ac_ct_CC" && break
20046 done
20047 
20048   if test "x$ac_ct_CC" = x; then
20049     CC=""
20050   else
20051     case $cross_compiling:$ac_tool_warned in
20052 yes:)
20053 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
20054 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
20055 ac_tool_warned=yes ;;
20056 esac
20057     CC=$ac_ct_CC
20058   fi
20059 fi
20060 
20061 
20062 test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
20063 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
20064 as_fn_error $? "no acceptable C compiler found in \$PATH
20065 See \`config.log' for more details" "$LINENO" 5; }
20066 
20067 # Provide some information about the compiler.
20068 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
20069 set X $ac_compile
20070 ac_compiler=$2
20071 for ac_option in --version -v -V -qversion; do
20072   { { ac_try="$ac_compiler $ac_option >&5"
20073 case "(($ac_try" in
20074   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20075   *) ac_try_echo=$ac_try;;
20076 esac
20077 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
20078 $as_echo "$ac_try_echo"; } >&5
20079   (eval "$ac_compiler $ac_option >&5") 2>conftest.err
20080   ac_status=$?
20081   if test -s conftest.err; then
20082     sed '10a\
20083 ... rest of stderr output deleted ...
20084          10q' conftest.err >conftest.er1
20085     cat conftest.er1 >&5
20086   fi
20087   rm -f conftest.er1 conftest.err
20088   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
20089   test $ac_status = 0; }
20090 done
20091 
20092 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20093 /* end confdefs.h.  */
20094 
20095 int
20096 main ()
20097 {
20098 
20099   ;
20100   return 0;
20101 }
20102 _ACEOF
20103 ac_clean_files_save=$ac_clean_files
20104 ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
20105 # Try to create an executable without -o first, disregard a.out.
20106 # It will help us diagnose broken compilers, and finding out an intuition
20107 # of exeext.
20108 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
20109 $as_echo_n "checking whether the C compiler works... " >&6; }
20110 ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
20111 
20112 # The possible output files:
20113 ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
20114 
20115 ac_rmfiles=
20116 for ac_file in $ac_files
20117 do
20118   case $ac_file in
20119     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
20120     * ) ac_rmfiles="$ac_rmfiles $ac_file";;
20121   esac
20122 done
20123 rm -f $ac_rmfiles
20124 
20125 if { { ac_try="$ac_link_default"
20126 case "(($ac_try" in
20127   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20128   *) ac_try_echo=$ac_try;;
20129 esac
20130 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
20131 $as_echo "$ac_try_echo"; } >&5
20132   (eval "$ac_link_default") 2>&5
20133   ac_status=$?
20134   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
20135   test $ac_status = 0; }; then :
20136   # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
20137 # So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
20138 # in a Makefile.  We should not override ac_cv_exeext if it was cached,
20139 # so that the user can short-circuit this test for compilers unknown to
20140 # Autoconf.
20141 for ac_file in $ac_files ''
20142 do
20143   test -f "$ac_file" || continue
20144   case $ac_file in
20145     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
20146         ;;
20147     [ab].out )
20148         # We found the default executable, but exeext='' is most
20149         # certainly right.
20150         break;;
20151     *.* )
20152         if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
20153         then :; else
20154            ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
20155         fi
20156         # We set ac_cv_exeext here because the later test for it is not
20157         # safe: cross compilers may not add the suffix if given an `-o'
20158         # argument, so we may need to know it at that point already.
20159         # Even if this section looks crufty: it has the advantage of
20160         # actually working.
20161         break;;
20162     * )
20163         break;;
20164   esac
20165 done
20166 test "$ac_cv_exeext" = no && ac_cv_exeext=
20167 
20168 else
20169   ac_file=''
20170 fi
20171 if test -z "$ac_file"; then :
20172   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20173 $as_echo "no" >&6; }
20174 $as_echo "$as_me: failed program was:" >&5
20175 sed 's/^/| /' conftest.$ac_ext >&5
20176 
20177 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
20178 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
20179 as_fn_error 77 "C compiler cannot create executables
20180 See \`config.log' for more details" "$LINENO" 5; }
20181 else
20182   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
20183 $as_echo "yes" >&6; }
20184 fi
20185 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
20186 $as_echo_n "checking for C compiler default output file name... " >&6; }
20187 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
20188 $as_echo "$ac_file" >&6; }
20189 ac_exeext=$ac_cv_exeext
20190 
20191 rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
20192 ac_clean_files=$ac_clean_files_save
20193 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
20194 $as_echo_n "checking for suffix of executables... " >&6; }
20195 if { { ac_try="$ac_link"
20196 case "(($ac_try" in
20197   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20198   *) ac_try_echo=$ac_try;;
20199 esac
20200 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
20201 $as_echo "$ac_try_echo"; } >&5
20202   (eval "$ac_link") 2>&5
20203   ac_status=$?
20204   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
20205   test $ac_status = 0; }; then :
20206   # If both `conftest.exe' and `conftest' are `present' (well, observable)
20207 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
20208 # work properly (i.e., refer to `conftest.exe'), while it won't with
20209 # `rm'.
20210 for ac_file in conftest.exe conftest conftest.*; do
20211   test -f "$ac_file" || continue
20212   case $ac_file in
20213     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
20214     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
20215           break;;
20216     * ) break;;
20217   esac
20218 done
20219 else
20220   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
20221 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
20222 as_fn_error $? "cannot compute suffix of executables: cannot compile and link
20223 See \`config.log' for more details" "$LINENO" 5; }
20224 fi
20225 rm -f conftest conftest$ac_cv_exeext
20226 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
20227 $as_echo "$ac_cv_exeext" >&6; }
20228 
20229 rm -f conftest.$ac_ext
20230 EXEEXT=$ac_cv_exeext
20231 ac_exeext=$EXEEXT
20232 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20233 /* end confdefs.h.  */
20234 #include <stdio.h>
20235 int
20236 main ()
20237 {
20238 FILE *f = fopen ("conftest.out", "w");
20239  return ferror (f) || fclose (f) != 0;
20240 
20241   ;
20242   return 0;
20243 }
20244 _ACEOF
20245 ac_clean_files="$ac_clean_files conftest.out"
20246 # Check that the compiler produces executables we can run.  If not, either
20247 # the compiler is broken, or we cross compile.
20248 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
20249 $as_echo_n "checking whether we are cross compiling... " >&6; }
20250 if test "$cross_compiling" != yes; then
20251   { { ac_try="$ac_link"
20252 case "(($ac_try" in
20253   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20254   *) ac_try_echo=$ac_try;;
20255 esac
20256 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
20257 $as_echo "$ac_try_echo"; } >&5
20258   (eval "$ac_link") 2>&5
20259   ac_status=$?
20260   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
20261   test $ac_status = 0; }
20262   if { ac_try='./conftest$ac_cv_exeext'
20263   { { case "(($ac_try" in
20264   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20265   *) ac_try_echo=$ac_try;;
20266 esac
20267 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
20268 $as_echo "$ac_try_echo"; } >&5
20269   (eval "$ac_try") 2>&5
20270   ac_status=$?
20271   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
20272   test $ac_status = 0; }; }; then
20273     cross_compiling=no
20274   else
20275     if test "$cross_compiling" = maybe; then
20276         cross_compiling=yes
20277     else
20278         { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
20279 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
20280 as_fn_error $? "cannot run C compiled programs.
20281 If you meant to cross compile, use \`--host'.
20282 See \`config.log' for more details" "$LINENO" 5; }
20283     fi
20284   fi
20285 fi
20286 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
20287 $as_echo "$cross_compiling" >&6; }
20288 
20289 rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
20290 ac_clean_files=$ac_clean_files_save
20291 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
20292 $as_echo_n "checking for suffix of object files... " >&6; }
20293 if ${ac_cv_objext+:} false; then :
20294   $as_echo_n "(cached) " >&6
20295 else
20296   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20297 /* end confdefs.h.  */
20298 
20299 int
20300 main ()
20301 {
20302 
20303   ;
20304   return 0;
20305 }
20306 _ACEOF
20307 rm -f conftest.o conftest.obj
20308 if { { ac_try="$ac_compile"
20309 case "(($ac_try" in
20310   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20311   *) ac_try_echo=$ac_try;;
20312 esac
20313 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
20314 $as_echo "$ac_try_echo"; } >&5
20315   (eval "$ac_compile") 2>&5
20316   ac_status=$?
20317   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
20318   test $ac_status = 0; }; then :
20319   for ac_file in conftest.o conftest.obj conftest.*; do
20320   test -f "$ac_file" || continue;
20321   case $ac_file in
20322     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
20323     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
20324        break;;
20325   esac
20326 done
20327 else
20328   $as_echo "$as_me: failed program was:" >&5
20329 sed 's/^/| /' conftest.$ac_ext >&5
20330 
20331 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
20332 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
20333 as_fn_error $? "cannot compute suffix of object files: cannot compile
20334 See \`config.log' for more details" "$LINENO" 5; }
20335 fi
20336 rm -f conftest.$ac_cv_objext conftest.$ac_ext
20337 fi
20338 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
20339 $as_echo "$ac_cv_objext" >&6; }
20340 OBJEXT=$ac_cv_objext
20341 ac_objext=$OBJEXT
20342 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
20343 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
20344 if ${ac_cv_c_compiler_gnu+:} false; then :
20345   $as_echo_n "(cached) " >&6
20346 else
20347   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20348 /* end confdefs.h.  */
20349 
20350 int
20351 main ()
20352 {
20353 #ifndef __GNUC__
20354        choke me
20355 #endif
20356 
20357   ;
20358   return 0;
20359 }
20360 _ACEOF
20361 if ac_fn_c_try_compile "$LINENO"; then :
20362   ac_compiler_gnu=yes
20363 else
20364   ac_compiler_gnu=no
20365 fi
20366 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20367 ac_cv_c_compiler_gnu=$ac_compiler_gnu
20368 
20369 fi
20370 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
20371 $as_echo "$ac_cv_c_compiler_gnu" >&6; }
20372 if test $ac_compiler_gnu = yes; then
20373   GCC=yes
20374 else
20375   GCC=
20376 fi
20377 ac_test_CFLAGS=${CFLAGS+set}
20378 ac_save_CFLAGS=$CFLAGS
20379 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
20380 $as_echo_n "checking whether $CC accepts -g... " >&6; }
20381 if ${ac_cv_prog_cc_g+:} false; then :
20382   $as_echo_n "(cached) " >&6
20383 else
20384   ac_save_c_werror_flag=$ac_c_werror_flag
20385    ac_c_werror_flag=yes
20386    ac_cv_prog_cc_g=no
20387    CFLAGS="-g"
20388    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20389 /* end confdefs.h.  */
20390 
20391 int
20392 main ()
20393 {
20394 
20395   ;
20396   return 0;
20397 }
20398 _ACEOF
20399 if ac_fn_c_try_compile "$LINENO"; then :
20400   ac_cv_prog_cc_g=yes
20401 else
20402   CFLAGS=""
20403       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20404 /* end confdefs.h.  */
20405 
20406 int
20407 main ()
20408 {
20409 
20410   ;
20411   return 0;
20412 }
20413 _ACEOF
20414 if ac_fn_c_try_compile "$LINENO"; then :
20415 
20416 else
20417   ac_c_werror_flag=$ac_save_c_werror_flag
20418          CFLAGS="-g"
20419          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20420 /* end confdefs.h.  */
20421 
20422 int
20423 main ()
20424 {
20425 
20426   ;
20427   return 0;
20428 }
20429 _ACEOF
20430 if ac_fn_c_try_compile "$LINENO"; then :
20431   ac_cv_prog_cc_g=yes
20432 fi
20433 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20434 fi
20435 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20436 fi
20437 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20438    ac_c_werror_flag=$ac_save_c_werror_flag
20439 fi
20440 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
20441 $as_echo "$ac_cv_prog_cc_g" >&6; }
20442 if test "$ac_test_CFLAGS" = set; then
20443   CFLAGS=$ac_save_CFLAGS
20444 elif test $ac_cv_prog_cc_g = yes; then
20445   if test "$GCC" = yes; then
20446     CFLAGS="-g -O2"
20447   else
20448     CFLAGS="-g"
20449   fi
20450 else
20451   if test "$GCC" = yes; then
20452     CFLAGS="-O2"
20453   else
20454     CFLAGS=
20455   fi
20456 fi
20457 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
20458 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
20459 if ${ac_cv_prog_cc_c89+:} false; then :
20460   $as_echo_n "(cached) " >&6
20461 else
20462   ac_cv_prog_cc_c89=no
20463 ac_save_CC=$CC
20464 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20465 /* end confdefs.h.  */
20466 #include <stdarg.h>
20467 #include <stdio.h>
20468 #include <sys/types.h>
20469 #include <sys/stat.h>
20470 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
20471 struct buf { int x; };
20472 FILE * (*rcsopen) (struct buf *, struct stat *, int);
20473 static char *e (p, i)
20474      char **p;
20475      int i;
20476 {
20477   return p[i];
20478 }
20479 static char *f (char * (*g) (char **, int), char **p, ...)
20480 {
20481   char *s;
20482   va_list v;
20483   va_start (v,p);
20484   s = g (p, va_arg (v,int));
20485   va_end (v);
20486   return s;
20487 }
20488 
20489 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
20490    function prototypes and stuff, but not '\xHH' hex character constants.
20491    These don't provoke an error unfortunately, instead are silently treated
20492    as 'x'.  The following induces an error, until -std is added to get
20493    proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
20494    array size at least.  It's necessary to write '\x00'==0 to get something
20495    that's true only with -std.  */
20496 int osf4_cc_array ['\x00' == 0 ? 1 : -1];
20497 
20498 /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
20499    inside strings and character constants.  */
20500 #define FOO(x) 'x'
20501 int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
20502 
20503 int test (int i, double x);
20504 struct s1 {int (*f) (int a);};
20505 struct s2 {int (*f) (double a);};
20506 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
20507 int argc;
20508 char **argv;
20509 int
20510 main ()
20511 {
20512 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
20513   ;
20514   return 0;
20515 }
20516 _ACEOF
20517 for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
20518         -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
20519 do
20520   CC="$ac_save_CC $ac_arg"
20521   if ac_fn_c_try_compile "$LINENO"; then :
20522   ac_cv_prog_cc_c89=$ac_arg
20523 fi
20524 rm -f core conftest.err conftest.$ac_objext
20525   test "x$ac_cv_prog_cc_c89" != "xno" && break
20526 done
20527 rm -f conftest.$ac_ext
20528 CC=$ac_save_CC
20529 
20530 fi
20531 # AC_CACHE_VAL
20532 case "x$ac_cv_prog_cc_c89" in
20533   x)
20534     { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
20535 $as_echo "none needed" >&6; } ;;
20536   xno)
20537     { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
20538 $as_echo "unsupported" >&6; } ;;
20539   *)
20540     CC="$CC $ac_cv_prog_cc_c89"
20541     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
20542 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
20543 esac
20544 if test "x$ac_cv_prog_cc_c89" != xno; then :
20545 
20546 fi
20547 
20548 ac_ext=cpp
20549 ac_cpp='$CXXCPP $CPPFLAGS'
20550 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
20551 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
20552 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
20553 
20554 
20555 ### Locate C++ compiler (CXX)
20556 
20557 if test "x$CXX" != x; then
20558   COMPILER_CHECK_LIST="$CXX"
20559 elif test "x$OPENJDK_TARGET_OS" = "xwindows"; then
20560   COMPILER_CHECK_LIST="cl"
20561 elif test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
20562   COMPILER_CHECK_LIST="CC g++"
20563 else
20564   COMPILER_CHECK_LIST="g++ CC"
20565 fi
20566 
20567 
20568   COMPILER_NAME=C++
20569 
20570   CXX=
20571   # If TOOLS_DIR is set, check for all compiler names in there first
20572   # before checking the rest of the PATH.
20573   if test -n "$TOOLS_DIR"; then
20574     PATH_save="$PATH"
20575     PATH="$TOOLS_DIR"
20576     for ac_prog in $COMPILER_CHECK_LIST
20577 do
20578   # Extract the first word of "$ac_prog", so it can be a program name with args.
20579 set dummy $ac_prog; ac_word=$2
20580 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20581 $as_echo_n "checking for $ac_word... " >&6; }
20582 if ${ac_cv_path_TOOLS_DIR_CXX+:} false; then :
20583   $as_echo_n "(cached) " >&6
20584 else
20585   case $TOOLS_DIR_CXX in
20586   [\\/]* | ?:[\\/]*)
20587   ac_cv_path_TOOLS_DIR_CXX="$TOOLS_DIR_CXX" # Let the user override the test with a path.
20588   ;;
20589   *)
20590   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20591 for as_dir in $PATH
20592 do
20593   IFS=$as_save_IFS
20594   test -z "$as_dir" && as_dir=.
20595     for ac_exec_ext in '' $ac_executable_extensions; do
20596   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
20597     ac_cv_path_TOOLS_DIR_CXX="$as_dir/$ac_word$ac_exec_ext"
20598     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20599     break 2
20600   fi
20601 done
20602   done
20603 IFS=$as_save_IFS
20604 
20605   ;;
20606 esac
20607 fi
20608 TOOLS_DIR_CXX=$ac_cv_path_TOOLS_DIR_CXX
20609 if test -n "$TOOLS_DIR_CXX"; then
20610   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLS_DIR_CXX" >&5
20611 $as_echo "$TOOLS_DIR_CXX" >&6; }
20612 else
20613   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20614 $as_echo "no" >&6; }
20615 fi
20616 
20617 
20618   test -n "$TOOLS_DIR_CXX" && break
20619 done
20620 
20621     CXX=$TOOLS_DIR_CXX
20622     PATH="$PATH_save"
20623   fi
20624 
20625   # AC_PATH_PROGS can't be run multiple times with the same variable,
20626   # so create a new name for this run.
20627   if test "x$CXX" = x; then
20628     for ac_prog in $COMPILER_CHECK_LIST
20629 do
20630   # Extract the first word of "$ac_prog", so it can be a program name with args.
20631 set dummy $ac_prog; ac_word=$2
20632 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20633 $as_echo_n "checking for $ac_word... " >&6; }
20634 if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
20635   $as_echo_n "(cached) " >&6
20636 else
20637   case $POTENTIAL_CXX in
20638   [\\/]* | ?:[\\/]*)
20639   ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
20640   ;;
20641   *)
20642   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20643 for as_dir in $PATH
20644 do
20645   IFS=$as_save_IFS
20646   test -z "$as_dir" && as_dir=.
20647     for ac_exec_ext in '' $ac_executable_extensions; do
20648   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
20649     ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
20650     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20651     break 2
20652   fi
20653 done
20654   done
20655 IFS=$as_save_IFS
20656 
20657   ;;
20658 esac
20659 fi
20660 POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
20661 if test -n "$POTENTIAL_CXX"; then
20662   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
20663 $as_echo "$POTENTIAL_CXX" >&6; }
20664 else
20665   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20666 $as_echo "no" >&6; }
20667 fi
20668 
20669 
20670   test -n "$POTENTIAL_CXX" && break
20671 done
20672 
20673     CXX=$POTENTIAL_CXX
20674   fi
20675 
20676   if test "x$CXX" = x; then
20677 
20678     # Print a helpful message on how to acquire the necessary build dependency.
20679     # devkit is the help tag: freetyp2, cups, pulse, alsa etc
20680     MISSING_DEPENDENCY=devkit
20681     PKGHANDLER_COMMAND=
20682 
20683     case $PKGHANDLER in
20684         apt-get)
20685                 apt_help     $MISSING_DEPENDENCY ;;
20686     yum)
20687                 yum_help     $MISSING_DEPENDENCY ;;
20688         port)
20689                 port_help    $MISSING_DEPENDENCY ;;
20690         pkgutil)
20691                 pkgutil_help $MISSING_DEPENDENCY ;;
20692         pkgadd)
20693                 pkgadd_help  $MISSING_DEPENDENCY ;;
20694     * )
20695       break ;;
20696     esac
20697 
20698     if test "x$PKGHANDLER_COMMAND" != x; then
20699         HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
20700     fi
20701 
20702       as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
20703   fi
20704 
20705   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20706 
20707   # First separate the path from the arguments. This will split at the first
20708   # space.
20709   complete="$CXX"
20710   path="${complete%% *}"
20711   tmp="$complete EOL"
20712   arguments="${tmp#* }"
20713 
20714   # Input might be given as Windows format, start by converting to
20715   # unix format.
20716   new_path=`$CYGPATH -u "$path"`
20717 
20718   # Now try to locate executable using which
20719   new_path=`$WHICH "$new_path" 2> /dev/null`
20720   # bat and cmd files are not always considered executable in cygwin causing which
20721   # to not find them
20722   if test "x$new_path" = x \
20723            && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20724            && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20725     new_path=`$CYGPATH -u "$path"`
20726   fi
20727   if test "x$new_path" = x; then
20728     # Oops. Which didn't find the executable.
20729     # The splitting of arguments from the executable at a space might have been incorrect,
20730     # since paths with space are more likely in Windows. Give it another try with the whole
20731     # argument.
20732     path="$complete"
20733     arguments="EOL"
20734     new_path=`$CYGPATH -u "$path"`
20735     new_path=`$WHICH "$new_path" 2> /dev/null`
20736     # bat and cmd files are not always considered executable in cygwin causing which
20737     # to not find them
20738     if test "x$new_path" = x \
20739              && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20740              && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20741       new_path=`$CYGPATH -u "$path"`
20742     fi
20743     if test "x$new_path" = x; then
20744       # It's still not found. Now this is an unrecoverable error.
20745       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
20746 $as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
20747       has_space=`$ECHO "$complete" | $GREP " "`
20748       if test "x$has_space" != x; then
20749         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20750 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20751       fi
20752       as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
20753     fi
20754   fi
20755 
20756   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20757   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20758   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20759   # "foo.exe" is OK but "foo" is an error.
20760   #
20761   # This test is therefore slightly more accurate than "test -f" to check for file precense.
20762   # It is also a way to make sure we got the proper file name for the real test later on.
20763   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20764   if test "x$test_shortpath" = x; then
20765     # Short path failed, file does not exist as specified.
20766     # Try adding .exe or .cmd
20767     if test -f "${new_path}.exe"; then
20768        input_to_shortpath="${new_path}.exe"
20769     elif test -f "${new_path}.cmd"; then
20770        input_to_shortpath="${new_path}.cmd"
20771     else
20772       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$new_path\", is invalid." >&5
20773 $as_echo "$as_me: The path of CXX, which resolves as \"$new_path\", is invalid." >&6;}
20774       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
20775 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
20776       as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
20777     fi
20778   else
20779     input_to_shortpath="$new_path"
20780   fi
20781 
20782   # Call helper function which possibly converts this using DOS-style short mode.
20783   # If so, the updated path is stored in $new_path.
20784   new_path="$input_to_shortpath"
20785 
20786   input_path="$input_to_shortpath"
20787   # Check if we need to convert this using DOS-style short mode. If the path
20788   # contains just simple characters, use it. Otherwise (spaces, weird characters),
20789   # take no chances and rewrite it.
20790   # Note: m4 eats our [], so we need to use [ and ] instead.
20791   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20792   if test "x$has_forbidden_chars" != x; then
20793     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20794     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20795     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20796     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20797       # Going to short mode and back again did indeed matter. Since short mode is
20798       # case insensitive, let's make it lowercase to improve readability.
20799       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20800       # Now convert it back to Unix-stile (cygpath)
20801       input_path=`$CYGPATH -u "$shortmode_path"`
20802       new_path="$input_path"
20803     fi
20804   fi
20805 
20806   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20807   if test "x$test_cygdrive_prefix" = x; then
20808     # As a simple fix, exclude /usr/bin since it's not a real path.
20809     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
20810       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20811       # a path prefixed by /cygdrive for fixpath to work.
20812       new_path="$CYGWIN_ROOT_PATH$input_path"
20813     fi
20814   fi
20815 
20816   # remove trailing .exe if any
20817   new_path="${new_path/%.exe/}"
20818 
20819   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20820 
20821   # First separate the path from the arguments. This will split at the first
20822   # space.
20823   complete="$CXX"
20824   path="${complete%% *}"
20825   tmp="$complete EOL"
20826   arguments="${tmp#* }"
20827 
20828   # Input might be given as Windows format, start by converting to
20829   # unix format.
20830   new_path="$path"
20831 
20832   windows_path="$new_path"
20833   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20834     unix_path=`$CYGPATH -u "$windows_path"`
20835     new_path="$unix_path"
20836   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20837     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20838     new_path="$unix_path"
20839   fi
20840 
20841 
20842   # Now try to locate executable using which
20843   new_path=`$WHICH "$new_path" 2> /dev/null`
20844 
20845   if test "x$new_path" = x; then
20846     # Oops. Which didn't find the executable.
20847     # The splitting of arguments from the executable at a space might have been incorrect,
20848     # since paths with space are more likely in Windows. Give it another try with the whole
20849     # argument.
20850     path="$complete"
20851     arguments="EOL"
20852     new_path="$path"
20853 
20854   windows_path="$new_path"
20855   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20856     unix_path=`$CYGPATH -u "$windows_path"`
20857     new_path="$unix_path"
20858   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20859     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20860     new_path="$unix_path"
20861   fi
20862 
20863 
20864     new_path=`$WHICH "$new_path" 2> /dev/null`
20865 
20866     if test "x$new_path" = x; then
20867       # It's still not found. Now this is an unrecoverable error.
20868       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
20869 $as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
20870       has_space=`$ECHO "$complete" | $GREP " "`
20871       if test "x$has_space" != x; then
20872         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20873 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20874       fi
20875       as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
20876     fi
20877   fi
20878 
20879   # Now new_path has a complete unix path to the binary
20880   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
20881     # Keep paths in /bin as-is, but remove trailing .exe if any
20882     new_path="${new_path/%.exe/}"
20883     # Do not save /bin paths to all_fixpath_prefixes!
20884   else
20885     # Not in mixed or Windows style, start by that.
20886     new_path=`cmd //c echo $new_path`
20887 
20888   input_path="$new_path"
20889   # Check if we need to convert this using DOS-style short mode. If the path
20890   # contains just simple characters, use it. Otherwise (spaces, weird characters),
20891   # take no chances and rewrite it.
20892   # Note: m4 eats our [], so we need to use [ and ] instead.
20893   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20894   if test "x$has_forbidden_chars" != x; then
20895     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20896     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20897   fi
20898 
20899     # Output is in $new_path
20900 
20901   windows_path="$new_path"
20902   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20903     unix_path=`$CYGPATH -u "$windows_path"`
20904     new_path="$unix_path"
20905   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20906     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20907     new_path="$unix_path"
20908   fi
20909 
20910     # remove trailing .exe if any
20911     new_path="${new_path/%.exe/}"
20912 
20913     # Save the first 10 bytes of this path to the storage, so fixpath can work.
20914     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20915   fi
20916 
20917   else
20918     # We're on a posix platform. Hooray! :)
20919     # First separate the path from the arguments. This will split at the first
20920     # space.
20921     complete="$CXX"
20922     path="${complete%% *}"
20923     tmp="$complete EOL"
20924     arguments="${tmp#* }"
20925 
20926     # Cannot rely on the command "which" here since it doesn't always work.
20927     is_absolute_path=`$ECHO "$path" | $GREP ^/`
20928     if test -z "$is_absolute_path"; then
20929       # Path to executable is not absolute. Find it.
20930       IFS_save="$IFS"
20931       IFS=:
20932       for p in $PATH; do
20933         if test -f "$p/$path" && test -x "$p/$path"; then
20934           new_path="$p/$path"
20935           break
20936         fi
20937       done
20938       IFS="$IFS_save"
20939     else
20940       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CXX (as $path) failed, using $path directly." >&5
20941 $as_echo "$as_me: Resolving CXX (as $path) failed, using $path directly." >&6;}
20942       new_path="$path"
20943     fi
20944 
20945     if test "x$new_path" = x; then
20946         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
20947 $as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
20948         has_space=`$ECHO "$complete" | $GREP " "`
20949         if test "x$has_space" != x; then
20950           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
20951 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
20952         fi
20953         as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
20954       fi
20955   fi
20956 
20957       # Now join together the path and the arguments once again
20958       if test "x$arguments" != xEOL; then
20959         new_complete="$new_path ${arguments% *}"
20960       else
20961         new_complete="$new_path"
20962       fi
20963 
20964   if test "x$complete" != "x$new_complete"; then
20965       CXX="$new_complete"
20966       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXX to \"$new_complete\"" >&5
20967 $as_echo "$as_me: Rewriting CXX to \"$new_complete\"" >&6;}
20968     fi
20969 
20970   { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CXX" >&5
20971 $as_echo_n "checking resolved symbolic links for CXX... " >&6; }
20972   TEST_COMPILER="$CXX"
20973 
20974     if test "x$OPENJDK_BUILD_OS" != xwindows; then
20975         # Follow a chain of symbolic links. Use readlink
20976         # where it exists, else fall back to horribly
20977         # complicated shell code.
20978         if test "x$READLINK_TESTED" != yes; then
20979             # On MacOSX there is a readlink tool with a different
20980             # purpose than the GNU readlink tool. Check the found readlink.
20981             ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
20982             if test "x$ISGNU" = x; then
20983                  # A readlink that we do not know how to use.
20984                  # Are there other non-GNU readlinks out there?
20985                  READLINK_TESTED=yes
20986                  READLINK=
20987             fi
20988         fi
20989 
20990         if test "x$READLINK" != x; then
20991             TEST_COMPILER=`$READLINK -f $TEST_COMPILER`
20992         else
20993             # Save the current directory for restoring afterwards
20994             STARTDIR=$PWD
20995             COUNTER=0
20996             sym_link_dir=`$DIRNAME $TEST_COMPILER`
20997             sym_link_file=`$BASENAME $TEST_COMPILER`
20998             cd $sym_link_dir
20999             # Use -P flag to resolve symlinks in directories.
21000             cd `$THEPWDCMD -P`
21001             sym_link_dir=`$THEPWDCMD -P`
21002             # Resolve file symlinks
21003             while test $COUNTER -lt 20; do
21004                 ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
21005                 if test "x$ISLINK" == x; then
21006                     # This is not a symbolic link! We are done!
21007                     break
21008                 fi
21009                 # Again resolve directory symlinks since the target of the just found
21010                 # link could be in a different directory
21011                 cd `$DIRNAME $ISLINK`
21012                 sym_link_dir=`$THEPWDCMD -P`
21013                 sym_link_file=`$BASENAME $ISLINK`
21014                 let COUNTER=COUNTER+1
21015             done
21016             cd $STARTDIR
21017             TEST_COMPILER=$sym_link_dir/$sym_link_file
21018         fi
21019     fi
21020 
21021   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_COMPILER" >&5
21022 $as_echo "$TEST_COMPILER" >&6; }
21023   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CXX is disguised ccache" >&5
21024 $as_echo_n "checking if CXX is disguised ccache... " >&6; }
21025 
21026   COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"`
21027   if test "x$COMPILER_BASENAME" = "xccache"; then
21028     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5
21029 $as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; }
21030     # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache.
21031     # We want to control ccache invocation ourselves, so ignore this cc and try
21032     # searching again.
21033 
21034     # Remove the path to the fake ccache cc from the PATH
21035     RETRY_COMPILER_SAVED_PATH="$PATH"
21036     COMPILER_DIRNAME=`$DIRNAME $CXX`
21037     PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`"
21038 
21039     # Try again looking for our compiler
21040     if test -n "$ac_tool_prefix"; then
21041   for ac_prog in $COMPILER_CHECK_LIST
21042   do
21043     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
21044 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
21045 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21046 $as_echo_n "checking for $ac_word... " >&6; }
21047 if ${ac_cv_prog_PROPER_COMPILER_CXX+:} false; then :
21048   $as_echo_n "(cached) " >&6
21049 else
21050   if test -n "$PROPER_COMPILER_CXX"; then
21051   ac_cv_prog_PROPER_COMPILER_CXX="$PROPER_COMPILER_CXX" # Let the user override the test.
21052 else
21053 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21054 for as_dir in $PATH
21055 do
21056   IFS=$as_save_IFS
21057   test -z "$as_dir" && as_dir=.
21058     for ac_exec_ext in '' $ac_executable_extensions; do
21059   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
21060     ac_cv_prog_PROPER_COMPILER_CXX="$ac_tool_prefix$ac_prog"
21061     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21062     break 2
21063   fi
21064 done
21065   done
21066 IFS=$as_save_IFS
21067 
21068 fi
21069 fi
21070 PROPER_COMPILER_CXX=$ac_cv_prog_PROPER_COMPILER_CXX
21071 if test -n "$PROPER_COMPILER_CXX"; then
21072   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5
21073 $as_echo "$PROPER_COMPILER_CXX" >&6; }
21074 else
21075   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21076 $as_echo "no" >&6; }
21077 fi
21078 
21079 
21080     test -n "$PROPER_COMPILER_CXX" && break
21081   done
21082 fi
21083 if test -z "$PROPER_COMPILER_CXX"; then
21084   ac_ct_PROPER_COMPILER_CXX=$PROPER_COMPILER_CXX
21085   for ac_prog in $COMPILER_CHECK_LIST
21086 do
21087   # Extract the first word of "$ac_prog", so it can be a program name with args.
21088 set dummy $ac_prog; ac_word=$2
21089 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21090 $as_echo_n "checking for $ac_word... " >&6; }
21091 if ${ac_cv_prog_ac_ct_PROPER_COMPILER_CXX+:} false; then :
21092   $as_echo_n "(cached) " >&6
21093 else
21094   if test -n "$ac_ct_PROPER_COMPILER_CXX"; then
21095   ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_ct_PROPER_COMPILER_CXX" # Let the user override the test.
21096 else
21097 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21098 for as_dir in $PATH
21099 do
21100   IFS=$as_save_IFS
21101   test -z "$as_dir" && as_dir=.
21102     for ac_exec_ext in '' $ac_executable_extensions; do
21103   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
21104     ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_prog"
21105     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21106     break 2
21107   fi
21108 done
21109   done
21110 IFS=$as_save_IFS
21111 
21112 fi
21113 fi
21114 ac_ct_PROPER_COMPILER_CXX=$ac_cv_prog_ac_ct_PROPER_COMPILER_CXX
21115 if test -n "$ac_ct_PROPER_COMPILER_CXX"; then
21116   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CXX" >&5
21117 $as_echo "$ac_ct_PROPER_COMPILER_CXX" >&6; }
21118 else
21119   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21120 $as_echo "no" >&6; }
21121 fi
21122 
21123 
21124   test -n "$ac_ct_PROPER_COMPILER_CXX" && break
21125 done
21126 
21127   if test "x$ac_ct_PROPER_COMPILER_CXX" = x; then
21128     PROPER_COMPILER_CXX=""
21129   else
21130     case $cross_compiling:$ac_tool_warned in
21131 yes:)
21132 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
21133 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
21134 ac_tool_warned=yes ;;
21135 esac
21136     PROPER_COMPILER_CXX=$ac_ct_PROPER_COMPILER_CXX
21137   fi
21138 fi
21139 
21140 
21141   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21142 
21143   # First separate the path from the arguments. This will split at the first
21144   # space.
21145   complete="$PROPER_COMPILER_CXX"
21146   path="${complete%% *}"
21147   tmp="$complete EOL"
21148   arguments="${tmp#* }"
21149 
21150   # Input might be given as Windows format, start by converting to
21151   # unix format.
21152   new_path=`$CYGPATH -u "$path"`
21153 
21154   # Now try to locate executable using which
21155   new_path=`$WHICH "$new_path" 2> /dev/null`
21156   # bat and cmd files are not always considered executable in cygwin causing which
21157   # to not find them
21158   if test "x$new_path" = x \
21159            && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21160            && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21161     new_path=`$CYGPATH -u "$path"`
21162   fi
21163   if test "x$new_path" = x; then
21164     # Oops. Which didn't find the executable.
21165     # The splitting of arguments from the executable at a space might have been incorrect,
21166     # since paths with space are more likely in Windows. Give it another try with the whole
21167     # argument.
21168     path="$complete"
21169     arguments="EOL"
21170     new_path=`$CYGPATH -u "$path"`
21171     new_path=`$WHICH "$new_path" 2> /dev/null`
21172     # bat and cmd files are not always considered executable in cygwin causing which
21173     # to not find them
21174     if test "x$new_path" = x \
21175              && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21176              && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21177       new_path=`$CYGPATH -u "$path"`
21178     fi
21179     if test "x$new_path" = x; then
21180       # It's still not found. Now this is an unrecoverable error.
21181       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
21182 $as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
21183       has_space=`$ECHO "$complete" | $GREP " "`
21184       if test "x$has_space" != x; then
21185         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21186 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21187       fi
21188       as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
21189     fi
21190   fi
21191 
21192   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21193   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21194   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21195   # "foo.exe" is OK but "foo" is an error.
21196   #
21197   # This test is therefore slightly more accurate than "test -f" to check for file precense.
21198   # It is also a way to make sure we got the proper file name for the real test later on.
21199   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21200   if test "x$test_shortpath" = x; then
21201     # Short path failed, file does not exist as specified.
21202     # Try adding .exe or .cmd
21203     if test -f "${new_path}.exe"; then
21204        input_to_shortpath="${new_path}.exe"
21205     elif test -f "${new_path}.cmd"; then
21206        input_to_shortpath="${new_path}.cmd"
21207     else
21208       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&5
21209 $as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&6;}
21210       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
21211 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
21212       as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
21213     fi
21214   else
21215     input_to_shortpath="$new_path"
21216   fi
21217 
21218   # Call helper function which possibly converts this using DOS-style short mode.
21219   # If so, the updated path is stored in $new_path.
21220   new_path="$input_to_shortpath"
21221 
21222   input_path="$input_to_shortpath"
21223   # Check if we need to convert this using DOS-style short mode. If the path
21224   # contains just simple characters, use it. Otherwise (spaces, weird characters),
21225   # take no chances and rewrite it.
21226   # Note: m4 eats our [], so we need to use [ and ] instead.
21227   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21228   if test "x$has_forbidden_chars" != x; then
21229     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21230     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21231     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21232     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21233       # Going to short mode and back again did indeed matter. Since short mode is
21234       # case insensitive, let's make it lowercase to improve readability.
21235       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21236       # Now convert it back to Unix-stile (cygpath)
21237       input_path=`$CYGPATH -u "$shortmode_path"`
21238       new_path="$input_path"
21239     fi
21240   fi
21241 
21242   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21243   if test "x$test_cygdrive_prefix" = x; then
21244     # As a simple fix, exclude /usr/bin since it's not a real path.
21245     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
21246       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21247       # a path prefixed by /cygdrive for fixpath to work.
21248       new_path="$CYGWIN_ROOT_PATH$input_path"
21249     fi
21250   fi
21251 
21252   # remove trailing .exe if any
21253   new_path="${new_path/%.exe/}"
21254 
21255   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21256 
21257   # First separate the path from the arguments. This will split at the first
21258   # space.
21259   complete="$PROPER_COMPILER_CXX"
21260   path="${complete%% *}"
21261   tmp="$complete EOL"
21262   arguments="${tmp#* }"
21263 
21264   # Input might be given as Windows format, start by converting to
21265   # unix format.
21266   new_path="$path"
21267 
21268   windows_path="$new_path"
21269   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21270     unix_path=`$CYGPATH -u "$windows_path"`
21271     new_path="$unix_path"
21272   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21273     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21274     new_path="$unix_path"
21275   fi
21276 
21277 
21278   # Now try to locate executable using which
21279   new_path=`$WHICH "$new_path" 2> /dev/null`
21280 
21281   if test "x$new_path" = x; then
21282     # Oops. Which didn't find the executable.
21283     # The splitting of arguments from the executable at a space might have been incorrect,
21284     # since paths with space are more likely in Windows. Give it another try with the whole
21285     # argument.
21286     path="$complete"
21287     arguments="EOL"
21288     new_path="$path"
21289 
21290   windows_path="$new_path"
21291   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21292     unix_path=`$CYGPATH -u "$windows_path"`
21293     new_path="$unix_path"
21294   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21295     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21296     new_path="$unix_path"
21297   fi
21298 
21299 
21300     new_path=`$WHICH "$new_path" 2> /dev/null`
21301 
21302     if test "x$new_path" = x; then
21303       # It's still not found. Now this is an unrecoverable error.
21304       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
21305 $as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
21306       has_space=`$ECHO "$complete" | $GREP " "`
21307       if test "x$has_space" != x; then
21308         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21309 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21310       fi
21311       as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
21312     fi
21313   fi
21314 
21315   # Now new_path has a complete unix path to the binary
21316   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
21317     # Keep paths in /bin as-is, but remove trailing .exe if any
21318     new_path="${new_path/%.exe/}"
21319     # Do not save /bin paths to all_fixpath_prefixes!
21320   else
21321     # Not in mixed or Windows style, start by that.
21322     new_path=`cmd //c echo $new_path`
21323 
21324   input_path="$new_path"
21325   # Check if we need to convert this using DOS-style short mode. If the path
21326   # contains just simple characters, use it. Otherwise (spaces, weird characters),
21327   # take no chances and rewrite it.
21328   # Note: m4 eats our [], so we need to use [ and ] instead.
21329   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21330   if test "x$has_forbidden_chars" != x; then
21331     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21332     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21333   fi
21334 
21335     # Output is in $new_path
21336 
21337   windows_path="$new_path"
21338   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21339     unix_path=`$CYGPATH -u "$windows_path"`
21340     new_path="$unix_path"
21341   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21342     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21343     new_path="$unix_path"
21344   fi
21345 
21346     # remove trailing .exe if any
21347     new_path="${new_path/%.exe/}"
21348 
21349     # Save the first 10 bytes of this path to the storage, so fixpath can work.
21350     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21351   fi
21352 
21353   else
21354     # We're on a posix platform. Hooray! :)
21355     # First separate the path from the arguments. This will split at the first
21356     # space.
21357     complete="$PROPER_COMPILER_CXX"
21358     path="${complete%% *}"
21359     tmp="$complete EOL"
21360     arguments="${tmp#* }"
21361 
21362     # Cannot rely on the command "which" here since it doesn't always work.
21363     is_absolute_path=`$ECHO "$path" | $GREP ^/`
21364     if test -z "$is_absolute_path"; then
21365       # Path to executable is not absolute. Find it.
21366       IFS_save="$IFS"
21367       IFS=:
21368       for p in $PATH; do
21369         if test -f "$p/$path" && test -x "$p/$path"; then
21370           new_path="$p/$path"
21371           break
21372         fi
21373       done
21374       IFS="$IFS_save"
21375     else
21376       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving PROPER_COMPILER_CXX (as $path) failed, using $path directly." >&5
21377 $as_echo "$as_me: Resolving PROPER_COMPILER_CXX (as $path) failed, using $path directly." >&6;}
21378       new_path="$path"
21379     fi
21380 
21381     if test "x$new_path" = x; then
21382         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
21383 $as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
21384         has_space=`$ECHO "$complete" | $GREP " "`
21385         if test "x$has_space" != x; then
21386           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
21387 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
21388         fi
21389         as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
21390       fi
21391   fi
21392 
21393       # Now join together the path and the arguments once again
21394       if test "x$arguments" != xEOL; then
21395         new_complete="$new_path ${arguments% *}"
21396       else
21397         new_complete="$new_path"
21398       fi
21399 
21400   if test "x$complete" != "x$new_complete"; then
21401       PROPER_COMPILER_CXX="$new_complete"
21402       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&5
21403 $as_echo "$as_me: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&6;}
21404     fi
21405 
21406     PATH="$RETRY_COMPILER_SAVED_PATH"
21407 
21408     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CXX" >&5
21409 $as_echo_n "checking for resolved symbolic links for CXX... " >&6; }
21410 
21411     if test "x$OPENJDK_BUILD_OS" != xwindows; then
21412         # Follow a chain of symbolic links. Use readlink
21413         # where it exists, else fall back to horribly
21414         # complicated shell code.
21415         if test "x$READLINK_TESTED" != yes; then
21416             # On MacOSX there is a readlink tool with a different
21417             # purpose than the GNU readlink tool. Check the found readlink.
21418             ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
21419             if test "x$ISGNU" = x; then
21420                  # A readlink that we do not know how to use.
21421                  # Are there other non-GNU readlinks out there?
21422                  READLINK_TESTED=yes
21423                  READLINK=
21424             fi
21425         fi
21426 
21427         if test "x$READLINK" != x; then
21428             PROPER_COMPILER_CXX=`$READLINK -f $PROPER_COMPILER_CXX`
21429         else
21430             # Save the current directory for restoring afterwards
21431             STARTDIR=$PWD
21432             COUNTER=0
21433             sym_link_dir=`$DIRNAME $PROPER_COMPILER_CXX`
21434             sym_link_file=`$BASENAME $PROPER_COMPILER_CXX`
21435             cd $sym_link_dir
21436             # Use -P flag to resolve symlinks in directories.
21437             cd `$THEPWDCMD -P`
21438             sym_link_dir=`$THEPWDCMD -P`
21439             # Resolve file symlinks
21440             while test $COUNTER -lt 20; do
21441                 ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
21442                 if test "x$ISLINK" == x; then
21443                     # This is not a symbolic link! We are done!
21444                     break
21445                 fi
21446                 # Again resolve directory symlinks since the target of the just found
21447                 # link could be in a different directory
21448                 cd `$DIRNAME $ISLINK`
21449                 sym_link_dir=`$THEPWDCMD -P`
21450                 sym_link_file=`$BASENAME $ISLINK`
21451                 let COUNTER=COUNTER+1
21452             done
21453             cd $STARTDIR
21454             PROPER_COMPILER_CXX=$sym_link_dir/$sym_link_file
21455         fi
21456     fi
21457 
21458     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5
21459 $as_echo "$PROPER_COMPILER_CXX" >&6; }
21460     CXX="$PROPER_COMPILER_CXX"
21461   else
21462     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CXX" >&5
21463 $as_echo "no, keeping CXX" >&6; }
21464     CXX="$TEST_COMPILER"
21465   fi
21466 
21467   COMPILER=$CXX
21468   COMPILER_NAME=$COMPILER_NAME
21469 
21470   if test "x$OPENJDK_TARGET_OS" = xsolaris; then
21471     # Make sure we use the Sun Studio compiler and not gcc on Solaris, which won't work
21472     COMPILER_VERSION_TEST=`$COMPILER -V 2>&1 | $HEAD -n 1`
21473     $ECHO $COMPILER_VERSION_TEST | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
21474     if test $? -ne 0; then
21475       GCC_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
21476 
21477       { $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
21478 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required Sun Studio compiler." >&6;}
21479       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&5
21480 $as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&6;}
21481       as_fn_error $? "Sun Studio compiler is required. Try setting --with-tools-dir." "$LINENO" 5
21482     else
21483       COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/p"`
21484       COMPILER_VENDOR="Sun Studio"
21485     fi
21486   elif test  "x$OPENJDK_TARGET_OS" = xwindows; then
21487     # First line typically looks something like:
21488     # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.30319.01 for 80x86
21489     COMPILER_VERSION_TEST=`$COMPILER 2>&1 | $HEAD -n 1`
21490     COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*Version \([1-9][0-9.]*\) .*/\1/p"`
21491     COMPILER_VENDOR="Microsoft CL.EXE"
21492     COMPILER_CPU_TEST=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* for \(.*\)$/\1/p"`
21493     if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
21494       if test "x$COMPILER_CPU_TEST" != "x80x86"; then
21495         as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"80x86\"." "$LINENO" 5
21496       fi
21497     elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
21498       if test "x$COMPILER_CPU_TEST" != "xx64"; then
21499         as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." "$LINENO" 5
21500       fi
21501     fi
21502   else
21503     COMPILER_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
21504     # Check that this is likely to be GCC.
21505     $COMPILER --version 2>&1 | $GREP "Free Software Foundation" > /dev/null
21506     if test $? -ne 0; then
21507       { $as_echo "$as_me:${as_lineno-$LINENO}: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&5
21508 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&6;}
21509       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&5
21510 $as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&6;}
21511       as_fn_error $? "GCC compiler is required. Try setting --with-tools-dir." "$LINENO" 5
21512     fi
21513 
21514     # First line typically looks something like:
21515     # gcc (Ubuntu/Linaro 4.5.2-8ubuntu4) 4.5.2
21516     COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* \([1-9][0-9.]*\)/\1/p"`
21517     COMPILER_VENDOR=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^\(.*\) [1-9][0-9.]*/\1/p"`
21518   fi
21519   # This sets CC_VERSION or CXX_VERSION. (This comment is a grep marker)
21520   CXX_VERSION="$COMPILER_VERSION"
21521   # This sets CC_VENDOR or CXX_VENDOR. (This comment is a grep marker)
21522   CXX_VENDOR="$COMPILER_VENDOR"
21523 
21524   { $as_echo "$as_me:${as_lineno-$LINENO}: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&5
21525 $as_echo "$as_me: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&6;}
21526 
21527 
21528 # Now that we have resolved CXX ourself, let autoconf have its go at it
21529 ac_ext=cpp
21530 ac_cpp='$CXXCPP $CPPFLAGS'
21531 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
21532 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
21533 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
21534 if test -z "$CXX"; then
21535   if test -n "$CCC"; then
21536     CXX=$CCC
21537   else
21538     if test -n "$ac_tool_prefix"; then
21539   for ac_prog in $CXX
21540   do
21541     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
21542 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
21543 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21544 $as_echo_n "checking for $ac_word... " >&6; }
21545 if ${ac_cv_prog_CXX+:} false; then :
21546   $as_echo_n "(cached) " >&6
21547 else
21548   if test -n "$CXX"; then
21549   ac_cv_prog_CXX="$CXX" # Let the user override the test.
21550 else
21551 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21552 for as_dir in $PATH
21553 do
21554   IFS=$as_save_IFS
21555   test -z "$as_dir" && as_dir=.
21556     for ac_exec_ext in '' $ac_executable_extensions; do
21557   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
21558     ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
21559     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21560     break 2
21561   fi
21562 done
21563   done
21564 IFS=$as_save_IFS
21565 
21566 fi
21567 fi
21568 CXX=$ac_cv_prog_CXX
21569 if test -n "$CXX"; then
21570   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
21571 $as_echo "$CXX" >&6; }
21572 else
21573   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21574 $as_echo "no" >&6; }
21575 fi
21576 
21577 
21578     test -n "$CXX" && break
21579   done
21580 fi
21581 if test -z "$CXX"; then
21582   ac_ct_CXX=$CXX
21583   for ac_prog in $CXX
21584 do
21585   # Extract the first word of "$ac_prog", so it can be a program name with args.
21586 set dummy $ac_prog; ac_word=$2
21587 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21588 $as_echo_n "checking for $ac_word... " >&6; }
21589 if ${ac_cv_prog_ac_ct_CXX+:} false; then :
21590   $as_echo_n "(cached) " >&6
21591 else
21592   if test -n "$ac_ct_CXX"; then
21593   ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
21594 else
21595 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21596 for as_dir in $PATH
21597 do
21598   IFS=$as_save_IFS
21599   test -z "$as_dir" && as_dir=.
21600     for ac_exec_ext in '' $ac_executable_extensions; do
21601   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
21602     ac_cv_prog_ac_ct_CXX="$ac_prog"
21603     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21604     break 2
21605   fi
21606 done
21607   done
21608 IFS=$as_save_IFS
21609 
21610 fi
21611 fi
21612 ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
21613 if test -n "$ac_ct_CXX"; then
21614   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
21615 $as_echo "$ac_ct_CXX" >&6; }
21616 else
21617   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21618 $as_echo "no" >&6; }
21619 fi
21620 
21621 
21622   test -n "$ac_ct_CXX" && break
21623 done
21624 
21625   if test "x$ac_ct_CXX" = x; then
21626     CXX="g++"
21627   else
21628     case $cross_compiling:$ac_tool_warned in
21629 yes:)
21630 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
21631 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
21632 ac_tool_warned=yes ;;
21633 esac
21634     CXX=$ac_ct_CXX
21635   fi
21636 fi
21637 
21638   fi
21639 fi
21640 # Provide some information about the compiler.
21641 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
21642 set X $ac_compile
21643 ac_compiler=$2
21644 for ac_option in --version -v -V -qversion; do
21645   { { ac_try="$ac_compiler $ac_option >&5"
21646 case "(($ac_try" in
21647   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21648   *) ac_try_echo=$ac_try;;
21649 esac
21650 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
21651 $as_echo "$ac_try_echo"; } >&5
21652   (eval "$ac_compiler $ac_option >&5") 2>conftest.err
21653   ac_status=$?
21654   if test -s conftest.err; then
21655     sed '10a\
21656 ... rest of stderr output deleted ...
21657          10q' conftest.err >conftest.er1
21658     cat conftest.er1 >&5
21659   fi
21660   rm -f conftest.er1 conftest.err
21661   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
21662   test $ac_status = 0; }
21663 done
21664 
21665 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
21666 $as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
21667 if ${ac_cv_cxx_compiler_gnu+:} false; then :
21668   $as_echo_n "(cached) " >&6
21669 else
21670   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21671 /* end confdefs.h.  */
21672 
21673 int
21674 main ()
21675 {
21676 #ifndef __GNUC__
21677        choke me
21678 #endif
21679 
21680   ;
21681   return 0;
21682 }
21683 _ACEOF
21684 if ac_fn_cxx_try_compile "$LINENO"; then :
21685   ac_compiler_gnu=yes
21686 else
21687   ac_compiler_gnu=no
21688 fi
21689 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21690 ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
21691 
21692 fi
21693 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
21694 $as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
21695 if test $ac_compiler_gnu = yes; then
21696   GXX=yes
21697 else
21698   GXX=
21699 fi
21700 ac_test_CXXFLAGS=${CXXFLAGS+set}
21701 ac_save_CXXFLAGS=$CXXFLAGS
21702 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
21703 $as_echo_n "checking whether $CXX accepts -g... " >&6; }
21704 if ${ac_cv_prog_cxx_g+:} false; then :
21705   $as_echo_n "(cached) " >&6
21706 else
21707   ac_save_cxx_werror_flag=$ac_cxx_werror_flag
21708    ac_cxx_werror_flag=yes
21709    ac_cv_prog_cxx_g=no
21710    CXXFLAGS="-g"
21711    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21712 /* end confdefs.h.  */
21713 
21714 int
21715 main ()
21716 {
21717 
21718   ;
21719   return 0;
21720 }
21721 _ACEOF
21722 if ac_fn_cxx_try_compile "$LINENO"; then :
21723   ac_cv_prog_cxx_g=yes
21724 else
21725   CXXFLAGS=""
21726       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21727 /* end confdefs.h.  */
21728 
21729 int
21730 main ()
21731 {
21732 
21733   ;
21734   return 0;
21735 }
21736 _ACEOF
21737 if ac_fn_cxx_try_compile "$LINENO"; then :
21738 
21739 else
21740   ac_cxx_werror_flag=$ac_save_cxx_werror_flag
21741          CXXFLAGS="-g"
21742          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21743 /* end confdefs.h.  */
21744 
21745 int
21746 main ()
21747 {
21748 
21749   ;
21750   return 0;
21751 }
21752 _ACEOF
21753 if ac_fn_cxx_try_compile "$LINENO"; then :
21754   ac_cv_prog_cxx_g=yes
21755 fi
21756 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21757 fi
21758 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21759 fi
21760 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21761    ac_cxx_werror_flag=$ac_save_cxx_werror_flag
21762 fi
21763 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
21764 $as_echo "$ac_cv_prog_cxx_g" >&6; }
21765 if test "$ac_test_CXXFLAGS" = set; then
21766   CXXFLAGS=$ac_save_CXXFLAGS
21767 elif test $ac_cv_prog_cxx_g = yes; then
21768   if test "$GXX" = yes; then
21769     CXXFLAGS="-g -O2"
21770   else
21771     CXXFLAGS="-g"
21772   fi
21773 else
21774   if test "$GXX" = yes; then
21775     CXXFLAGS="-O2"
21776   else
21777     CXXFLAGS=
21778   fi
21779 fi
21780 ac_ext=cpp
21781 ac_cpp='$CXXCPP $CPPFLAGS'
21782 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
21783 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
21784 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
21785 
21786 
21787 ### Locate other tools
21788 
21789 if test "x$OPENJDK_TARGET_OS" = xmacosx; then
21790     ac_ext=m
21791 ac_cpp='$OBJCPP $CPPFLAGS'
21792 ac_compile='$OBJC -c $OBJCFLAGS $CPPFLAGS conftest.$ac_ext >&5'
21793 ac_link='$OBJC -o conftest$ac_exeext $OBJCFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
21794 ac_compiler_gnu=$ac_cv_objc_compiler_gnu
21795 if test -n "$ac_tool_prefix"; then
21796   for ac_prog in gcc objcc objc cc CC
21797   do
21798     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
21799 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
21800 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21801 $as_echo_n "checking for $ac_word... " >&6; }
21802 if ${ac_cv_prog_OBJC+:} false; then :
21803   $as_echo_n "(cached) " >&6
21804 else
21805   if test -n "$OBJC"; then
21806   ac_cv_prog_OBJC="$OBJC" # Let the user override the test.
21807 else
21808 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21809 for as_dir in $PATH
21810 do
21811   IFS=$as_save_IFS
21812   test -z "$as_dir" && as_dir=.
21813     for ac_exec_ext in '' $ac_executable_extensions; do
21814   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
21815     ac_cv_prog_OBJC="$ac_tool_prefix$ac_prog"
21816     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21817     break 2
21818   fi
21819 done
21820   done
21821 IFS=$as_save_IFS
21822 
21823 fi
21824 fi
21825 OBJC=$ac_cv_prog_OBJC
21826 if test -n "$OBJC"; then
21827   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJC" >&5
21828 $as_echo "$OBJC" >&6; }
21829 else
21830   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21831 $as_echo "no" >&6; }
21832 fi
21833 
21834 
21835     test -n "$OBJC" && break
21836   done
21837 fi
21838 if test -z "$OBJC"; then
21839   ac_ct_OBJC=$OBJC
21840   for ac_prog in gcc objcc objc cc CC
21841 do
21842   # Extract the first word of "$ac_prog", so it can be a program name with args.
21843 set dummy $ac_prog; ac_word=$2
21844 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21845 $as_echo_n "checking for $ac_word... " >&6; }
21846 if ${ac_cv_prog_ac_ct_OBJC+:} false; then :
21847   $as_echo_n "(cached) " >&6
21848 else
21849   if test -n "$ac_ct_OBJC"; then
21850   ac_cv_prog_ac_ct_OBJC="$ac_ct_OBJC" # Let the user override the test.
21851 else
21852 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21853 for as_dir in $PATH
21854 do
21855   IFS=$as_save_IFS
21856   test -z "$as_dir" && as_dir=.
21857     for ac_exec_ext in '' $ac_executable_extensions; do
21858   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
21859     ac_cv_prog_ac_ct_OBJC="$ac_prog"
21860     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21861     break 2
21862   fi
21863 done
21864   done
21865 IFS=$as_save_IFS
21866 
21867 fi
21868 fi
21869 ac_ct_OBJC=$ac_cv_prog_ac_ct_OBJC
21870 if test -n "$ac_ct_OBJC"; then
21871   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJC" >&5
21872 $as_echo "$ac_ct_OBJC" >&6; }
21873 else
21874   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21875 $as_echo "no" >&6; }
21876 fi
21877 
21878 
21879   test -n "$ac_ct_OBJC" && break
21880 done
21881 
21882   if test "x$ac_ct_OBJC" = x; then
21883     OBJC="gcc"
21884   else
21885     case $cross_compiling:$ac_tool_warned in
21886 yes:)
21887 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
21888 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
21889 ac_tool_warned=yes ;;
21890 esac
21891     OBJC=$ac_ct_OBJC
21892   fi
21893 fi
21894 
21895 # Provide some information about the compiler.
21896 $as_echo "$as_me:${as_lineno-$LINENO}: checking for Objective C compiler version" >&5
21897 set X $ac_compile
21898 ac_compiler=$2
21899 for ac_option in --version -v -V -qversion; do
21900   { { ac_try="$ac_compiler $ac_option >&5"
21901 case "(($ac_try" in
21902   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21903   *) ac_try_echo=$ac_try;;
21904 esac
21905 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
21906 $as_echo "$ac_try_echo"; } >&5
21907   (eval "$ac_compiler $ac_option >&5") 2>conftest.err
21908   ac_status=$?
21909   if test -s conftest.err; then
21910     sed '10a\
21911 ... rest of stderr output deleted ...
21912          10q' conftest.err >conftest.er1
21913     cat conftest.er1 >&5
21914   fi
21915   rm -f conftest.er1 conftest.err
21916   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
21917   test $ac_status = 0; }
21918 done
21919 
21920 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU Objective C compiler" >&5
21921 $as_echo_n "checking whether we are using the GNU Objective C compiler... " >&6; }
21922 if ${ac_cv_objc_compiler_gnu+:} false; then :
21923   $as_echo_n "(cached) " >&6
21924 else
21925   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21926 /* end confdefs.h.  */
21927 
21928 int
21929 main ()
21930 {
21931 #ifndef __GNUC__
21932        choke me
21933 #endif
21934 
21935   ;
21936   return 0;
21937 }
21938 _ACEOF
21939 if ac_fn_objc_try_compile "$LINENO"; then :
21940   ac_compiler_gnu=yes
21941 else
21942   ac_compiler_gnu=no
21943 fi
21944 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21945 ac_cv_objc_compiler_gnu=$ac_compiler_gnu
21946 
21947 fi
21948 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objc_compiler_gnu" >&5
21949 $as_echo "$ac_cv_objc_compiler_gnu" >&6; }
21950 if test $ac_compiler_gnu = yes; then
21951   GOBJC=yes
21952 else
21953   GOBJC=
21954 fi
21955 ac_test_OBJCFLAGS=${OBJCFLAGS+set}
21956 ac_save_OBJCFLAGS=$OBJCFLAGS
21957 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $OBJC accepts -g" >&5
21958 $as_echo_n "checking whether $OBJC accepts -g... " >&6; }
21959 if ${ac_cv_prog_objc_g+:} false; then :
21960   $as_echo_n "(cached) " >&6
21961 else
21962   ac_save_objc_werror_flag=$ac_objc_werror_flag
21963    ac_objc_werror_flag=yes
21964    ac_cv_prog_objc_g=no
21965    OBJCFLAGS="-g"
21966    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21967 /* end confdefs.h.  */
21968 
21969 int
21970 main ()
21971 {
21972 
21973   ;
21974   return 0;
21975 }
21976 _ACEOF
21977 if ac_fn_objc_try_compile "$LINENO"; then :
21978   ac_cv_prog_objc_g=yes
21979 else
21980   OBJCFLAGS=""
21981       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21982 /* end confdefs.h.  */
21983 
21984 int
21985 main ()
21986 {
21987 
21988   ;
21989   return 0;
21990 }
21991 _ACEOF
21992 if ac_fn_objc_try_compile "$LINENO"; then :
21993 
21994 else
21995   ac_objc_werror_flag=$ac_save_objc_werror_flag
21996          OBJCFLAGS="-g"
21997          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21998 /* end confdefs.h.  */
21999 
22000 int
22001 main ()
22002 {
22003 
22004   ;
22005   return 0;
22006 }
22007 _ACEOF
22008 if ac_fn_objc_try_compile "$LINENO"; then :
22009   ac_cv_prog_objc_g=yes
22010 fi
22011 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22012 fi
22013 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22014 fi
22015 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22016    ac_objc_werror_flag=$ac_save_objc_werror_flag
22017 fi
22018 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_objc_g" >&5
22019 $as_echo "$ac_cv_prog_objc_g" >&6; }
22020 if test "$ac_test_OBJCFLAGS" = set; then
22021   OBJCFLAGS=$ac_save_OBJCFLAGS
22022 elif test $ac_cv_prog_objc_g = yes; then
22023   if test "$GOBJC" = yes; then
22024     OBJCFLAGS="-g -O2"
22025   else
22026     OBJCFLAGS="-g"
22027   fi
22028 else
22029   if test "$GOBJC" = yes; then
22030     OBJCFLAGS="-O2"
22031   else
22032     OBJCFLAGS=
22033   fi
22034 fi
22035 ac_ext=cpp
22036 ac_cpp='$CXXCPP $CPPFLAGS'
22037 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
22038 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
22039 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
22040 
22041 
22042   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22043 
22044   # First separate the path from the arguments. This will split at the first
22045   # space.
22046   complete="$OBJC"
22047   path="${complete%% *}"
22048   tmp="$complete EOL"
22049   arguments="${tmp#* }"
22050 
22051   # Input might be given as Windows format, start by converting to
22052   # unix format.
22053   new_path=`$CYGPATH -u "$path"`
22054 
22055   # Now try to locate executable using which
22056   new_path=`$WHICH "$new_path" 2> /dev/null`
22057   # bat and cmd files are not always considered executable in cygwin causing which
22058   # to not find them
22059   if test "x$new_path" = x \
22060            && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22061            && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22062     new_path=`$CYGPATH -u "$path"`
22063   fi
22064   if test "x$new_path" = x; then
22065     # Oops. Which didn't find the executable.
22066     # The splitting of arguments from the executable at a space might have been incorrect,
22067     # since paths with space are more likely in Windows. Give it another try with the whole
22068     # argument.
22069     path="$complete"
22070     arguments="EOL"
22071     new_path=`$CYGPATH -u "$path"`
22072     new_path=`$WHICH "$new_path" 2> /dev/null`
22073     # bat and cmd files are not always considered executable in cygwin causing which
22074     # to not find them
22075     if test "x$new_path" = x \
22076              && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22077              && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22078       new_path=`$CYGPATH -u "$path"`
22079     fi
22080     if test "x$new_path" = x; then
22081       # It's still not found. Now this is an unrecoverable error.
22082       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
22083 $as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
22084       has_space=`$ECHO "$complete" | $GREP " "`
22085       if test "x$has_space" != x; then
22086         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22087 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22088       fi
22089       as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
22090     fi
22091   fi
22092 
22093   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22094   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22095   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22096   # "foo.exe" is OK but "foo" is an error.
22097   #
22098   # This test is therefore slightly more accurate than "test -f" to check for file precense.
22099   # It is also a way to make sure we got the proper file name for the real test later on.
22100   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22101   if test "x$test_shortpath" = x; then
22102     # Short path failed, file does not exist as specified.
22103     # Try adding .exe or .cmd
22104     if test -f "${new_path}.exe"; then
22105        input_to_shortpath="${new_path}.exe"
22106     elif test -f "${new_path}.cmd"; then
22107        input_to_shortpath="${new_path}.cmd"
22108     else
22109       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$new_path\", is invalid." >&5
22110 $as_echo "$as_me: The path of OBJC, which resolves as \"$new_path\", is invalid." >&6;}
22111       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
22112 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
22113       as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
22114     fi
22115   else
22116     input_to_shortpath="$new_path"
22117   fi
22118 
22119   # Call helper function which possibly converts this using DOS-style short mode.
22120   # If so, the updated path is stored in $new_path.
22121   new_path="$input_to_shortpath"
22122 
22123   input_path="$input_to_shortpath"
22124   # Check if we need to convert this using DOS-style short mode. If the path
22125   # contains just simple characters, use it. Otherwise (spaces, weird characters),
22126   # take no chances and rewrite it.
22127   # Note: m4 eats our [], so we need to use [ and ] instead.
22128   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22129   if test "x$has_forbidden_chars" != x; then
22130     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22131     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22132     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22133     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22134       # Going to short mode and back again did indeed matter. Since short mode is
22135       # case insensitive, let's make it lowercase to improve readability.
22136       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22137       # Now convert it back to Unix-stile (cygpath)
22138       input_path=`$CYGPATH -u "$shortmode_path"`
22139       new_path="$input_path"
22140     fi
22141   fi
22142 
22143   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22144   if test "x$test_cygdrive_prefix" = x; then
22145     # As a simple fix, exclude /usr/bin since it's not a real path.
22146     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
22147       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22148       # a path prefixed by /cygdrive for fixpath to work.
22149       new_path="$CYGWIN_ROOT_PATH$input_path"
22150     fi
22151   fi
22152 
22153   # remove trailing .exe if any
22154   new_path="${new_path/%.exe/}"
22155 
22156   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22157 
22158   # First separate the path from the arguments. This will split at the first
22159   # space.
22160   complete="$OBJC"
22161   path="${complete%% *}"
22162   tmp="$complete EOL"
22163   arguments="${tmp#* }"
22164 
22165   # Input might be given as Windows format, start by converting to
22166   # unix format.
22167   new_path="$path"
22168 
22169   windows_path="$new_path"
22170   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22171     unix_path=`$CYGPATH -u "$windows_path"`
22172     new_path="$unix_path"
22173   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22174     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22175     new_path="$unix_path"
22176   fi
22177 
22178 
22179   # Now try to locate executable using which
22180   new_path=`$WHICH "$new_path" 2> /dev/null`
22181 
22182   if test "x$new_path" = x; then
22183     # Oops. Which didn't find the executable.
22184     # The splitting of arguments from the executable at a space might have been incorrect,
22185     # since paths with space are more likely in Windows. Give it another try with the whole
22186     # argument.
22187     path="$complete"
22188     arguments="EOL"
22189     new_path="$path"
22190 
22191   windows_path="$new_path"
22192   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22193     unix_path=`$CYGPATH -u "$windows_path"`
22194     new_path="$unix_path"
22195   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22196     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22197     new_path="$unix_path"
22198   fi
22199 
22200 
22201     new_path=`$WHICH "$new_path" 2> /dev/null`
22202 
22203     if test "x$new_path" = x; then
22204       # It's still not found. Now this is an unrecoverable error.
22205       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
22206 $as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
22207       has_space=`$ECHO "$complete" | $GREP " "`
22208       if test "x$has_space" != x; then
22209         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22210 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22211       fi
22212       as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
22213     fi
22214   fi
22215 
22216   # Now new_path has a complete unix path to the binary
22217   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
22218     # Keep paths in /bin as-is, but remove trailing .exe if any
22219     new_path="${new_path/%.exe/}"
22220     # Do not save /bin paths to all_fixpath_prefixes!
22221   else
22222     # Not in mixed or Windows style, start by that.
22223     new_path=`cmd //c echo $new_path`
22224 
22225   input_path="$new_path"
22226   # Check if we need to convert this using DOS-style short mode. If the path
22227   # contains just simple characters, use it. Otherwise (spaces, weird characters),
22228   # take no chances and rewrite it.
22229   # Note: m4 eats our [], so we need to use [ and ] instead.
22230   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22231   if test "x$has_forbidden_chars" != x; then
22232     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22233     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22234   fi
22235 
22236     # Output is in $new_path
22237 
22238   windows_path="$new_path"
22239   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22240     unix_path=`$CYGPATH -u "$windows_path"`
22241     new_path="$unix_path"
22242   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22243     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22244     new_path="$unix_path"
22245   fi
22246 
22247     # remove trailing .exe if any
22248     new_path="${new_path/%.exe/}"
22249 
22250     # Save the first 10 bytes of this path to the storage, so fixpath can work.
22251     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22252   fi
22253 
22254   else
22255     # We're on a posix platform. Hooray! :)
22256     # First separate the path from the arguments. This will split at the first
22257     # space.
22258     complete="$OBJC"
22259     path="${complete%% *}"
22260     tmp="$complete EOL"
22261     arguments="${tmp#* }"
22262 
22263     # Cannot rely on the command "which" here since it doesn't always work.
22264     is_absolute_path=`$ECHO "$path" | $GREP ^/`
22265     if test -z "$is_absolute_path"; then
22266       # Path to executable is not absolute. Find it.
22267       IFS_save="$IFS"
22268       IFS=:
22269       for p in $PATH; do
22270         if test -f "$p/$path" && test -x "$p/$path"; then
22271           new_path="$p/$path"
22272           break
22273         fi
22274       done
22275       IFS="$IFS_save"
22276     else
22277       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving OBJC (as $path) failed, using $path directly." >&5
22278 $as_echo "$as_me: Resolving OBJC (as $path) failed, using $path directly." >&6;}
22279       new_path="$path"
22280     fi
22281 
22282     if test "x$new_path" = x; then
22283         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
22284 $as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
22285         has_space=`$ECHO "$complete" | $GREP " "`
22286         if test "x$has_space" != x; then
22287           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
22288 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
22289         fi
22290         as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
22291       fi
22292   fi
22293 
22294       # Now join together the path and the arguments once again
22295       if test "x$arguments" != xEOL; then
22296         new_complete="$new_path ${arguments% *}"
22297       else
22298         new_complete="$new_path"
22299       fi
22300 
22301   if test "x$complete" != "x$new_complete"; then
22302       OBJC="$new_complete"
22303       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJC to \"$new_complete\"" >&5
22304 $as_echo "$as_me: Rewriting OBJC to \"$new_complete\"" >&6;}
22305     fi
22306 
22307 else
22308     OBJC=
22309 fi
22310 
22311 # Restore the flags to the user specified values.
22312 # This is necessary since AC_PROG_CC defaults CFLAGS to "-g -O2"
22313 CFLAGS="$ORG_CFLAGS"
22314 CXXFLAGS="$ORG_CXXFLAGS"
22315 OBJCFLAGS="$ORG_OBJCFLAGS"
22316 
22317 LD="$CC"
22318 LDEXE="$CC"
22319 LDCXX="$CXX"
22320 LDEXECXX="$CXX"
22321 
22322 # LDEXE is the linker to use, when creating executables.
22323 
22324 # Linking C++ libraries.
22325 
22326 # Linking C++ executables.
22327 
22328 
22329 if test "x$OPENJDK_TARGET_OS" != xwindows; then
22330     if test -n "$ac_tool_prefix"; then
22331   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
22332 set dummy ${ac_tool_prefix}ar; ac_word=$2
22333 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22334 $as_echo_n "checking for $ac_word... " >&6; }
22335 if ${ac_cv_prog_AR+:} false; then :
22336   $as_echo_n "(cached) " >&6
22337 else
22338   if test -n "$AR"; then
22339   ac_cv_prog_AR="$AR" # Let the user override the test.
22340 else
22341 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22342 for as_dir in $PATH
22343 do
22344   IFS=$as_save_IFS
22345   test -z "$as_dir" && as_dir=.
22346     for ac_exec_ext in '' $ac_executable_extensions; do
22347   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
22348     ac_cv_prog_AR="${ac_tool_prefix}ar"
22349     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22350     break 2
22351   fi
22352 done
22353   done
22354 IFS=$as_save_IFS
22355 
22356 fi
22357 fi
22358 AR=$ac_cv_prog_AR
22359 if test -n "$AR"; then
22360   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
22361 $as_echo "$AR" >&6; }
22362 else
22363   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22364 $as_echo "no" >&6; }
22365 fi
22366 
22367 
22368 fi
22369 if test -z "$ac_cv_prog_AR"; then
22370   ac_ct_AR=$AR
22371   # Extract the first word of "ar", so it can be a program name with args.
22372 set dummy ar; ac_word=$2
22373 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22374 $as_echo_n "checking for $ac_word... " >&6; }
22375 if ${ac_cv_prog_ac_ct_AR+:} false; then :
22376   $as_echo_n "(cached) " >&6
22377 else
22378   if test -n "$ac_ct_AR"; then
22379   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
22380 else
22381 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22382 for as_dir in $PATH
22383 do
22384   IFS=$as_save_IFS
22385   test -z "$as_dir" && as_dir=.
22386     for ac_exec_ext in '' $ac_executable_extensions; do
22387   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
22388     ac_cv_prog_ac_ct_AR="ar"
22389     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22390     break 2
22391   fi
22392 done
22393   done
22394 IFS=$as_save_IFS
22395 
22396 fi
22397 fi
22398 ac_ct_AR=$ac_cv_prog_ac_ct_AR
22399 if test -n "$ac_ct_AR"; then
22400   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
22401 $as_echo "$ac_ct_AR" >&6; }
22402 else
22403   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22404 $as_echo "no" >&6; }
22405 fi
22406 
22407   if test "x$ac_ct_AR" = x; then
22408     AR=""
22409   else
22410     case $cross_compiling:$ac_tool_warned in
22411 yes:)
22412 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
22413 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
22414 ac_tool_warned=yes ;;
22415 esac
22416     AR=$ac_ct_AR
22417   fi
22418 else
22419   AR="$ac_cv_prog_AR"
22420 fi
22421 
22422 
22423   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22424 
22425   # First separate the path from the arguments. This will split at the first
22426   # space.
22427   complete="$AR"
22428   path="${complete%% *}"
22429   tmp="$complete EOL"
22430   arguments="${tmp#* }"
22431 
22432   # Input might be given as Windows format, start by converting to
22433   # unix format.
22434   new_path=`$CYGPATH -u "$path"`
22435 
22436   # Now try to locate executable using which
22437   new_path=`$WHICH "$new_path" 2> /dev/null`
22438   # bat and cmd files are not always considered executable in cygwin causing which
22439   # to not find them
22440   if test "x$new_path" = x \
22441            && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22442            && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22443     new_path=`$CYGPATH -u "$path"`
22444   fi
22445   if test "x$new_path" = x; then
22446     # Oops. Which didn't find the executable.
22447     # The splitting of arguments from the executable at a space might have been incorrect,
22448     # since paths with space are more likely in Windows. Give it another try with the whole
22449     # argument.
22450     path="$complete"
22451     arguments="EOL"
22452     new_path=`$CYGPATH -u "$path"`
22453     new_path=`$WHICH "$new_path" 2> /dev/null`
22454     # bat and cmd files are not always considered executable in cygwin causing which
22455     # to not find them
22456     if test "x$new_path" = x \
22457              && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22458              && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22459       new_path=`$CYGPATH -u "$path"`
22460     fi
22461     if test "x$new_path" = x; then
22462       # It's still not found. Now this is an unrecoverable error.
22463       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
22464 $as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
22465       has_space=`$ECHO "$complete" | $GREP " "`
22466       if test "x$has_space" != x; then
22467         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22468 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22469       fi
22470       as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
22471     fi
22472   fi
22473 
22474   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22475   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22476   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22477   # "foo.exe" is OK but "foo" is an error.
22478   #
22479   # This test is therefore slightly more accurate than "test -f" to check for file precense.
22480   # It is also a way to make sure we got the proper file name for the real test later on.
22481   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22482   if test "x$test_shortpath" = x; then
22483     # Short path failed, file does not exist as specified.
22484     # Try adding .exe or .cmd
22485     if test -f "${new_path}.exe"; then
22486        input_to_shortpath="${new_path}.exe"
22487     elif test -f "${new_path}.cmd"; then
22488        input_to_shortpath="${new_path}.cmd"
22489     else
22490       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$new_path\", is invalid." >&5
22491 $as_echo "$as_me: The path of AR, which resolves as \"$new_path\", is invalid." >&6;}
22492       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
22493 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
22494       as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
22495     fi
22496   else
22497     input_to_shortpath="$new_path"
22498   fi
22499 
22500   # Call helper function which possibly converts this using DOS-style short mode.
22501   # If so, the updated path is stored in $new_path.
22502   new_path="$input_to_shortpath"
22503 
22504   input_path="$input_to_shortpath"
22505   # Check if we need to convert this using DOS-style short mode. If the path
22506   # contains just simple characters, use it. Otherwise (spaces, weird characters),
22507   # take no chances and rewrite it.
22508   # Note: m4 eats our [], so we need to use [ and ] instead.
22509   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22510   if test "x$has_forbidden_chars" != x; then
22511     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22512     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22513     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22514     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22515       # Going to short mode and back again did indeed matter. Since short mode is
22516       # case insensitive, let's make it lowercase to improve readability.
22517       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22518       # Now convert it back to Unix-stile (cygpath)
22519       input_path=`$CYGPATH -u "$shortmode_path"`
22520       new_path="$input_path"
22521     fi
22522   fi
22523 
22524   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22525   if test "x$test_cygdrive_prefix" = x; then
22526     # As a simple fix, exclude /usr/bin since it's not a real path.
22527     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
22528       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22529       # a path prefixed by /cygdrive for fixpath to work.
22530       new_path="$CYGWIN_ROOT_PATH$input_path"
22531     fi
22532   fi
22533 
22534   # remove trailing .exe if any
22535   new_path="${new_path/%.exe/}"
22536 
22537   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22538 
22539   # First separate the path from the arguments. This will split at the first
22540   # space.
22541   complete="$AR"
22542   path="${complete%% *}"
22543   tmp="$complete EOL"
22544   arguments="${tmp#* }"
22545 
22546   # Input might be given as Windows format, start by converting to
22547   # unix format.
22548   new_path="$path"
22549 
22550   windows_path="$new_path"
22551   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22552     unix_path=`$CYGPATH -u "$windows_path"`
22553     new_path="$unix_path"
22554   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22555     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22556     new_path="$unix_path"
22557   fi
22558 
22559 
22560   # Now try to locate executable using which
22561   new_path=`$WHICH "$new_path" 2> /dev/null`
22562 
22563   if test "x$new_path" = x; then
22564     # Oops. Which didn't find the executable.
22565     # The splitting of arguments from the executable at a space might have been incorrect,
22566     # since paths with space are more likely in Windows. Give it another try with the whole
22567     # argument.
22568     path="$complete"
22569     arguments="EOL"
22570     new_path="$path"
22571 
22572   windows_path="$new_path"
22573   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22574     unix_path=`$CYGPATH -u "$windows_path"`
22575     new_path="$unix_path"
22576   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22577     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22578     new_path="$unix_path"
22579   fi
22580 
22581 
22582     new_path=`$WHICH "$new_path" 2> /dev/null`
22583 
22584     if test "x$new_path" = x; then
22585       # It's still not found. Now this is an unrecoverable error.
22586       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
22587 $as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
22588       has_space=`$ECHO "$complete" | $GREP " "`
22589       if test "x$has_space" != x; then
22590         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22591 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22592       fi
22593       as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
22594     fi
22595   fi
22596 
22597   # Now new_path has a complete unix path to the binary
22598   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
22599     # Keep paths in /bin as-is, but remove trailing .exe if any
22600     new_path="${new_path/%.exe/}"
22601     # Do not save /bin paths to all_fixpath_prefixes!
22602   else
22603     # Not in mixed or Windows style, start by that.
22604     new_path=`cmd //c echo $new_path`
22605 
22606   input_path="$new_path"
22607   # Check if we need to convert this using DOS-style short mode. If the path
22608   # contains just simple characters, use it. Otherwise (spaces, weird characters),
22609   # take no chances and rewrite it.
22610   # Note: m4 eats our [], so we need to use [ and ] instead.
22611   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22612   if test "x$has_forbidden_chars" != x; then
22613     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22614     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22615   fi
22616 
22617     # Output is in $new_path
22618 
22619   windows_path="$new_path"
22620   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22621     unix_path=`$CYGPATH -u "$windows_path"`
22622     new_path="$unix_path"
22623   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22624     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22625     new_path="$unix_path"
22626   fi
22627 
22628     # remove trailing .exe if any
22629     new_path="${new_path/%.exe/}"
22630 
22631     # Save the first 10 bytes of this path to the storage, so fixpath can work.
22632     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22633   fi
22634 
22635   else
22636     # We're on a posix platform. Hooray! :)
22637     # First separate the path from the arguments. This will split at the first
22638     # space.
22639     complete="$AR"
22640     path="${complete%% *}"
22641     tmp="$complete EOL"
22642     arguments="${tmp#* }"
22643 
22644     # Cannot rely on the command "which" here since it doesn't always work.
22645     is_absolute_path=`$ECHO "$path" | $GREP ^/`
22646     if test -z "$is_absolute_path"; then
22647       # Path to executable is not absolute. Find it.
22648       IFS_save="$IFS"
22649       IFS=:
22650       for p in $PATH; do
22651         if test -f "$p/$path" && test -x "$p/$path"; then
22652           new_path="$p/$path"
22653           break
22654         fi
22655       done
22656       IFS="$IFS_save"
22657     else
22658       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving AR (as $path) failed, using $path directly." >&5
22659 $as_echo "$as_me: Resolving AR (as $path) failed, using $path directly." >&6;}
22660       new_path="$path"
22661     fi
22662 
22663     if test "x$new_path" = x; then
22664         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
22665 $as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
22666         has_space=`$ECHO "$complete" | $GREP " "`
22667         if test "x$has_space" != x; then
22668           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
22669 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
22670         fi
22671         as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
22672       fi
22673   fi
22674 
22675       # Now join together the path and the arguments once again
22676       if test "x$arguments" != xEOL; then
22677         new_complete="$new_path ${arguments% *}"
22678       else
22679         new_complete="$new_path"
22680       fi
22681 
22682   if test "x$complete" != "x$new_complete"; then
22683       AR="$new_complete"
22684       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AR to \"$new_complete\"" >&5
22685 $as_echo "$as_me: Rewriting AR to \"$new_complete\"" >&6;}
22686     fi
22687 
22688 fi
22689 if test "x$OPENJDK_TARGET_OS" = xmacosx; then
22690     ARFLAGS="-r"
22691 else
22692     ARFLAGS=""
22693 fi
22694 
22695 
22696 # For hotspot, we need these in Windows mixed path; other platforms keep them the same
22697 HOTSPOT_CXX="$CXX"
22698 HOTSPOT_LD="$LD"
22699 
22700 
22701 
22702 COMPILER_NAME=gcc
22703 COMPILER_TYPE=CC
22704 if test "x$OPENJDK_TARGET_OS" = xwindows; then :
22705 
22706     # For now, assume that we are always compiling using cl.exe.
22707     CC_OUT_OPTION=-Fo
22708     EXE_OUT_OPTION=-out:
22709     LD_OUT_OPTION=-out:
22710     AR_OUT_OPTION=-out:
22711     # On Windows, reject /usr/bin/link (as determined in CYGWIN_LINK), which is a cygwin
22712     # program for something completely different.
22713     # Extract the first word of "link", so it can be a program name with args.
22714 set dummy link; ac_word=$2
22715 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22716 $as_echo_n "checking for $ac_word... " >&6; }
22717 if ${ac_cv_prog_WINLD+:} false; then :
22718   $as_echo_n "(cached) " >&6
22719 else
22720   if test -n "$WINLD"; then
22721   ac_cv_prog_WINLD="$WINLD" # Let the user override the test.
22722 else
22723   ac_prog_rejected=no
22724 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22725 for as_dir in $PATH
22726 do
22727   IFS=$as_save_IFS
22728   test -z "$as_dir" && as_dir=.
22729     for ac_exec_ext in '' $ac_executable_extensions; do
22730   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
22731     if test "$as_dir/$ac_word$ac_exec_ext" = "$CYGWIN_LINK"; then
22732        ac_prog_rejected=yes
22733        continue
22734      fi
22735     ac_cv_prog_WINLD="link"
22736     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22737     break 2
22738   fi
22739 done
22740   done
22741 IFS=$as_save_IFS
22742 
22743 if test $ac_prog_rejected = yes; then
22744   # We found a bogon in the path, so make sure we never use it.
22745   set dummy $ac_cv_prog_WINLD
22746   shift
22747   if test $# != 0; then
22748     # We chose a different compiler from the bogus one.
22749     # However, it has the same basename, so the bogon will be chosen
22750     # first if we set WINLD to just the basename; use the full file name.
22751     shift
22752     ac_cv_prog_WINLD="$as_dir/$ac_word${1+' '}$@"
22753   fi
22754 fi
22755 fi
22756 fi
22757 WINLD=$ac_cv_prog_WINLD
22758 if test -n "$WINLD"; then
22759   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINLD" >&5
22760 $as_echo "$WINLD" >&6; }
22761 else
22762   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22763 $as_echo "no" >&6; }
22764 fi
22765 
22766 
22767     # Since we must ignore the first found link, WINLD will contain
22768     # the full path to the link.exe program.
22769 
22770   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22771 
22772   # First separate the path from the arguments. This will split at the first
22773   # space.
22774   complete="$WINLD"
22775   path="${complete%% *}"
22776   tmp="$complete EOL"
22777   arguments="${tmp#* }"
22778 
22779   # Input might be given as Windows format, start by converting to
22780   # unix format.
22781   new_path=`$CYGPATH -u "$path"`
22782 
22783   # Now try to locate executable using which
22784   new_path=`$WHICH "$new_path" 2> /dev/null`
22785   # bat and cmd files are not always considered executable in cygwin causing which
22786   # to not find them
22787   if test "x$new_path" = x \
22788            && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22789            && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22790     new_path=`$CYGPATH -u "$path"`
22791   fi
22792   if test "x$new_path" = x; then
22793     # Oops. Which didn't find the executable.
22794     # The splitting of arguments from the executable at a space might have been incorrect,
22795     # since paths with space are more likely in Windows. Give it another try with the whole
22796     # argument.
22797     path="$complete"
22798     arguments="EOL"
22799     new_path=`$CYGPATH -u "$path"`
22800     new_path=`$WHICH "$new_path" 2> /dev/null`
22801     # bat and cmd files are not always considered executable in cygwin causing which
22802     # to not find them
22803     if test "x$new_path" = x \
22804              && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22805              && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22806       new_path=`$CYGPATH -u "$path"`
22807     fi
22808     if test "x$new_path" = x; then
22809       # It's still not found. Now this is an unrecoverable error.
22810       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$complete\", is not found." >&5
22811 $as_echo "$as_me: The path of WINLD, which resolves as \"$complete\", is not found." >&6;}
22812       has_space=`$ECHO "$complete" | $GREP " "`
22813       if test "x$has_space" != x; then
22814         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22815 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22816       fi
22817       as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
22818     fi
22819   fi
22820 
22821   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22822   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22823   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22824   # "foo.exe" is OK but "foo" is an error.
22825   #
22826   # This test is therefore slightly more accurate than "test -f" to check for file precense.
22827   # It is also a way to make sure we got the proper file name for the real test later on.
22828   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22829   if test "x$test_shortpath" = x; then
22830     # Short path failed, file does not exist as specified.
22831     # Try adding .exe or .cmd
22832     if test -f "${new_path}.exe"; then
22833        input_to_shortpath="${new_path}.exe"
22834     elif test -f "${new_path}.cmd"; then
22835        input_to_shortpath="${new_path}.cmd"
22836     else
22837       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$new_path\", is invalid." >&5
22838 $as_echo "$as_me: The path of WINLD, which resolves as \"$new_path\", is invalid." >&6;}
22839       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
22840 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
22841       as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
22842     fi
22843   else
22844     input_to_shortpath="$new_path"
22845   fi
22846 
22847   # Call helper function which possibly converts this using DOS-style short mode.
22848   # If so, the updated path is stored in $new_path.
22849   new_path="$input_to_shortpath"
22850 
22851   input_path="$input_to_shortpath"
22852   # Check if we need to convert this using DOS-style short mode. If the path
22853   # contains just simple characters, use it. Otherwise (spaces, weird characters),
22854   # take no chances and rewrite it.
22855   # Note: m4 eats our [], so we need to use [ and ] instead.
22856   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22857   if test "x$has_forbidden_chars" != x; then
22858     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22859     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22860     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22861     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22862       # Going to short mode and back again did indeed matter. Since short mode is
22863       # case insensitive, let's make it lowercase to improve readability.
22864       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22865       # Now convert it back to Unix-stile (cygpath)
22866       input_path=`$CYGPATH -u "$shortmode_path"`
22867       new_path="$input_path"
22868     fi
22869   fi
22870 
22871   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22872   if test "x$test_cygdrive_prefix" = x; then
22873     # As a simple fix, exclude /usr/bin since it's not a real path.
22874     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
22875       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22876       # a path prefixed by /cygdrive for fixpath to work.
22877       new_path="$CYGWIN_ROOT_PATH$input_path"
22878     fi
22879   fi
22880 
22881   # remove trailing .exe if any
22882   new_path="${new_path/%.exe/}"
22883 
22884   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22885 
22886   # First separate the path from the arguments. This will split at the first
22887   # space.
22888   complete="$WINLD"
22889   path="${complete%% *}"
22890   tmp="$complete EOL"
22891   arguments="${tmp#* }"
22892 
22893   # Input might be given as Windows format, start by converting to
22894   # unix format.
22895   new_path="$path"
22896 
22897   windows_path="$new_path"
22898   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22899     unix_path=`$CYGPATH -u "$windows_path"`
22900     new_path="$unix_path"
22901   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22902     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22903     new_path="$unix_path"
22904   fi
22905 
22906 
22907   # Now try to locate executable using which
22908   new_path=`$WHICH "$new_path" 2> /dev/null`
22909 
22910   if test "x$new_path" = x; then
22911     # Oops. Which didn't find the executable.
22912     # The splitting of arguments from the executable at a space might have been incorrect,
22913     # since paths with space are more likely in Windows. Give it another try with the whole
22914     # argument.
22915     path="$complete"
22916     arguments="EOL"
22917     new_path="$path"
22918 
22919   windows_path="$new_path"
22920   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22921     unix_path=`$CYGPATH -u "$windows_path"`
22922     new_path="$unix_path"
22923   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22924     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22925     new_path="$unix_path"
22926   fi
22927 
22928 
22929     new_path=`$WHICH "$new_path" 2> /dev/null`
22930 
22931     if test "x$new_path" = x; then
22932       # It's still not found. Now this is an unrecoverable error.
22933       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$complete\", is not found." >&5
22934 $as_echo "$as_me: The path of WINLD, which resolves as \"$complete\", is not found." >&6;}
22935       has_space=`$ECHO "$complete" | $GREP " "`
22936       if test "x$has_space" != x; then
22937         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22938 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22939       fi
22940       as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
22941     fi
22942   fi
22943 
22944   # Now new_path has a complete unix path to the binary
22945   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
22946     # Keep paths in /bin as-is, but remove trailing .exe if any
22947     new_path="${new_path/%.exe/}"
22948     # Do not save /bin paths to all_fixpath_prefixes!
22949   else
22950     # Not in mixed or Windows style, start by that.
22951     new_path=`cmd //c echo $new_path`
22952 
22953   input_path="$new_path"
22954   # Check if we need to convert this using DOS-style short mode. If the path
22955   # contains just simple characters, use it. Otherwise (spaces, weird characters),
22956   # take no chances and rewrite it.
22957   # Note: m4 eats our [], so we need to use [ and ] instead.
22958   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22959   if test "x$has_forbidden_chars" != x; then
22960     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22961     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22962   fi
22963 
22964     # Output is in $new_path
22965 
22966   windows_path="$new_path"
22967   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22968     unix_path=`$CYGPATH -u "$windows_path"`
22969     new_path="$unix_path"
22970   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22971     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22972     new_path="$unix_path"
22973   fi
22974 
22975     # remove trailing .exe if any
22976     new_path="${new_path/%.exe/}"
22977 
22978     # Save the first 10 bytes of this path to the storage, so fixpath can work.
22979     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22980   fi
22981 
22982   else
22983     # We're on a posix platform. Hooray! :)
22984     # First separate the path from the arguments. This will split at the first
22985     # space.
22986     complete="$WINLD"
22987     path="${complete%% *}"
22988     tmp="$complete EOL"
22989     arguments="${tmp#* }"
22990 
22991     # Cannot rely on the command "which" here since it doesn't always work.
22992     is_absolute_path=`$ECHO "$path" | $GREP ^/`
22993     if test -z "$is_absolute_path"; then
22994       # Path to executable is not absolute. Find it.
22995       IFS_save="$IFS"
22996       IFS=:
22997       for p in $PATH; do
22998         if test -f "$p/$path" && test -x "$p/$path"; then
22999           new_path="$p/$path"
23000           break
23001         fi
23002       done
23003       IFS="$IFS_save"
23004     else
23005       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving WINLD (as $path) failed, using $path directly." >&5
23006 $as_echo "$as_me: Resolving WINLD (as $path) failed, using $path directly." >&6;}
23007       new_path="$path"
23008     fi
23009 
23010     if test "x$new_path" = x; then
23011         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$complete\", is not found." >&5
23012 $as_echo "$as_me: The path of WINLD, which resolves as \"$complete\", is not found." >&6;}
23013         has_space=`$ECHO "$complete" | $GREP " "`
23014         if test "x$has_space" != x; then
23015           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
23016 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
23017         fi
23018         as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
23019       fi
23020   fi
23021 
23022       # Now join together the path and the arguments once again
23023       if test "x$arguments" != xEOL; then
23024         new_complete="$new_path ${arguments% *}"
23025       else
23026         new_complete="$new_path"
23027       fi
23028 
23029   if test "x$complete" != "x$new_complete"; then
23030       WINLD="$new_complete"
23031       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting WINLD to \"$new_complete\"" >&5
23032 $as_echo "$as_me: Rewriting WINLD to \"$new_complete\"" >&6;}
23033     fi
23034 
23035     printf "Windows linker was found at $WINLD\n"
23036     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the found link.exe is actually the Visual Studio linker" >&5
23037 $as_echo_n "checking if the found link.exe is actually the Visual Studio linker... " >&6; }
23038     "$WINLD" --version > /dev/null
23039     if test $? -eq 0 ; then
23040       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23041 $as_echo "no" >&6; }
23042       as_fn_error $? "This is the Cygwin link tool. Please check your PATH and rerun configure." "$LINENO" 5
23043     else
23044       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
23045 $as_echo "yes" >&6; }
23046     fi
23047     LD="$WINLD"
23048     LDEXE="$WINLD"
23049     LDCXX="$WINLD"
23050     LDEXECXX="$WINLD"
23051 
23052     # Extract the first word of "mt", so it can be a program name with args.
23053 set dummy mt; ac_word=$2
23054 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23055 $as_echo_n "checking for $ac_word... " >&6; }
23056 if ${ac_cv_prog_MT+:} false; then :
23057   $as_echo_n "(cached) " >&6
23058 else
23059   if test -n "$MT"; then
23060   ac_cv_prog_MT="$MT" # Let the user override the test.
23061 else
23062   ac_prog_rejected=no
23063 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23064 for as_dir in $PATH
23065 do
23066   IFS=$as_save_IFS
23067   test -z "$as_dir" && as_dir=.
23068     for ac_exec_ext in '' $ac_executable_extensions; do
23069   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
23070     if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/mt"; then
23071        ac_prog_rejected=yes
23072        continue
23073      fi
23074     ac_cv_prog_MT="mt"
23075     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23076     break 2
23077   fi
23078 done
23079   done
23080 IFS=$as_save_IFS
23081 
23082 if test $ac_prog_rejected = yes; then
23083   # We found a bogon in the path, so make sure we never use it.
23084   set dummy $ac_cv_prog_MT
23085   shift
23086   if test $# != 0; then
23087     # We chose a different compiler from the bogus one.
23088     # However, it has the same basename, so the bogon will be chosen
23089     # first if we set MT to just the basename; use the full file name.
23090     shift
23091     ac_cv_prog_MT="$as_dir/$ac_word${1+' '}$@"
23092   fi
23093 fi
23094 fi
23095 fi
23096 MT=$ac_cv_prog_MT
23097 if test -n "$MT"; then
23098   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MT" >&5
23099 $as_echo "$MT" >&6; }
23100 else
23101   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23102 $as_echo "no" >&6; }
23103 fi
23104 
23105 
23106 
23107   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23108 
23109   # First separate the path from the arguments. This will split at the first
23110   # space.
23111   complete="$MT"
23112   path="${complete%% *}"
23113   tmp="$complete EOL"
23114   arguments="${tmp#* }"
23115 
23116   # Input might be given as Windows format, start by converting to
23117   # unix format.
23118   new_path=`$CYGPATH -u "$path"`
23119 
23120   # Now try to locate executable using which
23121   new_path=`$WHICH "$new_path" 2> /dev/null`
23122   # bat and cmd files are not always considered executable in cygwin causing which
23123   # to not find them
23124   if test "x$new_path" = x \
23125            && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23126            && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23127     new_path=`$CYGPATH -u "$path"`
23128   fi
23129   if test "x$new_path" = x; then
23130     # Oops. Which didn't find the executable.
23131     # The splitting of arguments from the executable at a space might have been incorrect,
23132     # since paths with space are more likely in Windows. Give it another try with the whole
23133     # argument.
23134     path="$complete"
23135     arguments="EOL"
23136     new_path=`$CYGPATH -u "$path"`
23137     new_path=`$WHICH "$new_path" 2> /dev/null`
23138     # bat and cmd files are not always considered executable in cygwin causing which
23139     # to not find them
23140     if test "x$new_path" = x \
23141              && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23142              && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23143       new_path=`$CYGPATH -u "$path"`
23144     fi
23145     if test "x$new_path" = x; then
23146       # It's still not found. Now this is an unrecoverable error.
23147       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
23148 $as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
23149       has_space=`$ECHO "$complete" | $GREP " "`
23150       if test "x$has_space" != x; then
23151         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23152 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23153       fi
23154       as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
23155     fi
23156   fi
23157 
23158   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23159   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23160   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23161   # "foo.exe" is OK but "foo" is an error.
23162   #
23163   # This test is therefore slightly more accurate than "test -f" to check for file precense.
23164   # It is also a way to make sure we got the proper file name for the real test later on.
23165   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23166   if test "x$test_shortpath" = x; then
23167     # Short path failed, file does not exist as specified.
23168     # Try adding .exe or .cmd
23169     if test -f "${new_path}.exe"; then
23170        input_to_shortpath="${new_path}.exe"
23171     elif test -f "${new_path}.cmd"; then
23172        input_to_shortpath="${new_path}.cmd"
23173     else
23174       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$new_path\", is invalid." >&5
23175 $as_echo "$as_me: The path of MT, which resolves as \"$new_path\", is invalid." >&6;}
23176       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
23177 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
23178       as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
23179     fi
23180   else
23181     input_to_shortpath="$new_path"
23182   fi
23183 
23184   # Call helper function which possibly converts this using DOS-style short mode.
23185   # If so, the updated path is stored in $new_path.
23186   new_path="$input_to_shortpath"
23187 
23188   input_path="$input_to_shortpath"
23189   # Check if we need to convert this using DOS-style short mode. If the path
23190   # contains just simple characters, use it. Otherwise (spaces, weird characters),
23191   # take no chances and rewrite it.
23192   # Note: m4 eats our [], so we need to use [ and ] instead.
23193   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23194   if test "x$has_forbidden_chars" != x; then
23195     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23196     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23197     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23198     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23199       # Going to short mode and back again did indeed matter. Since short mode is
23200       # case insensitive, let's make it lowercase to improve readability.
23201       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23202       # Now convert it back to Unix-stile (cygpath)
23203       input_path=`$CYGPATH -u "$shortmode_path"`
23204       new_path="$input_path"
23205     fi
23206   fi
23207 
23208   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23209   if test "x$test_cygdrive_prefix" = x; then
23210     # As a simple fix, exclude /usr/bin since it's not a real path.
23211     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
23212       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23213       # a path prefixed by /cygdrive for fixpath to work.
23214       new_path="$CYGWIN_ROOT_PATH$input_path"
23215     fi
23216   fi
23217 
23218   # remove trailing .exe if any
23219   new_path="${new_path/%.exe/}"
23220 
23221   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23222 
23223   # First separate the path from the arguments. This will split at the first
23224   # space.
23225   complete="$MT"
23226   path="${complete%% *}"
23227   tmp="$complete EOL"
23228   arguments="${tmp#* }"
23229 
23230   # Input might be given as Windows format, start by converting to
23231   # unix format.
23232   new_path="$path"
23233 
23234   windows_path="$new_path"
23235   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23236     unix_path=`$CYGPATH -u "$windows_path"`
23237     new_path="$unix_path"
23238   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23239     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23240     new_path="$unix_path"
23241   fi
23242 
23243 
23244   # Now try to locate executable using which
23245   new_path=`$WHICH "$new_path" 2> /dev/null`
23246 
23247   if test "x$new_path" = x; then
23248     # Oops. Which didn't find the executable.
23249     # The splitting of arguments from the executable at a space might have been incorrect,
23250     # since paths with space are more likely in Windows. Give it another try with the whole
23251     # argument.
23252     path="$complete"
23253     arguments="EOL"
23254     new_path="$path"
23255 
23256   windows_path="$new_path"
23257   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23258     unix_path=`$CYGPATH -u "$windows_path"`
23259     new_path="$unix_path"
23260   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23261     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23262     new_path="$unix_path"
23263   fi
23264 
23265 
23266     new_path=`$WHICH "$new_path" 2> /dev/null`
23267 
23268     if test "x$new_path" = x; then
23269       # It's still not found. Now this is an unrecoverable error.
23270       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
23271 $as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
23272       has_space=`$ECHO "$complete" | $GREP " "`
23273       if test "x$has_space" != x; then
23274         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23275 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23276       fi
23277       as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
23278     fi
23279   fi
23280 
23281   # Now new_path has a complete unix path to the binary
23282   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
23283     # Keep paths in /bin as-is, but remove trailing .exe if any
23284     new_path="${new_path/%.exe/}"
23285     # Do not save /bin paths to all_fixpath_prefixes!
23286   else
23287     # Not in mixed or Windows style, start by that.
23288     new_path=`cmd //c echo $new_path`
23289 
23290   input_path="$new_path"
23291   # Check if we need to convert this using DOS-style short mode. If the path
23292   # contains just simple characters, use it. Otherwise (spaces, weird characters),
23293   # take no chances and rewrite it.
23294   # Note: m4 eats our [], so we need to use [ and ] instead.
23295   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23296   if test "x$has_forbidden_chars" != x; then
23297     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23298     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23299   fi
23300 
23301     # Output is in $new_path
23302 
23303   windows_path="$new_path"
23304   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23305     unix_path=`$CYGPATH -u "$windows_path"`
23306     new_path="$unix_path"
23307   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23308     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23309     new_path="$unix_path"
23310   fi
23311 
23312     # remove trailing .exe if any
23313     new_path="${new_path/%.exe/}"
23314 
23315     # Save the first 10 bytes of this path to the storage, so fixpath can work.
23316     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23317   fi
23318 
23319   else
23320     # We're on a posix platform. Hooray! :)
23321     # First separate the path from the arguments. This will split at the first
23322     # space.
23323     complete="$MT"
23324     path="${complete%% *}"
23325     tmp="$complete EOL"
23326     arguments="${tmp#* }"
23327 
23328     # Cannot rely on the command "which" here since it doesn't always work.
23329     is_absolute_path=`$ECHO "$path" | $GREP ^/`
23330     if test -z "$is_absolute_path"; then
23331       # Path to executable is not absolute. Find it.
23332       IFS_save="$IFS"
23333       IFS=:
23334       for p in $PATH; do
23335         if test -f "$p/$path" && test -x "$p/$path"; then
23336           new_path="$p/$path"
23337           break
23338         fi
23339       done
23340       IFS="$IFS_save"
23341     else
23342       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving MT (as $path) failed, using $path directly." >&5
23343 $as_echo "$as_me: Resolving MT (as $path) failed, using $path directly." >&6;}
23344       new_path="$path"
23345     fi
23346 
23347     if test "x$new_path" = x; then
23348         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
23349 $as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
23350         has_space=`$ECHO "$complete" | $GREP " "`
23351         if test "x$has_space" != x; then
23352           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
23353 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
23354         fi
23355         as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
23356       fi
23357   fi
23358 
23359       # Now join together the path and the arguments once again
23360       if test "x$arguments" != xEOL; then
23361         new_complete="$new_path ${arguments% *}"
23362       else
23363         new_complete="$new_path"
23364       fi
23365 
23366   if test "x$complete" != "x$new_complete"; then
23367       MT="$new_complete"
23368       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MT to \"$new_complete\"" >&5
23369 $as_echo "$as_me: Rewriting MT to \"$new_complete\"" >&6;}
23370     fi
23371 
23372     # The resource compiler
23373     # Extract the first word of "rc", so it can be a program name with args.
23374 set dummy rc; ac_word=$2
23375 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23376 $as_echo_n "checking for $ac_word... " >&6; }
23377 if ${ac_cv_prog_RC+:} false; then :
23378   $as_echo_n "(cached) " >&6
23379 else
23380   if test -n "$RC"; then
23381   ac_cv_prog_RC="$RC" # Let the user override the test.
23382 else
23383   ac_prog_rejected=no
23384 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23385 for as_dir in $PATH
23386 do
23387   IFS=$as_save_IFS
23388   test -z "$as_dir" && as_dir=.
23389     for ac_exec_ext in '' $ac_executable_extensions; do
23390   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
23391     if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/rc"; then
23392        ac_prog_rejected=yes
23393        continue
23394      fi
23395     ac_cv_prog_RC="rc"
23396     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23397     break 2
23398   fi
23399 done
23400   done
23401 IFS=$as_save_IFS
23402 
23403 if test $ac_prog_rejected = yes; then
23404   # We found a bogon in the path, so make sure we never use it.
23405   set dummy $ac_cv_prog_RC
23406   shift
23407   if test $# != 0; then
23408     # We chose a different compiler from the bogus one.
23409     # However, it has the same basename, so the bogon will be chosen
23410     # first if we set RC to just the basename; use the full file name.
23411     shift
23412     ac_cv_prog_RC="$as_dir/$ac_word${1+' '}$@"
23413   fi
23414 fi
23415 fi
23416 fi
23417 RC=$ac_cv_prog_RC
23418 if test -n "$RC"; then
23419   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RC" >&5
23420 $as_echo "$RC" >&6; }
23421 else
23422   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23423 $as_echo "no" >&6; }
23424 fi
23425 
23426 
23427 
23428   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23429 
23430   # First separate the path from the arguments. This will split at the first
23431   # space.
23432   complete="$RC"
23433   path="${complete%% *}"
23434   tmp="$complete EOL"
23435   arguments="${tmp#* }"
23436 
23437   # Input might be given as Windows format, start by converting to
23438   # unix format.
23439   new_path=`$CYGPATH -u "$path"`
23440 
23441   # Now try to locate executable using which
23442   new_path=`$WHICH "$new_path" 2> /dev/null`
23443   # bat and cmd files are not always considered executable in cygwin causing which
23444   # to not find them
23445   if test "x$new_path" = x \
23446            && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23447            && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23448     new_path=`$CYGPATH -u "$path"`
23449   fi
23450   if test "x$new_path" = x; then
23451     # Oops. Which didn't find the executable.
23452     # The splitting of arguments from the executable at a space might have been incorrect,
23453     # since paths with space are more likely in Windows. Give it another try with the whole
23454     # argument.
23455     path="$complete"
23456     arguments="EOL"
23457     new_path=`$CYGPATH -u "$path"`
23458     new_path=`$WHICH "$new_path" 2> /dev/null`
23459     # bat and cmd files are not always considered executable in cygwin causing which
23460     # to not find them
23461     if test "x$new_path" = x \
23462              && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23463              && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23464       new_path=`$CYGPATH -u "$path"`
23465     fi
23466     if test "x$new_path" = x; then
23467       # It's still not found. Now this is an unrecoverable error.
23468       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
23469 $as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
23470       has_space=`$ECHO "$complete" | $GREP " "`
23471       if test "x$has_space" != x; then
23472         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23473 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23474       fi
23475       as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
23476     fi
23477   fi
23478 
23479   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23480   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23481   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23482   # "foo.exe" is OK but "foo" is an error.
23483   #
23484   # This test is therefore slightly more accurate than "test -f" to check for file precense.
23485   # It is also a way to make sure we got the proper file name for the real test later on.
23486   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23487   if test "x$test_shortpath" = x; then
23488     # Short path failed, file does not exist as specified.
23489     # Try adding .exe or .cmd
23490     if test -f "${new_path}.exe"; then
23491        input_to_shortpath="${new_path}.exe"
23492     elif test -f "${new_path}.cmd"; then
23493        input_to_shortpath="${new_path}.cmd"
23494     else
23495       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$new_path\", is invalid." >&5
23496 $as_echo "$as_me: The path of RC, which resolves as \"$new_path\", is invalid." >&6;}
23497       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
23498 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
23499       as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
23500     fi
23501   else
23502     input_to_shortpath="$new_path"
23503   fi
23504 
23505   # Call helper function which possibly converts this using DOS-style short mode.
23506   # If so, the updated path is stored in $new_path.
23507   new_path="$input_to_shortpath"
23508 
23509   input_path="$input_to_shortpath"
23510   # Check if we need to convert this using DOS-style short mode. If the path
23511   # contains just simple characters, use it. Otherwise (spaces, weird characters),
23512   # take no chances and rewrite it.
23513   # Note: m4 eats our [], so we need to use [ and ] instead.
23514   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23515   if test "x$has_forbidden_chars" != x; then
23516     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23517     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23518     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23519     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23520       # Going to short mode and back again did indeed matter. Since short mode is
23521       # case insensitive, let's make it lowercase to improve readability.
23522       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23523       # Now convert it back to Unix-stile (cygpath)
23524       input_path=`$CYGPATH -u "$shortmode_path"`
23525       new_path="$input_path"
23526     fi
23527   fi
23528 
23529   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23530   if test "x$test_cygdrive_prefix" = x; then
23531     # As a simple fix, exclude /usr/bin since it's not a real path.
23532     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
23533       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23534       # a path prefixed by /cygdrive for fixpath to work.
23535       new_path="$CYGWIN_ROOT_PATH$input_path"
23536     fi
23537   fi
23538 
23539   # remove trailing .exe if any
23540   new_path="${new_path/%.exe/}"
23541 
23542   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23543 
23544   # First separate the path from the arguments. This will split at the first
23545   # space.
23546   complete="$RC"
23547   path="${complete%% *}"
23548   tmp="$complete EOL"
23549   arguments="${tmp#* }"
23550 
23551   # Input might be given as Windows format, start by converting to
23552   # unix format.
23553   new_path="$path"
23554 
23555   windows_path="$new_path"
23556   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23557     unix_path=`$CYGPATH -u "$windows_path"`
23558     new_path="$unix_path"
23559   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23560     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23561     new_path="$unix_path"
23562   fi
23563 
23564 
23565   # Now try to locate executable using which
23566   new_path=`$WHICH "$new_path" 2> /dev/null`
23567 
23568   if test "x$new_path" = x; then
23569     # Oops. Which didn't find the executable.
23570     # The splitting of arguments from the executable at a space might have been incorrect,
23571     # since paths with space are more likely in Windows. Give it another try with the whole
23572     # argument.
23573     path="$complete"
23574     arguments="EOL"
23575     new_path="$path"
23576 
23577   windows_path="$new_path"
23578   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23579     unix_path=`$CYGPATH -u "$windows_path"`
23580     new_path="$unix_path"
23581   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23582     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23583     new_path="$unix_path"
23584   fi
23585 
23586 
23587     new_path=`$WHICH "$new_path" 2> /dev/null`
23588 
23589     if test "x$new_path" = x; then
23590       # It's still not found. Now this is an unrecoverable error.
23591       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
23592 $as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
23593       has_space=`$ECHO "$complete" | $GREP " "`
23594       if test "x$has_space" != x; then
23595         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23596 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23597       fi
23598       as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
23599     fi
23600   fi
23601 
23602   # Now new_path has a complete unix path to the binary
23603   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
23604     # Keep paths in /bin as-is, but remove trailing .exe if any
23605     new_path="${new_path/%.exe/}"
23606     # Do not save /bin paths to all_fixpath_prefixes!
23607   else
23608     # Not in mixed or Windows style, start by that.
23609     new_path=`cmd //c echo $new_path`
23610 
23611   input_path="$new_path"
23612   # Check if we need to convert this using DOS-style short mode. If the path
23613   # contains just simple characters, use it. Otherwise (spaces, weird characters),
23614   # take no chances and rewrite it.
23615   # Note: m4 eats our [], so we need to use [ and ] instead.
23616   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23617   if test "x$has_forbidden_chars" != x; then
23618     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23619     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23620   fi
23621 
23622     # Output is in $new_path
23623 
23624   windows_path="$new_path"
23625   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23626     unix_path=`$CYGPATH -u "$windows_path"`
23627     new_path="$unix_path"
23628   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23629     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23630     new_path="$unix_path"
23631   fi
23632 
23633     # remove trailing .exe if any
23634     new_path="${new_path/%.exe/}"
23635 
23636     # Save the first 10 bytes of this path to the storage, so fixpath can work.
23637     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23638   fi
23639 
23640   else
23641     # We're on a posix platform. Hooray! :)
23642     # First separate the path from the arguments. This will split at the first
23643     # space.
23644     complete="$RC"
23645     path="${complete%% *}"
23646     tmp="$complete EOL"
23647     arguments="${tmp#* }"
23648 
23649     # Cannot rely on the command "which" here since it doesn't always work.
23650     is_absolute_path=`$ECHO "$path" | $GREP ^/`
23651     if test -z "$is_absolute_path"; then
23652       # Path to executable is not absolute. Find it.
23653       IFS_save="$IFS"
23654       IFS=:
23655       for p in $PATH; do
23656         if test -f "$p/$path" && test -x "$p/$path"; then
23657           new_path="$p/$path"
23658           break
23659         fi
23660       done
23661       IFS="$IFS_save"
23662     else
23663       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving RC (as $path) failed, using $path directly." >&5
23664 $as_echo "$as_me: Resolving RC (as $path) failed, using $path directly." >&6;}
23665       new_path="$path"
23666     fi
23667 
23668     if test "x$new_path" = x; then
23669         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
23670 $as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
23671         has_space=`$ECHO "$complete" | $GREP " "`
23672         if test "x$has_space" != x; then
23673           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
23674 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
23675         fi
23676         as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
23677       fi
23678   fi
23679 
23680       # Now join together the path and the arguments once again
23681       if test "x$arguments" != xEOL; then
23682         new_complete="$new_path ${arguments% *}"
23683       else
23684         new_complete="$new_path"
23685       fi
23686 
23687   if test "x$complete" != "x$new_complete"; then
23688       RC="$new_complete"
23689       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting RC to \"$new_complete\"" >&5
23690 $as_echo "$as_me: Rewriting RC to \"$new_complete\"" >&6;}
23691     fi
23692 
23693 
23694     # For hotspot, we need these in Windows mixed path,
23695     # so rewrite them all. Need added .exe suffix.
23696     HOTSPOT_CXX="$CXX.exe"
23697     HOTSPOT_LD="$LD.exe"
23698     HOTSPOT_MT="$MT.exe"
23699     HOTSPOT_RC="$RC.exe"
23700 
23701   unix_path="$HOTSPOT_CXX"
23702   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23703     windows_path=`$CYGPATH -m "$unix_path"`
23704     HOTSPOT_CXX="$windows_path"
23705   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23706     windows_path=`cmd //c echo $unix_path`
23707     HOTSPOT_CXX="$windows_path"
23708   fi
23709 
23710 
23711   unix_path="$HOTSPOT_LD"
23712   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23713     windows_path=`$CYGPATH -m "$unix_path"`
23714     HOTSPOT_LD="$windows_path"
23715   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23716     windows_path=`cmd //c echo $unix_path`
23717     HOTSPOT_LD="$windows_path"
23718   fi
23719 
23720 
23721   unix_path="$HOTSPOT_MT"
23722   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23723     windows_path=`$CYGPATH -m "$unix_path"`
23724     HOTSPOT_MT="$windows_path"
23725   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23726     windows_path=`cmd //c echo $unix_path`
23727     HOTSPOT_MT="$windows_path"
23728   fi
23729 
23730 
23731   unix_path="$HOTSPOT_RC"
23732   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23733     windows_path=`$CYGPATH -m "$unix_path"`
23734     HOTSPOT_RC="$windows_path"
23735   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23736     windows_path=`cmd //c echo $unix_path`
23737     HOTSPOT_RC="$windows_path"
23738   fi
23739 
23740 
23741 
23742 
23743     RC_FLAGS="-nologo -l 0x409 -r"
23744     if test "x$VARIANT" = xOPT; then :
23745 
23746         RC_FLAGS="$RC_FLAGS -d NDEBUG"
23747 
23748 fi
23749     JDK_UPDATE_VERSION_NOTNULL=$JDK_UPDATE_VERSION
23750     if test "x$JDK_UPDATE_VERSION" = x; then :
23751 
23752         JDK_UPDATE_VERSION_NOTNULL=0
23753 
23754 fi
23755     RC_FLAGS="$RC_FLAGS -d \"JDK_BUILD_ID=$FULL_VERSION\""
23756     RC_FLAGS="$RC_FLAGS -d \"JDK_COMPANY=$COMPANY_NAME\""
23757     RC_FLAGS="$RC_FLAGS -d \"JDK_COMPONENT=$PRODUCT_NAME $JDK_RC_PLATFORM_NAME binary\""
23758     RC_FLAGS="$RC_FLAGS -d \"JDK_VER=$JDK_MINOR_VERSION.$JDK_MICRO_VERSION.$JDK_UPDATE_VERSION_NOTNULL.$COOKED_BUILD_NUMBER\""
23759     RC_FLAGS="$RC_FLAGS -d \"JDK_COPYRIGHT=Copyright \xA9 $COPYRIGHT_YEAR\""
23760     RC_FLAGS="$RC_FLAGS -d \"JDK_NAME=$PRODUCT_NAME $JDK_RC_PLATFORM_NAME $JDK_MINOR_VERSION $JDK_UPDATE_META_TAG\""
23761     RC_FLAGS="$RC_FLAGS -d \"JDK_FVER=$JDK_MINOR_VERSION,$JDK_MICRO_VERSION,$JDK_UPDATE_VERSION_NOTNULL,$COOKED_BUILD_NUMBER\""
23762 
23763     # lib.exe is used to create static libraries.
23764     # Extract the first word of "lib", so it can be a program name with args.
23765 set dummy lib; ac_word=$2
23766 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23767 $as_echo_n "checking for $ac_word... " >&6; }
23768 if ${ac_cv_prog_WINAR+:} false; then :
23769   $as_echo_n "(cached) " >&6
23770 else
23771   if test -n "$WINAR"; then
23772   ac_cv_prog_WINAR="$WINAR" # Let the user override the test.
23773 else
23774 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23775 for as_dir in $PATH
23776 do
23777   IFS=$as_save_IFS
23778   test -z "$as_dir" && as_dir=.
23779     for ac_exec_ext in '' $ac_executable_extensions; do
23780   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
23781     ac_cv_prog_WINAR="lib"
23782     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23783     break 2
23784   fi
23785 done
23786   done
23787 IFS=$as_save_IFS
23788 
23789 fi
23790 fi
23791 WINAR=$ac_cv_prog_WINAR
23792 if test -n "$WINAR"; then
23793   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINAR" >&5
23794 $as_echo "$WINAR" >&6; }
23795 else
23796   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23797 $as_echo "no" >&6; }
23798 fi
23799 
23800 
23801 
23802   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23803 
23804   # First separate the path from the arguments. This will split at the first
23805   # space.
23806   complete="$WINAR"
23807   path="${complete%% *}"
23808   tmp="$complete EOL"
23809   arguments="${tmp#* }"
23810 
23811   # Input might be given as Windows format, start by converting to
23812   # unix format.
23813   new_path=`$CYGPATH -u "$path"`
23814 
23815   # Now try to locate executable using which
23816   new_path=`$WHICH "$new_path" 2> /dev/null`
23817   # bat and cmd files are not always considered executable in cygwin causing which
23818   # to not find them
23819   if test "x$new_path" = x \
23820            && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23821            && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23822     new_path=`$CYGPATH -u "$path"`
23823   fi
23824   if test "x$new_path" = x; then
23825     # Oops. Which didn't find the executable.
23826     # The splitting of arguments from the executable at a space might have been incorrect,
23827     # since paths with space are more likely in Windows. Give it another try with the whole
23828     # argument.
23829     path="$complete"
23830     arguments="EOL"
23831     new_path=`$CYGPATH -u "$path"`
23832     new_path=`$WHICH "$new_path" 2> /dev/null`
23833     # bat and cmd files are not always considered executable in cygwin causing which
23834     # to not find them
23835     if test "x$new_path" = x \
23836              && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23837              && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23838       new_path=`$CYGPATH -u "$path"`
23839     fi
23840     if test "x$new_path" = x; then
23841       # It's still not found. Now this is an unrecoverable error.
23842       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$complete\", is not found." >&5
23843 $as_echo "$as_me: The path of WINAR, which resolves as \"$complete\", is not found." >&6;}
23844       has_space=`$ECHO "$complete" | $GREP " "`
23845       if test "x$has_space" != x; then
23846         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23847 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23848       fi
23849       as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5
23850     fi
23851   fi
23852 
23853   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23854   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23855   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23856   # "foo.exe" is OK but "foo" is an error.
23857   #
23858   # This test is therefore slightly more accurate than "test -f" to check for file precense.
23859   # It is also a way to make sure we got the proper file name for the real test later on.
23860   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23861   if test "x$test_shortpath" = x; then
23862     # Short path failed, file does not exist as specified.
23863     # Try adding .exe or .cmd
23864     if test -f "${new_path}.exe"; then
23865        input_to_shortpath="${new_path}.exe"
23866     elif test -f "${new_path}.cmd"; then
23867        input_to_shortpath="${new_path}.cmd"
23868     else
23869       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$new_path\", is invalid." >&5
23870 $as_echo "$as_me: The path of WINAR, which resolves as \"$new_path\", is invalid." >&6;}
23871       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
23872 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
23873       as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5
23874     fi
23875   else
23876     input_to_shortpath="$new_path"
23877   fi
23878 
23879   # Call helper function which possibly converts this using DOS-style short mode.
23880   # If so, the updated path is stored in $new_path.
23881   new_path="$input_to_shortpath"
23882 
23883   input_path="$input_to_shortpath"
23884   # Check if we need to convert this using DOS-style short mode. If the path
23885   # contains just simple characters, use it. Otherwise (spaces, weird characters),
23886   # take no chances and rewrite it.
23887   # Note: m4 eats our [], so we need to use [ and ] instead.
23888   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23889   if test "x$has_forbidden_chars" != x; then
23890     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23891     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23892     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23893     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23894       # Going to short mode and back again did indeed matter. Since short mode is
23895       # case insensitive, let's make it lowercase to improve readability.
23896       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23897       # Now convert it back to Unix-stile (cygpath)
23898       input_path=`$CYGPATH -u "$shortmode_path"`
23899       new_path="$input_path"
23900     fi
23901   fi
23902 
23903   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23904   if test "x$test_cygdrive_prefix" = x; then
23905     # As a simple fix, exclude /usr/bin since it's not a real path.
23906     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
23907       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23908       # a path prefixed by /cygdrive for fixpath to work.
23909       new_path="$CYGWIN_ROOT_PATH$input_path"
23910     fi
23911   fi
23912 
23913   # remove trailing .exe if any
23914   new_path="${new_path/%.exe/}"
23915 
23916   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23917 
23918   # First separate the path from the arguments. This will split at the first
23919   # space.
23920   complete="$WINAR"
23921   path="${complete%% *}"
23922   tmp="$comp