1 #! /bin/sh
   2 # Guess values for system-dependent variables and create Makefiles.
   3 # Generated by GNU Autoconf 2.67 for OpenJDK jdk8.
   4 #
   5 # Report bugs to <build-dev@openjdk.java.net>.
   6 #
   7 #
   8 # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
   9 # 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software
  10 # Foundation, Inc.
  11 #
  12 #
  13 # This configure script is free software; the Free Software Foundation
  14 # gives unlimited permission to copy, distribute and modify it.
  15 ## -------------------- ##
  16 ## M4sh Initialization. ##
  17 ## -------------------- ##
  18 
  19 # Be more Bourne compatible
  20 DUALCASE=1; export DUALCASE # for MKS sh
  21 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
  22   emulate sh
  23   NULLCMD=:
  24   # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
  25   # is contrary to our usage.  Disable this feature.
  26   alias -g '${1+"$@"}'='"$@"'
  27   setopt NO_GLOB_SUBST
  28 else
  29   case `(set -o) 2>/dev/null` in #(
  30   *posix*) :
  31     set -o posix ;; #(
  32   *) :
  33      ;;
  34 esac
  35 fi
  36 
  37 
  38 as_nl='
  39 '
  40 export as_nl
  41 # Printing a long string crashes Solaris 7 /usr/bin/printf.
  42 as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
  43 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
  44 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
  45 # Prefer a ksh shell builtin over an external printf program on Solaris,
  46 # but without wasting forks for bash or zsh.
  47 if test -z "$BASH_VERSION$ZSH_VERSION" \
  48     && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
  49   as_echo='print -r --'
  50   as_echo_n='print -rn --'
  51 elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
  52   as_echo='printf %s\n'
  53   as_echo_n='printf %s'
  54 else
  55   if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
  56     as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
  57     as_echo_n='/usr/ucb/echo -n'
  58   else
  59     as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
  60     as_echo_n_body='eval
  61       arg=$1;
  62       case $arg in #(
  63       *"$as_nl"*)
  64         expr "X$arg" : "X\\(.*\\)$as_nl";
  65         arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
  66       esac;
  67       expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
  68     '
  69     export as_echo_n_body
  70     as_echo_n='sh -c $as_echo_n_body as_echo'
  71   fi
  72   export as_echo_body
  73   as_echo='sh -c $as_echo_body as_echo'
  74 fi
  75 
  76 # The user is always right.
  77 if test "${PATH_SEPARATOR+set}" != set; then
  78   PATH_SEPARATOR=:
  79   (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
  80     (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
  81       PATH_SEPARATOR=';'
  82   }
  83 fi
  84 
  85 
  86 # IFS
  87 # We need space, tab and new line, in precisely that order.  Quoting is
  88 # there to prevent editors from complaining about space-tab.
  89 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
  90 # splitting by setting IFS to empty value.)
  91 IFS=" ""        $as_nl"
  92 
  93 # Find who we are.  Look in the path if we contain no directory separator.
  94 case $0 in #((
  95   *[\\/]* ) as_myself=$0 ;;
  96   *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
  97 for as_dir in $PATH
  98 do
  99   IFS=$as_save_IFS
 100   test -z "$as_dir" && as_dir=.
 101     test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
 102   done
 103 IFS=$as_save_IFS
 104 
 105      ;;
 106 esac
 107 # We did not find ourselves, most probably we were run as `sh COMMAND'
 108 # in which case we are not to be found in the path.
 109 if test "x$as_myself" = x; then
 110   as_myself=$0
 111 fi
 112 if test ! -f "$as_myself"; then
 113   $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
 114   exit 1
 115 fi
 116 
 117 # Unset variables that we do not need and which cause bugs (e.g. in
 118 # pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
 119 # suppresses any "Segmentation fault" message there.  '((' could
 120 # trigger a bug in pdksh 5.2.14.
 121 for as_var in BASH_ENV ENV MAIL MAILPATH
 122 do eval test x\${$as_var+set} = xset \
 123   && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
 124 done
 125 PS1='$ '
 126 PS2='> '
 127 PS4='+ '
 128 
 129 # NLS nuisances.
 130 LC_ALL=C
 131 export LC_ALL
 132 LANGUAGE=C
 133 export LANGUAGE
 134 
 135 # CDPATH.
 136 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
 137 
 138 if test "x$CONFIG_SHELL" = x; then
 139   as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
 140   emulate sh
 141   NULLCMD=:
 142   # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
 143   # is contrary to our usage.  Disable this feature.
 144   alias -g '\${1+\"\$@\"}'='\"\$@\"'
 145   setopt NO_GLOB_SUBST
 146 else
 147   case \`(set -o) 2>/dev/null\` in #(
 148   *posix*) :
 149     set -o posix ;; #(
 150   *) :
 151      ;;
 152 esac
 153 fi
 154 "
 155   as_required="as_fn_return () { (exit \$1); }
 156 as_fn_success () { as_fn_return 0; }
 157 as_fn_failure () { as_fn_return 1; }
 158 as_fn_ret_success () { return 0; }
 159 as_fn_ret_failure () { return 1; }
 160 
 161 exitcode=0
 162 as_fn_success || { exitcode=1; echo as_fn_success failed.; }
 163 as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
 164 as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
 165 as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
 166 if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
 167 
 168 else
 169   exitcode=1; echo positional parameters were not saved.
 170 fi
 171 test x\$exitcode = x0 || exit 1"
 172   as_suggested="  as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
 173   as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
 174   eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
 175   test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
 176 test \$(( 1 + 1 )) = 2 || exit 1"
 177   if (eval "$as_required") 2>/dev/null; then :
 178   as_have_required=yes
 179 else
 180   as_have_required=no
 181 fi
 182   if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
 183 
 184 else
 185   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
 186 as_found=false
 187 for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
 188 do
 189   IFS=$as_save_IFS
 190   test -z "$as_dir" && as_dir=.
 191   as_found=:
 192   case $as_dir in #(
 193          /*)
 194            for as_base in sh bash ksh sh5; do
 195              # Try only shells that exist, to save several forks.
 196              as_shell=$as_dir/$as_base
 197              if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
 198                     { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
 199   CONFIG_SHELL=$as_shell as_have_required=yes
 200                    if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
 201   break 2
 202 fi
 203 fi
 204            done;;
 205        esac
 206   as_found=false
 207 done
 208 $as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
 209               { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
 210   CONFIG_SHELL=$SHELL as_have_required=yes
 211 fi; }
 212 IFS=$as_save_IFS
 213 
 214 
 215       if test "x$CONFIG_SHELL" != x; then :
 216   # We cannot yet assume a decent shell, so we have to provide a
 217         # neutralization value for shells without unset; and this also
 218         # works around shells that cannot unset nonexistent variables.
 219         BASH_ENV=/dev/null
 220         ENV=/dev/null
 221         (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
 222         export CONFIG_SHELL
 223         exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"}
 224 fi
 225 
 226     if test x$as_have_required = xno; then :
 227   $as_echo "$0: This script requires a shell more modern than all"
 228   $as_echo "$0: the shells that I found on your system."
 229   if test x${ZSH_VERSION+set} = xset ; then
 230     $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
 231     $as_echo "$0: be upgraded to zsh 4.3.4 or later."
 232   else
 233     $as_echo "$0: Please tell bug-autoconf@gnu.org and
 234 $0: build-dev@openjdk.java.net about your system, including
 235 $0: any error possibly output before this message. Then
 236 $0: install a modern shell, or manually run the script
 237 $0: under such a shell if you do have one."
 238   fi
 239   exit 1
 240 fi
 241 fi
 242 fi
 243 SHELL=${CONFIG_SHELL-/bin/sh}
 244 export SHELL
 245 # Unset more variables known to interfere with behavior of common tools.
 246 CLICOLOR_FORCE= GREP_OPTIONS=
 247 unset CLICOLOR_FORCE GREP_OPTIONS
 248 
 249 ## --------------------- ##
 250 ## M4sh Shell Functions. ##
 251 ## --------------------- ##
 252 # as_fn_unset VAR
 253 # ---------------
 254 # Portably unset VAR.
 255 as_fn_unset ()
 256 {
 257   { eval $1=; unset $1;}
 258 }
 259 as_unset=as_fn_unset
 260 
 261 # as_fn_set_status STATUS
 262 # -----------------------
 263 # Set $? to STATUS, without forking.
 264 as_fn_set_status ()
 265 {
 266   return $1
 267 } # as_fn_set_status
 268 
 269 # as_fn_exit STATUS
 270 # -----------------
 271 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
 272 as_fn_exit ()
 273 {
 274   set +e
 275   as_fn_set_status $1
 276   exit $1
 277 } # as_fn_exit
 278 
 279 # as_fn_mkdir_p
 280 # -------------
 281 # Create "$as_dir" as a directory, including parents if necessary.
 282 as_fn_mkdir_p ()
 283 {
 284 
 285   case $as_dir in #(
 286   -*) as_dir=./$as_dir;;
 287   esac
 288   test -d "$as_dir" || eval $as_mkdir_p || {
 289     as_dirs=
 290     while :; do
 291       case $as_dir in #(
 292       *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
 293       *) as_qdir=$as_dir;;
 294       esac
 295       as_dirs="'$as_qdir' $as_dirs"
 296       as_dir=`$as_dirname -- "$as_dir" ||
 297 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
 298          X"$as_dir" : 'X\(//\)[^/]' \| \
 299          X"$as_dir" : 'X\(//\)$' \| \
 300          X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
 301 $as_echo X"$as_dir" |
 302     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
 303             s//\1/
 304             q
 305           }
 306           /^X\(\/\/\)[^/].*/{
 307             s//\1/
 308             q
 309           }
 310           /^X\(\/\/\)$/{
 311             s//\1/
 312             q
 313           }
 314           /^X\(\/\).*/{
 315             s//\1/
 316             q
 317           }
 318           s/.*/./; q'`
 319       test -d "$as_dir" && break
 320     done
 321     test -z "$as_dirs" || eval "mkdir $as_dirs"
 322   } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
 323 
 324 
 325 } # as_fn_mkdir_p
 326 # as_fn_append VAR VALUE
 327 # ----------------------
 328 # Append the text in VALUE to the end of the definition contained in VAR. Take
 329 # advantage of any shell optimizations that allow amortized linear growth over
 330 # repeated appends, instead of the typical quadratic growth present in naive
 331 # implementations.
 332 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
 333   eval 'as_fn_append ()
 334   {
 335     eval $1+=\$2
 336   }'
 337 else
 338   as_fn_append ()
 339   {
 340     eval $1=\$$1\$2
 341   }
 342 fi # as_fn_append
 343 
 344 # as_fn_arith ARG...
 345 # ------------------
 346 # Perform arithmetic evaluation on the ARGs, and store the result in the
 347 # global $as_val. Take advantage of shells that can avoid forks. The arguments
 348 # must be portable across $(()) and expr.
 349 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
 350   eval 'as_fn_arith ()
 351   {
 352     as_val=$(( $* ))
 353   }'
 354 else
 355   as_fn_arith ()
 356   {
 357     as_val=`expr "$@" || test $? -eq 1`
 358   }
 359 fi # as_fn_arith
 360 
 361 
 362 # as_fn_error STATUS ERROR [LINENO LOG_FD]
 363 # ----------------------------------------
 364 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
 365 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
 366 # script with STATUS, using 1 if that was 0.
 367 as_fn_error ()
 368 {
 369   as_status=$1; test $as_status -eq 0 && as_status=1
 370   if test "$4"; then
 371     as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
 372     $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
 373   fi
 374   $as_echo "$as_me: error: $2" >&2
 375   as_fn_exit $as_status
 376 } # as_fn_error
 377 
 378 if expr a : '\(a\)' >/dev/null 2>&1 &&
 379    test "X`expr 00001 : '.*\(...\)'`" = X001; then
 380   as_expr=expr
 381 else
 382   as_expr=false
 383 fi
 384 
 385 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
 386   as_basename=basename
 387 else
 388   as_basename=false
 389 fi
 390 
 391 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
 392   as_dirname=dirname
 393 else
 394   as_dirname=false
 395 fi
 396 
 397 as_me=`$as_basename -- "$0" ||
 398 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
 399          X"$0" : 'X\(//\)$' \| \
 400          X"$0" : 'X\(/\)' \| . 2>/dev/null ||
 401 $as_echo X/"$0" |
 402     sed '/^.*\/\([^/][^/]*\)\/*$/{
 403             s//\1/
 404             q
 405           }
 406           /^X\/\(\/\/\)$/{
 407             s//\1/
 408             q
 409           }
 410           /^X\/\(\/\).*/{
 411             s//\1/
 412             q
 413           }
 414           s/.*/./; q'`
 415 
 416 # Avoid depending upon Character Ranges.
 417 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
 418 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
 419 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
 420 as_cr_digits='0123456789'
 421 as_cr_alnum=$as_cr_Letters$as_cr_digits
 422 
 423 
 424   as_lineno_1=$LINENO as_lineno_1a=$LINENO
 425   as_lineno_2=$LINENO as_lineno_2a=$LINENO
 426   eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
 427   test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
 428   # Blame Lee E. McMahon (1931-1989) for sed's syntax.  :-)
 429   sed -n '
 430     p
 431     /[$]LINENO/=
 432   ' <$as_myself |
 433     sed '
 434       s/[$]LINENO.*/&-/
 435       t lineno
 436       b
 437       :lineno
 438       N
 439       :loop
 440       s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
 441       t loop
 442       s/-\n.*//
 443     ' >$as_me.lineno &&
 444   chmod +x "$as_me.lineno" ||
 445     { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
 446 
 447   # Don't try to exec as it changes $[0], causing all sort of problems
 448   # (the dirname of $[0] is not the place where we might find the
 449   # original and so on.  Autoconf is especially sensitive to this).
 450   . "./$as_me.lineno"
 451   # Exit status is that of the last command.
 452   exit
 453 }
 454 
 455 ECHO_C= ECHO_N= ECHO_T=
 456 case `echo -n x` in #(((((
 457 -n*)
 458   case `echo 'xy\c'` in
 459   *c*) ECHO_T=' ';;     # ECHO_T is single tab character.
 460   xy)  ECHO_C='\c';;
 461   *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
 462        ECHO_T=' ';;
 463   esac;;
 464 *)
 465   ECHO_N='-n';;
 466 esac
 467 
 468 rm -f conf$$ conf$$.exe conf$$.file
 469 if test -d conf$$.dir; then
 470   rm -f conf$$.dir/conf$$.file
 471 else
 472   rm -f conf$$.dir
 473   mkdir conf$$.dir 2>/dev/null
 474 fi
 475 if (echo >conf$$.file) 2>/dev/null; then
 476   if ln -s conf$$.file conf$$ 2>/dev/null; then
 477     as_ln_s='ln -s'
 478     # ... but there are two gotchas:
 479     # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
 480     # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
 481     # In both cases, we have to default to `cp -p'.
 482     ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
 483       as_ln_s='cp -p'
 484   elif ln conf$$.file conf$$ 2>/dev/null; then
 485     as_ln_s=ln
 486   else
 487     as_ln_s='cp -p'
 488   fi
 489 else
 490   as_ln_s='cp -p'
 491 fi
 492 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
 493 rmdir conf$$.dir 2>/dev/null
 494 
 495 if mkdir -p . 2>/dev/null; then
 496   as_mkdir_p='mkdir -p "$as_dir"'
 497 else
 498   test -d ./-p && rmdir ./-p
 499   as_mkdir_p=false
 500 fi
 501 
 502 if test -x / >/dev/null 2>&1; then
 503   as_test_x='test -x'
 504 else
 505   if ls -dL / >/dev/null 2>&1; then
 506     as_ls_L_option=L
 507   else
 508     as_ls_L_option=
 509   fi
 510   as_test_x='
 511     eval sh -c '\''
 512       if test -d "$1"; then
 513         test -d "$1/.";
 514       else
 515         case $1 in #(
 516         -*)set "./$1";;
 517         esac;
 518         case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
 519         ???[sx]*):;;*)false;;esac;fi
 520     '\'' sh
 521   '
 522 fi
 523 as_executable_p=$as_test_x
 524 
 525 # Sed expression to map a string onto a valid CPP name.
 526 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
 527 
 528 # Sed expression to map a string onto a valid variable name.
 529 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
 530 
 531 
 532 test -n "$DJDIR" || exec 7<&0 </dev/null
 533 exec 6>&1
 534 
 535 # Name of the host.
 536 # hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
 537 # so uname gets run too.
 538 ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
 539 
 540 #
 541 # Initializations.
 542 #
 543 ac_default_prefix=/usr/local
 544 ac_clean_files=
 545 ac_config_libobj_dir=.
 546 LIBOBJS=
 547 cross_compiling=no
 548 subdirs=
 549 MFLAGS=
 550 MAKEFLAGS=
 551 
 552 # Identity of this package.
 553 PACKAGE_NAME='OpenJDK'
 554 PACKAGE_TARNAME='openjdk'
 555 PACKAGE_VERSION='jdk8'
 556 PACKAGE_STRING='OpenJDK jdk8'
 557 PACKAGE_BUGREPORT='build-dev@openjdk.java.net'
 558 PACKAGE_URL='http://openjdk.java.net'
 559 
 560 # Factoring default headers for most tests.
 561 ac_includes_default="\
 562 #include <stdio.h>
 563 #ifdef HAVE_SYS_TYPES_H
 564 # include <sys/types.h>
 565 #endif
 566 #ifdef HAVE_SYS_STAT_H
 567 # include <sys/stat.h>
 568 #endif
 569 #ifdef STDC_HEADERS
 570 # include <stdlib.h>
 571 # include <stddef.h>
 572 #else
 573 # ifdef HAVE_STDLIB_H
 574 #  include <stdlib.h>
 575 # endif
 576 #endif
 577 #ifdef HAVE_STRING_H
 578 # if !defined STDC_HEADERS && defined HAVE_MEMORY_H
 579 #  include <memory.h>
 580 # endif
 581 # include <string.h>
 582 #endif
 583 #ifdef HAVE_STRINGS_H
 584 # include <strings.h>
 585 #endif
 586 #ifdef HAVE_INTTYPES_H
 587 # include <inttypes.h>
 588 #endif
 589 #ifdef HAVE_STDINT_H
 590 # include <stdint.h>
 591 #endif
 592 #ifdef HAVE_UNISTD_H
 593 # include <unistd.h>
 594 #endif"
 595 
 596 ac_subst_vars='LTLIBOBJS
 597 LIBOBJS
 598 CCACHE
 599 USE_PRECOMPILED_HEADER
 600 SJAVAC_SERVER_DIR
 601 ENABLE_SJAVAC
 602 SJAVAC_SERVER_JAVA
 603 JOBS
 604 MEMORY_SIZE
 605 NUM_CORES
 606 ENABLE_INTREE_EC
 607 SALIB_NAME
 608 HOTSPOT_MAKE_ARGS
 609 FIXPATH
 610 LIBCXX
 611 LLVM_LIBS
 612 LLVM_LDFLAGS
 613 LLVM_CFLAGS
 614 LLVM_CONFIG
 615 LIBFFI_LIBS
 616 LIBFFI_CFLAGS
 617 STATIC_CXX_SETTING
 618 LIBDL
 619 LIBM
 620 LIBZIP_CAN_USE_MMAP
 621 USE_EXTERNAL_LIBZ
 622 USE_EXTERNAL_LIBGIF
 623 USE_EXTERNAL_LIBJPEG
 624 ALSA_LIBS
 625 ALSA_CFLAGS
 626 FREETYPE2_LIB_PATH
 627 USING_SYSTEM_FT_LIB
 628 FREETYPE2_LIBS
 629 FREETYPE2_CFLAGS
 630 CUPS_CFLAGS
 631 OPENWIN_HOME
 632 X_EXTRA_LIBS
 633 X_LIBS
 634 X_PRE_LIBS
 635 X_CFLAGS
 636 XMKMF
 637 CXXFLAGS_DEBUG_SYMBOLS
 638 CFLAGS_DEBUG_SYMBOLS
 639 ZIP_DEBUGINFO_FILES
 640 ENABLE_DEBUG_SYMBOLS
 641 COMPILER_SUPPORTS_TARGET_BITS_FLAG
 642 ZERO_ARCHFLAG
 643 LDFLAGS_CXX_JDK
 644 LDFLAGS_JDKEXE_SUFFIX
 645 LDFLAGS_JDKLIB_SUFFIX
 646 LDFLAGS_JDKEXE
 647 LDFLAGS_JDKLIB
 648 CXXFLAGS_JDKEXE
 649 CXXFLAGS_JDKLIB
 650 CFLAGS_JDKEXE
 651 CFLAGS_JDKLIB
 652 MACOSX_VERSION_MIN
 653 PACKAGE_PATH
 654 LEGACY_EXTRA_LDFLAGS
 655 LEGACY_EXTRA_CXXFLAGS
 656 LEGACY_EXTRA_CFLAGS
 657 CXX_FLAG_DEPS
 658 C_FLAG_DEPS
 659 CXX_O_FLAG_NONE
 660 CXX_O_FLAG_NORM
 661 CXX_O_FLAG_HI
 662 CXX_O_FLAG_HIGHEST
 663 C_O_FLAG_NONE
 664 C_O_FLAG_NORM
 665 C_O_FLAG_HI
 666 C_O_FLAG_HIGHEST
 667 POST_MCS_CMD
 668 POST_STRIP_CMD
 669 SET_EXECUTABLE_ORIGIN
 670 SET_SHARED_LIBRARY_ORIGIN
 671 CXX_FLAG_REORDER
 672 C_FLAG_REORDER
 673 SET_SHARED_LIBRARY_MAPFILE
 674 SET_SHARED_LIBRARY_NAME
 675 SHARED_LIBRARY_FLAGS
 676 EXE_SUFFIX
 677 STATIC_LIBRARY_SUFFIX
 678 SHARED_LIBRARY_SUFFIX
 679 LIBRARY_PREFIX
 680 STATIC_LIBRARY
 681 SHARED_LIBRARY
 682 OBJ_SUFFIX
 683 COMPILER_NAME
 684 JT_HOME
 685 JTREGEXE
 686 LIPO
 687 ac_ct_OBJDUMP
 688 OBJDUMP
 689 ac_ct_OBJCOPY
 690 OBJCOPY
 691 MCS
 692 STRIP
 693 GNM
 694 NM
 695 AS
 696 CXXCPP
 697 CPP
 698 COMPILER_TYPE
 699 RC_FLAGS
 700 DUMPBIN
 701 WINAR
 702 HOTSPOT_RC
 703 HOTSPOT_MT
 704 RC
 705 MT
 706 WINLD
 707 HOTSPOT_LD
 708 HOTSPOT_CXX
 709 ARFLAGS
 710 AR
 711 LDEXECXX
 712 LDCXX
 713 LDEXE
 714 LD
 715 ac_ct_OBJC
 716 OBJCFLAGS
 717 OBJC
 718 ac_ct_CXX
 719 CXXFLAGS
 720 CXX
 721 ac_ct_PROPER_COMPILER_CXX
 722 PROPER_COMPILER_CXX
 723 POTENTIAL_CXX
 724 TOOLS_DIR_CXX
 725 OBJEXT
 726 EXEEXT
 727 ac_ct_CC
 728 CPPFLAGS
 729 LDFLAGS
 730 CFLAGS
 731 CC
 732 ac_ct_PROPER_COMPILER_CC
 733 PROPER_COMPILER_CC
 734 POTENTIAL_CC
 735 TOOLS_DIR_CC
 736 BUILD_LD
 737 BUILD_CXX
 738 BUILD_CC
 739 MSVCR_DLL
 740 DXSDK_INCLUDE_PATH
 741 DXSDK_LIB_PATH
 742 VS_PATH
 743 VS_LIB
 744 VS_INCLUDE
 745 CYGWIN_LINK
 746 AR_OUT_OPTION
 747 LD_OUT_OPTION
 748 EXE_OUT_OPTION
 749 CC_OUT_OPTION
 750 BUILD_HOTSPOT
 751 HOTSPOT_DIST
 752 BUILD_OUTPUT
 753 OVERRIDE_SRC_ROOT
 754 ADD_SRC_ROOT
 755 JDK_TOPDIR
 756 NASHORN_TOPDIR
 757 HOTSPOT_TOPDIR
 758 JAXWS_TOPDIR
 759 JAXP_TOPDIR
 760 CORBA_TOPDIR
 761 LANGTOOLS_TOPDIR
 762 BOOT_JDK_JVMARGS
 763 JAVAC_FLAGS
 764 BOOT_JDK_SOURCETARGET
 765 BOOT_JDK
 766 BOOT_TOOLSJAR
 767 BOOT_RTJAR
 768 JAVA_CHECK
 769 JAVAC_CHECK
 770 COOKED_BUILD_NUMBER
 771 JDK_VERSION
 772 COPYRIGHT_YEAR
 773 MACOSX_BUNDLE_ID_BASE
 774 MACOSX_BUNDLE_NAME_BASE
 775 COMPANY_NAME
 776 JDK_RC_PLATFORM_NAME
 777 PRODUCT_SUFFIX
 778 PRODUCT_NAME
 779 LAUNCHER_NAME
 780 MILESTONE
 781 JDK_BUILD_NUMBER
 782 JDK_UPDATE_VERSION
 783 JDK_MICRO_VERSION
 784 JDK_MINOR_VERSION
 785 JDK_MAJOR_VERSION
 786 USER_RELEASE_SUFFIX
 787 COMPRESS_JARS
 788 UNLIMITED_CRYPTO
 789 CACERTS_FILE
 790 TEST_IN_BUILD
 791 BUILD_HEADLESS
 792 SUPPORT_HEADFUL
 793 SUPPORT_HEADLESS
 794 BDEPS_FTP
 795 BDEPS_UNZIP
 796 OS_VERSION_MICRO
 797 OS_VERSION_MINOR
 798 OS_VERSION_MAJOR
 799 PKG_CONFIG
 800 CODESIGN
 801 XATTR
 802 TIME
 803 STAT
 804 HG
 805 READELF
 806 OTOOL
 807 LDD
 808 ZIP
 809 UNZIP
 810 FIND_DELETE
 811 MAKE
 812 CHECK_TOOLSDIR_MAKE
 813 CHECK_TOOLSDIR_GMAKE
 814 CHECK_MAKE
 815 CHECK_GMAKE
 816 PKGHANDLER
 817 OUTPUT_ROOT
 818 CONF_NAME
 819 SPEC
 820 BUILD_VARIANT_RELEASE
 821 DEBUG_CLASSFILES
 822 FASTDEBUG
 823 VARIANT
 824 DEBUG_LEVEL
 825 MACOSX_UNIVERSAL
 826 INCLUDE_SA
 827 JVM_VARIANT_ZEROSHARK
 828 JVM_VARIANT_ZERO
 829 JVM_VARIANT_KERNEL
 830 JVM_VARIANT_MINIMAL1
 831 JVM_VARIANT_CLIENT
 832 JVM_VARIANT_SERVER
 833 JVM_VARIANTS
 834 JDK_VARIANT
 835 SET_OPENJDK
 836 BUILD_LOG_WRAPPER
 837 BUILD_LOG_PREVIOUS
 838 BUILD_LOG
 839 SYS_ROOT
 840 PATH_SEP
 841 SRC_ROOT
 842 ZERO_ARCHDEF
 843 DEFINE_CROSS_COMPILE_ARCH
 844 LP64
 845 OPENJDK_TARGET_OS_API_DIR
 846 OPENJDK_TARGET_CPU_JLI_CFLAGS
 847 OPENJDK_TARGET_CPU_OSARCH
 848 OPENJDK_TARGET_CPU_ISADIR
 849 OPENJDK_TARGET_CPU_LIBDIR
 850 OPENJDK_TARGET_CPU_LEGACY_LIB
 851 OPENJDK_TARGET_CPU_LEGACY
 852 REQUIRED_OS_VERSION
 853 REQUIRED_OS_NAME
 854 COMPILE_TYPE
 855 OPENJDK_TARGET_CPU_ENDIAN
 856 OPENJDK_TARGET_CPU_BITS
 857 OPENJDK_TARGET_CPU_ARCH
 858 OPENJDK_TARGET_CPU
 859 OPENJDK_TARGET_OS_API
 860 OPENJDK_TARGET_OS
 861 OPENJDK_BUILD_CPU_ENDIAN
 862 OPENJDK_BUILD_CPU_BITS
 863 OPENJDK_BUILD_CPU_ARCH
 864 OPENJDK_BUILD_CPU
 865 OPENJDK_BUILD_OS_API
 866 OPENJDK_BUILD_OS
 867 OPENJDK_BUILD_AUTOCONF_NAME
 868 OPENJDK_TARGET_AUTOCONF_NAME
 869 target_os
 870 target_vendor
 871 target_cpu
 872 target
 873 host_os
 874 host_vendor
 875 host_cpu
 876 host
 877 build_os
 878 build_vendor
 879 build_cpu
 880 build
 881 SETFILE
 882 DF
 883 READLINK
 884 CYGPATH
 885 NAWK
 886 SED
 887 FGREP
 888 EGREP
 889 GREP
 890 AWK
 891 XARGS
 892 WHICH
 893 WC
 894 UNIQ
 895 UNAME
 896 TR
 897 TOUCH
 898 TEE
 899 TAR
 900 TAIL
 901 SORT
 902 SH
 903 RM
 904 PRINTF
 905 MV
 906 MKTEMP
 907 MKDIR
 908 LS
 909 LN
 910 HEAD
 911 FIND
 912 FILE
 913 EXPR
 914 ECHO
 915 DIRNAME
 916 DIFF
 917 DATE
 918 CUT
 919 CPIO
 920 CP
 921 COMM
 922 CMP
 923 CHMOD
 924 CAT
 925 BASH
 926 BASENAME
 927 DATE_WHEN_CONFIGURED
 928 CONFIGURE_COMMAND_LINE
 929 CUSTOM_MAKE_DIR
 930 target_alias
 931 host_alias
 932 build_alias
 933 LIBS
 934 ECHO_T
 935 ECHO_N
 936 ECHO_C
 937 DEFS
 938 mandir
 939 localedir
 940 libdir
 941 psdir
 942 pdfdir
 943 dvidir
 944 htmldir
 945 infodir
 946 docdir
 947 oldincludedir
 948 includedir
 949 localstatedir
 950 sharedstatedir
 951 sysconfdir
 952 datadir
 953 datarootdir
 954 libexecdir
 955 sbindir
 956 bindir
 957 program_transform_name
 958 prefix
 959 exec_prefix
 960 PACKAGE_URL
 961 PACKAGE_BUGREPORT
 962 PACKAGE_STRING
 963 PACKAGE_VERSION
 964 PACKAGE_TARNAME
 965 PACKAGE_NAME
 966 PATH_SEPARATOR
 967 SHELL'
 968 ac_subst_files=''
 969 ac_user_opts='
 970 enable_option_checking
 971 with_custom_make_dir
 972 with_target_bits
 973 with_sys_root
 974 with_tools_dir
 975 with_devkit
 976 enable_openjdk_only
 977 with_jdk_variant
 978 with_jvm_variants
 979 enable_debug
 980 with_debug_level
 981 with_conf_name
 982 with_builddeps_conf
 983 with_builddeps_server
 984 with_builddeps_dir
 985 with_builddeps_group
 986 enable_headful
 987 enable_hotspot_test_in_build
 988 with_cacerts_file
 989 enable_unlimited_crypto
 990 with_milestone
 991 with_update_version
 992 with_build_number
 993 with_user_release_suffix
 994 with_boot_jdk
 995 with_boot_jdk_jvmargs
 996 with_add_source_root
 997 with_override_source_root
 998 with_adds_and_overrides
 999 with_override_langtools
1000 with_override_corba
1001 with_override_jaxp
1002 with_override_jaxws
1003 with_override_hotspot
1004 with_override_jdk
1005 with_import_hotspot
1006 with_msvcr_dll
1007 with_dxsdk
1008 with_dxsdk_lib
1009 with_dxsdk_include
1010 with_jtreg
1011 with_extra_cflags
1012 with_extra_cxxflags
1013 with_extra_ldflags
1014 enable_debug_symbols
1015 enable_zip_debug_info
1016 enable_macosx_runtime_support
1017 with_x
1018 with_cups
1019 with_cups_include
1020 with_freetype
1021 with_alsa
1022 with_alsa_include
1023 with_alsa_lib
1024 with_giflib
1025 with_zlib
1026 with_stdc__lib
1027 with_num_cores
1028 with_memory_size
1029 with_jobs
1030 with_sjavac_server_java
1031 enable_sjavac
1032 enable_precompiled_headers
1033 enable_ccache
1034 with_ccache_dir
1035 '
1036       ac_precious_vars='build_alias
1037 host_alias
1038 target_alias
1039 PKG_CONFIG
1040 CC
1041 CFLAGS
1042 LDFLAGS
1043 LIBS
1044 CPPFLAGS
1045 CXX
1046 CXXFLAGS
1047 CCC
1048 OBJC
1049 OBJCFLAGS
1050 CPP
1051 CXXCPP
1052 XMKMF
1053 FREETYPE2_CFLAGS
1054 FREETYPE2_LIBS
1055 ALSA_CFLAGS
1056 ALSA_LIBS
1057 LIBFFI_CFLAGS
1058 LIBFFI_LIBS'
1059 
1060 
1061 # Initialize some variables set by options.
1062 ac_init_help=
1063 ac_init_version=false
1064 ac_unrecognized_opts=
1065 ac_unrecognized_sep=
1066 # The variables have the same names as the options, with
1067 # dashes changed to underlines.
1068 cache_file=/dev/null
1069 exec_prefix=NONE
1070 no_create=
1071 no_recursion=
1072 prefix=NONE
1073 program_prefix=NONE
1074 program_suffix=NONE
1075 program_transform_name=s,x,x,
1076 silent=
1077 site=
1078 srcdir=
1079 verbose=
1080 x_includes=NONE
1081 x_libraries=NONE
1082 
1083 # Installation directory options.
1084 # These are left unexpanded so users can "make install exec_prefix=/foo"
1085 # and all the variables that are supposed to be based on exec_prefix
1086 # by default will actually change.
1087 # Use braces instead of parens because sh, perl, etc. also accept them.
1088 # (The list follows the same order as the GNU Coding Standards.)
1089 bindir='${exec_prefix}/bin'
1090 sbindir='${exec_prefix}/sbin'
1091 libexecdir='${exec_prefix}/libexec'
1092 datarootdir='${prefix}/share'
1093 datadir='${datarootdir}'
1094 sysconfdir='${prefix}/etc'
1095 sharedstatedir='${prefix}/com'
1096 localstatedir='${prefix}/var'
1097 includedir='${prefix}/include'
1098 oldincludedir='/usr/include'
1099 docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
1100 infodir='${datarootdir}/info'
1101 htmldir='${docdir}'
1102 dvidir='${docdir}'
1103 pdfdir='${docdir}'
1104 psdir='${docdir}'
1105 libdir='${exec_prefix}/lib'
1106 localedir='${datarootdir}/locale'
1107 mandir='${datarootdir}/man'
1108 
1109 ac_prev=
1110 ac_dashdash=
1111 for ac_option
1112 do
1113   # If the previous option needs an argument, assign it.
1114   if test -n "$ac_prev"; then
1115     eval $ac_prev=\$ac_option
1116     ac_prev=
1117     continue
1118   fi
1119 
1120   case $ac_option in
1121   *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
1122   *=)   ac_optarg= ;;
1123   *)    ac_optarg=yes ;;
1124   esac
1125 
1126   # Accept the important Cygnus configure options, so we can diagnose typos.
1127 
1128   case $ac_dashdash$ac_option in
1129   --)
1130     ac_dashdash=yes ;;
1131 
1132   -bindir | --bindir | --bindi | --bind | --bin | --bi)
1133     ac_prev=bindir ;;
1134   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
1135     bindir=$ac_optarg ;;
1136 
1137   -build | --build | --buil | --bui | --bu)
1138     ac_prev=build_alias ;;
1139   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
1140     build_alias=$ac_optarg ;;
1141 
1142   -cache-file | --cache-file | --cache-fil | --cache-fi \
1143   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1144     ac_prev=cache_file ;;
1145   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1146   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
1147     cache_file=$ac_optarg ;;
1148 
1149   --config-cache | -C)
1150     cache_file=config.cache ;;
1151 
1152   -datadir | --datadir | --datadi | --datad)
1153     ac_prev=datadir ;;
1154   -datadir=* | --datadir=* | --datadi=* | --datad=*)
1155     datadir=$ac_optarg ;;
1156 
1157   -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1158   | --dataroo | --dataro | --datar)
1159     ac_prev=datarootdir ;;
1160   -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1161   | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1162     datarootdir=$ac_optarg ;;
1163 
1164   -disable-* | --disable-*)
1165     ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1166     # Reject names that are not valid shell variable names.
1167     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1168       as_fn_error $? "invalid feature name: $ac_useropt"
1169     ac_useropt_orig=$ac_useropt
1170     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1171     case $ac_user_opts in
1172       *"
1173 "enable_$ac_useropt"
1174 "*) ;;
1175       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1176          ac_unrecognized_sep=', ';;
1177     esac
1178     eval enable_$ac_useropt=no ;;
1179 
1180   -docdir | --docdir | --docdi | --doc | --do)
1181     ac_prev=docdir ;;
1182   -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1183     docdir=$ac_optarg ;;
1184 
1185   -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1186     ac_prev=dvidir ;;
1187   -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1188     dvidir=$ac_optarg ;;
1189 
1190   -enable-* | --enable-*)
1191     ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1192     # Reject names that are not valid shell variable names.
1193     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1194       as_fn_error $? "invalid feature name: $ac_useropt"
1195     ac_useropt_orig=$ac_useropt
1196     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1197     case $ac_user_opts in
1198       *"
1199 "enable_$ac_useropt"
1200 "*) ;;
1201       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1202          ac_unrecognized_sep=', ';;
1203     esac
1204     eval enable_$ac_useropt=\$ac_optarg ;;
1205 
1206   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1207   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1208   | --exec | --exe | --ex)
1209     ac_prev=exec_prefix ;;
1210   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1211   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1212   | --exec=* | --exe=* | --ex=*)
1213     exec_prefix=$ac_optarg ;;
1214 
1215   -gas | --gas | --ga | --g)
1216     # Obsolete; use --with-gas.
1217     with_gas=yes ;;
1218 
1219   -help | --help | --hel | --he | -h)
1220     ac_init_help=long ;;
1221   -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1222     ac_init_help=recursive ;;
1223   -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1224     ac_init_help=short ;;
1225 
1226   -host | --host | --hos | --ho)
1227     ac_prev=host_alias ;;
1228   -host=* | --host=* | --hos=* | --ho=*)
1229     host_alias=$ac_optarg ;;
1230 
1231   -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1232     ac_prev=htmldir ;;
1233   -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1234   | --ht=*)
1235     htmldir=$ac_optarg ;;
1236 
1237   -includedir | --includedir | --includedi | --included | --include \
1238   | --includ | --inclu | --incl | --inc)
1239     ac_prev=includedir ;;
1240   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1241   | --includ=* | --inclu=* | --incl=* | --inc=*)
1242     includedir=$ac_optarg ;;
1243 
1244   -infodir | --infodir | --infodi | --infod | --info | --inf)
1245     ac_prev=infodir ;;
1246   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1247     infodir=$ac_optarg ;;
1248 
1249   -libdir | --libdir | --libdi | --libd)
1250     ac_prev=libdir ;;
1251   -libdir=* | --libdir=* | --libdi=* | --libd=*)
1252     libdir=$ac_optarg ;;
1253 
1254   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1255   | --libexe | --libex | --libe)
1256     ac_prev=libexecdir ;;
1257   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1258   | --libexe=* | --libex=* | --libe=*)
1259     libexecdir=$ac_optarg ;;
1260 
1261   -localedir | --localedir | --localedi | --localed | --locale)
1262     ac_prev=localedir ;;
1263   -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1264     localedir=$ac_optarg ;;
1265 
1266   -localstatedir | --localstatedir | --localstatedi | --localstated \
1267   | --localstate | --localstat | --localsta | --localst | --locals)
1268     ac_prev=localstatedir ;;
1269   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1270   | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1271     localstatedir=$ac_optarg ;;
1272 
1273   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1274     ac_prev=mandir ;;
1275   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1276     mandir=$ac_optarg ;;
1277 
1278   -nfp | --nfp | --nf)
1279     # Obsolete; use --without-fp.
1280     with_fp=no ;;
1281 
1282   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1283   | --no-cr | --no-c | -n)
1284     no_create=yes ;;
1285 
1286   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1287   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1288     no_recursion=yes ;;
1289 
1290   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1291   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1292   | --oldin | --oldi | --old | --ol | --o)
1293     ac_prev=oldincludedir ;;
1294   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1295   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1296   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1297     oldincludedir=$ac_optarg ;;
1298 
1299   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1300     ac_prev=prefix ;;
1301   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1302     prefix=$ac_optarg ;;
1303 
1304   -program-prefix | --program-prefix | --program-prefi | --program-pref \
1305   | --program-pre | --program-pr | --program-p)
1306     ac_prev=program_prefix ;;
1307   -program-prefix=* | --program-prefix=* | --program-prefi=* \
1308   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1309     program_prefix=$ac_optarg ;;
1310 
1311   -program-suffix | --program-suffix | --program-suffi | --program-suff \
1312   | --program-suf | --program-su | --program-s)
1313     ac_prev=program_suffix ;;
1314   -program-suffix=* | --program-suffix=* | --program-suffi=* \
1315   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1316     program_suffix=$ac_optarg ;;
1317 
1318   -program-transform-name | --program-transform-name \
1319   | --program-transform-nam | --program-transform-na \
1320   | --program-transform-n | --program-transform- \
1321   | --program-transform | --program-transfor \
1322   | --program-transfo | --program-transf \
1323   | --program-trans | --program-tran \
1324   | --progr-tra | --program-tr | --program-t)
1325     ac_prev=program_transform_name ;;
1326   -program-transform-name=* | --program-transform-name=* \
1327   | --program-transform-nam=* | --program-transform-na=* \
1328   | --program-transform-n=* | --program-transform-=* \
1329   | --program-transform=* | --program-transfor=* \
1330   | --program-transfo=* | --program-transf=* \
1331   | --program-trans=* | --program-tran=* \
1332   | --progr-tra=* | --program-tr=* | --program-t=*)
1333     program_transform_name=$ac_optarg ;;
1334 
1335   -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1336     ac_prev=pdfdir ;;
1337   -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1338     pdfdir=$ac_optarg ;;
1339 
1340   -psdir | --psdir | --psdi | --psd | --ps)
1341     ac_prev=psdir ;;
1342   -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1343     psdir=$ac_optarg ;;
1344 
1345   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1346   | -silent | --silent | --silen | --sile | --sil)
1347     silent=yes ;;
1348 
1349   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1350     ac_prev=sbindir ;;
1351   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1352   | --sbi=* | --sb=*)
1353     sbindir=$ac_optarg ;;
1354 
1355   -sharedstatedir | --sharedstatedir | --sharedstatedi \
1356   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1357   | --sharedst | --shareds | --shared | --share | --shar \
1358   | --sha | --sh)
1359     ac_prev=sharedstatedir ;;
1360   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1361   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1362   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1363   | --sha=* | --sh=*)
1364     sharedstatedir=$ac_optarg ;;
1365 
1366   -site | --site | --sit)
1367     ac_prev=site ;;
1368   -site=* | --site=* | --sit=*)
1369     site=$ac_optarg ;;
1370 
1371   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1372     ac_prev=srcdir ;;
1373   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1374     srcdir=$ac_optarg ;;
1375 
1376   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1377   | --syscon | --sysco | --sysc | --sys | --sy)
1378     ac_prev=sysconfdir ;;
1379   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1380   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1381     sysconfdir=$ac_optarg ;;
1382 
1383   -target | --target | --targe | --targ | --tar | --ta | --t)
1384     ac_prev=target_alias ;;
1385   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1386     target_alias=$ac_optarg ;;
1387 
1388   -v | -verbose | --verbose | --verbos | --verbo | --verb)
1389     verbose=yes ;;
1390 
1391   -version | --version | --versio | --versi | --vers | -V)
1392     ac_init_version=: ;;
1393 
1394   -with-* | --with-*)
1395     ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1396     # Reject names that are not valid shell variable names.
1397     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1398       as_fn_error $? "invalid package name: $ac_useropt"
1399     ac_useropt_orig=$ac_useropt
1400     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1401     case $ac_user_opts in
1402       *"
1403 "with_$ac_useropt"
1404 "*) ;;
1405       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1406          ac_unrecognized_sep=', ';;
1407     esac
1408     eval with_$ac_useropt=\$ac_optarg ;;
1409 
1410   -without-* | --without-*)
1411     ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1412     # Reject names that are not valid shell variable names.
1413     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1414       as_fn_error $? "invalid package name: $ac_useropt"
1415     ac_useropt_orig=$ac_useropt
1416     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1417     case $ac_user_opts in
1418       *"
1419 "with_$ac_useropt"
1420 "*) ;;
1421       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1422          ac_unrecognized_sep=', ';;
1423     esac
1424     eval with_$ac_useropt=no ;;
1425 
1426   --x)
1427     # Obsolete; use --with-x.
1428     with_x=yes ;;
1429 
1430   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1431   | --x-incl | --x-inc | --x-in | --x-i)
1432     ac_prev=x_includes ;;
1433   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1434   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1435     x_includes=$ac_optarg ;;
1436 
1437   -x-libraries | --x-libraries | --x-librarie | --x-librari \
1438   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1439     ac_prev=x_libraries ;;
1440   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1441   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1442     x_libraries=$ac_optarg ;;
1443 
1444   -*) as_fn_error $? "unrecognized option: \`$ac_option'
1445 Try \`$0 --help' for more information"
1446     ;;
1447 
1448   *=*)
1449     ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1450     # Reject names that are not valid shell variable names.
1451     case $ac_envvar in #(
1452       '' | [0-9]* | *[!_$as_cr_alnum]* )
1453       as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1454     esac
1455     eval $ac_envvar=\$ac_optarg
1456     export $ac_envvar ;;
1457 
1458   *)
1459     # FIXME: should be removed in autoconf 3.0.
1460     $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1461     expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1462       $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1463     : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
1464     ;;
1465 
1466   esac
1467 done
1468 
1469 if test -n "$ac_prev"; then
1470   ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1471   as_fn_error $? "missing argument to $ac_option"
1472 fi
1473 
1474 if test -n "$ac_unrecognized_opts"; then
1475   case $enable_option_checking in
1476     no) ;;
1477     fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1478     *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1479   esac
1480 fi
1481 
1482 # Check all directory arguments for consistency.
1483 for ac_var in   exec_prefix prefix bindir sbindir libexecdir datarootdir \
1484                 datadir sysconfdir sharedstatedir localstatedir includedir \
1485                 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1486                 libdir localedir mandir
1487 do
1488   eval ac_val=\$$ac_var
1489   # Remove trailing slashes.
1490   case $ac_val in
1491     */ )
1492       ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1493       eval $ac_var=\$ac_val;;
1494   esac
1495   # Be sure to have absolute directory names.
1496   case $ac_val in
1497     [\\/$]* | ?:[\\/]* )  continue;;
1498     NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1499   esac
1500   as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1501 done
1502 
1503 # There might be people who depend on the old broken behavior: `$host'
1504 # used to hold the argument of --host etc.
1505 # FIXME: To remove some day.
1506 build=$build_alias
1507 host=$host_alias
1508 target=$target_alias
1509 
1510 # FIXME: To remove some day.
1511 if test "x$host_alias" != x; then
1512   if test "x$build_alias" = x; then
1513     cross_compiling=maybe
1514     $as_echo "$as_me: WARNING: if you wanted to set the --build type, don't use --host.
1515     If a cross compiler is detected then cross compile mode will be used" >&2
1516   elif test "x$build_alias" != "x$host_alias"; then
1517     cross_compiling=yes
1518   fi
1519 fi
1520 
1521 ac_tool_prefix=
1522 test -n "$host_alias" && ac_tool_prefix=$host_alias-
1523 
1524 test "$silent" = yes && exec 6>/dev/null
1525 
1526 
1527 ac_pwd=`pwd` && test -n "$ac_pwd" &&
1528 ac_ls_di=`ls -di .` &&
1529 ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1530   as_fn_error $? "working directory cannot be determined"
1531 test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1532   as_fn_error $? "pwd does not report name of working directory"
1533 
1534 
1535 # Find the source files, if location was not specified.
1536 if test -z "$srcdir"; then
1537   ac_srcdir_defaulted=yes
1538   # Try the directory containing this script, then the parent directory.
1539   ac_confdir=`$as_dirname -- "$as_myself" ||
1540 $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1541          X"$as_myself" : 'X\(//\)[^/]' \| \
1542          X"$as_myself" : 'X\(//\)$' \| \
1543          X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1544 $as_echo X"$as_myself" |
1545     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1546             s//\1/
1547             q
1548           }
1549           /^X\(\/\/\)[^/].*/{
1550             s//\1/
1551             q
1552           }
1553           /^X\(\/\/\)$/{
1554             s//\1/
1555             q
1556           }
1557           /^X\(\/\).*/{
1558             s//\1/
1559             q
1560           }
1561           s/.*/./; q'`
1562   srcdir=$ac_confdir
1563   if test ! -r "$srcdir/$ac_unique_file"; then
1564     srcdir=..
1565   fi
1566 else
1567   ac_srcdir_defaulted=no
1568 fi
1569 if test ! -r "$srcdir/$ac_unique_file"; then
1570   test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1571   as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1572 fi
1573 ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1574 ac_abs_confdir=`(
1575         cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1576         pwd)`
1577 # When building in place, set srcdir=.
1578 if test "$ac_abs_confdir" = "$ac_pwd"; then
1579   srcdir=.
1580 fi
1581 # Remove unnecessary trailing slashes from srcdir.
1582 # Double slashes in file names in object file debugging info
1583 # mess up M-x gdb in Emacs.
1584 case $srcdir in
1585 */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1586 esac
1587 for ac_var in $ac_precious_vars; do
1588   eval ac_env_${ac_var}_set=\${${ac_var}+set}
1589   eval ac_env_${ac_var}_value=\$${ac_var}
1590   eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1591   eval ac_cv_env_${ac_var}_value=\$${ac_var}
1592 done
1593 
1594 #
1595 # Report the --help message.
1596 #
1597 if test "$ac_init_help" = "long"; then
1598   # Omit some internal or obsolete options to make the list less imposing.
1599   # This message is too long to be a string in the A/UX 3.1 sh.
1600   cat <<_ACEOF
1601 \`configure' configures OpenJDK jdk8 to adapt to many kinds of systems.
1602 
1603 Usage: $0 [OPTION]... [VAR=VALUE]...
1604 
1605 To assign environment variables (e.g., CC, CFLAGS...), specify them as
1606 VAR=VALUE.  See below for descriptions of some of the useful variables.
1607 
1608 Defaults for the options are specified in brackets.
1609 
1610 Configuration:
1611   -h, --help              display this help and exit
1612       --help=short        display options specific to this package
1613       --help=recursive    display the short help of all the included packages
1614   -V, --version           display version information and exit
1615   -q, --quiet, --silent   do not print \`checking ...' messages
1616       --cache-file=FILE   cache test results in FILE [disabled]
1617   -C, --config-cache      alias for \`--cache-file=config.cache'
1618   -n, --no-create         do not create output files
1619       --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1620 
1621 Installation directories:
1622   --prefix=PREFIX         install architecture-independent files in PREFIX
1623                           [$ac_default_prefix]
1624   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1625                           [PREFIX]
1626 
1627 By default, \`make install' will install all the files in
1628 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1629 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1630 for instance \`--prefix=\$HOME'.
1631 
1632 For better control, use the options below.
1633 
1634 Fine tuning of the installation directories:
1635   --bindir=DIR            user executables [EPREFIX/bin]
1636   --sbindir=DIR           system admin executables [EPREFIX/sbin]
1637   --libexecdir=DIR        program executables [EPREFIX/libexec]
1638   --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
1639   --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
1640   --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
1641   --libdir=DIR            object code libraries [EPREFIX/lib]
1642   --includedir=DIR        C header files [PREFIX/include]
1643   --oldincludedir=DIR     C header files for non-gcc [/usr/include]
1644   --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
1645   --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
1646   --infodir=DIR           info documentation [DATAROOTDIR/info]
1647   --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
1648   --mandir=DIR            man documentation [DATAROOTDIR/man]
1649   --docdir=DIR            documentation root [DATAROOTDIR/doc/openjdk]
1650   --htmldir=DIR           html documentation [DOCDIR]
1651   --dvidir=DIR            dvi documentation [DOCDIR]
1652   --pdfdir=DIR            pdf documentation [DOCDIR]
1653   --psdir=DIR             ps documentation [DOCDIR]
1654 _ACEOF
1655 
1656   cat <<\_ACEOF
1657 
1658 X features:
1659   --x-includes=DIR    X include files are in DIR
1660   --x-libraries=DIR   X library files are in DIR
1661 
1662 System types:
1663   --build=BUILD     configure for building on BUILD [guessed]
1664   --host=HOST       cross-compile to build programs to run on HOST [BUILD]
1665   --target=TARGET   configure for building compilers for TARGET [HOST]
1666 _ACEOF
1667 fi
1668 
1669 if test -n "$ac_init_help"; then
1670   case $ac_init_help in
1671      short | recursive ) echo "Configuration of OpenJDK jdk8:";;
1672    esac
1673   cat <<\_ACEOF
1674 
1675 Optional Features:
1676   --disable-option-checking  ignore unrecognized --enable/--with options
1677   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1678   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1679   --enable-openjdk-only   suppress building custom source even if present
1680                           [disabled]
1681   --enable-debug          set the debug level to fastdebug (shorthand for
1682                           --with-debug-level=fastdebug) [disabled]
1683   --disable-headful       disable building headful support (graphical UI
1684                           support) [enabled]
1685   --enable-hotspot-test-in-build
1686                           run the Queens test after Hotspot build [disabled]
1687   --enable-unlimited-crypto
1688                           Enable unlimited crypto policy [disabled]
1689   --disable-debug-symbols disable generation of debug symbols [enabled]
1690   --disable-zip-debug-info
1691                           disable zipping of debug-info files [enabled]
1692   --disable-macosx-runtime-support
1693                           disable the use of MacOSX Java runtime support
1694                           framework [enabled]
1695   --enable-sjavac         use sjavac to do fast incremental compiles
1696                           [disabled]
1697   --disable-precompiled-headers
1698                           disable using precompiled headers when compiling C++
1699                           [enabled]
1700   --disable-ccache        disable using ccache to speed up recompilations
1701                           [enabled]
1702 
1703 Optional Packages:
1704   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
1705   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
1706   --with-custom-make-dir  use this directory for custom build/make files
1707   --with-target-bits      build 32-bit or 64-bit binaries (for platforms that
1708                           support it), e.g. --with-target-bits=32 [guessed]
1709   --with-sys-root         pass this sys-root to the compilers and tools (for
1710                           cross-compiling)
1711   --with-tools-dir        search this directory for compilers and tools (for
1712                           cross-compiling)
1713   --with-devkit           use this directory as base for tools-dir and
1714                           sys-root (for cross-compiling)
1715   --with-jdk-variant      JDK variant to build (normal) [normal]
1716   --with-jvm-variants     JVM variants (separated by commas) to build (server,
1717                           client, minimal1, kernel, zero, zeroshark) [server]
1718   --with-debug-level      set the debug level (release, fastdebug, slowdebug)
1719                           [release]
1720   --with-conf-name        use this as the name of the configuration [generated
1721                           from important configuration options]
1722   --with-builddeps-conf   use this configuration file for the builddeps
1723   --with-builddeps-server download and use build dependencies from this server
1724                           url
1725   --with-builddeps-dir    store downloaded build dependencies here
1726                           [/localhome/builddeps]
1727   --with-builddeps-group  chgrp the downloaded build dependencies to this
1728                           group
1729   --with-cacerts-file     specify alternative cacerts file
1730   --with-milestone        Set milestone value for build [internal]
1731   --with-update-version   Set update version value for build [b00]
1732   --with-build-number     Set build number value for build [b00]
1733   --with-user-release-suffix
1734                           Add a custom string to the version string if build
1735                           number isn't set.[username_builddateb00]
1736   --with-boot-jdk         path to Boot JDK (used to bootstrap build) [probed]
1737   --with-boot-jdk-jvmargs specify JVM arguments to be passed to all
1738                           invocations of the Boot JDK, overriding the default
1739                           values, e.g --with-boot-jdk-jvmargs="-Xmx8G
1740                           -enableassertions"
1741   --with-add-source-root  for each and every source directory, look in this
1742                           additional source root for the same directory; if it
1743                           exists and have files in it, include it in the build
1744   --with-override-source-root
1745                           for each and every source directory, look in this
1746                           override source root for the same directory; if it
1747                           exists, use that directory instead and ignore the
1748                           directory in the original source root
1749   --with-adds-and-overrides
1750                           use the subdirs 'adds' and 'overrides' in the
1751                           specified directory as add-source-root and
1752                           override-source-root
1753   --with-override-langtools
1754                           use this langtools dir for the build
1755   --with-override-corba   use this corba dir for the build
1756   --with-override-jaxp    use this jaxp dir for the build
1757   --with-override-jaxws   use this jaxws dir for the build
1758   --with-override-hotspot use this hotspot dir for the build
1759   --with-override-jdk     use this jdk dir for the build
1760   --with-import-hotspot   import hotspot binaries from this jdk image or
1761                           hotspot build dist dir instead of building from
1762                           source
1763   --with-msvcr-dll        copy this msvcr100.dll into the built JDK (Windows
1764                           only) [probed]
1765   --with-dxsdk            the DirectX SDK (Windows only) [probed]
1766   --with-dxsdk-lib        the DirectX SDK lib directory (Windows only)
1767                           [probed]
1768   --with-dxsdk-include    the DirectX SDK include directory (Windows only)
1769                           [probed]
1770   --with-jtreg            Regression Test Harness [probed]
1771   --with-extra-cflags     extra flags to be used when compiling jdk c-files
1772   --with-extra-cxxflags   extra flags to be used when compiling jdk c++-files
1773   --with-extra-ldflags    extra flags to be used when linking jdk
1774   --with-x                use the X Window System
1775   --with-cups             specify prefix directory for the cups package
1776                           (expecting the headers under PATH/include)
1777   --with-cups-include     specify directory for the cups include files
1778   --with-freetype         specify prefix directory for the freetype2 package
1779                           (expecting the libraries under PATH/lib and the
1780                           headers under PATH/include)
1781   --with-alsa             specify prefix directory for the alsa package
1782                           (expecting the libraries under PATH/lib and the
1783                           headers under PATH/include)
1784   --with-alsa-include     specify directory for the alsa include files
1785   --with-alsa-lib         specify directory for the alsa library
1786   --with-giflib           use giflib from build system or OpenJDK source
1787                           (system, bundled) [bundled]
1788   --with-zlib             use zlib from build system or OpenJDK source
1789                           (system, bundled) [bundled]
1790   --with-stdc++lib=<static>,<dynamic>,<default>
1791                           force linking of the C++ runtime on Linux to either
1792                           static or dynamic, default is static with dynamic as
1793                           fallback
1794   --with-num-cores        number of cores in the build system, e.g.
1795                           --with-num-cores=8 [probed]
1796   --with-memory-size      memory (in MB) available in the build system, e.g.
1797                           --with-memory-size=1024 [probed]
1798   --with-jobs             number of parallel jobs to let make run [calculated
1799                           based on cores and memory]
1800   --with-sjavac-server-java
1801                           use this java binary for running the sjavac
1802                           background server [Boot JDK java]
1803   --with-ccache-dir       where to store ccache files [~/.ccache]
1804 
1805 Some influential environment variables:
1806   PKG_CONFIG  path to pkg-config utility
1807   CC          C compiler command
1808   CFLAGS      C compiler flags
1809   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
1810               nonstandard directory <lib dir>
1811   LIBS        libraries to pass to the linker, e.g. -l<library>
1812   CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
1813               you have headers in a nonstandard directory <include dir>
1814   CXX         C++ compiler command
1815   CXXFLAGS    C++ compiler flags
1816   OBJC        Objective C compiler command
1817   OBJCFLAGS   Objective C compiler flags
1818   CPP         C preprocessor
1819   CXXCPP      C++ preprocessor
1820   XMKMF       Path to xmkmf, Makefile generator for X Window System
1821   FREETYPE2_CFLAGS
1822               C compiler flags for FREETYPE2, overriding pkg-config
1823   FREETYPE2_LIBS
1824               linker flags for FREETYPE2, overriding pkg-config
1825   ALSA_CFLAGS C compiler flags for ALSA, overriding pkg-config
1826   ALSA_LIBS   linker flags for ALSA, overriding pkg-config
1827   LIBFFI_CFLAGS
1828               C compiler flags for LIBFFI, overriding pkg-config
1829   LIBFFI_LIBS linker flags for LIBFFI, overriding pkg-config
1830 
1831 Use these variables to override the choices made by `configure' or to help
1832 it to find libraries and programs with nonstandard names/locations.
1833 
1834 Report bugs to <build-dev@openjdk.java.net>.
1835 OpenJDK home page: <http://openjdk.java.net>.
1836 _ACEOF
1837 ac_status=$?
1838 fi
1839 
1840 if test "$ac_init_help" = "recursive"; then
1841   # If there are subdirs, report their specific --help.
1842   for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
1843     test -d "$ac_dir" ||
1844       { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1845       continue
1846     ac_builddir=.
1847 
1848 case "$ac_dir" in
1849 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1850 *)
1851   ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
1852   # A ".." for each directory in $ac_dir_suffix.
1853   ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
1854   case $ac_top_builddir_sub in
1855   "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1856   *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1857   esac ;;
1858 esac
1859 ac_abs_top_builddir=$ac_pwd
1860 ac_abs_builddir=$ac_pwd$ac_dir_suffix
1861 # for backward compatibility:
1862 ac_top_builddir=$ac_top_build_prefix
1863 
1864 case $srcdir in
1865   .)  # We are building in place.
1866     ac_srcdir=.
1867     ac_top_srcdir=$ac_top_builddir_sub
1868     ac_abs_top_srcdir=$ac_pwd ;;
1869   [\\/]* | ?:[\\/]* )  # Absolute name.
1870     ac_srcdir=$srcdir$ac_dir_suffix;
1871     ac_top_srcdir=$srcdir
1872     ac_abs_top_srcdir=$srcdir ;;
1873   *) # Relative name.
1874     ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1875     ac_top_srcdir=$ac_top_build_prefix$srcdir
1876     ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
1877 esac
1878 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
1879 
1880     cd "$ac_dir" || { ac_status=$?; continue; }
1881     # Check for guested configure.
1882     if test -f "$ac_srcdir/configure.gnu"; then
1883       echo &&
1884       $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1885     elif test -f "$ac_srcdir/configure"; then
1886       echo &&
1887       $SHELL "$ac_srcdir/configure" --help=recursive
1888     else
1889       $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1890     fi || ac_status=$?
1891     cd "$ac_pwd" || { ac_status=$?; break; }
1892   done
1893 fi
1894 
1895 test -n "$ac_init_help" && exit $ac_status
1896 if $ac_init_version; then
1897   cat <<\_ACEOF
1898 OpenJDK configure jdk8
1899 generated by GNU Autoconf 2.67
1900 
1901 Copyright (C) 2010 Free Software Foundation, Inc.
1902 This configure script is free software; the Free Software Foundation
1903 gives unlimited permission to copy, distribute and modify it.
1904 _ACEOF
1905   exit
1906 fi
1907 
1908 ## ------------------------ ##
1909 ## Autoconf initialization. ##
1910 ## ------------------------ ##
1911 
1912 # ac_fn_c_try_compile LINENO
1913 # --------------------------
1914 # Try to compile conftest.$ac_ext, and return whether this succeeded.
1915 ac_fn_c_try_compile ()
1916 {
1917   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1918   rm -f conftest.$ac_objext
1919   if { { ac_try="$ac_compile"
1920 case "(($ac_try" in
1921   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1922   *) ac_try_echo=$ac_try;;
1923 esac
1924 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1925 $as_echo "$ac_try_echo"; } >&5
1926   (eval "$ac_compile") 2>conftest.err
1927   ac_status=$?
1928   if test -s conftest.err; then
1929     grep -v '^ *+' conftest.err >conftest.er1
1930     cat conftest.er1 >&5
1931     mv -f conftest.er1 conftest.err
1932   fi
1933   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1934   test $ac_status = 0; } && {
1935          test -z "$ac_c_werror_flag" ||
1936          test ! -s conftest.err
1937        } && test -s conftest.$ac_objext; then :
1938   ac_retval=0
1939 else
1940   $as_echo "$as_me: failed program was:" >&5
1941 sed 's/^/| /' conftest.$ac_ext >&5
1942 
1943         ac_retval=1
1944 fi
1945   eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1946   as_fn_set_status $ac_retval
1947 
1948 } # ac_fn_c_try_compile
1949 
1950 # ac_fn_cxx_try_compile LINENO
1951 # ----------------------------
1952 # Try to compile conftest.$ac_ext, and return whether this succeeded.
1953 ac_fn_cxx_try_compile ()
1954 {
1955   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1956   rm -f conftest.$ac_objext
1957   if { { ac_try="$ac_compile"
1958 case "(($ac_try" in
1959   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1960   *) ac_try_echo=$ac_try;;
1961 esac
1962 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1963 $as_echo "$ac_try_echo"; } >&5
1964   (eval "$ac_compile") 2>conftest.err
1965   ac_status=$?
1966   if test -s conftest.err; then
1967     grep -v '^ *+' conftest.err >conftest.er1
1968     cat conftest.er1 >&5
1969     mv -f conftest.er1 conftest.err
1970   fi
1971   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1972   test $ac_status = 0; } && {
1973          test -z "$ac_cxx_werror_flag" ||
1974          test ! -s conftest.err
1975        } && test -s conftest.$ac_objext; then :
1976   ac_retval=0
1977 else
1978   $as_echo "$as_me: failed program was:" >&5
1979 sed 's/^/| /' conftest.$ac_ext >&5
1980 
1981         ac_retval=1
1982 fi
1983   eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1984   as_fn_set_status $ac_retval
1985 
1986 } # ac_fn_cxx_try_compile
1987 
1988 # ac_fn_objc_try_compile LINENO
1989 # -----------------------------
1990 # Try to compile conftest.$ac_ext, and return whether this succeeded.
1991 ac_fn_objc_try_compile ()
1992 {
1993   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1994   rm -f conftest.$ac_objext
1995   if { { ac_try="$ac_compile"
1996 case "(($ac_try" in
1997   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1998   *) ac_try_echo=$ac_try;;
1999 esac
2000 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2001 $as_echo "$ac_try_echo"; } >&5
2002   (eval "$ac_compile") 2>conftest.err
2003   ac_status=$?
2004   if test -s conftest.err; then
2005     grep -v '^ *+' conftest.err >conftest.er1
2006     cat conftest.er1 >&5
2007     mv -f conftest.er1 conftest.err
2008   fi
2009   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2010   test $ac_status = 0; } && {
2011          test -z "$ac_objc_werror_flag" ||
2012          test ! -s conftest.err
2013        } && test -s conftest.$ac_objext; then :
2014   ac_retval=0
2015 else
2016   $as_echo "$as_me: failed program was:" >&5
2017 sed 's/^/| /' conftest.$ac_ext >&5
2018 
2019         ac_retval=1
2020 fi
2021   eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2022   as_fn_set_status $ac_retval
2023 
2024 } # ac_fn_objc_try_compile
2025 
2026 # ac_fn_c_try_cpp LINENO
2027 # ----------------------
2028 # Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2029 ac_fn_c_try_cpp ()
2030 {
2031   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2032   if { { ac_try="$ac_cpp conftest.$ac_ext"
2033 case "(($ac_try" in
2034   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2035   *) ac_try_echo=$ac_try;;
2036 esac
2037 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2038 $as_echo "$ac_try_echo"; } >&5
2039   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2040   ac_status=$?
2041   if test -s conftest.err; then
2042     grep -v '^ *+' conftest.err >conftest.er1
2043     cat conftest.er1 >&5
2044     mv -f conftest.er1 conftest.err
2045   fi
2046   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2047   test $ac_status = 0; } > conftest.i && {
2048          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
2049          test ! -s conftest.err
2050        }; then :
2051   ac_retval=0
2052 else
2053   $as_echo "$as_me: failed program was:" >&5
2054 sed 's/^/| /' conftest.$ac_ext >&5
2055 
2056     ac_retval=1
2057 fi
2058   eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2059   as_fn_set_status $ac_retval
2060 
2061 } # ac_fn_c_try_cpp
2062 
2063 # ac_fn_cxx_try_cpp LINENO
2064 # ------------------------
2065 # Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2066 ac_fn_cxx_try_cpp ()
2067 {
2068   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2069   if { { ac_try="$ac_cpp conftest.$ac_ext"
2070 case "(($ac_try" in
2071   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2072   *) ac_try_echo=$ac_try;;
2073 esac
2074 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2075 $as_echo "$ac_try_echo"; } >&5
2076   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2077   ac_status=$?
2078   if test -s conftest.err; then
2079     grep -v '^ *+' conftest.err >conftest.er1
2080     cat conftest.er1 >&5
2081     mv -f conftest.er1 conftest.err
2082   fi
2083   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2084   test $ac_status = 0; } > conftest.i && {
2085          test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
2086          test ! -s conftest.err
2087        }; then :
2088   ac_retval=0
2089 else
2090   $as_echo "$as_me: failed program was:" >&5
2091 sed 's/^/| /' conftest.$ac_ext >&5
2092 
2093     ac_retval=1
2094 fi
2095   eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2096   as_fn_set_status $ac_retval
2097 
2098 } # ac_fn_cxx_try_cpp
2099 
2100 # ac_fn_cxx_check_header_mongrel LINENO HEADER VAR INCLUDES
2101 # ---------------------------------------------------------
2102 # Tests whether HEADER exists, giving a warning if it cannot be compiled using
2103 # the include files in INCLUDES and setting the cache variable VAR
2104 # accordingly.
2105 ac_fn_cxx_check_header_mongrel ()
2106 {
2107   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2108   if eval "test \"\${$3+set}\"" = set; then :
2109   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2110 $as_echo_n "checking for $2... " >&6; }
2111 if eval "test \"\${$3+set}\"" = set; then :
2112   $as_echo_n "(cached) " >&6
2113 fi
2114 eval ac_res=\$$3
2115                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2116 $as_echo "$ac_res" >&6; }
2117 else
2118   # Is the header compilable?
2119 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
2120 $as_echo_n "checking $2 usability... " >&6; }
2121 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2122 /* end confdefs.h.  */
2123 $4
2124 #include <$2>
2125 _ACEOF
2126 if ac_fn_cxx_try_compile "$LINENO"; then :
2127   ac_header_compiler=yes
2128 else
2129   ac_header_compiler=no
2130 fi
2131 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2132 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
2133 $as_echo "$ac_header_compiler" >&6; }
2134 
2135 # Is the header present?
2136 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
2137 $as_echo_n "checking $2 presence... " >&6; }
2138 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2139 /* end confdefs.h.  */
2140 #include <$2>
2141 _ACEOF
2142 if ac_fn_cxx_try_cpp "$LINENO"; then :
2143   ac_header_preproc=yes
2144 else
2145   ac_header_preproc=no
2146 fi
2147 rm -f conftest.err conftest.i conftest.$ac_ext
2148 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
2149 $as_echo "$ac_header_preproc" >&6; }
2150 
2151 # So?  What about this header?
2152 case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in #((
2153   yes:no: )
2154     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
2155 $as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
2156     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2157 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2158     ;;
2159   no:yes:* )
2160     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
2161 $as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
2162     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
2163 $as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
2164     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
2165 $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
2166     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
2167 $as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
2168     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2169 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2170 ( $as_echo "## ----------------------------------------- ##
2171 ## Report this to build-dev@openjdk.java.net ##
2172 ## ----------------------------------------- ##"
2173      ) | sed "s/^/$as_me: WARNING:     /" >&2
2174     ;;
2175 esac
2176   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2177 $as_echo_n "checking for $2... " >&6; }
2178 if eval "test \"\${$3+set}\"" = set; then :
2179   $as_echo_n "(cached) " >&6
2180 else
2181   eval "$3=\$ac_header_compiler"
2182 fi
2183 eval ac_res=\$$3
2184                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2185 $as_echo "$ac_res" >&6; }
2186 fi
2187   eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2188 
2189 } # ac_fn_cxx_check_header_mongrel
2190 
2191 # ac_fn_cxx_try_run LINENO
2192 # ------------------------
2193 # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
2194 # that executables *can* be run.
2195 ac_fn_cxx_try_run ()
2196 {
2197   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2198   if { { ac_try="$ac_link"
2199 case "(($ac_try" in
2200   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2201   *) ac_try_echo=$ac_try;;
2202 esac
2203 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2204 $as_echo "$ac_try_echo"; } >&5
2205   (eval "$ac_link") 2>&5
2206   ac_status=$?
2207   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2208   test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
2209   { { case "(($ac_try" in
2210   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2211   *) ac_try_echo=$ac_try;;
2212 esac
2213 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2214 $as_echo "$ac_try_echo"; } >&5
2215   (eval "$ac_try") 2>&5
2216   ac_status=$?
2217   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2218   test $ac_status = 0; }; }; then :
2219   ac_retval=0
2220 else
2221   $as_echo "$as_me: program exited with status $ac_status" >&5
2222        $as_echo "$as_me: failed program was:" >&5
2223 sed 's/^/| /' conftest.$ac_ext >&5
2224 
2225        ac_retval=$ac_status
2226 fi
2227   rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2228   eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2229   as_fn_set_status $ac_retval
2230 
2231 } # ac_fn_cxx_try_run
2232 
2233 # ac_fn_cxx_check_header_compile LINENO HEADER VAR INCLUDES
2234 # ---------------------------------------------------------
2235 # Tests whether HEADER exists and can be compiled using the include files in
2236 # INCLUDES, setting the cache variable VAR accordingly.
2237 ac_fn_cxx_check_header_compile ()
2238 {
2239   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2240   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2241 $as_echo_n "checking for $2... " >&6; }
2242 if eval "test \"\${$3+set}\"" = set; then :
2243   $as_echo_n "(cached) " >&6
2244 else
2245   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2246 /* end confdefs.h.  */
2247 $4
2248 #include <$2>
2249 _ACEOF
2250 if ac_fn_cxx_try_compile "$LINENO"; then :
2251   eval "$3=yes"
2252 else
2253   eval "$3=no"
2254 fi
2255 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2256 fi
2257 eval ac_res=\$$3
2258                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2259 $as_echo "$ac_res" >&6; }
2260   eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2261 
2262 } # ac_fn_cxx_check_header_compile
2263 
2264 # ac_fn_cxx_compute_int LINENO EXPR VAR INCLUDES
2265 # ----------------------------------------------
2266 # Tries to find the compile-time value of EXPR in a program that includes
2267 # INCLUDES, setting VAR accordingly. Returns whether the value could be
2268 # computed
2269 ac_fn_cxx_compute_int ()
2270 {
2271   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2272   if test "$cross_compiling" = yes; then
2273     # Depending upon the size, compute the lo and hi bounds.
2274 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2275 /* end confdefs.h.  */
2276 $4
2277 int
2278 main ()
2279 {
2280 static int test_array [1 - 2 * !(($2) >= 0)];
2281 test_array [0] = 0
2282 
2283   ;
2284   return 0;
2285 }
2286 _ACEOF
2287 if ac_fn_cxx_try_compile "$LINENO"; then :
2288   ac_lo=0 ac_mid=0
2289   while :; do
2290     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2291 /* end confdefs.h.  */
2292 $4
2293 int
2294 main ()
2295 {
2296 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2297 test_array [0] = 0
2298 
2299   ;
2300   return 0;
2301 }
2302 _ACEOF
2303 if ac_fn_cxx_try_compile "$LINENO"; then :
2304   ac_hi=$ac_mid; break
2305 else
2306   as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2307                         if test $ac_lo -le $ac_mid; then
2308                           ac_lo= ac_hi=
2309                           break
2310                         fi
2311                         as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2312 fi
2313 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2314   done
2315 else
2316   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2317 /* end confdefs.h.  */
2318 $4
2319 int
2320 main ()
2321 {
2322 static int test_array [1 - 2 * !(($2) < 0)];
2323 test_array [0] = 0
2324 
2325   ;
2326   return 0;
2327 }
2328 _ACEOF
2329 if ac_fn_cxx_try_compile "$LINENO"; then :
2330   ac_hi=-1 ac_mid=-1
2331   while :; do
2332     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2333 /* end confdefs.h.  */
2334 $4
2335 int
2336 main ()
2337 {
2338 static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2339 test_array [0] = 0
2340 
2341   ;
2342   return 0;
2343 }
2344 _ACEOF
2345 if ac_fn_cxx_try_compile "$LINENO"; then :
2346   ac_lo=$ac_mid; break
2347 else
2348   as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2349                         if test $ac_mid -le $ac_hi; then
2350                           ac_lo= ac_hi=
2351                           break
2352                         fi
2353                         as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2354 fi
2355 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2356   done
2357 else
2358   ac_lo= ac_hi=
2359 fi
2360 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2361 fi
2362 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2363 # Binary search between lo and hi bounds.
2364 while test "x$ac_lo" != "x$ac_hi"; do
2365   as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2366   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2367 /* end confdefs.h.  */
2368 $4
2369 int
2370 main ()
2371 {
2372 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2373 test_array [0] = 0
2374 
2375   ;
2376   return 0;
2377 }
2378 _ACEOF
2379 if ac_fn_cxx_try_compile "$LINENO"; then :
2380   ac_hi=$ac_mid
2381 else
2382   as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2383 fi
2384 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2385 done
2386 case $ac_lo in #((
2387 ?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2388 '') ac_retval=1 ;;
2389 esac
2390   else
2391     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2392 /* end confdefs.h.  */
2393 $4
2394 static long int longval () { return $2; }
2395 static unsigned long int ulongval () { return $2; }
2396 #include <stdio.h>
2397 #include <stdlib.h>
2398 int
2399 main ()
2400 {
2401 
2402   FILE *f = fopen ("conftest.val", "w");
2403   if (! f)
2404     return 1;
2405   if (($2) < 0)
2406     {
2407       long int i = longval ();
2408       if (i != ($2))
2409         return 1;
2410       fprintf (f, "%ld", i);
2411     }
2412   else
2413     {
2414       unsigned long int i = ulongval ();
2415       if (i != ($2))
2416         return 1;
2417       fprintf (f, "%lu", i);
2418     }
2419   /* Do not output a trailing newline, as this causes \r\n confusion
2420      on some platforms.  */
2421   return ferror (f) || fclose (f) != 0;
2422 
2423   ;
2424   return 0;
2425 }
2426 _ACEOF
2427 if ac_fn_cxx_try_run "$LINENO"; then :
2428   echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2429 else
2430   ac_retval=1
2431 fi
2432 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2433   conftest.$ac_objext conftest.beam conftest.$ac_ext
2434 rm -f conftest.val
2435 
2436   fi
2437   eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2438   as_fn_set_status $ac_retval
2439 
2440 } # ac_fn_cxx_compute_int
2441 
2442 # ac_fn_cxx_try_link LINENO
2443 # -------------------------
2444 # Try to link conftest.$ac_ext, and return whether this succeeded.
2445 ac_fn_cxx_try_link ()
2446 {
2447   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2448   rm -f conftest.$ac_objext conftest$ac_exeext
2449   if { { ac_try="$ac_link"
2450 case "(($ac_try" in
2451   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2452   *) ac_try_echo=$ac_try;;
2453 esac
2454 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2455 $as_echo "$ac_try_echo"; } >&5
2456   (eval "$ac_link") 2>conftest.err
2457   ac_status=$?
2458   if test -s conftest.err; then
2459     grep -v '^ *+' conftest.err >conftest.er1
2460     cat conftest.er1 >&5
2461     mv -f conftest.er1 conftest.err
2462   fi
2463   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2464   test $ac_status = 0; } && {
2465          test -z "$ac_cxx_werror_flag" ||
2466          test ! -s conftest.err
2467        } && test -s conftest$ac_exeext && {
2468          test "$cross_compiling" = yes ||
2469          $as_test_x conftest$ac_exeext
2470        }; then :
2471   ac_retval=0
2472 else
2473   $as_echo "$as_me: failed program was:" >&5
2474 sed 's/^/| /' conftest.$ac_ext >&5
2475 
2476         ac_retval=1
2477 fi
2478   # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2479   # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2480   # interfere with the next link command; also delete a directory that is
2481   # left behind by Apple's compiler.  We do this before executing the actions.
2482   rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2483   eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2484   as_fn_set_status $ac_retval
2485 
2486 } # ac_fn_cxx_try_link
2487 
2488 # ac_fn_cxx_check_func LINENO FUNC VAR
2489 # ------------------------------------
2490 # Tests whether FUNC exists, setting the cache variable VAR accordingly
2491 ac_fn_cxx_check_func ()
2492 {
2493   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2494   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2495 $as_echo_n "checking for $2... " >&6; }
2496 if eval "test \"\${$3+set}\"" = set; then :
2497   $as_echo_n "(cached) " >&6
2498 else
2499   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2500 /* end confdefs.h.  */
2501 /* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2502    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
2503 #define $2 innocuous_$2
2504 
2505 /* System header to define __stub macros and hopefully few prototypes,
2506     which can conflict with char $2 (); below.
2507     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2508     <limits.h> exists even on freestanding compilers.  */
2509 
2510 #ifdef __STDC__
2511 # include <limits.h>
2512 #else
2513 # include <assert.h>
2514 #endif
2515 
2516 #undef $2
2517 
2518 /* Override any GCC internal prototype to avoid an error.
2519    Use char because int might match the return type of a GCC
2520    builtin and then its argument prototype would still apply.  */
2521 #ifdef __cplusplus
2522 extern "C"
2523 #endif
2524 char $2 ();
2525 /* The GNU C library defines this for functions which it implements
2526     to always fail with ENOSYS.  Some functions are actually named
2527     something starting with __ and the normal name is an alias.  */
2528 #if defined __stub_$2 || defined __stub___$2
2529 choke me
2530 #endif
2531 
2532 int
2533 main ()
2534 {
2535 return $2 ();
2536   ;
2537   return 0;
2538 }
2539 _ACEOF
2540 if ac_fn_cxx_try_link "$LINENO"; then :
2541   eval "$3=yes"
2542 else
2543   eval "$3=no"
2544 fi
2545 rm -f core conftest.err conftest.$ac_objext \
2546     conftest$ac_exeext conftest.$ac_ext
2547 fi
2548 eval ac_res=\$$3
2549                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2550 $as_echo "$ac_res" >&6; }
2551   eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2552 
2553 } # ac_fn_cxx_check_func
2554 
2555 # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
2556 # -------------------------------------------------------
2557 # Tests whether HEADER exists and can be compiled using the include files in
2558 # INCLUDES, setting the cache variable VAR accordingly.
2559 ac_fn_c_check_header_compile ()
2560 {
2561   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2562   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2563 $as_echo_n "checking for $2... " >&6; }
2564 if eval "test \"\${$3+set}\"" = set; then :
2565   $as_echo_n "(cached) " >&6
2566 else
2567   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2568 /* end confdefs.h.  */
2569 $4
2570 #include <$2>
2571 _ACEOF
2572 if ac_fn_c_try_compile "$LINENO"; then :
2573   eval "$3=yes"
2574 else
2575   eval "$3=no"
2576 fi
2577 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2578 fi
2579 eval ac_res=\$$3
2580                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2581 $as_echo "$ac_res" >&6; }
2582   eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2583 
2584 } # ac_fn_c_check_header_compile
2585 cat >config.log <<_ACEOF
2586 This file contains any messages produced by compilers while
2587 running configure, to aid debugging if configure makes a mistake.
2588 
2589 It was created by OpenJDK $as_me jdk8, which was
2590 generated by GNU Autoconf 2.67.  Invocation command line was
2591 
2592   $ $0 $@
2593 
2594 _ACEOF
2595 exec 5>>config.log
2596 {
2597 cat <<_ASUNAME
2598 ## --------- ##
2599 ## Platform. ##
2600 ## --------- ##
2601 
2602 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2603 uname -m = `(uname -m) 2>/dev/null || echo unknown`
2604 uname -r = `(uname -r) 2>/dev/null || echo unknown`
2605 uname -s = `(uname -s) 2>/dev/null || echo unknown`
2606 uname -v = `(uname -v) 2>/dev/null || echo unknown`
2607 
2608 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2609 /bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
2610 
2611 /bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
2612 /usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
2613 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2614 /usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
2615 /bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
2616 /usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
2617 /bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
2618 
2619 _ASUNAME
2620 
2621 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2622 for as_dir in $PATH
2623 do
2624   IFS=$as_save_IFS
2625   test -z "$as_dir" && as_dir=.
2626     $as_echo "PATH: $as_dir"
2627   done
2628 IFS=$as_save_IFS
2629 
2630 } >&5
2631 
2632 cat >&5 <<_ACEOF
2633 
2634 
2635 ## ----------- ##
2636 ## Core tests. ##
2637 ## ----------- ##
2638 
2639 _ACEOF
2640 
2641 
2642 # Keep a trace of the command line.
2643 # Strip out --no-create and --no-recursion so they do not pile up.
2644 # Strip out --silent because we don't want to record it for future runs.
2645 # Also quote any args containing shell meta-characters.
2646 # Make two passes to allow for proper duplicate-argument suppression.
2647 ac_configure_args=
2648 ac_configure_args0=
2649 ac_configure_args1=
2650 ac_must_keep_next=false
2651 for ac_pass in 1 2
2652 do
2653   for ac_arg
2654   do
2655     case $ac_arg in
2656     -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2657     -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2658     | -silent | --silent | --silen | --sile | --sil)
2659       continue ;;
2660     *\'*)
2661       ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2662     esac
2663     case $ac_pass in
2664     1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2665     2)
2666       as_fn_append ac_configure_args1 " '$ac_arg'"
2667       if test $ac_must_keep_next = true; then
2668         ac_must_keep_next=false # Got value, back to normal.
2669       else
2670         case $ac_arg in
2671           *=* | --config-cache | -C | -disable-* | --disable-* \
2672           | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2673           | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2674           | -with-* | --with-* | -without-* | --without-* | --x)
2675             case "$ac_configure_args0 " in
2676               "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2677             esac
2678             ;;
2679           -* ) ac_must_keep_next=true ;;
2680         esac
2681       fi
2682       as_fn_append ac_configure_args " '$ac_arg'"
2683       ;;
2684     esac
2685   done
2686 done
2687 { ac_configure_args0=; unset ac_configure_args0;}
2688 { ac_configure_args1=; unset ac_configure_args1;}
2689 
2690 # When interrupted or exit'd, cleanup temporary files, and complete
2691 # config.log.  We remove comments because anyway the quotes in there
2692 # would cause problems or look ugly.
2693 # WARNING: Use '\'' to represent an apostrophe within the trap.
2694 # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2695 trap 'exit_status=$?
2696   # Save into config.log some information that might help in debugging.
2697   {
2698     echo
2699 
2700     $as_echo "## ---------------- ##
2701 ## Cache variables. ##
2702 ## ---------------- ##"
2703     echo
2704     # The following way of writing the cache mishandles newlines in values,
2705 (
2706   for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2707     eval ac_val=\$$ac_var
2708     case $ac_val in #(
2709     *${as_nl}*)
2710       case $ac_var in #(
2711       *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2712 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
2713       esac
2714       case $ac_var in #(
2715       _ | IFS | as_nl) ;; #(
2716       BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2717       *) { eval $ac_var=; unset $ac_var;} ;;
2718       esac ;;
2719     esac
2720   done
2721   (set) 2>&1 |
2722     case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2723     *${as_nl}ac_space=\ *)
2724       sed -n \
2725         "s/'\''/'\''\\\\'\'''\''/g;
2726           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2727       ;; #(
2728     *)
2729       sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
2730       ;;
2731     esac |
2732     sort
2733 )
2734     echo
2735 
2736     $as_echo "## ----------------- ##
2737 ## Output variables. ##
2738 ## ----------------- ##"
2739     echo
2740     for ac_var in $ac_subst_vars
2741     do
2742       eval ac_val=\$$ac_var
2743       case $ac_val in
2744       *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2745       esac
2746       $as_echo "$ac_var='\''$ac_val'\''"
2747     done | sort
2748     echo
2749 
2750     if test -n "$ac_subst_files"; then
2751       $as_echo "## ------------------- ##
2752 ## File substitutions. ##
2753 ## ------------------- ##"
2754       echo
2755       for ac_var in $ac_subst_files
2756       do
2757         eval ac_val=\$$ac_var
2758         case $ac_val in
2759         *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2760         esac
2761         $as_echo "$ac_var='\''$ac_val'\''"
2762       done | sort
2763       echo
2764     fi
2765 
2766     if test -s confdefs.h; then
2767       $as_echo "## ----------- ##
2768 ## confdefs.h. ##
2769 ## ----------- ##"
2770       echo
2771       cat confdefs.h
2772       echo
2773     fi
2774     test "$ac_signal" != 0 &&
2775       $as_echo "$as_me: caught signal $ac_signal"
2776     $as_echo "$as_me: exit $exit_status"
2777   } >&5
2778   rm -f core *.core core.conftest.* &&
2779     rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
2780     exit $exit_status
2781 ' 0
2782 for ac_signal in 1 2 13 15; do
2783   trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
2784 done
2785 ac_signal=0
2786 
2787 # confdefs.h avoids OS command line length limits that DEFS can exceed.
2788 rm -f -r conftest* confdefs.h
2789 
2790 $as_echo "/* confdefs.h */" > confdefs.h
2791 
2792 # Predefined preprocessor variables.
2793 
2794 cat >>confdefs.h <<_ACEOF
2795 #define PACKAGE_NAME "$PACKAGE_NAME"
2796 _ACEOF
2797 
2798 cat >>confdefs.h <<_ACEOF
2799 #define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2800 _ACEOF
2801 
2802 cat >>confdefs.h <<_ACEOF
2803 #define PACKAGE_VERSION "$PACKAGE_VERSION"
2804 _ACEOF
2805 
2806 cat >>confdefs.h <<_ACEOF
2807 #define PACKAGE_STRING "$PACKAGE_STRING"
2808 _ACEOF
2809 
2810 cat >>confdefs.h <<_ACEOF
2811 #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2812 _ACEOF
2813 
2814 cat >>confdefs.h <<_ACEOF
2815 #define PACKAGE_URL "$PACKAGE_URL"
2816 _ACEOF
2817 
2818 
2819 # Let the site file select an alternate cache file if it wants to.
2820 # Prefer an explicitly selected file to automatically selected ones.
2821 ac_site_file1=NONE
2822 ac_site_file2=NONE
2823 if test -n "$CONFIG_SITE"; then
2824   # We do not want a PATH search for config.site.
2825   case $CONFIG_SITE in #((
2826     -*)  ac_site_file1=./$CONFIG_SITE;;
2827     */*) ac_site_file1=$CONFIG_SITE;;
2828     *)   ac_site_file1=./$CONFIG_SITE;;
2829   esac
2830 elif test "x$prefix" != xNONE; then
2831   ac_site_file1=$prefix/share/config.site
2832   ac_site_file2=$prefix/etc/config.site
2833 else
2834   ac_site_file1=$ac_default_prefix/share/config.site
2835   ac_site_file2=$ac_default_prefix/etc/config.site
2836 fi
2837 for ac_site_file in "$ac_site_file1" "$ac_site_file2"
2838 do
2839   test "x$ac_site_file" = xNONE && continue
2840   if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2841     { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2842 $as_echo "$as_me: loading site script $ac_site_file" >&6;}
2843     sed 's/^/| /' "$ac_site_file" >&5
2844     . "$ac_site_file" \
2845       || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2846 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2847 as_fn_error $? "failed to load site script $ac_site_file
2848 See \`config.log' for more details" "$LINENO" 5 ; }
2849   fi
2850 done
2851 
2852 if test -r "$cache_file"; then
2853   # Some versions of bash will fail to source /dev/null (special files
2854   # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
2855   if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2856     { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2857 $as_echo "$as_me: loading cache $cache_file" >&6;}
2858     case $cache_file in
2859       [\\/]* | ?:[\\/]* ) . "$cache_file";;
2860       *)                      . "./$cache_file";;
2861     esac
2862   fi
2863 else
2864   { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2865 $as_echo "$as_me: creating cache $cache_file" >&6;}
2866   >$cache_file
2867 fi
2868 
2869 # Check that the precious variables saved in the cache have kept the same
2870 # value.
2871 ac_cache_corrupted=false
2872 for ac_var in $ac_precious_vars; do
2873   eval ac_old_set=\$ac_cv_env_${ac_var}_set
2874   eval ac_new_set=\$ac_env_${ac_var}_set
2875   eval ac_old_val=\$ac_cv_env_${ac_var}_value
2876   eval ac_new_val=\$ac_env_${ac_var}_value
2877   case $ac_old_set,$ac_new_set in
2878     set,)
2879       { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2880 $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
2881       ac_cache_corrupted=: ;;
2882     ,set)
2883       { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2884 $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
2885       ac_cache_corrupted=: ;;
2886     ,);;
2887     *)
2888       if test "x$ac_old_val" != "x$ac_new_val"; then
2889         # differences in whitespace do not lead to failure.
2890         ac_old_val_w=`echo x $ac_old_val`
2891         ac_new_val_w=`echo x $ac_new_val`
2892         if test "$ac_old_val_w" != "$ac_new_val_w"; then
2893           { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2894 $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2895           ac_cache_corrupted=:
2896         else
2897           { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2898 $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2899           eval $ac_var=\$ac_old_val
2900         fi
2901         { $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
2902 $as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
2903         { $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
2904 $as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
2905       fi;;
2906   esac
2907   # Pass precious variables to config.status.
2908   if test "$ac_new_set" = set; then
2909     case $ac_new_val in
2910     *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
2911     *) ac_arg=$ac_var=$ac_new_val ;;
2912     esac
2913     case " $ac_configure_args " in
2914       *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
2915       *) as_fn_append ac_configure_args " '$ac_arg'" ;;
2916     esac
2917   fi
2918 done
2919 if $ac_cache_corrupted; then
2920   { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2921 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2922   { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2923 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
2924   as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
2925 fi
2926 ## -------------------- ##
2927 ## Main body of script. ##
2928 ## -------------------- ##
2929 
2930 ac_ext=c
2931 ac_cpp='$CPP $CPPFLAGS'
2932 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2933 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2934 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2935 
2936 
2937 
2938 ac_aux_dir=
2939 for ac_dir in build-aux "$srcdir"/build-aux; do
2940   if test -f "$ac_dir/install-sh"; then
2941     ac_aux_dir=$ac_dir
2942     ac_install_sh="$ac_aux_dir/install-sh -c"
2943     break
2944   elif test -f "$ac_dir/install.sh"; then
2945     ac_aux_dir=$ac_dir
2946     ac_install_sh="$ac_aux_dir/install.sh -c"
2947     break
2948   elif test -f "$ac_dir/shtool"; then
2949     ac_aux_dir=$ac_dir
2950     ac_install_sh="$ac_aux_dir/shtool install -c"
2951     break
2952   fi
2953 done
2954 if test -z "$ac_aux_dir"; then
2955   as_fn_error $? "cannot find install-sh, install.sh, or shtool in build-aux \"$srcdir\"/build-aux" "$LINENO" 5
2956 fi
2957 
2958 # These three variables are undocumented and unsupported,
2959 # and are intended to be withdrawn in a future Autoconf release.
2960 # They can cause serious problems if a builder's source tree is in a directory
2961 # whose full name contains unusual characters.
2962 ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
2963 ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
2964 ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
2965 
2966 
2967 # pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
2968 
2969 #
2970 # Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
2971 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
2972 #
2973 # This code is free software; you can redistribute it and/or modify it
2974 # under the terms of the GNU General Public License version 2 only, as
2975 # published by the Free Software Foundation.  Oracle designates this
2976 # particular file as subject to the "Classpath" exception as provided
2977 # by Oracle in the LICENSE file that accompanied this code.
2978 #
2979 # This code is distributed in the hope that it will be useful, but WITHOUT
2980 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
2981 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
2982 # version 2 for more details (a copy is included in the LICENSE file that
2983 # accompanied this code).
2984 #
2985 # You should have received a copy of the GNU General Public License version
2986 # 2 along with this work; if not, write to the Free Software Foundation,
2987 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
2988 #
2989 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
2990 # or visit www.oracle.com if you need additional information or have any
2991 # questions.
2992 #
2993 
2994 #
2995 # Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
2996 #
2997 # This program is free software; you can redistribute it and/or modify
2998 # it under the terms of the GNU General Public License as published by
2999 # the Free Software Foundation; either version 2 of the License, or
3000 # (at your option) any later version.
3001 #
3002 # This program is distributed in the hope that it will be useful, but
3003 # WITHOUT ANY WARRANTY; without even the implied warranty of
3004 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
3005 # General Public License for more details.
3006 #
3007 # You should have received a copy of the GNU General Public License
3008 # along with this program; if not, write to the Free Software
3009 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
3010 #
3011 # As a special exception to the GNU General Public License, if you
3012 # distribute this file as part of a program that contains a
3013 # configuration script generated by Autoconf, you may include it under
3014 # the same distribution terms that you use for the rest of that program.
3015 
3016 # PKG_PROG_PKG_CONFIG([MIN-VERSION])
3017 # ----------------------------------
3018 # PKG_PROG_PKG_CONFIG
3019 
3020 # PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
3021 #
3022 # Check to see whether a particular set of modules exists.  Similar
3023 # to PKG_CHECK_MODULES(), but does not set variables or print errors.
3024 #
3025 #
3026 # Similar to PKG_CHECK_MODULES, make sure that the first instance of
3027 # this or PKG_CHECK_MODULES is called, or make sure to call
3028 # PKG_CHECK_EXISTS manually
3029 # --------------------------------------------------------------
3030 
3031 
3032 
3033 # _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
3034 # ---------------------------------------------
3035 # _PKG_CONFIG
3036 
3037 # _PKG_SHORT_ERRORS_SUPPORTED
3038 # -----------------------------
3039 # _PKG_SHORT_ERRORS_SUPPORTED
3040 
3041 
3042 # PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
3043 # [ACTION-IF-NOT-FOUND])
3044 #
3045 #
3046 # Note that if there is a possibility the first call to
3047 # PKG_CHECK_MODULES might not happen, you should be sure to include an
3048 # explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
3049 #
3050 #
3051 # --------------------------------------------------------------
3052 # PKG_CHECK_MODULES
3053 
3054 
3055 # Include these first...
3056 #
3057 # Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
3058 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3059 #
3060 # This code is free software; you can redistribute it and/or modify it
3061 # under the terms of the GNU General Public License version 2 only, as
3062 # published by the Free Software Foundation.  Oracle designates this
3063 # particular file as subject to the "Classpath" exception as provided
3064 # by Oracle in the LICENSE file that accompanied this code.
3065 #
3066 # This code is distributed in the hope that it will be useful, but WITHOUT
3067 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3068 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3069 # version 2 for more details (a copy is included in the LICENSE file that
3070 # accompanied this code).
3071 #
3072 # You should have received a copy of the GNU General Public License version
3073 # 2 along with this work; if not, write to the Free Software Foundation,
3074 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3075 #
3076 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3077 # or visit www.oracle.com if you need additional information or have any
3078 # questions.
3079 #
3080 
3081 # Test if $1 is a valid argument to $3 (often is $JAVA passed as $3)
3082 # If so, then append $1 to $2\
3083 # Also set JVM_ARG_OK to true/false depending on outcome.
3084 
3085 
3086 # This will make sure the given variable points to a full and proper
3087 # path. This means:
3088 # 1) There will be no spaces in the path. On posix platforms,
3089 #    spaces in the path will result in an error. On Windows,
3090 #    the path will be rewritten using short-style to be space-free.
3091 # 2) The path will be absolute, and it will be in unix-style (on
3092 #     cygwin).
3093 # $1: The name of the variable to fix
3094 
3095 
3096 # This will make sure the given variable points to a executable
3097 # with a full and proper path. This means:
3098 # 1) There will be no spaces in the path. On posix platforms,
3099 #    spaces in the path will result in an error. On Windows,
3100 #    the path will be rewritten using short-style to be space-free.
3101 # 2) The path will be absolute, and it will be in unix-style (on
3102 #     cygwin).
3103 # Any arguments given to the executable is preserved.
3104 # If the input variable does not have a directory specification, then
3105 # it need to be in the PATH.
3106 # $1: The name of the variable to fix
3107 
3108 
3109 
3110 
3111 
3112 
3113 # Test that variable $1 denoting a program is not empty. If empty, exit with an error.
3114 # $1: variable to check
3115 # $2: executable name to print in warning (optional)
3116 
3117 
3118 # Does AC_PATH_PROG followed by BASIC_CHECK_NONEMPTY.
3119 # Arguments as AC_PATH_PROG:
3120 # $1: variable to set
3121 # $2: executable name to look for
3122 
3123 
3124 # Setup the most fundamental tools that relies on not much else to set up,
3125 # but is used by much of the early bootstrap code.
3126 
3127 
3128 # Setup basic configuration paths, and platform-specific stuff related to PATHs.
3129 
3130 
3131 
3132 
3133 
3134 
3135 
3136 #%%% Simple tools %%%
3137 
3138 # Check if we have found a usable version of make
3139 # $1: the path to a potential make binary (or empty)
3140 # $2: the description on how we found this
3141 
3142 
3143 # Goes looking for a usable version of GNU make.
3144 
3145 
3146 
3147 
3148 
3149 
3150 # Check if build directory is on local disk. If not possible to determine,
3151 # we prefer to claim it's local.
3152 # Argument 1: directory to test
3153 # Argument 2: what to do if it is on local disk
3154 # Argument 3: what to do otherwise (remote disk or failure)
3155 
3156 
3157 # Check that source files have basic read permissions set. This might
3158 # not be the case in cygwin in certain conditions.
3159 
3160 
3161 
3162 
3163 #
3164 # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3165 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3166 #
3167 # This code is free software; you can redistribute it and/or modify it
3168 # under the terms of the GNU General Public License version 2 only, as
3169 # published by the Free Software Foundation.  Oracle designates this
3170 # particular file as subject to the "Classpath" exception as provided
3171 # by Oracle in the LICENSE file that accompanied this code.
3172 #
3173 # This code is distributed in the hope that it will be useful, but WITHOUT
3174 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3175 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3176 # version 2 for more details (a copy is included in the LICENSE file that
3177 # accompanied this code).
3178 #
3179 # You should have received a copy of the GNU General Public License version
3180 # 2 along with this work; if not, write to the Free Software Foundation,
3181 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3182 #
3183 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3184 # or visit www.oracle.com if you need additional information or have any
3185 # questions.
3186 #
3187 
3188 
3189 
3190 
3191 
3192 # Helper function which possibly converts a path using DOS-style short mode.
3193 # If so, the updated path is stored in $new_path.
3194 # $1: The path to check
3195 
3196 
3197 # Helper function which possibly converts a path using DOS-style short mode.
3198 # If so, the updated path is stored in $new_path.
3199 # $1: The path to check
3200 
3201 
3202 # FIXME: The BASIC_FIXUP_*_CYGWIN/MSYS is most likely too convoluted
3203 # and could probably be heavily simplified. However, all changes in this
3204 # area tend to need lot of testing in different scenarios, and in lack of
3205 # proper unit testing, cleaning this up has not been deemed worth the effort
3206 # at the moment.
3207 
3208 
3209 
3210 
3211 
3212 
3213 
3214 
3215 
3216 # Setup basic configuration paths, and platform-specific stuff related to PATHs.
3217 
3218 
3219 
3220 
3221 #
3222 # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3223 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3224 #
3225 # This code is free software; you can redistribute it and/or modify it
3226 # under the terms of the GNU General Public License version 2 only, as
3227 # published by the Free Software Foundation.  Oracle designates this
3228 # particular file as subject to the "Classpath" exception as provided
3229 # by Oracle in the LICENSE file that accompanied this code.
3230 #
3231 # This code is distributed in the hope that it will be useful, but WITHOUT
3232 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3233 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3234 # version 2 for more details (a copy is included in the LICENSE file that
3235 # accompanied this code).
3236 #
3237 # You should have received a copy of the GNU General Public License version
3238 # 2 along with this work; if not, write to the Free Software Foundation,
3239 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3240 #
3241 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3242 # or visit www.oracle.com if you need additional information or have any
3243 # questions.
3244 #
3245 
3246 
3247 
3248 
3249 
3250 
3251 
3252 
3253 
3254 
3255 
3256 # ... then the rest
3257 #
3258 # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3259 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3260 #
3261 # This code is free software; you can redistribute it and/or modify it
3262 # under the terms of the GNU General Public License version 2 only, as
3263 # published by the Free Software Foundation.  Oracle designates this
3264 # particular file as subject to the "Classpath" exception as provided
3265 # by Oracle in the LICENSE file that accompanied this code.
3266 #
3267 # This code is distributed in the hope that it will be useful, but WITHOUT
3268 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3269 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3270 # version 2 for more details (a copy is included in the LICENSE file that
3271 # accompanied this code).
3272 #
3273 # You should have received a copy of the GNU General Public License version
3274 # 2 along with this work; if not, write to the Free Software Foundation,
3275 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3276 #
3277 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3278 # or visit www.oracle.com if you need additional information or have any
3279 # questions.
3280 #
3281 
3282 # Execute the check given as argument, and verify the result
3283 # If the Boot JDK was previously found, do nothing
3284 # $1 A command line (typically autoconf macro) to execute
3285 
3286 
3287 # Test: Is bootjdk explicitely set by command line arguments?
3288 
3289 
3290 # Test: Is bootjdk available from builddeps?
3291 
3292 
3293 # Test: Is $JAVA_HOME set?
3294 
3295 
3296 # Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
3297 
3298 
3299 # Test: Is there a /usr/libexec/java_home? (Typically on MacOSX)
3300 
3301 
3302 # Look for a jdk in the given path. If there are multiple, try to select the newest.
3303 # If found, set BOOT_JDK and BOOT_JDK_FOUND.
3304 # $1 = Path to directory containing jdk installations.
3305 # $2 = String to append to the found JDK directory to get the proper JDK home
3306 
3307 
3308 # Call BOOTJDK_FIND_BEST_JDK_IN_DIRECTORY, but use the given
3309 # environmental variable as base for where to look.
3310 # $1 Name of an environmal variable, assumed to point to the Program Files directory.
3311 
3312 
3313 # Test: Is there a JDK installed in default, well-known locations?
3314 
3315 
3316 # Check that a command-line tool in the Boot JDK is correct
3317 # $1 = name of variable to assign
3318 # $2 = name of binary
3319 
3320 
3321 ###############################################################################
3322 #
3323 # We need a Boot JDK to bootstrap the build.
3324 #
3325 
3326 
3327 
3328 
3329 
3330 #
3331 # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3332 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3333 #
3334 # This code is free software; you can redistribute it and/or modify it
3335 # under the terms of the GNU General Public License version 2 only, as
3336 # published by the Free Software Foundation.  Oracle designates this
3337 # particular file as subject to the "Classpath" exception as provided
3338 # by Oracle in the LICENSE file that accompanied this code.
3339 #
3340 # This code is distributed in the hope that it will be useful, but WITHOUT
3341 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3342 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3343 # version 2 for more details (a copy is included in the LICENSE file that
3344 # accompanied this code).
3345 #
3346 # You should have received a copy of the GNU General Public License version
3347 # 2 along with this work; if not, write to the Free Software Foundation,
3348 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3349 #
3350 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3351 # or visit www.oracle.com if you need additional information or have any
3352 # questions.
3353 #
3354 
3355 
3356 
3357 
3358 
3359 
3360 
3361 
3362 
3363 
3364 
3365 
3366 
3367 
3368 
3369 
3370 
3371 
3372 
3373 
3374 #
3375 # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3376 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3377 #
3378 # This code is free software; you can redistribute it and/or modify it
3379 # under the terms of the GNU General Public License version 2 only, as
3380 # published by the Free Software Foundation.  Oracle designates this
3381 # particular file as subject to the "Classpath" exception as provided
3382 # by Oracle in the LICENSE file that accompanied this code.
3383 #
3384 # This code is distributed in the hope that it will be useful, but WITHOUT
3385 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3386 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3387 # version 2 for more details (a copy is included in the LICENSE file that
3388 # accompanied this code).
3389 #
3390 # You should have received a copy of the GNU General Public License version
3391 # 2 along with this work; if not, write to the Free Software Foundation,
3392 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3393 #
3394 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3395 # or visit www.oracle.com if you need additional information or have any
3396 # questions.
3397 #
3398 
3399 
3400 
3401 
3402 
3403 cygwin_help() {
3404     case $1 in
3405     unzip)
3406         PKGHANDLER_COMMAND="cd <location of cygwin setup.exe> && cmd /c setup -q -P unzip" ;;
3407     zip)
3408         PKGHANDLER_COMMAND="cd <location of cygwin setup.exe> && cmd /c setup -q -P zip" ;;
3409     make)
3410         PKGHANDLER_COMMAND="cd <location of cygwin setup.exe> && cmd /c setup -q -P make" ;;
3411     * )
3412        break ;;
3413     esac
3414 }
3415 
3416 apt_help() {
3417     case $1 in
3418     devkit)
3419         PKGHANDLER_COMMAND="sudo apt-get install build-essential" ;;
3420     openjdk)
3421         PKGHANDLER_COMMAND="sudo apt-get install openjdk-7-jdk" ;;
3422     alsa)
3423         PKGHANDLER_COMMAND="sudo apt-get install libasound2-dev" ;;
3424     cups)
3425         PKGHANDLER_COMMAND="sudo apt-get install libcups2-dev" ;;
3426     freetype2)
3427         PKGHANDLER_COMMAND="sudo apt-get install libfreetype6-dev" ;;
3428     pulse)
3429         PKGHANDLER_COMMAND="sudo apt-get install libpulse-dev" ;;
3430     x11)
3431         PKGHANDLER_COMMAND="sudo apt-get install libX11-dev libxext-dev libxrender-dev libxtst-dev" ;;
3432     ccache)
3433         PKGHANDLER_COMMAND="sudo apt-get install ccache" ;;
3434     * )
3435        break ;;
3436     esac
3437 }
3438 
3439 yum_help() {
3440     case $1 in
3441     devkit)
3442         PKGHANDLER_COMMAND="sudo yum groupinstall \"Development Tools\"" ;;
3443     openjdk)
3444         PKGHANDLER_COMMAND="sudo yum install java-1.7.0-openjdk" ;;
3445     alsa)
3446         PKGHANDLER_COMMAND="sudo yum install alsa-lib-devel" ;;
3447     cups)
3448         PKGHANDLER_COMMAND="sudo yum install cups-devel" ;;
3449     freetype2)
3450         PKGHANDLER_COMMAND="sudo yum install freetype2-devel" ;;
3451     pulse)
3452         PKGHANDLER_COMMAND="sudo yum install pulseaudio-libs-devel" ;;
3453     x11)
3454         PKGHANDLER_COMMAND="sudo yum install libXtst-devel" ;;
3455     ccache)
3456         PKGHANDLER_COMMAND="sudo yum install ccache" ;;
3457     * )
3458        break ;;
3459     esac
3460 }
3461 
3462 port_help() {
3463     PKGHANDLER_COMMAND=""
3464 }
3465 
3466 pkgutil_help() {
3467     PKGHANDLER_COMMAND=""
3468 }
3469 
3470 pkgadd_help() {
3471     PKGHANDLER_COMMAND=""
3472 }
3473 
3474 
3475 
3476 #
3477 # Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
3478 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3479 #
3480 # This code is free software; you can redistribute it and/or modify it
3481 # under the terms of the GNU General Public License version 2 only, as
3482 # published by the Free Software Foundation.  Oracle designates this
3483 # particular file as subject to the "Classpath" exception as provided
3484 # by Oracle in the LICENSE file that accompanied this code.
3485 #
3486 # This code is distributed in the hope that it will be useful, but WITHOUT
3487 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3488 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3489 # version 2 for more details (a copy is included in the LICENSE file that
3490 # accompanied this code).
3491 #
3492 # You should have received a copy of the GNU General Public License version
3493 # 2 along with this work; if not, write to the Free Software Foundation,
3494 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3495 #
3496 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3497 # or visit www.oracle.com if you need additional information or have any
3498 # questions.
3499 #
3500 
3501 
3502 
3503 
3504 
3505 
3506 
3507 
3508 ###############################################################################
3509 #
3510 # Should we build only OpenJDK even if closed sources are present?
3511 #
3512 
3513 
3514 
3515 
3516 ###############################################################################
3517 #
3518 # Setup version numbers
3519 #
3520 
3521 
3522 
3523 
3524 
3525 
3526 # Support for customization of the build process. Some build files
3527 # will include counterparts from this location, if they exist. This allows
3528 # for a degree of customization of the build targets and the rules/recipes
3529 # to create them
3530 
3531 # Check whether --with-custom-make-dir was given.
3532 if test "${with_custom_make_dir+set}" = set; then :
3533   withval=$with_custom_make_dir; CUSTOM_MAKE_DIR=$with_custom_make_dir
3534 fi
3535 
3536 
3537 
3538 #
3539 # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3540 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3541 #
3542 # This code is free software; you can redistribute it and/or modify it
3543 # under the terms of the GNU General Public License version 2 only, as
3544 # published by the Free Software Foundation.  Oracle designates this
3545 # particular file as subject to the "Classpath" exception as provided
3546 # by Oracle in the LICENSE file that accompanied this code.
3547 #
3548 # This code is distributed in the hope that it will be useful, but WITHOUT
3549 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3550 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3551 # version 2 for more details (a copy is included in the LICENSE file that
3552 # accompanied this code).
3553 #
3554 # You should have received a copy of the GNU General Public License version
3555 # 2 along with this work; if not, write to the Free Software Foundation,
3556 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3557 #
3558 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3559 # or visit www.oracle.com if you need additional information or have any
3560 # questions.
3561 #
3562 
3563 
3564 
3565 
3566 
3567 
3568 
3569 
3570 
3571 
3572 
3573 
3574 
3575 
3576 
3577 #
3578 # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3579 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3580 #
3581 # This code is free software; you can redistribute it and/or modify it
3582 # under the terms of the GNU General Public License version 2 only, as
3583 # published by the Free Software Foundation.  Oracle designates this
3584 # particular file as subject to the "Classpath" exception as provided
3585 # by Oracle in the LICENSE file that accompanied this code.
3586 #
3587 # This code is distributed in the hope that it will be useful, but WITHOUT
3588 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3589 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3590 # version 2 for more details (a copy is included in the LICENSE file that
3591 # accompanied this code).
3592 #
3593 # You should have received a copy of the GNU General Public License version
3594 # 2 along with this work; if not, write to the Free Software Foundation,
3595 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3596 #
3597 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3598 # or visit www.oracle.com if you need additional information or have any
3599 # questions.
3600 #
3601 
3602 # Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
3603 # Converts autoconf style CPU name to OpenJDK style, into
3604 # VAR_CPU, VAR_CPU_ARCH, VAR_CPU_BITS and VAR_CPU_ENDIAN.
3605 
3606 
3607 # Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
3608 # Converts autoconf style OS name to OpenJDK style, into
3609 # VAR_OS and VAR_OS_API.
3610 
3611 
3612 # Expects $host_os $host_cpu $build_os and $build_cpu
3613 # and $with_target_bits to have been setup!
3614 #
3615 # Translate the standard triplet(quadruplet) definition
3616 # of the target/build system into OPENJDK_TARGET_OS, OPENJDK_TARGET_CPU,
3617 # OPENJDK_BUILD_OS, etc.
3618 
3619 
3620 # Check if a reduced build (32-bit on 64-bit platforms) is requested, and modify behaviour
3621 # accordingly. Must be done after setting up build and target system, but before
3622 # doing anything else with these values.
3623 
3624 
3625     # Setup the legacy variables, for controlling the old makefiles.
3626     #
3627 
3628 
3629 
3630 
3631 #%%% Build and target systems %%%
3632 
3633 
3634 
3635 
3636 # Support macro for PLATFORM_SETUP_OPENJDK_TARGET_BITS.
3637 # Add -mX to various FLAGS variables.
3638 
3639 
3640 
3641 
3642 
3643 
3644 #
3645 # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3646 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3647 #
3648 # This code is free software; you can redistribute it and/or modify it
3649 # under the terms of the GNU General Public License version 2 only, as
3650 # published by the Free Software Foundation.  Oracle designates this
3651 # particular file as subject to the "Classpath" exception as provided
3652 # by Oracle in the LICENSE file that accompanied this code.
3653 #
3654 # This code is distributed in the hope that it will be useful, but WITHOUT
3655 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3656 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3657 # version 2 for more details (a copy is included in the LICENSE file that
3658 # accompanied this code).
3659 #
3660 # You should have received a copy of the GNU General Public License version
3661 # 2 along with this work; if not, write to the Free Software Foundation,
3662 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3663 #
3664 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3665 # or visit www.oracle.com if you need additional information or have any
3666 # questions.
3667 #
3668 
3669 
3670 
3671 
3672 
3673 
3674 
3675 
3676 #
3677 # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3678 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3679 #
3680 # This code is free software; you can redistribute it and/or modify it
3681 # under the terms of the GNU General Public License version 2 only, as
3682 # published by the Free Software Foundation.  Oracle designates this
3683 # particular file as subject to the "Classpath" exception as provided
3684 # by Oracle in the LICENSE file that accompanied this code.
3685 #
3686 # This code is distributed in the hope that it will be useful, but WITHOUT
3687 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3688 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3689 # version 2 for more details (a copy is included in the LICENSE file that
3690 # accompanied this code).
3691 #
3692 # You should have received a copy of the GNU General Public License version
3693 # 2 along with this work; if not, write to the Free Software Foundation,
3694 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3695 #
3696 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3697 # or visit www.oracle.com if you need additional information or have any
3698 # questions.
3699 #
3700 
3701 # $1 = compiler to test (CC or CXX)
3702 # $2 = human readable name of compiler (C or C++)
3703 
3704 
3705 
3706 
3707 
3708 # $1 = compiler to test (CC or CXX)
3709 # $2 = human readable name of compiler (C or C++)
3710 # $3 = list of compiler names to search for
3711 
3712 
3713 
3714 
3715 
3716 
3717 
3718 
3719 
3720 
3721 
3722 
3723 
3724 # TOOLCHAIN_COMPILER_CHECK_ARGUMENTS([ARGUMENT], [RUN-IF-TRUE],
3725 #                                   [RUN-IF-FALSE])
3726 # ------------------------------------------------------------
3727 # Check that the c and c++ compilers support an argument
3728 
3729 
3730 
3731 
3732 # Setup the JTREG paths
3733 
3734 
3735 #
3736 # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3737 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3738 #
3739 # This code is free software; you can redistribute it and/or modify it
3740 # under the terms of the GNU General Public License version 2 only, as
3741 # published by the Free Software Foundation.  Oracle designates this
3742 # particular file as subject to the "Classpath" exception as provided
3743 # by Oracle in the LICENSE file that accompanied this code.
3744 #
3745 # This code is distributed in the hope that it will be useful, but WITHOUT
3746 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3747 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3748 # version 2 for more details (a copy is included in the LICENSE file that
3749 # accompanied this code).
3750 #
3751 # You should have received a copy of the GNU General Public License version
3752 # 2 along with this work; if not, write to the Free Software Foundation,
3753 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3754 #
3755 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3756 # or visit www.oracle.com if you need additional information or have any
3757 # questions.
3758 #
3759 
3760 
3761 
3762 
3763 
3764 
3765 
3766 # Check if the VS env variables were setup prior to running configure.
3767 # If not, then find vcvarsall.bat and run it automatically, and integrate
3768 # the set env variables into the spec file.
3769 
3770 
3771 
3772 # Setup the DXSDK paths
3773 
3774 
3775 
3776 
3777 
3778 
3779 # This line needs to be here, verbatim, after all includes and the dummy hook
3780 # definitions. It is replaced with custom functionality when building
3781 # custom sources.
3782 #CUSTOM_AUTOCONF_INCLUDE
3783 
3784 # Do not change or remove the following line, it is needed for consistency checks:
3785 DATE_WHEN_GENERATED=1370334570
3786 
3787 ###############################################################################
3788 #
3789 # Initialization / Boot-strapping
3790 #
3791 # The bootstrapping process needs to solve the "chicken or the egg" problem,
3792 # thus it jumps back and forth, each time gaining something needed later on.
3793 #
3794 ###############################################################################
3795 
3796 # Basic initialization that must happen first of all
3797 
3798 # Save the original command line. This is passed to us by the wrapper configure script.
3799 
3800 DATE_WHEN_CONFIGURED=`LANG=C date`
3801 
3802 { $as_echo "$as_me:${as_lineno-$LINENO}: Configuration created at $DATE_WHEN_CONFIGURED." >&5
3803 $as_echo "$as_me: Configuration created at $DATE_WHEN_CONFIGURED." >&6;}
3804 { $as_echo "$as_me:${as_lineno-$LINENO}: configure script generated at timestamp $DATE_WHEN_GENERATED." >&5
3805 $as_echo "$as_me: configure script generated at timestamp $DATE_WHEN_GENERATED." >&6;}
3806 
3807 
3808 
3809 # Start with tools that do not need have cross compilation support
3810 # and can be expected to be found in the default PATH. These tools are
3811 # used by configure. Nor are these tools expected to be found in the
3812 # devkit from the builddeps server either, since they are
3813 # needed to download the devkit.
3814 
3815 # First are all the simple required tools.
3816 
3817     for ac_prog in basename
3818 do
3819   # Extract the first word of "$ac_prog", so it can be a program name with args.
3820 set dummy $ac_prog; ac_word=$2
3821 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3822 $as_echo_n "checking for $ac_word... " >&6; }
3823 if test "${ac_cv_path_BASENAME+set}" = set; then :
3824   $as_echo_n "(cached) " >&6
3825 else
3826   case $BASENAME in
3827   [\\/]* | ?:[\\/]*)
3828   ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
3829   ;;
3830   *)
3831   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3832 for as_dir in $PATH
3833 do
3834   IFS=$as_save_IFS
3835   test -z "$as_dir" && as_dir=.
3836     for ac_exec_ext in '' $ac_executable_extensions; do
3837   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3838     ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
3839     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3840     break 2
3841   fi
3842 done
3843   done
3844 IFS=$as_save_IFS
3845 
3846   ;;
3847 esac
3848 fi
3849 BASENAME=$ac_cv_path_BASENAME
3850 if test -n "$BASENAME"; then
3851   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
3852 $as_echo "$BASENAME" >&6; }
3853 else
3854   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3855 $as_echo "no" >&6; }
3856 fi
3857 
3858 
3859   test -n "$BASENAME" && break
3860 done
3861 
3862 
3863     if test "x$BASENAME" = x; then
3864         if test "xbasename" = x; then
3865           PROG_NAME=basename
3866         else
3867           PROG_NAME=basename
3868         fi
3869         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
3870 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
3871         as_fn_error $? "Cannot continue" "$LINENO" 5
3872     fi
3873 
3874 
3875 
3876     for ac_prog in bash
3877 do
3878   # Extract the first word of "$ac_prog", so it can be a program name with args.
3879 set dummy $ac_prog; ac_word=$2
3880 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3881 $as_echo_n "checking for $ac_word... " >&6; }
3882 if test "${ac_cv_path_BASH+set}" = set; then :
3883   $as_echo_n "(cached) " >&6
3884 else
3885   case $BASH in
3886   [\\/]* | ?:[\\/]*)
3887   ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
3888   ;;
3889   *)
3890   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3891 for as_dir in $PATH
3892 do
3893   IFS=$as_save_IFS
3894   test -z "$as_dir" && as_dir=.
3895     for ac_exec_ext in '' $ac_executable_extensions; do
3896   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3897     ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
3898     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3899     break 2
3900   fi
3901 done
3902   done
3903 IFS=$as_save_IFS
3904 
3905   ;;
3906 esac
3907 fi
3908 BASH=$ac_cv_path_BASH
3909 if test -n "$BASH"; then
3910   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
3911 $as_echo "$BASH" >&6; }
3912 else
3913   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3914 $as_echo "no" >&6; }
3915 fi
3916 
3917 
3918   test -n "$BASH" && break
3919 done
3920 
3921 
3922     if test "x$BASH" = x; then
3923         if test "xbash" = x; then
3924           PROG_NAME=bash
3925         else
3926           PROG_NAME=bash
3927         fi
3928         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
3929 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
3930         as_fn_error $? "Cannot continue" "$LINENO" 5
3931     fi
3932 
3933 
3934 
3935     for ac_prog in cat
3936 do
3937   # Extract the first word of "$ac_prog", so it can be a program name with args.
3938 set dummy $ac_prog; ac_word=$2
3939 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3940 $as_echo_n "checking for $ac_word... " >&6; }
3941 if test "${ac_cv_path_CAT+set}" = set; then :
3942   $as_echo_n "(cached) " >&6
3943 else
3944   case $CAT in
3945   [\\/]* | ?:[\\/]*)
3946   ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
3947   ;;
3948   *)
3949   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3950 for as_dir in $PATH
3951 do
3952   IFS=$as_save_IFS
3953   test -z "$as_dir" && as_dir=.
3954     for ac_exec_ext in '' $ac_executable_extensions; do
3955   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3956     ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
3957     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3958     break 2
3959   fi
3960 done
3961   done
3962 IFS=$as_save_IFS
3963 
3964   ;;
3965 esac
3966 fi
3967 CAT=$ac_cv_path_CAT
3968 if test -n "$CAT"; then
3969   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
3970 $as_echo "$CAT" >&6; }
3971 else
3972   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3973 $as_echo "no" >&6; }
3974 fi
3975 
3976 
3977   test -n "$CAT" && break
3978 done
3979 
3980 
3981     if test "x$CAT" = x; then
3982         if test "xcat" = x; then
3983           PROG_NAME=cat
3984         else
3985           PROG_NAME=cat
3986         fi
3987         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
3988 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
3989         as_fn_error $? "Cannot continue" "$LINENO" 5
3990     fi
3991 
3992 
3993 
3994     for ac_prog in chmod
3995 do
3996   # Extract the first word of "$ac_prog", so it can be a program name with args.
3997 set dummy $ac_prog; ac_word=$2
3998 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3999 $as_echo_n "checking for $ac_word... " >&6; }
4000 if test "${ac_cv_path_CHMOD+set}" = set; then :
4001   $as_echo_n "(cached) " >&6
4002 else
4003   case $CHMOD in
4004   [\\/]* | ?:[\\/]*)
4005   ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
4006   ;;
4007   *)
4008   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4009 for as_dir in $PATH
4010 do
4011   IFS=$as_save_IFS
4012   test -z "$as_dir" && as_dir=.
4013     for ac_exec_ext in '' $ac_executable_extensions; do
4014   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4015     ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
4016     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4017     break 2
4018   fi
4019 done
4020   done
4021 IFS=$as_save_IFS
4022 
4023   ;;
4024 esac
4025 fi
4026 CHMOD=$ac_cv_path_CHMOD
4027 if test -n "$CHMOD"; then
4028   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
4029 $as_echo "$CHMOD" >&6; }
4030 else
4031   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4032 $as_echo "no" >&6; }
4033 fi
4034 
4035 
4036   test -n "$CHMOD" && break
4037 done
4038 
4039 
4040     if test "x$CHMOD" = x; then
4041         if test "xchmod" = x; then
4042           PROG_NAME=chmod
4043         else
4044           PROG_NAME=chmod
4045         fi
4046         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4047 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4048         as_fn_error $? "Cannot continue" "$LINENO" 5
4049     fi
4050 
4051 
4052 
4053     for ac_prog in cmp
4054 do
4055   # Extract the first word of "$ac_prog", so it can be a program name with args.
4056 set dummy $ac_prog; ac_word=$2
4057 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4058 $as_echo_n "checking for $ac_word... " >&6; }
4059 if test "${ac_cv_path_CMP+set}" = set; then :
4060   $as_echo_n "(cached) " >&6
4061 else
4062   case $CMP in
4063   [\\/]* | ?:[\\/]*)
4064   ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
4065   ;;
4066   *)
4067   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4068 for as_dir in $PATH
4069 do
4070   IFS=$as_save_IFS
4071   test -z "$as_dir" && as_dir=.
4072     for ac_exec_ext in '' $ac_executable_extensions; do
4073   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4074     ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
4075     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4076     break 2
4077   fi
4078 done
4079   done
4080 IFS=$as_save_IFS
4081 
4082   ;;
4083 esac
4084 fi
4085 CMP=$ac_cv_path_CMP
4086 if test -n "$CMP"; then
4087   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
4088 $as_echo "$CMP" >&6; }
4089 else
4090   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4091 $as_echo "no" >&6; }
4092 fi
4093 
4094 
4095   test -n "$CMP" && break
4096 done
4097 
4098 
4099     if test "x$CMP" = x; then
4100         if test "xcmp" = x; then
4101           PROG_NAME=cmp
4102         else
4103           PROG_NAME=cmp
4104         fi
4105         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4106 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4107         as_fn_error $? "Cannot continue" "$LINENO" 5
4108     fi
4109 
4110 
4111 
4112     for ac_prog in comm
4113 do
4114   # Extract the first word of "$ac_prog", so it can be a program name with args.
4115 set dummy $ac_prog; ac_word=$2
4116 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4117 $as_echo_n "checking for $ac_word... " >&6; }
4118 if test "${ac_cv_path_COMM+set}" = set; then :
4119   $as_echo_n "(cached) " >&6
4120 else
4121   case $COMM in
4122   [\\/]* | ?:[\\/]*)
4123   ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
4124   ;;
4125   *)
4126   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4127 for as_dir in $PATH
4128 do
4129   IFS=$as_save_IFS
4130   test -z "$as_dir" && as_dir=.
4131     for ac_exec_ext in '' $ac_executable_extensions; do
4132   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4133     ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
4134     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4135     break 2
4136   fi
4137 done
4138   done
4139 IFS=$as_save_IFS
4140 
4141   ;;
4142 esac
4143 fi
4144 COMM=$ac_cv_path_COMM
4145 if test -n "$COMM"; then
4146   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
4147 $as_echo "$COMM" >&6; }
4148 else
4149   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4150 $as_echo "no" >&6; }
4151 fi
4152 
4153 
4154   test -n "$COMM" && break
4155 done
4156 
4157 
4158     if test "x$COMM" = x; then
4159         if test "xcomm" = x; then
4160           PROG_NAME=comm
4161         else
4162           PROG_NAME=comm
4163         fi
4164         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4165 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4166         as_fn_error $? "Cannot continue" "$LINENO" 5
4167     fi
4168 
4169 
4170 
4171     for ac_prog in cp
4172 do
4173   # Extract the first word of "$ac_prog", so it can be a program name with args.
4174 set dummy $ac_prog; ac_word=$2
4175 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4176 $as_echo_n "checking for $ac_word... " >&6; }
4177 if test "${ac_cv_path_CP+set}" = set; then :
4178   $as_echo_n "(cached) " >&6
4179 else
4180   case $CP in
4181   [\\/]* | ?:[\\/]*)
4182   ac_cv_path_CP="$CP" # Let the user override the test with a path.
4183   ;;
4184   *)
4185   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4186 for as_dir in $PATH
4187 do
4188   IFS=$as_save_IFS
4189   test -z "$as_dir" && as_dir=.
4190     for ac_exec_ext in '' $ac_executable_extensions; do
4191   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4192     ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
4193     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4194     break 2
4195   fi
4196 done
4197   done
4198 IFS=$as_save_IFS
4199 
4200   ;;
4201 esac
4202 fi
4203 CP=$ac_cv_path_CP
4204 if test -n "$CP"; then
4205   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
4206 $as_echo "$CP" >&6; }
4207 else
4208   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4209 $as_echo "no" >&6; }
4210 fi
4211 
4212 
4213   test -n "$CP" && break
4214 done
4215 
4216 
4217     if test "x$CP" = x; then
4218         if test "xcp" = x; then
4219           PROG_NAME=cp
4220         else
4221           PROG_NAME=cp
4222         fi
4223         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4224 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4225         as_fn_error $? "Cannot continue" "$LINENO" 5
4226     fi
4227 
4228 
4229 
4230     for ac_prog in cpio
4231 do
4232   # Extract the first word of "$ac_prog", so it can be a program name with args.
4233 set dummy $ac_prog; ac_word=$2
4234 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4235 $as_echo_n "checking for $ac_word... " >&6; }
4236 if test "${ac_cv_path_CPIO+set}" = set; then :
4237   $as_echo_n "(cached) " >&6
4238 else
4239   case $CPIO in
4240   [\\/]* | ?:[\\/]*)
4241   ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
4242   ;;
4243   *)
4244   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4245 for as_dir in $PATH
4246 do
4247   IFS=$as_save_IFS
4248   test -z "$as_dir" && as_dir=.
4249     for ac_exec_ext in '' $ac_executable_extensions; do
4250   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4251     ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
4252     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4253     break 2
4254   fi
4255 done
4256   done
4257 IFS=$as_save_IFS
4258 
4259   ;;
4260 esac
4261 fi
4262 CPIO=$ac_cv_path_CPIO
4263 if test -n "$CPIO"; then
4264   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
4265 $as_echo "$CPIO" >&6; }
4266 else
4267   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4268 $as_echo "no" >&6; }
4269 fi
4270 
4271 
4272   test -n "$CPIO" && break
4273 done
4274 
4275 
4276     if test "x$CPIO" = x; then
4277         if test "xcpio" = x; then
4278           PROG_NAME=cpio
4279         else
4280           PROG_NAME=cpio
4281         fi
4282         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4283 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4284         as_fn_error $? "Cannot continue" "$LINENO" 5
4285     fi
4286 
4287 
4288 
4289     for ac_prog in cut
4290 do
4291   # Extract the first word of "$ac_prog", so it can be a program name with args.
4292 set dummy $ac_prog; ac_word=$2
4293 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4294 $as_echo_n "checking for $ac_word... " >&6; }
4295 if test "${ac_cv_path_CUT+set}" = set; then :
4296   $as_echo_n "(cached) " >&6
4297 else
4298   case $CUT in
4299   [\\/]* | ?:[\\/]*)
4300   ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
4301   ;;
4302   *)
4303   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4304 for as_dir in $PATH
4305 do
4306   IFS=$as_save_IFS
4307   test -z "$as_dir" && as_dir=.
4308     for ac_exec_ext in '' $ac_executable_extensions; do
4309   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4310     ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
4311     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4312     break 2
4313   fi
4314 done
4315   done
4316 IFS=$as_save_IFS
4317 
4318   ;;
4319 esac
4320 fi
4321 CUT=$ac_cv_path_CUT
4322 if test -n "$CUT"; then
4323   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
4324 $as_echo "$CUT" >&6; }
4325 else
4326   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4327 $as_echo "no" >&6; }
4328 fi
4329 
4330 
4331   test -n "$CUT" && break
4332 done
4333 
4334 
4335     if test "x$CUT" = x; then
4336         if test "xcut" = x; then
4337           PROG_NAME=cut
4338         else
4339           PROG_NAME=cut
4340         fi
4341         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4342 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4343         as_fn_error $? "Cannot continue" "$LINENO" 5
4344     fi
4345 
4346 
4347 
4348     for ac_prog in date
4349 do
4350   # Extract the first word of "$ac_prog", so it can be a program name with args.
4351 set dummy $ac_prog; ac_word=$2
4352 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4353 $as_echo_n "checking for $ac_word... " >&6; }
4354 if test "${ac_cv_path_DATE+set}" = set; then :
4355   $as_echo_n "(cached) " >&6
4356 else
4357   case $DATE in
4358   [\\/]* | ?:[\\/]*)
4359   ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
4360   ;;
4361   *)
4362   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4363 for as_dir in $PATH
4364 do
4365   IFS=$as_save_IFS
4366   test -z "$as_dir" && as_dir=.
4367     for ac_exec_ext in '' $ac_executable_extensions; do
4368   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4369     ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
4370     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4371     break 2
4372   fi
4373 done
4374   done
4375 IFS=$as_save_IFS
4376 
4377   ;;
4378 esac
4379 fi
4380 DATE=$ac_cv_path_DATE
4381 if test -n "$DATE"; then
4382   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
4383 $as_echo "$DATE" >&6; }
4384 else
4385   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4386 $as_echo "no" >&6; }
4387 fi
4388 
4389 
4390   test -n "$DATE" && break
4391 done
4392 
4393 
4394     if test "x$DATE" = x; then
4395         if test "xdate" = x; then
4396           PROG_NAME=date
4397         else
4398           PROG_NAME=date
4399         fi
4400         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4401 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4402         as_fn_error $? "Cannot continue" "$LINENO" 5
4403     fi
4404 
4405 
4406 
4407     for ac_prog in gdiff diff
4408 do
4409   # Extract the first word of "$ac_prog", so it can be a program name with args.
4410 set dummy $ac_prog; ac_word=$2
4411 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4412 $as_echo_n "checking for $ac_word... " >&6; }
4413 if test "${ac_cv_path_DIFF+set}" = set; then :
4414   $as_echo_n "(cached) " >&6
4415 else
4416   case $DIFF in
4417   [\\/]* | ?:[\\/]*)
4418   ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
4419   ;;
4420   *)
4421   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4422 for as_dir in $PATH
4423 do
4424   IFS=$as_save_IFS
4425   test -z "$as_dir" && as_dir=.
4426     for ac_exec_ext in '' $ac_executable_extensions; do
4427   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4428     ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
4429     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4430     break 2
4431   fi
4432 done
4433   done
4434 IFS=$as_save_IFS
4435 
4436   ;;
4437 esac
4438 fi
4439 DIFF=$ac_cv_path_DIFF
4440 if test -n "$DIFF"; then
4441   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
4442 $as_echo "$DIFF" >&6; }
4443 else
4444   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4445 $as_echo "no" >&6; }
4446 fi
4447 
4448 
4449   test -n "$DIFF" && break
4450 done
4451 
4452 
4453     if test "x$DIFF" = x; then
4454         if test "xgdiff diff" = x; then
4455           PROG_NAME=diff
4456         else
4457           PROG_NAME=gdiff diff
4458         fi
4459         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4460 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4461         as_fn_error $? "Cannot continue" "$LINENO" 5
4462     fi
4463 
4464 
4465 
4466     for ac_prog in dirname
4467 do
4468   # Extract the first word of "$ac_prog", so it can be a program name with args.
4469 set dummy $ac_prog; ac_word=$2
4470 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4471 $as_echo_n "checking for $ac_word... " >&6; }
4472 if test "${ac_cv_path_DIRNAME+set}" = set; then :
4473   $as_echo_n "(cached) " >&6
4474 else
4475   case $DIRNAME in
4476   [\\/]* | ?:[\\/]*)
4477   ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
4478   ;;
4479   *)
4480   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4481 for as_dir in $PATH
4482 do
4483   IFS=$as_save_IFS
4484   test -z "$as_dir" && as_dir=.
4485     for ac_exec_ext in '' $ac_executable_extensions; do
4486   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4487     ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
4488     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4489     break 2
4490   fi
4491 done
4492   done
4493 IFS=$as_save_IFS
4494 
4495   ;;
4496 esac
4497 fi
4498 DIRNAME=$ac_cv_path_DIRNAME
4499 if test -n "$DIRNAME"; then
4500   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
4501 $as_echo "$DIRNAME" >&6; }
4502 else
4503   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4504 $as_echo "no" >&6; }
4505 fi
4506 
4507 
4508   test -n "$DIRNAME" && break
4509 done
4510 
4511 
4512     if test "x$DIRNAME" = x; then
4513         if test "xdirname" = x; then
4514           PROG_NAME=dirname
4515         else
4516           PROG_NAME=dirname
4517         fi
4518         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4519 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4520         as_fn_error $? "Cannot continue" "$LINENO" 5
4521     fi
4522 
4523 
4524 
4525     for ac_prog in echo
4526 do
4527   # Extract the first word of "$ac_prog", so it can be a program name with args.
4528 set dummy $ac_prog; ac_word=$2
4529 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4530 $as_echo_n "checking for $ac_word... " >&6; }
4531 if test "${ac_cv_path_ECHO+set}" = set; then :
4532   $as_echo_n "(cached) " >&6
4533 else
4534   case $ECHO in
4535   [\\/]* | ?:[\\/]*)
4536   ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
4537   ;;
4538   *)
4539   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4540 for as_dir in $PATH
4541 do
4542   IFS=$as_save_IFS
4543   test -z "$as_dir" && as_dir=.
4544     for ac_exec_ext in '' $ac_executable_extensions; do
4545   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4546     ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
4547     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4548     break 2
4549   fi
4550 done
4551   done
4552 IFS=$as_save_IFS
4553 
4554   ;;
4555 esac
4556 fi
4557 ECHO=$ac_cv_path_ECHO
4558 if test -n "$ECHO"; then
4559   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
4560 $as_echo "$ECHO" >&6; }
4561 else
4562   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4563 $as_echo "no" >&6; }
4564 fi
4565 
4566 
4567   test -n "$ECHO" && break
4568 done
4569 
4570 
4571     if test "x$ECHO" = x; then
4572         if test "xecho" = x; then
4573           PROG_NAME=echo
4574         else
4575           PROG_NAME=echo
4576         fi
4577         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4578 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4579         as_fn_error $? "Cannot continue" "$LINENO" 5
4580     fi
4581 
4582 
4583 
4584     for ac_prog in expr
4585 do
4586   # Extract the first word of "$ac_prog", so it can be a program name with args.
4587 set dummy $ac_prog; ac_word=$2
4588 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4589 $as_echo_n "checking for $ac_word... " >&6; }
4590 if test "${ac_cv_path_EXPR+set}" = set; then :
4591   $as_echo_n "(cached) " >&6
4592 else
4593   case $EXPR in
4594   [\\/]* | ?:[\\/]*)
4595   ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
4596   ;;
4597   *)
4598   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4599 for as_dir in $PATH
4600 do
4601   IFS=$as_save_IFS
4602   test -z "$as_dir" && as_dir=.
4603     for ac_exec_ext in '' $ac_executable_extensions; do
4604   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4605     ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
4606     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4607     break 2
4608   fi
4609 done
4610   done
4611 IFS=$as_save_IFS
4612 
4613   ;;
4614 esac
4615 fi
4616 EXPR=$ac_cv_path_EXPR
4617 if test -n "$EXPR"; then
4618   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
4619 $as_echo "$EXPR" >&6; }
4620 else
4621   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4622 $as_echo "no" >&6; }
4623 fi
4624 
4625 
4626   test -n "$EXPR" && break
4627 done
4628 
4629 
4630     if test "x$EXPR" = x; then
4631         if test "xexpr" = x; then
4632           PROG_NAME=expr
4633         else
4634           PROG_NAME=expr
4635         fi
4636         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4637 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4638         as_fn_error $? "Cannot continue" "$LINENO" 5
4639     fi
4640 
4641 
4642 
4643     for ac_prog in file
4644 do
4645   # Extract the first word of "$ac_prog", so it can be a program name with args.
4646 set dummy $ac_prog; ac_word=$2
4647 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4648 $as_echo_n "checking for $ac_word... " >&6; }
4649 if test "${ac_cv_path_FILE+set}" = set; then :
4650   $as_echo_n "(cached) " >&6
4651 else
4652   case $FILE in
4653   [\\/]* | ?:[\\/]*)
4654   ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
4655   ;;
4656   *)
4657   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4658 for as_dir in $PATH
4659 do
4660   IFS=$as_save_IFS
4661   test -z "$as_dir" && as_dir=.
4662     for ac_exec_ext in '' $ac_executable_extensions; do
4663   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4664     ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
4665     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4666     break 2
4667   fi
4668 done
4669   done
4670 IFS=$as_save_IFS
4671 
4672   ;;
4673 esac
4674 fi
4675 FILE=$ac_cv_path_FILE
4676 if test -n "$FILE"; then
4677   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
4678 $as_echo "$FILE" >&6; }
4679 else
4680   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4681 $as_echo "no" >&6; }
4682 fi
4683 
4684 
4685   test -n "$FILE" && break
4686 done
4687 
4688 
4689     if test "x$FILE" = x; then
4690         if test "xfile" = x; then
4691           PROG_NAME=file
4692         else
4693           PROG_NAME=file
4694         fi
4695         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4696 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4697         as_fn_error $? "Cannot continue" "$LINENO" 5
4698     fi
4699 
4700 
4701 
4702     for ac_prog in find
4703 do
4704   # Extract the first word of "$ac_prog", so it can be a program name with args.
4705 set dummy $ac_prog; ac_word=$2
4706 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4707 $as_echo_n "checking for $ac_word... " >&6; }
4708 if test "${ac_cv_path_FIND+set}" = set; then :
4709   $as_echo_n "(cached) " >&6
4710 else
4711   case $FIND in
4712   [\\/]* | ?:[\\/]*)
4713   ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
4714   ;;
4715   *)
4716   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4717 for as_dir in $PATH
4718 do
4719   IFS=$as_save_IFS
4720   test -z "$as_dir" && as_dir=.
4721     for ac_exec_ext in '' $ac_executable_extensions; do
4722   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4723     ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
4724     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4725     break 2
4726   fi
4727 done
4728   done
4729 IFS=$as_save_IFS
4730 
4731   ;;
4732 esac
4733 fi
4734 FIND=$ac_cv_path_FIND
4735 if test -n "$FIND"; then
4736   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
4737 $as_echo "$FIND" >&6; }
4738 else
4739   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4740 $as_echo "no" >&6; }
4741 fi
4742 
4743 
4744   test -n "$FIND" && break
4745 done
4746 
4747 
4748     if test "x$FIND" = x; then
4749         if test "xfind" = x; then
4750           PROG_NAME=find
4751         else
4752           PROG_NAME=find
4753         fi
4754         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4755 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4756         as_fn_error $? "Cannot continue" "$LINENO" 5
4757     fi
4758 
4759 
4760 
4761     for ac_prog in head
4762 do
4763   # Extract the first word of "$ac_prog", so it can be a program name with args.
4764 set dummy $ac_prog; ac_word=$2
4765 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4766 $as_echo_n "checking for $ac_word... " >&6; }
4767 if test "${ac_cv_path_HEAD+set}" = set; then :
4768   $as_echo_n "(cached) " >&6
4769 else
4770   case $HEAD in
4771   [\\/]* | ?:[\\/]*)
4772   ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
4773   ;;
4774   *)
4775   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4776 for as_dir in $PATH
4777 do
4778   IFS=$as_save_IFS
4779   test -z "$as_dir" && as_dir=.
4780     for ac_exec_ext in '' $ac_executable_extensions; do
4781   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4782     ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
4783     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4784     break 2
4785   fi
4786 done
4787   done
4788 IFS=$as_save_IFS
4789 
4790   ;;
4791 esac
4792 fi
4793 HEAD=$ac_cv_path_HEAD
4794 if test -n "$HEAD"; then
4795   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
4796 $as_echo "$HEAD" >&6; }
4797 else
4798   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4799 $as_echo "no" >&6; }
4800 fi
4801 
4802 
4803   test -n "$HEAD" && break
4804 done
4805 
4806 
4807     if test "x$HEAD" = x; then
4808         if test "xhead" = x; then
4809           PROG_NAME=head
4810         else
4811           PROG_NAME=head
4812         fi
4813         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4814 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4815         as_fn_error $? "Cannot continue" "$LINENO" 5
4816     fi
4817 
4818 
4819 
4820     for ac_prog in ln
4821 do
4822   # Extract the first word of "$ac_prog", so it can be a program name with args.
4823 set dummy $ac_prog; ac_word=$2
4824 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4825 $as_echo_n "checking for $ac_word... " >&6; }
4826 if test "${ac_cv_path_LN+set}" = set; then :
4827   $as_echo_n "(cached) " >&6
4828 else
4829   case $LN in
4830   [\\/]* | ?:[\\/]*)
4831   ac_cv_path_LN="$LN" # Let the user override the test with a path.
4832   ;;
4833   *)
4834   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4835 for as_dir in $PATH
4836 do
4837   IFS=$as_save_IFS
4838   test -z "$as_dir" && as_dir=.
4839     for ac_exec_ext in '' $ac_executable_extensions; do
4840   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4841     ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
4842     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4843     break 2
4844   fi
4845 done
4846   done
4847 IFS=$as_save_IFS
4848 
4849   ;;
4850 esac
4851 fi
4852 LN=$ac_cv_path_LN
4853 if test -n "$LN"; then
4854   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
4855 $as_echo "$LN" >&6; }
4856 else
4857   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4858 $as_echo "no" >&6; }
4859 fi
4860 
4861 
4862   test -n "$LN" && break
4863 done
4864 
4865 
4866     if test "x$LN" = x; then
4867         if test "xln" = x; then
4868           PROG_NAME=ln
4869         else
4870           PROG_NAME=ln
4871         fi
4872         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4873 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4874         as_fn_error $? "Cannot continue" "$LINENO" 5
4875     fi
4876 
4877 
4878 
4879     for ac_prog in ls
4880 do
4881   # Extract the first word of "$ac_prog", so it can be a program name with args.
4882 set dummy $ac_prog; ac_word=$2
4883 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4884 $as_echo_n "checking for $ac_word... " >&6; }
4885 if test "${ac_cv_path_LS+set}" = set; then :
4886   $as_echo_n "(cached) " >&6
4887 else
4888   case $LS in
4889   [\\/]* | ?:[\\/]*)
4890   ac_cv_path_LS="$LS" # Let the user override the test with a path.
4891   ;;
4892   *)
4893   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4894 for as_dir in $PATH
4895 do
4896   IFS=$as_save_IFS
4897   test -z "$as_dir" && as_dir=.
4898     for ac_exec_ext in '' $ac_executable_extensions; do
4899   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4900     ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
4901     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4902     break 2
4903   fi
4904 done
4905   done
4906 IFS=$as_save_IFS
4907 
4908   ;;
4909 esac
4910 fi
4911 LS=$ac_cv_path_LS
4912 if test -n "$LS"; then
4913   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
4914 $as_echo "$LS" >&6; }
4915 else
4916   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4917 $as_echo "no" >&6; }
4918 fi
4919 
4920 
4921   test -n "$LS" && break
4922 done
4923 
4924 
4925     if test "x$LS" = x; then
4926         if test "xls" = x; then
4927           PROG_NAME=ls
4928         else
4929           PROG_NAME=ls
4930         fi
4931         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4932 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4933         as_fn_error $? "Cannot continue" "$LINENO" 5
4934     fi
4935 
4936 
4937 
4938     for ac_prog in mkdir
4939 do
4940   # Extract the first word of "$ac_prog", so it can be a program name with args.
4941 set dummy $ac_prog; ac_word=$2
4942 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4943 $as_echo_n "checking for $ac_word... " >&6; }
4944 if test "${ac_cv_path_MKDIR+set}" = set; then :
4945   $as_echo_n "(cached) " >&6
4946 else
4947   case $MKDIR in
4948   [\\/]* | ?:[\\/]*)
4949   ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
4950   ;;
4951   *)
4952   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4953 for as_dir in $PATH
4954 do
4955   IFS=$as_save_IFS
4956   test -z "$as_dir" && as_dir=.
4957     for ac_exec_ext in '' $ac_executable_extensions; do
4958   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4959     ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
4960     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4961     break 2
4962   fi
4963 done
4964   done
4965 IFS=$as_save_IFS
4966 
4967   ;;
4968 esac
4969 fi
4970 MKDIR=$ac_cv_path_MKDIR
4971 if test -n "$MKDIR"; then
4972   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
4973 $as_echo "$MKDIR" >&6; }
4974 else
4975   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4976 $as_echo "no" >&6; }
4977 fi
4978 
4979 
4980   test -n "$MKDIR" && break
4981 done
4982 
4983 
4984     if test "x$MKDIR" = x; then
4985         if test "xmkdir" = x; then
4986           PROG_NAME=mkdir
4987         else
4988           PROG_NAME=mkdir
4989         fi
4990         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4991 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4992         as_fn_error $? "Cannot continue" "$LINENO" 5
4993     fi
4994 
4995 
4996 
4997     for ac_prog in mktemp
4998 do
4999   # Extract the first word of "$ac_prog", so it can be a program name with args.
5000 set dummy $ac_prog; ac_word=$2
5001 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5002 $as_echo_n "checking for $ac_word... " >&6; }
5003 if test "${ac_cv_path_MKTEMP+set}" = set; then :
5004   $as_echo_n "(cached) " >&6
5005 else
5006   case $MKTEMP in
5007   [\\/]* | ?:[\\/]*)
5008   ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
5009   ;;
5010   *)
5011   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5012 for as_dir in $PATH
5013 do
5014   IFS=$as_save_IFS
5015   test -z "$as_dir" && as_dir=.
5016     for ac_exec_ext in '' $ac_executable_extensions; do
5017   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5018     ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
5019     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5020     break 2
5021   fi
5022 done
5023   done
5024 IFS=$as_save_IFS
5025 
5026   ;;
5027 esac
5028 fi
5029 MKTEMP=$ac_cv_path_MKTEMP
5030 if test -n "$MKTEMP"; then
5031   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
5032 $as_echo "$MKTEMP" >&6; }
5033 else
5034   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5035 $as_echo "no" >&6; }
5036 fi
5037 
5038 
5039   test -n "$MKTEMP" && break
5040 done
5041 
5042 
5043     if test "x$MKTEMP" = x; then
5044         if test "xmktemp" = x; then
5045           PROG_NAME=mktemp
5046         else
5047           PROG_NAME=mktemp
5048         fi
5049         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5050 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5051         as_fn_error $? "Cannot continue" "$LINENO" 5
5052     fi
5053 
5054 
5055 
5056     for ac_prog in mv
5057 do
5058   # Extract the first word of "$ac_prog", so it can be a program name with args.
5059 set dummy $ac_prog; ac_word=$2
5060 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5061 $as_echo_n "checking for $ac_word... " >&6; }
5062 if test "${ac_cv_path_MV+set}" = set; then :
5063   $as_echo_n "(cached) " >&6
5064 else
5065   case $MV in
5066   [\\/]* | ?:[\\/]*)
5067   ac_cv_path_MV="$MV" # Let the user override the test with a path.
5068   ;;
5069   *)
5070   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5071 for as_dir in $PATH
5072 do
5073   IFS=$as_save_IFS
5074   test -z "$as_dir" && as_dir=.
5075     for ac_exec_ext in '' $ac_executable_extensions; do
5076   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5077     ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
5078     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5079     break 2
5080   fi
5081 done
5082   done
5083 IFS=$as_save_IFS
5084 
5085   ;;
5086 esac
5087 fi
5088 MV=$ac_cv_path_MV
5089 if test -n "$MV"; then
5090   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
5091 $as_echo "$MV" >&6; }
5092 else
5093   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5094 $as_echo "no" >&6; }
5095 fi
5096 
5097 
5098   test -n "$MV" && break
5099 done
5100 
5101 
5102     if test "x$MV" = x; then
5103         if test "xmv" = x; then
5104           PROG_NAME=mv
5105         else
5106           PROG_NAME=mv
5107         fi
5108         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5109 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5110         as_fn_error $? "Cannot continue" "$LINENO" 5
5111     fi
5112 
5113 
5114 
5115     for ac_prog in printf
5116 do
5117   # Extract the first word of "$ac_prog", so it can be a program name with args.
5118 set dummy $ac_prog; ac_word=$2
5119 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5120 $as_echo_n "checking for $ac_word... " >&6; }
5121 if test "${ac_cv_path_PRINTF+set}" = set; then :
5122   $as_echo_n "(cached) " >&6
5123 else
5124   case $PRINTF in
5125   [\\/]* | ?:[\\/]*)
5126   ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
5127   ;;
5128   *)
5129   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5130 for as_dir in $PATH
5131 do
5132   IFS=$as_save_IFS
5133   test -z "$as_dir" && as_dir=.
5134     for ac_exec_ext in '' $ac_executable_extensions; do
5135   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5136     ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
5137     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5138     break 2
5139   fi
5140 done
5141   done
5142 IFS=$as_save_IFS
5143 
5144   ;;
5145 esac
5146 fi
5147 PRINTF=$ac_cv_path_PRINTF
5148 if test -n "$PRINTF"; then
5149   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
5150 $as_echo "$PRINTF" >&6; }
5151 else
5152   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5153 $as_echo "no" >&6; }
5154 fi
5155 
5156 
5157   test -n "$PRINTF" && break
5158 done
5159 
5160 
5161     if test "x$PRINTF" = x; then
5162         if test "xprintf" = x; then
5163           PROG_NAME=printf
5164         else
5165           PROG_NAME=printf
5166         fi
5167         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5168 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5169         as_fn_error $? "Cannot continue" "$LINENO" 5
5170     fi
5171 
5172 
5173 
5174     for ac_prog in rm
5175 do
5176   # Extract the first word of "$ac_prog", so it can be a program name with args.
5177 set dummy $ac_prog; ac_word=$2
5178 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5179 $as_echo_n "checking for $ac_word... " >&6; }
5180 if test "${ac_cv_path_RM+set}" = set; then :
5181   $as_echo_n "(cached) " >&6
5182 else
5183   case $RM in
5184   [\\/]* | ?:[\\/]*)
5185   ac_cv_path_RM="$RM" # Let the user override the test with a path.
5186   ;;
5187   *)
5188   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5189 for as_dir in $PATH
5190 do
5191   IFS=$as_save_IFS
5192   test -z "$as_dir" && as_dir=.
5193     for ac_exec_ext in '' $ac_executable_extensions; do
5194   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5195     ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
5196     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5197     break 2
5198   fi
5199 done
5200   done
5201 IFS=$as_save_IFS
5202 
5203   ;;
5204 esac
5205 fi
5206 RM=$ac_cv_path_RM
5207 if test -n "$RM"; then
5208   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
5209 $as_echo "$RM" >&6; }
5210 else
5211   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5212 $as_echo "no" >&6; }
5213 fi
5214 
5215 
5216   test -n "$RM" && break
5217 done
5218 
5219 
5220     if test "x$RM" = x; then
5221         if test "xrm" = x; then
5222           PROG_NAME=rm
5223         else
5224           PROG_NAME=rm
5225         fi
5226         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5227 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5228         as_fn_error $? "Cannot continue" "$LINENO" 5
5229     fi
5230 
5231 
5232 
5233     for ac_prog in sh
5234 do
5235   # Extract the first word of "$ac_prog", so it can be a program name with args.
5236 set dummy $ac_prog; ac_word=$2
5237 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5238 $as_echo_n "checking for $ac_word... " >&6; }
5239 if test "${ac_cv_path_SH+set}" = set; then :
5240   $as_echo_n "(cached) " >&6
5241 else
5242   case $SH in
5243   [\\/]* | ?:[\\/]*)
5244   ac_cv_path_SH="$SH" # Let the user override the test with a path.
5245   ;;
5246   *)
5247   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5248 for as_dir in $PATH
5249 do
5250   IFS=$as_save_IFS
5251   test -z "$as_dir" && as_dir=.
5252     for ac_exec_ext in '' $ac_executable_extensions; do
5253   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5254     ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
5255     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5256     break 2
5257   fi
5258 done
5259   done
5260 IFS=$as_save_IFS
5261 
5262   ;;
5263 esac
5264 fi
5265 SH=$ac_cv_path_SH
5266 if test -n "$SH"; then
5267   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
5268 $as_echo "$SH" >&6; }
5269 else
5270   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5271 $as_echo "no" >&6; }
5272 fi
5273 
5274 
5275   test -n "$SH" && break
5276 done
5277 
5278 
5279     if test "x$SH" = x; then
5280         if test "xsh" = x; then
5281           PROG_NAME=sh
5282         else
5283           PROG_NAME=sh
5284         fi
5285         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5286 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5287         as_fn_error $? "Cannot continue" "$LINENO" 5
5288     fi
5289 
5290 
5291 
5292     for ac_prog in sort
5293 do
5294   # Extract the first word of "$ac_prog", so it can be a program name with args.
5295 set dummy $ac_prog; ac_word=$2
5296 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5297 $as_echo_n "checking for $ac_word... " >&6; }
5298 if test "${ac_cv_path_SORT+set}" = set; then :
5299   $as_echo_n "(cached) " >&6
5300 else
5301   case $SORT in
5302   [\\/]* | ?:[\\/]*)
5303   ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
5304   ;;
5305   *)
5306   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5307 for as_dir in $PATH
5308 do
5309   IFS=$as_save_IFS
5310   test -z "$as_dir" && as_dir=.
5311     for ac_exec_ext in '' $ac_executable_extensions; do
5312   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5313     ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
5314     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5315     break 2
5316   fi
5317 done
5318   done
5319 IFS=$as_save_IFS
5320 
5321   ;;
5322 esac
5323 fi
5324 SORT=$ac_cv_path_SORT
5325 if test -n "$SORT"; then
5326   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
5327 $as_echo "$SORT" >&6; }
5328 else
5329   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5330 $as_echo "no" >&6; }
5331 fi
5332 
5333 
5334   test -n "$SORT" && break
5335 done
5336 
5337 
5338     if test "x$SORT" = x; then
5339         if test "xsort" = x; then
5340           PROG_NAME=sort
5341         else
5342           PROG_NAME=sort
5343         fi
5344         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5345 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5346         as_fn_error $? "Cannot continue" "$LINENO" 5
5347     fi
5348 
5349 
5350 
5351     for ac_prog in tail
5352 do
5353   # Extract the first word of "$ac_prog", so it can be a program name with args.
5354 set dummy $ac_prog; ac_word=$2
5355 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5356 $as_echo_n "checking for $ac_word... " >&6; }
5357 if test "${ac_cv_path_TAIL+set}" = set; then :
5358   $as_echo_n "(cached) " >&6
5359 else
5360   case $TAIL in
5361   [\\/]* | ?:[\\/]*)
5362   ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
5363   ;;
5364   *)
5365   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5366 for as_dir in $PATH
5367 do
5368   IFS=$as_save_IFS
5369   test -z "$as_dir" && as_dir=.
5370     for ac_exec_ext in '' $ac_executable_extensions; do
5371   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5372     ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
5373     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5374     break 2
5375   fi
5376 done
5377   done
5378 IFS=$as_save_IFS
5379 
5380   ;;
5381 esac
5382 fi
5383 TAIL=$ac_cv_path_TAIL
5384 if test -n "$TAIL"; then
5385   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
5386 $as_echo "$TAIL" >&6; }
5387 else
5388   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5389 $as_echo "no" >&6; }
5390 fi
5391 
5392 
5393   test -n "$TAIL" && break
5394 done
5395 
5396 
5397     if test "x$TAIL" = x; then
5398         if test "xtail" = x; then
5399           PROG_NAME=tail
5400         else
5401           PROG_NAME=tail
5402         fi
5403         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5404 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5405         as_fn_error $? "Cannot continue" "$LINENO" 5
5406     fi
5407 
5408 
5409 
5410     for ac_prog in tar
5411 do
5412   # Extract the first word of "$ac_prog", so it can be a program name with args.
5413 set dummy $ac_prog; ac_word=$2
5414 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5415 $as_echo_n "checking for $ac_word... " >&6; }
5416 if test "${ac_cv_path_TAR+set}" = set; then :
5417   $as_echo_n "(cached) " >&6
5418 else
5419   case $TAR in
5420   [\\/]* | ?:[\\/]*)
5421   ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
5422   ;;
5423   *)
5424   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5425 for as_dir in $PATH
5426 do
5427   IFS=$as_save_IFS
5428   test -z "$as_dir" && as_dir=.
5429     for ac_exec_ext in '' $ac_executable_extensions; do
5430   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5431     ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
5432     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5433     break 2
5434   fi
5435 done
5436   done
5437 IFS=$as_save_IFS
5438 
5439   ;;
5440 esac
5441 fi
5442 TAR=$ac_cv_path_TAR
5443 if test -n "$TAR"; then
5444   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
5445 $as_echo "$TAR" >&6; }
5446 else
5447   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5448 $as_echo "no" >&6; }
5449 fi
5450 
5451 
5452   test -n "$TAR" && break
5453 done
5454 
5455 
5456     if test "x$TAR" = x; then
5457         if test "xtar" = x; then
5458           PROG_NAME=tar
5459         else
5460           PROG_NAME=tar
5461         fi
5462         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5463 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5464         as_fn_error $? "Cannot continue" "$LINENO" 5
5465     fi
5466 
5467 
5468 
5469     for ac_prog in tee
5470 do
5471   # Extract the first word of "$ac_prog", so it can be a program name with args.
5472 set dummy $ac_prog; ac_word=$2
5473 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5474 $as_echo_n "checking for $ac_word... " >&6; }
5475 if test "${ac_cv_path_TEE+set}" = set; then :
5476   $as_echo_n "(cached) " >&6
5477 else
5478   case $TEE in
5479   [\\/]* | ?:[\\/]*)
5480   ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
5481   ;;
5482   *)
5483   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5484 for as_dir in $PATH
5485 do
5486   IFS=$as_save_IFS
5487   test -z "$as_dir" && as_dir=.
5488     for ac_exec_ext in '' $ac_executable_extensions; do
5489   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5490     ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
5491     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5492     break 2
5493   fi
5494 done
5495   done
5496 IFS=$as_save_IFS
5497 
5498   ;;
5499 esac
5500 fi
5501 TEE=$ac_cv_path_TEE
5502 if test -n "$TEE"; then
5503   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
5504 $as_echo "$TEE" >&6; }
5505 else
5506   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5507 $as_echo "no" >&6; }
5508 fi
5509 
5510 
5511   test -n "$TEE" && break
5512 done
5513 
5514 
5515     if test "x$TEE" = x; then
5516         if test "xtee" = x; then
5517           PROG_NAME=tee
5518         else
5519           PROG_NAME=tee
5520         fi
5521         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5522 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5523         as_fn_error $? "Cannot continue" "$LINENO" 5
5524     fi
5525 
5526 
5527 
5528     for ac_prog in touch
5529 do
5530   # Extract the first word of "$ac_prog", so it can be a program name with args.
5531 set dummy $ac_prog; ac_word=$2
5532 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5533 $as_echo_n "checking for $ac_word... " >&6; }
5534 if test "${ac_cv_path_TOUCH+set}" = set; then :
5535   $as_echo_n "(cached) " >&6
5536 else
5537   case $TOUCH in
5538   [\\/]* | ?:[\\/]*)
5539   ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
5540   ;;
5541   *)
5542   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5543 for as_dir in $PATH
5544 do
5545   IFS=$as_save_IFS
5546   test -z "$as_dir" && as_dir=.
5547     for ac_exec_ext in '' $ac_executable_extensions; do
5548   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5549     ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
5550     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5551     break 2
5552   fi
5553 done
5554   done
5555 IFS=$as_save_IFS
5556 
5557   ;;
5558 esac
5559 fi
5560 TOUCH=$ac_cv_path_TOUCH
5561 if test -n "$TOUCH"; then
5562   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
5563 $as_echo "$TOUCH" >&6; }
5564 else
5565   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5566 $as_echo "no" >&6; }
5567 fi
5568 
5569 
5570   test -n "$TOUCH" && break
5571 done
5572 
5573 
5574     if test "x$TOUCH" = x; then
5575         if test "xtouch" = x; then
5576           PROG_NAME=touch
5577         else
5578           PROG_NAME=touch
5579         fi
5580         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5581 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5582         as_fn_error $? "Cannot continue" "$LINENO" 5
5583     fi
5584 
5585 
5586 
5587     for ac_prog in tr
5588 do
5589   # Extract the first word of "$ac_prog", so it can be a program name with args.
5590 set dummy $ac_prog; ac_word=$2
5591 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5592 $as_echo_n "checking for $ac_word... " >&6; }
5593 if test "${ac_cv_path_TR+set}" = set; then :
5594   $as_echo_n "(cached) " >&6
5595 else
5596   case $TR in
5597   [\\/]* | ?:[\\/]*)
5598   ac_cv_path_TR="$TR" # Let the user override the test with a path.
5599   ;;
5600   *)
5601   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5602 for as_dir in $PATH
5603 do
5604   IFS=$as_save_IFS
5605   test -z "$as_dir" && as_dir=.
5606     for ac_exec_ext in '' $ac_executable_extensions; do
5607   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5608     ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
5609     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5610     break 2
5611   fi
5612 done
5613   done
5614 IFS=$as_save_IFS
5615 
5616   ;;
5617 esac
5618 fi
5619 TR=$ac_cv_path_TR
5620 if test -n "$TR"; then
5621   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
5622 $as_echo "$TR" >&6; }
5623 else
5624   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5625 $as_echo "no" >&6; }
5626 fi
5627 
5628 
5629   test -n "$TR" && break
5630 done
5631 
5632 
5633     if test "x$TR" = x; then
5634         if test "xtr" = x; then
5635           PROG_NAME=tr
5636         else
5637           PROG_NAME=tr
5638         fi
5639         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5640 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5641         as_fn_error $? "Cannot continue" "$LINENO" 5
5642     fi
5643 
5644 
5645 
5646     for ac_prog in uname
5647 do
5648   # Extract the first word of "$ac_prog", so it can be a program name with args.
5649 set dummy $ac_prog; ac_word=$2
5650 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5651 $as_echo_n "checking for $ac_word... " >&6; }
5652 if test "${ac_cv_path_UNAME+set}" = set; then :
5653   $as_echo_n "(cached) " >&6
5654 else
5655   case $UNAME in
5656   [\\/]* | ?:[\\/]*)
5657   ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
5658   ;;
5659   *)
5660   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5661 for as_dir in $PATH
5662 do
5663   IFS=$as_save_IFS
5664   test -z "$as_dir" && as_dir=.
5665     for ac_exec_ext in '' $ac_executable_extensions; do
5666   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5667     ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
5668     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5669     break 2
5670   fi
5671 done
5672   done
5673 IFS=$as_save_IFS
5674 
5675   ;;
5676 esac
5677 fi
5678 UNAME=$ac_cv_path_UNAME
5679 if test -n "$UNAME"; then
5680   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
5681 $as_echo "$UNAME" >&6; }
5682 else
5683   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5684 $as_echo "no" >&6; }
5685 fi
5686 
5687 
5688   test -n "$UNAME" && break
5689 done
5690 
5691 
5692     if test "x$UNAME" = x; then
5693         if test "xuname" = x; then
5694           PROG_NAME=uname
5695         else
5696           PROG_NAME=uname
5697         fi
5698         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5699 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5700         as_fn_error $? "Cannot continue" "$LINENO" 5
5701     fi
5702 
5703 
5704 
5705     for ac_prog in uniq
5706 do
5707   # Extract the first word of "$ac_prog", so it can be a program name with args.
5708 set dummy $ac_prog; ac_word=$2
5709 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5710 $as_echo_n "checking for $ac_word... " >&6; }
5711 if test "${ac_cv_path_UNIQ+set}" = set; then :
5712   $as_echo_n "(cached) " >&6
5713 else
5714   case $UNIQ in
5715   [\\/]* | ?:[\\/]*)
5716   ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
5717   ;;
5718   *)
5719   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5720 for as_dir in $PATH
5721 do
5722   IFS=$as_save_IFS
5723   test -z "$as_dir" && as_dir=.
5724     for ac_exec_ext in '' $ac_executable_extensions; do
5725   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5726     ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
5727     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5728     break 2
5729   fi
5730 done
5731   done
5732 IFS=$as_save_IFS
5733 
5734   ;;
5735 esac
5736 fi
5737 UNIQ=$ac_cv_path_UNIQ
5738 if test -n "$UNIQ"; then
5739   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
5740 $as_echo "$UNIQ" >&6; }
5741 else
5742   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5743 $as_echo "no" >&6; }
5744 fi
5745 
5746 
5747   test -n "$UNIQ" && break
5748 done
5749 
5750 
5751     if test "x$UNIQ" = x; then
5752         if test "xuniq" = x; then
5753           PROG_NAME=uniq
5754         else
5755           PROG_NAME=uniq
5756         fi
5757         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5758 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5759         as_fn_error $? "Cannot continue" "$LINENO" 5
5760     fi
5761 
5762 
5763 
5764     for ac_prog in wc
5765 do
5766   # Extract the first word of "$ac_prog", so it can be a program name with args.
5767 set dummy $ac_prog; ac_word=$2
5768 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5769 $as_echo_n "checking for $ac_word... " >&6; }
5770 if test "${ac_cv_path_WC+set}" = set; then :
5771   $as_echo_n "(cached) " >&6
5772 else
5773   case $WC in
5774   [\\/]* | ?:[\\/]*)
5775   ac_cv_path_WC="$WC" # Let the user override the test with a path.
5776   ;;
5777   *)
5778   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5779 for as_dir in $PATH
5780 do
5781   IFS=$as_save_IFS
5782   test -z "$as_dir" && as_dir=.
5783     for ac_exec_ext in '' $ac_executable_extensions; do
5784   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5785     ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
5786     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5787     break 2
5788   fi
5789 done
5790   done
5791 IFS=$as_save_IFS
5792 
5793   ;;
5794 esac
5795 fi
5796 WC=$ac_cv_path_WC
5797 if test -n "$WC"; then
5798   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
5799 $as_echo "$WC" >&6; }
5800 else
5801   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5802 $as_echo "no" >&6; }
5803 fi
5804 
5805 
5806   test -n "$WC" && break
5807 done
5808 
5809 
5810     if test "x$WC" = x; then
5811         if test "xwc" = x; then
5812           PROG_NAME=wc
5813         else
5814           PROG_NAME=wc
5815         fi
5816         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5817 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5818         as_fn_error $? "Cannot continue" "$LINENO" 5
5819     fi
5820 
5821 
5822 
5823     for ac_prog in which
5824 do
5825   # Extract the first word of "$ac_prog", so it can be a program name with args.
5826 set dummy $ac_prog; ac_word=$2
5827 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5828 $as_echo_n "checking for $ac_word... " >&6; }
5829 if test "${ac_cv_path_WHICH+set}" = set; then :
5830   $as_echo_n "(cached) " >&6
5831 else
5832   case $WHICH in
5833   [\\/]* | ?:[\\/]*)
5834   ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
5835   ;;
5836   *)
5837   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5838 for as_dir in $PATH
5839 do
5840   IFS=$as_save_IFS
5841   test -z "$as_dir" && as_dir=.
5842     for ac_exec_ext in '' $ac_executable_extensions; do
5843   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5844     ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
5845     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5846     break 2
5847   fi
5848 done
5849   done
5850 IFS=$as_save_IFS
5851 
5852   ;;
5853 esac
5854 fi
5855 WHICH=$ac_cv_path_WHICH
5856 if test -n "$WHICH"; then
5857   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
5858 $as_echo "$WHICH" >&6; }
5859 else
5860   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5861 $as_echo "no" >&6; }
5862 fi
5863 
5864 
5865   test -n "$WHICH" && break
5866 done
5867 
5868 
5869     if test "x$WHICH" = x; then
5870         if test "xwhich" = x; then
5871           PROG_NAME=which
5872         else
5873           PROG_NAME=which
5874         fi
5875         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5876 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5877         as_fn_error $? "Cannot continue" "$LINENO" 5
5878     fi
5879 
5880 
5881 
5882     for ac_prog in xargs
5883 do
5884   # Extract the first word of "$ac_prog", so it can be a program name with args.
5885 set dummy $ac_prog; ac_word=$2
5886 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5887 $as_echo_n "checking for $ac_word... " >&6; }
5888 if test "${ac_cv_path_XARGS+set}" = set; then :
5889   $as_echo_n "(cached) " >&6
5890 else
5891   case $XARGS in
5892   [\\/]* | ?:[\\/]*)
5893   ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
5894   ;;
5895   *)
5896   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5897 for as_dir in $PATH
5898 do
5899   IFS=$as_save_IFS
5900   test -z "$as_dir" && as_dir=.
5901     for ac_exec_ext in '' $ac_executable_extensions; do
5902   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5903     ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
5904     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5905     break 2
5906   fi
5907 done
5908   done
5909 IFS=$as_save_IFS
5910 
5911   ;;
5912 esac
5913 fi
5914 XARGS=$ac_cv_path_XARGS
5915 if test -n "$XARGS"; then
5916   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
5917 $as_echo "$XARGS" >&6; }
5918 else
5919   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5920 $as_echo "no" >&6; }
5921 fi
5922 
5923 
5924   test -n "$XARGS" && break
5925 done
5926 
5927 
5928     if test "x$XARGS" = x; then
5929         if test "xxargs" = x; then
5930           PROG_NAME=xargs
5931         else
5932           PROG_NAME=xargs
5933         fi
5934         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5935 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5936         as_fn_error $? "Cannot continue" "$LINENO" 5
5937     fi
5938 
5939 
5940 
5941 # Then required tools that require some special treatment.
5942 for ac_prog in gawk mawk nawk awk
5943 do
5944   # Extract the first word of "$ac_prog", so it can be a program name with args.
5945 set dummy $ac_prog; ac_word=$2
5946 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5947 $as_echo_n "checking for $ac_word... " >&6; }
5948 if test "${ac_cv_prog_AWK+set}" = set; then :
5949   $as_echo_n "(cached) " >&6
5950 else
5951   if test -n "$AWK"; then
5952   ac_cv_prog_AWK="$AWK" # Let the user override the test.
5953 else
5954 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5955 for as_dir in $PATH
5956 do
5957   IFS=$as_save_IFS
5958   test -z "$as_dir" && as_dir=.
5959     for ac_exec_ext in '' $ac_executable_extensions; do
5960   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5961     ac_cv_prog_AWK="$ac_prog"
5962     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5963     break 2
5964   fi
5965 done
5966   done
5967 IFS=$as_save_IFS
5968 
5969 fi
5970 fi
5971 AWK=$ac_cv_prog_AWK
5972 if test -n "$AWK"; then
5973   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
5974 $as_echo "$AWK" >&6; }
5975 else
5976   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5977 $as_echo "no" >&6; }
5978 fi
5979 
5980 
5981   test -n "$AWK" && break
5982 done
5983 
5984 
5985     if test "x$AWK" = x; then
5986         if test "x" = x; then
5987           PROG_NAME=awk
5988         else
5989           PROG_NAME=
5990         fi
5991         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5992 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5993         as_fn_error $? "Cannot continue" "$LINENO" 5
5994     fi
5995 
5996 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
5997 $as_echo_n "checking for grep that handles long lines and -e... " >&6; }
5998 if test "${ac_cv_path_GREP+set}" = set; then :
5999   $as_echo_n "(cached) " >&6
6000 else
6001   if test -z "$GREP"; then
6002   ac_path_GREP_found=false
6003   # Loop through the user's path and test for each of PROGNAME-LIST
6004   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6005 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
6006 do
6007   IFS=$as_save_IFS
6008   test -z "$as_dir" && as_dir=.
6009     for ac_prog in grep ggrep; do
6010     for ac_exec_ext in '' $ac_executable_extensions; do
6011       ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
6012       { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
6013 # Check for GNU ac_path_GREP and select it if it is found.
6014   # Check for GNU $ac_path_GREP
6015 case `"$ac_path_GREP" --version 2>&1` in
6016 *GNU*)
6017   ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
6018 *)
6019   ac_count=0
6020   $as_echo_n 0123456789 >"conftest.in"
6021   while :
6022   do
6023     cat "conftest.in" "conftest.in" >"conftest.tmp"
6024     mv "conftest.tmp" "conftest.in"
6025     cp "conftest.in" "conftest.nl"
6026     $as_echo 'GREP' >> "conftest.nl"
6027     "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
6028     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6029     as_fn_arith $ac_count + 1 && ac_count=$as_val
6030     if test $ac_count -gt ${ac_path_GREP_max-0}; then
6031       # Best one so far, save it but keep looking for a better one
6032       ac_cv_path_GREP="$ac_path_GREP"
6033       ac_path_GREP_max=$ac_count
6034     fi
6035     # 10*(2^10) chars as input seems more than enough
6036     test $ac_count -gt 10 && break
6037   done
6038   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6039 esac
6040 
6041       $ac_path_GREP_found && break 3
6042     done
6043   done
6044   done
6045 IFS=$as_save_IFS
6046   if test -z "$ac_cv_path_GREP"; then
6047     as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
6048   fi
6049 else
6050   ac_cv_path_GREP=$GREP
6051 fi
6052 
6053 fi
6054 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
6055 $as_echo "$ac_cv_path_GREP" >&6; }
6056  GREP="$ac_cv_path_GREP"
6057 
6058 
6059 
6060     if test "x$GREP" = x; then
6061         if test "x" = x; then
6062           PROG_NAME=grep
6063         else
6064           PROG_NAME=
6065         fi
6066         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6067 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6068         as_fn_error $? "Cannot continue" "$LINENO" 5
6069     fi
6070 
6071 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
6072 $as_echo_n "checking for egrep... " >&6; }
6073 if test "${ac_cv_path_EGREP+set}" = set; then :
6074   $as_echo_n "(cached) " >&6
6075 else
6076   if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
6077    then ac_cv_path_EGREP="$GREP -E"
6078    else
6079      if test -z "$EGREP"; then
6080   ac_path_EGREP_found=false
6081   # Loop through the user's path and test for each of PROGNAME-LIST
6082   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6083 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
6084 do
6085   IFS=$as_save_IFS
6086   test -z "$as_dir" && as_dir=.
6087     for ac_prog in egrep; do
6088     for ac_exec_ext in '' $ac_executable_extensions; do
6089       ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
6090       { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
6091 # Check for GNU ac_path_EGREP and select it if it is found.
6092   # Check for GNU $ac_path_EGREP
6093 case `"$ac_path_EGREP" --version 2>&1` in
6094 *GNU*)
6095   ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
6096 *)
6097   ac_count=0
6098   $as_echo_n 0123456789 >"conftest.in"
6099   while :
6100   do
6101     cat "conftest.in" "conftest.in" >"conftest.tmp"
6102     mv "conftest.tmp" "conftest.in"
6103     cp "conftest.in" "conftest.nl"
6104     $as_echo 'EGREP' >> "conftest.nl"
6105     "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
6106     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6107     as_fn_arith $ac_count + 1 && ac_count=$as_val
6108     if test $ac_count -gt ${ac_path_EGREP_max-0}; then
6109       # Best one so far, save it but keep looking for a better one
6110       ac_cv_path_EGREP="$ac_path_EGREP"
6111       ac_path_EGREP_max=$ac_count
6112     fi
6113     # 10*(2^10) chars as input seems more than enough
6114     test $ac_count -gt 10 && break
6115   done
6116   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6117 esac
6118 
6119       $ac_path_EGREP_found && break 3
6120     done
6121   done
6122   done
6123 IFS=$as_save_IFS
6124   if test -z "$ac_cv_path_EGREP"; then
6125     as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
6126   fi
6127 else
6128   ac_cv_path_EGREP=$EGREP
6129 fi
6130 
6131    fi
6132 fi
6133 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
6134 $as_echo "$ac_cv_path_EGREP" >&6; }
6135  EGREP="$ac_cv_path_EGREP"
6136 
6137 
6138 
6139     if test "x$EGREP" = x; then
6140         if test "x" = x; then
6141           PROG_NAME=egrep
6142         else
6143           PROG_NAME=
6144         fi
6145         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6146 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6147         as_fn_error $? "Cannot continue" "$LINENO" 5
6148     fi
6149 
6150 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
6151 $as_echo_n "checking for fgrep... " >&6; }
6152 if test "${ac_cv_path_FGREP+set}" = set; then :
6153   $as_echo_n "(cached) " >&6
6154 else
6155   if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
6156    then ac_cv_path_FGREP="$GREP -F"
6157    else
6158      if test -z "$FGREP"; then
6159   ac_path_FGREP_found=false
6160   # Loop through the user's path and test for each of PROGNAME-LIST
6161   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6162 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
6163 do
6164   IFS=$as_save_IFS
6165   test -z "$as_dir" && as_dir=.
6166     for ac_prog in fgrep; do
6167     for ac_exec_ext in '' $ac_executable_extensions; do
6168       ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
6169       { test -f "$ac_path_FGREP" && $as_test_x "$ac_path_FGREP"; } || continue
6170 # Check for GNU ac_path_FGREP and select it if it is found.
6171   # Check for GNU $ac_path_FGREP
6172 case `"$ac_path_FGREP" --version 2>&1` in
6173 *GNU*)
6174   ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
6175 *)
6176   ac_count=0
6177   $as_echo_n 0123456789 >"conftest.in"
6178   while :
6179   do
6180     cat "conftest.in" "conftest.in" >"conftest.tmp"
6181     mv "conftest.tmp" "conftest.in"
6182     cp "conftest.in" "conftest.nl"
6183     $as_echo 'FGREP' >> "conftest.nl"
6184     "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
6185     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6186     as_fn_arith $ac_count + 1 && ac_count=$as_val
6187     if test $ac_count -gt ${ac_path_FGREP_max-0}; then
6188       # Best one so far, save it but keep looking for a better one
6189       ac_cv_path_FGREP="$ac_path_FGREP"
6190       ac_path_FGREP_max=$ac_count
6191     fi
6192     # 10*(2^10) chars as input seems more than enough
6193     test $ac_count -gt 10 && break
6194   done
6195   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6196 esac
6197 
6198       $ac_path_FGREP_found && break 3
6199     done
6200   done
6201   done
6202 IFS=$as_save_IFS
6203   if test -z "$ac_cv_path_FGREP"; then
6204     as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
6205   fi
6206 else
6207   ac_cv_path_FGREP=$FGREP
6208 fi
6209 
6210    fi
6211 fi
6212 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
6213 $as_echo "$ac_cv_path_FGREP" >&6; }
6214  FGREP="$ac_cv_path_FGREP"
6215 
6216 
6217 
6218     if test "x$FGREP" = x; then
6219         if test "x" = x; then
6220           PROG_NAME=fgrep
6221         else
6222           PROG_NAME=
6223         fi
6224         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6225 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6226         as_fn_error $? "Cannot continue" "$LINENO" 5
6227     fi
6228 
6229 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
6230 $as_echo_n "checking for a sed that does not truncate output... " >&6; }
6231 if test "${ac_cv_path_SED+set}" = set; then :
6232   $as_echo_n "(cached) " >&6
6233 else
6234             ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
6235      for ac_i in 1 2 3 4 5 6 7; do
6236        ac_script="$ac_script$as_nl$ac_script"
6237      done
6238      echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
6239      { ac_script=; unset ac_script;}
6240      if test -z "$SED"; then
6241   ac_path_SED_found=false
6242   # Loop through the user's path and test for each of PROGNAME-LIST
6243   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6244 for as_dir in $PATH
6245 do
6246   IFS=$as_save_IFS
6247   test -z "$as_dir" && as_dir=.
6248     for ac_prog in sed gsed; do
6249     for ac_exec_ext in '' $ac_executable_extensions; do
6250       ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
6251       { test -f "$ac_path_SED" && $as_test_x "$ac_path_SED"; } || continue
6252 # Check for GNU ac_path_SED and select it if it is found.
6253   # Check for GNU $ac_path_SED
6254 case `"$ac_path_SED" --version 2>&1` in
6255 *GNU*)
6256   ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
6257 *)
6258   ac_count=0
6259   $as_echo_n 0123456789 >"conftest.in"
6260   while :
6261   do
6262     cat "conftest.in" "conftest.in" >"conftest.tmp"
6263     mv "conftest.tmp" "conftest.in"
6264     cp "conftest.in" "conftest.nl"
6265     $as_echo '' >> "conftest.nl"
6266     "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
6267     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6268     as_fn_arith $ac_count + 1 && ac_count=$as_val
6269     if test $ac_count -gt ${ac_path_SED_max-0}; then
6270       # Best one so far, save it but keep looking for a better one
6271       ac_cv_path_SED="$ac_path_SED"
6272       ac_path_SED_max=$ac_count
6273     fi
6274     # 10*(2^10) chars as input seems more than enough
6275     test $ac_count -gt 10 && break
6276   done
6277   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6278 esac
6279 
6280       $ac_path_SED_found && break 3
6281     done
6282   done
6283   done
6284 IFS=$as_save_IFS
6285   if test -z "$ac_cv_path_SED"; then
6286     as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
6287   fi
6288 else
6289   ac_cv_path_SED=$SED
6290 fi
6291 
6292 fi
6293 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
6294 $as_echo "$ac_cv_path_SED" >&6; }
6295  SED="$ac_cv_path_SED"
6296   rm -f conftest.sed
6297 
6298 
6299     if test "x$SED" = x; then
6300         if test "x" = x; then
6301           PROG_NAME=sed
6302         else
6303           PROG_NAME=
6304         fi
6305         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6306 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6307         as_fn_error $? "Cannot continue" "$LINENO" 5
6308     fi
6309 
6310 
6311 for ac_prog in nawk gawk awk
6312 do
6313   # Extract the first word of "$ac_prog", so it can be a program name with args.
6314 set dummy $ac_prog; ac_word=$2
6315 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6316 $as_echo_n "checking for $ac_word... " >&6; }
6317 if test "${ac_cv_path_NAWK+set}" = set; then :
6318   $as_echo_n "(cached) " >&6
6319 else
6320   case $NAWK in
6321   [\\/]* | ?:[\\/]*)
6322   ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
6323   ;;
6324   *)
6325   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6326 for as_dir in $PATH
6327 do
6328   IFS=$as_save_IFS
6329   test -z "$as_dir" && as_dir=.
6330     for ac_exec_ext in '' $ac_executable_extensions; do
6331   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6332     ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
6333     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6334     break 2
6335   fi
6336 done
6337   done
6338 IFS=$as_save_IFS
6339 
6340   ;;
6341 esac
6342 fi
6343 NAWK=$ac_cv_path_NAWK
6344 if test -n "$NAWK"; then
6345   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
6346 $as_echo "$NAWK" >&6; }
6347 else
6348   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6349 $as_echo "no" >&6; }
6350 fi
6351 
6352 
6353   test -n "$NAWK" && break
6354 done
6355 
6356 
6357     if test "x$NAWK" = x; then
6358         if test "x" = x; then
6359           PROG_NAME=nawk
6360         else
6361           PROG_NAME=
6362         fi
6363         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6364 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6365         as_fn_error $? "Cannot continue" "$LINENO" 5
6366     fi
6367 
6368 
6369 # Always force rm.
6370 RM="$RM -f"
6371 
6372 # pwd behaves differently on various platforms and some don't support the -L flag.
6373 # Always use the bash builtin pwd to get uniform behavior.
6374 THEPWDCMD=pwd
6375 
6376 # These are not required on all platforms
6377 # Extract the first word of "cygpath", so it can be a program name with args.
6378 set dummy cygpath; ac_word=$2
6379 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6380 $as_echo_n "checking for $ac_word... " >&6; }
6381 if test "${ac_cv_path_CYGPATH+set}" = set; then :
6382   $as_echo_n "(cached) " >&6
6383 else
6384   case $CYGPATH in
6385   [\\/]* | ?:[\\/]*)
6386   ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
6387   ;;
6388   *)
6389   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6390 for as_dir in $PATH
6391 do
6392   IFS=$as_save_IFS
6393   test -z "$as_dir" && as_dir=.
6394     for ac_exec_ext in '' $ac_executable_extensions; do
6395   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6396     ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
6397     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6398     break 2
6399   fi
6400 done
6401   done
6402 IFS=$as_save_IFS
6403 
6404   ;;
6405 esac
6406 fi
6407 CYGPATH=$ac_cv_path_CYGPATH
6408 if test -n "$CYGPATH"; then
6409   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
6410 $as_echo "$CYGPATH" >&6; }
6411 else
6412   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6413 $as_echo "no" >&6; }
6414 fi
6415 
6416 
6417 # Extract the first word of "readlink", so it can be a program name with args.
6418 set dummy readlink; ac_word=$2
6419 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6420 $as_echo_n "checking for $ac_word... " >&6; }
6421 if test "${ac_cv_path_READLINK+set}" = set; then :
6422   $as_echo_n "(cached) " >&6
6423 else
6424   case $READLINK in
6425   [\\/]* | ?:[\\/]*)
6426   ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
6427   ;;
6428   *)
6429   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6430 for as_dir in $PATH
6431 do
6432   IFS=$as_save_IFS
6433   test -z "$as_dir" && as_dir=.
6434     for ac_exec_ext in '' $ac_executable_extensions; do
6435   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6436     ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
6437     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6438     break 2
6439   fi
6440 done
6441   done
6442 IFS=$as_save_IFS
6443 
6444   ;;
6445 esac
6446 fi
6447 READLINK=$ac_cv_path_READLINK
6448 if test -n "$READLINK"; then
6449   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
6450 $as_echo "$READLINK" >&6; }
6451 else
6452   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6453 $as_echo "no" >&6; }
6454 fi
6455 
6456 
6457 # Extract the first word of "df", so it can be a program name with args.
6458 set dummy df; ac_word=$2
6459 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6460 $as_echo_n "checking for $ac_word... " >&6; }
6461 if test "${ac_cv_path_DF+set}" = set; then :
6462   $as_echo_n "(cached) " >&6
6463 else
6464   case $DF in
6465   [\\/]* | ?:[\\/]*)
6466   ac_cv_path_DF="$DF" # Let the user override the test with a path.
6467   ;;
6468   *)
6469   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6470 for as_dir in $PATH
6471 do
6472   IFS=$as_save_IFS
6473   test -z "$as_dir" && as_dir=.
6474     for ac_exec_ext in '' $ac_executable_extensions; do
6475   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6476     ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
6477     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6478     break 2
6479   fi
6480 done
6481   done
6482 IFS=$as_save_IFS
6483 
6484   ;;
6485 esac
6486 fi
6487 DF=$ac_cv_path_DF
6488 if test -n "$DF"; then
6489   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
6490 $as_echo "$DF" >&6; }
6491 else
6492   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6493 $as_echo "no" >&6; }
6494 fi
6495 
6496 
6497 # Extract the first word of "SetFile", so it can be a program name with args.
6498 set dummy SetFile; ac_word=$2
6499 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6500 $as_echo_n "checking for $ac_word... " >&6; }
6501 if test "${ac_cv_path_SETFILE+set}" = set; then :
6502   $as_echo_n "(cached) " >&6
6503 else
6504   case $SETFILE in
6505   [\\/]* | ?:[\\/]*)
6506   ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
6507   ;;
6508   *)
6509   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6510 for as_dir in $PATH
6511 do
6512   IFS=$as_save_IFS
6513   test -z "$as_dir" && as_dir=.
6514     for ac_exec_ext in '' $ac_executable_extensions; do
6515   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6516     ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
6517     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6518     break 2
6519   fi
6520 done
6521   done
6522 IFS=$as_save_IFS
6523 
6524   ;;
6525 esac
6526 fi
6527 SETFILE=$ac_cv_path_SETFILE
6528 if test -n "$SETFILE"; then
6529   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
6530 $as_echo "$SETFILE" >&6; }
6531 else
6532   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6533 $as_echo "no" >&6; }
6534 fi
6535 
6536 
6537 
6538 
6539 # Now we can determine OpenJDK build and target platforms. This is required to
6540 # have early on.
6541 # Make sure we can run config.sub.
6542 $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
6543   as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
6544 
6545 { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
6546 $as_echo_n "checking build system type... " >&6; }
6547 if test "${ac_cv_build+set}" = set; then :
6548   $as_echo_n "(cached) " >&6
6549 else
6550   ac_build_alias=$build_alias
6551 test "x$ac_build_alias" = x &&
6552   ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
6553 test "x$ac_build_alias" = x &&
6554   as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
6555 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
6556   as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
6557 
6558 fi
6559 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
6560 $as_echo "$ac_cv_build" >&6; }
6561 case $ac_cv_build in
6562 *-*-*) ;;
6563 *) as_fn_error $? "invalid value of canonical build" "$LINENO" 5 ;;
6564 esac
6565 build=$ac_cv_build
6566 ac_save_IFS=$IFS; IFS='-'
6567 set x $ac_cv_build
6568 shift
6569 build_cpu=$1
6570 build_vendor=$2
6571 shift; shift
6572 # Remember, the first character of IFS is used to create $*,
6573 # except with old shells:
6574 build_os=$*
6575 IFS=$ac_save_IFS
6576 case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
6577 
6578 
6579 { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
6580 $as_echo_n "checking host system type... " >&6; }
6581 if test "${ac_cv_host+set}" = set; then :
6582   $as_echo_n "(cached) " >&6
6583 else
6584   if test "x$host_alias" = x; then
6585   ac_cv_host=$ac_cv_build
6586 else
6587   ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
6588     as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
6589 fi
6590 
6591 fi
6592 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
6593 $as_echo "$ac_cv_host" >&6; }
6594 case $ac_cv_host in
6595 *-*-*) ;;
6596 *) as_fn_error $? "invalid value of canonical host" "$LINENO" 5 ;;
6597 esac
6598 host=$ac_cv_host
6599 ac_save_IFS=$IFS; IFS='-'
6600 set x $ac_cv_host
6601 shift
6602 host_cpu=$1
6603 host_vendor=$2
6604 shift; shift
6605 # Remember, the first character of IFS is used to create $*,
6606 # except with old shells:
6607 host_os=$*
6608 IFS=$ac_save_IFS
6609 case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
6610 
6611 
6612 { $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
6613 $as_echo_n "checking target system type... " >&6; }
6614 if test "${ac_cv_target+set}" = set; then :
6615   $as_echo_n "(cached) " >&6
6616 else
6617   if test "x$target_alias" = x; then
6618   ac_cv_target=$ac_cv_host
6619 else
6620   ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
6621     as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
6622 fi
6623 
6624 fi
6625 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
6626 $as_echo "$ac_cv_target" >&6; }
6627 case $ac_cv_target in
6628 *-*-*) ;;
6629 *) as_fn_error $? "invalid value of canonical target" "$LINENO" 5 ;;
6630 esac
6631 target=$ac_cv_target
6632 ac_save_IFS=$IFS; IFS='-'
6633 set x $ac_cv_target
6634 shift
6635 target_cpu=$1
6636 target_vendor=$2
6637 shift; shift
6638 # Remember, the first character of IFS is used to create $*,
6639 # except with old shells:
6640 target_os=$*
6641 IFS=$ac_save_IFS
6642 case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
6643 
6644 
6645 # The aliases save the names the user supplied, while $host etc.
6646 # will get canonicalized.
6647 test -n "$target_alias" &&
6648   test "$program_prefix$program_suffix$program_transform_name" = \
6649     NONENONEs,x,x, &&
6650   program_prefix=${target_alias}-
6651 
6652 # Figure out the build and target systems. # Note that in autoconf terminology, "build" is obvious, but "target"
6653 # is confusing; it assumes you are cross-compiling a cross-compiler (!)  and "target" is thus the target of the
6654 # product you're building. The target of this build is called "host". Since this is confusing to most people, we
6655 # have not adopted that system, but use "target" as the platform we are building for. In some places though we need
6656 # to use the configure naming style.
6657 
6658 
6659 
6660 
6661 
6662     # Copy the autoconf trip/quadruplet verbatim to OPENJDK_TARGET_AUTOCONF_NAME
6663     # (from the autoconf "host") and OPENJDK_BUILD_AUTOCONF_NAME
6664     # Note that we might later on rewrite e.g. OPENJDK_TARGET_CPU due to reduced build,
6665     # but this will not change the value of OPENJDK_TARGET_AUTOCONF_NAME.
6666     OPENJDK_TARGET_AUTOCONF_NAME="$host"
6667     OPENJDK_BUILD_AUTOCONF_NAME="$build"
6668 
6669 
6670 
6671     # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
6672 
6673   case "$build_os" in
6674     *linux*)
6675       VAR_OS=linux
6676       VAR_OS_API=posix
6677       VAR_OS_ENV=linux
6678       ;;
6679     *solaris*)
6680       VAR_OS=solaris
6681       VAR_OS_API=posix
6682       VAR_OS_ENV=solaris
6683       ;;
6684     *darwin*)
6685       VAR_OS=macosx
6686       VAR_OS_API=posix
6687       VAR_OS_ENV=macosx
6688       ;;
6689     *bsd*)
6690       VAR_OS=bsd
6691       VAR_OS_API=posix
6692       VAR_OS_ENV=bsd
6693       ;;
6694     *cygwin*)
6695       VAR_OS=windows
6696       VAR_OS_API=winapi
6697       VAR_OS_ENV=windows.cygwin
6698       ;;
6699     *mingw*)
6700       VAR_OS=windows
6701       VAR_OS_API=winapi
6702       VAR_OS_ENV=windows.msys
6703       ;;
6704     *)
6705       as_fn_error $? "unsupported operating system $build_os" "$LINENO" 5
6706       ;;
6707   esac
6708 
6709 
6710   # First argument is the cpu name from the trip/quad
6711   case "$build_cpu" in
6712     x86_64)
6713       VAR_CPU=x86_64
6714       VAR_CPU_ARCH=x86
6715       VAR_CPU_BITS=64
6716       VAR_CPU_ENDIAN=little
6717       ;;
6718     i?86)
6719       VAR_CPU=x86
6720       VAR_CPU_ARCH=x86
6721       VAR_CPU_BITS=32
6722       VAR_CPU_ENDIAN=little
6723       ;;
6724     arm*)
6725       VAR_CPU=arm
6726       VAR_CPU_ARCH=arm
6727       VAR_CPU_BITS=32
6728       VAR_CPU_ENDIAN=little
6729       ;;
6730     powerpc)
6731       VAR_CPU=ppc
6732       VAR_CPU_ARCH=ppc
6733       VAR_CPU_BITS=32
6734       VAR_CPU_ENDIAN=big
6735        ;;
6736     powerpc64)
6737       VAR_CPU=ppc64
6738       VAR_CPU_ARCH=ppc
6739       VAR_CPU_BITS=64
6740       VAR_CPU_ENDIAN=big
6741        ;;
6742     sparc)
6743       VAR_CPU=sparc
6744       VAR_CPU_ARCH=sparc
6745       VAR_CPU_BITS=32
6746       VAR_CPU_ENDIAN=big
6747        ;;
6748     sparcv9)
6749       VAR_CPU=sparcv9
6750       VAR_CPU_ARCH=sparc
6751       VAR_CPU_BITS=64
6752       VAR_CPU_ENDIAN=big
6753        ;;
6754     *)
6755       as_fn_error $? "unsupported cpu $build_cpu" "$LINENO" 5
6756       ;;
6757   esac
6758 
6759     # ..and setup our own variables. (Do this explicitely to facilitate searching)
6760     OPENJDK_BUILD_OS="$VAR_OS"
6761     OPENJDK_BUILD_OS_API="$VAR_OS_API"
6762     OPENJDK_BUILD_OS_ENV="$VAR_OS_ENV"
6763     OPENJDK_BUILD_CPU="$VAR_CPU"
6764     OPENJDK_BUILD_CPU_ARCH="$VAR_CPU_ARCH"
6765     OPENJDK_BUILD_CPU_BITS="$VAR_CPU_BITS"
6766     OPENJDK_BUILD_CPU_ENDIAN="$VAR_CPU_ENDIAN"
6767 
6768 
6769 
6770 
6771 
6772 
6773 
6774     { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-build os-cpu" >&5
6775 $as_echo_n "checking openjdk-build os-cpu... " >&6; }
6776     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&5
6777 $as_echo "$OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&6; }
6778 
6779     # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
6780 
6781   case "$host_os" in
6782     *linux*)
6783       VAR_OS=linux
6784       VAR_OS_API=posix
6785       VAR_OS_ENV=linux
6786       ;;
6787     *solaris*)
6788       VAR_OS=solaris
6789       VAR_OS_API=posix
6790       VAR_OS_ENV=solaris
6791       ;;
6792     *darwin*)
6793       VAR_OS=macosx
6794       VAR_OS_API=posix
6795       VAR_OS_ENV=macosx
6796       ;;
6797     *bsd*)
6798       VAR_OS=bsd
6799       VAR_OS_API=posix
6800       VAR_OS_ENV=bsd
6801       ;;
6802     *cygwin*)
6803       VAR_OS=windows
6804       VAR_OS_API=winapi
6805       VAR_OS_ENV=windows.cygwin
6806       ;;
6807     *mingw*)
6808       VAR_OS=windows
6809       VAR_OS_API=winapi
6810       VAR_OS_ENV=windows.msys
6811       ;;
6812     *)
6813       as_fn_error $? "unsupported operating system $host_os" "$LINENO" 5
6814       ;;
6815   esac
6816 
6817 
6818   # First argument is the cpu name from the trip/quad
6819   case "$host_cpu" in
6820     x86_64)
6821       VAR_CPU=x86_64
6822       VAR_CPU_ARCH=x86
6823       VAR_CPU_BITS=64
6824       VAR_CPU_ENDIAN=little
6825       ;;
6826     i?86)
6827       VAR_CPU=x86
6828       VAR_CPU_ARCH=x86
6829       VAR_CPU_BITS=32
6830       VAR_CPU_ENDIAN=little
6831       ;;
6832     arm*)
6833       VAR_CPU=arm
6834       VAR_CPU_ARCH=arm
6835       VAR_CPU_BITS=32
6836       VAR_CPU_ENDIAN=little
6837       ;;
6838     powerpc)
6839       VAR_CPU=ppc
6840       VAR_CPU_ARCH=ppc
6841       VAR_CPU_BITS=32
6842       VAR_CPU_ENDIAN=big
6843        ;;
6844     powerpc64)
6845       VAR_CPU=ppc64
6846       VAR_CPU_ARCH=ppc
6847       VAR_CPU_BITS=64
6848       VAR_CPU_ENDIAN=big
6849        ;;
6850     sparc)
6851       VAR_CPU=sparc
6852       VAR_CPU_ARCH=sparc
6853       VAR_CPU_BITS=32
6854       VAR_CPU_ENDIAN=big
6855        ;;
6856     sparcv9)
6857       VAR_CPU=sparcv9
6858       VAR_CPU_ARCH=sparc
6859       VAR_CPU_BITS=64
6860       VAR_CPU_ENDIAN=big
6861        ;;
6862     *)
6863       as_fn_error $? "unsupported cpu $host_cpu" "$LINENO" 5
6864       ;;
6865   esac
6866 
6867     # ... and setup our own variables. (Do this explicitely to facilitate searching)
6868     OPENJDK_TARGET_OS="$VAR_OS"
6869     OPENJDK_TARGET_OS_API="$VAR_OS_API"
6870     OPENJDK_TARGET_OS_ENV="$VAR_OS_ENV"
6871     OPENJDK_TARGET_CPU="$VAR_CPU"
6872     OPENJDK_TARGET_CPU_ARCH="$VAR_CPU_ARCH"
6873     OPENJDK_TARGET_CPU_BITS="$VAR_CPU_BITS"
6874     OPENJDK_TARGET_CPU_ENDIAN="$VAR_CPU_ENDIAN"
6875 
6876 
6877 
6878 
6879 
6880 
6881 
6882     { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-target os-cpu" >&5
6883 $as_echo_n "checking openjdk-target os-cpu... " >&6; }
6884     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&5
6885 $as_echo "$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&6; }
6886 
6887 
6888 
6889 # Check whether --with-target-bits was given.
6890 if test "${with_target_bits+set}" = set; then :
6891   withval=$with_target_bits;
6892 fi
6893 
6894 
6895   # We have three types of compiles:
6896   # native  == normal compilation, target system == build system
6897   # cross   == traditional cross compilation, target system != build system; special toolchain needed
6898   # reduced == using native compilers, but with special flags (e.g. -m32) to produce 32-bit builds on 64-bit machines
6899   #
6900   if test "x$OPENJDK_BUILD_AUTOCONF_NAME" != "x$OPENJDK_TARGET_AUTOCONF_NAME"; then
6901     # We're doing a proper cross-compilation
6902     COMPILE_TYPE="cross"
6903   else
6904     COMPILE_TYPE="native"
6905   fi
6906 
6907   if test "x$with_target_bits" != x; then
6908     if test "x$COMPILE_TYPE" = "xcross"; then
6909       as_fn_error $? "It is not possible to combine --with-target-bits=X and proper cross-compilation. Choose either." "$LINENO" 5
6910     fi
6911 
6912     if test "x$with_target_bits" = x32 && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
6913       # A reduced build is requested
6914       COMPILE_TYPE="reduced"
6915       OPENJDK_TARGET_CPU_BITS=32
6916       if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
6917         OPENJDK_TARGET_CPU=x86
6918       elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
6919         OPENJDK_TARGET_CPU=sparc
6920       else
6921         as_fn_error $? "Reduced build (--with-target-bits=32) is only supported on x86_64 and sparcv9" "$LINENO" 5
6922       fi
6923     elif test "x$with_target_bits" = x64 && test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
6924       as_fn_error $? "It is not possible to use --with-target-bits=64 on a 32 bit system. Use proper cross-compilation instead." "$LINENO" 5
6925     elif test "x$with_target_bits" = "x$OPENJDK_TARGET_CPU_BITS"; then
6926       { $as_echo "$as_me:${as_lineno-$LINENO}: --with-target-bits are set to build platform address size; argument has no meaning" >&5
6927 $as_echo "$as_me: --with-target-bits are set to build platform address size; argument has no meaning" >&6;}
6928     else
6929       as_fn_error $? "--with-target-bits can only be 32 or 64, you specified $with_target_bits!" "$LINENO" 5
6930     fi
6931   fi
6932 
6933 
6934 { $as_echo "$as_me:${as_lineno-$LINENO}: checking compilation type" >&5
6935 $as_echo_n "checking compilation type... " >&6; }
6936 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMPILE_TYPE" >&5
6937 $as_echo "$COMPILE_TYPE" >&6; }
6938 
6939 
6940     if test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
6941        REQUIRED_OS_NAME=SunOS
6942        REQUIRED_OS_VERSION=5.10
6943     fi
6944     if test "x$OPENJDK_TARGET_OS" = "xlinux"; then
6945        REQUIRED_OS_NAME=Linux
6946        REQUIRED_OS_VERSION=2.6
6947     fi
6948     if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
6949         REQUIRED_OS_NAME=Windows
6950         if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
6951             REQUIRED_OS_VERSION=5.2
6952         else
6953             REQUIRED_OS_VERSION=5.1
6954         fi
6955     fi
6956     if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
6957         REQUIRED_OS_NAME=Darwin
6958         REQUIRED_OS_VERSION=11.2
6959     fi
6960 
6961 
6962 
6963 
6964 
6965     # Also store the legacy naming of the cpu.
6966     # Ie i586 and amd64 instead of x86 and x86_64
6967     OPENJDK_TARGET_CPU_LEGACY="$OPENJDK_TARGET_CPU"
6968     if test "x$OPENJDK_TARGET_CPU" = xx86; then
6969       OPENJDK_TARGET_CPU_LEGACY="i586"
6970     elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
6971       # On all platforms except MacOSX replace x86_64 with amd64.
6972       OPENJDK_TARGET_CPU_LEGACY="amd64"
6973     fi
6974 
6975 
6976     # And the second legacy naming of the cpu.
6977     # Ie i386 and amd64 instead of x86 and x86_64.
6978     OPENJDK_TARGET_CPU_LEGACY_LIB="$OPENJDK_TARGET_CPU"
6979     if test "x$OPENJDK_TARGET_CPU" = xx86; then
6980       OPENJDK_TARGET_CPU_LEGACY_LIB="i386"
6981     elif test "x$OPENJDK_TARGET_CPU" = xx86_64; then
6982       OPENJDK_TARGET_CPU_LEGACY_LIB="amd64"
6983     fi
6984 
6985 
6986     # This is the name of the cpu (but using i386 and amd64 instead of
6987     # x86 and x86_64, respectively), preceeded by a /, to be used when
6988     # locating libraries. On macosx, it's empty, though.
6989     OPENJDK_TARGET_CPU_LIBDIR="/$OPENJDK_TARGET_CPU_LEGACY_LIB"
6990     if test "x$OPENJDK_TARGET_OS" = xmacosx; then
6991         OPENJDK_TARGET_CPU_LIBDIR=""
6992     fi
6993 
6994 
6995     # OPENJDK_TARGET_CPU_ISADIR is normally empty. On 64-bit Solaris systems, it is set to
6996     # /amd64 or /sparcv9. This string is appended to some library paths, like this:
6997     # /usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libexample.so
6998     OPENJDK_TARGET_CPU_ISADIR=""
6999     if test "x$OPENJDK_TARGET_OS" = xsolaris; then
7000       if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
7001           OPENJDK_TARGET_CPU_ISADIR="/amd64"
7002       elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
7003           OPENJDK_TARGET_CPU_ISADIR="/sparcv9"
7004       fi
7005     fi
7006 
7007 
7008     # Setup OPENJDK_TARGET_CPU_OSARCH, which is used to set the os.arch Java system property
7009     OPENJDK_TARGET_CPU_OSARCH="$OPENJDK_TARGET_CPU"
7010     if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$OPENJDK_TARGET_CPU" = xx86; then
7011       # On linux only, we replace x86 with i386.
7012       OPENJDK_TARGET_CPU_OSARCH="i386"
7013     elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
7014       # On all platforms except macosx, we replace x86_64 with amd64.
7015       OPENJDK_TARGET_CPU_OSARCH="amd64"
7016     fi
7017 
7018 
7019     OPENJDK_TARGET_CPU_JLI="$OPENJDK_TARGET_CPU"
7020     if test "x$OPENJDK_TARGET_CPU" = xx86; then
7021       OPENJDK_TARGET_CPU_JLI="i386"
7022     elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
7023       # On all platforms except macosx, we replace x86_64 with amd64.
7024       OPENJDK_TARGET_CPU_JLI="amd64"
7025     fi
7026     # Now setup the -D flags for building libjli.
7027     OPENJDK_TARGET_CPU_JLI_CFLAGS="-DLIBARCHNAME='\"$OPENJDK_TARGET_CPU_JLI\"'"
7028     if test "x$OPENJDK_TARGET_OS" = xsolaris; then
7029       if test "x$OPENJDK_TARGET_CPU_ARCH" = xsparc; then
7030         OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"sparc\"' -DLIBARCH64NAME='\"sparcv9\"'"
7031       elif test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
7032         OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"i386\"' -DLIBARCH64NAME='\"amd64\"'"
7033       fi
7034     fi
7035 
7036 
7037     # Setup OPENJDK_TARGET_OS_API_DIR, used in source paths.
7038     if test "x$OPENJDK_TARGET_OS_API" = xposix; then
7039         OPENJDK_TARGET_OS_API_DIR="solaris"
7040     fi
7041     if test "x$OPENJDK_TARGET_OS_API" = xwinapi; then
7042         OPENJDK_TARGET_OS_API_DIR="windows"
7043     fi
7044 
7045 
7046     if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
7047         A_LP64="LP64:="
7048         # -D_LP64=1 is only set on linux and mac. Setting on windows causes diff in
7049         # unpack200.exe
7050         if test "x$OPENJDK_TARGET_OS" = xlinux || test "x$OPENJDK_TARGET_OS" = xmacosx; then
7051             ADD_LP64="-D_LP64=1"
7052         fi
7053     fi
7054     LP64=$A_LP64
7055 
7056 
7057     if test "x$COMPILE_TYPE" = "xcross"; then
7058       # FIXME: ... or should this include reduced builds..?
7059       DEFINE_CROSS_COMPILE_ARCH="CROSS_COMPILE_ARCH:=$OPENJDK_TARGET_CPU_LEGACY"
7060     else
7061       DEFINE_CROSS_COMPILE_ARCH=""
7062     fi
7063 
7064 
7065     # ZERO_ARCHDEF is used to enable architecture-specific code
7066     case "${OPENJDK_TARGET_CPU}" in
7067       ppc*)    ZERO_ARCHDEF=PPC   ;;
7068       s390*)   ZERO_ARCHDEF=S390  ;;
7069       sparc*)  ZERO_ARCHDEF=SPARC ;;
7070       x86_64*) ZERO_ARCHDEF=AMD64 ;;
7071       x86)     ZERO_ARCHDEF=IA32  ;;
7072       *)      ZERO_ARCHDEF=$(echo "${OPENJDK_TARGET_CPU_LEGACY_LIB}" | tr a-z A-Z)
7073     esac
7074 
7075 
7076 
7077 
7078 
7079 # Continue setting up basic stuff. Most remaining code require fundamental tools.
7080 
7081 # Locate the directory of this script.
7082 SCRIPT="$0"
7083 AUTOCONF_DIR=`cd \`$DIRNAME $SCRIPT\`; $THEPWDCMD -L`
7084 
7085 # Where is the source? It is located two levels above the configure script.
7086 CURDIR="$PWD"
7087 cd "$AUTOCONF_DIR/../.."
7088 SRC_ROOT="`$THEPWDCMD -L`"
7089 
7090 if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
7091   PATH_SEP=";"
7092 
7093   SRC_ROOT_LENGTH=`$THEPWDCMD -L|$WC -m`
7094   if test $SRC_ROOT_LENGTH -gt 100; then
7095       as_fn_error $? "Your base path is too long. It is $SRC_ROOT_LENGTH characters long, but only 100 is supported" "$LINENO" 5
7096   fi
7097 
7098   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7099     { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin release" >&5
7100 $as_echo_n "checking cygwin release... " >&6; }
7101     CYGWIN_VERSION=`$UNAME -r`
7102     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_VERSION" >&5
7103 $as_echo "$CYGWIN_VERSION" >&6; }
7104     WINDOWS_ENV_VENDOR='cygwin'
7105     WINDOWS_ENV_VERSION="$CYGWIN_VERSION"
7106 
7107     CYGWIN_VERSION_OK=`$ECHO $CYGWIN_VERSION | $GREP ^1.7.`
7108     if test "x$CYGWIN_VERSION_OK" = x; then
7109       { $as_echo "$as_me:${as_lineno-$LINENO}: Your cygwin is too old. You are running $CYGWIN_VERSION, but at least cygwin 1.7 is required. Please upgrade." >&5
7110 $as_echo "$as_me: Your cygwin is too old. You are running $CYGWIN_VERSION, but at least cygwin 1.7 is required. Please upgrade." >&6;}
7111       as_fn_error $? "Cannot continue" "$LINENO" 5
7112     fi
7113     if test "x$CYGPATH" = x; then
7114         as_fn_error $? "Something is wrong with your cygwin installation since I cannot find cygpath.exe in your path" "$LINENO" 5
7115     fi
7116     { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin root directory as unix-style path" >&5
7117 $as_echo_n "checking cygwin root directory as unix-style path... " >&6; }
7118     # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
7119     cygwin_winpath_root=`cd / ; cmd /c cd | grep ".*"`
7120     # Force cygpath to report the proper root by including a trailing space, and then stripping it off again.
7121     CYGWIN_ROOT_PATH=`$CYGPATH -u "$cygwin_winpath_root " | $CUT -f 1 -d " "`
7122     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_ROOT_PATH" >&5
7123 $as_echo "$CYGWIN_ROOT_PATH" >&6; }
7124     WINDOWS_ENV_ROOT_PATH="$CYGWIN_ROOT_PATH"
7125     test_cygdrive_prefix=`$ECHO $CYGWIN_ROOT_PATH | $GREP ^/cygdrive/`
7126     if test "x$test_cygdrive_prefix" = x; then
7127         as_fn_error $? "Your cygdrive prefix is not /cygdrive. This is currently not supported. Change with mount -c." "$LINENO" 5
7128     fi
7129   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7130     { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys release" >&5
7131 $as_echo_n "checking msys release... " >&6; }
7132     MSYS_VERSION=`$UNAME -r`
7133     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_VERSION" >&5
7134 $as_echo "$MSYS_VERSION" >&6; }
7135 
7136     WINDOWS_ENV_VENDOR='msys'
7137     WINDOWS_ENV_VERSION="$MSYS_VERSION"
7138 
7139     { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys root directory as unix-style path" >&5
7140 $as_echo_n "checking msys root directory as unix-style path... " >&6; }
7141     # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
7142     MSYS_ROOT_PATH=`cd / ; cmd /c cd | grep ".*"`
7143 
7144   windows_path="$MSYS_ROOT_PATH"
7145   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7146     unix_path=`$CYGPATH -u "$windows_path"`
7147     MSYS_ROOT_PATH="$unix_path"
7148   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7149     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
7150     MSYS_ROOT_PATH="$unix_path"
7151   fi
7152 
7153     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_ROOT_PATH" >&5
7154 $as_echo "$MSYS_ROOT_PATH" >&6; }
7155     WINDOWS_ENV_ROOT_PATH="$MSYS_ROOT_PATH"
7156   else
7157     as_fn_error $? "Unknown Windows environment. Neither cygwin nor msys was detected." "$LINENO" 5
7158   fi
7159 
7160   # Test if windows or unix (cygwin/msys) find is first in path.
7161   { $as_echo "$as_me:${as_lineno-$LINENO}: checking what kind of 'find' is first on the PATH" >&5
7162 $as_echo_n "checking what kind of 'find' is first on the PATH... " >&6; }
7163   FIND_BINARY_OUTPUT=`find --version 2>&1`
7164   if test "x`echo $FIND_BINARY_OUTPUT | $GREP GNU`" != x; then
7165     { $as_echo "$as_me:${as_lineno-$LINENO}: result: unix style" >&5
7166 $as_echo "unix style" >&6; }
7167   elif test "x`echo $FIND_BINARY_OUTPUT | $GREP FIND`" != x; then
7168     { $as_echo "$as_me:${as_lineno-$LINENO}: result: Windows" >&5
7169 $as_echo "Windows" >&6; }
7170     { $as_echo "$as_me:${as_lineno-$LINENO}: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&5
7171 $as_echo "$as_me: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&6;}
7172     { $as_echo "$as_me:${as_lineno-$LINENO}: This will not work. Please correct and make sure /usr/bin (or similar) is first in path." >&5
7173 $as_echo "$as_me: This will not work. Please correct and make sure /usr/bin (or similar) is first in path." >&6;}
7174     as_fn_error $? "Cannot continue" "$LINENO" 5
7175   else
7176     { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
7177 $as_echo "unknown" >&6; }
7178     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: It seems that your find utility is non-standard." >&5
7179 $as_echo "$as_me: WARNING: It seems that your find utility is non-standard." >&2;}
7180   fi
7181 
7182 else
7183   PATH_SEP=":"
7184 fi
7185 
7186 
7187 
7188 cd "$CURDIR"
7189 
7190 
7191   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7192 
7193   # Input might be given as Windows format, start by converting to
7194   # unix format.
7195   path="$SRC_ROOT"
7196   new_path=`$CYGPATH -u "$path"`
7197 
7198   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
7199   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
7200   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
7201   # "foo.exe" is OK but "foo" is an error.
7202   #
7203   # This test is therefore slightly more accurate than "test -f" to check for file precense.
7204   # It is also a way to make sure we got the proper file name for the real test later on.
7205   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
7206   if test "x$test_shortpath" = x; then
7207     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&5
7208 $as_echo "$as_me: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&6;}
7209     as_fn_error $? "Cannot locate the the path of SRC_ROOT" "$LINENO" 5
7210   fi
7211 
7212   # Call helper function which possibly converts this using DOS-style short mode.
7213   # If so, the updated path is stored in $new_path.
7214 
7215   input_path="$new_path"
7216   # Check if we need to convert this using DOS-style short mode. If the path
7217   # contains just simple characters, use it. Otherwise (spaces, weird characters),
7218   # take no chances and rewrite it.
7219   # Note: m4 eats our [], so we need to use [ and ] instead.
7220   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
7221   if test "x$has_forbidden_chars" != x; then
7222     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7223     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
7224     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
7225     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
7226       # Going to short mode and back again did indeed matter. Since short mode is
7227       # case insensitive, let's make it lowercase to improve readability.
7228       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7229       # Now convert it back to Unix-stile (cygpath)
7230       input_path=`$CYGPATH -u "$shortmode_path"`
7231       new_path="$input_path"
7232     fi
7233   fi
7234 
7235   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
7236   if test "x$test_cygdrive_prefix" = x; then
7237     # As a simple fix, exclude /usr/bin since it's not a real path.
7238     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
7239       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
7240       # a path prefixed by /cygdrive for fixpath to work.
7241       new_path="$CYGWIN_ROOT_PATH$input_path"
7242     fi
7243   fi
7244 
7245 
7246   if test "x$path" != "x$new_path"; then
7247     SRC_ROOT="$new_path"
7248     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting SRC_ROOT to \"$new_path\"" >&5
7249 $as_echo "$as_me: Rewriting SRC_ROOT to \"$new_path\"" >&6;}
7250   fi
7251 
7252   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7253 
7254   path="$SRC_ROOT"
7255   has_colon=`$ECHO $path | $GREP ^.:`
7256   new_path="$path"
7257   if test "x$has_colon" = x; then
7258     # Not in mixed or Windows style, start by that.
7259     new_path=`cmd //c echo $path`
7260   fi
7261 
7262 
7263   input_path="$new_path"
7264   # Check if we need to convert this using DOS-style short mode. If the path
7265   # contains just simple characters, use it. Otherwise (spaces, weird characters),
7266   # take no chances and rewrite it.
7267   # Note: m4 eats our [], so we need to use [ and ] instead.
7268   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
7269   if test "x$has_forbidden_chars" != x; then
7270     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7271     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7272   fi
7273 
7274 
7275   windows_path="$new_path"
7276   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7277     unix_path=`$CYGPATH -u "$windows_path"`
7278     new_path="$unix_path"
7279   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7280     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
7281     new_path="$unix_path"
7282   fi
7283 
7284   if test "x$path" != "x$new_path"; then
7285     SRC_ROOT="$new_path"
7286     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting SRC_ROOT to \"$new_path\"" >&5
7287 $as_echo "$as_me: Rewriting SRC_ROOT to \"$new_path\"" >&6;}
7288   fi
7289 
7290   # Save the first 10 bytes of this path to the storage, so fixpath can work.
7291   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
7292 
7293   else
7294     # We're on a posix platform. Hooray! :)
7295     path="$SRC_ROOT"
7296     has_space=`$ECHO "$path" | $GREP " "`
7297     if test "x$has_space" != x; then
7298       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&5
7299 $as_echo "$as_me: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&6;}
7300       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
7301     fi
7302 
7303     # Use eval to expand a potential ~
7304     eval path="$path"
7305     if test ! -f "$path" && test ! -d "$path"; then
7306       as_fn_error $? "The path of SRC_ROOT, which resolves as \"$path\", is not found." "$LINENO" 5
7307     fi
7308 
7309     SRC_ROOT="`cd "$path"; $THEPWDCMD -L`"
7310   fi
7311 
7312 
7313   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7314 
7315   # Input might be given as Windows format, start by converting to
7316   # unix format.
7317   path="$CURDIR"
7318   new_path=`$CYGPATH -u "$path"`
7319 
7320   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
7321   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
7322   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
7323   # "foo.exe" is OK but "foo" is an error.
7324   #
7325   # This test is therefore slightly more accurate than "test -f" to check for file precense.
7326   # It is also a way to make sure we got the proper file name for the real test later on.
7327   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
7328   if test "x$test_shortpath" = x; then
7329     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
7330 $as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
7331     as_fn_error $? "Cannot locate the the path of CURDIR" "$LINENO" 5
7332   fi
7333 
7334   # Call helper function which possibly converts this using DOS-style short mode.
7335   # If so, the updated path is stored in $new_path.
7336 
7337   input_path="$new_path"
7338   # Check if we need to convert this using DOS-style short mode. If the path
7339   # contains just simple characters, use it. Otherwise (spaces, weird characters),
7340   # take no chances and rewrite it.
7341   # Note: m4 eats our [], so we need to use [ and ] instead.
7342   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
7343   if test "x$has_forbidden_chars" != x; then
7344     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7345     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
7346     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
7347     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
7348       # Going to short mode and back again did indeed matter. Since short mode is
7349       # case insensitive, let's make it lowercase to improve readability.
7350       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7351       # Now convert it back to Unix-stile (cygpath)
7352       input_path=`$CYGPATH -u "$shortmode_path"`
7353       new_path="$input_path"
7354     fi
7355   fi
7356 
7357   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
7358   if test "x$test_cygdrive_prefix" = x; then
7359     # As a simple fix, exclude /usr/bin since it's not a real path.
7360     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
7361       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
7362       # a path prefixed by /cygdrive for fixpath to work.
7363       new_path="$CYGWIN_ROOT_PATH$input_path"
7364     fi
7365   fi
7366 
7367 
7368   if test "x$path" != "x$new_path"; then
7369     CURDIR="$new_path"
7370     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
7371 $as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
7372   fi
7373 
7374   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7375 
7376   path="$CURDIR"
7377   has_colon=`$ECHO $path | $GREP ^.:`
7378   new_path="$path"
7379   if test "x$has_colon" = x; then
7380     # Not in mixed or Windows style, start by that.
7381     new_path=`cmd //c echo $path`
7382   fi
7383 
7384 
7385   input_path="$new_path"
7386   # Check if we need to convert this using DOS-style short mode. If the path
7387   # contains just simple characters, use it. Otherwise (spaces, weird characters),
7388   # take no chances and rewrite it.
7389   # Note: m4 eats our [], so we need to use [ and ] instead.
7390   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
7391   if test "x$has_forbidden_chars" != x; then
7392     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7393     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7394   fi
7395 
7396 
7397   windows_path="$new_path"
7398   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7399     unix_path=`$CYGPATH -u "$windows_path"`
7400     new_path="$unix_path"
7401   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7402     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
7403     new_path="$unix_path"
7404   fi
7405 
7406   if test "x$path" != "x$new_path"; then
7407     CURDIR="$new_path"
7408     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
7409 $as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
7410   fi
7411 
7412   # Save the first 10 bytes of this path to the storage, so fixpath can work.
7413   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
7414 
7415   else
7416     # We're on a posix platform. Hooray! :)
7417     path="$CURDIR"
7418     has_space=`$ECHO "$path" | $GREP " "`
7419     if test "x$has_space" != x; then
7420       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
7421 $as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
7422       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
7423     fi
7424 
7425     # Use eval to expand a potential ~
7426     eval path="$path"
7427     if test ! -f "$path" && test ! -d "$path"; then
7428       as_fn_error $? "The path of CURDIR, which resolves as \"$path\", is not found." "$LINENO" 5
7429     fi
7430 
7431     CURDIR="`cd "$path"; $THEPWDCMD -L`"
7432   fi
7433 
7434 
7435 if test "x$OPENJDK_BUILD_OS" = "xsolaris"; then
7436     # Add extra search paths on solaris for utilities like ar and as etc...
7437     PATH="$PATH:/usr/ccs/bin:/usr/sfw/bin:/opt/csw/bin"
7438 fi
7439 
7440 # You can force the sys-root if the sys-root encoded into the cross compiler tools
7441 # is not correct.
7442 
7443 # Check whether --with-sys-root was given.
7444 if test "${with_sys_root+set}" = set; then :
7445   withval=$with_sys_root;
7446 fi
7447 
7448 
7449 if test "x$with_sys_root" != x; then
7450   SYS_ROOT=$with_sys_root
7451 else
7452   SYS_ROOT=/
7453 fi
7454 
7455 
7456 
7457 # Check whether --with-tools-dir was given.
7458 if test "${with_tools_dir+set}" = set; then :
7459   withval=$with_tools_dir; TOOLS_DIR=$with_tools_dir
7460 fi
7461 
7462 
7463 
7464 # Check whether --with-devkit was given.
7465 if test "${with_devkit+set}" = set; then :
7466   withval=$with_devkit;
7467     if test "x$with_sys_root" != x; then
7468       as_fn_error $? "Cannot specify both --with-devkit and --with-sys-root at the same time" "$LINENO" 5
7469     fi
7470     if test "x$with_tools_dir" != x; then
7471       as_fn_error $? "Cannot specify both --with-devkit and --with-tools-dir at the same time" "$LINENO" 5
7472     fi
7473     TOOLS_DIR=$with_devkit/bin
7474     SYS_ROOT=$with_devkit/$host_alias/libc
7475 
7476 fi
7477 
7478 
7479 
7480 
7481 # Setup default logging of stdout and stderr to build.log in the output root.
7482 BUILD_LOG='$(OUTPUT_ROOT)/build.log'
7483 BUILD_LOG_PREVIOUS='$(OUTPUT_ROOT)/build.log.old'
7484 BUILD_LOG_WRAPPER='$(BASH) $(SRC_ROOT)/common/bin/logger.sh $(BUILD_LOG)'
7485 
7486 
7487 
7488 
7489 
7490 # Check if it's a pure open build or if custom sources are to be used.
7491 
7492   # Check whether --enable-openjdk-only was given.
7493 if test "${enable_openjdk_only+set}" = set; then :
7494   enableval=$enable_openjdk_only;
7495 else
7496   enable_openjdk_only="no"
7497 fi
7498 
7499 
7500   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for presence of closed sources" >&5
7501 $as_echo_n "checking for presence of closed sources... " >&6; }
7502   if test -d "$SRC_ROOT/jdk/src/closed"; then
7503     CLOSED_SOURCE_PRESENT=yes
7504   else
7505     CLOSED_SOURCE_PRESENT=no
7506   fi
7507   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CLOSED_SOURCE_PRESENT" >&5
7508 $as_echo "$CLOSED_SOURCE_PRESENT" >&6; }
7509 
7510   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if closed source is suppressed (openjdk-only)" >&5
7511 $as_echo_n "checking if closed source is suppressed (openjdk-only)... " >&6; }
7512   SUPPRESS_CLOSED_SOURCE="$enable_openjdk_only"
7513   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SUPPRESS_CLOSED_SOURCE" >&5
7514 $as_echo "$SUPPRESS_CLOSED_SOURCE" >&6; }
7515 
7516   if test "x$CLOSED_SOURCE_PRESENT" = xno; then
7517     OPENJDK=true
7518     if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then
7519       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&5
7520 $as_echo "$as_me: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&2;}
7521     fi
7522   else
7523     if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then
7524       OPENJDK=true
7525     else
7526       OPENJDK=false
7527     fi
7528   fi
7529 
7530   if test "x$OPENJDK" = "xtrue"; then
7531     SET_OPENJDK="OPENJDK=true"
7532   fi
7533 
7534 
7535 
7536 
7537 # These are needed to be able to create a configuration name (and thus the output directory)
7538 
7539 ###############################################################################
7540 #
7541 # Check which variant of the JDK that we want to build.
7542 # Currently we have:
7543 #    normal:   standard edition
7544 # but the custom make system may add other variants
7545 #
7546 # Effectively the JDK variant gives a name to a specific set of
7547 # modules to compile into the JDK. In the future, these modules
7548 # might even be Jigsaw modules.
7549 #
7550 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variant of the JDK to build" >&5
7551 $as_echo_n "checking which variant of the JDK to build... " >&6; }
7552 
7553 # Check whether --with-jdk-variant was given.
7554 if test "${with_jdk_variant+set}" = set; then :
7555   withval=$with_jdk_variant;
7556 fi
7557 
7558 
7559 if test "x$with_jdk_variant" = xnormal || test "x$with_jdk_variant" = x; then
7560     JDK_VARIANT="normal"
7561 else
7562     as_fn_error $? "The available JDK variants are: normal" "$LINENO" 5
7563 fi
7564 
7565 
7566 
7567 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JDK_VARIANT" >&5
7568 $as_echo "$JDK_VARIANT" >&6; }
7569 
7570 
7571 
7572 ###############################################################################
7573 #
7574 # Check which variants of the JVM that we want to build.
7575 # Currently we have:
7576 #    server: normal interpreter and a tiered C1/C2 compiler
7577 #    client: normal interpreter and C1 (no C2 compiler) (only 32-bit platforms)
7578 #    minimal1: reduced form of client with optional VM services and features stripped out
7579 #    kernel: kernel footprint JVM that passes the TCK without major performance problems,
7580 #             ie normal interpreter and C1, only the serial GC, kernel jvmti etc
7581 #    zero: no machine code interpreter, no compiler
7582 #    zeroshark: zero interpreter and shark/llvm compiler backend
7583 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variants of the JVM to build" >&5
7584 $as_echo_n "checking which variants of the JVM to build... " >&6; }
7585 
7586 # Check whether --with-jvm-variants was given.
7587 if test "${with_jvm_variants+set}" = set; then :
7588   withval=$with_jvm_variants;
7589 fi
7590 
7591 
7592 if test "x$with_jvm_variants" = x; then
7593      with_jvm_variants="server"
7594 fi
7595 
7596 JVM_VARIANTS=",$with_jvm_variants,"
7597 TEST_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/server,//' -e 's/client,//'  -e 's/minimal1,//' -e 's/kernel,//' -e 's/zero,//' -e 's/zeroshark,//'`
7598 
7599 if test "x$TEST_VARIANTS" != "x,"; then
7600    as_fn_error $? "The available JVM variants are: server, client, minimal1, kernel, zero, zeroshark" "$LINENO" 5
7601 fi
7602 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_jvm_variants" >&5
7603 $as_echo "$with_jvm_variants" >&6; }
7604 
7605 JVM_VARIANT_SERVER=`$ECHO "$JVM_VARIANTS" | $SED -e '/,server,/!s/.*/false/g' -e '/,server,/s/.*/true/g'`
7606 JVM_VARIANT_CLIENT=`$ECHO "$JVM_VARIANTS" | $SED -e '/,client,/!s/.*/false/g' -e '/,client,/s/.*/true/g'`
7607 JVM_VARIANT_MINIMAL1=`$ECHO "$JVM_VARIANTS" | $SED -e '/,minimal1,/!s/.*/false/g' -e '/,minimal1,/s/.*/true/g'`
7608 JVM_VARIANT_KERNEL=`$ECHO "$JVM_VARIANTS" | $SED -e '/,kernel,/!s/.*/false/g' -e '/,kernel,/s/.*/true/g'`
7609 JVM_VARIANT_ZERO=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zero,/!s/.*/false/g' -e '/,zero,/s/.*/true/g'`
7610 JVM_VARIANT_ZEROSHARK=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zeroshark,/!s/.*/false/g' -e '/,zeroshark,/s/.*/true/g'`
7611 
7612 if test "x$JVM_VARIANT_CLIENT" = xtrue; then
7613     if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
7614         as_fn_error $? "You cannot build a client JVM for a 64-bit machine." "$LINENO" 5
7615     fi
7616 fi
7617 if test "x$JVM_VARIANT_KERNEL" = xtrue; then
7618     if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
7619         as_fn_error $? "You cannot build a kernel JVM for a 64-bit machine." "$LINENO" 5
7620     fi
7621 fi
7622 if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
7623     if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
7624         as_fn_error $? "You cannot build a minimal JVM for a 64-bit machine." "$LINENO" 5
7625     fi
7626 fi
7627 
7628 # Replace the commas with AND for use in the build directory name.
7629 ANDED_JVM_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/^,//' -e 's/,$//' -e 's/,/AND/'`
7630 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/'`
7631 if test "x$COUNT_VARIANTS" != "x,1"; then
7632     BUILDING_MULTIPLE_JVM_VARIANTS=yes
7633 else
7634     BUILDING_MULTIPLE_JVM_VARIANTS=no
7635 fi
7636 
7637 
7638 
7639 
7640 
7641 
7642 
7643 
7644 
7645 INCLUDE_SA=true
7646 if test "x$JVM_VARIANT_ZERO" = xtrue ; then
7647     INCLUDE_SA=false
7648 fi
7649 if test "x$JVM_VARIANT_ZEROSHARK" = xtrue ; then
7650     INCLUDE_SA=false
7651 fi
7652 
7653 
7654 if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
7655    MACOSX_UNIVERSAL="true"
7656 fi
7657 
7658 
7659 
7660 
7661 
7662 ###############################################################################
7663 #
7664 # Set the debug level
7665 #    release: no debug information, all optimizations, no asserts.
7666 #    fastdebug: debug information (-g), all optimizations, all asserts
7667 #    slowdebug: debug information (-g), no optimizations, all asserts
7668 #
7669 DEBUG_LEVEL="release"
7670 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which debug level to use" >&5
7671 $as_echo_n "checking which debug level to use... " >&6; }
7672 # Check whether --enable-debug was given.
7673 if test "${enable_debug+set}" = set; then :
7674   enableval=$enable_debug;
7675         ENABLE_DEBUG="${enableval}"
7676         DEBUG_LEVEL="fastdebug"
7677 
7678 else
7679   ENABLE_DEBUG="no"
7680 fi
7681 
7682 
7683 
7684 # Check whether --with-debug-level was given.
7685 if test "${with_debug_level+set}" = set; then :
7686   withval=$with_debug_level;
7687         DEBUG_LEVEL="${withval}"
7688         if test "x$ENABLE_DEBUG" = xyes; then
7689                         as_fn_error $? "You cannot use both --enable-debug and --with-debug-level at the same time." "$LINENO" 5
7690         fi
7691 
7692 fi
7693 
7694 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEBUG_LEVEL" >&5
7695 $as_echo "$DEBUG_LEVEL" >&6; }
7696 
7697 if test "x$DEBUG_LEVEL" != xrelease && \
7698    test "x$DEBUG_LEVEL" != xfastdebug && \
7699    test "x$DEBUG_LEVEL" != xslowdebug; then
7700    as_fn_error $? "Allowed debug levels are: release, fastdebug and slowdebug" "$LINENO" 5
7701 fi
7702 
7703 
7704 ###############################################################################
7705 #
7706 # Setup legacy vars/targets and new vars to deal with different debug levels.
7707 #
7708 
7709 case $DEBUG_LEVEL in
7710       release )
7711           VARIANT="OPT"
7712           FASTDEBUG="false"
7713           DEBUG_CLASSFILES="false"
7714           BUILD_VARIANT_RELEASE=""
7715           HOTSPOT_DEBUG_LEVEL="product"
7716           HOTSPOT_EXPORT="product"
7717            ;;
7718       fastdebug )
7719           VARIANT="DBG"
7720           FASTDEBUG="true"
7721           DEBUG_CLASSFILES="true"
7722           BUILD_VARIANT_RELEASE="-fastdebug"
7723           HOTSPOT_DEBUG_LEVEL="fastdebug"
7724           HOTSPOT_EXPORT="fastdebug"
7725            ;;
7726       slowdebug )
7727           VARIANT="DBG"
7728           FASTDEBUG="false"
7729           DEBUG_CLASSFILES="true"
7730           BUILD_VARIANT_RELEASE="-debug"
7731           HOTSPOT_DEBUG_LEVEL="jvmg"
7732           HOTSPOT_EXPORT="debug"
7733            ;;
7734 esac
7735 
7736 #####
7737 # Generate the legacy makefile targets for hotspot.
7738 # The hotspot api for selecting the build artifacts, really, needs to be improved.
7739 # JDK-7195896 will fix this on the hotspot side by using the JVM_VARIANT_* variables to
7740 # determine what needs to be built. All we will need to set here is all_product, all_fastdebug etc
7741 # But until then ...
7742 HOTSPOT_TARGET=""
7743 
7744 if test "x$JVM_VARIANT_SERVER" = xtrue; then
7745     HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL} "
7746 fi
7747 
7748 if test "x$JVM_VARIANT_CLIENT" = xtrue; then
7749     HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}1 "
7750 fi
7751 
7752 if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
7753     HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}minimal1 "
7754 fi
7755 
7756 if test "x$JVM_VARIANT_KERNEL" = xtrue; then
7757     HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}kernel "
7758 fi
7759 
7760 if test "x$JVM_VARIANT_ZERO" = xtrue; then
7761     HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}zero "
7762 fi
7763 
7764 if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
7765     HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}shark "
7766 fi
7767 
7768 HOTSPOT_TARGET="$HOTSPOT_TARGET docs export_$HOTSPOT_EXPORT"
7769 
7770 # On Macosx universal binaries are produced, but they only contain
7771 # 64 bit intel. This invalidates control of which jvms are built
7772 # from configure, but only server is valid anyway. Fix this
7773 # when hotspot makefiles are rewritten.
7774 if test "x$MACOSX_UNIVERSAL" = xtrue; then
7775     HOTSPOT_TARGET=universal_${HOTSPOT_EXPORT}
7776 fi
7777 
7778 #####
7779 
7780 
7781 
7782 
7783 
7784 
7785 
7786 
7787 # With basic setup done, call the custom early hook.
7788 
7789 
7790 # To properly create a configuration name, we need to have the OpenJDK target
7791 # and options (variants and debug level) parsed.
7792 
7793 
7794 
7795 # Check whether --with-conf-name was given.
7796 if test "${with_conf_name+set}" = set; then :
7797   withval=$with_conf_name;  CONF_NAME=${with_conf_name}
7798 fi
7799 
7800 
7801 # Test from where we are running configure, in or outside of src root.
7802 if test "x$CURDIR" = "x$SRC_ROOT" || test "x$CURDIR" = "x$SRC_ROOT/common" \
7803         || test "x$CURDIR" = "x$SRC_ROOT/common/autoconf" \
7804         || test "x$CURDIR" = "x$SRC_ROOT/common/makefiles" ; then
7805     # We are running configure from the src root.
7806     # Create a default ./build/target-variant-debuglevel output root.
7807     if test "x${CONF_NAME}" = x; then
7808         CONF_NAME="${OPENJDK_TARGET_OS}-${OPENJDK_TARGET_CPU}-${JDK_VARIANT}-${ANDED_JVM_VARIANTS}-${DEBUG_LEVEL}"
7809     fi
7810     OUTPUT_ROOT="$SRC_ROOT/build/${CONF_NAME}"
7811     $MKDIR -p "$OUTPUT_ROOT"
7812     if test ! -d "$OUTPUT_ROOT"; then
7813         as_fn_error $? "Could not create build directory $OUTPUT_ROOT" "$LINENO" 5
7814     fi
7815 else
7816     # We are running configure from outside of the src dir.
7817     # Then use the current directory as output dir!
7818     # If configuration is situated in normal build directory, just use the build
7819     # directory name as configuration name, otherwise use the complete path.
7820     if test "x${CONF_NAME}" = x; then
7821         CONF_NAME=`$ECHO $CURDIR | $SED -e "s!^${SRC_ROOT}/build/!!"`
7822     fi
7823     OUTPUT_ROOT="$CURDIR"
7824 
7825     # WARNING: This might be a bad thing to do. You need to be sure you want to
7826     # have a configuration in this directory. Do some sanity checks!
7827 
7828     if test ! -e "$OUTPUT_ROOT/spec.gmk"; then
7829       # If we have a spec.gmk, we have run here before and we are OK. Otherwise, check for
7830       # other files
7831       files_present=`$LS $OUTPUT_ROOT`
7832       # Configure has already touched config.log and confdefs.h in the current dir when this check
7833       # is performed.
7834       filtered_files=`$ECHO "$files_present" | $SED -e 's/config.log//g' -e 's/confdefs.h//g' -e 's/ //g' \
7835                                              | $TR -d '\n'`
7836       if test "x$filtered_files" != x; then
7837         { $as_echo "$as_me:${as_lineno-$LINENO}: Current directory is $CURDIR." >&5
7838 $as_echo "$as_me: Current directory is $CURDIR." >&6;}
7839         { $as_echo "$as_me:${as_lineno-$LINENO}: Since this is not the source root, configure will output the configuration here" >&5
7840 $as_echo "$as_me: Since this is not the source root, configure will output the configuration here" >&6;}
7841         { $as_echo "$as_me:${as_lineno-$LINENO}: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&5
7842 $as_echo "$as_me: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&6;}
7843         { $as_echo "$as_me:${as_lineno-$LINENO}: However, this directory is not empty. This is not allowed, since it could" >&5
7844 $as_echo "$as_me: However, this directory is not empty. This is not allowed, since it could" >&6;}
7845         { $as_echo "$as_me:${as_lineno-$LINENO}: seriously mess up just about everything." >&5
7846 $as_echo "$as_me: seriously mess up just about everything." >&6;}
7847         { $as_echo "$as_me:${as_lineno-$LINENO}: Try 'cd $SRC_ROOT' and restart configure" >&5
7848 $as_echo "$as_me: Try 'cd $SRC_ROOT' and restart configure" >&6;}
7849         { $as_echo "$as_me:${as_lineno-$LINENO}: (or create a new empty directory and cd to it)." >&5
7850 $as_echo "$as_me: (or create a new empty directory and cd to it)." >&6;}
7851         as_fn_error $? "Will not continue creating configuration in $CURDIR" "$LINENO" 5
7852       fi
7853     fi
7854 fi
7855 { $as_echo "$as_me:${as_lineno-$LINENO}: checking what configuration name to use" >&5
7856 $as_echo_n "checking what configuration name to use... " >&6; }
7857 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CONF_NAME" >&5
7858 $as_echo "$CONF_NAME" >&6; }
7859 
7860 
7861   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7862 
7863   # Input might be given as Windows format, start by converting to
7864   # unix format.
7865   path="$OUTPUT_ROOT"
7866   new_path=`$CYGPATH -u "$path"`
7867 
7868   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
7869   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
7870   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
7871   # "foo.exe" is OK but "foo" is an error.
7872   #
7873   # This test is therefore slightly more accurate than "test -f" to check for file precense.
7874   # It is also a way to make sure we got the proper file name for the real test later on.
7875   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
7876   if test "x$test_shortpath" = x; then
7877     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
7878 $as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
7879     as_fn_error $? "Cannot locate the the path of OUTPUT_ROOT" "$LINENO" 5
7880   fi
7881 
7882   # Call helper function which possibly converts this using DOS-style short mode.
7883   # If so, the updated path is stored in $new_path.
7884 
7885   input_path="$new_path"
7886   # Check if we need to convert this using DOS-style short mode. If the path
7887   # contains just simple characters, use it. Otherwise (spaces, weird characters),
7888   # take no chances and rewrite it.
7889   # Note: m4 eats our [], so we need to use [ and ] instead.
7890   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
7891   if test "x$has_forbidden_chars" != x; then
7892     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7893     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
7894     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
7895     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
7896       # Going to short mode and back again did indeed matter. Since short mode is
7897       # case insensitive, let's make it lowercase to improve readability.
7898       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7899       # Now convert it back to Unix-stile (cygpath)
7900       input_path=`$CYGPATH -u "$shortmode_path"`
7901       new_path="$input_path"
7902     fi
7903   fi
7904 
7905   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
7906   if test "x$test_cygdrive_prefix" = x; then
7907     # As a simple fix, exclude /usr/bin since it's not a real path.
7908     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
7909       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
7910       # a path prefixed by /cygdrive for fixpath to work.
7911       new_path="$CYGWIN_ROOT_PATH$input_path"
7912     fi
7913   fi
7914 
7915 
7916   if test "x$path" != "x$new_path"; then
7917     OUTPUT_ROOT="$new_path"
7918     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
7919 $as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
7920   fi
7921 
7922   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7923 
7924   path="$OUTPUT_ROOT"
7925   has_colon=`$ECHO $path | $GREP ^.:`
7926   new_path="$path"
7927   if test "x$has_colon" = x; then
7928     # Not in mixed or Windows style, start by that.
7929     new_path=`cmd //c echo $path`
7930   fi
7931 
7932 
7933   input_path="$new_path"
7934   # Check if we need to convert this using DOS-style short mode. If the path
7935   # contains just simple characters, use it. Otherwise (spaces, weird characters),
7936   # take no chances and rewrite it.
7937   # Note: m4 eats our [], so we need to use [ and ] instead.
7938   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
7939   if test "x$has_forbidden_chars" != x; then
7940     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7941     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7942   fi
7943 
7944 
7945   windows_path="$new_path"
7946   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7947     unix_path=`$CYGPATH -u "$windows_path"`
7948     new_path="$unix_path"
7949   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7950     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
7951     new_path="$unix_path"
7952   fi
7953 
7954   if test "x$path" != "x$new_path"; then
7955     OUTPUT_ROOT="$new_path"
7956     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
7957 $as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
7958   fi
7959 
7960   # Save the first 10 bytes of this path to the storage, so fixpath can work.
7961   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
7962 
7963   else
7964     # We're on a posix platform. Hooray! :)
7965     path="$OUTPUT_ROOT"
7966     has_space=`$ECHO "$path" | $GREP " "`
7967     if test "x$has_space" != x; then
7968       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
7969 $as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
7970       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
7971     fi
7972 
7973     # Use eval to expand a potential ~
7974     eval path="$path"
7975     if test ! -f "$path" && test ! -d "$path"; then
7976       as_fn_error $? "The path of OUTPUT_ROOT, which resolves as \"$path\", is not found." "$LINENO" 5
7977     fi
7978 
7979     OUTPUT_ROOT="`cd "$path"; $THEPWDCMD -L`"
7980   fi
7981 
7982 
7983 SPEC=$OUTPUT_ROOT/spec.gmk
7984 
7985 CONF_NAME=$CONF_NAME
7986 
7987 OUTPUT_ROOT=$OUTPUT_ROOT
7988 
7989 
7990 # Most of the probed defines are put into config.h
7991 ac_config_headers="$ac_config_headers $OUTPUT_ROOT/config.h:$AUTOCONF_DIR/config.h.in"
7992 
7993 # The spec.gmk file contains all variables for the make system.
7994 ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in"
7995 
7996 # The hotspot-spec.gmk file contains legacy variables for the hotspot make system.
7997 ac_config_files="$ac_config_files $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in"
7998 
7999 # The bootcycle-spec.gmk file contains support for boot cycle builds.
8000 ac_config_files="$ac_config_files $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in"
8001 
8002 # The compare.sh is used to compare the build output to other builds.
8003 ac_config_files="$ac_config_files $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in"
8004 
8005 # Spec.sh is currently used by compare-objects.sh
8006 ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.sh:$AUTOCONF_DIR/spec.sh.in"
8007 
8008 # The generated Makefile knows where the spec.gmk is and where the source is.
8009 # You can run make from the OUTPUT_ROOT, or from the top-level Makefile
8010 # which will look for generated configurations
8011 ac_config_files="$ac_config_files $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in"
8012 
8013 
8014 # Save the arguments given to us
8015 echo "$CONFIGURE_COMMAND_LINE" > $OUTPUT_ROOT/configure-arguments
8016 
8017 
8018 # Must be done before we can call HELP_MSG_MISSING_DEPENDENCY.
8019 
8020     for ac_prog in apt-get yum port pkgutil pkgadd
8021 do
8022   # Extract the first word of "$ac_prog", so it can be a program name with args.
8023 set dummy $ac_prog; ac_word=$2
8024 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8025 $as_echo_n "checking for $ac_word... " >&6; }
8026 if test "${ac_cv_prog_PKGHANDLER+set}" = set; then :
8027   $as_echo_n "(cached) " >&6
8028 else
8029   if test -n "$PKGHANDLER"; then
8030   ac_cv_prog_PKGHANDLER="$PKGHANDLER" # Let the user override the test.
8031 else
8032 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8033 for as_dir in $PATH
8034 do
8035   IFS=$as_save_IFS
8036   test -z "$as_dir" && as_dir=.
8037     for ac_exec_ext in '' $ac_executable_extensions; do
8038   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8039     ac_cv_prog_PKGHANDLER="$ac_prog"
8040     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8041     break 2
8042   fi
8043 done
8044   done
8045 IFS=$as_save_IFS
8046 
8047 fi
8048 fi
8049 PKGHANDLER=$ac_cv_prog_PKGHANDLER
8050 if test -n "$PKGHANDLER"; then
8051   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKGHANDLER" >&5
8052 $as_echo "$PKGHANDLER" >&6; }
8053 else
8054   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8055 $as_echo "no" >&6; }
8056 fi
8057 
8058 
8059   test -n "$PKGHANDLER" && break
8060 done
8061 
8062 
8063 
8064 # Setup tools that requires more complex handling, or that is not needed by the configure script.
8065 
8066 
8067   # We need to find a recent version of GNU make. Especially on Solaris, this can be tricky.
8068   if test "x$MAKE" != x; then
8069     # User has supplied a make, test it.
8070     if test ! -f "$MAKE"; then
8071       as_fn_error $? "The specified make (by MAKE=$MAKE) is not found." "$LINENO" 5
8072     fi
8073 
8074   MAKE_CANDIDATE=""$MAKE""
8075   DESCRIPTION="user supplied MAKE=$MAKE"
8076   if test "x$MAKE_CANDIDATE" != x; then
8077     { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
8078 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
8079     MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
8080     IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
8081     if test "x$IS_GNU_MAKE" = x; then
8082       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
8083 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
8084     else
8085       IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'`
8086       if test "x$IS_MODERN_MAKE" = x; then
8087         { $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
8088 $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;}
8089       else
8090         if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
8091           if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8092             MAKE_EXPECTED_ENV='cygwin'
8093           elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8094             MAKE_EXPECTED_ENV='msys'
8095           else
8096             as_fn_error $? "Unknown Windows environment" "$LINENO" 5
8097           fi
8098           MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
8099           IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
8100         else
8101           # Not relevant for non-Windows
8102           IS_MAKE_CORRECT_ENV=true
8103         fi
8104         if test "x$IS_MAKE_CORRECT_ENV" = x; then
8105           { $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
8106 $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;}
8107         else
8108           FOUND_MAKE=$MAKE_CANDIDATE
8109 
8110   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8111 
8112   # First separate the path from the arguments. This will split at the first
8113   # space.
8114   complete="$FOUND_MAKE"
8115   path="${complete%% *}"
8116   tmp="$complete EOL"
8117   arguments="${tmp#* }"
8118 
8119   # Input might be given as Windows format, start by converting to
8120   # unix format.
8121   new_path=`$CYGPATH -u "$path"`
8122 
8123   # Now try to locate executable using which
8124   new_path=`$WHICH "$new_path" 2> /dev/null`
8125   # bat and cmd files are not always considered executable in cygwin causing which
8126   # to not find them
8127   if test "x$new_path" = x \
8128            && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8129            && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8130     new_path=`$CYGPATH -u "$path"`
8131   fi
8132   if test "x$new_path" = x; then
8133     # Oops. Which didn't find the executable.
8134     # The splitting of arguments from the executable at a space might have been incorrect,
8135     # since paths with space are more likely in Windows. Give it another try with the whole
8136     # argument.
8137     path="$complete"
8138     arguments="EOL"
8139     new_path=`$CYGPATH -u "$path"`
8140     new_path=`$WHICH "$new_path" 2> /dev/null`
8141     # bat and cmd files are not always considered executable in cygwin causing which
8142     # to not find them
8143     if test "x$new_path" = x \
8144              && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8145              && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8146       new_path=`$CYGPATH -u "$path"`
8147     fi
8148     if test "x$new_path" = x; then
8149       # It's still not found. Now this is an unrecoverable error.
8150       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8151 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8152       has_space=`$ECHO "$complete" | $GREP " "`
8153       if test "x$has_space" != x; then
8154         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8155 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8156       fi
8157       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8158     fi
8159   fi
8160 
8161   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
8162   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
8163   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
8164   # "foo.exe" is OK but "foo" is an error.
8165   #
8166   # This test is therefore slightly more accurate than "test -f" to check for file precense.
8167   # It is also a way to make sure we got the proper file name for the real test later on.
8168   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
8169   if test "x$test_shortpath" = x; then
8170     # Short path failed, file does not exist as specified.
8171     # Try adding .exe or .cmd
8172     if test -f "${new_path}.exe"; then
8173        input_to_shortpath="${new_path}.exe"
8174     elif test -f "${new_path}.cmd"; then
8175        input_to_shortpath="${new_path}.cmd"
8176     else
8177       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
8178 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
8179       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
8180 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
8181       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8182     fi
8183   else
8184     input_to_shortpath="$new_path"
8185   fi
8186 
8187   # Call helper function which possibly converts this using DOS-style short mode.
8188   # If so, the updated path is stored in $new_path.
8189   new_path="$input_to_shortpath"
8190 
8191   input_path="$input_to_shortpath"
8192   # Check if we need to convert this using DOS-style short mode. If the path
8193   # contains just simple characters, use it. Otherwise (spaces, weird characters),
8194   # take no chances and rewrite it.
8195   # Note: m4 eats our [], so we need to use [ and ] instead.
8196   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
8197   if test "x$has_forbidden_chars" != x; then
8198     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8199     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
8200     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
8201     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
8202       # Going to short mode and back again did indeed matter. Since short mode is
8203       # case insensitive, let's make it lowercase to improve readability.
8204       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8205       # Now convert it back to Unix-stile (cygpath)
8206       input_path=`$CYGPATH -u "$shortmode_path"`
8207       new_path="$input_path"
8208     fi
8209   fi
8210 
8211   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
8212   if test "x$test_cygdrive_prefix" = x; then
8213     # As a simple fix, exclude /usr/bin since it's not a real path.
8214     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
8215       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
8216       # a path prefixed by /cygdrive for fixpath to work.
8217       new_path="$CYGWIN_ROOT_PATH$input_path"
8218     fi
8219   fi
8220 
8221   # remove trailing .exe if any
8222   new_path="${new_path/%.exe/}"
8223 
8224   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8225 
8226   # First separate the path from the arguments. This will split at the first
8227   # space.
8228   complete="$FOUND_MAKE"
8229   path="${complete%% *}"
8230   tmp="$complete EOL"
8231   arguments="${tmp#* }"
8232 
8233   # Input might be given as Windows format, start by converting to
8234   # unix format.
8235   new_path="$path"
8236 
8237   windows_path="$new_path"
8238   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8239     unix_path=`$CYGPATH -u "$windows_path"`
8240     new_path="$unix_path"
8241   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8242     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8243     new_path="$unix_path"
8244   fi
8245 
8246 
8247   # Now try to locate executable using which
8248   new_path=`$WHICH "$new_path" 2> /dev/null`
8249 
8250   if test "x$new_path" = x; then
8251     # Oops. Which didn't find the executable.
8252     # The splitting of arguments from the executable at a space might have been incorrect,
8253     # since paths with space are more likely in Windows. Give it another try with the whole
8254     # argument.
8255     path="$complete"
8256     arguments="EOL"
8257     new_path="$path"
8258 
8259   windows_path="$new_path"
8260   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8261     unix_path=`$CYGPATH -u "$windows_path"`
8262     new_path="$unix_path"
8263   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8264     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8265     new_path="$unix_path"
8266   fi
8267 
8268 
8269     new_path=`$WHICH "$new_path" 2> /dev/null`
8270 
8271     if test "x$new_path" = x; then
8272       # It's still not found. Now this is an unrecoverable error.
8273       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8274 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8275       has_space=`$ECHO "$complete" | $GREP " "`
8276       if test "x$has_space" != x; then
8277         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8278 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8279       fi
8280       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8281     fi
8282   fi
8283 
8284   # Now new_path has a complete unix path to the binary
8285   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
8286     # Keep paths in /bin as-is, but remove trailing .exe if any
8287     new_path="${new_path/%.exe/}"
8288     # Do not save /bin paths to all_fixpath_prefixes!
8289   else
8290     # Not in mixed or Windows style, start by that.
8291     new_path=`cmd //c echo $new_path`
8292 
8293   input_path="$new_path"
8294   # Check if we need to convert this using DOS-style short mode. If the path
8295   # contains just simple characters, use it. Otherwise (spaces, weird characters),
8296   # take no chances and rewrite it.
8297   # Note: m4 eats our [], so we need to use [ and ] instead.
8298   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
8299   if test "x$has_forbidden_chars" != x; then
8300     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8301     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8302   fi
8303 
8304     # Output is in $new_path
8305 
8306   windows_path="$new_path"
8307   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8308     unix_path=`$CYGPATH -u "$windows_path"`
8309     new_path="$unix_path"
8310   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8311     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8312     new_path="$unix_path"
8313   fi
8314 
8315     # remove trailing .exe if any
8316     new_path="${new_path/%.exe/}"
8317 
8318     # Save the first 10 bytes of this path to the storage, so fixpath can work.
8319     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
8320   fi
8321 
8322   else
8323     # We're on a posix platform. Hooray! :)
8324     # First separate the path from the arguments. This will split at the first
8325     # space.
8326     complete="$FOUND_MAKE"
8327     path="${complete%% *}"
8328     tmp="$complete EOL"
8329     arguments="${tmp#* }"
8330 
8331     # Cannot rely on the command "which" here since it doesn't always work.
8332     is_absolute_path=`$ECHO "$path" | $GREP ^/`
8333     if test -z "$is_absolute_path"; then
8334       # Path to executable is not absolute. Find it.
8335       IFS_save="$IFS"
8336       IFS=:
8337       for p in $PATH; do
8338         if test -f "$p/$path" && test -x "$p/$path"; then
8339           new_path="$p/$path"
8340           break
8341         fi
8342       done
8343       IFS="$IFS_save"
8344     else
8345       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
8346 $as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
8347       new_path="$path"
8348     fi
8349 
8350     if test "x$new_path" = x; then
8351         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8352 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8353         has_space=`$ECHO "$complete" | $GREP " "`
8354         if test "x$has_space" != x; then
8355           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
8356 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
8357         fi
8358         as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8359       fi
8360   fi
8361 
8362       # Now join together the path and the arguments once again
8363       if test "x$arguments" != xEOL; then
8364         new_complete="$new_path ${arguments% *}"
8365       else
8366         new_complete="$new_path"
8367       fi
8368 
8369   if test "x$complete" != "x$new_complete"; then
8370       FOUND_MAKE="$new_complete"
8371       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
8372 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
8373     fi
8374 
8375         fi
8376       fi
8377     fi
8378   fi
8379 
8380     if test "x$FOUND_MAKE" = x; then
8381       as_fn_error $? "The specified make (by MAKE=$MAKE) is not GNU make 3.81 or newer." "$LINENO" 5
8382     fi
8383   else
8384     # Try our hardest to locate a correct version of GNU make
8385     for ac_prog in gmake
8386 do
8387   # Extract the first word of "$ac_prog", so it can be a program name with args.
8388 set dummy $ac_prog; ac_word=$2
8389 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8390 $as_echo_n "checking for $ac_word... " >&6; }
8391 if test "${ac_cv_path_CHECK_GMAKE+set}" = set; then :
8392   $as_echo_n "(cached) " >&6
8393 else
8394   case $CHECK_GMAKE in
8395   [\\/]* | ?:[\\/]*)
8396   ac_cv_path_CHECK_GMAKE="$CHECK_GMAKE" # Let the user override the test with a path.
8397   ;;
8398   *)
8399   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8400 for as_dir in $PATH
8401 do
8402   IFS=$as_save_IFS
8403   test -z "$as_dir" && as_dir=.
8404     for ac_exec_ext in '' $ac_executable_extensions; do
8405   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8406     ac_cv_path_CHECK_GMAKE="$as_dir/$ac_word$ac_exec_ext"
8407     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8408     break 2
8409   fi
8410 done
8411   done
8412 IFS=$as_save_IFS
8413 
8414   ;;
8415 esac
8416 fi
8417 CHECK_GMAKE=$ac_cv_path_CHECK_GMAKE
8418 if test -n "$CHECK_GMAKE"; then
8419   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_GMAKE" >&5
8420 $as_echo "$CHECK_GMAKE" >&6; }
8421 else
8422   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8423 $as_echo "no" >&6; }
8424 fi
8425 
8426 
8427   test -n "$CHECK_GMAKE" && break
8428 done
8429 
8430 
8431   MAKE_CANDIDATE=""$CHECK_GMAKE""
8432   DESCRIPTION="gmake in PATH"
8433   if test "x$MAKE_CANDIDATE" != x; then
8434     { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
8435 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
8436     MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
8437     IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
8438     if test "x$IS_GNU_MAKE" = x; then
8439       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
8440 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
8441     else
8442       IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'`
8443       if test "x$IS_MODERN_MAKE" = x; then
8444         { $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
8445 $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;}
8446       else
8447         if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
8448           if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8449             MAKE_EXPECTED_ENV='cygwin'
8450           elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8451             MAKE_EXPECTED_ENV='msys'
8452           else
8453             as_fn_error $? "Unknown Windows environment" "$LINENO" 5
8454           fi
8455           MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
8456           IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
8457         else
8458           # Not relevant for non-Windows
8459           IS_MAKE_CORRECT_ENV=true
8460         fi
8461         if test "x$IS_MAKE_CORRECT_ENV" = x; then
8462           { $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
8463 $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;}
8464         else
8465           FOUND_MAKE=$MAKE_CANDIDATE
8466 
8467   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8468 
8469   # First separate the path from the arguments. This will split at the first
8470   # space.
8471   complete="$FOUND_MAKE"
8472   path="${complete%% *}"
8473   tmp="$complete EOL"
8474   arguments="${tmp#* }"
8475 
8476   # Input might be given as Windows format, start by converting to
8477   # unix format.
8478   new_path=`$CYGPATH -u "$path"`
8479 
8480   # Now try to locate executable using which
8481   new_path=`$WHICH "$new_path" 2> /dev/null`
8482   # bat and cmd files are not always considered executable in cygwin causing which
8483   # to not find them
8484   if test "x$new_path" = x \
8485            && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8486            && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8487     new_path=`$CYGPATH -u "$path"`
8488   fi
8489   if test "x$new_path" = x; then
8490     # Oops. Which didn't find the executable.
8491     # The splitting of arguments from the executable at a space might have been incorrect,
8492     # since paths with space are more likely in Windows. Give it another try with the whole
8493     # argument.
8494     path="$complete"
8495     arguments="EOL"
8496     new_path=`$CYGPATH -u "$path"`
8497     new_path=`$WHICH "$new_path" 2> /dev/null`
8498     # bat and cmd files are not always considered executable in cygwin causing which
8499     # to not find them
8500     if test "x$new_path" = x \
8501              && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8502              && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8503       new_path=`$CYGPATH -u "$path"`
8504     fi
8505     if test "x$new_path" = x; then
8506       # It's still not found. Now this is an unrecoverable error.
8507       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8508 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8509       has_space=`$ECHO "$complete" | $GREP " "`
8510       if test "x$has_space" != x; then
8511         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8512 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8513       fi
8514       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8515     fi
8516   fi
8517 
8518   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
8519   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
8520   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
8521   # "foo.exe" is OK but "foo" is an error.
8522   #
8523   # This test is therefore slightly more accurate than "test -f" to check for file precense.
8524   # It is also a way to make sure we got the proper file name for the real test later on.
8525   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
8526   if test "x$test_shortpath" = x; then
8527     # Short path failed, file does not exist as specified.
8528     # Try adding .exe or .cmd
8529     if test -f "${new_path}.exe"; then
8530        input_to_shortpath="${new_path}.exe"
8531     elif test -f "${new_path}.cmd"; then
8532        input_to_shortpath="${new_path}.cmd"
8533     else
8534       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
8535 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
8536       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
8537 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
8538       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8539     fi
8540   else
8541     input_to_shortpath="$new_path"
8542   fi
8543 
8544   # Call helper function which possibly converts this using DOS-style short mode.
8545   # If so, the updated path is stored in $new_path.
8546   new_path="$input_to_shortpath"
8547 
8548   input_path="$input_to_shortpath"
8549   # Check if we need to convert this using DOS-style short mode. If the path
8550   # contains just simple characters, use it. Otherwise (spaces, weird characters),
8551   # take no chances and rewrite it.
8552   # Note: m4 eats our [], so we need to use [ and ] instead.
8553   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
8554   if test "x$has_forbidden_chars" != x; then
8555     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8556     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
8557     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
8558     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
8559       # Going to short mode and back again did indeed matter. Since short mode is
8560       # case insensitive, let's make it lowercase to improve readability.
8561       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8562       # Now convert it back to Unix-stile (cygpath)
8563       input_path=`$CYGPATH -u "$shortmode_path"`
8564       new_path="$input_path"
8565     fi
8566   fi
8567 
8568   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
8569   if test "x$test_cygdrive_prefix" = x; then
8570     # As a simple fix, exclude /usr/bin since it's not a real path.
8571     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
8572       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
8573       # a path prefixed by /cygdrive for fixpath to work.
8574       new_path="$CYGWIN_ROOT_PATH$input_path"
8575     fi
8576   fi
8577 
8578   # remove trailing .exe if any
8579   new_path="${new_path/%.exe/}"
8580 
8581   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8582 
8583   # First separate the path from the arguments. This will split at the first
8584   # space.
8585   complete="$FOUND_MAKE"
8586   path="${complete%% *}"
8587   tmp="$complete EOL"
8588   arguments="${tmp#* }"
8589 
8590   # Input might be given as Windows format, start by converting to
8591   # unix format.
8592   new_path="$path"
8593 
8594   windows_path="$new_path"
8595   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8596     unix_path=`$CYGPATH -u "$windows_path"`
8597     new_path="$unix_path"
8598   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8599     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8600     new_path="$unix_path"
8601   fi
8602 
8603 
8604   # Now try to locate executable using which
8605   new_path=`$WHICH "$new_path" 2> /dev/null`
8606 
8607   if test "x$new_path" = x; then
8608     # Oops. Which didn't find the executable.
8609     # The splitting of arguments from the executable at a space might have been incorrect,
8610     # since paths with space are more likely in Windows. Give it another try with the whole
8611     # argument.
8612     path="$complete"
8613     arguments="EOL"
8614     new_path="$path"
8615 
8616   windows_path="$new_path"
8617   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8618     unix_path=`$CYGPATH -u "$windows_path"`
8619     new_path="$unix_path"
8620   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8621     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8622     new_path="$unix_path"
8623   fi
8624 
8625 
8626     new_path=`$WHICH "$new_path" 2> /dev/null`
8627 
8628     if test "x$new_path" = x; then
8629       # It's still not found. Now this is an unrecoverable error.
8630       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8631 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8632       has_space=`$ECHO "$complete" | $GREP " "`
8633       if test "x$has_space" != x; then
8634         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8635 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8636       fi
8637       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8638     fi
8639   fi
8640 
8641   # Now new_path has a complete unix path to the binary
8642   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
8643     # Keep paths in /bin as-is, but remove trailing .exe if any
8644     new_path="${new_path/%.exe/}"
8645     # Do not save /bin paths to all_fixpath_prefixes!
8646   else
8647     # Not in mixed or Windows style, start by that.
8648     new_path=`cmd //c echo $new_path`
8649 
8650   input_path="$new_path"
8651   # Check if we need to convert this using DOS-style short mode. If the path
8652   # contains just simple characters, use it. Otherwise (spaces, weird characters),
8653   # take no chances and rewrite it.
8654   # Note: m4 eats our [], so we need to use [ and ] instead.
8655   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
8656   if test "x$has_forbidden_chars" != x; then
8657     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8658     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8659   fi
8660 
8661     # Output is in $new_path
8662 
8663   windows_path="$new_path"
8664   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8665     unix_path=`$CYGPATH -u "$windows_path"`
8666     new_path="$unix_path"
8667   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8668     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8669     new_path="$unix_path"
8670   fi
8671 
8672     # remove trailing .exe if any
8673     new_path="${new_path/%.exe/}"
8674 
8675     # Save the first 10 bytes of this path to the storage, so fixpath can work.
8676     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
8677   fi
8678 
8679   else
8680     # We're on a posix platform. Hooray! :)
8681     # First separate the path from the arguments. This will split at the first
8682     # space.
8683     complete="$FOUND_MAKE"
8684     path="${complete%% *}"
8685     tmp="$complete EOL"
8686     arguments="${tmp#* }"
8687 
8688     # Cannot rely on the command "which" here since it doesn't always work.
8689     is_absolute_path=`$ECHO "$path" | $GREP ^/`
8690     if test -z "$is_absolute_path"; then
8691       # Path to executable is not absolute. Find it.
8692       IFS_save="$IFS"
8693       IFS=:
8694       for p in $PATH; do
8695         if test -f "$p/$path" && test -x "$p/$path"; then
8696           new_path="$p/$path"
8697           break
8698         fi
8699       done
8700       IFS="$IFS_save"
8701     else
8702       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
8703 $as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
8704       new_path="$path"
8705     fi
8706 
8707     if test "x$new_path" = x; then
8708         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8709 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8710         has_space=`$ECHO "$complete" | $GREP " "`
8711         if test "x$has_space" != x; then
8712           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
8713 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
8714         fi
8715         as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8716       fi
8717   fi
8718 
8719       # Now join together the path and the arguments once again
8720       if test "x$arguments" != xEOL; then
8721         new_complete="$new_path ${arguments% *}"
8722       else
8723         new_complete="$new_path"
8724       fi
8725 
8726   if test "x$complete" != "x$new_complete"; then
8727       FOUND_MAKE="$new_complete"
8728       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
8729 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
8730     fi
8731 
8732         fi
8733       fi
8734     fi
8735   fi
8736 
8737 
8738     if test "x$FOUND_MAKE" = x; then
8739       for ac_prog in make
8740 do
8741   # Extract the first word of "$ac_prog", so it can be a program name with args.
8742 set dummy $ac_prog; ac_word=$2
8743 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8744 $as_echo_n "checking for $ac_word... " >&6; }
8745 if test "${ac_cv_path_CHECK_MAKE+set}" = set; then :
8746   $as_echo_n "(cached) " >&6
8747 else
8748   case $CHECK_MAKE in
8749   [\\/]* | ?:[\\/]*)
8750   ac_cv_path_CHECK_MAKE="$CHECK_MAKE" # Let the user override the test with a path.
8751   ;;
8752   *)
8753   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8754 for as_dir in $PATH
8755 do
8756   IFS=$as_save_IFS
8757   test -z "$as_dir" && as_dir=.
8758     for ac_exec_ext in '' $ac_executable_extensions; do
8759   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8760     ac_cv_path_CHECK_MAKE="$as_dir/$ac_word$ac_exec_ext"
8761     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8762     break 2
8763   fi
8764 done
8765   done
8766 IFS=$as_save_IFS
8767 
8768   ;;
8769 esac
8770 fi
8771 CHECK_MAKE=$ac_cv_path_CHECK_MAKE
8772 if test -n "$CHECK_MAKE"; then
8773   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_MAKE" >&5
8774 $as_echo "$CHECK_MAKE" >&6; }
8775 else
8776   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8777 $as_echo "no" >&6; }
8778 fi
8779 
8780 
8781   test -n "$CHECK_MAKE" && break
8782 done
8783 
8784 
8785   MAKE_CANDIDATE=""$CHECK_MAKE""
8786   DESCRIPTION="make in PATH"
8787   if test "x$MAKE_CANDIDATE" != x; then
8788     { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
8789 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
8790     MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
8791     IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
8792     if test "x$IS_GNU_MAKE" = x; then
8793       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
8794 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
8795     else
8796       IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'`
8797       if test "x$IS_MODERN_MAKE" = x; then
8798         { $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
8799 $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;}
8800       else
8801         if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
8802           if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8803             MAKE_EXPECTED_ENV='cygwin'
8804           elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8805             MAKE_EXPECTED_ENV='msys'
8806           else
8807             as_fn_error $? "Unknown Windows environment" "$LINENO" 5
8808           fi
8809           MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
8810           IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
8811         else
8812           # Not relevant for non-Windows
8813           IS_MAKE_CORRECT_ENV=true
8814         fi
8815         if test "x$IS_MAKE_CORRECT_ENV" = x; then
8816           { $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
8817 $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;}
8818         else
8819           FOUND_MAKE=$MAKE_CANDIDATE
8820 
8821   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8822 
8823   # First separate the path from the arguments. This will split at the first
8824   # space.
8825   complete="$FOUND_MAKE"
8826   path="${complete%% *}"
8827   tmp="$complete EOL"
8828   arguments="${tmp#* }"
8829 
8830   # Input might be given as Windows format, start by converting to
8831   # unix format.
8832   new_path=`$CYGPATH -u "$path"`
8833 
8834   # Now try to locate executable using which
8835   new_path=`$WHICH "$new_path" 2> /dev/null`
8836   # bat and cmd files are not always considered executable in cygwin causing which
8837   # to not find them
8838   if test "x$new_path" = x \
8839            && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8840            && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8841     new_path=`$CYGPATH -u "$path"`
8842   fi
8843   if test "x$new_path" = x; then
8844     # Oops. Which didn't find the executable.
8845     # The splitting of arguments from the executable at a space might have been incorrect,
8846     # since paths with space are more likely in Windows. Give it another try with the whole
8847     # argument.
8848     path="$complete"
8849     arguments="EOL"
8850     new_path=`$CYGPATH -u "$path"`
8851     new_path=`$WHICH "$new_path" 2> /dev/null`
8852     # bat and cmd files are not always considered executable in cygwin causing which
8853     # to not find them
8854     if test "x$new_path" = x \
8855              && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8856              && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8857       new_path=`$CYGPATH -u "$path"`
8858     fi
8859     if test "x$new_path" = x; then
8860       # It's still not found. Now this is an unrecoverable error.
8861       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8862 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8863       has_space=`$ECHO "$complete" | $GREP " "`
8864       if test "x$has_space" != x; then
8865         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8866 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8867       fi
8868       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8869     fi
8870   fi
8871 
8872   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
8873   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
8874   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
8875   # "foo.exe" is OK but "foo" is an error.
8876   #
8877   # This test is therefore slightly more accurate than "test -f" to check for file precense.
8878   # It is also a way to make sure we got the proper file name for the real test later on.
8879   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
8880   if test "x$test_shortpath" = x; then
8881     # Short path failed, file does not exist as specified.
8882     # Try adding .exe or .cmd
8883     if test -f "${new_path}.exe"; then
8884        input_to_shortpath="${new_path}.exe"
8885     elif test -f "${new_path}.cmd"; then
8886        input_to_shortpath="${new_path}.cmd"
8887     else
8888       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
8889 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
8890       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
8891 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
8892       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8893     fi
8894   else
8895     input_to_shortpath="$new_path"
8896   fi
8897 
8898   # Call helper function which possibly converts this using DOS-style short mode.
8899   # If so, the updated path is stored in $new_path.
8900   new_path="$input_to_shortpath"
8901 
8902   input_path="$input_to_shortpath"
8903   # Check if we need to convert this using DOS-style short mode. If the path
8904   # contains just simple characters, use it. Otherwise (spaces, weird characters),
8905   # take no chances and rewrite it.
8906   # Note: m4 eats our [], so we need to use [ and ] instead.
8907   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
8908   if test "x$has_forbidden_chars" != x; then
8909     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8910     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
8911     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
8912     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
8913       # Going to short mode and back again did indeed matter. Since short mode is
8914       # case insensitive, let's make it lowercase to improve readability.
8915       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8916       # Now convert it back to Unix-stile (cygpath)
8917       input_path=`$CYGPATH -u "$shortmode_path"`
8918       new_path="$input_path"
8919     fi
8920   fi
8921 
8922   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
8923   if test "x$test_cygdrive_prefix" = x; then
8924     # As a simple fix, exclude /usr/bin since it's not a real path.
8925     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
8926       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
8927       # a path prefixed by /cygdrive for fixpath to work.
8928       new_path="$CYGWIN_ROOT_PATH$input_path"
8929     fi
8930   fi
8931 
8932   # remove trailing .exe if any
8933   new_path="${new_path/%.exe/}"
8934 
8935   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8936 
8937   # First separate the path from the arguments. This will split at the first
8938   # space.
8939   complete="$FOUND_MAKE"
8940   path="${complete%% *}"
8941   tmp="$complete EOL"
8942   arguments="${tmp#* }"
8943 
8944   # Input might be given as Windows format, start by converting to
8945   # unix format.
8946   new_path="$path"
8947 
8948   windows_path="$new_path"
8949   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8950     unix_path=`$CYGPATH -u "$windows_path"`
8951     new_path="$unix_path"
8952   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8953     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8954     new_path="$unix_path"
8955   fi
8956 
8957 
8958   # Now try to locate executable using which
8959   new_path=`$WHICH "$new_path" 2> /dev/null`
8960 
8961   if test "x$new_path" = x; then
8962     # Oops. Which didn't find the executable.
8963     # The splitting of arguments from the executable at a space might have been incorrect,
8964     # since paths with space are more likely in Windows. Give it another try with the whole
8965     # argument.
8966     path="$complete"
8967     arguments="EOL"
8968     new_path="$path"
8969 
8970   windows_path="$new_path"
8971   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8972     unix_path=`$CYGPATH -u "$windows_path"`
8973     new_path="$unix_path"
8974   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8975     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8976     new_path="$unix_path"
8977   fi
8978 
8979 
8980     new_path=`$WHICH "$new_path" 2> /dev/null`
8981 
8982     if test "x$new_path" = x; then
8983       # It's still not found. Now this is an unrecoverable error.
8984       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8985 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8986       has_space=`$ECHO "$complete" | $GREP " "`
8987       if test "x$has_space" != x; then
8988         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8989 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8990       fi
8991       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8992     fi
8993   fi
8994 
8995   # Now new_path has a complete unix path to the binary
8996   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
8997     # Keep paths in /bin as-is, but remove trailing .exe if any
8998     new_path="${new_path/%.exe/}"
8999     # Do not save /bin paths to all_fixpath_prefixes!
9000   else
9001     # Not in mixed or Windows style, start by that.
9002     new_path=`cmd //c echo $new_path`
9003 
9004   input_path="$new_path"
9005   # Check if we need to convert this using DOS-style short mode. If the path
9006   # contains just simple characters, use it. Otherwise (spaces, weird characters),
9007   # take no chances and rewrite it.
9008   # Note: m4 eats our [], so we need to use [ and ] instead.
9009   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
9010   if test "x$has_forbidden_chars" != x; then
9011     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9012     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9013   fi
9014 
9015     # Output is in $new_path
9016 
9017   windows_path="$new_path"
9018   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9019     unix_path=`$CYGPATH -u "$windows_path"`
9020     new_path="$unix_path"
9021   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9022     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9023     new_path="$unix_path"
9024   fi
9025 
9026     # remove trailing .exe if any
9027     new_path="${new_path/%.exe/}"
9028 
9029     # Save the first 10 bytes of this path to the storage, so fixpath can work.
9030     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
9031   fi
9032 
9033   else
9034     # We're on a posix platform. Hooray! :)
9035     # First separate the path from the arguments. This will split at the first
9036     # space.
9037     complete="$FOUND_MAKE"
9038     path="${complete%% *}"
9039     tmp="$complete EOL"
9040     arguments="${tmp#* }"
9041 
9042     # Cannot rely on the command "which" here since it doesn't always work.
9043     is_absolute_path=`$ECHO "$path" | $GREP ^/`
9044     if test -z "$is_absolute_path"; then
9045       # Path to executable is not absolute. Find it.
9046       IFS_save="$IFS"
9047       IFS=:
9048       for p in $PATH; do
9049         if test -f "$p/$path" && test -x "$p/$path"; then
9050           new_path="$p/$path"
9051           break
9052         fi
9053       done
9054       IFS="$IFS_save"
9055     else
9056       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
9057 $as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
9058       new_path="$path"
9059     fi
9060 
9061     if test "x$new_path" = x; then
9062         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9063 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9064         has_space=`$ECHO "$complete" | $GREP " "`
9065         if test "x$has_space" != x; then
9066           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
9067 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
9068         fi
9069         as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9070       fi
9071   fi
9072 
9073       # Now join together the path and the arguments once again
9074       if test "x$arguments" != xEOL; then
9075         new_complete="$new_path ${arguments% *}"
9076       else
9077         new_complete="$new_path"
9078       fi
9079 
9080   if test "x$complete" != "x$new_complete"; then
9081       FOUND_MAKE="$new_complete"
9082       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
9083 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
9084     fi
9085 
9086         fi
9087       fi
9088     fi
9089   fi
9090 
9091     fi
9092 
9093     if test "x$FOUND_MAKE" = x; then
9094       if test "x$TOOLS_DIR" != x; then
9095         # We have a tools-dir, check that as well before giving up.
9096         OLD_PATH=$PATH
9097         PATH=$TOOLS_DIR:$PATH
9098         for ac_prog in gmake
9099 do
9100   # Extract the first word of "$ac_prog", so it can be a program name with args.
9101 set dummy $ac_prog; ac_word=$2
9102 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9103 $as_echo_n "checking for $ac_word... " >&6; }
9104 if test "${ac_cv_path_CHECK_TOOLSDIR_GMAKE+set}" = set; then :
9105   $as_echo_n "(cached) " >&6
9106 else
9107   case $CHECK_TOOLSDIR_GMAKE in
9108   [\\/]* | ?:[\\/]*)
9109   ac_cv_path_CHECK_TOOLSDIR_GMAKE="$CHECK_TOOLSDIR_GMAKE" # Let the user override the test with a path.
9110   ;;
9111   *)
9112   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9113 for as_dir in $PATH
9114 do
9115   IFS=$as_save_IFS
9116   test -z "$as_dir" && as_dir=.
9117     for ac_exec_ext in '' $ac_executable_extensions; do
9118   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9119     ac_cv_path_CHECK_TOOLSDIR_GMAKE="$as_dir/$ac_word$ac_exec_ext"
9120     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9121     break 2
9122   fi
9123 done
9124   done
9125 IFS=$as_save_IFS
9126 
9127   ;;
9128 esac
9129 fi
9130 CHECK_TOOLSDIR_GMAKE=$ac_cv_path_CHECK_TOOLSDIR_GMAKE
9131 if test -n "$CHECK_TOOLSDIR_GMAKE"; then
9132   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_GMAKE" >&5
9133 $as_echo "$CHECK_TOOLSDIR_GMAKE" >&6; }
9134 else
9135   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9136 $as_echo "no" >&6; }
9137 fi
9138 
9139 
9140   test -n "$CHECK_TOOLSDIR_GMAKE" && break
9141 done
9142 
9143 
9144   MAKE_CANDIDATE=""$CHECK_TOOLSDIR_GMAKE""
9145   DESCRIPTION="gmake in tools-dir"
9146   if test "x$MAKE_CANDIDATE" != x; then
9147     { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
9148 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
9149     MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
9150     IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
9151     if test "x$IS_GNU_MAKE" = x; then
9152       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
9153 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
9154     else
9155       IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'`
9156       if test "x$IS_MODERN_MAKE" = x; then
9157         { $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
9158 $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;}
9159       else
9160         if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
9161           if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9162             MAKE_EXPECTED_ENV='cygwin'
9163           elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9164             MAKE_EXPECTED_ENV='msys'
9165           else
9166             as_fn_error $? "Unknown Windows environment" "$LINENO" 5
9167           fi
9168           MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
9169           IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
9170         else
9171           # Not relevant for non-Windows
9172           IS_MAKE_CORRECT_ENV=true
9173         fi
9174         if test "x$IS_MAKE_CORRECT_ENV" = x; then
9175           { $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
9176 $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;}
9177         else
9178           FOUND_MAKE=$MAKE_CANDIDATE
9179 
9180   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9181 
9182   # First separate the path from the arguments. This will split at the first
9183   # space.
9184   complete="$FOUND_MAKE"
9185   path="${complete%% *}"
9186   tmp="$complete EOL"
9187   arguments="${tmp#* }"
9188 
9189   # Input might be given as Windows format, start by converting to
9190   # unix format.
9191   new_path=`$CYGPATH -u "$path"`
9192 
9193   # Now try to locate executable using which
9194   new_path=`$WHICH "$new_path" 2> /dev/null`
9195   # bat and cmd files are not always considered executable in cygwin causing which
9196   # to not find them
9197   if test "x$new_path" = x \
9198            && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
9199            && test "x`$LS \"$path\" 2>/dev/null`" != x; then
9200     new_path=`$CYGPATH -u "$path"`
9201   fi
9202   if test "x$new_path" = x; then
9203     # Oops. Which didn't find the executable.
9204     # The splitting of arguments from the executable at a space might have been incorrect,
9205     # since paths with space are more likely in Windows. Give it another try with the whole
9206     # argument.
9207     path="$complete"
9208     arguments="EOL"
9209     new_path=`$CYGPATH -u "$path"`
9210     new_path=`$WHICH "$new_path" 2> /dev/null`
9211     # bat and cmd files are not always considered executable in cygwin causing which
9212     # to not find them
9213     if test "x$new_path" = x \
9214              && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
9215              && test "x`$LS \"$path\" 2>/dev/null`" != x; then
9216       new_path=`$CYGPATH -u "$path"`
9217     fi
9218     if test "x$new_path" = x; then
9219       # It's still not found. Now this is an unrecoverable error.
9220       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9221 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9222       has_space=`$ECHO "$complete" | $GREP " "`
9223       if test "x$has_space" != x; then
9224         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9225 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9226       fi
9227       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9228     fi
9229   fi
9230 
9231   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
9232   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
9233   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
9234   # "foo.exe" is OK but "foo" is an error.
9235   #
9236   # This test is therefore slightly more accurate than "test -f" to check for file precense.
9237   # It is also a way to make sure we got the proper file name for the real test later on.
9238   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
9239   if test "x$test_shortpath" = x; then
9240     # Short path failed, file does not exist as specified.
9241     # Try adding .exe or .cmd
9242     if test -f "${new_path}.exe"; then
9243        input_to_shortpath="${new_path}.exe"
9244     elif test -f "${new_path}.cmd"; then
9245        input_to_shortpath="${new_path}.cmd"
9246     else
9247       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
9248 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
9249       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
9250 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
9251       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9252     fi
9253   else
9254     input_to_shortpath="$new_path"
9255   fi
9256 
9257   # Call helper function which possibly converts this using DOS-style short mode.
9258   # If so, the updated path is stored in $new_path.
9259   new_path="$input_to_shortpath"
9260 
9261   input_path="$input_to_shortpath"
9262   # Check if we need to convert this using DOS-style short mode. If the path
9263   # contains just simple characters, use it. Otherwise (spaces, weird characters),
9264   # take no chances and rewrite it.
9265   # Note: m4 eats our [], so we need to use [ and ] instead.
9266   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
9267   if test "x$has_forbidden_chars" != x; then
9268     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9269     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
9270     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
9271     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
9272       # Going to short mode and back again did indeed matter. Since short mode is
9273       # case insensitive, let's make it lowercase to improve readability.
9274       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9275       # Now convert it back to Unix-stile (cygpath)
9276       input_path=`$CYGPATH -u "$shortmode_path"`
9277       new_path="$input_path"
9278     fi
9279   fi
9280 
9281   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
9282   if test "x$test_cygdrive_prefix" = x; then
9283     # As a simple fix, exclude /usr/bin since it's not a real path.
9284     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
9285       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
9286       # a path prefixed by /cygdrive for fixpath to work.
9287       new_path="$CYGWIN_ROOT_PATH$input_path"
9288     fi
9289   fi
9290 
9291   # remove trailing .exe if any
9292   new_path="${new_path/%.exe/}"
9293 
9294   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9295 
9296   # First separate the path from the arguments. This will split at the first
9297   # space.
9298   complete="$FOUND_MAKE"
9299   path="${complete%% *}"
9300   tmp="$complete EOL"
9301   arguments="${tmp#* }"
9302 
9303   # Input might be given as Windows format, start by converting to
9304   # unix format.
9305   new_path="$path"
9306 
9307   windows_path="$new_path"
9308   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9309     unix_path=`$CYGPATH -u "$windows_path"`
9310     new_path="$unix_path"
9311   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9312     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9313     new_path="$unix_path"
9314   fi
9315 
9316 
9317   # Now try to locate executable using which
9318   new_path=`$WHICH "$new_path" 2> /dev/null`
9319 
9320   if test "x$new_path" = x; then
9321     # Oops. Which didn't find the executable.
9322     # The splitting of arguments from the executable at a space might have been incorrect,
9323     # since paths with space are more likely in Windows. Give it another try with the whole
9324     # argument.
9325     path="$complete"
9326     arguments="EOL"
9327     new_path="$path"
9328 
9329   windows_path="$new_path"
9330   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9331     unix_path=`$CYGPATH -u "$windows_path"`
9332     new_path="$unix_path"
9333   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9334     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9335     new_path="$unix_path"
9336   fi
9337 
9338 
9339     new_path=`$WHICH "$new_path" 2> /dev/null`
9340 
9341     if test "x$new_path" = x; then
9342       # It's still not found. Now this is an unrecoverable error.
9343       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9344 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9345       has_space=`$ECHO "$complete" | $GREP " "`
9346       if test "x$has_space" != x; then
9347         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9348 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9349       fi
9350       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9351     fi
9352   fi
9353 
9354   # Now new_path has a complete unix path to the binary
9355   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
9356     # Keep paths in /bin as-is, but remove trailing .exe if any
9357     new_path="${new_path/%.exe/}"
9358     # Do not save /bin paths to all_fixpath_prefixes!
9359   else
9360     # Not in mixed or Windows style, start by that.
9361     new_path=`cmd //c echo $new_path`
9362 
9363   input_path="$new_path"
9364   # Check if we need to convert this using DOS-style short mode. If the path
9365   # contains just simple characters, use it. Otherwise (spaces, weird characters),
9366   # take no chances and rewrite it.
9367   # Note: m4 eats our [], so we need to use [ and ] instead.
9368   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
9369   if test "x$has_forbidden_chars" != x; then
9370     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9371     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9372   fi
9373 
9374     # Output is in $new_path
9375 
9376   windows_path="$new_path"
9377   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9378     unix_path=`$CYGPATH -u "$windows_path"`
9379     new_path="$unix_path"
9380   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9381     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9382     new_path="$unix_path"
9383   fi
9384 
9385     # remove trailing .exe if any
9386     new_path="${new_path/%.exe/}"
9387 
9388     # Save the first 10 bytes of this path to the storage, so fixpath can work.
9389     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
9390   fi
9391 
9392   else
9393     # We're on a posix platform. Hooray! :)
9394     # First separate the path from the arguments. This will split at the first
9395     # space.
9396     complete="$FOUND_MAKE"
9397     path="${complete%% *}"
9398     tmp="$complete EOL"
9399     arguments="${tmp#* }"
9400 
9401     # Cannot rely on the command "which" here since it doesn't always work.
9402     is_absolute_path=`$ECHO "$path" | $GREP ^/`
9403     if test -z "$is_absolute_path"; then
9404       # Path to executable is not absolute. Find it.
9405       IFS_save="$IFS"
9406       IFS=:
9407       for p in $PATH; do
9408         if test -f "$p/$path" && test -x "$p/$path"; then
9409           new_path="$p/$path"
9410           break
9411         fi
9412       done
9413       IFS="$IFS_save"
9414     else
9415       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
9416 $as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
9417       new_path="$path"
9418     fi
9419 
9420     if test "x$new_path" = x; then
9421         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9422 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9423         has_space=`$ECHO "$complete" | $GREP " "`
9424         if test "x$has_space" != x; then
9425           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
9426 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
9427         fi
9428         as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9429       fi
9430   fi
9431 
9432       # Now join together the path and the arguments once again
9433       if test "x$arguments" != xEOL; then
9434         new_complete="$new_path ${arguments% *}"
9435       else
9436         new_complete="$new_path"
9437       fi
9438 
9439   if test "x$complete" != "x$new_complete"; then
9440       FOUND_MAKE="$new_complete"
9441       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
9442 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
9443     fi
9444 
9445         fi
9446       fi
9447     fi
9448   fi
9449 
9450         if test "x$FOUND_MAKE" = x; then
9451           for ac_prog in make
9452 do
9453   # Extract the first word of "$ac_prog", so it can be a program name with args.
9454 set dummy $ac_prog; ac_word=$2
9455 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9456 $as_echo_n "checking for $ac_word... " >&6; }
9457 if test "${ac_cv_path_CHECK_TOOLSDIR_MAKE+set}" = set; then :
9458   $as_echo_n "(cached) " >&6
9459 else
9460   case $CHECK_TOOLSDIR_MAKE in
9461   [\\/]* | ?:[\\/]*)
9462   ac_cv_path_CHECK_TOOLSDIR_MAKE="$CHECK_TOOLSDIR_MAKE" # Let the user override the test with a path.
9463   ;;
9464   *)
9465   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9466 for as_dir in $PATH
9467 do
9468   IFS=$as_save_IFS
9469   test -z "$as_dir" && as_dir=.
9470     for ac_exec_ext in '' $ac_executable_extensions; do
9471   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9472     ac_cv_path_CHECK_TOOLSDIR_MAKE="$as_dir/$ac_word$ac_exec_ext"
9473     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9474     break 2
9475   fi
9476 done
9477   done
9478 IFS=$as_save_IFS
9479 
9480   ;;
9481 esac
9482 fi
9483 CHECK_TOOLSDIR_MAKE=$ac_cv_path_CHECK_TOOLSDIR_MAKE
9484 if test -n "$CHECK_TOOLSDIR_MAKE"; then
9485   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_MAKE" >&5
9486 $as_echo "$CHECK_TOOLSDIR_MAKE" >&6; }
9487 else
9488   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9489 $as_echo "no" >&6; }
9490 fi
9491 
9492 
9493   test -n "$CHECK_TOOLSDIR_MAKE" && break
9494 done
9495 
9496 
9497   MAKE_CANDIDATE=""$CHECK_TOOLSDIR_MAKE""
9498   DESCRIPTION="make in tools-dir"
9499   if test "x$MAKE_CANDIDATE" != x; then
9500     { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
9501 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
9502     MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
9503     IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
9504     if test "x$IS_GNU_MAKE" = x; then
9505       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
9506 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
9507     else
9508       IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'`
9509       if test "x$IS_MODERN_MAKE" = x; then
9510         { $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
9511 $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;}
9512       else
9513         if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
9514           if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9515             MAKE_EXPECTED_ENV='cygwin'
9516           elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9517             MAKE_EXPECTED_ENV='msys'
9518           else
9519             as_fn_error $? "Unknown Windows environment" "$LINENO" 5
9520           fi
9521           MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
9522           IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
9523         else
9524           # Not relevant for non-Windows
9525           IS_MAKE_CORRECT_ENV=true
9526         fi
9527         if test "x$IS_MAKE_CORRECT_ENV" = x; then
9528           { $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
9529 $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;}
9530         else
9531           FOUND_MAKE=$MAKE_CANDIDATE
9532 
9533   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9534 
9535   # First separate the path from the arguments. This will split at the first
9536   # space.
9537   complete="$FOUND_MAKE"
9538   path="${complete%% *}"
9539   tmp="$complete EOL"
9540   arguments="${tmp#* }"
9541 
9542   # Input might be given as Windows format, start by converting to
9543   # unix format.
9544   new_path=`$CYGPATH -u "$path"`
9545 
9546   # Now try to locate executable using which
9547   new_path=`$WHICH "$new_path" 2> /dev/null`
9548   # bat and cmd files are not always considered executable in cygwin causing which
9549   # to not find them
9550   if test "x$new_path" = x \
9551            && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
9552            && test "x`$LS \"$path\" 2>/dev/null`" != x; then
9553     new_path=`$CYGPATH -u "$path"`
9554   fi
9555   if test "x$new_path" = x; then
9556     # Oops. Which didn't find the executable.
9557     # The splitting of arguments from the executable at a space might have been incorrect,
9558     # since paths with space are more likely in Windows. Give it another try with the whole
9559     # argument.
9560     path="$complete"
9561     arguments="EOL"
9562     new_path=`$CYGPATH -u "$path"`
9563     new_path=`$WHICH "$new_path" 2> /dev/null`
9564     # bat and cmd files are not always considered executable in cygwin causing which
9565     # to not find them
9566     if test "x$new_path" = x \
9567              && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
9568              && test "x`$LS \"$path\" 2>/dev/null`" != x; then
9569       new_path=`$CYGPATH -u "$path"`
9570     fi
9571     if test "x$new_path" = x; then
9572       # It's still not found. Now this is an unrecoverable error.
9573       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9574 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9575       has_space=`$ECHO "$complete" | $GREP " "`
9576       if test "x$has_space" != x; then
9577         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9578 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9579       fi
9580       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9581     fi
9582   fi
9583 
9584   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
9585   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
9586   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
9587   # "foo.exe" is OK but "foo" is an error.
9588   #
9589   # This test is therefore slightly more accurate than "test -f" to check for file precense.
9590   # It is also a way to make sure we got the proper file name for the real test later on.
9591   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
9592   if test "x$test_shortpath" = x; then
9593     # Short path failed, file does not exist as specified.
9594     # Try adding .exe or .cmd
9595     if test -f "${new_path}.exe"; then
9596        input_to_shortpath="${new_path}.exe"
9597     elif test -f "${new_path}.cmd"; then
9598        input_to_shortpath="${new_path}.cmd"
9599     else
9600       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
9601 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
9602       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
9603 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
9604       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9605     fi
9606   else
9607     input_to_shortpath="$new_path"
9608   fi
9609 
9610   # Call helper function which possibly converts this using DOS-style short mode.
9611   # If so, the updated path is stored in $new_path.
9612   new_path="$input_to_shortpath"
9613 
9614   input_path="$input_to_shortpath"
9615   # Check if we need to convert this using DOS-style short mode. If the path
9616   # contains just simple characters, use it. Otherwise (spaces, weird characters),
9617   # take no chances and rewrite it.
9618   # Note: m4 eats our [], so we need to use [ and ] instead.
9619   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
9620   if test "x$has_forbidden_chars" != x; then
9621     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9622     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
9623     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
9624     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
9625       # Going to short mode and back again did indeed matter. Since short mode is
9626       # case insensitive, let's make it lowercase to improve readability.
9627       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9628       # Now convert it back to Unix-stile (cygpath)
9629       input_path=`$CYGPATH -u "$shortmode_path"`
9630       new_path="$input_path"
9631     fi
9632   fi
9633 
9634   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
9635   if test "x$test_cygdrive_prefix" = x; then
9636     # As a simple fix, exclude /usr/bin since it's not a real path.
9637     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
9638       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
9639       # a path prefixed by /cygdrive for fixpath to work.
9640       new_path="$CYGWIN_ROOT_PATH$input_path"
9641     fi
9642   fi
9643 
9644   # remove trailing .exe if any
9645   new_path="${new_path/%.exe/}"
9646 
9647   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9648 
9649   # First separate the path from the arguments. This will split at the first
9650   # space.
9651   complete="$FOUND_MAKE"
9652   path="${complete%% *}"
9653   tmp="$complete EOL"
9654   arguments="${tmp#* }"
9655 
9656   # Input might be given as Windows format, start by converting to
9657   # unix format.
9658   new_path="$path"
9659 
9660   windows_path="$new_path"
9661   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9662     unix_path=`$CYGPATH -u "$windows_path"`
9663     new_path="$unix_path"
9664   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9665     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9666     new_path="$unix_path"
9667   fi
9668 
9669 
9670   # Now try to locate executable using which
9671   new_path=`$WHICH "$new_path" 2> /dev/null`
9672 
9673   if test "x$new_path" = x; then
9674     # Oops. Which didn't find the executable.
9675     # The splitting of arguments from the executable at a space might have been incorrect,
9676     # since paths with space are more likely in Windows. Give it another try with the whole
9677     # argument.
9678     path="$complete"
9679     arguments="EOL"
9680     new_path="$path"
9681 
9682   windows_path="$new_path"
9683   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9684     unix_path=`$CYGPATH -u "$windows_path"`
9685     new_path="$unix_path"
9686   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9687     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9688     new_path="$unix_path"
9689   fi
9690 
9691 
9692     new_path=`$WHICH "$new_path" 2> /dev/null`
9693 
9694     if test "x$new_path" = x; then
9695       # It's still not found. Now this is an unrecoverable error.
9696       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9697 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9698       has_space=`$ECHO "$complete" | $GREP " "`
9699       if test "x$has_space" != x; then
9700         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9701 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9702       fi
9703       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9704     fi
9705   fi
9706 
9707   # Now new_path has a complete unix path to the binary
9708   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
9709     # Keep paths in /bin as-is, but remove trailing .exe if any
9710     new_path="${new_path/%.exe/}"
9711     # Do not save /bin paths to all_fixpath_prefixes!
9712   else
9713     # Not in mixed or Windows style, start by that.
9714     new_path=`cmd //c echo $new_path`
9715 
9716   input_path="$new_path"
9717   # Check if we need to convert this using DOS-style short mode. If the path
9718   # contains just simple characters, use it. Otherwise (spaces, weird characters),
9719   # take no chances and rewrite it.
9720   # Note: m4 eats our [], so we need to use [ and ] instead.
9721   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
9722   if test "x$has_forbidden_chars" != x; then
9723     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9724     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9725   fi
9726 
9727     # Output is in $new_path
9728 
9729   windows_path="$new_path"
9730   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9731     unix_path=`$CYGPATH -u "$windows_path"`
9732     new_path="$unix_path"
9733   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9734     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9735     new_path="$unix_path"
9736   fi
9737 
9738     # remove trailing .exe if any
9739     new_path="${new_path/%.exe/}"
9740 
9741     # Save the first 10 bytes of this path to the storage, so fixpath can work.
9742     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
9743   fi
9744 
9745   else
9746     # We're on a posix platform. Hooray! :)
9747     # First separate the path from the arguments. This will split at the first
9748     # space.
9749     complete="$FOUND_MAKE"
9750     path="${complete%% *}"
9751     tmp="$complete EOL"
9752     arguments="${tmp#* }"
9753 
9754     # Cannot rely on the command "which" here since it doesn't always work.
9755     is_absolute_path=`$ECHO "$path" | $GREP ^/`
9756     if test -z "$is_absolute_path"; then
9757       # Path to executable is not absolute. Find it.
9758       IFS_save="$IFS"
9759       IFS=:
9760       for p in $PATH; do
9761         if test -f "$p/$path" && test -x "$p/$path"; then
9762           new_path="$p/$path"
9763           break
9764         fi
9765       done
9766       IFS="$IFS_save"
9767     else
9768       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
9769 $as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
9770       new_path="$path"
9771     fi
9772 
9773     if test "x$new_path" = x; then
9774         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9775 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9776         has_space=`$ECHO "$complete" | $GREP " "`
9777         if test "x$has_space" != x; then
9778           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
9779 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
9780         fi
9781         as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9782       fi
9783   fi
9784 
9785       # Now join together the path and the arguments once again
9786       if test "x$arguments" != xEOL; then
9787         new_complete="$new_path ${arguments% *}"
9788       else
9789         new_complete="$new_path"
9790       fi
9791 
9792   if test "x$complete" != "x$new_complete"; then
9793       FOUND_MAKE="$new_complete"
9794       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
9795 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
9796     fi
9797 
9798         fi
9799       fi
9800     fi
9801   fi
9802 
9803         fi
9804         PATH=$OLD_PATH
9805       fi
9806     fi
9807 
9808     if test "x$FOUND_MAKE" = x; then
9809       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
9810     fi
9811   fi
9812 
9813   MAKE=$FOUND_MAKE
9814 
9815   { $as_echo "$as_me:${as_lineno-$LINENO}: Using GNU make 3.81 (or later) at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&5
9816 $as_echo "$as_me: Using GNU make 3.81 (or later) at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&6;}
9817 
9818 
9819 
9820     # Test if find supports -delete
9821     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if find supports -delete" >&5
9822 $as_echo_n "checking if find supports -delete... " >&6; }
9823     FIND_DELETE="-delete"
9824 
9825     DELETEDIR=`$MKTEMP -d tmp.XXXXXXXXXX` || (echo Could not create temporary directory!; exit $?)
9826 
9827     echo Hejsan > $DELETEDIR/TestIfFindSupportsDelete
9828 
9829     TEST_DELETE=`$FIND "$DELETEDIR" -name TestIfFindSupportsDelete $FIND_DELETE 2>&1`
9830     if test -f $DELETEDIR/TestIfFindSupportsDelete; then
9831         # No, it does not.
9832         rm $DELETEDIR/TestIfFindSupportsDelete
9833         FIND_DELETE="-exec rm \{\} \+"
9834         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9835 $as_echo "no" >&6; }
9836     else
9837         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9838 $as_echo "yes" >&6; }
9839     fi
9840     rmdir $DELETEDIR
9841 
9842 
9843 
9844 # These tools might not be installed by default,
9845 # need hint on how to install them.
9846 
9847     for ac_prog in unzip
9848 do
9849   # Extract the first word of "$ac_prog", so it can be a program name with args.
9850 set dummy $ac_prog; ac_word=$2
9851 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9852 $as_echo_n "checking for $ac_word... " >&6; }
9853 if test "${ac_cv_path_UNZIP+set}" = set; then :
9854   $as_echo_n "(cached) " >&6
9855 else
9856   case $UNZIP in
9857   [\\/]* | ?:[\\/]*)
9858   ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
9859   ;;
9860   *)
9861   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9862 for as_dir in $PATH
9863 do
9864   IFS=$as_save_IFS
9865   test -z "$as_dir" && as_dir=.
9866     for ac_exec_ext in '' $ac_executable_extensions; do
9867   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9868     ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
9869     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9870     break 2
9871   fi
9872 done
9873   done
9874 IFS=$as_save_IFS
9875 
9876   ;;
9877 esac
9878 fi
9879 UNZIP=$ac_cv_path_UNZIP
9880 if test -n "$UNZIP"; then
9881   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
9882 $as_echo "$UNZIP" >&6; }
9883 else
9884   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9885 $as_echo "no" >&6; }
9886 fi
9887 
9888 
9889   test -n "$UNZIP" && break
9890 done
9891 
9892 
9893     if test "x$UNZIP" = x; then
9894         if test "xunzip" = x; then
9895           PROG_NAME=unzip
9896         else
9897           PROG_NAME=unzip
9898         fi
9899         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
9900 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
9901         as_fn_error $? "Cannot continue" "$LINENO" 5
9902     fi
9903 
9904 
9905 
9906     for ac_prog in zip
9907 do
9908   # Extract the first word of "$ac_prog", so it can be a program name with args.
9909 set dummy $ac_prog; ac_word=$2
9910 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9911 $as_echo_n "checking for $ac_word... " >&6; }
9912 if test "${ac_cv_path_ZIP+set}" = set; then :
9913   $as_echo_n "(cached) " >&6
9914 else
9915   case $ZIP in
9916   [\\/]* | ?:[\\/]*)
9917   ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
9918   ;;
9919   *)
9920   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9921 for as_dir in $PATH
9922 do
9923   IFS=$as_save_IFS
9924   test -z "$as_dir" && as_dir=.
9925     for ac_exec_ext in '' $ac_executable_extensions; do
9926   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9927     ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
9928     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9929     break 2
9930   fi
9931 done
9932   done
9933 IFS=$as_save_IFS
9934 
9935   ;;
9936 esac
9937 fi
9938 ZIP=$ac_cv_path_ZIP
9939 if test -n "$ZIP"; then
9940   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
9941 $as_echo "$ZIP" >&6; }
9942 else
9943   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9944 $as_echo "no" >&6; }
9945 fi
9946 
9947 
9948   test -n "$ZIP" && break
9949 done
9950 
9951 
9952     if test "x$ZIP" = x; then
9953         if test "xzip" = x; then
9954           PROG_NAME=zip
9955         else
9956           PROG_NAME=zip
9957         fi
9958         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
9959 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
9960         as_fn_error $? "Cannot continue" "$LINENO" 5
9961     fi
9962 
9963 
9964 
9965 # Non-required basic tools
9966 
9967 # Extract the first word of "ldd", so it can be a program name with args.
9968 set dummy ldd; ac_word=$2
9969 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9970 $as_echo_n "checking for $ac_word... " >&6; }
9971 if test "${ac_cv_path_LDD+set}" = set; then :
9972   $as_echo_n "(cached) " >&6
9973 else
9974   case $LDD in
9975   [\\/]* | ?:[\\/]*)
9976   ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
9977   ;;
9978   *)
9979   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9980 for as_dir in $PATH
9981 do
9982   IFS=$as_save_IFS
9983   test -z "$as_dir" && as_dir=.
9984     for ac_exec_ext in '' $ac_executable_extensions; do
9985   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9986     ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
9987     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9988     break 2
9989   fi
9990 done
9991   done
9992 IFS=$as_save_IFS
9993 
9994   ;;
9995 esac
9996 fi
9997 LDD=$ac_cv_path_LDD
9998 if test -n "$LDD"; then
9999   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
10000 $as_echo "$LDD" >&6; }
10001 else
10002   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10003 $as_echo "no" >&6; }
10004 fi
10005 
10006 
10007 if test "x$LDD" = "x"; then
10008     # List shared lib dependencies is used for
10009     # debug output and checking for forbidden dependencies.
10010     # We can build without it.
10011     LDD="true"
10012 fi
10013 # Extract the first word of "otool", so it can be a program name with args.
10014 set dummy otool; ac_word=$2
10015 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10016 $as_echo_n "checking for $ac_word... " >&6; }
10017 if test "${ac_cv_path_OTOOL+set}" = set; then :
10018   $as_echo_n "(cached) " >&6
10019 else
10020   case $OTOOL in
10021   [\\/]* | ?:[\\/]*)
10022   ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
10023   ;;
10024   *)
10025   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10026 for as_dir in $PATH
10027 do
10028   IFS=$as_save_IFS
10029   test -z "$as_dir" && as_dir=.
10030     for ac_exec_ext in '' $ac_executable_extensions; do
10031   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10032     ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
10033     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10034     break 2
10035   fi
10036 done
10037   done
10038 IFS=$as_save_IFS
10039 
10040   ;;
10041 esac
10042 fi
10043 OTOOL=$ac_cv_path_OTOOL
10044 if test -n "$OTOOL"; then
10045   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
10046 $as_echo "$OTOOL" >&6; }
10047 else
10048   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10049 $as_echo "no" >&6; }
10050 fi
10051 
10052 
10053 if test "x$OTOOL" = "x"; then
10054    OTOOL="true"
10055 fi
10056 for ac_prog in readelf greadelf
10057 do
10058   # Extract the first word of "$ac_prog", so it can be a program name with args.
10059 set dummy $ac_prog; ac_word=$2
10060 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10061 $as_echo_n "checking for $ac_word... " >&6; }
10062 if test "${ac_cv_path_READELF+set}" = set; then :
10063   $as_echo_n "(cached) " >&6
10064 else
10065   case $READELF in
10066   [\\/]* | ?:[\\/]*)
10067   ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
10068   ;;
10069   *)
10070   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10071 for as_dir in $PATH
10072 do
10073   IFS=$as_save_IFS
10074   test -z "$as_dir" && as_dir=.
10075     for ac_exec_ext in '' $ac_executable_extensions; do
10076   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10077     ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
10078     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10079     break 2
10080   fi
10081 done
10082   done
10083 IFS=$as_save_IFS
10084 
10085   ;;
10086 esac
10087 fi
10088 READELF=$ac_cv_path_READELF
10089 if test -n "$READELF"; then
10090   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
10091 $as_echo "$READELF" >&6; }
10092 else
10093   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10094 $as_echo "no" >&6; }
10095 fi
10096 
10097 
10098   test -n "$READELF" && break
10099 done
10100 
10101 # Extract the first word of "hg", so it can be a program name with args.
10102 set dummy hg; ac_word=$2
10103 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10104 $as_echo_n "checking for $ac_word... " >&6; }
10105 if test "${ac_cv_path_HG+set}" = set; then :
10106   $as_echo_n "(cached) " >&6
10107 else
10108   case $HG in
10109   [\\/]* | ?:[\\/]*)
10110   ac_cv_path_HG="$HG" # Let the user override the test with a path.
10111   ;;
10112   *)
10113   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10114 for as_dir in $PATH
10115 do
10116   IFS=$as_save_IFS
10117   test -z "$as_dir" && as_dir=.
10118     for ac_exec_ext in '' $ac_executable_extensions; do
10119   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10120     ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
10121     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10122     break 2
10123   fi
10124 done
10125   done
10126 IFS=$as_save_IFS
10127 
10128   ;;
10129 esac
10130 fi
10131 HG=$ac_cv_path_HG
10132 if test -n "$HG"; then
10133   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
10134 $as_echo "$HG" >&6; }
10135 else
10136   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10137 $as_echo "no" >&6; }
10138 fi
10139 
10140 
10141 # Extract the first word of "stat", so it can be a program name with args.
10142 set dummy stat; ac_word=$2
10143 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10144 $as_echo_n "checking for $ac_word... " >&6; }
10145 if test "${ac_cv_path_STAT+set}" = set; then :
10146   $as_echo_n "(cached) " >&6
10147 else
10148   case $STAT in
10149   [\\/]* | ?:[\\/]*)
10150   ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
10151   ;;
10152   *)
10153   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10154 for as_dir in $PATH
10155 do
10156   IFS=$as_save_IFS
10157   test -z "$as_dir" && as_dir=.
10158     for ac_exec_ext in '' $ac_executable_extensions; do
10159   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10160     ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
10161     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10162     break 2
10163   fi
10164 done
10165   done
10166 IFS=$as_save_IFS
10167 
10168   ;;
10169 esac
10170 fi
10171 STAT=$ac_cv_path_STAT
10172 if test -n "$STAT"; then
10173   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
10174 $as_echo "$STAT" >&6; }
10175 else
10176   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10177 $as_echo "no" >&6; }
10178 fi
10179 
10180 
10181 # Extract the first word of "time", so it can be a program name with args.
10182 set dummy time; ac_word=$2
10183 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10184 $as_echo_n "checking for $ac_word... " >&6; }
10185 if test "${ac_cv_path_TIME+set}" = set; then :
10186   $as_echo_n "(cached) " >&6
10187 else
10188   case $TIME in
10189   [\\/]* | ?:[\\/]*)
10190   ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
10191   ;;
10192   *)
10193   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10194 for as_dir in $PATH
10195 do
10196   IFS=$as_save_IFS
10197   test -z "$as_dir" && as_dir=.
10198     for ac_exec_ext in '' $ac_executable_extensions; do
10199   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10200     ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
10201     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10202     break 2
10203   fi
10204 done
10205   done
10206 IFS=$as_save_IFS
10207 
10208   ;;
10209 esac
10210 fi
10211 TIME=$ac_cv_path_TIME
10212 if test -n "$TIME"; then
10213   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
10214 $as_echo "$TIME" >&6; }
10215 else
10216   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10217 $as_echo "no" >&6; }
10218 fi
10219 
10220 
10221 
10222 if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
10223 
10224     for ac_prog in comm
10225 do
10226   # Extract the first word of "$ac_prog", so it can be a program name with args.
10227 set dummy $ac_prog; ac_word=$2
10228 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10229 $as_echo_n "checking for $ac_word... " >&6; }
10230 if test "${ac_cv_path_COMM+set}" = set; then :
10231   $as_echo_n "(cached) " >&6
10232 else
10233   case $COMM in
10234   [\\/]* | ?:[\\/]*)
10235   ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
10236   ;;
10237   *)
10238   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10239 for as_dir in $PATH
10240 do
10241   IFS=$as_save_IFS
10242   test -z "$as_dir" && as_dir=.
10243     for ac_exec_ext in '' $ac_executable_extensions; do
10244   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10245     ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
10246     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10247     break 2
10248   fi
10249 done
10250   done
10251 IFS=$as_save_IFS
10252 
10253   ;;
10254 esac
10255 fi
10256 COMM=$ac_cv_path_COMM
10257 if test -n "$COMM"; then
10258   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
10259 $as_echo "$COMM" >&6; }
10260 else
10261   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10262 $as_echo "no" >&6; }
10263 fi
10264 
10265 
10266   test -n "$COMM" && break
10267 done
10268 
10269 
10270     if test "x$COMM" = x; then
10271         if test "xcomm" = x; then
10272           PROG_NAME=comm
10273         else
10274           PROG_NAME=comm
10275         fi
10276         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
10277 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
10278         as_fn_error $? "Cannot continue" "$LINENO" 5
10279     fi
10280 
10281 
10282 fi
10283 
10284 if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
10285 
10286     for ac_prog in xattr
10287 do
10288   # Extract the first word of "$ac_prog", so it can be a program name with args.
10289 set dummy $ac_prog; ac_word=$2
10290 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10291 $as_echo_n "checking for $ac_word... " >&6; }
10292 if test "${ac_cv_path_XATTR+set}" = set; then :
10293   $as_echo_n "(cached) " >&6
10294 else
10295   case $XATTR in
10296   [\\/]* | ?:[\\/]*)
10297   ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
10298   ;;
10299   *)
10300   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10301 for as_dir in $PATH
10302 do
10303   IFS=$as_save_IFS
10304   test -z "$as_dir" && as_dir=.
10305     for ac_exec_ext in '' $ac_executable_extensions; do
10306   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10307     ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
10308     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10309     break 2
10310   fi
10311 done
10312   done
10313 IFS=$as_save_IFS
10314 
10315   ;;
10316 esac
10317 fi
10318 XATTR=$ac_cv_path_XATTR
10319 if test -n "$XATTR"; then
10320   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
10321 $as_echo "$XATTR" >&6; }
10322 else
10323   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10324 $as_echo "no" >&6; }
10325 fi
10326 
10327 
10328   test -n "$XATTR" && break
10329 done
10330 
10331 
10332     if test "x$XATTR" = x; then
10333         if test "xxattr" = x; then
10334           PROG_NAME=xattr
10335         else
10336           PROG_NAME=xattr
10337         fi
10338         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
10339 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
10340         as_fn_error $? "Cannot continue" "$LINENO" 5
10341     fi
10342 
10343 
10344   # Extract the first word of "codesign", so it can be a program name with args.
10345 set dummy codesign; ac_word=$2
10346 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10347 $as_echo_n "checking for $ac_word... " >&6; }
10348 if test "${ac_cv_path_CODESIGN+set}" = set; then :
10349   $as_echo_n "(cached) " >&6
10350 else
10351   case $CODESIGN in
10352   [\\/]* | ?:[\\/]*)
10353   ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
10354   ;;
10355   *)
10356   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10357 for as_dir in $PATH
10358 do
10359   IFS=$as_save_IFS
10360   test -z "$as_dir" && as_dir=.
10361     for ac_exec_ext in '' $ac_executable_extensions; do
10362   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10363     ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
10364     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10365     break 2
10366   fi
10367 done
10368   done
10369 IFS=$as_save_IFS
10370 
10371   ;;
10372 esac
10373 fi
10374 CODESIGN=$ac_cv_path_CODESIGN
10375 if test -n "$CODESIGN"; then
10376   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
10377 $as_echo "$CODESIGN" >&6; }
10378 else
10379   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10380 $as_echo "no" >&6; }
10381 fi
10382 
10383 
10384   if test "x$CODESIGN" != "x"; then
10385     # Verify that the openjdk_codesign certificate is present
10386     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if openjdk_codesign certificate is present" >&5
10387 $as_echo_n "checking if openjdk_codesign certificate is present... " >&6; }
10388     rm -f codesign-testfile
10389     touch codesign-testfile
10390     codesign -s openjdk_codesign codesign-testfile 2>&5 >&5 || CODESIGN=
10391     rm -f codesign-testfile
10392     if test "x$CODESIGN" = x; then
10393       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10394 $as_echo "no" >&6; }
10395     else
10396       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10397 $as_echo "yes" >&6; }
10398     fi
10399   fi
10400 fi
10401 
10402 
10403 # Check if pkg-config is available.
10404 
10405 
10406 if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
10407         if test -n "$ac_tool_prefix"; then
10408   # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
10409 set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
10410 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10411 $as_echo_n "checking for $ac_word... " >&6; }
10412 if test "${ac_cv_path_PKG_CONFIG+set}" = set; then :
10413   $as_echo_n "(cached) " >&6
10414 else
10415   case $PKG_CONFIG in
10416   [\\/]* | ?:[\\/]*)
10417   ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
10418   ;;
10419   *)
10420   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10421 for as_dir in $PATH
10422 do
10423   IFS=$as_save_IFS
10424   test -z "$as_dir" && as_dir=.
10425     for ac_exec_ext in '' $ac_executable_extensions; do
10426   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10427     ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
10428     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10429     break 2
10430   fi
10431 done
10432   done
10433 IFS=$as_save_IFS
10434 
10435   ;;
10436 esac
10437 fi
10438 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
10439 if test -n "$PKG_CONFIG"; then
10440   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
10441 $as_echo "$PKG_CONFIG" >&6; }
10442 else
10443   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10444 $as_echo "no" >&6; }
10445 fi
10446 
10447 
10448 fi
10449 if test -z "$ac_cv_path_PKG_CONFIG"; then
10450   ac_pt_PKG_CONFIG=$PKG_CONFIG
10451   # Extract the first word of "pkg-config", so it can be a program name with args.
10452 set dummy pkg-config; ac_word=$2
10453 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10454 $as_echo_n "checking for $ac_word... " >&6; }
10455 if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then :
10456   $as_echo_n "(cached) " >&6
10457 else
10458   case $ac_pt_PKG_CONFIG in
10459   [\\/]* | ?:[\\/]*)
10460   ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
10461   ;;
10462   *)
10463   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10464 for as_dir in $PATH
10465 do
10466   IFS=$as_save_IFS
10467   test -z "$as_dir" && as_dir=.
10468     for ac_exec_ext in '' $ac_executable_extensions; do
10469   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10470     ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
10471     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10472     break 2
10473   fi
10474 done
10475   done
10476 IFS=$as_save_IFS
10477 
10478   ;;
10479 esac
10480 fi
10481 ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
10482 if test -n "$ac_pt_PKG_CONFIG"; then
10483   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
10484 $as_echo "$ac_pt_PKG_CONFIG" >&6; }
10485 else
10486   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10487 $as_echo "no" >&6; }
10488 fi
10489 
10490   if test "x$ac_pt_PKG_CONFIG" = x; then
10491     PKG_CONFIG=""
10492   else
10493     case $cross_compiling:$ac_tool_warned in
10494 yes:)
10495 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
10496 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
10497 ac_tool_warned=yes ;;
10498 esac
10499     PKG_CONFIG=$ac_pt_PKG_CONFIG
10500   fi
10501 else
10502   PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
10503 fi
10504 
10505 fi
10506 if test -n "$PKG_CONFIG"; then
10507         _pkg_min_version=0.9.0
10508         { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
10509 $as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
10510         if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
10511                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10512 $as_echo "yes" >&6; }
10513         else
10514                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10515 $as_echo "no" >&6; }
10516                 PKG_CONFIG=""
10517         fi
10518 
10519 fi
10520 
10521 # After basic tools have been setup, we can check build os specific details.
10522 
10523 ###############################################################################
10524 
10525 # Note that this is the build platform OS version!
10526 
10527 OS_VERSION="`uname -r | ${SED} 's!\.! !g' | ${SED} 's!-! !g'`"
10528 OS_VERSION_MAJOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 1 -d ' '`"
10529 OS_VERSION_MINOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 2 -d ' '`"
10530 OS_VERSION_MICRO="`${ECHO} ${OS_VERSION} | ${CUT} -f 3 -d ' '`"
10531 
10532 
10533 
10534 
10535 
10536 # Setup builddeps, for automatic downloading of tools we need.
10537 # This is needed before we can call BDEPS_CHECK_MODULE, which is done in
10538 # boot-jdk setup, but we need to have basic tools setup first.
10539 
10540 
10541 # Check whether --with-builddeps-conf was given.
10542 if test "${with_builddeps_conf+set}" = set; then :
10543   withval=$with_builddeps_conf;
10544 fi
10545 
10546 
10547 
10548 # Check whether --with-builddeps-server was given.
10549 if test "${with_builddeps_server+set}" = set; then :
10550   withval=$with_builddeps_server;
10551 fi
10552 
10553 
10554 
10555 # Check whether --with-builddeps-dir was given.
10556 if test "${with_builddeps_dir+set}" = set; then :
10557   withval=$with_builddeps_dir;
10558 else
10559   with_builddeps_dir=/localhome/builddeps
10560 fi
10561 
10562 
10563 
10564 # Check whether --with-builddeps-group was given.
10565 if test "${with_builddeps_group+set}" = set; then :
10566   withval=$with_builddeps_group;
10567 fi
10568 
10569 
10570 
10571 
10572     if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
10573         if test "x$with_builddeps_conf" != x; then
10574             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for supplied builddeps configuration file" >&5
10575 $as_echo_n "checking for supplied builddeps configuration file... " >&6; }
10576             builddepsfile=$with_builddeps_conf
10577             if test -s $builddepsfile; then
10578                 . $builddepsfile
10579                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: loaded!" >&5
10580 $as_echo "loaded!" >&6; }
10581             else
10582                as_fn_error $? "The given builddeps conf file $with_builddeps_conf could not be loaded!" "$LINENO" 5
10583            fi
10584         else
10585             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builddeps.conf files in sources..." >&5
10586 $as_echo_n "checking for builddeps.conf files in sources...... " >&6; }
10587             builddepsfile=`mktemp`
10588             touch $builddepsfile
10589             # Put all found confs into a single file.
10590             find ${SRC_ROOT} -name builddeps.conf -exec cat \{\} \; >> $builddepsfile
10591             # Source the file to acquire the variables
10592             if test -s $builddepsfile; then
10593                 . $builddepsfile
10594                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: found at least one!" >&5
10595 $as_echo "found at least one!" >&6; }
10596             else
10597                as_fn_error $? "Could not find any builddeps.conf at all!" "$LINENO" 5
10598            fi
10599         fi
10600         # Create build and target names that use _ instead of "-" and ".".
10601         # This is necessary to use them in variable names.
10602         build_var=`echo ${OPENJDK_BUILD_AUTOCONF_NAME} | tr '-' '_' | tr '.' '_'`
10603         target_var=`echo ${OPENJDK_TARGET_AUTOCONF_NAME} | tr '-' '_' | tr '.' '_'`
10604         # Extract rewrite information for build and target
10605         eval rewritten_build=\${REWRITE_${build_var}}
10606         if test "x$rewritten_build" = x; then
10607             rewritten_build=${OPENJDK_BUILD_AUTOCONF_NAME}
10608             echo Build stays the same $rewritten_build
10609         else
10610             echo Rewriting build for builddeps into $rewritten_build
10611         fi
10612         eval rewritten_target=\${REWRITE_${target_var}}
10613         if test "x$rewritten_target" = x; then
10614             rewritten_target=${OPENJDK_TARGET_AUTOCONF_NAME}
10615             echo Target stays the same $rewritten_target
10616         else
10617             echo Rewriting target for builddeps into $rewritten_target
10618         fi
10619         rewritten_build_var=`echo ${rewritten_build} | tr '-' '_' | tr '.' '_'`
10620         rewritten_target_var=`echo ${rewritten_target} | tr '-' '_' | tr '.' '_'`
10621     fi
10622     for ac_prog in 7z unzip
10623 do
10624   # Extract the first word of "$ac_prog", so it can be a program name with args.
10625 set dummy $ac_prog; ac_word=$2
10626 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10627 $as_echo_n "checking for $ac_word... " >&6; }
10628 if test "${ac_cv_prog_BDEPS_UNZIP+set}" = set; then :
10629   $as_echo_n "(cached) " >&6
10630 else
10631   if test -n "$BDEPS_UNZIP"; then
10632   ac_cv_prog_BDEPS_UNZIP="$BDEPS_UNZIP" # Let the user override the test.
10633 else
10634 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10635 for as_dir in $PATH
10636 do
10637   IFS=$as_save_IFS
10638   test -z "$as_dir" && as_dir=.
10639     for ac_exec_ext in '' $ac_executable_extensions; do
10640   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10641     ac_cv_prog_BDEPS_UNZIP="$ac_prog"
10642     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10643     break 2
10644   fi
10645 done
10646   done
10647 IFS=$as_save_IFS
10648 
10649 fi
10650 fi
10651 BDEPS_UNZIP=$ac_cv_prog_BDEPS_UNZIP
10652 if test -n "$BDEPS_UNZIP"; then
10653   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BDEPS_UNZIP" >&5
10654 $as_echo "$BDEPS_UNZIP" >&6; }
10655 else
10656   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10657 $as_echo "no" >&6; }
10658 fi
10659 
10660 
10661   test -n "$BDEPS_UNZIP" && break
10662 done
10663 
10664     if test "x$BDEPS_UNZIP" = x7z; then
10665         BDEPS_UNZIP="7z x"
10666     fi
10667 
10668     for ac_prog in wget lftp ftp
10669 do
10670   # Extract the first word of "$ac_prog", so it can be a program name with args.
10671 set dummy $ac_prog; ac_word=$2
10672 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10673 $as_echo_n "checking for $ac_word... " >&6; }
10674 if test "${ac_cv_prog_BDEPS_FTP+set}" = set; then :
10675   $as_echo_n "(cached) " >&6
10676 else
10677   if test -n "$BDEPS_FTP"; then
10678   ac_cv_prog_BDEPS_FTP="$BDEPS_FTP" # Let the user override the test.
10679 else
10680 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10681 for as_dir in $PATH
10682 do
10683   IFS=$as_save_IFS
10684   test -z "$as_dir" && as_dir=.
10685     for ac_exec_ext in '' $ac_executable_extensions; do
10686   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10687     ac_cv_prog_BDEPS_FTP="$ac_prog"
10688     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10689     break 2
10690   fi
10691 done
10692   done
10693 IFS=$as_save_IFS
10694 
10695 fi
10696 fi
10697 BDEPS_FTP=$ac_cv_prog_BDEPS_FTP
10698 if test -n "$BDEPS_FTP"; then
10699   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BDEPS_FTP" >&5
10700 $as_echo "$BDEPS_FTP" >&6; }
10701 else
10702   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10703 $as_echo "no" >&6; }
10704 fi
10705 
10706 
10707   test -n "$BDEPS_FTP" && break
10708 done
10709 
10710 
10711 
10712 ###############################################################################
10713 #
10714 # Determine OpenJDK variants, options and version numbers.
10715 #
10716 ###############################################################################
10717 
10718 # We need build & target for this.
10719 
10720 
10721 ###############################################################################
10722 #
10723 # Should we build a JDK/JVM with headful support (ie a graphical ui)?
10724 # We always build headless support.
10725 #
10726 { $as_echo "$as_me:${as_lineno-$LINENO}: checking headful support" >&5
10727 $as_echo_n "checking headful support... " >&6; }
10728 # Check whether --enable-headful was given.
10729 if test "${enable_headful+set}" = set; then :
10730   enableval=$enable_headful; SUPPORT_HEADFUL=${enable_headful}
10731 else
10732   SUPPORT_HEADFUL=yes
10733 fi
10734 
10735 
10736 SUPPORT_HEADLESS=yes
10737 BUILD_HEADLESS="BUILD_HEADLESS:=true"
10738 
10739 if test "x$SUPPORT_HEADFUL" = xyes; then
10740     # We are building both headful and headless.
10741     headful_msg="inlude support for both headful and headless"
10742 fi
10743 
10744 if test "x$SUPPORT_HEADFUL" = xno; then
10745     # Thus we are building headless only.
10746     BUILD_HEADLESS="BUILD_HEADLESS:=true"
10747     headful_msg="headless only"
10748 fi
10749 
10750 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $headful_msg" >&5
10751 $as_echo "$headful_msg" >&6; }
10752 
10753 
10754 
10755 
10756 
10757 # Control wether Hotspot runs Queens test after build.
10758 # Check whether --enable-hotspot-test-in-build was given.
10759 if test "${enable_hotspot_test_in_build+set}" = set; then :
10760   enableval=$enable_hotspot_test_in_build;
10761 else
10762   enable_hotspot_test_in_build=no
10763 fi
10764 
10765 if test "x$enable_hotspot_test_in_build" = "xyes"; then
10766     TEST_IN_BUILD=true
10767 else
10768     TEST_IN_BUILD=false
10769 fi
10770 
10771 
10772 ###############################################################################
10773 #
10774 # Choose cacerts source file
10775 #
10776 
10777 # Check whether --with-cacerts-file was given.
10778 if test "${with_cacerts_file+set}" = set; then :
10779   withval=$with_cacerts_file;
10780 fi
10781 
10782 if test "x$with_cacerts_file" != x; then
10783     CACERTS_FILE=$with_cacerts_file
10784 else
10785     if test "x$OPENJDK" = "xtrue"; then
10786         CACERTS_FILE=${SRC_ROOT}/jdk/src/share/lib/security/cacerts
10787     else
10788         CACERTS_FILE=${SRC_ROOT}/jdk/src/closed/share/lib/security/cacerts.internal
10789     fi
10790 fi
10791 
10792 
10793 ###############################################################################
10794 #
10795 # Enable or disable unlimited crypto
10796 #
10797 # Check whether --enable-unlimited-crypto was given.
10798 if test "${enable_unlimited_crypto+set}" = set; then :
10799   enableval=$enable_unlimited_crypto;
10800 else
10801   enable_unlimited_crypto=no
10802 fi
10803 
10804 if test "x$enable_unlimited_crypto" = "xyes"; then
10805     UNLIMITED_CRYPTO=true
10806 else
10807     UNLIMITED_CRYPTO=false
10808 fi
10809 
10810 
10811 ###############################################################################
10812 #
10813 # Enable or disable the elliptic curve crypto implementation
10814 #
10815 
10816 
10817 ###############################################################################
10818 #
10819 # Compress jars
10820 #
10821 COMPRESS_JARS=false
10822 
10823 
10824 
10825 
10826 # Source the version numbers
10827 . $AUTOCONF_DIR/version-numbers
10828 
10829 # Get the settings from parameters
10830 
10831 # Check whether --with-milestone was given.
10832 if test "${with_milestone+set}" = set; then :
10833   withval=$with_milestone;
10834 fi
10835 
10836 if test "x$with_milestone" = xyes; then
10837   as_fn_error $? "Milestone must have a value" "$LINENO" 5
10838 elif test "x$with_milestone" != x; then
10839     MILESTONE="$with_milestone"
10840 fi
10841 if test "x$MILESTONE" = x; then
10842   MILESTONE=internal
10843 fi
10844 
10845 
10846 # Check whether --with-update-version was given.
10847 if test "${with_update_version+set}" = set; then :
10848   withval=$with_update_version;
10849 fi
10850 
10851 if test "x$with_update_version" = xyes; then
10852   as_fn_error $? "Update version must have a value" "$LINENO" 5
10853 elif test "x$with_update_version" != x; then
10854   JDK_UPDATE_VERSION="$with_update_version"
10855 fi
10856 
10857 
10858 # Check whether --with-build-number was given.
10859 if test "${with_build_number+set}" = set; then :
10860   withval=$with_build_number;
10861 fi
10862 
10863 if test "x$with_build_number" = xyes; then
10864   as_fn_error $? "Build number must have a value" "$LINENO" 5
10865 elif test "x$with_build_number" != x; then
10866   JDK_BUILD_NUMBER="$with_build_number"
10867 fi
10868 if test "x$JDK_BUILD_NUMBER" = x; then
10869   JDK_BUILD_NUMBER=b00
10870 fi
10871 
10872 
10873 # Check whether --with-user-release-suffix was given.
10874 if test "${with_user_release_suffix+set}" = set; then :
10875   withval=$with_user_release_suffix;
10876 fi
10877 
10878 if test "x$with_user_release_suffix" = xyes; then
10879   as_fn_error $? "Release suffix must have a value" "$LINENO" 5
10880 elif test "x$with_user_release_suffix" != x; then
10881   USER_RELEASE_SUFFIX="$with_user_release_suffix"
10882 else
10883   BUILD_DATE=`date '+%Y_%m_%d_%H_%M'`
10884   # Avoid [:alnum:] since it depends on the locale.
10885   CLEAN_USERNAME=`echo "$USER" | $TR -d -c 'abcdefghijklmnopqrstuvqxyz0123456789'`
10886   USER_RELEASE_SUFFIX=`echo "${CLEAN_USERNAME}_${BUILD_DATE}" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
10887 fi
10888 
10889 
10890 # Now set the JDK version, milestone, build number etc.
10891 
10892 
10893 
10894 
10895 
10896 
10897 
10898 
10899 
10900 
10901 
10902 
10903 
10904 
10905 COPYRIGHT_YEAR=`date +'%Y'`
10906 
10907 
10908 if test "x$JDK_UPDATE_VERSION" != x; then
10909   JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}_${JDK_UPDATE_VERSION}"
10910 else
10911   JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}"
10912 fi
10913 
10914 
10915 COOKED_BUILD_NUMBER=`$ECHO $JDK_BUILD_NUMBER | $SED -e 's/^b//' -e 's/^0//'`
10916 
10917 
10918 
10919 ###############################################################################
10920 #
10921 # Setup BootJDK, used to bootstrap the build.
10922 #
10923 ###############################################################################
10924 
10925 
10926 BOOT_JDK_FOUND=no
10927 
10928 # Check whether --with-boot-jdk was given.
10929 if test "${with_boot_jdk+set}" = set; then :
10930   withval=$with_boot_jdk;
10931 fi
10932 
10933 
10934 # We look for the Boot JDK through various means, going from more certain to
10935 # more of a guess-work. After each test, BOOT_JDK_FOUND is set to "yes" if
10936 # we detected something (if so, the path to the jdk is in BOOT_JDK). But we
10937 # must check if this is indeed valid; otherwise we'll continue looking.
10938 
10939 # Test: Is bootjdk explicitely set by command line arguments?
10940 
10941   if test "x$BOOT_JDK_FOUND" = xno; then
10942     # Now execute the test
10943 
10944 if test "x$with_boot_jdk" != x; then
10945     BOOT_JDK=$with_boot_jdk
10946     BOOT_JDK_FOUND=maybe
10947     { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using configure arguments" >&5
10948 $as_echo "$as_me: Found potential Boot JDK using configure arguments" >&6;}
10949 fi
10950 
10951 
10952     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
10953     if test "x$BOOT_JDK_FOUND" = xmaybe; then
10954       # Do we have a bin/java?
10955       if test ! -x "$BOOT_JDK/bin/java"; then
10956         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
10957 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
10958         BOOT_JDK_FOUND=no
10959       else
10960         # Do we have a bin/javac?
10961         if test ! -x "$BOOT_JDK/bin/javac"; then
10962           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
10963 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
10964           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
10965 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
10966           BOOT_JDK_FOUND=no
10967         else
10968           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
10969           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
10970             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
10971 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
10972             BOOT_JDK_FOUND=no
10973           else
10974             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
10975             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
10976 
10977             # Extra M4 quote needed to protect [] in grep expression.
10978             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
10979             if test "x$FOUND_VERSION_78" = x; then
10980               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
10981 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
10982               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
10983 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
10984               BOOT_JDK_FOUND=no
10985             else
10986               # We're done! :-)
10987               BOOT_JDK_FOUND=yes
10988 
10989   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
10990 
10991   # Input might be given as Windows format, start by converting to
10992   # unix format.
10993   path="$BOOT_JDK"
10994   new_path=`$CYGPATH -u "$path"`
10995 
10996   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
10997   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
10998   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
10999   # "foo.exe" is OK but "foo" is an error.
11000   #
11001   # This test is therefore slightly more accurate than "test -f" to check for file precense.
11002   # It is also a way to make sure we got the proper file name for the real test later on.
11003   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
11004   if test "x$test_shortpath" = x; then
11005     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11006 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11007     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
11008   fi
11009 
11010   # Call helper function which possibly converts this using DOS-style short mode.
11011   # If so, the updated path is stored in $new_path.
11012 
11013   input_path="$new_path"
11014   # Check if we need to convert this using DOS-style short mode. If the path
11015   # contains just simple characters, use it. Otherwise (spaces, weird characters),
11016   # take no chances and rewrite it.
11017   # Note: m4 eats our [], so we need to use [ and ] instead.
11018   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
11019   if test "x$has_forbidden_chars" != x; then
11020     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11021     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
11022     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
11023     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
11024       # Going to short mode and back again did indeed matter. Since short mode is
11025       # case insensitive, let's make it lowercase to improve readability.
11026       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11027       # Now convert it back to Unix-stile (cygpath)
11028       input_path=`$CYGPATH -u "$shortmode_path"`
11029       new_path="$input_path"
11030     fi
11031   fi
11032 
11033   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
11034   if test "x$test_cygdrive_prefix" = x; then
11035     # As a simple fix, exclude /usr/bin since it's not a real path.
11036     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
11037       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
11038       # a path prefixed by /cygdrive for fixpath to work.
11039       new_path="$CYGWIN_ROOT_PATH$input_path"
11040     fi
11041   fi
11042 
11043 
11044   if test "x$path" != "x$new_path"; then
11045     BOOT_JDK="$new_path"
11046     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11047 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11048   fi
11049 
11050   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11051 
11052   path="$BOOT_JDK"
11053   has_colon=`$ECHO $path | $GREP ^.:`
11054   new_path="$path"
11055   if test "x$has_colon" = x; then
11056     # Not in mixed or Windows style, start by that.
11057     new_path=`cmd //c echo $path`
11058   fi
11059 
11060 
11061   input_path="$new_path"
11062   # Check if we need to convert this using DOS-style short mode. If the path
11063   # contains just simple characters, use it. Otherwise (spaces, weird characters),
11064   # take no chances and rewrite it.
11065   # Note: m4 eats our [], so we need to use [ and ] instead.
11066   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
11067   if test "x$has_forbidden_chars" != x; then
11068     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11069     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11070   fi
11071 
11072 
11073   windows_path="$new_path"
11074   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11075     unix_path=`$CYGPATH -u "$windows_path"`
11076     new_path="$unix_path"
11077   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11078     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11079     new_path="$unix_path"
11080   fi
11081 
11082   if test "x$path" != "x$new_path"; then
11083     BOOT_JDK="$new_path"
11084     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11085 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11086   fi
11087 
11088   # Save the first 10 bytes of this path to the storage, so fixpath can work.
11089   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
11090 
11091   else
11092     # We're on a posix platform. Hooray! :)
11093     path="$BOOT_JDK"
11094     has_space=`$ECHO "$path" | $GREP " "`
11095     if test "x$has_space" != x; then
11096       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11097 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11098       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
11099     fi
11100 
11101     # Use eval to expand a potential ~
11102     eval path="$path"
11103     if test ! -f "$path" && test ! -d "$path"; then
11104       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
11105     fi
11106 
11107     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
11108   fi
11109 
11110               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
11111 $as_echo_n "checking for Boot JDK... " >&6; }
11112               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
11113 $as_echo "$BOOT_JDK" >&6; }
11114               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
11115 $as_echo_n "checking Boot JDK version... " >&6; }
11116               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
11117               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
11118 $as_echo "$BOOT_JDK_VERSION" >&6; }
11119             fi # end check jdk version
11120           fi # end check rt.jar
11121         fi # end check javac
11122       fi # end check java
11123     fi # end check boot jdk found
11124   fi
11125 
11126 if test "x$with_boot_jdk" != x && test "x$BOOT_JDK_FOUND" = xno; then
11127   # Having specified an argument which is incorrect will produce an instant failure;
11128   # we should not go on looking
11129   as_fn_error $? "The path given by --with-boot-jdk does not contain a valid Boot JDK" "$LINENO" 5
11130 fi
11131 
11132 # Test: Is bootjdk available from builddeps?
11133 
11134   if test "x$BOOT_JDK_FOUND" = xno; then
11135     # Now execute the test
11136 
11137 
11138 
11139     if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
11140         # Source the builddeps file again, to make sure it uses the latest variables!
11141         . $builddepsfile
11142         # Look for a target and build machine specific resource!
11143         eval resource=\${builddep_bootjdk_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
11144         if test "x$resource" = x; then
11145             # Ok, lets instead look for a target specific resource
11146             eval resource=\${builddep_bootjdk_TARGET_${rewritten_target_var}}
11147         fi
11148         if test "x$resource" = x; then
11149             # Ok, lets instead look for a build specific resource
11150             eval resource=\${builddep_bootjdk_BUILD_${rewritten_build_var}}
11151         fi
11152         if test "x$resource" = x; then
11153             # Ok, lets instead look for a generic resource
11154             # (The bootjdk comes from M4 and not the shell, thus no need for eval here.)
11155             resource=${builddep_bootjdk}
11156         fi
11157         if test "x$resource" != x; then
11158             { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for bootjdk" >&5
11159 $as_echo "$as_me: Using builddeps $resource for bootjdk" >&6;}
11160             # If the resource in the builddeps.conf file is an existing directory,
11161             # for example /java/linux/cups
11162             if test -d ${resource}; then
11163                depdir=${resource}
11164             else
11165 
11166 # bootjdk is for example mymodule
11167 # $resource is for example libs/general/libmymod_1_2_3.zip
11168 # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
11169 # $with_builddeps_dir is for example /localhome/builddeps
11170 # depdir is the name of the variable into which we store the depdir, eg MYMOD
11171 # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
11172 # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
11173     filename=`basename $resource`
11174     filebase=`echo $filename | sed 's/\.[^\.]*$//'`
11175     filebase=${filename%%.*}
11176     extension=${filename#*.}
11177     installdir=$with_builddeps_dir/$filebase
11178     if test ! -f $installdir/$filename.unpacked; then
11179         { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency bootjdk from $with_builddeps_server/$resource and installing into $installdir" >&5
11180 $as_echo "$as_me: Downloading build dependency bootjdk from $with_builddeps_server/$resource and installing into $installdir" >&6;}
11181         if test ! -d $installdir; then
11182             mkdir -p $installdir
11183         fi
11184         if test ! -d $installdir; then
11185             as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
11186         fi
11187         tmpfile=`mktemp $installdir/bootjdk.XXXXXXXXX`
11188         touch $tmpfile
11189         if test ! -f $tmpfile; then
11190             as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
11191         fi
11192 
11193     # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
11194     # $tmpfile is the local file name for the downloaded file.
11195     VALID_TOOL=no
11196     if test "x$BDEPS_FTP" = xwget; then
11197        VALID_TOOL=yes
11198        wget -O $tmpfile $with_builddeps_server/$resource
11199     fi
11200     if test "x$BDEPS_FTP" = xlftp; then
11201        VALID_TOOL=yes
11202        lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
11203     fi
11204     if test "x$BDEPS_FTP" = xftp; then
11205         VALID_TOOL=yes
11206         FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
11207         FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
11208         FTPUSERPWD=${FTPSERVER%%@*}
11209         if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
11210             FTPUSER=${userpwd%%:*}
11211             FTPPWD=${userpwd#*@}
11212             FTPSERVER=${FTPSERVER#*@}
11213         else
11214             FTPUSER=ftp
11215             FTPPWD=ftp
11216         fi
11217         # the "pass" command does not work on some
11218         # ftp clients (read ftp.exe) but if it works,
11219         # passive mode is better!
11220         (\
11221             echo "user $FTPUSER $FTPPWD"        ;\
11222             echo "pass"                         ;\
11223             echo "bin"                          ;\
11224             echo "get $FTPPATH $tmpfile"              ;\
11225         ) | ftp -in $FTPSERVER
11226     fi
11227     if test "x$VALID_TOOL" != xyes; then
11228        as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
11229     fi
11230 
11231         mv $tmpfile $installdir/$filename
11232         if test ! -s $installdir/$filename; then
11233             as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
11234         fi
11235         case "$extension" in
11236             zip)  echo "Unzipping $installdir/$filename..."
11237                (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
11238             ;;
11239             tar.gz) echo "Untaring $installdir/$filename..."
11240                (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
11241             ;;
11242             tgz) echo "Untaring $installdir/$filename..."
11243                (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
11244             ;;
11245             *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
11246             ;;
11247         esac
11248     fi
11249     if test -f $installdir/$filename.unpacked; then
11250         depdir=$installdir
11251     fi
11252 
11253             fi
11254             # Source the builddeps file again, because in the previous command, the depdir
11255             # was updated to point at the current build dependency install directory.
11256             . $builddepsfile
11257             # Now extract variables from the builddeps.conf files.
11258             theroot=${builddep_bootjdk_ROOT}
11259             thecflags=${builddep_bootjdk_CFLAGS}
11260             thelibs=${builddep_bootjdk_LIBS}
11261             if test "x$depdir" = x; then
11262                 as_fn_error $? "Could not download build dependency bootjdk" "$LINENO" 5
11263             fi
11264             BOOT_JDK=$depdir
11265             if test "x$theroot" != x; then
11266                BOOT_JDK="$theroot"
11267             fi
11268             if test "x$thecflags" != x; then
11269                BOOT_JDK_CFLAGS="$thecflags"
11270             fi
11271             if test "x$thelibs" != x; then
11272                BOOT_JDK_LIBS="$thelibs"
11273             fi
11274             BOOT_JDK_FOUND=maybe
11275             else BOOT_JDK_FOUND=no
11276 
11277         fi
11278         else BOOT_JDK_FOUND=no
11279 
11280     fi
11281 
11282 
11283 
11284     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
11285     if test "x$BOOT_JDK_FOUND" = xmaybe; then
11286       # Do we have a bin/java?
11287       if test ! -x "$BOOT_JDK/bin/java"; then
11288         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
11289 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
11290         BOOT_JDK_FOUND=no
11291       else
11292         # Do we have a bin/javac?
11293         if test ! -x "$BOOT_JDK/bin/javac"; then
11294           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
11295 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
11296           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
11297 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
11298           BOOT_JDK_FOUND=no
11299         else
11300           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
11301           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
11302             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
11303 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
11304             BOOT_JDK_FOUND=no
11305           else
11306             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
11307             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
11308 
11309             # Extra M4 quote needed to protect [] in grep expression.
11310             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
11311             if test "x$FOUND_VERSION_78" = x; then
11312               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
11313 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
11314               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
11315 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
11316               BOOT_JDK_FOUND=no
11317             else
11318               # We're done! :-)
11319               BOOT_JDK_FOUND=yes
11320 
11321   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11322 
11323   # Input might be given as Windows format, start by converting to
11324   # unix format.
11325   path="$BOOT_JDK"
11326   new_path=`$CYGPATH -u "$path"`
11327 
11328   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
11329   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
11330   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
11331   # "foo.exe" is OK but "foo" is an error.
11332   #
11333   # This test is therefore slightly more accurate than "test -f" to check for file precense.
11334   # It is also a way to make sure we got the proper file name for the real test later on.
11335   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
11336   if test "x$test_shortpath" = x; then
11337     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11338 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11339     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
11340   fi
11341 
11342   # Call helper function which possibly converts this using DOS-style short mode.
11343   # If so, the updated path is stored in $new_path.
11344 
11345   input_path="$new_path"
11346   # Check if we need to convert this using DOS-style short mode. If the path
11347   # contains just simple characters, use it. Otherwise (spaces, weird characters),
11348   # take no chances and rewrite it.
11349   # Note: m4 eats our [], so we need to use [ and ] instead.
11350   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
11351   if test "x$has_forbidden_chars" != x; then
11352     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11353     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
11354     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
11355     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
11356       # Going to short mode and back again did indeed matter. Since short mode is
11357       # case insensitive, let's make it lowercase to improve readability.
11358       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11359       # Now convert it back to Unix-stile (cygpath)
11360       input_path=`$CYGPATH -u "$shortmode_path"`
11361       new_path="$input_path"
11362     fi
11363   fi
11364 
11365   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
11366   if test "x$test_cygdrive_prefix" = x; then
11367     # As a simple fix, exclude /usr/bin since it's not a real path.
11368     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
11369       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
11370       # a path prefixed by /cygdrive for fixpath to work.
11371       new_path="$CYGWIN_ROOT_PATH$input_path"
11372     fi
11373   fi
11374 
11375 
11376   if test "x$path" != "x$new_path"; then
11377     BOOT_JDK="$new_path"
11378     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11379 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11380   fi
11381 
11382   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11383 
11384   path="$BOOT_JDK"
11385   has_colon=`$ECHO $path | $GREP ^.:`
11386   new_path="$path"
11387   if test "x$has_colon" = x; then
11388     # Not in mixed or Windows style, start by that.
11389     new_path=`cmd //c echo $path`
11390   fi
11391 
11392 
11393   input_path="$new_path"
11394   # Check if we need to convert this using DOS-style short mode. If the path
11395   # contains just simple characters, use it. Otherwise (spaces, weird characters),
11396   # take no chances and rewrite it.
11397   # Note: m4 eats our [], so we need to use [ and ] instead.
11398   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
11399   if test "x$has_forbidden_chars" != x; then
11400     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11401     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11402   fi
11403 
11404 
11405   windows_path="$new_path"
11406   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11407     unix_path=`$CYGPATH -u "$windows_path"`
11408     new_path="$unix_path"
11409   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11410     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11411     new_path="$unix_path"
11412   fi
11413 
11414   if test "x$path" != "x$new_path"; then
11415     BOOT_JDK="$new_path"
11416     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11417 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11418   fi
11419 
11420   # Save the first 10 bytes of this path to the storage, so fixpath can work.
11421   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
11422 
11423   else
11424     # We're on a posix platform. Hooray! :)
11425     path="$BOOT_JDK"
11426     has_space=`$ECHO "$path" | $GREP " "`
11427     if test "x$has_space" != x; then
11428       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11429 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11430       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
11431     fi
11432 
11433     # Use eval to expand a potential ~
11434     eval path="$path"
11435     if test ! -f "$path" && test ! -d "$path"; then
11436       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
11437     fi
11438 
11439     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
11440   fi
11441 
11442               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
11443 $as_echo_n "checking for Boot JDK... " >&6; }
11444               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
11445 $as_echo "$BOOT_JDK" >&6; }
11446               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
11447 $as_echo_n "checking Boot JDK version... " >&6; }
11448               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
11449               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
11450 $as_echo "$BOOT_JDK_VERSION" >&6; }
11451             fi # end check jdk version
11452           fi # end check rt.jar
11453         fi # end check javac
11454       fi # end check java
11455     fi # end check boot jdk found
11456   fi
11457 
11458 
11459 # Test: Is $JAVA_HOME set?
11460 
11461   if test "x$BOOT_JDK_FOUND" = xno; then
11462     # Now execute the test
11463 
11464     if test "x$JAVA_HOME" != x; then
11465         JAVA_HOME_PROCESSED="$JAVA_HOME"
11466 
11467   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11468 
11469   # Input might be given as Windows format, start by converting to
11470   # unix format.
11471   path="$JAVA_HOME_PROCESSED"
11472   new_path=`$CYGPATH -u "$path"`
11473 
11474   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
11475   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
11476   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
11477   # "foo.exe" is OK but "foo" is an error.
11478   #
11479   # This test is therefore slightly more accurate than "test -f" to check for file precense.
11480   # It is also a way to make sure we got the proper file name for the real test later on.
11481   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
11482   if test "x$test_shortpath" = x; then
11483     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
11484 $as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
11485     as_fn_error $? "Cannot locate the the path of JAVA_HOME_PROCESSED" "$LINENO" 5
11486   fi
11487 
11488   # Call helper function which possibly converts this using DOS-style short mode.
11489   # If so, the updated path is stored in $new_path.
11490 
11491   input_path="$new_path"
11492   # Check if we need to convert this using DOS-style short mode. If the path
11493   # contains just simple characters, use it. Otherwise (spaces, weird characters),
11494   # take no chances and rewrite it.
11495   # Note: m4 eats our [], so we need to use [ and ] instead.
11496   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
11497   if test "x$has_forbidden_chars" != x; then
11498     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11499     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
11500     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
11501     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
11502       # Going to short mode and back again did indeed matter. Since short mode is
11503       # case insensitive, let's make it lowercase to improve readability.
11504       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11505       # Now convert it back to Unix-stile (cygpath)
11506       input_path=`$CYGPATH -u "$shortmode_path"`
11507       new_path="$input_path"
11508     fi
11509   fi
11510 
11511   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
11512   if test "x$test_cygdrive_prefix" = x; then
11513     # As a simple fix, exclude /usr/bin since it's not a real path.
11514     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
11515       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
11516       # a path prefixed by /cygdrive for fixpath to work.
11517       new_path="$CYGWIN_ROOT_PATH$input_path"
11518     fi
11519   fi
11520 
11521 
11522   if test "x$path" != "x$new_path"; then
11523     JAVA_HOME_PROCESSED="$new_path"
11524     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
11525 $as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
11526   fi
11527 
11528   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11529 
11530   path="$JAVA_HOME_PROCESSED"
11531   has_colon=`$ECHO $path | $GREP ^.:`
11532   new_path="$path"
11533   if test "x$has_colon" = x; then
11534     # Not in mixed or Windows style, start by that.
11535     new_path=`cmd //c echo $path`
11536   fi
11537 
11538 
11539   input_path="$new_path"
11540   # Check if we need to convert this using DOS-style short mode. If the path
11541   # contains just simple characters, use it. Otherwise (spaces, weird characters),
11542   # take no chances and rewrite it.
11543   # Note: m4 eats our [], so we need to use [ and ] instead.
11544   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
11545   if test "x$has_forbidden_chars" != x; then
11546     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11547     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11548   fi
11549 
11550 
11551   windows_path="$new_path"
11552   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11553     unix_path=`$CYGPATH -u "$windows_path"`
11554     new_path="$unix_path"
11555   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11556     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11557     new_path="$unix_path"
11558   fi
11559 
11560   if test "x$path" != "x$new_path"; then
11561     JAVA_HOME_PROCESSED="$new_path"
11562     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
11563 $as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
11564   fi
11565 
11566   # Save the first 10 bytes of this path to the storage, so fixpath can work.
11567   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
11568 
11569   else
11570     # We're on a posix platform. Hooray! :)
11571     path="$JAVA_HOME_PROCESSED"
11572     has_space=`$ECHO "$path" | $GREP " "`
11573     if test "x$has_space" != x; then
11574       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
11575 $as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
11576       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
11577     fi
11578 
11579     # Use eval to expand a potential ~
11580     eval path="$path"
11581     if test ! -f "$path" && test ! -d "$path"; then
11582       as_fn_error $? "The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is not found." "$LINENO" 5
11583     fi
11584 
11585     JAVA_HOME_PROCESSED="`cd "$path"; $THEPWDCMD -L`"
11586   fi
11587 
11588         if test ! -d "$JAVA_HOME_PROCESSED"; then
11589             { $as_echo "$as_me:${as_lineno-$LINENO}: Your JAVA_HOME points to a non-existing directory!" >&5
11590 $as_echo "$as_me: Your JAVA_HOME points to a non-existing directory!" >&6;}
11591         else
11592           # Aha, the user has set a JAVA_HOME
11593           # let us use that as the Boot JDK.
11594           BOOT_JDK="$JAVA_HOME_PROCESSED"
11595           BOOT_JDK_FOUND=maybe
11596           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using JAVA_HOME" >&5
11597 $as_echo "$as_me: Found potential Boot JDK using JAVA_HOME" >&6;}
11598         fi
11599     fi
11600 
11601 
11602     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
11603     if test "x$BOOT_JDK_FOUND" = xmaybe; then
11604       # Do we have a bin/java?
11605       if test ! -x "$BOOT_JDK/bin/java"; then
11606         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
11607 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
11608         BOOT_JDK_FOUND=no
11609       else
11610         # Do we have a bin/javac?
11611         if test ! -x "$BOOT_JDK/bin/javac"; then
11612           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
11613 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
11614           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
11615 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
11616           BOOT_JDK_FOUND=no
11617         else
11618           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
11619           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
11620             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
11621 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
11622             BOOT_JDK_FOUND=no
11623           else
11624             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
11625             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
11626 
11627             # Extra M4 quote needed to protect [] in grep expression.
11628             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
11629             if test "x$FOUND_VERSION_78" = x; then
11630               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
11631 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
11632               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
11633 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
11634               BOOT_JDK_FOUND=no
11635             else
11636               # We're done! :-)
11637               BOOT_JDK_FOUND=yes
11638 
11639   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11640 
11641   # Input might be given as Windows format, start by converting to
11642   # unix format.
11643   path="$BOOT_JDK"
11644   new_path=`$CYGPATH -u "$path"`
11645 
11646   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
11647   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
11648   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
11649   # "foo.exe" is OK but "foo" is an error.
11650   #
11651   # This test is therefore slightly more accurate than "test -f" to check for file precense.
11652   # It is also a way to make sure we got the proper file name for the real test later on.
11653   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
11654   if test "x$test_shortpath" = x; then
11655     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11656 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11657     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
11658   fi
11659 
11660   # Call helper function which possibly converts this using DOS-style short mode.
11661   # If so, the updated path is stored in $new_path.
11662 
11663   input_path="$new_path"
11664   # Check if we need to convert this using DOS-style short mode. If the path
11665   # contains just simple characters, use it. Otherwise (spaces, weird characters),
11666   # take no chances and rewrite it.
11667   # Note: m4 eats our [], so we need to use [ and ] instead.
11668   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
11669   if test "x$has_forbidden_chars" != x; then
11670     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11671     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
11672     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
11673     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
11674       # Going to short mode and back again did indeed matter. Since short mode is
11675       # case insensitive, let's make it lowercase to improve readability.
11676       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11677       # Now convert it back to Unix-stile (cygpath)
11678       input_path=`$CYGPATH -u "$shortmode_path"`
11679       new_path="$input_path"
11680     fi
11681   fi
11682 
11683   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
11684   if test "x$test_cygdrive_prefix" = x; then
11685     # As a simple fix, exclude /usr/bin since it's not a real path.
11686     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
11687       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
11688       # a path prefixed by /cygdrive for fixpath to work.
11689       new_path="$CYGWIN_ROOT_PATH$input_path"
11690     fi
11691   fi
11692 
11693 
11694   if test "x$path" != "x$new_path"; then
11695     BOOT_JDK="$new_path"
11696     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11697 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11698   fi
11699 
11700   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11701 
11702   path="$BOOT_JDK"
11703   has_colon=`$ECHO $path | $GREP ^.:`
11704   new_path="$path"
11705   if test "x$has_colon" = x; then
11706     # Not in mixed or Windows style, start by that.
11707     new_path=`cmd //c echo $path`
11708   fi
11709 
11710 
11711   input_path="$new_path"
11712   # Check if we need to convert this using DOS-style short mode. If the path
11713   # contains just simple characters, use it. Otherwise (spaces, weird characters),
11714   # take no chances and rewrite it.
11715   # Note: m4 eats our [], so we need to use [ and ] instead.
11716   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
11717   if test "x$has_forbidden_chars" != x; then
11718     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11719     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11720   fi
11721 
11722 
11723   windows_path="$new_path"
11724   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11725     unix_path=`$CYGPATH -u "$windows_path"`
11726     new_path="$unix_path"
11727   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11728     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11729     new_path="$unix_path"
11730   fi
11731 
11732   if test "x$path" != "x$new_path"; then
11733     BOOT_JDK="$new_path"
11734     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11735 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11736   fi
11737 
11738   # Save the first 10 bytes of this path to the storage, so fixpath can work.
11739   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
11740 
11741   else
11742     # We're on a posix platform. Hooray! :)
11743     path="$BOOT_JDK"
11744     has_space=`$ECHO "$path" | $GREP " "`
11745     if test "x$has_space" != x; then
11746       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11747 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11748       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
11749     fi
11750 
11751     # Use eval to expand a potential ~
11752     eval path="$path"
11753     if test ! -f "$path" && test ! -d "$path"; then
11754       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
11755     fi
11756 
11757     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
11758   fi
11759 
11760               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
11761 $as_echo_n "checking for Boot JDK... " >&6; }
11762               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
11763 $as_echo "$BOOT_JDK" >&6; }
11764               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
11765 $as_echo_n "checking Boot JDK version... " >&6; }
11766               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
11767               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
11768 $as_echo "$BOOT_JDK_VERSION" >&6; }
11769             fi # end check jdk version
11770           fi # end check rt.jar
11771         fi # end check javac
11772       fi # end check java
11773     fi # end check boot jdk found
11774   fi
11775 
11776 
11777 # Test: Is there a /usr/libexec/java_home? (Typically on MacOSX)
11778 
11779   if test "x$BOOT_JDK_FOUND" = xno; then
11780     # Now execute the test
11781 
11782     if test -x /usr/libexec/java_home; then
11783         BOOT_JDK=`/usr/libexec/java_home`
11784         BOOT_JDK_FOUND=maybe
11785         { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home" >&5
11786 $as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home" >&6;}
11787     fi
11788 
11789 
11790     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
11791     if test "x$BOOT_JDK_FOUND" = xmaybe; then
11792       # Do we have a bin/java?
11793       if test ! -x "$BOOT_JDK/bin/java"; then
11794         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
11795 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
11796         BOOT_JDK_FOUND=no
11797       else
11798         # Do we have a bin/javac?
11799         if test ! -x "$BOOT_JDK/bin/javac"; then
11800           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
11801 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
11802           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
11803 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
11804           BOOT_JDK_FOUND=no
11805         else
11806           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
11807           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
11808             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
11809 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
11810             BOOT_JDK_FOUND=no
11811           else
11812             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
11813             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
11814 
11815             # Extra M4 quote needed to protect [] in grep expression.
11816             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
11817             if test "x$FOUND_VERSION_78" = x; then
11818               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
11819 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
11820               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
11821 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
11822               BOOT_JDK_FOUND=no
11823             else
11824               # We're done! :-)
11825               BOOT_JDK_FOUND=yes
11826 
11827   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11828 
11829   # Input might be given as Windows format, start by converting to
11830   # unix format.
11831   path="$BOOT_JDK"
11832   new_path=`$CYGPATH -u "$path"`
11833 
11834   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
11835   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
11836   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
11837   # "foo.exe" is OK but "foo" is an error.
11838   #
11839   # This test is therefore slightly more accurate than "test -f" to check for file precense.
11840   # It is also a way to make sure we got the proper file name for the real test later on.
11841   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
11842   if test "x$test_shortpath" = x; then
11843     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11844 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11845     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
11846   fi
11847 
11848   # Call helper function which possibly converts this using DOS-style short mode.
11849   # If so, the updated path is stored in $new_path.
11850 
11851   input_path="$new_path"
11852   # Check if we need to convert this using DOS-style short mode. If the path
11853   # contains just simple characters, use it. Otherwise (spaces, weird characters),
11854   # take no chances and rewrite it.
11855   # Note: m4 eats our [], so we need to use [ and ] instead.
11856   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
11857   if test "x$has_forbidden_chars" != x; then
11858     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11859     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
11860     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
11861     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
11862       # Going to short mode and back again did indeed matter. Since short mode is
11863       # case insensitive, let's make it lowercase to improve readability.
11864       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11865       # Now convert it back to Unix-stile (cygpath)
11866       input_path=`$CYGPATH -u "$shortmode_path"`
11867       new_path="$input_path"
11868     fi
11869   fi
11870 
11871   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
11872   if test "x$test_cygdrive_prefix" = x; then
11873     # As a simple fix, exclude /usr/bin since it's not a real path.
11874     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
11875       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
11876       # a path prefixed by /cygdrive for fixpath to work.
11877       new_path="$CYGWIN_ROOT_PATH$input_path"
11878     fi
11879   fi
11880 
11881 
11882   if test "x$path" != "x$new_path"; then
11883     BOOT_JDK="$new_path"
11884     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11885 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11886   fi
11887 
11888   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11889 
11890   path="$BOOT_JDK"
11891   has_colon=`$ECHO $path | $GREP ^.:`
11892   new_path="$path"
11893   if test "x$has_colon" = x; then
11894     # Not in mixed or Windows style, start by that.
11895     new_path=`cmd //c echo $path`
11896   fi
11897 
11898 
11899   input_path="$new_path"
11900   # Check if we need to convert this using DOS-style short mode. If the path
11901   # contains just simple characters, use it. Otherwise (spaces, weird characters),
11902   # take no chances and rewrite it.
11903   # Note: m4 eats our [], so we need to use [ and ] instead.
11904   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
11905   if test "x$has_forbidden_chars" != x; then
11906     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11907     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11908   fi
11909 
11910 
11911   windows_path="$new_path"
11912   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11913     unix_path=`$CYGPATH -u "$windows_path"`
11914     new_path="$unix_path"
11915   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11916     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11917     new_path="$unix_path"
11918   fi
11919 
11920   if test "x$path" != "x$new_path"; then
11921     BOOT_JDK="$new_path"
11922     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11923 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11924   fi
11925 
11926   # Save the first 10 bytes of this path to the storage, so fixpath can work.
11927   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
11928 
11929   else
11930     # We're on a posix platform. Hooray! :)
11931     path="$BOOT_JDK"
11932     has_space=`$ECHO "$path" | $GREP " "`
11933     if test "x$has_space" != x; then
11934       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11935 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11936       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
11937     fi
11938 
11939     # Use eval to expand a potential ~
11940     eval path="$path"
11941     if test ! -f "$path" && test ! -d "$path"; then
11942       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
11943     fi
11944 
11945     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
11946   fi
11947 
11948               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
11949 $as_echo_n "checking for Boot JDK... " >&6; }
11950               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
11951 $as_echo "$BOOT_JDK" >&6; }
11952               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
11953 $as_echo_n "checking Boot JDK version... " >&6; }
11954               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
11955               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
11956 $as_echo "$BOOT_JDK_VERSION" >&6; }
11957             fi # end check jdk version
11958           fi # end check rt.jar
11959         fi # end check javac
11960       fi # end check java
11961     fi # end check boot jdk found
11962   fi
11963 
11964 
11965 # Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
11966 
11967   if test "x$BOOT_JDK_FOUND" = xno; then
11968     # Now execute the test
11969 
11970     # Extract the first word of "javac", so it can be a program name with args.
11971 set dummy javac; ac_word=$2
11972 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11973 $as_echo_n "checking for $ac_word... " >&6; }
11974 if test "${ac_cv_path_JAVAC_CHECK+set}" = set; then :
11975   $as_echo_n "(cached) " >&6
11976 else
11977   case $JAVAC_CHECK in
11978   [\\/]* | ?:[\\/]*)
11979   ac_cv_path_JAVAC_CHECK="$JAVAC_CHECK" # Let the user override the test with a path.
11980   ;;
11981   *)
11982   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11983 for as_dir in $PATH
11984 do
11985   IFS=$as_save_IFS
11986   test -z "$as_dir" && as_dir=.
11987     for ac_exec_ext in '' $ac_executable_extensions; do
11988   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
11989     ac_cv_path_JAVAC_CHECK="$as_dir/$ac_word$ac_exec_ext"
11990     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11991     break 2
11992   fi
11993 done
11994   done
11995 IFS=$as_save_IFS
11996 
11997   ;;
11998 esac
11999 fi
12000 JAVAC_CHECK=$ac_cv_path_JAVAC_CHECK
12001 if test -n "$JAVAC_CHECK"; then
12002   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC_CHECK" >&5
12003 $as_echo "$JAVAC_CHECK" >&6; }
12004 else
12005   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12006 $as_echo "no" >&6; }
12007 fi
12008 
12009 
12010     # Extract the first word of "java", so it can be a program name with args.
12011 set dummy java; ac_word=$2
12012 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12013 $as_echo_n "checking for $ac_word... " >&6; }
12014 if test "${ac_cv_path_JAVA_CHECK+set}" = set; then :
12015   $as_echo_n "(cached) " >&6
12016 else
12017   case $JAVA_CHECK in
12018   [\\/]* | ?:[\\/]*)
12019   ac_cv_path_JAVA_CHECK="$JAVA_CHECK" # Let the user override the test with a path.
12020   ;;
12021   *)
12022   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12023 for as_dir in $PATH
12024 do
12025   IFS=$as_save_IFS
12026   test -z "$as_dir" && as_dir=.
12027     for ac_exec_ext in '' $ac_executable_extensions; do
12028   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
12029     ac_cv_path_JAVA_CHECK="$as_dir/$ac_word$ac_exec_ext"
12030     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12031     break 2
12032   fi
12033 done
12034   done
12035 IFS=$as_save_IFS
12036 
12037   ;;
12038 esac
12039 fi
12040 JAVA_CHECK=$ac_cv_path_JAVA_CHECK
12041 if test -n "$JAVA_CHECK"; then
12042   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA_CHECK" >&5
12043 $as_echo "$JAVA_CHECK" >&6; }
12044 else
12045   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12046 $as_echo "no" >&6; }
12047 fi
12048 
12049 
12050     BINARY="$JAVAC_CHECK"
12051     if test "x$JAVAC_CHECK" = x; then
12052         BINARY="$JAVA_CHECK"
12053     fi
12054     if test "x$BINARY" != x; then
12055         # So there is a java(c) binary, it might be part of a JDK.
12056         # Lets find the JDK/JRE directory by following symbolic links.
12057         # Linux/GNU systems often have links from /usr/bin/java to
12058         # /etc/alternatives/java to the real JDK binary.
12059 
12060     if test "x$OPENJDK_BUILD_OS" != xwindows; then
12061         # Follow a chain of symbolic links. Use readlink
12062         # where it exists, else fall back to horribly
12063         # complicated shell code.
12064         if test "x$READLINK_TESTED" != yes; then
12065             # On MacOSX there is a readlink tool with a different
12066             # purpose than the GNU readlink tool. Check the found readlink.
12067             ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
12068             if test "x$ISGNU" = x; then
12069                  # A readlink that we do not know how to use.
12070                  # Are there other non-GNU readlinks out there?
12071                  READLINK_TESTED=yes
12072                  READLINK=
12073             fi
12074         fi
12075 
12076         if test "x$READLINK" != x; then
12077             BINARY=`$READLINK -f $BINARY`
12078         else
12079             # Save the current directory for restoring afterwards
12080             STARTDIR=$PWD
12081             COUNTER=0
12082             sym_link_dir=`$DIRNAME $BINARY`
12083             sym_link_file=`$BASENAME $BINARY`
12084             cd $sym_link_dir
12085             # Use -P flag to resolve symlinks in directories.
12086             cd `$THEPWDCMD -P`
12087             sym_link_dir=`$THEPWDCMD -P`
12088             # Resolve file symlinks
12089             while test $COUNTER -lt 20; do
12090                 ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
12091                 if test "x$ISLINK" == x; then
12092                     # This is not a symbolic link! We are done!
12093                     break
12094                 fi
12095                 # Again resolve directory symlinks since the target of the just found
12096                 # link could be in a different directory
12097                 cd `$DIRNAME $ISLINK`
12098                 sym_link_dir=`$THEPWDCMD -P`
12099                 sym_link_file=`$BASENAME $ISLINK`
12100                 let COUNTER=COUNTER+1
12101             done
12102             cd $STARTDIR
12103             BINARY=$sym_link_dir/$sym_link_file
12104         fi
12105     fi
12106 
12107         BOOT_JDK=`dirname "$BINARY"`
12108         BOOT_JDK=`cd "$BOOT_JDK/.."; pwd`
12109         if test -x "$BOOT_JDK/bin/javac" && test -x "$BOOT_JDK/bin/java"; then
12110             # Looks like we found ourselves an JDK
12111             BOOT_JDK_FOUND=maybe
12112             { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using java(c) in PATH" >&5
12113 $as_echo "$as_me: Found potential Boot JDK using java(c) in PATH" >&6;}
12114         fi
12115     fi
12116 
12117 
12118     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12119     if test "x$BOOT_JDK_FOUND" = xmaybe; then
12120       # Do we have a bin/java?
12121       if test ! -x "$BOOT_JDK/bin/java"; then
12122         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12123 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12124         BOOT_JDK_FOUND=no
12125       else
12126         # Do we have a bin/javac?
12127         if test ! -x "$BOOT_JDK/bin/javac"; then
12128           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12129 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12130           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12131 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12132           BOOT_JDK_FOUND=no
12133         else
12134           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12135           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12136             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12137 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12138             BOOT_JDK_FOUND=no
12139           else
12140             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12141             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12142 
12143             # Extra M4 quote needed to protect [] in grep expression.
12144             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12145             if test "x$FOUND_VERSION_78" = x; then
12146               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12147 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12148               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12149 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12150               BOOT_JDK_FOUND=no
12151             else
12152               # We're done! :-)
12153               BOOT_JDK_FOUND=yes
12154 
12155   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12156 
12157   # Input might be given as Windows format, start by converting to
12158   # unix format.
12159   path="$BOOT_JDK"
12160   new_path=`$CYGPATH -u "$path"`
12161 
12162   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12163   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12164   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12165   # "foo.exe" is OK but "foo" is an error.
12166   #
12167   # This test is therefore slightly more accurate than "test -f" to check for file precense.
12168   # It is also a way to make sure we got the proper file name for the real test later on.
12169   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12170   if test "x$test_shortpath" = x; then
12171     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12172 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12173     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12174   fi
12175 
12176   # Call helper function which possibly converts this using DOS-style short mode.
12177   # If so, the updated path is stored in $new_path.
12178 
12179   input_path="$new_path"
12180   # Check if we need to convert this using DOS-style short mode. If the path
12181   # contains just simple characters, use it. Otherwise (spaces, weird characters),
12182   # take no chances and rewrite it.
12183   # Note: m4 eats our [], so we need to use [ and ] instead.
12184   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12185   if test "x$has_forbidden_chars" != x; then
12186     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12187     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12188     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12189     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12190       # Going to short mode and back again did indeed matter. Since short mode is
12191       # case insensitive, let's make it lowercase to improve readability.
12192       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12193       # Now convert it back to Unix-stile (cygpath)
12194       input_path=`$CYGPATH -u "$shortmode_path"`
12195       new_path="$input_path"
12196     fi
12197   fi
12198 
12199   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12200   if test "x$test_cygdrive_prefix" = x; then
12201     # As a simple fix, exclude /usr/bin since it's not a real path.
12202     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12203       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12204       # a path prefixed by /cygdrive for fixpath to work.
12205       new_path="$CYGWIN_ROOT_PATH$input_path"
12206     fi
12207   fi
12208 
12209 
12210   if test "x$path" != "x$new_path"; then
12211     BOOT_JDK="$new_path"
12212     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12213 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12214   fi
12215 
12216   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12217 
12218   path="$BOOT_JDK"
12219   has_colon=`$ECHO $path | $GREP ^.:`
12220   new_path="$path"
12221   if test "x$has_colon" = x; then
12222     # Not in mixed or Windows style, start by that.
12223     new_path=`cmd //c echo $path`
12224   fi
12225 
12226 
12227   input_path="$new_path"
12228   # Check if we need to convert this using DOS-style short mode. If the path
12229   # contains just simple characters, use it. Otherwise (spaces, weird characters),
12230   # take no chances and rewrite it.
12231   # Note: m4 eats our [], so we need to use [ and ] instead.
12232   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12233   if test "x$has_forbidden_chars" != x; then
12234     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12235     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12236   fi
12237 
12238 
12239   windows_path="$new_path"
12240   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12241     unix_path=`$CYGPATH -u "$windows_path"`
12242     new_path="$unix_path"
12243   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12244     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12245     new_path="$unix_path"
12246   fi
12247 
12248   if test "x$path" != "x$new_path"; then
12249     BOOT_JDK="$new_path"
12250     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12251 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12252   fi
12253 
12254   # Save the first 10 bytes of this path to the storage, so fixpath can work.
12255   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12256 
12257   else
12258     # We're on a posix platform. Hooray! :)
12259     path="$BOOT_JDK"
12260     has_space=`$ECHO "$path" | $GREP " "`
12261     if test "x$has_space" != x; then
12262       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12263 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12264       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
12265     fi
12266 
12267     # Use eval to expand a potential ~
12268     eval path="$path"
12269     if test ! -f "$path" && test ! -d "$path"; then
12270       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
12271     fi
12272 
12273     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
12274   fi
12275 
12276               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12277 $as_echo_n "checking for Boot JDK... " >&6; }
12278               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12279 $as_echo "$BOOT_JDK" >&6; }
12280               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12281 $as_echo_n "checking Boot JDK version... " >&6; }
12282               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12283               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12284 $as_echo "$BOOT_JDK_VERSION" >&6; }
12285             fi # end check jdk version
12286           fi # end check rt.jar
12287         fi # end check javac
12288       fi # end check java
12289     fi # end check boot jdk found
12290   fi
12291 
12292 
12293 # Test: Is there a JDK installed in default, well-known locations?
12294 
12295   if test "x$BOOT_JDK_FOUND" = xno; then
12296     # Now execute the test
12297 
12298   if test "x$OPENJDK_TARGET_OS" = xwindows; then
12299 
12300   if test "x$BOOT_JDK_FOUND" = xno; then
12301     # Now execute the test
12302 
12303   if test "x$ProgramW6432" != x; then
12304     VIRTUAL_DIR="$ProgramW6432/Java"
12305 
12306   windows_path="$VIRTUAL_DIR"
12307   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12308     unix_path=`$CYGPATH -u "$windows_path"`
12309     VIRTUAL_DIR="$unix_path"
12310   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12311     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12312     VIRTUAL_DIR="$unix_path"
12313   fi
12314 
12315 
12316   BOOT_JDK_PREFIX="$VIRTUAL_DIR"
12317   BOOT_JDK_SUFFIX=""
12318   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
12319   if test "x$ALL_JDKS_FOUND" != x; then
12320     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
12321 
12322   if test "x$BOOT_JDK_FOUND" = xno; then
12323     # Now execute the test
12324 
12325         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
12326         if test -d "$BOOT_JDK"; then
12327           BOOT_JDK_FOUND=maybe
12328           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
12329 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
12330         fi
12331 
12332 
12333     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12334     if test "x$BOOT_JDK_FOUND" = xmaybe; then
12335       # Do we have a bin/java?
12336       if test ! -x "$BOOT_JDK/bin/java"; then
12337         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12338 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12339         BOOT_JDK_FOUND=no
12340       else
12341         # Do we have a bin/javac?
12342         if test ! -x "$BOOT_JDK/bin/javac"; then
12343           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12344 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12345           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12346 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12347           BOOT_JDK_FOUND=no
12348         else
12349           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12350           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12351             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12352 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12353             BOOT_JDK_FOUND=no
12354           else
12355             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12356             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12357 
12358             # Extra M4 quote needed to protect [] in grep expression.
12359             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12360             if test "x$FOUND_VERSION_78" = x; then
12361               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12362 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12363               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12364 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12365               BOOT_JDK_FOUND=no
12366             else
12367               # We're done! :-)
12368               BOOT_JDK_FOUND=yes
12369 
12370   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12371 
12372   # Input might be given as Windows format, start by converting to
12373   # unix format.
12374   path="$BOOT_JDK"
12375   new_path=`$CYGPATH -u "$path"`
12376 
12377   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12378   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12379   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12380   # "foo.exe" is OK but "foo" is an error.
12381   #
12382   # This test is therefore slightly more accurate than "test -f" to check for file precense.
12383   # It is also a way to make sure we got the proper file name for the real test later on.
12384   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12385   if test "x$test_shortpath" = x; then
12386     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12387 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12388     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12389   fi
12390 
12391   # Call helper function which possibly converts this using DOS-style short mode.
12392   # If so, the updated path is stored in $new_path.
12393 
12394   input_path="$new_path"
12395   # Check if we need to convert this using DOS-style short mode. If the path
12396   # contains just simple characters, use it. Otherwise (spaces, weird characters),
12397   # take no chances and rewrite it.
12398   # Note: m4 eats our [], so we need to use [ and ] instead.
12399   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12400   if test "x$has_forbidden_chars" != x; then
12401     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12402     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12403     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12404     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12405       # Going to short mode and back again did indeed matter. Since short mode is
12406       # case insensitive, let's make it lowercase to improve readability.
12407       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12408       # Now convert it back to Unix-stile (cygpath)
12409       input_path=`$CYGPATH -u "$shortmode_path"`
12410       new_path="$input_path"
12411     fi
12412   fi
12413 
12414   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12415   if test "x$test_cygdrive_prefix" = x; then
12416     # As a simple fix, exclude /usr/bin since it's not a real path.
12417     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12418       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12419       # a path prefixed by /cygdrive for fixpath to work.
12420       new_path="$CYGWIN_ROOT_PATH$input_path"
12421     fi
12422   fi
12423 
12424 
12425   if test "x$path" != "x$new_path"; then
12426     BOOT_JDK="$new_path"
12427     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12428 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12429   fi
12430 
12431   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12432 
12433   path="$BOOT_JDK"
12434   has_colon=`$ECHO $path | $GREP ^.:`
12435   new_path="$path"
12436   if test "x$has_colon" = x; then
12437     # Not in mixed or Windows style, start by that.
12438     new_path=`cmd //c echo $path`
12439   fi
12440 
12441 
12442   input_path="$new_path"
12443   # Check if we need to convert this using DOS-style short mode. If the path
12444   # contains just simple characters, use it. Otherwise (spaces, weird characters),
12445   # take no chances and rewrite it.
12446   # Note: m4 eats our [], so we need to use [ and ] instead.
12447   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12448   if test "x$has_forbidden_chars" != x; then
12449     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12450     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12451   fi
12452 
12453 
12454   windows_path="$new_path"
12455   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12456     unix_path=`$CYGPATH -u "$windows_path"`
12457     new_path="$unix_path"
12458   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12459     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12460     new_path="$unix_path"
12461   fi
12462 
12463   if test "x$path" != "x$new_path"; then
12464     BOOT_JDK="$new_path"
12465     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12466 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12467   fi
12468 
12469   # Save the first 10 bytes of this path to the storage, so fixpath can work.
12470   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12471 
12472   else
12473     # We're on a posix platform. Hooray! :)
12474     path="$BOOT_JDK"
12475     has_space=`$ECHO "$path" | $GREP " "`
12476     if test "x$has_space" != x; then
12477       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12478 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12479       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
12480     fi
12481 
12482     # Use eval to expand a potential ~
12483     eval path="$path"
12484     if test ! -f "$path" && test ! -d "$path"; then
12485       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
12486     fi
12487 
12488     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
12489   fi
12490 
12491               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12492 $as_echo_n "checking for Boot JDK... " >&6; }
12493               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12494 $as_echo "$BOOT_JDK" >&6; }
12495               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12496 $as_echo_n "checking Boot JDK version... " >&6; }
12497               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12498               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12499 $as_echo "$BOOT_JDK_VERSION" >&6; }
12500             fi # end check jdk version
12501           fi # end check rt.jar
12502         fi # end check javac
12503       fi # end check java
12504     fi # end check boot jdk found
12505   fi
12506 
12507     done
12508   fi
12509 
12510   fi
12511 
12512 
12513     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12514     if test "x$BOOT_JDK_FOUND" = xmaybe; then
12515       # Do we have a bin/java?
12516       if test ! -x "$BOOT_JDK/bin/java"; then
12517         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12518 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12519         BOOT_JDK_FOUND=no
12520       else
12521         # Do we have a bin/javac?
12522         if test ! -x "$BOOT_JDK/bin/javac"; then
12523           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12524 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12525           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12526 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12527           BOOT_JDK_FOUND=no
12528         else
12529           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12530           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12531             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12532 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12533             BOOT_JDK_FOUND=no
12534           else
12535             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12536             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12537 
12538             # Extra M4 quote needed to protect [] in grep expression.
12539             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12540             if test "x$FOUND_VERSION_78" = x; then
12541               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12542 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12543               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12544 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12545               BOOT_JDK_FOUND=no
12546             else
12547               # We're done! :-)
12548               BOOT_JDK_FOUND=yes
12549 
12550   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12551 
12552   # Input might be given as Windows format, start by converting to
12553   # unix format.
12554   path="$BOOT_JDK"
12555   new_path=`$CYGPATH -u "$path"`
12556 
12557   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12558   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12559   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12560   # "foo.exe" is OK but "foo" is an error.
12561   #
12562   # This test is therefore slightly more accurate than "test -f" to check for file precense.
12563   # It is also a way to make sure we got the proper file name for the real test later on.
12564   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12565   if test "x$test_shortpath" = x; then
12566     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12567 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12568     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12569   fi
12570 
12571   # Call helper function which possibly converts this using DOS-style short mode.
12572   # If so, the updated path is stored in $new_path.
12573 
12574   input_path="$new_path"
12575   # Check if we need to convert this using DOS-style short mode. If the path
12576   # contains just simple characters, use it. Otherwise (spaces, weird characters),
12577   # take no chances and rewrite it.
12578   # Note: m4 eats our [], so we need to use [ and ] instead.
12579   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12580   if test "x$has_forbidden_chars" != x; then
12581     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12582     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12583     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12584     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12585       # Going to short mode and back again did indeed matter. Since short mode is
12586       # case insensitive, let's make it lowercase to improve readability.
12587       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12588       # Now convert it back to Unix-stile (cygpath)
12589       input_path=`$CYGPATH -u "$shortmode_path"`
12590       new_path="$input_path"
12591     fi
12592   fi
12593 
12594   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12595   if test "x$test_cygdrive_prefix" = x; then
12596     # As a simple fix, exclude /usr/bin since it's not a real path.
12597     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12598       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12599       # a path prefixed by /cygdrive for fixpath to work.
12600       new_path="$CYGWIN_ROOT_PATH$input_path"
12601     fi
12602   fi
12603 
12604 
12605   if test "x$path" != "x$new_path"; then
12606     BOOT_JDK="$new_path"
12607     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12608 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12609   fi
12610 
12611   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12612 
12613   path="$BOOT_JDK"
12614   has_colon=`$ECHO $path | $GREP ^.:`
12615   new_path="$path"
12616   if test "x$has_colon" = x; then
12617     # Not in mixed or Windows style, start by that.
12618     new_path=`cmd //c echo $path`
12619   fi
12620 
12621 
12622   input_path="$new_path"
12623   # Check if we need to convert this using DOS-style short mode. If the path
12624   # contains just simple characters, use it. Otherwise (spaces, weird characters),
12625   # take no chances and rewrite it.
12626   # Note: m4 eats our [], so we need to use [ and ] instead.
12627   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12628   if test "x$has_forbidden_chars" != x; then
12629     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12630     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12631   fi
12632 
12633 
12634   windows_path="$new_path"
12635   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12636     unix_path=`$CYGPATH -u "$windows_path"`
12637     new_path="$unix_path"
12638   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12639     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12640     new_path="$unix_path"
12641   fi
12642 
12643   if test "x$path" != "x$new_path"; then
12644     BOOT_JDK="$new_path"
12645     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12646 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12647   fi
12648 
12649   # Save the first 10 bytes of this path to the storage, so fixpath can work.
12650   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12651 
12652   else
12653     # We're on a posix platform. Hooray! :)
12654     path="$BOOT_JDK"
12655     has_space=`$ECHO "$path" | $GREP " "`
12656     if test "x$has_space" != x; then
12657       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12658 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12659       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
12660     fi
12661 
12662     # Use eval to expand a potential ~
12663     eval path="$path"
12664     if test ! -f "$path" && test ! -d "$path"; then
12665       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
12666     fi
12667 
12668     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
12669   fi
12670 
12671               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12672 $as_echo_n "checking for Boot JDK... " >&6; }
12673               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12674 $as_echo "$BOOT_JDK" >&6; }
12675               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12676 $as_echo_n "checking Boot JDK version... " >&6; }
12677               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12678               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12679 $as_echo "$BOOT_JDK_VERSION" >&6; }
12680             fi # end check jdk version
12681           fi # end check rt.jar
12682         fi # end check javac
12683       fi # end check java
12684     fi # end check boot jdk found
12685   fi
12686 
12687 
12688   if test "x$BOOT_JDK_FOUND" = xno; then
12689     # Now execute the test
12690 
12691   if test "x$PROGRAMW6432" != x; then
12692     VIRTUAL_DIR="$PROGRAMW6432/Java"
12693 
12694   windows_path="$VIRTUAL_DIR"
12695   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12696     unix_path=`$CYGPATH -u "$windows_path"`
12697     VIRTUAL_DIR="$unix_path"
12698   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12699     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12700     VIRTUAL_DIR="$unix_path"
12701   fi
12702 
12703 
12704   BOOT_JDK_PREFIX="$VIRTUAL_DIR"
12705   BOOT_JDK_SUFFIX=""
12706   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
12707   if test "x$ALL_JDKS_FOUND" != x; then
12708     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
12709 
12710   if test "x$BOOT_JDK_FOUND" = xno; then
12711     # Now execute the test
12712 
12713         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
12714         if test -d "$BOOT_JDK"; then
12715           BOOT_JDK_FOUND=maybe
12716           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
12717 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
12718         fi
12719 
12720 
12721     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12722     if test "x$BOOT_JDK_FOUND" = xmaybe; then
12723       # Do we have a bin/java?
12724       if test ! -x "$BOOT_JDK/bin/java"; then
12725         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12726 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12727         BOOT_JDK_FOUND=no
12728       else
12729         # Do we have a bin/javac?
12730         if test ! -x "$BOOT_JDK/bin/javac"; then
12731           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12732 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12733           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12734 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12735           BOOT_JDK_FOUND=no
12736         else
12737           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12738           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12739             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12740 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12741             BOOT_JDK_FOUND=no
12742           else
12743             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12744             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12745 
12746             # Extra M4 quote needed to protect [] in grep expression.
12747             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12748             if test "x$FOUND_VERSION_78" = x; then
12749               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12750 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12751               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12752 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12753               BOOT_JDK_FOUND=no
12754             else
12755               # We're done! :-)
12756               BOOT_JDK_FOUND=yes
12757 
12758   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12759 
12760   # Input might be given as Windows format, start by converting to
12761   # unix format.
12762   path="$BOOT_JDK"
12763   new_path=`$CYGPATH -u "$path"`
12764 
12765   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12766   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12767   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12768   # "foo.exe" is OK but "foo" is an error.
12769   #
12770   # This test is therefore slightly more accurate than "test -f" to check for file precense.
12771   # It is also a way to make sure we got the proper file name for the real test later on.
12772   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12773   if test "x$test_shortpath" = x; then
12774     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12775 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12776     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12777   fi
12778 
12779   # Call helper function which possibly converts this using DOS-style short mode.
12780   # If so, the updated path is stored in $new_path.
12781 
12782   input_path="$new_path"
12783   # Check if we need to convert this using DOS-style short mode. If the path
12784   # contains just simple characters, use it. Otherwise (spaces, weird characters),
12785   # take no chances and rewrite it.
12786   # Note: m4 eats our [], so we need to use [ and ] instead.
12787   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12788   if test "x$has_forbidden_chars" != x; then
12789     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12790     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12791     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12792     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12793       # Going to short mode and back again did indeed matter. Since short mode is
12794       # case insensitive, let's make it lowercase to improve readability.
12795       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12796       # Now convert it back to Unix-stile (cygpath)
12797       input_path=`$CYGPATH -u "$shortmode_path"`
12798       new_path="$input_path"
12799     fi
12800   fi
12801 
12802   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12803   if test "x$test_cygdrive_prefix" = x; then
12804     # As a simple fix, exclude /usr/bin since it's not a real path.
12805     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12806       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12807       # a path prefixed by /cygdrive for fixpath to work.
12808       new_path="$CYGWIN_ROOT_PATH$input_path"
12809     fi
12810   fi
12811 
12812 
12813   if test "x$path" != "x$new_path"; then
12814     BOOT_JDK="$new_path"
12815     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12816 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12817   fi
12818 
12819   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12820 
12821   path="$BOOT_JDK"
12822   has_colon=`$ECHO $path | $GREP ^.:`
12823   new_path="$path"
12824   if test "x$has_colon" = x; then
12825     # Not in mixed or Windows style, start by that.
12826     new_path=`cmd //c echo $path`
12827   fi
12828 
12829 
12830   input_path="$new_path"
12831   # Check if we need to convert this using DOS-style short mode. If the path
12832   # contains just simple characters, use it. Otherwise (spaces, weird characters),
12833   # take no chances and rewrite it.
12834   # Note: m4 eats our [], so we need to use [ and ] instead.
12835   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12836   if test "x$has_forbidden_chars" != x; then
12837     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12838     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12839   fi
12840 
12841 
12842   windows_path="$new_path"
12843   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12844     unix_path=`$CYGPATH -u "$windows_path"`
12845     new_path="$unix_path"
12846   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12847     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12848     new_path="$unix_path"
12849   fi
12850 
12851   if test "x$path" != "x$new_path"; then
12852     BOOT_JDK="$new_path"
12853     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12854 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12855   fi
12856 
12857   # Save the first 10 bytes of this path to the storage, so fixpath can work.
12858   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12859 
12860   else
12861     # We're on a posix platform. Hooray! :)
12862     path="$BOOT_JDK"
12863     has_space=`$ECHO "$path" | $GREP " "`
12864     if test "x$has_space" != x; then
12865       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12866 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12867       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
12868     fi
12869 
12870     # Use eval to expand a potential ~
12871     eval path="$path"
12872     if test ! -f "$path" && test ! -d "$path"; then
12873       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
12874     fi
12875 
12876     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
12877   fi
12878 
12879               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12880 $as_echo_n "checking for Boot JDK... " >&6; }
12881               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12882 $as_echo "$BOOT_JDK" >&6; }
12883               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12884 $as_echo_n "checking Boot JDK version... " >&6; }
12885               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12886               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12887 $as_echo "$BOOT_JDK_VERSION" >&6; }
12888             fi # end check jdk version
12889           fi # end check rt.jar
12890         fi # end check javac
12891       fi # end check java
12892     fi # end check boot jdk found
12893   fi
12894 
12895     done
12896   fi
12897 
12898   fi
12899 
12900 
12901     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12902     if test "x$BOOT_JDK_FOUND" = xmaybe; then
12903       # Do we have a bin/java?
12904       if test ! -x "$BOOT_JDK/bin/java"; then
12905         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12906 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12907         BOOT_JDK_FOUND=no
12908       else
12909         # Do we have a bin/javac?
12910         if test ! -x "$BOOT_JDK/bin/javac"; then
12911           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12912 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12913           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12914 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12915           BOOT_JDK_FOUND=no
12916         else
12917           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12918           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12919             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12920 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12921             BOOT_JDK_FOUND=no
12922           else
12923             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12924             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12925 
12926             # Extra M4 quote needed to protect [] in grep expression.
12927             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12928             if test "x$FOUND_VERSION_78" = x; then
12929               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12930 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12931               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12932 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12933               BOOT_JDK_FOUND=no
12934             else
12935               # We're done! :-)
12936               BOOT_JDK_FOUND=yes
12937 
12938   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12939 
12940   # Input might be given as Windows format, start by converting to
12941   # unix format.
12942   path="$BOOT_JDK"
12943   new_path=`$CYGPATH -u "$path"`
12944 
12945   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12946   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12947   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12948   # "foo.exe" is OK but "foo" is an error.
12949   #
12950   # This test is therefore slightly more accurate than "test -f" to check for file precense.
12951   # It is also a way to make sure we got the proper file name for the real test later on.
12952   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12953   if test "x$test_shortpath" = x; then
12954     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12955 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12956     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12957   fi
12958 
12959   # Call helper function which possibly converts this using DOS-style short mode.
12960   # If so, the updated path is stored in $new_path.
12961 
12962   input_path="$new_path"
12963   # Check if we need to convert this using DOS-style short mode. If the path
12964   # contains just simple characters, use it. Otherwise (spaces, weird characters),
12965   # take no chances and rewrite it.
12966   # Note: m4 eats our [], so we need to use [ and ] instead.
12967   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12968   if test "x$has_forbidden_chars" != x; then
12969     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12970     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12971     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12972     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12973       # Going to short mode and back again did indeed matter. Since short mode is
12974       # case insensitive, let's make it lowercase to improve readability.
12975       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12976       # Now convert it back to Unix-stile (cygpath)
12977       input_path=`$CYGPATH -u "$shortmode_path"`
12978       new_path="$input_path"
12979     fi
12980   fi
12981 
12982   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12983   if test "x$test_cygdrive_prefix" = x; then
12984     # As a simple fix, exclude /usr/bin since it's not a real path.
12985     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12986       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12987       # a path prefixed by /cygdrive for fixpath to work.
12988       new_path="$CYGWIN_ROOT_PATH$input_path"
12989     fi
12990   fi
12991 
12992 
12993   if test "x$path" != "x$new_path"; then
12994     BOOT_JDK="$new_path"
12995     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12996 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12997   fi
12998 
12999   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13000 
13001   path="$BOOT_JDK"
13002   has_colon=`$ECHO $path | $GREP ^.:`
13003   new_path="$path"
13004   if test "x$has_colon" = x; then
13005     # Not in mixed or Windows style, start by that.
13006     new_path=`cmd //c echo $path`
13007   fi
13008 
13009 
13010   input_path="$new_path"
13011   # Check if we need to convert this using DOS-style short mode. If the path
13012   # contains just simple characters, use it. Otherwise (spaces, weird characters),
13013   # take no chances and rewrite it.
13014   # Note: m4 eats our [], so we need to use [ and ] instead.
13015   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13016   if test "x$has_forbidden_chars" != x; then
13017     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13018     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13019   fi
13020 
13021 
13022   windows_path="$new_path"
13023   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13024     unix_path=`$CYGPATH -u "$windows_path"`
13025     new_path="$unix_path"
13026   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13027     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13028     new_path="$unix_path"
13029   fi
13030 
13031   if test "x$path" != "x$new_path"; then
13032     BOOT_JDK="$new_path"
13033     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13034 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13035   fi
13036 
13037   # Save the first 10 bytes of this path to the storage, so fixpath can work.
13038   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13039 
13040   else
13041     # We're on a posix platform. Hooray! :)
13042     path="$BOOT_JDK"
13043     has_space=`$ECHO "$path" | $GREP " "`
13044     if test "x$has_space" != x; then
13045       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13046 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13047       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13048     fi
13049 
13050     # Use eval to expand a potential ~
13051     eval path="$path"
13052     if test ! -f "$path" && test ! -d "$path"; then
13053       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13054     fi
13055 
13056     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
13057   fi
13058 
13059               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13060 $as_echo_n "checking for Boot JDK... " >&6; }
13061               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13062 $as_echo "$BOOT_JDK" >&6; }
13063               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13064 $as_echo_n "checking Boot JDK version... " >&6; }
13065               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13066               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13067 $as_echo "$BOOT_JDK_VERSION" >&6; }
13068             fi # end check jdk version
13069           fi # end check rt.jar
13070         fi # end check javac
13071       fi # end check java
13072     fi # end check boot jdk found
13073   fi
13074 
13075 
13076   if test "x$BOOT_JDK_FOUND" = xno; then
13077     # Now execute the test
13078 
13079   if test "x$PROGRAMFILES" != x; then
13080     VIRTUAL_DIR="$PROGRAMFILES/Java"
13081 
13082   windows_path="$VIRTUAL_DIR"
13083   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13084     unix_path=`$CYGPATH -u "$windows_path"`
13085     VIRTUAL_DIR="$unix_path"
13086   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13087     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13088     VIRTUAL_DIR="$unix_path"
13089   fi
13090 
13091 
13092   BOOT_JDK_PREFIX="$VIRTUAL_DIR"
13093   BOOT_JDK_SUFFIX=""
13094   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
13095   if test "x$ALL_JDKS_FOUND" != x; then
13096     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
13097 
13098   if test "x$BOOT_JDK_FOUND" = xno; then
13099     # Now execute the test
13100 
13101         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
13102         if test -d "$BOOT_JDK"; then
13103           BOOT_JDK_FOUND=maybe
13104           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
13105 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
13106         fi
13107 
13108 
13109     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13110     if test "x$BOOT_JDK_FOUND" = xmaybe; then
13111       # Do we have a bin/java?
13112       if test ! -x "$BOOT_JDK/bin/java"; then
13113         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13114 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13115         BOOT_JDK_FOUND=no
13116       else
13117         # Do we have a bin/javac?
13118         if test ! -x "$BOOT_JDK/bin/javac"; then
13119           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13120 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13121           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13122 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13123           BOOT_JDK_FOUND=no
13124         else
13125           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13126           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13127             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13128 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13129             BOOT_JDK_FOUND=no
13130           else
13131             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13132             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13133 
13134             # Extra M4 quote needed to protect [] in grep expression.
13135             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13136             if test "x$FOUND_VERSION_78" = x; then
13137               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13138 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13139               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13140 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13141               BOOT_JDK_FOUND=no
13142             else
13143               # We're done! :-)
13144               BOOT_JDK_FOUND=yes
13145 
13146   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13147 
13148   # Input might be given as Windows format, start by converting to
13149   # unix format.
13150   path="$BOOT_JDK"
13151   new_path=`$CYGPATH -u "$path"`
13152 
13153   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13154   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13155   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13156   # "foo.exe" is OK but "foo" is an error.
13157   #
13158   # This test is therefore slightly more accurate than "test -f" to check for file precense.
13159   # It is also a way to make sure we got the proper file name for the real test later on.
13160   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13161   if test "x$test_shortpath" = x; then
13162     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13163 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13164     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13165   fi
13166 
13167   # Call helper function which possibly converts this using DOS-style short mode.
13168   # If so, the updated path is stored in $new_path.
13169 
13170   input_path="$new_path"
13171   # Check if we need to convert this using DOS-style short mode. If the path
13172   # contains just simple characters, use it. Otherwise (spaces, weird characters),
13173   # take no chances and rewrite it.
13174   # Note: m4 eats our [], so we need to use [ and ] instead.
13175   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13176   if test "x$has_forbidden_chars" != x; then
13177     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13178     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13179     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13180     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13181       # Going to short mode and back again did indeed matter. Since short mode is
13182       # case insensitive, let's make it lowercase to improve readability.
13183       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13184       # Now convert it back to Unix-stile (cygpath)
13185       input_path=`$CYGPATH -u "$shortmode_path"`
13186       new_path="$input_path"
13187     fi
13188   fi
13189 
13190   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13191   if test "x$test_cygdrive_prefix" = x; then
13192     # As a simple fix, exclude /usr/bin since it's not a real path.
13193     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13194       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13195       # a path prefixed by /cygdrive for fixpath to work.
13196       new_path="$CYGWIN_ROOT_PATH$input_path"
13197     fi
13198   fi
13199 
13200 
13201   if test "x$path" != "x$new_path"; then
13202     BOOT_JDK="$new_path"
13203     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13204 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13205   fi
13206 
13207   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13208 
13209   path="$BOOT_JDK"
13210   has_colon=`$ECHO $path | $GREP ^.:`
13211   new_path="$path"
13212   if test "x$has_colon" = x; then
13213     # Not in mixed or Windows style, start by that.
13214     new_path=`cmd //c echo $path`
13215   fi
13216 
13217 
13218   input_path="$new_path"
13219   # Check if we need to convert this using DOS-style short mode. If the path
13220   # contains just simple characters, use it. Otherwise (spaces, weird characters),
13221   # take no chances and rewrite it.
13222   # Note: m4 eats our [], so we need to use [ and ] instead.
13223   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13224   if test "x$has_forbidden_chars" != x; then
13225     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13226     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13227   fi
13228 
13229 
13230   windows_path="$new_path"
13231   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13232     unix_path=`$CYGPATH -u "$windows_path"`
13233     new_path="$unix_path"
13234   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13235     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13236     new_path="$unix_path"
13237   fi
13238 
13239   if test "x$path" != "x$new_path"; then
13240     BOOT_JDK="$new_path"
13241     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13242 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13243   fi
13244 
13245   # Save the first 10 bytes of this path to the storage, so fixpath can work.
13246   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13247 
13248   else
13249     # We're on a posix platform. Hooray! :)
13250     path="$BOOT_JDK"
13251     has_space=`$ECHO "$path" | $GREP " "`
13252     if test "x$has_space" != x; then
13253       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13254 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13255       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13256     fi
13257 
13258     # Use eval to expand a potential ~
13259     eval path="$path"
13260     if test ! -f "$path" && test ! -d "$path"; then
13261       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13262     fi
13263 
13264     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
13265   fi
13266 
13267               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13268 $as_echo_n "checking for Boot JDK... " >&6; }
13269               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13270 $as_echo "$BOOT_JDK" >&6; }
13271               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13272 $as_echo_n "checking Boot JDK version... " >&6; }
13273               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13274               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13275 $as_echo "$BOOT_JDK_VERSION" >&6; }
13276             fi # end check jdk version
13277           fi # end check rt.jar
13278         fi # end check javac
13279       fi # end check java
13280     fi # end check boot jdk found
13281   fi
13282 
13283     done
13284   fi
13285 
13286   fi
13287 
13288 
13289     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13290     if test "x$BOOT_JDK_FOUND" = xmaybe; then
13291       # Do we have a bin/java?
13292       if test ! -x "$BOOT_JDK/bin/java"; then
13293         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13294 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13295         BOOT_JDK_FOUND=no
13296       else
13297         # Do we have a bin/javac?
13298         if test ! -x "$BOOT_JDK/bin/javac"; then
13299           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13300 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13301           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13302 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13303           BOOT_JDK_FOUND=no
13304         else
13305           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13306           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13307             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13308 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13309             BOOT_JDK_FOUND=no
13310           else
13311             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13312             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13313 
13314             # Extra M4 quote needed to protect [] in grep expression.
13315             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13316             if test "x$FOUND_VERSION_78" = x; then
13317               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13318 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13319               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13320 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13321               BOOT_JDK_FOUND=no
13322             else
13323               # We're done! :-)
13324               BOOT_JDK_FOUND=yes
13325 
13326   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13327 
13328   # Input might be given as Windows format, start by converting to
13329   # unix format.
13330   path="$BOOT_JDK"
13331   new_path=`$CYGPATH -u "$path"`
13332 
13333   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13334   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13335   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13336   # "foo.exe" is OK but "foo" is an error.
13337   #
13338   # This test is therefore slightly more accurate than "test -f" to check for file precense.
13339   # It is also a way to make sure we got the proper file name for the real test later on.
13340   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13341   if test "x$test_shortpath" = x; then
13342     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13343 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13344     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13345   fi
13346 
13347   # Call helper function which possibly converts this using DOS-style short mode.
13348   # If so, the updated path is stored in $new_path.
13349 
13350   input_path="$new_path"
13351   # Check if we need to convert this using DOS-style short mode. If the path
13352   # contains just simple characters, use it. Otherwise (spaces, weird characters),
13353   # take no chances and rewrite it.
13354   # Note: m4 eats our [], so we need to use [ and ] instead.
13355   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13356   if test "x$has_forbidden_chars" != x; then
13357     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13358     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13359     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13360     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13361       # Going to short mode and back again did indeed matter. Since short mode is
13362       # case insensitive, let's make it lowercase to improve readability.
13363       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13364       # Now convert it back to Unix-stile (cygpath)
13365       input_path=`$CYGPATH -u "$shortmode_path"`
13366       new_path="$input_path"
13367     fi
13368   fi
13369 
13370   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13371   if test "x$test_cygdrive_prefix" = x; then
13372     # As a simple fix, exclude /usr/bin since it's not a real path.
13373     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13374       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13375       # a path prefixed by /cygdrive for fixpath to work.
13376       new_path="$CYGWIN_ROOT_PATH$input_path"
13377     fi
13378   fi
13379 
13380 
13381   if test "x$path" != "x$new_path"; then
13382     BOOT_JDK="$new_path"
13383     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13384 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13385   fi
13386 
13387   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13388 
13389   path="$BOOT_JDK"
13390   has_colon=`$ECHO $path | $GREP ^.:`
13391   new_path="$path"
13392   if test "x$has_colon" = x; then
13393     # Not in mixed or Windows style, start by that.
13394     new_path=`cmd //c echo $path`
13395   fi
13396 
13397 
13398   input_path="$new_path"
13399   # Check if we need to convert this using DOS-style short mode. If the path
13400   # contains just simple characters, use it. Otherwise (spaces, weird characters),
13401   # take no chances and rewrite it.
13402   # Note: m4 eats our [], so we need to use [ and ] instead.
13403   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13404   if test "x$has_forbidden_chars" != x; then
13405     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13406     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13407   fi
13408 
13409 
13410   windows_path="$new_path"
13411   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13412     unix_path=`$CYGPATH -u "$windows_path"`
13413     new_path="$unix_path"
13414   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13415     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13416     new_path="$unix_path"
13417   fi
13418 
13419   if test "x$path" != "x$new_path"; then
13420     BOOT_JDK="$new_path"
13421     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13422 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13423   fi
13424 
13425   # Save the first 10 bytes of this path to the storage, so fixpath can work.
13426   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13427 
13428   else
13429     # We're on a posix platform. Hooray! :)
13430     path="$BOOT_JDK"
13431     has_space=`$ECHO "$path" | $GREP " "`
13432     if test "x$has_space" != x; then
13433       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13434 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13435       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13436     fi
13437 
13438     # Use eval to expand a potential ~
13439     eval path="$path"
13440     if test ! -f "$path" && test ! -d "$path"; then
13441       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13442     fi
13443 
13444     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
13445   fi
13446 
13447               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13448 $as_echo_n "checking for Boot JDK... " >&6; }
13449               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13450 $as_echo "$BOOT_JDK" >&6; }
13451               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13452 $as_echo_n "checking Boot JDK version... " >&6; }
13453               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13454               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13455 $as_echo "$BOOT_JDK_VERSION" >&6; }
13456             fi # end check jdk version
13457           fi # end check rt.jar
13458         fi # end check javac
13459       fi # end check java
13460     fi # end check boot jdk found
13461   fi
13462 
13463 
13464   if test "x$BOOT_JDK_FOUND" = xno; then
13465     # Now execute the test
13466 
13467   if test "x$ProgramFiles" != x; then
13468     VIRTUAL_DIR="$ProgramFiles/Java"
13469 
13470   windows_path="$VIRTUAL_DIR"
13471   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13472     unix_path=`$CYGPATH -u "$windows_path"`
13473     VIRTUAL_DIR="$unix_path"
13474   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13475     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13476     VIRTUAL_DIR="$unix_path"
13477   fi
13478 
13479 
13480   BOOT_JDK_PREFIX="$VIRTUAL_DIR"
13481   BOOT_JDK_SUFFIX=""
13482   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
13483   if test "x$ALL_JDKS_FOUND" != x; then
13484     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
13485 
13486   if test "x$BOOT_JDK_FOUND" = xno; then
13487     # Now execute the test
13488 
13489         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
13490         if test -d "$BOOT_JDK"; then
13491           BOOT_JDK_FOUND=maybe
13492           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
13493 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
13494         fi
13495 
13496 
13497     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13498     if test "x$BOOT_JDK_FOUND" = xmaybe; then
13499       # Do we have a bin/java?
13500       if test ! -x "$BOOT_JDK/bin/java"; then
13501         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13502 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13503         BOOT_JDK_FOUND=no
13504       else
13505         # Do we have a bin/javac?
13506         if test ! -x "$BOOT_JDK/bin/javac"; then
13507           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13508 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13509           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13510 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13511           BOOT_JDK_FOUND=no
13512         else
13513           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13514           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13515             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13516 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13517             BOOT_JDK_FOUND=no
13518           else
13519             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13520             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13521 
13522             # Extra M4 quote needed to protect [] in grep expression.
13523             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13524             if test "x$FOUND_VERSION_78" = x; then
13525               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13526 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13527               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13528 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13529               BOOT_JDK_FOUND=no
13530             else
13531               # We're done! :-)
13532               BOOT_JDK_FOUND=yes
13533 
13534   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13535 
13536   # Input might be given as Windows format, start by converting to
13537   # unix format.
13538   path="$BOOT_JDK"
13539   new_path=`$CYGPATH -u "$path"`
13540 
13541   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13542   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13543   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13544   # "foo.exe" is OK but "foo" is an error.
13545   #
13546   # This test is therefore slightly more accurate than "test -f" to check for file precense.
13547   # It is also a way to make sure we got the proper file name for the real test later on.
13548   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13549   if test "x$test_shortpath" = x; then
13550     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13551 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13552     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13553   fi
13554 
13555   # Call helper function which possibly converts this using DOS-style short mode.
13556   # If so, the updated path is stored in $new_path.
13557 
13558   input_path="$new_path"
13559   # Check if we need to convert this using DOS-style short mode. If the path
13560   # contains just simple characters, use it. Otherwise (spaces, weird characters),
13561   # take no chances and rewrite it.
13562   # Note: m4 eats our [], so we need to use [ and ] instead.
13563   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13564   if test "x$has_forbidden_chars" != x; then
13565     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13566     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13567     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13568     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13569       # Going to short mode and back again did indeed matter. Since short mode is
13570       # case insensitive, let's make it lowercase to improve readability.
13571       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13572       # Now convert it back to Unix-stile (cygpath)
13573       input_path=`$CYGPATH -u "$shortmode_path"`
13574       new_path="$input_path"
13575     fi
13576   fi
13577 
13578   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13579   if test "x$test_cygdrive_prefix" = x; then
13580     # As a simple fix, exclude /usr/bin since it's not a real path.
13581     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13582       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13583       # a path prefixed by /cygdrive for fixpath to work.
13584       new_path="$CYGWIN_ROOT_PATH$input_path"
13585     fi
13586   fi
13587 
13588 
13589   if test "x$path" != "x$new_path"; then
13590     BOOT_JDK="$new_path"
13591     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13592 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13593   fi
13594 
13595   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13596 
13597   path="$BOOT_JDK"
13598   has_colon=`$ECHO $path | $GREP ^.:`
13599   new_path="$path"
13600   if test "x$has_colon" = x; then
13601     # Not in mixed or Windows style, start by that.
13602     new_path=`cmd //c echo $path`
13603   fi
13604 
13605 
13606   input_path="$new_path"
13607   # Check if we need to convert this using DOS-style short mode. If the path
13608   # contains just simple characters, use it. Otherwise (spaces, weird characters),
13609   # take no chances and rewrite it.
13610   # Note: m4 eats our [], so we need to use [ and ] instead.
13611   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13612   if test "x$has_forbidden_chars" != x; then
13613     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13614     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13615   fi
13616 
13617 
13618   windows_path="$new_path"
13619   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13620     unix_path=`$CYGPATH -u "$windows_path"`
13621     new_path="$unix_path"
13622   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13623     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13624     new_path="$unix_path"
13625   fi
13626 
13627   if test "x$path" != "x$new_path"; then
13628     BOOT_JDK="$new_path"
13629     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13630 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13631   fi
13632 
13633   # Save the first 10 bytes of this path to the storage, so fixpath can work.
13634   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13635 
13636   else
13637     # We're on a posix platform. Hooray! :)
13638     path="$BOOT_JDK"
13639     has_space=`$ECHO "$path" | $GREP " "`
13640     if test "x$has_space" != x; then
13641       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13642 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13643       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13644     fi
13645 
13646     # Use eval to expand a potential ~
13647     eval path="$path"
13648     if test ! -f "$path" && test ! -d "$path"; then
13649       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13650     fi
13651 
13652     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
13653   fi
13654 
13655               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13656 $as_echo_n "checking for Boot JDK... " >&6; }
13657               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13658 $as_echo "$BOOT_JDK" >&6; }
13659               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13660 $as_echo_n "checking Boot JDK version... " >&6; }
13661               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13662               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13663 $as_echo "$BOOT_JDK_VERSION" >&6; }
13664             fi # end check jdk version
13665           fi # end check rt.jar
13666         fi # end check javac
13667       fi # end check java
13668     fi # end check boot jdk found
13669   fi
13670 
13671     done
13672   fi
13673 
13674   fi
13675 
13676 
13677     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13678     if test "x$BOOT_JDK_FOUND" = xmaybe; then
13679       # Do we have a bin/java?
13680       if test ! -x "$BOOT_JDK/bin/java"; then
13681         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13682 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13683         BOOT_JDK_FOUND=no
13684       else
13685         # Do we have a bin/javac?
13686         if test ! -x "$BOOT_JDK/bin/javac"; then
13687           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13688 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13689           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13690 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13691           BOOT_JDK_FOUND=no
13692         else
13693           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13694           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13695             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13696 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13697             BOOT_JDK_FOUND=no
13698           else
13699             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13700             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13701 
13702             # Extra M4 quote needed to protect [] in grep expression.
13703             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13704             if test "x$FOUND_VERSION_78" = x; then
13705               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13706 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13707               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13708 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13709               BOOT_JDK_FOUND=no
13710             else
13711               # We're done! :-)
13712               BOOT_JDK_FOUND=yes
13713 
13714   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13715 
13716   # Input might be given as Windows format, start by converting to
13717   # unix format.
13718   path="$BOOT_JDK"
13719   new_path=`$CYGPATH -u "$path"`
13720 
13721   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13722   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13723   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13724   # "foo.exe" is OK but "foo" is an error.
13725   #
13726   # This test is therefore slightly more accurate than "test -f" to check for file precense.
13727   # It is also a way to make sure we got the proper file name for the real test later on.
13728   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13729   if test "x$test_shortpath" = x; then
13730     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13731 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13732     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13733   fi
13734 
13735   # Call helper function which possibly converts this using DOS-style short mode.
13736   # If so, the updated path is stored in $new_path.
13737 
13738   input_path="$new_path"
13739   # Check if we need to convert this using DOS-style short mode. If the path
13740   # contains just simple characters, use it. Otherwise (spaces, weird characters),
13741   # take no chances and rewrite it.
13742   # Note: m4 eats our [], so we need to use [ and ] instead.
13743   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13744   if test "x$has_forbidden_chars" != x; then
13745     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13746     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13747     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13748     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13749       # Going to short mode and back again did indeed matter. Since short mode is
13750       # case insensitive, let's make it lowercase to improve readability.
13751       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13752       # Now convert it back to Unix-stile (cygpath)
13753       input_path=`$CYGPATH -u "$shortmode_path"`
13754       new_path="$input_path"
13755     fi
13756   fi
13757 
13758   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13759   if test "x$test_cygdrive_prefix" = x; then
13760     # As a simple fix, exclude /usr/bin since it's not a real path.
13761     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13762       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13763       # a path prefixed by /cygdrive for fixpath to work.
13764       new_path="$CYGWIN_ROOT_PATH$input_path"
13765     fi
13766   fi
13767 
13768 
13769   if test "x$path" != "x$new_path"; then
13770     BOOT_JDK="$new_path"
13771     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13772 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13773   fi
13774 
13775   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13776 
13777   path="$BOOT_JDK"
13778   has_colon=`$ECHO $path | $GREP ^.:`
13779   new_path="$path"
13780   if test "x$has_colon" = x; then
13781     # Not in mixed or Windows style, start by that.
13782     new_path=`cmd //c echo $path`
13783   fi
13784 
13785 
13786   input_path="$new_path"
13787   # Check if we need to convert this using DOS-style short mode. If the path
13788   # contains just simple characters, use it. Otherwise (spaces, weird characters),
13789   # take no chances and rewrite it.
13790   # Note: m4 eats our [], so we need to use [ and ] instead.
13791   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13792   if test "x$has_forbidden_chars" != x; then
13793     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13794     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13795   fi
13796 
13797 
13798   windows_path="$new_path"
13799   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13800     unix_path=`$CYGPATH -u "$windows_path"`
13801     new_path="$unix_path"
13802   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13803     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13804     new_path="$unix_path"
13805   fi
13806 
13807   if test "x$path" != "x$new_path"; then
13808     BOOT_JDK="$new_path"
13809     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13810 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13811   fi
13812 
13813   # Save the first 10 bytes of this path to the storage, so fixpath can work.
13814   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13815 
13816   else
13817     # We're on a posix platform. Hooray! :)
13818     path="$BOOT_JDK"
13819     has_space=`$ECHO "$path" | $GREP " "`
13820     if test "x$has_space" != x; then
13821       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13822 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13823       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13824     fi
13825 
13826     # Use eval to expand a potential ~
13827     eval path="$path"
13828     if test ! -f "$path" && test ! -d "$path"; then
13829       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13830     fi
13831 
13832     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
13833   fi
13834 
13835               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13836 $as_echo_n "checking for Boot JDK... " >&6; }
13837               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13838 $as_echo "$BOOT_JDK" >&6; }
13839               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13840 $as_echo_n "checking Boot JDK version... " >&6; }
13841               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13842               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13843 $as_echo "$BOOT_JDK_VERSION" >&6; }
13844             fi # end check jdk version
13845           fi # end check rt.jar
13846         fi # end check javac
13847       fi # end check java
13848     fi # end check boot jdk found
13849   fi
13850 
13851 
13852   if test "x$BOOT_JDK_FOUND" = xno; then
13853     # Now execute the test
13854 
13855   BOOT_JDK_PREFIX="/cygdrive/c/Program Files/Java"
13856   BOOT_JDK_SUFFIX=""
13857   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
13858   if test "x$ALL_JDKS_FOUND" != x; then
13859     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
13860 
13861   if test "x$BOOT_JDK_FOUND" = xno; then
13862     # Now execute the test
13863 
13864         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
13865         if test -d "$BOOT_JDK"; then
13866           BOOT_JDK_FOUND=maybe
13867           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
13868 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
13869         fi
13870 
13871 
13872     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13873     if test "x$BOOT_JDK_FOUND" = xmaybe; then
13874       # Do we have a bin/java?
13875       if test ! -x "$BOOT_JDK/bin/java"; then
13876         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13877 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13878         BOOT_JDK_FOUND=no
13879       else
13880         # Do we have a bin/javac?
13881         if test ! -x "$BOOT_JDK/bin/javac"; then
13882           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13883 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13884           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13885 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13886           BOOT_JDK_FOUND=no
13887         else
13888           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13889           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13890             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13891 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13892             BOOT_JDK_FOUND=no
13893           else
13894             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13895             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13896 
13897             # Extra M4 quote needed to protect [] in grep expression.
13898             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13899             if test "x$FOUND_VERSION_78" = x; then
13900               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13901 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13902               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13903 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13904               BOOT_JDK_FOUND=no
13905             else
13906               # We're done! :-)
13907               BOOT_JDK_FOUND=yes
13908 
13909   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13910 
13911   # Input might be given as Windows format, start by converting to
13912   # unix format.
13913   path="$BOOT_JDK"
13914   new_path=`$CYGPATH -u "$path"`
13915 
13916   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13917   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13918   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13919   # "foo.exe" is OK but "foo" is an error.
13920   #
13921   # This test is therefore slightly more accurate than "test -f" to check for file precense.
13922   # It is also a way to make sure we got the proper file name for the real test later on.
13923   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13924   if test "x$test_shortpath" = x; then
13925     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13926 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13927     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13928   fi
13929 
13930   # Call helper function which possibly converts this using DOS-style short mode.
13931   # If so, the updated path is stored in $new_path.
13932 
13933   input_path="$new_path"
13934   # Check if we need to convert this using DOS-style short mode. If the path
13935   # contains just simple characters, use it. Otherwise (spaces, weird characters),
13936   # take no chances and rewrite it.
13937   # Note: m4 eats our [], so we need to use [ and ] instead.
13938   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13939   if test "x$has_forbidden_chars" != x; then
13940     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13941     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13942     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13943     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13944       # Going to short mode and back again did indeed matter. Since short mode is
13945       # case insensitive, let's make it lowercase to improve readability.
13946       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13947       # Now convert it back to Unix-stile (cygpath)
13948       input_path=`$CYGPATH -u "$shortmode_path"`
13949       new_path="$input_path"
13950     fi
13951   fi
13952 
13953   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13954   if test "x$test_cygdrive_prefix" = x; then
13955     # As a simple fix, exclude /usr/bin since it's not a real path.
13956     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13957       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13958       # a path prefixed by /cygdrive for fixpath to work.
13959       new_path="$CYGWIN_ROOT_PATH$input_path"
13960     fi
13961   fi
13962 
13963 
13964   if test "x$path" != "x$new_path"; then
13965     BOOT_JDK="$new_path"
13966     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13967 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13968   fi
13969 
13970   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13971 
13972   path="$BOOT_JDK"
13973   has_colon=`$ECHO $path | $GREP ^.:`
13974   new_path="$path"
13975   if test "x$has_colon" = x; then
13976     # Not in mixed or Windows style, start by that.
13977     new_path=`cmd //c echo $path`
13978   fi
13979 
13980 
13981   input_path="$new_path"
13982   # Check if we need to convert this using DOS-style short mode. If the path
13983   # contains just simple characters, use it. Otherwise (spaces, weird characters),
13984   # take no chances and rewrite it.
13985   # Note: m4 eats our [], so we need to use [ and ] instead.
13986   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13987   if test "x$has_forbidden_chars" != x; then
13988     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13989     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13990   fi
13991 
13992 
13993   windows_path="$new_path"
13994   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13995     unix_path=`$CYGPATH -u "$windows_path"`
13996     new_path="$unix_path"
13997   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13998     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13999     new_path="$unix_path"
14000   fi
14001 
14002   if test "x$path" != "x$new_path"; then
14003     BOOT_JDK="$new_path"
14004     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14005 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14006   fi
14007 
14008   # Save the first 10 bytes of this path to the storage, so fixpath can work.
14009   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14010 
14011   else
14012     # We're on a posix platform. Hooray! :)
14013     path="$BOOT_JDK"
14014     has_space=`$ECHO "$path" | $GREP " "`
14015     if test "x$has_space" != x; then
14016       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14017 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14018       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14019     fi
14020 
14021     # Use eval to expand a potential ~
14022     eval path="$path"
14023     if test ! -f "$path" && test ! -d "$path"; then
14024       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14025     fi
14026 
14027     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
14028   fi
14029 
14030               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14031 $as_echo_n "checking for Boot JDK... " >&6; }
14032               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14033 $as_echo "$BOOT_JDK" >&6; }
14034               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14035 $as_echo_n "checking Boot JDK version... " >&6; }
14036               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14037               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14038 $as_echo "$BOOT_JDK_VERSION" >&6; }
14039             fi # end check jdk version
14040           fi # end check rt.jar
14041         fi # end check javac
14042       fi # end check java
14043     fi # end check boot jdk found
14044   fi
14045 
14046     done
14047   fi
14048 
14049 
14050     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14051     if test "x$BOOT_JDK_FOUND" = xmaybe; then
14052       # Do we have a bin/java?
14053       if test ! -x "$BOOT_JDK/bin/java"; then
14054         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14055 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14056         BOOT_JDK_FOUND=no
14057       else
14058         # Do we have a bin/javac?
14059         if test ! -x "$BOOT_JDK/bin/javac"; then
14060           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14061 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14062           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14063 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14064           BOOT_JDK_FOUND=no
14065         else
14066           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14067           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14068             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14069 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14070             BOOT_JDK_FOUND=no
14071           else
14072             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14073             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14074 
14075             # Extra M4 quote needed to protect [] in grep expression.
14076             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14077             if test "x$FOUND_VERSION_78" = x; then
14078               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14079 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14080               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14081 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14082               BOOT_JDK_FOUND=no
14083             else
14084               # We're done! :-)
14085               BOOT_JDK_FOUND=yes
14086 
14087   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14088 
14089   # Input might be given as Windows format, start by converting to
14090   # unix format.
14091   path="$BOOT_JDK"
14092   new_path=`$CYGPATH -u "$path"`
14093 
14094   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14095   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14096   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14097   # "foo.exe" is OK but "foo" is an error.
14098   #
14099   # This test is therefore slightly more accurate than "test -f" to check for file precense.
14100   # It is also a way to make sure we got the proper file name for the real test later on.
14101   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14102   if test "x$test_shortpath" = x; then
14103     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14104 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14105     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14106   fi
14107 
14108   # Call helper function which possibly converts this using DOS-style short mode.
14109   # If so, the updated path is stored in $new_path.
14110 
14111   input_path="$new_path"
14112   # Check if we need to convert this using DOS-style short mode. If the path
14113   # contains just simple characters, use it. Otherwise (spaces, weird characters),
14114   # take no chances and rewrite it.
14115   # Note: m4 eats our [], so we need to use [ and ] instead.
14116   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14117   if test "x$has_forbidden_chars" != x; then
14118     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14119     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14120     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14121     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14122       # Going to short mode and back again did indeed matter. Since short mode is
14123       # case insensitive, let's make it lowercase to improve readability.
14124       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14125       # Now convert it back to Unix-stile (cygpath)
14126       input_path=`$CYGPATH -u "$shortmode_path"`
14127       new_path="$input_path"
14128     fi
14129   fi
14130 
14131   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14132   if test "x$test_cygdrive_prefix" = x; then
14133     # As a simple fix, exclude /usr/bin since it's not a real path.
14134     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14135       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14136       # a path prefixed by /cygdrive for fixpath to work.
14137       new_path="$CYGWIN_ROOT_PATH$input_path"
14138     fi
14139   fi
14140 
14141 
14142   if test "x$path" != "x$new_path"; then
14143     BOOT_JDK="$new_path"
14144     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14145 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14146   fi
14147 
14148   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14149 
14150   path="$BOOT_JDK"
14151   has_colon=`$ECHO $path | $GREP ^.:`
14152   new_path="$path"
14153   if test "x$has_colon" = x; then
14154     # Not in mixed or Windows style, start by that.
14155     new_path=`cmd //c echo $path`
14156   fi
14157 
14158 
14159   input_path="$new_path"
14160   # Check if we need to convert this using DOS-style short mode. If the path
14161   # contains just simple characters, use it. Otherwise (spaces, weird characters),
14162   # take no chances and rewrite it.
14163   # Note: m4 eats our [], so we need to use [ and ] instead.
14164   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14165   if test "x$has_forbidden_chars" != x; then
14166     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14167     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14168   fi
14169 
14170 
14171   windows_path="$new_path"
14172   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14173     unix_path=`$CYGPATH -u "$windows_path"`
14174     new_path="$unix_path"
14175   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14176     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14177     new_path="$unix_path"
14178   fi
14179 
14180   if test "x$path" != "x$new_path"; then
14181     BOOT_JDK="$new_path"
14182     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14183 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14184   fi
14185 
14186   # Save the first 10 bytes of this path to the storage, so fixpath can work.
14187   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14188 
14189   else
14190     # We're on a posix platform. Hooray! :)
14191     path="$BOOT_JDK"
14192     has_space=`$ECHO "$path" | $GREP " "`
14193     if test "x$has_space" != x; then
14194       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14195 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14196       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14197     fi
14198 
14199     # Use eval to expand a potential ~
14200     eval path="$path"
14201     if test ! -f "$path" && test ! -d "$path"; then
14202       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14203     fi
14204 
14205     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
14206   fi
14207 
14208               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14209 $as_echo_n "checking for Boot JDK... " >&6; }
14210               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14211 $as_echo "$BOOT_JDK" >&6; }
14212               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14213 $as_echo_n "checking Boot JDK version... " >&6; }
14214               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14215               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14216 $as_echo "$BOOT_JDK_VERSION" >&6; }
14217             fi # end check jdk version
14218           fi # end check rt.jar
14219         fi # end check javac
14220       fi # end check java
14221     fi # end check boot jdk found
14222   fi
14223 
14224   elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
14225 
14226   if test "x$BOOT_JDK_FOUND" = xno; then
14227     # Now execute the test
14228 
14229   BOOT_JDK_PREFIX="/Library/Java/JavaVirtualMachines"
14230   BOOT_JDK_SUFFIX="/Contents/Home"
14231   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
14232   if test "x$ALL_JDKS_FOUND" != x; then
14233     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
14234 
14235   if test "x$BOOT_JDK_FOUND" = xno; then
14236     # Now execute the test
14237 
14238         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
14239         if test -d "$BOOT_JDK"; then
14240           BOOT_JDK_FOUND=maybe
14241           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
14242 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
14243         fi
14244 
14245 
14246     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14247     if test "x$BOOT_JDK_FOUND" = xmaybe; then
14248       # Do we have a bin/java?
14249       if test ! -x "$BOOT_JDK/bin/java"; then
14250         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14251 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14252         BOOT_JDK_FOUND=no
14253       else
14254         # Do we have a bin/javac?
14255         if test ! -x "$BOOT_JDK/bin/javac"; then
14256           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14257 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14258           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14259 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14260           BOOT_JDK_FOUND=no
14261         else
14262           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14263           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14264             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14265 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14266             BOOT_JDK_FOUND=no
14267           else
14268             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14269             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14270 
14271             # Extra M4 quote needed to protect [] in grep expression.
14272             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14273             if test "x$FOUND_VERSION_78" = x; then
14274               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14275 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14276               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14277 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14278               BOOT_JDK_FOUND=no
14279             else
14280               # We're done! :-)
14281               BOOT_JDK_FOUND=yes
14282 
14283   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14284 
14285   # Input might be given as Windows format, start by converting to
14286   # unix format.
14287   path="$BOOT_JDK"
14288   new_path=`$CYGPATH -u "$path"`
14289 
14290   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14291   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14292   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14293   # "foo.exe" is OK but "foo" is an error.
14294   #
14295   # This test is therefore slightly more accurate than "test -f" to check for file precense.
14296   # It is also a way to make sure we got the proper file name for the real test later on.
14297   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14298   if test "x$test_shortpath" = x; then
14299     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14300 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14301     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14302   fi
14303 
14304   # Call helper function which possibly converts this using DOS-style short mode.
14305   # If so, the updated path is stored in $new_path.
14306 
14307   input_path="$new_path"
14308   # Check if we need to convert this using DOS-style short mode. If the path
14309   # contains just simple characters, use it. Otherwise (spaces, weird characters),
14310   # take no chances and rewrite it.
14311   # Note: m4 eats our [], so we need to use [ and ] instead.
14312   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14313   if test "x$has_forbidden_chars" != x; then
14314     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14315     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14316     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14317     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14318       # Going to short mode and back again did indeed matter. Since short mode is
14319       # case insensitive, let's make it lowercase to improve readability.
14320       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14321       # Now convert it back to Unix-stile (cygpath)
14322       input_path=`$CYGPATH -u "$shortmode_path"`
14323       new_path="$input_path"
14324     fi
14325   fi
14326 
14327   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14328   if test "x$test_cygdrive_prefix" = x; then
14329     # As a simple fix, exclude /usr/bin since it's not a real path.
14330     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14331       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14332       # a path prefixed by /cygdrive for fixpath to work.
14333       new_path="$CYGWIN_ROOT_PATH$input_path"
14334     fi
14335   fi
14336 
14337 
14338   if test "x$path" != "x$new_path"; then
14339     BOOT_JDK="$new_path"
14340     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14341 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14342   fi
14343 
14344   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14345 
14346   path="$BOOT_JDK"
14347   has_colon=`$ECHO $path | $GREP ^.:`
14348   new_path="$path"
14349   if test "x$has_colon" = x; then
14350     # Not in mixed or Windows style, start by that.
14351     new_path=`cmd //c echo $path`
14352   fi
14353 
14354 
14355   input_path="$new_path"
14356   # Check if we need to convert this using DOS-style short mode. If the path
14357   # contains just simple characters, use it. Otherwise (spaces, weird characters),
14358   # take no chances and rewrite it.
14359   # Note: m4 eats our [], so we need to use [ and ] instead.
14360   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14361   if test "x$has_forbidden_chars" != x; then
14362     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14363     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14364   fi
14365 
14366 
14367   windows_path="$new_path"
14368   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14369     unix_path=`$CYGPATH -u "$windows_path"`
14370     new_path="$unix_path"
14371   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14372     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14373     new_path="$unix_path"
14374   fi
14375 
14376   if test "x$path" != "x$new_path"; then
14377     BOOT_JDK="$new_path"
14378     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14379 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14380   fi
14381 
14382   # Save the first 10 bytes of this path to the storage, so fixpath can work.
14383   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14384 
14385   else
14386     # We're on a posix platform. Hooray! :)
14387     path="$BOOT_JDK"
14388     has_space=`$ECHO "$path" | $GREP " "`
14389     if test "x$has_space" != x; then
14390       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14391 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14392       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14393     fi
14394 
14395     # Use eval to expand a potential ~
14396     eval path="$path"
14397     if test ! -f "$path" && test ! -d "$path"; then
14398       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14399     fi
14400 
14401     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
14402   fi
14403 
14404               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14405 $as_echo_n "checking for Boot JDK... " >&6; }
14406               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14407 $as_echo "$BOOT_JDK" >&6; }
14408               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14409 $as_echo_n "checking Boot JDK version... " >&6; }
14410               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14411               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14412 $as_echo "$BOOT_JDK_VERSION" >&6; }
14413             fi # end check jdk version
14414           fi # end check rt.jar
14415         fi # end check javac
14416       fi # end check java
14417     fi # end check boot jdk found
14418   fi
14419 
14420     done
14421   fi
14422 
14423 
14424     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14425     if test "x$BOOT_JDK_FOUND" = xmaybe; then
14426       # Do we have a bin/java?
14427       if test ! -x "$BOOT_JDK/bin/java"; then
14428         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14429 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14430         BOOT_JDK_FOUND=no
14431       else
14432         # Do we have a bin/javac?
14433         if test ! -x "$BOOT_JDK/bin/javac"; then
14434           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14435 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14436           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14437 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14438           BOOT_JDK_FOUND=no
14439         else
14440           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14441           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14442             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14443 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14444             BOOT_JDK_FOUND=no
14445           else
14446             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14447             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14448 
14449             # Extra M4 quote needed to protect [] in grep expression.
14450             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14451             if test "x$FOUND_VERSION_78" = x; then
14452               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14453 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14454               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14455 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14456               BOOT_JDK_FOUND=no
14457             else
14458               # We're done! :-)
14459               BOOT_JDK_FOUND=yes
14460 
14461   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14462 
14463   # Input might be given as Windows format, start by converting to
14464   # unix format.
14465   path="$BOOT_JDK"
14466   new_path=`$CYGPATH -u "$path"`
14467 
14468   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14469   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14470   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14471   # "foo.exe" is OK but "foo" is an error.
14472   #
14473   # This test is therefore slightly more accurate than "test -f" to check for file precense.
14474   # It is also a way to make sure we got the proper file name for the real test later on.
14475   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14476   if test "x$test_shortpath" = x; then
14477     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14478 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14479     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14480   fi
14481 
14482   # Call helper function which possibly converts this using DOS-style short mode.
14483   # If so, the updated path is stored in $new_path.
14484 
14485   input_path="$new_path"
14486   # Check if we need to convert this using DOS-style short mode. If the path
14487   # contains just simple characters, use it. Otherwise (spaces, weird characters),
14488   # take no chances and rewrite it.
14489   # Note: m4 eats our [], so we need to use [ and ] instead.
14490   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14491   if test "x$has_forbidden_chars" != x; then
14492     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14493     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14494     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14495     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14496       # Going to short mode and back again did indeed matter. Since short mode is
14497       # case insensitive, let's make it lowercase to improve readability.
14498       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14499       # Now convert it back to Unix-stile (cygpath)
14500       input_path=`$CYGPATH -u "$shortmode_path"`
14501       new_path="$input_path"
14502     fi
14503   fi
14504 
14505   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14506   if test "x$test_cygdrive_prefix" = x; then
14507     # As a simple fix, exclude /usr/bin since it's not a real path.
14508     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14509       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14510       # a path prefixed by /cygdrive for fixpath to work.
14511       new_path="$CYGWIN_ROOT_PATH$input_path"
14512     fi
14513   fi
14514 
14515 
14516   if test "x$path" != "x$new_path"; then
14517     BOOT_JDK="$new_path"
14518     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14519 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14520   fi
14521 
14522   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14523 
14524   path="$BOOT_JDK"
14525   has_colon=`$ECHO $path | $GREP ^.:`
14526   new_path="$path"
14527   if test "x$has_colon" = x; then
14528     # Not in mixed or Windows style, start by that.
14529     new_path=`cmd //c echo $path`
14530   fi
14531 
14532 
14533   input_path="$new_path"
14534   # Check if we need to convert this using DOS-style short mode. If the path
14535   # contains just simple characters, use it. Otherwise (spaces, weird characters),
14536   # take no chances and rewrite it.
14537   # Note: m4 eats our [], so we need to use [ and ] instead.
14538   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14539   if test "x$has_forbidden_chars" != x; then
14540     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14541     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14542   fi
14543 
14544 
14545   windows_path="$new_path"
14546   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14547     unix_path=`$CYGPATH -u "$windows_path"`
14548     new_path="$unix_path"
14549   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14550     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14551     new_path="$unix_path"
14552   fi
14553 
14554   if test "x$path" != "x$new_path"; then
14555     BOOT_JDK="$new_path"
14556     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14557 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14558   fi
14559 
14560   # Save the first 10 bytes of this path to the storage, so fixpath can work.
14561   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14562 
14563   else
14564     # We're on a posix platform. Hooray! :)
14565     path="$BOOT_JDK"
14566     has_space=`$ECHO "$path" | $GREP " "`
14567     if test "x$has_space" != x; then
14568       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14569 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14570       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14571     fi
14572 
14573     # Use eval to expand a potential ~
14574     eval path="$path"
14575     if test ! -f "$path" && test ! -d "$path"; then
14576       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14577     fi
14578 
14579     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
14580   fi
14581 
14582               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14583 $as_echo_n "checking for Boot JDK... " >&6; }
14584               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14585 $as_echo "$BOOT_JDK" >&6; }
14586               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14587 $as_echo_n "checking Boot JDK version... " >&6; }
14588               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14589               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14590 $as_echo "$BOOT_JDK_VERSION" >&6; }
14591             fi # end check jdk version
14592           fi # end check rt.jar
14593         fi # end check javac
14594       fi # end check java
14595     fi # end check boot jdk found
14596   fi
14597 
14598 
14599   if test "x$BOOT_JDK_FOUND" = xno; then
14600     # Now execute the test
14601 
14602   BOOT_JDK_PREFIX="/System/Library/Java/JavaVirtualMachines"
14603   BOOT_JDK_SUFFIX="/Contents/Home"
14604   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
14605   if test "x$ALL_JDKS_FOUND" != x; then
14606     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
14607 
14608   if test "x$BOOT_JDK_FOUND" = xno; then
14609     # Now execute the test
14610 
14611         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
14612         if test -d "$BOOT_JDK"; then
14613           BOOT_JDK_FOUND=maybe
14614           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
14615 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
14616         fi
14617 
14618 
14619     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14620     if test "x$BOOT_JDK_FOUND" = xmaybe; then
14621       # Do we have a bin/java?
14622       if test ! -x "$BOOT_JDK/bin/java"; then
14623         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14624 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14625         BOOT_JDK_FOUND=no
14626       else
14627         # Do we have a bin/javac?
14628         if test ! -x "$BOOT_JDK/bin/javac"; then
14629           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14630 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14631           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14632 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14633           BOOT_JDK_FOUND=no
14634         else
14635           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14636           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14637             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14638 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14639             BOOT_JDK_FOUND=no
14640           else
14641             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14642             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14643 
14644             # Extra M4 quote needed to protect [] in grep expression.
14645             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14646             if test "x$FOUND_VERSION_78" = x; then
14647               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14648 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14649               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14650 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14651               BOOT_JDK_FOUND=no
14652             else
14653               # We're done! :-)
14654               BOOT_JDK_FOUND=yes
14655 
14656   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14657 
14658   # Input might be given as Windows format, start by converting to
14659   # unix format.
14660   path="$BOOT_JDK"
14661   new_path=`$CYGPATH -u "$path"`
14662 
14663   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14664   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14665   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14666   # "foo.exe" is OK but "foo" is an error.
14667   #
14668   # This test is therefore slightly more accurate than "test -f" to check for file precense.
14669   # It is also a way to make sure we got the proper file name for the real test later on.
14670   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14671   if test "x$test_shortpath" = x; then
14672     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14673 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14674     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14675   fi
14676 
14677   # Call helper function which possibly converts this using DOS-style short mode.
14678   # If so, the updated path is stored in $new_path.
14679 
14680   input_path="$new_path"
14681   # Check if we need to convert this using DOS-style short mode. If the path
14682   # contains just simple characters, use it. Otherwise (spaces, weird characters),
14683   # take no chances and rewrite it.
14684   # Note: m4 eats our [], so we need to use [ and ] instead.
14685   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14686   if test "x$has_forbidden_chars" != x; then
14687     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14688     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14689     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14690     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14691       # Going to short mode and back again did indeed matter. Since short mode is
14692       # case insensitive, let's make it lowercase to improve readability.
14693       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14694       # Now convert it back to Unix-stile (cygpath)
14695       input_path=`$CYGPATH -u "$shortmode_path"`
14696       new_path="$input_path"
14697     fi
14698   fi
14699 
14700   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14701   if test "x$test_cygdrive_prefix" = x; then
14702     # As a simple fix, exclude /usr/bin since it's not a real path.
14703     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14704       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14705       # a path prefixed by /cygdrive for fixpath to work.
14706       new_path="$CYGWIN_ROOT_PATH$input_path"
14707     fi
14708   fi
14709 
14710 
14711   if test "x$path" != "x$new_path"; then
14712     BOOT_JDK="$new_path"
14713     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14714 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14715   fi
14716 
14717   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14718 
14719   path="$BOOT_JDK"
14720   has_colon=`$ECHO $path | $GREP ^.:`
14721   new_path="$path"
14722   if test "x$has_colon" = x; then
14723     # Not in mixed or Windows style, start by that.
14724     new_path=`cmd //c echo $path`
14725   fi
14726 
14727 
14728   input_path="$new_path"
14729   # Check if we need to convert this using DOS-style short mode. If the path
14730   # contains just simple characters, use it. Otherwise (spaces, weird characters),
14731   # take no chances and rewrite it.
14732   # Note: m4 eats our [], so we need to use [ and ] instead.
14733   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14734   if test "x$has_forbidden_chars" != x; then
14735     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14736     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14737   fi
14738 
14739 
14740   windows_path="$new_path"
14741   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14742     unix_path=`$CYGPATH -u "$windows_path"`
14743     new_path="$unix_path"
14744   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14745     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14746     new_path="$unix_path"
14747   fi
14748 
14749   if test "x$path" != "x$new_path"; then
14750     BOOT_JDK="$new_path"
14751     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14752 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14753   fi
14754 
14755   # Save the first 10 bytes of this path to the storage, so fixpath can work.
14756   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14757 
14758   else
14759     # We're on a posix platform. Hooray! :)
14760     path="$BOOT_JDK"
14761     has_space=`$ECHO "$path" | $GREP " "`
14762     if test "x$has_space" != x; then
14763       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14764 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14765       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14766     fi
14767 
14768     # Use eval to expand a potential ~
14769     eval path="$path"
14770     if test ! -f "$path" && test ! -d "$path"; then
14771       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14772     fi
14773 
14774     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
14775   fi
14776 
14777               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14778 $as_echo_n "checking for Boot JDK... " >&6; }
14779               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14780 $as_echo "$BOOT_JDK" >&6; }
14781               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14782 $as_echo_n "checking Boot JDK version... " >&6; }
14783               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14784               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14785 $as_echo "$BOOT_JDK_VERSION" >&6; }
14786             fi # end check jdk version
14787           fi # end check rt.jar
14788         fi # end check javac
14789       fi # end check java
14790     fi # end check boot jdk found
14791   fi
14792 
14793     done
14794   fi
14795 
14796 
14797     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14798     if test "x$BOOT_JDK_FOUND" = xmaybe; then
14799       # Do we have a bin/java?
14800       if test ! -x "$BOOT_JDK/bin/java"; then
14801         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14802 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14803         BOOT_JDK_FOUND=no
14804       else
14805         # Do we have a bin/javac?
14806         if test ! -x "$BOOT_JDK/bin/javac"; then
14807           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14808 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14809           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14810 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14811           BOOT_JDK_FOUND=no
14812         else
14813           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14814           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14815             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14816 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14817             BOOT_JDK_FOUND=no
14818           else
14819             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14820             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14821 
14822             # Extra M4 quote needed to protect [] in grep expression.
14823             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14824             if test "x$FOUND_VERSION_78" = x; then
14825               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14826 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14827               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14828 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14829               BOOT_JDK_FOUND=no
14830             else
14831               # We're done! :-)
14832               BOOT_JDK_FOUND=yes
14833 
14834   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14835 
14836   # Input might be given as Windows format, start by converting to
14837   # unix format.
14838   path="$BOOT_JDK"
14839   new_path=`$CYGPATH -u "$path"`
14840 
14841   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14842   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14843   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14844   # "foo.exe" is OK but "foo" is an error.
14845   #
14846   # This test is therefore slightly more accurate than "test -f" to check for file precense.
14847   # It is also a way to make sure we got the proper file name for the real test later on.
14848   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14849   if test "x$test_shortpath" = x; then
14850     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14851 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14852     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14853   fi
14854 
14855   # Call helper function which possibly converts this using DOS-style short mode.
14856   # If so, the updated path is stored in $new_path.
14857 
14858   input_path="$new_path"
14859   # Check if we need to convert this using DOS-style short mode. If the path
14860   # contains just simple characters, use it. Otherwise (spaces, weird characters),
14861   # take no chances and rewrite it.
14862   # Note: m4 eats our [], so we need to use [ and ] instead.
14863   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14864   if test "x$has_forbidden_chars" != x; then
14865     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14866     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14867     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14868     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14869       # Going to short mode and back again did indeed matter. Since short mode is
14870       # case insensitive, let's make it lowercase to improve readability.
14871       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14872       # Now convert it back to Unix-stile (cygpath)
14873       input_path=`$CYGPATH -u "$shortmode_path"`
14874       new_path="$input_path"
14875     fi
14876   fi
14877 
14878   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14879   if test "x$test_cygdrive_prefix" = x; then
14880     # As a simple fix, exclude /usr/bin since it's not a real path.
14881     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14882       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14883       # a path prefixed by /cygdrive for fixpath to work.
14884       new_path="$CYGWIN_ROOT_PATH$input_path"
14885     fi
14886   fi
14887 
14888 
14889   if test "x$path" != "x$new_path"; then
14890     BOOT_JDK="$new_path"
14891     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14892 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14893   fi
14894 
14895   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14896 
14897   path="$BOOT_JDK"
14898   has_colon=`$ECHO $path | $GREP ^.:`
14899   new_path="$path"
14900   if test "x$has_colon" = x; then
14901     # Not in mixed or Windows style, start by that.
14902     new_path=`cmd //c echo $path`
14903   fi
14904 
14905 
14906   input_path="$new_path"
14907   # Check if we need to convert this using DOS-style short mode. If the path
14908   # contains just simple characters, use it. Otherwise (spaces, weird characters),
14909   # take no chances and rewrite it.
14910   # Note: m4 eats our [], so we need to use [ and ] instead.
14911   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14912   if test "x$has_forbidden_chars" != x; then
14913     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14914     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14915   fi
14916 
14917 
14918   windows_path="$new_path"
14919   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14920     unix_path=`$CYGPATH -u "$windows_path"`
14921     new_path="$unix_path"
14922   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14923     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14924     new_path="$unix_path"
14925   fi
14926 
14927   if test "x$path" != "x$new_path"; then
14928     BOOT_JDK="$new_path"
14929     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14930 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14931   fi
14932 
14933   # Save the first 10 bytes of this path to the storage, so fixpath can work.
14934   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14935 
14936   else
14937     # We're on a posix platform. Hooray! :)
14938     path="$BOOT_JDK"
14939     has_space=`$ECHO "$path" | $GREP " "`
14940     if test "x$has_space" != x; then
14941       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14942 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14943       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14944     fi
14945 
14946     # Use eval to expand a potential ~
14947     eval path="$path"
14948     if test ! -f "$path" && test ! -d "$path"; then
14949       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14950     fi
14951 
14952     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
14953   fi
14954 
14955               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14956 $as_echo_n "checking for Boot JDK... " >&6; }
14957               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14958 $as_echo "$BOOT_JDK" >&6; }
14959               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14960 $as_echo_n "checking Boot JDK version... " >&6; }
14961               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14962               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14963 $as_echo "$BOOT_JDK_VERSION" >&6; }
14964             fi # end check jdk version
14965           fi # end check rt.jar
14966         fi # end check javac
14967       fi # end check java
14968     fi # end check boot jdk found
14969   fi
14970 
14971   elif test "x$OPENJDK_TARGET_OS" = xlinux; then
14972 
14973   if test "x$BOOT_JDK_FOUND" = xno; then
14974     # Now execute the test
14975 
14976   BOOT_JDK_PREFIX="/usr/lib/jvm"
14977   BOOT_JDK_SUFFIX=""
14978   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
14979   if test "x$ALL_JDKS_FOUND" != x; then
14980     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
14981 
14982   if test "x$BOOT_JDK_FOUND" = xno; then
14983     # Now execute the test
14984 
14985         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
14986         if test -d "$BOOT_JDK"; then
14987           BOOT_JDK_FOUND=maybe
14988           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
14989 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
14990         fi
14991 
14992 
14993     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14994     if test "x$BOOT_JDK_FOUND" = xmaybe; then
14995       # Do we have a bin/java?
14996       if test ! -x "$BOOT_JDK/bin/java"; then
14997         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14998 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14999         BOOT_JDK_FOUND=no
15000       else
15001         # Do we have a bin/javac?
15002         if test ! -x "$BOOT_JDK/bin/javac"; then
15003           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
15004 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
15005           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
15006 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
15007           BOOT_JDK_FOUND=no
15008         else
15009           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
15010           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
15011             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
15012 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
15013             BOOT_JDK_FOUND=no
15014           else
15015             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
15016             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
15017 
15018             # Extra M4 quote needed to protect [] in grep expression.
15019             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
15020             if test "x$FOUND_VERSION_78" = x; then
15021               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
15022 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
15023               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
15024 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
15025               BOOT_JDK_FOUND=no
15026             else
15027               # We're done! :-)
15028               BOOT_JDK_FOUND=yes
15029 
15030   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15031 
15032   # Input might be given as Windows format, start by converting to
15033   # unix format.
15034   path="$BOOT_JDK"
15035   new_path=`$CYGPATH -u "$path"`
15036 
15037   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15038   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15039   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15040   # "foo.exe" is OK but "foo" is an error.
15041   #
15042   # This test is therefore slightly more accurate than "test -f" to check for file precense.
15043   # It is also a way to make sure we got the proper file name for the real test later on.
15044   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15045   if test "x$test_shortpath" = x; then
15046     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15047 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15048     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
15049   fi
15050 
15051   # Call helper function which possibly converts this using DOS-style short mode.
15052   # If so, the updated path is stored in $new_path.
15053 
15054   input_path="$new_path"
15055   # Check if we need to convert this using DOS-style short mode. If the path
15056   # contains just simple characters, use it. Otherwise (spaces, weird characters),
15057   # take no chances and rewrite it.
15058   # Note: m4 eats our [], so we need to use [ and ] instead.
15059   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15060   if test "x$has_forbidden_chars" != x; then
15061     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15062     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15063     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15064     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15065       # Going to short mode and back again did indeed matter. Since short mode is
15066       # case insensitive, let's make it lowercase to improve readability.
15067       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15068       # Now convert it back to Unix-stile (cygpath)
15069       input_path=`$CYGPATH -u "$shortmode_path"`
15070       new_path="$input_path"
15071     fi
15072   fi
15073 
15074   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15075   if test "x$test_cygdrive_prefix" = x; then
15076     # As a simple fix, exclude /usr/bin since it's not a real path.
15077     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15078       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15079       # a path prefixed by /cygdrive for fixpath to work.
15080       new_path="$CYGWIN_ROOT_PATH$input_path"
15081     fi
15082   fi
15083 
15084 
15085   if test "x$path" != "x$new_path"; then
15086     BOOT_JDK="$new_path"
15087     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15088 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15089   fi
15090 
15091   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15092 
15093   path="$BOOT_JDK"
15094   has_colon=`$ECHO $path | $GREP ^.:`
15095   new_path="$path"
15096   if test "x$has_colon" = x; then
15097     # Not in mixed or Windows style, start by that.
15098     new_path=`cmd //c echo $path`
15099   fi
15100 
15101 
15102   input_path="$new_path"
15103   # Check if we need to convert this using DOS-style short mode. If the path
15104   # contains just simple characters, use it. Otherwise (spaces, weird characters),
15105   # take no chances and rewrite it.
15106   # Note: m4 eats our [], so we need to use [ and ] instead.
15107   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15108   if test "x$has_forbidden_chars" != x; then
15109     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15110     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15111   fi
15112 
15113 
15114   windows_path="$new_path"
15115   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15116     unix_path=`$CYGPATH -u "$windows_path"`
15117     new_path="$unix_path"
15118   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15119     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15120     new_path="$unix_path"
15121   fi
15122 
15123   if test "x$path" != "x$new_path"; then
15124     BOOT_JDK="$new_path"
15125     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15126 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15127   fi
15128 
15129   # Save the first 10 bytes of this path to the storage, so fixpath can work.
15130   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15131 
15132   else
15133     # We're on a posix platform. Hooray! :)
15134     path="$BOOT_JDK"
15135     has_space=`$ECHO "$path" | $GREP " "`
15136     if test "x$has_space" != x; then
15137       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15138 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15139       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15140     fi
15141 
15142     # Use eval to expand a potential ~
15143     eval path="$path"
15144     if test ! -f "$path" && test ! -d "$path"; then
15145       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
15146     fi
15147 
15148     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
15149   fi
15150 
15151               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
15152 $as_echo_n "checking for Boot JDK... " >&6; }
15153               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
15154 $as_echo "$BOOT_JDK" >&6; }
15155               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
15156 $as_echo_n "checking Boot JDK version... " >&6; }
15157               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
15158               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
15159 $as_echo "$BOOT_JDK_VERSION" >&6; }
15160             fi # end check jdk version
15161           fi # end check rt.jar
15162         fi # end check javac
15163       fi # end check java
15164     fi # end check boot jdk found
15165   fi
15166 
15167     done
15168   fi
15169 
15170 
15171     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
15172     if test "x$BOOT_JDK_FOUND" = xmaybe; then
15173       # Do we have a bin/java?
15174       if test ! -x "$BOOT_JDK/bin/java"; then
15175         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
15176 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
15177         BOOT_JDK_FOUND=no
15178       else
15179         # Do we have a bin/javac?
15180         if test ! -x "$BOOT_JDK/bin/javac"; then
15181           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
15182 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
15183           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
15184 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
15185           BOOT_JDK_FOUND=no
15186         else
15187           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
15188           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
15189             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
15190 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
15191             BOOT_JDK_FOUND=no
15192           else
15193             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
15194             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
15195 
15196             # Extra M4 quote needed to protect [] in grep expression.
15197             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
15198             if test "x$FOUND_VERSION_78" = x; then
15199               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
15200 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
15201               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
15202 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
15203               BOOT_JDK_FOUND=no
15204             else
15205               # We're done! :-)
15206               BOOT_JDK_FOUND=yes
15207 
15208   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15209 
15210   # Input might be given as Windows format, start by converting to
15211   # unix format.
15212   path="$BOOT_JDK"
15213   new_path=`$CYGPATH -u "$path"`
15214 
15215   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15216   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15217   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15218   # "foo.exe" is OK but "foo" is an error.
15219   #
15220   # This test is therefore slightly more accurate than "test -f" to check for file precense.
15221   # It is also a way to make sure we got the proper file name for the real test later on.
15222   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15223   if test "x$test_shortpath" = x; then
15224     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15225 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15226     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
15227   fi
15228 
15229   # Call helper function which possibly converts this using DOS-style short mode.
15230   # If so, the updated path is stored in $new_path.
15231 
15232   input_path="$new_path"
15233   # Check if we need to convert this using DOS-style short mode. If the path
15234   # contains just simple characters, use it. Otherwise (spaces, weird characters),
15235   # take no chances and rewrite it.
15236   # Note: m4 eats our [], so we need to use [ and ] instead.
15237   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15238   if test "x$has_forbidden_chars" != x; then
15239     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15240     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15241     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15242     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15243       # Going to short mode and back again did indeed matter. Since short mode is
15244       # case insensitive, let's make it lowercase to improve readability.
15245       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15246       # Now convert it back to Unix-stile (cygpath)
15247       input_path=`$CYGPATH -u "$shortmode_path"`
15248       new_path="$input_path"
15249     fi
15250   fi
15251 
15252   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15253   if test "x$test_cygdrive_prefix" = x; then
15254     # As a simple fix, exclude /usr/bin since it's not a real path.
15255     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15256       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15257       # a path prefixed by /cygdrive for fixpath to work.
15258       new_path="$CYGWIN_ROOT_PATH$input_path"
15259     fi
15260   fi
15261 
15262 
15263   if test "x$path" != "x$new_path"; then
15264     BOOT_JDK="$new_path"
15265     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15266 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15267   fi
15268 
15269   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15270 
15271   path="$BOOT_JDK"
15272   has_colon=`$ECHO $path | $GREP ^.:`
15273   new_path="$path"
15274   if test "x$has_colon" = x; then
15275     # Not in mixed or Windows style, start by that.
15276     new_path=`cmd //c echo $path`
15277   fi
15278 
15279 
15280   input_path="$new_path"
15281   # Check if we need to convert this using DOS-style short mode. If the path
15282   # contains just simple characters, use it. Otherwise (spaces, weird characters),
15283   # take no chances and rewrite it.
15284   # Note: m4 eats our [], so we need to use [ and ] instead.
15285   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15286   if test "x$has_forbidden_chars" != x; then
15287     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15288     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15289   fi
15290 
15291 
15292   windows_path="$new_path"
15293   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15294     unix_path=`$CYGPATH -u "$windows_path"`
15295     new_path="$unix_path"
15296   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15297     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15298     new_path="$unix_path"
15299   fi
15300 
15301   if test "x$path" != "x$new_path"; then
15302     BOOT_JDK="$new_path"
15303     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15304 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15305   fi
15306 
15307   # Save the first 10 bytes of this path to the storage, so fixpath can work.
15308   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15309 
15310   else
15311     # We're on a posix platform. Hooray! :)
15312     path="$BOOT_JDK"
15313     has_space=`$ECHO "$path" | $GREP " "`
15314     if test "x$has_space" != x; then
15315       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15316 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15317       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15318     fi
15319 
15320     # Use eval to expand a potential ~
15321     eval path="$path"
15322     if test ! -f "$path" && test ! -d "$path"; then
15323       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
15324     fi
15325 
15326     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
15327   fi
15328 
15329               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
15330 $as_echo_n "checking for Boot JDK... " >&6; }
15331               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
15332 $as_echo "$BOOT_JDK" >&6; }
15333               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
15334 $as_echo_n "checking Boot JDK version... " >&6; }
15335               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
15336               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
15337 $as_echo "$BOOT_JDK_VERSION" >&6; }
15338             fi # end check jdk version
15339           fi # end check rt.jar
15340         fi # end check javac
15341       fi # end check java
15342     fi # end check boot jdk found
15343   fi
15344 
15345   fi
15346 
15347 
15348     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
15349     if test "x$BOOT_JDK_FOUND" = xmaybe; then
15350       # Do we have a bin/java?
15351       if test ! -x "$BOOT_JDK/bin/java"; then
15352         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
15353 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
15354         BOOT_JDK_FOUND=no
15355       else
15356         # Do we have a bin/javac?
15357         if test ! -x "$BOOT_JDK/bin/javac"; then
15358           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
15359 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
15360           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
15361 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
15362           BOOT_JDK_FOUND=no
15363         else
15364           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
15365           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
15366             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
15367 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
15368             BOOT_JDK_FOUND=no
15369           else
15370             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
15371             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
15372 
15373             # Extra M4 quote needed to protect [] in grep expression.
15374             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
15375             if test "x$FOUND_VERSION_78" = x; then
15376               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
15377 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
15378               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
15379 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
15380               BOOT_JDK_FOUND=no
15381             else
15382               # We're done! :-)
15383               BOOT_JDK_FOUND=yes
15384 
15385   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15386 
15387   # Input might be given as Windows format, start by converting to
15388   # unix format.
15389   path="$BOOT_JDK"
15390   new_path=`$CYGPATH -u "$path"`
15391 
15392   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15393   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15394   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15395   # "foo.exe" is OK but "foo" is an error.
15396   #
15397   # This test is therefore slightly more accurate than "test -f" to check for file precense.
15398   # It is also a way to make sure we got the proper file name for the real test later on.
15399   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15400   if test "x$test_shortpath" = x; then
15401     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15402 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15403     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
15404   fi
15405 
15406   # Call helper function which possibly converts this using DOS-style short mode.
15407   # If so, the updated path is stored in $new_path.
15408 
15409   input_path="$new_path"
15410   # Check if we need to convert this using DOS-style short mode. If the path
15411   # contains just simple characters, use it. Otherwise (spaces, weird characters),
15412   # take no chances and rewrite it.
15413   # Note: m4 eats our [], so we need to use [ and ] instead.
15414   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15415   if test "x$has_forbidden_chars" != x; then
15416     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15417     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15418     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15419     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15420       # Going to short mode and back again did indeed matter. Since short mode is
15421       # case insensitive, let's make it lowercase to improve readability.
15422       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15423       # Now convert it back to Unix-stile (cygpath)
15424       input_path=`$CYGPATH -u "$shortmode_path"`
15425       new_path="$input_path"
15426     fi
15427   fi
15428 
15429   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15430   if test "x$test_cygdrive_prefix" = x; then
15431     # As a simple fix, exclude /usr/bin since it's not a real path.
15432     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15433       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15434       # a path prefixed by /cygdrive for fixpath to work.
15435       new_path="$CYGWIN_ROOT_PATH$input_path"
15436     fi
15437   fi
15438 
15439 
15440   if test "x$path" != "x$new_path"; then
15441     BOOT_JDK="$new_path"
15442     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15443 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15444   fi
15445 
15446   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15447 
15448   path="$BOOT_JDK"
15449   has_colon=`$ECHO $path | $GREP ^.:`
15450   new_path="$path"
15451   if test "x$has_colon" = x; then
15452     # Not in mixed or Windows style, start by that.
15453     new_path=`cmd //c echo $path`
15454   fi
15455 
15456 
15457   input_path="$new_path"
15458   # Check if we need to convert this using DOS-style short mode. If the path
15459   # contains just simple characters, use it. Otherwise (spaces, weird characters),
15460   # take no chances and rewrite it.
15461   # Note: m4 eats our [], so we need to use [ and ] instead.
15462   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15463   if test "x$has_forbidden_chars" != x; then
15464     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15465     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15466   fi
15467 
15468 
15469   windows_path="$new_path"
15470   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15471     unix_path=`$CYGPATH -u "$windows_path"`
15472     new_path="$unix_path"
15473   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15474     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15475     new_path="$unix_path"
15476   fi
15477 
15478   if test "x$path" != "x$new_path"; then
15479     BOOT_JDK="$new_path"
15480     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15481 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15482   fi
15483 
15484   # Save the first 10 bytes of this path to the storage, so fixpath can work.
15485   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15486 
15487   else
15488     # We're on a posix platform. Hooray! :)
15489     path="$BOOT_JDK"
15490     has_space=`$ECHO "$path" | $GREP " "`
15491     if test "x$has_space" != x; then
15492       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15493 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15494       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15495     fi
15496 
15497     # Use eval to expand a potential ~
15498     eval path="$path"
15499     if test ! -f "$path" && test ! -d "$path"; then
15500       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
15501     fi
15502 
15503     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
15504   fi
15505 
15506               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
15507 $as_echo_n "checking for Boot JDK... " >&6; }
15508               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
15509 $as_echo "$BOOT_JDK" >&6; }
15510               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
15511 $as_echo_n "checking Boot JDK version... " >&6; }
15512               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
15513               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
15514 $as_echo "$BOOT_JDK_VERSION" >&6; }
15515             fi # end check jdk version
15516           fi # end check rt.jar
15517         fi # end check javac
15518       fi # end check java
15519     fi # end check boot jdk found
15520   fi
15521 
15522 
15523 # If we haven't found anything yet, we've truly lost. Give up.
15524 if test "x$BOOT_JDK_FOUND" = xno; then
15525 
15526     # Print a helpful message on how to acquire the necessary build dependency.
15527     # openjdk is the help tag: freetyp2, cups, pulse, alsa etc
15528     MISSING_DEPENDENCY=openjdk
15529     PKGHANDLER_COMMAND=
15530 
15531     case $PKGHANDLER in
15532         apt-get)
15533                 apt_help     $MISSING_DEPENDENCY ;;
15534     yum)
15535                 yum_help     $MISSING_DEPENDENCY ;;
15536         port)
15537                 port_help    $MISSING_DEPENDENCY ;;
15538         pkgutil)
15539                 pkgutil_help $MISSING_DEPENDENCY ;;
15540         pkgadd)
15541                 pkgadd_help  $MISSING_DEPENDENCY ;;
15542     * )
15543       break ;;
15544     esac
15545 
15546     if test "x$PKGHANDLER_COMMAND" != x; then
15547         HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
15548     fi
15549 
15550   { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find a valid Boot JDK. $HELP_MSG" >&5
15551 $as_echo "$as_me: Could not find a valid Boot JDK. $HELP_MSG" >&6;}
15552   { $as_echo "$as_me:${as_lineno-$LINENO}: This might be fixed by explicitely setting --with-boot-jdk" >&5
15553 $as_echo "$as_me: This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15554   as_fn_error $? "Cannot continue" "$LINENO" 5
15555 fi
15556 
15557 # Setup proper paths for what we found
15558 BOOT_RTJAR="$BOOT_JDK/jre/lib/rt.jar"
15559 if test ! -f "$BOOT_RTJAR"; then
15560     # On MacOSX it is called classes.jar
15561     BOOT_RTJAR="$BOOT_JDK/../Classes/classes.jar"
15562     if test -f "$BOOT_RTJAR"; then
15563       # Remove the ..
15564       BOOT_RTJAR="`cd ${BOOT_RTJAR%/*} && pwd`/${BOOT_RTJAR##*/}"
15565     fi
15566 fi
15567 BOOT_TOOLSJAR="$BOOT_JDK/lib/tools.jar"
15568 BOOT_JDK="$BOOT_JDK"
15569 
15570 
15571 
15572 
15573 # Setup tools from the Boot JDK.
15574 
15575   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
15576 $as_echo_n "checking for java in Boot JDK... " >&6; }
15577   JAVA=$BOOT_JDK/bin/java
15578   if test ! -x $JAVA; then
15579       { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15580 $as_echo "not found" >&6; }
15581       { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15582 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15583       as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
15584   fi
15585   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15586 $as_echo "ok" >&6; }
15587 
15588 
15589   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
15590 $as_echo_n "checking for javac in Boot JDK... " >&6; }
15591   JAVAC=$BOOT_JDK/bin/javac
15592   if test ! -x $JAVAC; then
15593       { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15594 $as_echo "not found" >&6; }
15595       { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15596 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15597       as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
15598   fi
15599   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15600 $as_echo "ok" >&6; }
15601 
15602 
15603   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
15604 $as_echo_n "checking for javah in Boot JDK... " >&6; }
15605   JAVAH=$BOOT_JDK/bin/javah
15606   if test ! -x $JAVAH; then
15607       { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15608 $as_echo "not found" >&6; }
15609       { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15610 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15611       as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
15612   fi
15613   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15614 $as_echo "ok" >&6; }
15615 
15616 
15617   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javap in Boot JDK" >&5
15618 $as_echo_n "checking for javap in Boot JDK... " >&6; }
15619   JAVAP=$BOOT_JDK/bin/javap
15620   if test ! -x $JAVAP; then
15621       { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15622 $as_echo "not found" >&6; }
15623       { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15624 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15625       as_fn_error $? "Could not find javap in the Boot JDK" "$LINENO" 5
15626   fi
15627   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15628 $as_echo "ok" >&6; }
15629 
15630 
15631   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
15632 $as_echo_n "checking for jar in Boot JDK... " >&6; }
15633   JAR=$BOOT_JDK/bin/jar
15634   if test ! -x $JAR; then
15635       { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15636 $as_echo "not found" >&6; }
15637       { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15638 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15639       as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
15640   fi
15641   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15642 $as_echo "ok" >&6; }
15643 
15644 
15645   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for rmic in Boot JDK" >&5
15646 $as_echo_n "checking for rmic in Boot JDK... " >&6; }
15647   RMIC=$BOOT_JDK/bin/rmic
15648   if test ! -x $RMIC; then
15649       { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15650 $as_echo "not found" >&6; }
15651       { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15652 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15653       as_fn_error $? "Could not find rmic in the Boot JDK" "$LINENO" 5
15654   fi
15655   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15656 $as_echo "ok" >&6; }
15657 
15658 
15659   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for native2ascii in Boot JDK" >&5
15660 $as_echo_n "checking for native2ascii in Boot JDK... " >&6; }
15661   NATIVE2ASCII=$BOOT_JDK/bin/native2ascii
15662   if test ! -x $NATIVE2ASCII; then
15663       { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15664 $as_echo "not found" >&6; }
15665       { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15666 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15667       as_fn_error $? "Could not find native2ascii in the Boot JDK" "$LINENO" 5
15668   fi
15669   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15670 $as_echo "ok" >&6; }
15671 
15672 
15673 # Finally, set some other options...
15674 
15675 # When compiling code to be executed by the Boot JDK, force jdk7 compatibility.
15676 BOOT_JDK_SOURCETARGET="-source 7 -target 7"
15677 
15678 
15679 
15680 
15681 ##############################################################################
15682 #
15683 # Specify options for anything that is run with the Boot JDK.
15684 #
15685 
15686 # Check whether --with-boot-jdk-jvmargs was given.
15687 if test "${with_boot_jdk_jvmargs+set}" = set; then :
15688   withval=$with_boot_jdk_jvmargs;
15689 fi
15690 
15691 
15692 if test "x$with_boot_jdk_jvmargs" = x; then
15693     # Not all JVM:s accept the same arguments on the command line.
15694     # OpenJDK specific increase in thread stack for JDK build,
15695     # well more specifically, when running javac.
15696     if test "x$BUILD_NUM_BITS" = x32; then
15697        STACK_SIZE=768
15698     else
15699        # Running Javac on a JVM on a 64-bit machine, the stack takes more space
15700        # since 64-bit pointers are pushed on the stach. Apparently, we need
15701        # to increase the stack space when javacing the JDK....
15702        STACK_SIZE=1536
15703     fi
15704 
15705     # Minimum amount of heap memory.
15706 
15707     $ECHO "Check if jvm arg is ok: -Xms64M" >&5
15708     $ECHO "Command: $JAVA -Xms64M -version" >&5
15709     OUTPUT=`$JAVA -Xms64M -version 2>&1`
15710     FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
15711     FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
15712     if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15713         boot_jdk_jvmargs="$boot_jdk_jvmargs -Xms64M"
15714         JVM_ARG_OK=true
15715     else
15716         $ECHO "Arg failed:" >&5
15717         $ECHO "$OUTPUT" >&5
15718         JVM_ARG_OK=false
15719     fi
15720 
15721     if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
15722         # Why does macosx need more heap? Its the huge JDK batch.
15723 
15724     $ECHO "Check if jvm arg is ok: -Xmx1600M" >&5
15725     $ECHO "Command: $JAVA -Xmx1600M -version" >&5
15726     OUTPUT=`$JAVA -Xmx1600M -version 2>&1`
15727     FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
15728     FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
15729     if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15730         boot_jdk_jvmargs="$boot_jdk_jvmargs -Xmx1600M"
15731         JVM_ARG_OK=true
15732     else
15733         $ECHO "Arg failed:" >&5
15734         $ECHO "$OUTPUT" >&5
15735         JVM_ARG_OK=false
15736     fi
15737 
15738     else
15739 
15740     $ECHO "Check if jvm arg is ok: -Xmx1100M" >&5
15741     $ECHO "Command: $JAVA -Xmx1100M -version" >&5
15742     OUTPUT=`$JAVA -Xmx1100M -version 2>&1`
15743     FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
15744     FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
15745     if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15746         boot_jdk_jvmargs="$boot_jdk_jvmargs -Xmx1100M"
15747         JVM_ARG_OK=true
15748     else
15749         $ECHO "Arg failed:" >&5
15750         $ECHO "$OUTPUT" >&5
15751         JVM_ARG_OK=false
15752     fi
15753 
15754     fi
15755     # When is adding -client something that speeds up the JVM?
15756     # ADD_JVM_ARG_IF_OK([-client],boot_jdk_jvmargs,[$JAVA])
15757 
15758     $ECHO "Check if jvm arg is ok: -XX:PermSize=32m" >&5
15759     $ECHO "Command: $JAVA -XX:PermSize=32m -version" >&5
15760     OUTPUT=`$JAVA -XX:PermSize=32m -version 2>&1`
15761     FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
15762     FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
15763     if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15764         boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:PermSize=32m"
15765         JVM_ARG_OK=true
15766     else
15767         $ECHO "Arg failed:" >&5
15768         $ECHO "$OUTPUT" >&5
15769         JVM_ARG_OK=false
15770     fi
15771 
15772 
15773     $ECHO "Check if jvm arg is ok: -XX:MaxPermSize=160m" >&5
15774     $ECHO "Command: $JAVA -XX:MaxPermSize=160m -version" >&5
15775     OUTPUT=`$JAVA -XX:MaxPermSize=160m -version 2>&1`
15776     FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
15777     FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
15778     if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15779         boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:MaxPermSize=160m"
15780         JVM_ARG_OK=true
15781     else
15782         $ECHO "Arg failed:" >&5
15783         $ECHO "$OUTPUT" >&5
15784         JVM_ARG_OK=false
15785     fi
15786 
15787 
15788     $ECHO "Check if jvm arg is ok: -XX:ThreadStackSize=$STACK_SIZE" >&5
15789     $ECHO "Command: $JAVA -XX:ThreadStackSize=$STACK_SIZE -version" >&5
15790     OUTPUT=`$JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1`
15791     FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
15792     FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
15793     if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15794         boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:ThreadStackSize=$STACK_SIZE"
15795         JVM_ARG_OK=true
15796     else
15797         $ECHO "Arg failed:" >&5
15798         $ECHO "$OUTPUT" >&5
15799         JVM_ARG_OK=false
15800     fi
15801 
15802     # Disable special log output when a debug build is used as Boot JDK...
15803 
15804     $ECHO "Check if jvm arg is ok: -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput" >&5
15805     $ECHO "Command: $JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version" >&5
15806     OUTPUT=`$JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version 2>&1`
15807     FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
15808     FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
15809     if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15810         boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput"
15811         JVM_ARG_OK=true
15812     else
15813         $ECHO "Arg failed:" >&5
15814         $ECHO "$OUTPUT" >&5
15815         JVM_ARG_OK=false
15816     fi
15817 
15818 fi
15819 
15820 BOOT_JDK_JVMARGS=$boot_jdk_jvmargs
15821 
15822 
15823 
15824 ###############################################################################
15825 #
15826 # Configure the sources to use. We can add or override individual directories.
15827 #
15828 ###############################################################################
15829 
15830 
15831 
15832 # Where are the sources. Any of these can be overridden
15833 # using --with-override-corba and the likes.
15834 LANGTOOLS_TOPDIR="$SRC_ROOT/langtools"
15835 CORBA_TOPDIR="$SRC_ROOT/corba"
15836 JAXP_TOPDIR="$SRC_ROOT/jaxp"
15837 JAXWS_TOPDIR="$SRC_ROOT/jaxws"
15838 HOTSPOT_TOPDIR="$SRC_ROOT/hotspot"
15839 NASHORN_TOPDIR="$SRC_ROOT/nashorn"
15840 JDK_TOPDIR="$SRC_ROOT/jdk"
15841 
15842 
15843 
15844 
15845 
15846 
15847 
15848 
15849 
15850 
15851 ###############################################################################
15852 #
15853 # Pickup additional source for a component from outside of the source root
15854 # or override source for a component.
15855 #
15856 
15857 # Check whether --with-add-source-root was given.
15858 if test "${with_add_source_root+set}" = set; then :
15859   withval=$with_add_source_root;
15860 fi
15861 
15862 
15863 
15864 # Check whether --with-override-source-root was given.
15865 if test "${with_override_source_root+set}" = set; then :
15866   withval=$with_override_source_root;
15867 fi
15868 
15869 
15870 
15871 # Check whether --with-adds-and-overrides was given.
15872 if test "${with_adds_and_overrides+set}" = set; then :
15873   withval=$with_adds_and_overrides;
15874 fi
15875 
15876 
15877 if test "x$with_adds_and_overrides" != x; then
15878     with_add_source_root="$with_adds_and_overrides/adds"
15879     with_override_source_root="$with_adds_and_overrides/overrides"
15880 fi
15881 
15882 if test "x$with_add_source_root" != x; then
15883     if ! test -d $with_add_source_root; then
15884        as_fn_error $? "Trying to use a non-existant add-source-root $with_add_source_root" "$LINENO" 5
15885     fi
15886     CURDIR="$PWD"
15887     cd "$with_add_source_root"
15888     ADD_SRC_ROOT="`pwd`"
15889     cd "$CURDIR"
15890     # Verify that the addon source root does not have any root makefiles.
15891     # If it does, then it is usually an error, prevent this.
15892     if test -f $with_add_source_root/langtools/makefiles/Makefile || \
15893        test -f $with_add_source_root/langtools/make/Makefile; then
15894         as_fn_error $? "Your add source root seems to contain a full langtools repo! An add source root should only contain additional sources." "$LINENO" 5
15895     fi
15896     if test -f $with_add_source_root/corba/makefiles/Makefile || \
15897        test -f $with_add_source_root/corba/make/Makefile; then
15898         as_fn_error $? "Your add source root seems to contain a full corba repo! An add source root should only contain additional sources." "$LINENO" 5
15899     fi
15900     if test -f $with_add_source_root/jaxp/makefiles/Makefile || \
15901        test -f $with_add_source_root/jaxp/make/Makefile; then
15902         as_fn_error $? "Your add source root seems to contain a full jaxp repo! An add source root should only contain additional sources." "$LINENO" 5
15903     fi
15904     if test -f $with_add_source_root/jaxws/makefiles/Makefile || \
15905        test -f $with_add_source_root/jaxws/make/Makefile; then
15906         as_fn_error $? "Your add source root seems to contain a full jaxws repo! An add source root should only contain additional sources." "$LINENO" 5
15907     fi
15908     if test -f $with_add_source_root/hotspot/makefiles/Makefile || \
15909        test -f $with_add_source_root/hotspot/make/Makefile; then
15910         as_fn_error $? "Your add source root seems to contain a full hotspot repo! An add source root should only contain additional sources." "$LINENO" 5
15911     fi
15912     if test -f $with_add_source_root/jdk/makefiles/Makefile || \
15913        test -f $with_add_source_root/jdk/make/Makefile; then
15914         as_fn_error $? "Your add source root seems to contain a full JDK repo! An add source root should only contain additional sources." "$LINENO" 5
15915     fi
15916 fi
15917 
15918 
15919 if test "x$with_override_source_root" != x; then
15920     if ! test -d $with_override_source_root; then
15921        as_fn_error $? "Trying to use a non-existant override-source-root $with_override_source_root" "$LINENO" 5
15922     fi
15923     CURDIR="$PWD"
15924     cd "$with_override_source_root"
15925     OVERRIDE_SRC_ROOT="`pwd`"
15926     cd "$CURDIR"
15927     if test -f $with_override_source_root/langtools/makefiles/Makefile || \
15928        test -f $with_override_source_root/langtools/make/Makefile; then
15929         as_fn_error $? "Your override source root seems to contain a full langtools repo! An override source root should only contain sources that override." "$LINENO" 5
15930     fi
15931     if test -f $with_override_source_root/corba/makefiles/Makefile || \
15932        test -f $with_override_source_root/corba/make/Makefile; then
15933         as_fn_error $? "Your override source root seems to contain a full corba repo! An override source root should only contain sources that override." "$LINENO" 5
15934     fi
15935     if test -f $with_override_source_root/jaxp/makefiles/Makefile || \
15936        test -f $with_override_source_root/jaxp/make/Makefile; then
15937         as_fn_error $? "Your override source root seems to contain a full jaxp repo! An override source root should only contain sources that override." "$LINENO" 5
15938     fi
15939     if test -f $with_override_source_root/jaxws/makefiles/Makefile || \
15940        test -f $with_override_source_root/jaxws/make/Makefile; then
15941         as_fn_error $? "Your override source root seems to contain a full jaxws repo! An override source root should only contain sources that override." "$LINENO" 5
15942     fi
15943     if test -f $with_override_source_root/hotspot/makefiles/Makefile || \
15944        test -f $with_override_source_root/hotspot/make/Makefile; then
15945         as_fn_error $? "Your override source root seems to contain a full hotspot repo! An override source root should only contain sources that override." "$LINENO" 5
15946     fi
15947     if test -f $with_override_source_root/jdk/makefiles/Makefile || \
15948        test -f $with_override_source_root/jdk/make/Makefile; then
15949         as_fn_error $? "Your override source root seems to contain a full JDK repo! An override source root should only contain sources that override." "$LINENO" 5
15950     fi
15951 fi
15952 
15953 
15954 ###############################################################################
15955 #
15956 # Override a repo completely, this is used for example when you have 3 small
15957 # development sandboxes of the langtools sources and want to avoid having 3 full
15958 # OpenJDK sources checked out on disk.
15959 #
15960 # Assuming that the 3 langtools sandboxes are located here:
15961 # /home/fredrik/sandbox1/langtools
15962 # /home/fredrik/sandbox2/langtools
15963 # /home/fredrik/sandbox3/langtools
15964 #
15965 # From the source root you create build subdirs manually:
15966 #     mkdir -p build1 build2 build3
15967 # in each build directory run:
15968 #     (cd build1 && ../configure --with-override-langtools=/home/fredrik/sandbox1 && make)
15969 #     (cd build2 && ../configure --with-override-langtools=/home/fredrik/sandbox2 && make)
15970 #     (cd build3 && ../configure --with-override-langtools=/home/fredrik/sandbox3 && make)
15971 #
15972 
15973 
15974 # Check whether --with-override-langtools was given.
15975 if test "${with_override_langtools+set}" = set; then :
15976   withval=$with_override_langtools;
15977 fi
15978 
15979 
15980 
15981 # Check whether --with-override-corba was given.
15982 if test "${with_override_corba+set}" = set; then :
15983   withval=$with_override_corba;
15984 fi
15985 
15986 
15987 
15988 # Check whether --with-override-jaxp was given.
15989 if test "${with_override_jaxp+set}" = set; then :
15990   withval=$with_override_jaxp;
15991 fi
15992 
15993 
15994 
15995 # Check whether --with-override-jaxws was given.
15996 if test "${with_override_jaxws+set}" = set; then :
15997   withval=$with_override_jaxws;
15998 fi
15999 
16000 
16001 
16002 # Check whether --with-override-hotspot was given.
16003 if test "${with_override_hotspot+set}" = set; then :
16004   withval=$with_override_hotspot;
16005 fi
16006 
16007 
16008 
16009 # Check whether --with-override-jdk was given.
16010 if test "${with_override_jdk+set}" = set; then :
16011   withval=$with_override_jdk;
16012 fi
16013 
16014 
16015 if test "x$with_override_langtools" != x; then
16016     CURDIR="$PWD"
16017     cd "$with_override_langtools"
16018     LANGTOOLS_TOPDIR="`pwd`"
16019     cd "$CURDIR"
16020     if ! test -f $LANGTOOLS_TOPDIR/makefiles/Makefile; then
16021         as_fn_error $? "You have to override langtools with a full langtools repo!" "$LINENO" 5
16022     fi
16023     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if langtools should be overridden" >&5
16024 $as_echo_n "checking if langtools should be overridden... " >&6; }
16025     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $LANGTOOLS_TOPDIR" >&5
16026 $as_echo "yes with $LANGTOOLS_TOPDIR" >&6; }
16027 fi
16028 if test "x$with_override_corba" != x; then
16029     CURDIR="$PWD"
16030     cd "$with_override_corba"
16031     CORBA_TOPDIR="`pwd`"
16032     cd "$CURDIR"
16033     if ! test -f $CORBA_TOPDIR/makefiles/Makefile; then
16034         as_fn_error $? "You have to override corba with a full corba repo!" "$LINENO" 5
16035     fi
16036     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if corba should be overridden" >&5
16037 $as_echo_n "checking if corba should be overridden... " >&6; }
16038     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $CORBA_TOPDIR" >&5
16039 $as_echo "yes with $CORBA_TOPDIR" >&6; }
16040 fi
16041 if test "x$with_override_jaxp" != x; then
16042     CURDIR="$PWD"
16043     cd "$with_override_jaxp"
16044     JAXP_TOPDIR="`pwd`"
16045     cd "$CURDIR"
16046     if ! test -f $JAXP_TOPDIR/makefiles/Makefile; then
16047         as_fn_error $? "You have to override jaxp with a full jaxp repo!" "$LINENO" 5
16048     fi
16049     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jaxp should be overridden" >&5
16050 $as_echo_n "checking if jaxp should be overridden... " >&6; }
16051     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JAXP_TOPDIR" >&5
16052 $as_echo "yes with $JAXP_TOPDIR" >&6; }
16053 fi
16054 if test "x$with_override_jaxws" != x; then
16055     CURDIR="$PWD"
16056     cd "$with_override_jaxws"
16057     JAXWS_TOPDIR="`pwd`"
16058     cd "$CURDIR"
16059     if ! test -f $JAXWS_TOPDIR/makefiles/Makefile; then
16060         as_fn_error $? "You have to override jaxws with a full jaxws repo!" "$LINENO" 5
16061     fi
16062     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jaxws should be overridden" >&5
16063 $as_echo_n "checking if jaxws should be overridden... " >&6; }
16064     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JAXWS_TOPDIR" >&5
16065 $as_echo "yes with $JAXWS_TOPDIR" >&6; }
16066 fi
16067 if test "x$with_override_hotspot" != x; then
16068     CURDIR="$PWD"
16069     cd "$with_override_hotspot"
16070     HOTSPOT_TOPDIR="`pwd`"
16071     cd "$CURDIR"
16072     if ! test -f $HOTSPOT_TOPDIR/make/Makefile && \
16073        ! test -f $HOTSPOT_TOPDIR/makefiles/Makefile; then
16074         as_fn_error $? "You have to override hotspot with a full hotspot repo!" "$LINENO" 5
16075     fi
16076     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be overridden" >&5
16077 $as_echo_n "checking if hotspot should be overridden... " >&6; }
16078     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $HOTSPOT_TOPDIR" >&5
16079 $as_echo "yes with $HOTSPOT_TOPDIR" >&6; }
16080 fi
16081 if test "x$with_override_nashorn" != x; then
16082     CURDIR="$PWD"
16083     cd "$with_override_nashorn"
16084     NASHORN_TOPDIR="`pwd`"
16085     cd "$CURDIR"
16086     if ! test -f $NASHORN_TOPDIR/makefiles/BuildNashorn.gmk; then
16087         as_fn_error $? "You have to override nashorn with a full nashorn repo!" "$LINENO" 5
16088     fi
16089     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if nashorn should be overridden" >&5
16090 $as_echo_n "checking if nashorn should be overridden... " >&6; }
16091     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $NASHORN_TOPDIR" >&5
16092 $as_echo "yes with $NASHORN_TOPDIR" >&6; }
16093 fi
16094 if test "x$with_override_jdk" != x; then
16095     CURDIR="$PWD"
16096     cd "$with_override_jdk"
16097     JDK_TOPDIR="`pwd`"
16098     cd "$CURDIR"
16099     if ! test -f $JDK_TOPDIR/makefiles/Makefile; then
16100         as_fn_error $? "You have to override JDK with a full JDK repo!" "$LINENO" 5
16101     fi
16102     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if JDK should be overridden" >&5
16103 $as_echo_n "checking if JDK should be overridden... " >&6; }
16104     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JDK_TOPDIR" >&5
16105 $as_echo "yes with $JDK_TOPDIR" >&6; }
16106 fi
16107 
16108 
16109 
16110 BUILD_OUTPUT="$OUTPUT_ROOT"
16111 
16112 
16113 HOTSPOT_DIST="$OUTPUT_ROOT/hotspot/dist"
16114 BUILD_HOTSPOT=true
16115 
16116 
16117 
16118 # Check whether --with-import-hotspot was given.
16119 if test "${with_import_hotspot+set}" = set; then :
16120   withval=$with_import_hotspot;
16121 fi
16122 
16123 if test "x$with_import_hotspot" != x; then
16124     CURDIR="$PWD"
16125     cd "$with_import_hotspot"
16126     HOTSPOT_DIST="`pwd`"
16127     cd "$CURDIR"
16128     if ! (test -d $HOTSPOT_DIST/lib && test -d $HOTSPOT_DIST/jre/lib); then
16129         as_fn_error $? "You have to import hotspot from a full jdk image or hotspot build dist dir!" "$LINENO" 5
16130     fi
16131     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be imported" >&5
16132 $as_echo_n "checking if hotspot should be imported... " >&6; }
16133     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes from $HOTSPOT_DIST" >&5
16134 $as_echo "yes from $HOTSPOT_DIST" >&6; }
16135     BUILD_HOTSPOT=false
16136 fi
16137 
16138 JDK_OUTPUTDIR="$OUTPUT_ROOT/jdk"
16139 
16140 
16141 ###############################################################################
16142 #
16143 # Setup the toolchain (compilers etc), i.e. the tools that need to be
16144 # cross-compilation aware.
16145 #
16146 ###############################################################################
16147 
16148 
16149 ###############################################################################
16150 #
16151 # Configure the development tool paths and potential sysroot.
16152 #
16153 ac_ext=cpp
16154 ac_cpp='$CXXCPP $CPPFLAGS'
16155 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
16156 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
16157 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
16158 
16159 
16160 # The option used to specify the target .o,.a or .so file.
16161 # When compiling, how to specify the to be created object file.
16162 CC_OUT_OPTION='-o$(SPACE)'
16163 # When linking, how to specify the to be created executable.
16164 EXE_OUT_OPTION='-o$(SPACE)'
16165 # When linking, how to specify the to be created dynamically linkable library.
16166 LD_OUT_OPTION='-o$(SPACE)'
16167 # When archiving, how to specify the to be create static archive for object files.
16168 AR_OUT_OPTION='rcs$(SPACE)'
16169 
16170 
16171 
16172 
16173 
16174 # Locate the actual tools
16175 
16176 
16177 # Check whether --with-jtreg was given.
16178 if test "${with_jtreg+set}" = set; then :
16179   withval=$with_jtreg;
16180 else
16181   with_jtreg=no
16182 fi
16183 
16184 
16185   if test "x$with_jtreg" = xno; then
16186     # jtreg disabled
16187     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
16188 $as_echo_n "checking for jtreg... " >&6; }
16189     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16190 $as_echo "no" >&6; }
16191   else
16192     if test "x$with_jtreg" != xyes; then
16193       # with path specified.
16194       JT_HOME="$with_jtreg"
16195     fi
16196 
16197     if test "x$JT_HOME" != x; then
16198       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
16199 $as_echo_n "checking for jtreg... " >&6; }
16200 
16201       # use JT_HOME enviroment var.
16202 
16203   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16204 
16205   # Input might be given as Windows format, start by converting to
16206   # unix format.
16207   path="$JT_HOME"
16208   new_path=`$CYGPATH -u "$path"`
16209 
16210   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16211   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16212   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16213   # "foo.exe" is OK but "foo" is an error.
16214   #
16215   # This test is therefore slightly more accurate than "test -f" to check for file precense.
16216   # It is also a way to make sure we got the proper file name for the real test later on.
16217   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16218   if test "x$test_shortpath" = x; then
16219     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
16220 $as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
16221     as_fn_error $? "Cannot locate the the path of JT_HOME" "$LINENO" 5
16222   fi
16223 
16224   # Call helper function which possibly converts this using DOS-style short mode.
16225   # If so, the updated path is stored in $new_path.
16226 
16227   input_path="$new_path"
16228   # Check if we need to convert this using DOS-style short mode. If the path
16229   # contains just simple characters, use it. Otherwise (spaces, weird characters),
16230   # take no chances and rewrite it.
16231   # Note: m4 eats our [], so we need to use [ and ] instead.
16232   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16233   if test "x$has_forbidden_chars" != x; then
16234     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16235     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16236     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16237     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16238       # Going to short mode and back again did indeed matter. Since short mode is
16239       # case insensitive, let's make it lowercase to improve readability.
16240       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16241       # Now convert it back to Unix-stile (cygpath)
16242       input_path=`$CYGPATH -u "$shortmode_path"`
16243       new_path="$input_path"
16244     fi
16245   fi
16246 
16247   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16248   if test "x$test_cygdrive_prefix" = x; then
16249     # As a simple fix, exclude /usr/bin since it's not a real path.
16250     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
16251       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16252       # a path prefixed by /cygdrive for fixpath to work.
16253       new_path="$CYGWIN_ROOT_PATH$input_path"
16254     fi
16255   fi
16256 
16257 
16258   if test "x$path" != "x$new_path"; then
16259     JT_HOME="$new_path"
16260     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
16261 $as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
16262   fi
16263 
16264   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16265 
16266   path="$JT_HOME"
16267   has_colon=`$ECHO $path | $GREP ^.:`
16268   new_path="$path"
16269   if test "x$has_colon" = x; then
16270     # Not in mixed or Windows style, start by that.
16271     new_path=`cmd //c echo $path`
16272   fi
16273 
16274 
16275   input_path="$new_path"
16276   # Check if we need to convert this using DOS-style short mode. If the path
16277   # contains just simple characters, use it. Otherwise (spaces, weird characters),
16278   # take no chances and rewrite it.
16279   # Note: m4 eats our [], so we need to use [ and ] instead.
16280   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16281   if test "x$has_forbidden_chars" != x; then
16282     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16283     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16284   fi
16285 
16286 
16287   windows_path="$new_path"
16288   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16289     unix_path=`$CYGPATH -u "$windows_path"`
16290     new_path="$unix_path"
16291   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16292     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16293     new_path="$unix_path"
16294   fi
16295 
16296   if test "x$path" != "x$new_path"; then
16297     JT_HOME="$new_path"
16298     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
16299 $as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
16300   fi
16301 
16302   # Save the first 10 bytes of this path to the storage, so fixpath can work.
16303   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16304 
16305   else
16306     # We're on a posix platform. Hooray! :)
16307     path="$JT_HOME"
16308     has_space=`$ECHO "$path" | $GREP " "`
16309     if test "x$has_space" != x; then
16310       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
16311 $as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
16312       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
16313     fi
16314 
16315     # Use eval to expand a potential ~
16316     eval path="$path"
16317     if test ! -f "$path" && test ! -d "$path"; then
16318       as_fn_error $? "The path of JT_HOME, which resolves as \"$path\", is not found." "$LINENO" 5
16319     fi
16320 
16321     JT_HOME="`cd "$path"; $THEPWDCMD -L`"
16322   fi
16323 
16324 
16325       # jtreg win32 script works for everybody
16326       JTREGEXE="$JT_HOME/win32/bin/jtreg"
16327 
16328       if test ! -f "$JTREGEXE"; then
16329         as_fn_error $? "JTReg executable does not exist: $JTREGEXE" "$LINENO" 5
16330       fi
16331 
16332       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
16333 $as_echo "$JTREGEXE" >&6; }
16334     else
16335       # try to find jtreg on path
16336 
16337     for ac_prog in jtreg
16338 do
16339   # Extract the first word of "$ac_prog", so it can be a program name with args.
16340 set dummy $ac_prog; ac_word=$2
16341 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16342 $as_echo_n "checking for $ac_word... " >&6; }
16343 if test "${ac_cv_path_JTREGEXE+set}" = set; then :
16344   $as_echo_n "(cached) " >&6
16345 else
16346   case $JTREGEXE in
16347   [\\/]* | ?:[\\/]*)
16348   ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
16349   ;;
16350   *)
16351   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16352 for as_dir in $PATH
16353 do
16354   IFS=$as_save_IFS
16355   test -z "$as_dir" && as_dir=.
16356     for ac_exec_ext in '' $ac_executable_extensions; do
16357   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
16358     ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
16359     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16360     break 2
16361   fi
16362 done
16363   done
16364 IFS=$as_save_IFS
16365 
16366   ;;
16367 esac
16368 fi
16369 JTREGEXE=$ac_cv_path_JTREGEXE
16370 if test -n "$JTREGEXE"; then
16371   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
16372 $as_echo "$JTREGEXE" >&6; }
16373 else
16374   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16375 $as_echo "no" >&6; }
16376 fi
16377 
16378 
16379   test -n "$JTREGEXE" && break
16380 done
16381 
16382 
16383     if test "x$JTREGEXE" = x; then
16384         if test "xjtreg" = x; then
16385           PROG_NAME=jtregexe
16386         else
16387           PROG_NAME=jtreg
16388         fi
16389         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
16390 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
16391         as_fn_error $? "Cannot continue" "$LINENO" 5
16392     fi
16393 
16394 
16395       JT_HOME="`$DIRNAME $JTREGEXE`"
16396     fi
16397   fi
16398 
16399 
16400 
16401 
16402 
16403 if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
16404 
16405   # Store path to cygwin link.exe to help excluding it when searching for
16406   # VS linker. This must be done before changing the PATH when looking for VS.
16407   # Extract the first word of "link", so it can be a program name with args.
16408 set dummy link; ac_word=$2
16409 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16410 $as_echo_n "checking for $ac_word... " >&6; }
16411 if test "${ac_cv_path_CYGWIN_LINK+set}" = set; then :
16412   $as_echo_n "(cached) " >&6
16413 else
16414   case $CYGWIN_LINK in
16415   [\\/]* | ?:[\\/]*)
16416   ac_cv_path_CYGWIN_LINK="$CYGWIN_LINK" # Let the user override the test with a path.
16417   ;;
16418   *)
16419   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16420 for as_dir in $PATH
16421 do
16422   IFS=$as_save_IFS
16423   test -z "$as_dir" && as_dir=.
16424     for ac_exec_ext in '' $ac_executable_extensions; do
16425   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
16426     ac_cv_path_CYGWIN_LINK="$as_dir/$ac_word$ac_exec_ext"
16427     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16428     break 2
16429   fi
16430 done
16431   done
16432 IFS=$as_save_IFS
16433 
16434   ;;
16435 esac
16436 fi
16437 CYGWIN_LINK=$ac_cv_path_CYGWIN_LINK
16438 if test -n "$CYGWIN_LINK"; then
16439   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_LINK" >&5
16440 $as_echo "$CYGWIN_LINK" >&6; }
16441 else
16442   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16443 $as_echo "no" >&6; }
16444 fi
16445 
16446 
16447   if test "x$CYGWIN_LINK" != x; then
16448     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the first found link.exe is actually the Cygwin link tool" >&5
16449 $as_echo_n "checking if the first found link.exe is actually the Cygwin link tool... " >&6; }
16450     "$CYGWIN_LINK" --version > /dev/null
16451     if test $? -eq 0 ; then
16452       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16453 $as_echo "yes" >&6; }
16454     else
16455       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16456 $as_echo "no" >&6; }
16457       # This might be the VS linker. Don't exclude it later on.
16458       CYGWIN_LINK=""
16459     fi
16460   fi
16461 
16462   # First-hand choice is to locate and run the vsvars bat file.
16463 
16464   if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
16465     VCVARSFILE="vc/bin/vcvars32.bat"
16466   else
16467     VCVARSFILE="vc/bin/amd64/vcvars64.bat"
16468   fi
16469 
16470   VS_ENV_CMD=""
16471   VS_ENV_ARGS=""
16472   if test "x$with_toolsdir" != x; then
16473 
16474   if test "x$VS_ENV_CMD" = x; then
16475     VS100BASE="$with_toolsdir/../.."
16476     METHOD="--with-tools-dir"
16477 
16478   windows_path="$VS100BASE"
16479   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16480     unix_path=`$CYGPATH -u "$windows_path"`
16481     VS100BASE="$unix_path"
16482   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16483     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16484     VS100BASE="$unix_path"
16485   fi
16486 
16487     if test -d "$VS100BASE"; then
16488       if test -f "$VS100BASE/$VCVARSFILE"; then
16489         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16490 $as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16491         VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16492       else
16493         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16494 $as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16495         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16496 $as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16497       fi
16498     fi
16499   fi
16500 
16501   fi
16502 
16503   if test "x$with_toolsdir" != x && test "x$VS_ENV_CMD" = x; then
16504     # Having specified an argument which is incorrect will produce an instant failure;
16505     # we should not go on looking
16506     { $as_echo "$as_me:${as_lineno-$LINENO}: The path given by --with-tools-dir does not contain a valid Visual Studio installation" >&5
16507 $as_echo "$as_me: The path given by --with-tools-dir does not contain a valid Visual Studio installation" >&6;}
16508     { $as_echo "$as_me:${as_lineno-$LINENO}: Please point to the VC/bin directory within the Visual Studio installation" >&5
16509 $as_echo "$as_me: Please point to the VC/bin directory within the Visual Studio installation" >&6;}
16510     as_fn_error $? "Cannot locate a valid Visual Studio installation" "$LINENO" 5
16511   fi
16512 
16513   if test "x$ProgramW6432" != x; then
16514 
16515   if test "x$VS_ENV_CMD" = x; then
16516     WIN_SDK_BASE="$ProgramW6432/Microsoft SDKs/Windows/v7.1/Bin"
16517     METHOD="well-known name"
16518 
16519   windows_path="$WIN_SDK_BASE"
16520   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16521     unix_path=`$CYGPATH -u "$windows_path"`
16522     WIN_SDK_BASE="$unix_path"
16523   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16524     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16525     WIN_SDK_BASE="$unix_path"
16526   fi
16527 
16528     if test -d "$WIN_SDK_BASE"; then
16529       # There have been cases of partial or broken SDK installations. A missing
16530       # lib dir is not going to work.
16531       if test ! -d "$WIN_SDK_BASE/../lib"; then
16532         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16533 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16534         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
16535 $as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
16536       elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
16537         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16538 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16539         VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
16540         if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
16541           VS_ENV_ARGS="/x86"
16542         else
16543           VS_ENV_ARGS="/x64"
16544         fi
16545       else
16546         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16547 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16548         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
16549 $as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
16550       fi
16551     fi
16552   fi
16553 
16554   fi
16555   if test "x$PROGRAMW6432" != x; then
16556 
16557   if test "x$VS_ENV_CMD" = x; then
16558     WIN_SDK_BASE="$PROGRAMW6432/Microsoft SDKs/Windows/v7.1/Bin"
16559     METHOD="well-known name"
16560 
16561   windows_path="$WIN_SDK_BASE"
16562   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16563     unix_path=`$CYGPATH -u "$windows_path"`
16564     WIN_SDK_BASE="$unix_path"
16565   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16566     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16567     WIN_SDK_BASE="$unix_path"
16568   fi
16569 
16570     if test -d "$WIN_SDK_BASE"; then
16571       # There have been cases of partial or broken SDK installations. A missing
16572       # lib dir is not going to work.
16573       if test ! -d "$WIN_SDK_BASE/../lib"; then
16574         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16575 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16576         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
16577 $as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
16578       elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
16579         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16580 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16581         VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
16582         if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
16583           VS_ENV_ARGS="/x86"
16584         else
16585           VS_ENV_ARGS="/x64"
16586         fi
16587       else
16588         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16589 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16590         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
16591 $as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
16592       fi
16593     fi
16594   fi
16595 
16596   fi
16597   if test "x$PROGRAMFILES" != x; then
16598 
16599   if test "x$VS_ENV_CMD" = x; then
16600     WIN_SDK_BASE="$PROGRAMFILES/Microsoft SDKs/Windows/v7.1/Bin"
16601     METHOD="well-known name"
16602 
16603   windows_path="$WIN_SDK_BASE"
16604   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16605     unix_path=`$CYGPATH -u "$windows_path"`
16606     WIN_SDK_BASE="$unix_path"
16607   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16608     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16609     WIN_SDK_BASE="$unix_path"
16610   fi
16611 
16612     if test -d "$WIN_SDK_BASE"; then
16613       # There have been cases of partial or broken SDK installations. A missing
16614       # lib dir is not going to work.
16615       if test ! -d "$WIN_SDK_BASE/../lib"; then
16616         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16617 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16618         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
16619 $as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
16620       elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
16621         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16622 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16623         VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
16624         if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
16625           VS_ENV_ARGS="/x86"
16626         else
16627           VS_ENV_ARGS="/x64"
16628         fi
16629       else
16630         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16631 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16632         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
16633 $as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
16634       fi
16635     fi
16636   fi
16637 
16638   fi
16639 
16640   if test "x$VS_ENV_CMD" = x; then
16641     WIN_SDK_BASE="C:/Program Files/Microsoft SDKs/Windows/v7.1/Bin"
16642     METHOD="well-known name"
16643 
16644   windows_path="$WIN_SDK_BASE"
16645   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16646     unix_path=`$CYGPATH -u "$windows_path"`
16647     WIN_SDK_BASE="$unix_path"
16648   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16649     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16650     WIN_SDK_BASE="$unix_path"
16651   fi
16652 
16653     if test -d "$WIN_SDK_BASE"; then
16654       # There have been cases of partial or broken SDK installations. A missing
16655       # lib dir is not going to work.
16656       if test ! -d "$WIN_SDK_BASE/../lib"; then
16657         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16658 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16659         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
16660 $as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
16661       elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
16662         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16663 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16664         VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
16665         if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
16666           VS_ENV_ARGS="/x86"
16667         else
16668           VS_ENV_ARGS="/x64"
16669         fi
16670       else
16671         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16672 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16673         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
16674 $as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
16675       fi
16676     fi
16677   fi
16678 
16679 
16680   if test "x$VS_ENV_CMD" = x; then
16681     WIN_SDK_BASE="C:/Program Files (x86)/Microsoft SDKs/Windows/v7.1/Bin"
16682     METHOD="well-known name"
16683 
16684   windows_path="$WIN_SDK_BASE"
16685   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16686     unix_path=`$CYGPATH -u "$windows_path"`
16687     WIN_SDK_BASE="$unix_path"
16688   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16689     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16690     WIN_SDK_BASE="$unix_path"
16691   fi
16692 
16693     if test -d "$WIN_SDK_BASE"; then
16694       # There have been cases of partial or broken SDK installations. A missing
16695       # lib dir is not going to work.
16696       if test ! -d "$WIN_SDK_BASE/../lib"; then
16697         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16698 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16699         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
16700 $as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
16701       elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
16702         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16703 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16704         VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
16705         if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
16706           VS_ENV_ARGS="/x86"
16707         else
16708           VS_ENV_ARGS="/x64"
16709         fi
16710       else
16711         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16712 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16713         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
16714 $as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
16715       fi
16716     fi
16717   fi
16718 
16719 
16720   if test "x$VS100COMNTOOLS" != x; then
16721 
16722   if test "x$VS_ENV_CMD" = x; then
16723     VS100BASE="$VS100COMNTOOLS/../.."
16724     METHOD="VS100COMNTOOLS variable"
16725 
16726   windows_path="$VS100BASE"
16727   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16728     unix_path=`$CYGPATH -u "$windows_path"`
16729     VS100BASE="$unix_path"
16730   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16731     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16732     VS100BASE="$unix_path"
16733   fi
16734 
16735     if test -d "$VS100BASE"; then
16736       if test -f "$VS100BASE/$VCVARSFILE"; then
16737         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16738 $as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16739         VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16740       else
16741         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16742 $as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16743         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16744 $as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16745       fi
16746     fi
16747   fi
16748 
16749   fi
16750   if test "x$PROGRAMFILES" != x; then
16751 
16752   if test "x$VS_ENV_CMD" = x; then
16753     VS100BASE="$PROGRAMFILES/Microsoft Visual Studio 10.0"
16754     METHOD="well-known name"
16755 
16756   windows_path="$VS100BASE"
16757   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16758     unix_path=`$CYGPATH -u "$windows_path"`
16759     VS100BASE="$unix_path"
16760   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16761     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16762     VS100BASE="$unix_path"
16763   fi
16764 
16765     if test -d "$VS100BASE"; then
16766       if test -f "$VS100BASE/$VCVARSFILE"; then
16767         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16768 $as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16769         VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16770       else
16771         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16772 $as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16773         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16774 $as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16775       fi
16776     fi
16777   fi
16778 
16779   fi
16780 
16781   if test "x$VS_ENV_CMD" = x; then
16782     VS100BASE="C:/Program Files/Microsoft Visual Studio 10.0"
16783     METHOD="well-known name"
16784 
16785   windows_path="$VS100BASE"
16786   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16787     unix_path=`$CYGPATH -u "$windows_path"`
16788     VS100BASE="$unix_path"
16789   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16790     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16791     VS100BASE="$unix_path"
16792   fi
16793 
16794     if test -d "$VS100BASE"; then
16795       if test -f "$VS100BASE/$VCVARSFILE"; then
16796         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16797 $as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16798         VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16799       else
16800         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16801 $as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16802         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16803 $as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16804       fi
16805     fi
16806   fi
16807 
16808 
16809   if test "x$VS_ENV_CMD" = x; then
16810     VS100BASE="C:/Program Files (x86)/Microsoft Visual Studio 10.0"
16811     METHOD="well-known name"
16812 
16813   windows_path="$VS100BASE"
16814   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16815     unix_path=`$CYGPATH -u "$windows_path"`
16816     VS100BASE="$unix_path"
16817   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16818     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16819     VS100BASE="$unix_path"
16820   fi
16821 
16822     if test -d "$VS100BASE"; then
16823       if test -f "$VS100BASE/$VCVARSFILE"; then
16824         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16825 $as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16826         VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16827       else
16828         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16829 $as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16830         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16831 $as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16832       fi
16833     fi
16834   fi
16835 
16836 
16837   if test "x$VS_ENV_CMD" != x; then
16838     # We have found a Visual Studio environment on disk, let's extract variables from the vsvars bat file.
16839 
16840   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16841 
16842   # First separate the path from the arguments. This will split at the first
16843   # space.
16844   complete="$VS_ENV_CMD"
16845   path="${complete%% *}"
16846   tmp="$complete EOL"
16847   arguments="${tmp#* }"
16848 
16849   # Input might be given as Windows format, start by converting to
16850   # unix format.
16851   new_path=`$CYGPATH -u "$path"`
16852 
16853   # Now try to locate executable using which
16854   new_path=`$WHICH "$new_path" 2> /dev/null`
16855   # bat and cmd files are not always considered executable in cygwin causing which
16856   # to not find them
16857   if test "x$new_path" = x \
16858            && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16859            && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16860     new_path=`$CYGPATH -u "$path"`
16861   fi
16862   if test "x$new_path" = x; then
16863     # Oops. Which didn't find the executable.
16864     # The splitting of arguments from the executable at a space might have been incorrect,
16865     # since paths with space are more likely in Windows. Give it another try with the whole
16866     # argument.
16867     path="$complete"
16868     arguments="EOL"
16869     new_path=`$CYGPATH -u "$path"`
16870     new_path=`$WHICH "$new_path" 2> /dev/null`
16871     # bat and cmd files are not always considered executable in cygwin causing which
16872     # to not find them
16873     if test "x$new_path" = x \
16874              && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16875              && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16876       new_path=`$CYGPATH -u "$path"`
16877     fi
16878     if test "x$new_path" = x; then
16879       # It's still not found. Now this is an unrecoverable error.
16880       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
16881 $as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
16882       has_space=`$ECHO "$complete" | $GREP " "`
16883       if test "x$has_space" != x; then
16884         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16885 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16886       fi
16887       as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
16888     fi
16889   fi
16890 
16891   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16892   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16893   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16894   # "foo.exe" is OK but "foo" is an error.
16895   #
16896   # This test is therefore slightly more accurate than "test -f" to check for file precense.
16897   # It is also a way to make sure we got the proper file name for the real test later on.
16898   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16899   if test "x$test_shortpath" = x; then
16900     # Short path failed, file does not exist as specified.
16901     # Try adding .exe or .cmd
16902     if test -f "${new_path}.exe"; then
16903        input_to_shortpath="${new_path}.exe"
16904     elif test -f "${new_path}.cmd"; then
16905        input_to_shortpath="${new_path}.cmd"
16906     else
16907       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&5
16908 $as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&6;}
16909       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
16910 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
16911       as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
16912     fi
16913   else
16914     input_to_shortpath="$new_path"
16915   fi
16916 
16917   # Call helper function which possibly converts this using DOS-style short mode.
16918   # If so, the updated path is stored in $new_path.
16919   new_path="$input_to_shortpath"
16920 
16921   input_path="$input_to_shortpath"
16922   # Check if we need to convert this using DOS-style short mode. If the path
16923   # contains just simple characters, use it. Otherwise (spaces, weird characters),
16924   # take no chances and rewrite it.
16925   # Note: m4 eats our [], so we need to use [ and ] instead.
16926   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16927   if test "x$has_forbidden_chars" != x; then
16928     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16929     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16930     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16931     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16932       # Going to short mode and back again did indeed matter. Since short mode is
16933       # case insensitive, let's make it lowercase to improve readability.
16934       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16935       # Now convert it back to Unix-stile (cygpath)
16936       input_path=`$CYGPATH -u "$shortmode_path"`
16937       new_path="$input_path"
16938     fi
16939   fi
16940 
16941   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16942   if test "x$test_cygdrive_prefix" = x; then
16943     # As a simple fix, exclude /usr/bin since it's not a real path.
16944     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
16945       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16946       # a path prefixed by /cygdrive for fixpath to work.
16947       new_path="$CYGWIN_ROOT_PATH$input_path"
16948     fi
16949   fi
16950 
16951   # remove trailing .exe if any
16952   new_path="${new_path/%.exe/}"
16953 
16954   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16955 
16956   # First separate the path from the arguments. This will split at the first
16957   # space.
16958   complete="$VS_ENV_CMD"
16959   path="${complete%% *}"
16960   tmp="$complete EOL"
16961   arguments="${tmp#* }"
16962 
16963   # Input might be given as Windows format, start by converting to
16964   # unix format.
16965   new_path="$path"
16966 
16967   windows_path="$new_path"
16968   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16969     unix_path=`$CYGPATH -u "$windows_path"`
16970     new_path="$unix_path"
16971   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16972     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16973     new_path="$unix_path"
16974   fi
16975 
16976 
16977   # Now try to locate executable using which
16978   new_path=`$WHICH "$new_path" 2> /dev/null`
16979 
16980   if test "x$new_path" = x; then
16981     # Oops. Which didn't find the executable.
16982     # The splitting of arguments from the executable at a space might have been incorrect,
16983     # since paths with space are more likely in Windows. Give it another try with the whole
16984     # argument.
16985     path="$complete"
16986     arguments="EOL"
16987     new_path="$path"
16988 
16989   windows_path="$new_path"
16990   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16991     unix_path=`$CYGPATH -u "$windows_path"`
16992     new_path="$unix_path"
16993   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16994     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16995     new_path="$unix_path"
16996   fi
16997 
16998 
16999     new_path=`$WHICH "$new_path" 2> /dev/null`
17000 
17001     if test "x$new_path" = x; then
17002       # It's still not found. Now this is an unrecoverable error.
17003       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
17004 $as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
17005       has_space=`$ECHO "$complete" | $GREP " "`
17006       if test "x$has_space" != x; then
17007         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17008 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17009       fi
17010       as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
17011     fi
17012   fi
17013 
17014   # Now new_path has a complete unix path to the binary
17015   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
17016     # Keep paths in /bin as-is, but remove trailing .exe if any
17017     new_path="${new_path/%.exe/}"
17018     # Do not save /bin paths to all_fixpath_prefixes!
17019   else
17020     # Not in mixed or Windows style, start by that.
17021     new_path=`cmd //c echo $new_path`
17022 
17023   input_path="$new_path"
17024   # Check if we need to convert this using DOS-style short mode. If the path
17025   # contains just simple characters, use it. Otherwise (spaces, weird characters),
17026   # take no chances and rewrite it.
17027   # Note: m4 eats our [], so we need to use [ and ] instead.
17028   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17029   if test "x$has_forbidden_chars" != x; then
17030     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17031     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17032   fi
17033 
17034     # Output is in $new_path
17035 
17036   windows_path="$new_path"
17037   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17038     unix_path=`$CYGPATH -u "$windows_path"`
17039     new_path="$unix_path"
17040   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17041     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17042     new_path="$unix_path"
17043   fi
17044 
17045     # remove trailing .exe if any
17046     new_path="${new_path/%.exe/}"
17047 
17048     # Save the first 10 bytes of this path to the storage, so fixpath can work.
17049     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17050   fi
17051 
17052   else
17053     # We're on a posix platform. Hooray! :)
17054     # First separate the path from the arguments. This will split at the first
17055     # space.
17056     complete="$VS_ENV_CMD"
17057     path="${complete%% *}"
17058     tmp="$complete EOL"
17059     arguments="${tmp#* }"
17060 
17061     # Cannot rely on the command "which" here since it doesn't always work.
17062     is_absolute_path=`$ECHO "$path" | $GREP ^/`
17063     if test -z "$is_absolute_path"; then
17064       # Path to executable is not absolute. Find it.
17065       IFS_save="$IFS"
17066       IFS=:
17067       for p in $PATH; do
17068         if test -f "$p/$path" && test -x "$p/$path"; then
17069           new_path="$p/$path"
17070           break
17071         fi
17072       done
17073       IFS="$IFS_save"
17074     else
17075       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving VS_ENV_CMD (as $path) failed, using $path directly." >&5
17076 $as_echo "$as_me: Resolving VS_ENV_CMD (as $path) failed, using $path directly." >&6;}
17077       new_path="$path"
17078     fi
17079 
17080     if test "x$new_path" = x; then
17081         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
17082 $as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
17083         has_space=`$ECHO "$complete" | $GREP " "`
17084         if test "x$has_space" != x; then
17085           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
17086 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
17087         fi
17088         as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
17089       fi
17090   fi
17091 
17092       # Now join together the path and the arguments once again
17093       if test "x$arguments" != xEOL; then
17094         new_complete="$new_path ${arguments% *}"
17095       else
17096         new_complete="$new_path"
17097       fi
17098 
17099   if test "x$complete" != "x$new_complete"; then
17100       VS_ENV_CMD="$new_complete"
17101       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting VS_ENV_CMD to \"$new_complete\"" >&5
17102 $as_echo "$as_me: Rewriting VS_ENV_CMD to \"$new_complete\"" >&6;}
17103     fi
17104 
17105 
17106     # Lets extract the variables that are set by vcvarsall.bat/vsvars32.bat/vsvars64.bat
17107     { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to extract Visual Studio environment variables" >&5
17108 $as_echo "$as_me: Trying to extract Visual Studio environment variables" >&6;}
17109     cd $OUTPUT_ROOT
17110     # FIXME: The code betweeen ---- was inlined from a separate script and is not properly adapted
17111     # to autoconf standards.
17112 
17113     #----
17114 
17115     # Cannot use the VS10 setup script directly (since it only updates the DOS subshell environment)
17116     # but calculate the difference in Cygwin environment before/after running it and then
17117     # apply the diff.
17118 
17119     if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
17120       _vs10varsall=`cygpath -a -m -s "$VS_ENV_CMD"`
17121       _dosvs10varsall=`cygpath -a -w -s $_vs10varsall`
17122       _dosbash=`cygpath -a -w -s \`which bash\`.*`
17123     else
17124       _dosvs10varsall=`cmd //c echo $VS_ENV_CMD`
17125       _dosbash=`cmd //c echo \`which bash\``
17126     fi
17127 
17128     # generate the set of exported vars before/after the vs10 setup
17129     $ECHO "@echo off"                                           >  localdevenvtmp.bat
17130     $ECHO "$_dosbash -c \"export -p\" > localdevenvtmp.export0" >> localdevenvtmp.bat
17131     $ECHO "call $_dosvs10varsall $VS_ENV_ARGS"                  >> localdevenvtmp.bat
17132     $ECHO "$_dosbash -c \"export -p\" > localdevenvtmp.export1" >> localdevenvtmp.bat
17133 
17134     # Now execute the newly created bat file.
17135     # The | cat is to stop SetEnv.Cmd to mess with system colors on msys
17136     cmd /c localdevenvtmp.bat | cat
17137 
17138     # apply the diff (less some non-vs10 vars named by "!")
17139     $SORT localdevenvtmp.export0 | $GREP -v "!" > localdevenvtmp.export0.sort
17140     $SORT localdevenvtmp.export1 | $GREP -v "!" > localdevenvtmp.export1.sort
17141     $COMM -1 -3 localdevenvtmp.export0.sort localdevenvtmp.export1.sort > localdevenv.sh
17142 
17143     # cleanup
17144     $RM localdevenvtmp*
17145     #----
17146     cd $CURDIR
17147     if test ! -s $OUTPUT_ROOT/localdevenv.sh; then
17148       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17149 $as_echo "no" >&6; }
17150       { $as_echo "$as_me:${as_lineno-$LINENO}: Could not succesfully extract the envionment variables needed for the VS setup." >&5
17151 $as_echo "$as_me: Could not succesfully extract the envionment variables needed for the VS setup." >&6;}
17152       { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
17153 $as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
17154       { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
17155 $as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
17156       as_fn_error $? "Cannot continue" "$LINENO" 5
17157     fi
17158 
17159     # Now set all paths and other env variables. This will allow the rest of
17160     # the configure script to find and run the compiler in the proper way.
17161     { $as_echo "$as_me:${as_lineno-$LINENO}: Setting extracted environment variables" >&5
17162 $as_echo "$as_me: Setting extracted environment variables" >&6;}
17163     . $OUTPUT_ROOT/localdevenv.sh
17164   else
17165     # We did not find a vsvars bat file, let's hope we are run from a VS command prompt.
17166     { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio installation, checking current environment" >&5
17167 $as_echo "$as_me: Cannot locate a valid Visual Studio installation, checking current environment" >&6;}
17168   fi
17169 
17170   # At this point, we should have corrent variables in the environment, or we can't continue.
17171   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Visual Studio variables" >&5
17172 $as_echo_n "checking for Visual Studio variables... " >&6; }
17173 
17174   if test "x$VCINSTALLDIR" != x || test "x$WindowsSDKDir" != x || test "x$WINDOWSSDKDIR" != x; then
17175     if test "x$INCLUDE" = x || test "x$LIB" = x; then
17176       { $as_echo "$as_me:${as_lineno-$LINENO}: result: present but broken" >&5
17177 $as_echo "present but broken" >&6; }
17178       as_fn_error $? "Your VC command prompt seems broken, INCLUDE and/or LIB is missing." "$LINENO" 5
17179     else
17180       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
17181 $as_echo "ok" >&6; }
17182       # Remove any trailing \ from INCLUDE and LIB to avoid trouble in spec.gmk.
17183       VS_INCLUDE=`$ECHO "$INCLUDE" | $SED 's/\\\\$//'`
17184       VS_LIB=`$ECHO "$LIB" | $SED 's/\\\\$//'`
17185       VS_PATH="$PATH"
17186 
17187 
17188 
17189     fi
17190   else
17191     { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
17192 $as_echo "not found" >&6; }
17193 
17194     if test "x$VS_ENV_CMD" = x; then
17195       { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&5
17196 $as_echo "$as_me: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&6;}
17197       { $as_echo "$as_me:${as_lineno-$LINENO}: nor is this script run from a Visual Studio command prompt." >&5
17198 $as_echo "$as_me: nor is this script run from a Visual Studio command prompt." >&6;}
17199     else
17200       { $as_echo "$as_me:${as_lineno-$LINENO}: Running the extraction script failed." >&5
17201 $as_echo "$as_me: Running the extraction script failed." >&6;}
17202     fi
17203     { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
17204 $as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
17205     { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
17206 $as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
17207     as_fn_error $? "Cannot continue" "$LINENO" 5
17208   fi
17209 
17210   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
17211 $as_echo_n "checking for msvcr100.dll... " >&6; }
17212 
17213 # Check whether --with-msvcr-dll was given.
17214 if test "${with_msvcr_dll+set}" = set; then :
17215   withval=$with_msvcr_dll;
17216 fi
17217 
17218   if test "x$with_msvcr_dll" != x; then
17219     MSVCR_DLL="$with_msvcr_dll"
17220   else
17221     if test "x$VCINSTALLDIR" != x; then
17222       if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
17223         MSVCR_DLL=`find "$VCINSTALLDIR" -name msvcr100.dll | grep x64 | head --lines 1`
17224       else
17225         MSVCR_DLL=`find "$VCINSTALLDIR" -name msvcr100.dll | grep x86 | grep -v ia64 | grep -v x64 | head --lines 1`
17226         if test "x$MSVCR_DLL" = x; then
17227           MSVCR_DLL=`find "$VCINSTALLDIR" -name msvcr100.dll | head --lines 1`
17228         fi
17229       fi
17230       if test "x$MSVCR_DLL" != x; then
17231         { $as_echo "$as_me:${as_lineno-$LINENO}: msvcr100.dll found in VCINSTALLDIR: $VCINSTALLDIR" >&5
17232 $as_echo "$as_me: msvcr100.dll found in VCINSTALLDIR: $VCINSTALLDIR" >&6;}
17233       else
17234         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: msvcr100.dll not found in VCINSTALLDIR: $VCINSTALLDIR" >&5
17235 $as_echo "$as_me: Warning: msvcr100.dll not found in VCINSTALLDIR: $VCINSTALLDIR" >&6;}
17236       fi
17237     fi
17238     if test "x$MSVCR_DLL" = x; then
17239       if test -f "$SYSTEMROOT/system32/msvcr100.dll"; then
17240         { $as_echo "$as_me:${as_lineno-$LINENO}: msvcr100.dll found in $SYSTEMROOT/system32" >&5
17241 $as_echo "$as_me: msvcr100.dll found in $SYSTEMROOT/system32" >&6;}
17242         MSVCR_DLL="$SYSTEMROOT/system32/msvcr100.dll"
17243       fi
17244     fi
17245   fi
17246   if test "x$MSVCR_DLL" = x; then
17247     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17248 $as_echo "no" >&6; }
17249     as_fn_error $? "Could not find msvcr100.dll !" "$LINENO" 5
17250   fi
17251   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
17252 $as_echo "$MSVCR_DLL" >&6; }
17253 
17254   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17255 
17256   # Input might be given as Windows format, start by converting to
17257   # unix format.
17258   path="$MSVCR_DLL"
17259   new_path=`$CYGPATH -u "$path"`
17260 
17261   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17262   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17263   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17264   # "foo.exe" is OK but "foo" is an error.
17265   #
17266   # This test is therefore slightly more accurate than "test -f" to check for file precense.
17267   # It is also a way to make sure we got the proper file name for the real test later on.
17268   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17269   if test "x$test_shortpath" = x; then
17270     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&5
17271 $as_echo "$as_me: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&6;}
17272     as_fn_error $? "Cannot locate the the path of MSVCR_DLL" "$LINENO" 5
17273   fi
17274 
17275   # Call helper function which possibly converts this using DOS-style short mode.
17276   # If so, the updated path is stored in $new_path.
17277 
17278   input_path="$new_path"
17279   # Check if we need to convert this using DOS-style short mode. If the path
17280   # contains just simple characters, use it. Otherwise (spaces, weird characters),
17281   # take no chances and rewrite it.
17282   # Note: m4 eats our [], so we need to use [ and ] instead.
17283   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17284   if test "x$has_forbidden_chars" != x; then
17285     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17286     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17287     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17288     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17289       # Going to short mode and back again did indeed matter. Since short mode is
17290       # case insensitive, let's make it lowercase to improve readability.
17291       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17292       # Now convert it back to Unix-stile (cygpath)
17293       input_path=`$CYGPATH -u "$shortmode_path"`
17294       new_path="$input_path"
17295     fi
17296   fi
17297 
17298   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17299   if test "x$test_cygdrive_prefix" = x; then
17300     # As a simple fix, exclude /usr/bin since it's not a real path.
17301     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
17302       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17303       # a path prefixed by /cygdrive for fixpath to work.
17304       new_path="$CYGWIN_ROOT_PATH$input_path"
17305     fi
17306   fi
17307 
17308 
17309   if test "x$path" != "x$new_path"; then
17310     MSVCR_DLL="$new_path"
17311     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVCR_DLL to \"$new_path\"" >&5
17312 $as_echo "$as_me: Rewriting MSVCR_DLL to \"$new_path\"" >&6;}
17313   fi
17314 
17315   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17316 
17317   path="$MSVCR_DLL"
17318   has_colon=`$ECHO $path | $GREP ^.:`
17319   new_path="$path"
17320   if test "x$has_colon" = x; then
17321     # Not in mixed or Windows style, start by that.
17322     new_path=`cmd //c echo $path`
17323   fi
17324 
17325 
17326   input_path="$new_path"
17327   # Check if we need to convert this using DOS-style short mode. If the path
17328   # contains just simple characters, use it. Otherwise (spaces, weird characters),
17329   # take no chances and rewrite it.
17330   # Note: m4 eats our [], so we need to use [ and ] instead.
17331   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17332   if test "x$has_forbidden_chars" != x; then
17333     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17334     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17335   fi
17336 
17337 
17338   windows_path="$new_path"
17339   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17340     unix_path=`$CYGPATH -u "$windows_path"`
17341     new_path="$unix_path"
17342   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17343     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17344     new_path="$unix_path"
17345   fi
17346 
17347   if test "x$path" != "x$new_path"; then
17348     MSVCR_DLL="$new_path"
17349     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVCR_DLL to \"$new_path\"" >&5
17350 $as_echo "$as_me: Rewriting MSVCR_DLL to \"$new_path\"" >&6;}
17351   fi
17352 
17353   # Save the first 10 bytes of this path to the storage, so fixpath can work.
17354   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17355 
17356   else
17357     # We're on a posix platform. Hooray! :)
17358     path="$MSVCR_DLL"
17359     has_space=`$ECHO "$path" | $GREP " "`
17360     if test "x$has_space" != x; then
17361       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&5
17362 $as_echo "$as_me: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&6;}
17363       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
17364     fi
17365 
17366     # Use eval to expand a potential ~
17367     eval path="$path"
17368     if test ! -f "$path" && test ! -d "$path"; then
17369       as_fn_error $? "The path of MSVCR_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
17370     fi
17371 
17372     MSVCR_DLL="`cd "$path"; $THEPWDCMD -L`"
17373   fi
17374 
17375 
17376 
17377 
17378 # Check whether --with-dxsdk was given.
17379 if test "${with_dxsdk+set}" = set; then :
17380   withval=$with_dxsdk;
17381 fi
17382 
17383 
17384 # Check whether --with-dxsdk-lib was given.
17385 if test "${with_dxsdk_lib+set}" = set; then :
17386   withval=$with_dxsdk_lib;
17387 fi
17388 
17389 
17390 # Check whether --with-dxsdk-include was given.
17391 if test "${with_dxsdk_include+set}" = set; then :
17392   withval=$with_dxsdk_include;
17393 fi
17394 
17395 
17396   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DirectX SDK" >&5
17397 $as_echo_n "checking for DirectX SDK... " >&6; }
17398 
17399   if test "x$with_dxsdk" != x; then
17400     dxsdk_path="$with_dxsdk"
17401   elif test "x$DXSDK_DIR" != x; then
17402     dxsdk_path="$DXSDK_DIR"
17403   elif test -d "C:/DXSDK"; then
17404     dxsdk_path="C:/DXSDK"
17405   else
17406     as_fn_error $? "Could not find the DirectX SDK" "$LINENO" 5
17407   fi
17408   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $dxsdk_path" >&5
17409 $as_echo "$dxsdk_path" >&6; }
17410 
17411   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17412 
17413   # Input might be given as Windows format, start by converting to
17414   # unix format.
17415   path="$dxsdk_path"
17416   new_path=`$CYGPATH -u "$path"`
17417 
17418   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17419   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17420   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17421   # "foo.exe" is OK but "foo" is an error.
17422   #
17423   # This test is therefore slightly more accurate than "test -f" to check for file precense.
17424   # It is also a way to make sure we got the proper file name for the real test later on.
17425   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17426   if test "x$test_shortpath" = x; then
17427     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of dxsdk_path, which resolves as \"$path\", is invalid." >&5
17428 $as_echo "$as_me: The path of dxsdk_path, which resolves as \"$path\", is invalid." >&6;}
17429     as_fn_error $? "Cannot locate the the path of dxsdk_path" "$LINENO" 5
17430   fi
17431 
17432   # Call helper function which possibly converts this using DOS-style short mode.
17433   # If so, the updated path is stored in $new_path.
17434 
17435   input_path="$new_path"
17436   # Check if we need to convert this using DOS-style short mode. If the path
17437   # contains just simple characters, use it. Otherwise (spaces, weird characters),
17438   # take no chances and rewrite it.
17439   # Note: m4 eats our [], so we need to use [ and ] instead.
17440   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17441   if test "x$has_forbidden_chars" != x; then
17442     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17443     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17444     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17445     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17446       # Going to short mode and back again did indeed matter. Since short mode is
17447       # case insensitive, let's make it lowercase to improve readability.
17448       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17449       # Now convert it back to Unix-stile (cygpath)
17450       input_path=`$CYGPATH -u "$shortmode_path"`
17451       new_path="$input_path"
17452     fi
17453   fi
17454 
17455   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17456   if test "x$test_cygdrive_prefix" = x; then
17457     # As a simple fix, exclude /usr/bin since it's not a real path.
17458     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
17459       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17460       # a path prefixed by /cygdrive for fixpath to work.
17461       new_path="$CYGWIN_ROOT_PATH$input_path"
17462     fi
17463   fi
17464 
17465 
17466   if test "x$path" != "x$new_path"; then
17467     dxsdk_path="$new_path"
17468     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting dxsdk_path to \"$new_path\"" >&5
17469 $as_echo "$as_me: Rewriting dxsdk_path to \"$new_path\"" >&6;}
17470   fi
17471 
17472   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17473 
17474   path="$dxsdk_path"
17475   has_colon=`$ECHO $path | $GREP ^.:`
17476   new_path="$path"
17477   if test "x$has_colon" = x; then
17478     # Not in mixed or Windows style, start by that.
17479     new_path=`cmd //c echo $path`
17480   fi
17481 
17482 
17483   input_path="$new_path"
17484   # Check if we need to convert this using DOS-style short mode. If the path
17485   # contains just simple characters, use it. Otherwise (spaces, weird characters),
17486   # take no chances and rewrite it.
17487   # Note: m4 eats our [], so we need to use [ and ] instead.
17488   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17489   if test "x$has_forbidden_chars" != x; then
17490     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17491     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17492   fi
17493 
17494 
17495   windows_path="$new_path"
17496   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17497     unix_path=`$CYGPATH -u "$windows_path"`
17498     new_path="$unix_path"
17499   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17500     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17501     new_path="$unix_path"
17502   fi
17503 
17504   if test "x$path" != "x$new_path"; then
17505     dxsdk_path="$new_path"
17506     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting dxsdk_path to \"$new_path\"" >&5
17507 $as_echo "$as_me: Rewriting dxsdk_path to \"$new_path\"" >&6;}
17508   fi
17509 
17510   # Save the first 10 bytes of this path to the storage, so fixpath can work.
17511   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17512 
17513   else
17514     # We're on a posix platform. Hooray! :)
17515     path="$dxsdk_path"
17516     has_space=`$ECHO "$path" | $GREP " "`
17517     if test "x$has_space" != x; then
17518       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of dxsdk_path, which resolves as \"$path\", is invalid." >&5
17519 $as_echo "$as_me: The path of dxsdk_path, which resolves as \"$path\", is invalid." >&6;}
17520       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
17521     fi
17522 
17523     # Use eval to expand a potential ~
17524     eval path="$path"
17525     if test ! -f "$path" && test ! -d "$path"; then
17526       as_fn_error $? "The path of dxsdk_path, which resolves as \"$path\", is not found." "$LINENO" 5
17527     fi
17528 
17529     dxsdk_path="`cd "$path"; $THEPWDCMD -L`"
17530   fi
17531 
17532 
17533   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DirectX SDK lib dir" >&5
17534 $as_echo_n "checking for DirectX SDK lib dir... " >&6; }
17535   if test "x$with_dxsdk_lib" != x; then
17536     DXSDK_LIB_PATH="$with_dxsdk_lib"
17537   elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
17538     DXSDK_LIB_PATH="$dxsdk_path/Lib/x64"
17539   else
17540     DXSDK_LIB_PATH="$dxsdk_path/Lib"
17541   fi
17542   # dsound.lib is linked to in jsoundds
17543   if test ! -f "$DXSDK_LIB_PATH/dsound.lib"; then
17544     as_fn_error $? "Invalid DirectX SDK lib dir" "$LINENO" 5
17545   fi
17546   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DXSDK_LIB_PATH" >&5
17547 $as_echo "$DXSDK_LIB_PATH" >&6; }
17548 
17549   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17550 
17551   # Input might be given as Windows format, start by converting to
17552   # unix format.
17553   path="$DXSDK_LIB_PATH"
17554   new_path=`$CYGPATH -u "$path"`
17555 
17556   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17557   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17558   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17559   # "foo.exe" is OK but "foo" is an error.
17560   #
17561   # This test is therefore slightly more accurate than "test -f" to check for file precense.
17562   # It is also a way to make sure we got the proper file name for the real test later on.
17563   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17564   if test "x$test_shortpath" = x; then
17565     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DXSDK_LIB_PATH, which resolves as \"$path\", is invalid." >&5
17566 $as_echo "$as_me: The path of DXSDK_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
17567     as_fn_error $? "Cannot locate the the path of DXSDK_LIB_PATH" "$LINENO" 5
17568   fi
17569 
17570   # Call helper function which possibly converts this using DOS-style short mode.
17571   # If so, the updated path is stored in $new_path.
17572 
17573   input_path="$new_path"
17574   # Check if we need to convert this using DOS-style short mode. If the path
17575   # contains just simple characters, use it. Otherwise (spaces, weird characters),
17576   # take no chances and rewrite it.
17577   # Note: m4 eats our [], so we need to use [ and ] instead.
17578   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17579   if test "x$has_forbidden_chars" != x; then
17580     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17581     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17582     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17583     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17584       # Going to short mode and back again did indeed matter. Since short mode is
17585       # case insensitive, let's make it lowercase to improve readability.
17586       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17587       # Now convert it back to Unix-stile (cygpath)
17588       input_path=`$CYGPATH -u "$shortmode_path"`
17589       new_path="$input_path"
17590     fi
17591   fi
17592 
17593   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17594   if test "x$test_cygdrive_prefix" = x; then
17595     # As a simple fix, exclude /usr/bin since it's not a real path.
17596     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
17597       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17598       # a path prefixed by /cygdrive for fixpath to work.
17599       new_path="$CYGWIN_ROOT_PATH$input_path"
17600     fi
17601   fi
17602 
17603 
17604   if test "x$path" != "x$new_path"; then
17605     DXSDK_LIB_PATH="$new_path"
17606     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DXSDK_LIB_PATH to \"$new_path\"" >&5
17607 $as_echo "$as_me: Rewriting DXSDK_LIB_PATH to \"$new_path\"" >&6;}
17608   fi
17609 
17610   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17611 
17612   path="$DXSDK_LIB_PATH"
17613   has_colon=`$ECHO $path | $GREP ^.:`
17614   new_path="$path"
17615   if test "x$has_colon" = x; then
17616     # Not in mixed or Windows style, start by that.
17617     new_path=`cmd //c echo $path`
17618   fi
17619 
17620 
17621   input_path="$new_path"
17622   # Check if we need to convert this using DOS-style short mode. If the path
17623   # contains just simple characters, use it. Otherwise (spaces, weird characters),
17624   # take no chances and rewrite it.
17625   # Note: m4 eats our [], so we need to use [ and ] instead.
17626   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17627   if test "x$has_forbidden_chars" != x; then
17628     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17629     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17630   fi
17631 
17632 
17633   windows_path="$new_path"
17634   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17635     unix_path=`$CYGPATH -u "$windows_path"`
17636     new_path="$unix_path"
17637   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17638     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17639     new_path="$unix_path"
17640   fi
17641 
17642   if test "x$path" != "x$new_path"; then
17643     DXSDK_LIB_PATH="$new_path"
17644     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DXSDK_LIB_PATH to \"$new_path\"" >&5
17645 $as_echo "$as_me: Rewriting DXSDK_LIB_PATH to \"$new_path\"" >&6;}
17646   fi
17647 
17648   # Save the first 10 bytes of this path to the storage, so fixpath can work.
17649   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17650 
17651   else
17652     # We're on a posix platform. Hooray! :)
17653     path="$DXSDK_LIB_PATH"
17654     has_space=`$ECHO "$path" | $GREP " "`
17655     if test "x$has_space" != x; then
17656       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DXSDK_LIB_PATH, which resolves as \"$path\", is invalid." >&5
17657 $as_echo "$as_me: The path of DXSDK_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
17658       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
17659     fi
17660 
17661     # Use eval to expand a potential ~
17662     eval path="$path"
17663     if test ! -f "$path" && test ! -d "$path"; then
17664       as_fn_error $? "The path of DXSDK_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
17665     fi
17666 
17667     DXSDK_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
17668   fi
17669 
17670 
17671   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DirectX SDK include dir" >&5
17672 $as_echo_n "checking for DirectX SDK include dir... " >&6; }
17673   if test "x$with_dxsdk_include" != x; then
17674     DXSDK_INCLUDE_PATH="$with_dxsdk_include"
17675   else
17676     DXSDK_INCLUDE_PATH="$dxsdk_path/Include"
17677   fi
17678   # dsound.h is included in jsoundds
17679   if test ! -f "$DXSDK_INCLUDE_PATH/dsound.h"; then
17680     as_fn_error $? "Invalid DirectX SDK lib dir" "$LINENO" 5
17681   fi
17682   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DXSDK_INCLUDE_PATH" >&5
17683 $as_echo "$DXSDK_INCLUDE_PATH" >&6; }
17684 
17685   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17686 
17687   # Input might be given as Windows format, start by converting to
17688   # unix format.
17689   path="$DXSDK_INCLUDE_PATH"
17690   new_path=`$CYGPATH -u "$path"`
17691 
17692   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17693   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17694   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17695   # "foo.exe" is OK but "foo" is an error.
17696   #
17697   # This test is therefore slightly more accurate than "test -f" to check for file precense.
17698   # It is also a way to make sure we got the proper file name for the real test later on.
17699   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17700   if test "x$test_shortpath" = x; then
17701     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DXSDK_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
17702 $as_echo "$as_me: The path of DXSDK_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
17703     as_fn_error $? "Cannot locate the the path of DXSDK_INCLUDE_PATH" "$LINENO" 5
17704   fi
17705 
17706   # Call helper function which possibly converts this using DOS-style short mode.
17707   # If so, the updated path is stored in $new_path.
17708 
17709   input_path="$new_path"
17710   # Check if we need to convert this using DOS-style short mode. If the path
17711   # contains just simple characters, use it. Otherwise (spaces, weird characters),
17712   # take no chances and rewrite it.
17713   # Note: m4 eats our [], so we need to use [ and ] instead.
17714   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17715   if test "x$has_forbidden_chars" != x; then
17716     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17717     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17718     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17719     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17720       # Going to short mode and back again did indeed matter. Since short mode is
17721       # case insensitive, let's make it lowercase to improve readability.
17722       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17723       # Now convert it back to Unix-stile (cygpath)
17724       input_path=`$CYGPATH -u "$shortmode_path"`
17725       new_path="$input_path"
17726     fi
17727   fi
17728 
17729   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17730   if test "x$test_cygdrive_prefix" = x; then
17731     # As a simple fix, exclude /usr/bin since it's not a real path.
17732     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
17733       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17734       # a path prefixed by /cygdrive for fixpath to work.
17735       new_path="$CYGWIN_ROOT_PATH$input_path"
17736     fi
17737   fi
17738 
17739 
17740   if test "x$path" != "x$new_path"; then
17741     DXSDK_INCLUDE_PATH="$new_path"
17742     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DXSDK_INCLUDE_PATH to \"$new_path\"" >&5
17743 $as_echo "$as_me: Rewriting DXSDK_INCLUDE_PATH to \"$new_path\"" >&6;}
17744   fi
17745 
17746   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17747 
17748   path="$DXSDK_INCLUDE_PATH"
17749   has_colon=`$ECHO $path | $GREP ^.:`
17750   new_path="$path"
17751   if test "x$has_colon" = x; then
17752     # Not in mixed or Windows style, start by that.
17753     new_path=`cmd //c echo $path`
17754   fi
17755 
17756 
17757   input_path="$new_path"
17758   # Check if we need to convert this using DOS-style short mode. If the path
17759   # contains just simple characters, use it. Otherwise (spaces, weird characters),
17760   # take no chances and rewrite it.
17761   # Note: m4 eats our [], so we need to use [ and ] instead.
17762   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17763   if test "x$has_forbidden_chars" != x; then
17764     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17765     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17766   fi
17767 
17768 
17769   windows_path="$new_path"
17770   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17771     unix_path=`$CYGPATH -u "$windows_path"`
17772     new_path="$unix_path"
17773   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17774     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17775     new_path="$unix_path"
17776   fi
17777 
17778   if test "x$path" != "x$new_path"; then
17779     DXSDK_INCLUDE_PATH="$new_path"
17780     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DXSDK_INCLUDE_PATH to \"$new_path\"" >&5
17781 $as_echo "$as_me: Rewriting DXSDK_INCLUDE_PATH to \"$new_path\"" >&6;}
17782   fi
17783 
17784   # Save the first 10 bytes of this path to the storage, so fixpath can work.
17785   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17786 
17787   else
17788     # We're on a posix platform. Hooray! :)
17789     path="$DXSDK_INCLUDE_PATH"
17790     has_space=`$ECHO "$path" | $GREP " "`
17791     if test "x$has_space" != x; then
17792       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DXSDK_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
17793 $as_echo "$as_me: The path of DXSDK_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
17794       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
17795     fi
17796 
17797     # Use eval to expand a potential ~
17798     eval path="$path"
17799     if test ! -f "$path" && test ! -d "$path"; then
17800       as_fn_error $? "The path of DXSDK_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
17801     fi
17802 
17803     DXSDK_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
17804   fi
17805 
17806 
17807 
17808 
17809   LDFLAGS_JDK="$LDFLAGS_JDK -libpath:$DXSDK_LIB_PATH"
17810 
17811 fi
17812 
17813 
17814 
17815 # If --build AND --host is set, then the configure script will find any
17816 # cross compilation tools in the PATH. Cross compilation tools
17817 # follows the cross compilation standard where they are prefixed with ${host}.
17818 # For example the binary i686-sun-solaris2.10-gcc
17819 # will cross compile for i686-sun-solaris2.10
17820 # If neither of build and host is not set, then build=host and the
17821 # default compiler found in the path will be used.
17822 # Setting only --host, does not seem to be really supported.
17823 # Please set both --build and --host if you want to cross compile.
17824 
17825 if test "x$COMPILE_TYPE" = "xcross"; then
17826     # Now we to find a C/C++ compiler that can build executables for the build
17827     # platform. We can't use the AC_PROG_CC macro, since it can only be used
17828     # once. Also, we need to do this before adding a tools dir to the path,
17829     # otherwise we might pick up cross-compilers which don't use standard naming.
17830     # Otherwise, we'll set the BUILD_tools to the native tools, but that'll have
17831     # to wait until they are properly discovered.
17832     for ac_prog in cl cc gcc
17833 do
17834   # Extract the first word of "$ac_prog", so it can be a program name with args.
17835 set dummy $ac_prog; ac_word=$2
17836 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17837 $as_echo_n "checking for $ac_word... " >&6; }
17838 if test "${ac_cv_path_BUILD_CC+set}" = set; then :
17839   $as_echo_n "(cached) " >&6
17840 else
17841   case $BUILD_CC in
17842   [\\/]* | ?:[\\/]*)
17843   ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
17844   ;;
17845   *)
17846   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17847 for as_dir in $PATH
17848 do
17849   IFS=$as_save_IFS
17850   test -z "$as_dir" && as_dir=.
17851     for ac_exec_ext in '' $ac_executable_extensions; do
17852   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
17853     ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
17854     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17855     break 2
17856   fi
17857 done
17858   done
17859 IFS=$as_save_IFS
17860 
17861   ;;
17862 esac
17863 fi
17864 BUILD_CC=$ac_cv_path_BUILD_CC
17865 if test -n "$BUILD_CC"; then
17866   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
17867 $as_echo "$BUILD_CC" >&6; }
17868 else
17869   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17870 $as_echo "no" >&6; }
17871 fi
17872 
17873 
17874   test -n "$BUILD_CC" && break
17875 done
17876 
17877 
17878   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17879 
17880   # First separate the path from the arguments. This will split at the first
17881   # space.
17882   complete="$BUILD_CC"
17883   path="${complete%% *}"
17884   tmp="$complete EOL"
17885   arguments="${tmp#* }"
17886 
17887   # Input might be given as Windows format, start by converting to
17888   # unix format.
17889   new_path=`$CYGPATH -u "$path"`
17890 
17891   # Now try to locate executable using which
17892   new_path=`$WHICH "$new_path" 2> /dev/null`
17893   # bat and cmd files are not always considered executable in cygwin causing which
17894   # to not find them
17895   if test "x$new_path" = x \
17896            && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17897            && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17898     new_path=`$CYGPATH -u "$path"`
17899   fi
17900   if test "x$new_path" = x; then
17901     # Oops. Which didn't find the executable.
17902     # The splitting of arguments from the executable at a space might have been incorrect,
17903     # since paths with space are more likely in Windows. Give it another try with the whole
17904     # argument.
17905     path="$complete"
17906     arguments="EOL"
17907     new_path=`$CYGPATH -u "$path"`
17908     new_path=`$WHICH "$new_path" 2> /dev/null`
17909     # bat and cmd files are not always considered executable in cygwin causing which
17910     # to not find them
17911     if test "x$new_path" = x \
17912              && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17913              && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17914       new_path=`$CYGPATH -u "$path"`
17915     fi
17916     if test "x$new_path" = x; then
17917       # It's still not found. Now this is an unrecoverable error.
17918       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
17919 $as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
17920       has_space=`$ECHO "$complete" | $GREP " "`
17921       if test "x$has_space" != x; then
17922         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17923 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17924       fi
17925       as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
17926     fi
17927   fi
17928 
17929   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17930   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17931   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17932   # "foo.exe" is OK but "foo" is an error.
17933   #
17934   # This test is therefore slightly more accurate than "test -f" to check for file precense.
17935   # It is also a way to make sure we got the proper file name for the real test later on.
17936   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17937   if test "x$test_shortpath" = x; then
17938     # Short path failed, file does not exist as specified.
17939     # Try adding .exe or .cmd
17940     if test -f "${new_path}.exe"; then
17941        input_to_shortpath="${new_path}.exe"
17942     elif test -f "${new_path}.cmd"; then
17943        input_to_shortpath="${new_path}.cmd"
17944     else
17945       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&5
17946 $as_echo "$as_me: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&6;}
17947       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
17948 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
17949       as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
17950     fi
17951   else
17952     input_to_shortpath="$new_path"
17953   fi
17954 
17955   # Call helper function which possibly converts this using DOS-style short mode.
17956   # If so, the updated path is stored in $new_path.
17957   new_path="$input_to_shortpath"
17958 
17959   input_path="$input_to_shortpath"
17960   # Check if we need to convert this using DOS-style short mode. If the path
17961   # contains just simple characters, use it. Otherwise (spaces, weird characters),
17962   # take no chances and rewrite it.
17963   # Note: m4 eats our [], so we need to use [ and ] instead.
17964   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17965   if test "x$has_forbidden_chars" != x; then
17966     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17967     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17968     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17969     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17970       # Going to short mode and back again did indeed matter. Since short mode is
17971       # case insensitive, let's make it lowercase to improve readability.
17972       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17973       # Now convert it back to Unix-stile (cygpath)
17974       input_path=`$CYGPATH -u "$shortmode_path"`
17975       new_path="$input_path"
17976     fi
17977   fi
17978 
17979   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17980   if test "x$test_cygdrive_prefix" = x; then
17981     # As a simple fix, exclude /usr/bin since it's not a real path.
17982     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
17983       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17984       # a path prefixed by /cygdrive for fixpath to work.
17985       new_path="$CYGWIN_ROOT_PATH$input_path"
17986     fi
17987   fi
17988 
17989   # remove trailing .exe if any
17990   new_path="${new_path/%.exe/}"
17991 
17992   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17993 
17994   # First separate the path from the arguments. This will split at the first
17995   # space.
17996   complete="$BUILD_CC"
17997   path="${complete%% *}"
17998   tmp="$complete EOL"
17999   arguments="${tmp#* }"
18000 
18001   # Input might be given as Windows format, start by converting to
18002   # unix format.
18003   new_path="$path"
18004 
18005   windows_path="$new_path"
18006   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18007     unix_path=`$CYGPATH -u "$windows_path"`
18008     new_path="$unix_path"
18009   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18010     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18011     new_path="$unix_path"
18012   fi
18013 
18014 
18015   # Now try to locate executable using which
18016   new_path=`$WHICH "$new_path" 2> /dev/null`
18017 
18018   if test "x$new_path" = x; then
18019     # Oops. Which didn't find the executable.
18020     # The splitting of arguments from the executable at a space might have been incorrect,
18021     # since paths with space are more likely in Windows. Give it another try with the whole
18022     # argument.
18023     path="$complete"
18024     arguments="EOL"
18025     new_path="$path"
18026 
18027   windows_path="$new_path"
18028   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18029     unix_path=`$CYGPATH -u "$windows_path"`
18030     new_path="$unix_path"
18031   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18032     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18033     new_path="$unix_path"
18034   fi
18035 
18036 
18037     new_path=`$WHICH "$new_path" 2> /dev/null`
18038 
18039     if test "x$new_path" = x; then
18040       # It's still not found. Now this is an unrecoverable error.
18041       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
18042 $as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
18043       has_space=`$ECHO "$complete" | $GREP " "`
18044       if test "x$has_space" != x; then
18045         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18046 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18047       fi
18048       as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
18049     fi
18050   fi
18051 
18052   # Now new_path has a complete unix path to the binary
18053   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18054     # Keep paths in /bin as-is, but remove trailing .exe if any
18055     new_path="${new_path/%.exe/}"
18056     # Do not save /bin paths to all_fixpath_prefixes!
18057   else
18058     # Not in mixed or Windows style, start by that.
18059     new_path=`cmd //c echo $new_path`
18060 
18061   input_path="$new_path"
18062   # Check if we need to convert this using DOS-style short mode. If the path
18063   # contains just simple characters, use it. Otherwise (spaces, weird characters),
18064   # take no chances and rewrite it.
18065   # Note: m4 eats our [], so we need to use [ and ] instead.
18066   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18067   if test "x$has_forbidden_chars" != x; then
18068     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18069     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18070   fi
18071 
18072     # Output is in $new_path
18073 
18074   windows_path="$new_path"
18075   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18076     unix_path=`$CYGPATH -u "$windows_path"`
18077     new_path="$unix_path"
18078   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18079     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18080     new_path="$unix_path"
18081   fi
18082 
18083     # remove trailing .exe if any
18084     new_path="${new_path/%.exe/}"
18085 
18086     # Save the first 10 bytes of this path to the storage, so fixpath can work.
18087     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18088   fi
18089 
18090   else
18091     # We're on a posix platform. Hooray! :)
18092     # First separate the path from the arguments. This will split at the first
18093     # space.
18094     complete="$BUILD_CC"
18095     path="${complete%% *}"
18096     tmp="$complete EOL"
18097     arguments="${tmp#* }"
18098 
18099     # Cannot rely on the command "which" here since it doesn't always work.
18100     is_absolute_path=`$ECHO "$path" | $GREP ^/`
18101     if test -z "$is_absolute_path"; then
18102       # Path to executable is not absolute. Find it.
18103       IFS_save="$IFS"
18104       IFS=:
18105       for p in $PATH; do
18106         if test -f "$p/$path" && test -x "$p/$path"; then
18107           new_path="$p/$path"
18108           break
18109         fi
18110       done
18111       IFS="$IFS_save"
18112     else
18113       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving BUILD_CC (as $path) failed, using $path directly." >&5
18114 $as_echo "$as_me: Resolving BUILD_CC (as $path) failed, using $path directly." >&6;}
18115       new_path="$path"
18116     fi
18117 
18118     if test "x$new_path" = x; then
18119         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
18120 $as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
18121         has_space=`$ECHO "$complete" | $GREP " "`
18122         if test "x$has_space" != x; then
18123           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18124 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18125         fi
18126         as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
18127       fi
18128   fi
18129 
18130       # Now join together the path and the arguments once again
18131       if test "x$arguments" != xEOL; then
18132         new_complete="$new_path ${arguments% *}"
18133       else
18134         new_complete="$new_path"
18135       fi
18136 
18137   if test "x$complete" != "x$new_complete"; then
18138       BUILD_CC="$new_complete"
18139       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CC to \"$new_complete\"" >&5
18140 $as_echo "$as_me: Rewriting BUILD_CC to \"$new_complete\"" >&6;}
18141     fi
18142 
18143     for ac_prog in cl CC g++
18144 do
18145   # Extract the first word of "$ac_prog", so it can be a program name with args.
18146 set dummy $ac_prog; ac_word=$2
18147 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18148 $as_echo_n "checking for $ac_word... " >&6; }
18149 if test "${ac_cv_path_BUILD_CXX+set}" = set; then :
18150   $as_echo_n "(cached) " >&6
18151 else
18152   case $BUILD_CXX in
18153   [\\/]* | ?:[\\/]*)
18154   ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
18155   ;;
18156   *)
18157   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18158 for as_dir in $PATH
18159 do
18160   IFS=$as_save_IFS
18161   test -z "$as_dir" && as_dir=.
18162     for ac_exec_ext in '' $ac_executable_extensions; do
18163   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
18164     ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
18165     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18166     break 2
18167   fi
18168 done
18169   done
18170 IFS=$as_save_IFS
18171 
18172   ;;
18173 esac
18174 fi
18175 BUILD_CXX=$ac_cv_path_BUILD_CXX
18176 if test -n "$BUILD_CXX"; then
18177   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
18178 $as_echo "$BUILD_CXX" >&6; }
18179 else
18180   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18181 $as_echo "no" >&6; }
18182 fi
18183 
18184 
18185   test -n "$BUILD_CXX" && break
18186 done
18187 
18188 
18189   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18190 
18191   # First separate the path from the arguments. This will split at the first
18192   # space.
18193   complete="$BUILD_CXX"
18194   path="${complete%% *}"
18195   tmp="$complete EOL"
18196   arguments="${tmp#* }"
18197 
18198   # Input might be given as Windows format, start by converting to
18199   # unix format.
18200   new_path=`$CYGPATH -u "$path"`
18201 
18202   # Now try to locate executable using which
18203   new_path=`$WHICH "$new_path" 2> /dev/null`
18204   # bat and cmd files are not always considered executable in cygwin causing which
18205   # to not find them
18206   if test "x$new_path" = x \
18207            && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18208            && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18209     new_path=`$CYGPATH -u "$path"`
18210   fi
18211   if test "x$new_path" = x; then
18212     # Oops. Which didn't find the executable.
18213     # The splitting of arguments from the executable at a space might have been incorrect,
18214     # since paths with space are more likely in Windows. Give it another try with the whole
18215     # argument.
18216     path="$complete"
18217     arguments="EOL"
18218     new_path=`$CYGPATH -u "$path"`
18219     new_path=`$WHICH "$new_path" 2> /dev/null`
18220     # bat and cmd files are not always considered executable in cygwin causing which
18221     # to not find them
18222     if test "x$new_path" = x \
18223              && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18224              && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18225       new_path=`$CYGPATH -u "$path"`
18226     fi
18227     if test "x$new_path" = x; then
18228       # It's still not found. Now this is an unrecoverable error.
18229       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
18230 $as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
18231       has_space=`$ECHO "$complete" | $GREP " "`
18232       if test "x$has_space" != x; then
18233         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18234 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18235       fi
18236       as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
18237     fi
18238   fi
18239 
18240   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18241   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18242   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18243   # "foo.exe" is OK but "foo" is an error.
18244   #
18245   # This test is therefore slightly more accurate than "test -f" to check for file precense.
18246   # It is also a way to make sure we got the proper file name for the real test later on.
18247   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18248   if test "x$test_shortpath" = x; then
18249     # Short path failed, file does not exist as specified.
18250     # Try adding .exe or .cmd
18251     if test -f "${new_path}.exe"; then
18252        input_to_shortpath="${new_path}.exe"
18253     elif test -f "${new_path}.cmd"; then
18254        input_to_shortpath="${new_path}.cmd"
18255     else
18256       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&5
18257 $as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&6;}
18258       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18259 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18260       as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
18261     fi
18262   else
18263     input_to_shortpath="$new_path"
18264   fi
18265 
18266   # Call helper function which possibly converts this using DOS-style short mode.
18267   # If so, the updated path is stored in $new_path.
18268   new_path="$input_to_shortpath"
18269 
18270   input_path="$input_to_shortpath"
18271   # Check if we need to convert this using DOS-style short mode. If the path
18272   # contains just simple characters, use it. Otherwise (spaces, weird characters),
18273   # take no chances and rewrite it.
18274   # Note: m4 eats our [], so we need to use [ and ] instead.
18275   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18276   if test "x$has_forbidden_chars" != x; then
18277     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18278     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18279     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18280     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18281       # Going to short mode and back again did indeed matter. Since short mode is
18282       # case insensitive, let's make it lowercase to improve readability.
18283       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18284       # Now convert it back to Unix-stile (cygpath)
18285       input_path=`$CYGPATH -u "$shortmode_path"`
18286       new_path="$input_path"
18287     fi
18288   fi
18289 
18290   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18291   if test "x$test_cygdrive_prefix" = x; then
18292     # As a simple fix, exclude /usr/bin since it's not a real path.
18293     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18294       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18295       # a path prefixed by /cygdrive for fixpath to work.
18296       new_path="$CYGWIN_ROOT_PATH$input_path"
18297     fi
18298   fi
18299 
18300   # remove trailing .exe if any
18301   new_path="${new_path/%.exe/}"
18302 
18303   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18304 
18305   # First separate the path from the arguments. This will split at the first
18306   # space.
18307   complete="$BUILD_CXX"
18308   path="${complete%% *}"
18309   tmp="$complete EOL"
18310   arguments="${tmp#* }"
18311 
18312   # Input might be given as Windows format, start by converting to
18313   # unix format.
18314   new_path="$path"
18315 
18316   windows_path="$new_path"
18317   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18318     unix_path=`$CYGPATH -u "$windows_path"`
18319     new_path="$unix_path"
18320   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18321     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18322     new_path="$unix_path"
18323   fi
18324 
18325 
18326   # Now try to locate executable using which
18327   new_path=`$WHICH "$new_path" 2> /dev/null`
18328 
18329   if test "x$new_path" = x; then
18330     # Oops. Which didn't find the executable.
18331     # The splitting of arguments from the executable at a space might have been incorrect,
18332     # since paths with space are more likely in Windows. Give it another try with the whole
18333     # argument.
18334     path="$complete"
18335     arguments="EOL"
18336     new_path="$path"
18337 
18338   windows_path="$new_path"
18339   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18340     unix_path=`$CYGPATH -u "$windows_path"`
18341     new_path="$unix_path"
18342   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18343     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18344     new_path="$unix_path"
18345   fi
18346 
18347 
18348     new_path=`$WHICH "$new_path" 2> /dev/null`
18349 
18350     if test "x$new_path" = x; then
18351       # It's still not found. Now this is an unrecoverable error.
18352       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
18353 $as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
18354       has_space=`$ECHO "$complete" | $GREP " "`
18355       if test "x$has_space" != x; then
18356         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18357 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18358       fi
18359       as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
18360     fi
18361   fi
18362 
18363   # Now new_path has a complete unix path to the binary
18364   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18365     # Keep paths in /bin as-is, but remove trailing .exe if any
18366     new_path="${new_path/%.exe/}"
18367     # Do not save /bin paths to all_fixpath_prefixes!
18368   else
18369     # Not in mixed or Windows style, start by that.
18370     new_path=`cmd //c echo $new_path`
18371 
18372   input_path="$new_path"
18373   # Check if we need to convert this using DOS-style short mode. If the path
18374   # contains just simple characters, use it. Otherwise (spaces, weird characters),
18375   # take no chances and rewrite it.
18376   # Note: m4 eats our [], so we need to use [ and ] instead.
18377   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18378   if test "x$has_forbidden_chars" != x; then
18379     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18380     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18381   fi
18382 
18383     # Output is in $new_path
18384 
18385   windows_path="$new_path"
18386   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18387     unix_path=`$CYGPATH -u "$windows_path"`
18388     new_path="$unix_path"
18389   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18390     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18391     new_path="$unix_path"
18392   fi
18393 
18394     # remove trailing .exe if any
18395     new_path="${new_path/%.exe/}"
18396 
18397     # Save the first 10 bytes of this path to the storage, so fixpath can work.
18398     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18399   fi
18400 
18401   else
18402     # We're on a posix platform. Hooray! :)
18403     # First separate the path from the arguments. This will split at the first
18404     # space.
18405     complete="$BUILD_CXX"
18406     path="${complete%% *}"
18407     tmp="$complete EOL"
18408     arguments="${tmp#* }"
18409 
18410     # Cannot rely on the command "which" here since it doesn't always work.
18411     is_absolute_path=`$ECHO "$path" | $GREP ^/`
18412     if test -z "$is_absolute_path"; then
18413       # Path to executable is not absolute. Find it.
18414       IFS_save="$IFS"
18415       IFS=:
18416       for p in $PATH; do
18417         if test -f "$p/$path" && test -x "$p/$path"; then
18418           new_path="$p/$path"
18419           break
18420         fi
18421       done
18422       IFS="$IFS_save"
18423     else
18424       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving BUILD_CXX (as $path) failed, using $path directly." >&5
18425 $as_echo "$as_me: Resolving BUILD_CXX (as $path) failed, using $path directly." >&6;}
18426       new_path="$path"
18427     fi
18428 
18429     if test "x$new_path" = x; then
18430         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
18431 $as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
18432         has_space=`$ECHO "$complete" | $GREP " "`
18433         if test "x$has_space" != x; then
18434           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18435 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18436         fi
18437         as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
18438       fi
18439   fi
18440 
18441       # Now join together the path and the arguments once again
18442       if test "x$arguments" != xEOL; then
18443         new_complete="$new_path ${arguments% *}"
18444       else
18445         new_complete="$new_path"
18446       fi
18447 
18448   if test "x$complete" != "x$new_complete"; then
18449       BUILD_CXX="$new_complete"
18450       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CXX to \"$new_complete\"" >&5
18451 $as_echo "$as_me: Rewriting BUILD_CXX to \"$new_complete\"" >&6;}
18452     fi
18453 
18454     # Extract the first word of "ld", so it can be a program name with args.
18455 set dummy ld; ac_word=$2
18456 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18457 $as_echo_n "checking for $ac_word... " >&6; }
18458 if test "${ac_cv_path_BUILD_LD+set}" = set; then :
18459   $as_echo_n "(cached) " >&6
18460 else
18461   case $BUILD_LD in
18462   [\\/]* | ?:[\\/]*)
18463   ac_cv_path_BUILD_LD="$BUILD_LD" # Let the user override the test with a path.
18464   ;;
18465   *)
18466   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18467 for as_dir in $PATH
18468 do
18469   IFS=$as_save_IFS
18470   test -z "$as_dir" && as_dir=.
18471     for ac_exec_ext in '' $ac_executable_extensions; do
18472   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
18473     ac_cv_path_BUILD_LD="$as_dir/$ac_word$ac_exec_ext"
18474     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18475     break 2
18476   fi
18477 done
18478   done
18479 IFS=$as_save_IFS
18480 
18481   ;;
18482 esac
18483 fi
18484 BUILD_LD=$ac_cv_path_BUILD_LD
18485 if test -n "$BUILD_LD"; then
18486   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_LD" >&5
18487 $as_echo "$BUILD_LD" >&6; }
18488 else
18489   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18490 $as_echo "no" >&6; }
18491 fi
18492 
18493 
18494 
18495   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18496 
18497   # First separate the path from the arguments. This will split at the first
18498   # space.
18499   complete="$BUILD_LD"
18500   path="${complete%% *}"
18501   tmp="$complete EOL"
18502   arguments="${tmp#* }"
18503 
18504   # Input might be given as Windows format, start by converting to
18505   # unix format.
18506   new_path=`$CYGPATH -u "$path"`
18507 
18508   # Now try to locate executable using which
18509   new_path=`$WHICH "$new_path" 2> /dev/null`
18510   # bat and cmd files are not always considered executable in cygwin causing which
18511   # to not find them
18512   if test "x$new_path" = x \
18513            && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18514            && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18515     new_path=`$CYGPATH -u "$path"`
18516   fi
18517   if test "x$new_path" = x; then
18518     # Oops. Which didn't find the executable.
18519     # The splitting of arguments from the executable at a space might have been incorrect,
18520     # since paths with space are more likely in Windows. Give it another try with the whole
18521     # argument.
18522     path="$complete"
18523     arguments="EOL"
18524     new_path=`$CYGPATH -u "$path"`
18525     new_path=`$WHICH "$new_path" 2> /dev/null`
18526     # bat and cmd files are not always considered executable in cygwin causing which
18527     # to not find them
18528     if test "x$new_path" = x \
18529              && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18530              && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18531       new_path=`$CYGPATH -u "$path"`
18532     fi
18533     if test "x$new_path" = x; then
18534       # It's still not found. Now this is an unrecoverable error.
18535       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
18536 $as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
18537       has_space=`$ECHO "$complete" | $GREP " "`
18538       if test "x$has_space" != x; then
18539         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18540 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18541       fi
18542       as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
18543     fi
18544   fi
18545 
18546   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18547   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18548   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18549   # "foo.exe" is OK but "foo" is an error.
18550   #
18551   # This test is therefore slightly more accurate than "test -f" to check for file precense.
18552   # It is also a way to make sure we got the proper file name for the real test later on.
18553   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18554   if test "x$test_shortpath" = x; then
18555     # Short path failed, file does not exist as specified.
18556     # Try adding .exe or .cmd
18557     if test -f "${new_path}.exe"; then
18558        input_to_shortpath="${new_path}.exe"
18559     elif test -f "${new_path}.cmd"; then
18560        input_to_shortpath="${new_path}.cmd"
18561     else
18562       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$new_path\", is invalid." >&5
18563 $as_echo "$as_me: The path of BUILD_LD, which resolves as \"$new_path\", is invalid." >&6;}
18564       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18565 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18566       as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
18567     fi
18568   else
18569     input_to_shortpath="$new_path"
18570   fi
18571 
18572   # Call helper function which possibly converts this using DOS-style short mode.
18573   # If so, the updated path is stored in $new_path.
18574   new_path="$input_to_shortpath"
18575 
18576   input_path="$input_to_shortpath"
18577   # Check if we need to convert this using DOS-style short mode. If the path
18578   # contains just simple characters, use it. Otherwise (spaces, weird characters),
18579   # take no chances and rewrite it.
18580   # Note: m4 eats our [], so we need to use [ and ] instead.
18581   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18582   if test "x$has_forbidden_chars" != x; then
18583     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18584     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18585     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18586     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18587       # Going to short mode and back again did indeed matter. Since short mode is
18588       # case insensitive, let's make it lowercase to improve readability.
18589       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18590       # Now convert it back to Unix-stile (cygpath)
18591       input_path=`$CYGPATH -u "$shortmode_path"`
18592       new_path="$input_path"
18593     fi
18594   fi
18595 
18596   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18597   if test "x$test_cygdrive_prefix" = x; then
18598     # As a simple fix, exclude /usr/bin since it's not a real path.
18599     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18600       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18601       # a path prefixed by /cygdrive for fixpath to work.
18602       new_path="$CYGWIN_ROOT_PATH$input_path"
18603     fi
18604   fi
18605 
18606   # remove trailing .exe if any
18607   new_path="${new_path/%.exe/}"
18608 
18609   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18610 
18611   # First separate the path from the arguments. This will split at the first
18612   # space.
18613   complete="$BUILD_LD"
18614   path="${complete%% *}"
18615   tmp="$complete EOL"
18616   arguments="${tmp#* }"
18617 
18618   # Input might be given as Windows format, start by converting to
18619   # unix format.
18620   new_path="$path"
18621 
18622   windows_path="$new_path"
18623   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18624     unix_path=`$CYGPATH -u "$windows_path"`
18625     new_path="$unix_path"
18626   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18627     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18628     new_path="$unix_path"
18629   fi
18630 
18631 
18632   # Now try to locate executable using which
18633   new_path=`$WHICH "$new_path" 2> /dev/null`
18634 
18635   if test "x$new_path" = x; then
18636     # Oops. Which didn't find the executable.
18637     # The splitting of arguments from the executable at a space might have been incorrect,
18638     # since paths with space are more likely in Windows. Give it another try with the whole
18639     # argument.
18640     path="$complete"
18641     arguments="EOL"
18642     new_path="$path"
18643 
18644   windows_path="$new_path"
18645   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18646     unix_path=`$CYGPATH -u "$windows_path"`
18647     new_path="$unix_path"
18648   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18649     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18650     new_path="$unix_path"
18651   fi
18652 
18653 
18654     new_path=`$WHICH "$new_path" 2> /dev/null`
18655 
18656     if test "x$new_path" = x; then
18657       # It's still not found. Now this is an unrecoverable error.
18658       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
18659 $as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
18660       has_space=`$ECHO "$complete" | $GREP " "`
18661       if test "x$has_space" != x; then
18662         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18663 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18664       fi
18665       as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
18666     fi
18667   fi
18668 
18669   # Now new_path has a complete unix path to the binary
18670   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18671     # Keep paths in /bin as-is, but remove trailing .exe if any
18672     new_path="${new_path/%.exe/}"
18673     # Do not save /bin paths to all_fixpath_prefixes!
18674   else
18675     # Not in mixed or Windows style, start by that.
18676     new_path=`cmd //c echo $new_path`
18677 
18678   input_path="$new_path"
18679   # Check if we need to convert this using DOS-style short mode. If the path
18680   # contains just simple characters, use it. Otherwise (spaces, weird characters),
18681   # take no chances and rewrite it.
18682   # Note: m4 eats our [], so we need to use [ and ] instead.
18683   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18684   if test "x$has_forbidden_chars" != x; then
18685     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18686     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18687   fi
18688 
18689     # Output is in $new_path
18690 
18691   windows_path="$new_path"
18692   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18693     unix_path=`$CYGPATH -u "$windows_path"`
18694     new_path="$unix_path"
18695   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18696     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18697     new_path="$unix_path"
18698   fi
18699 
18700     # remove trailing .exe if any
18701     new_path="${new_path/%.exe/}"
18702 
18703     # Save the first 10 bytes of this path to the storage, so fixpath can work.
18704     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18705   fi
18706 
18707   else
18708     # We're on a posix platform. Hooray! :)
18709     # First separate the path from the arguments. This will split at the first
18710     # space.
18711     complete="$BUILD_LD"
18712     path="${complete%% *}"
18713     tmp="$complete EOL"
18714     arguments="${tmp#* }"
18715 
18716     # Cannot rely on the command "which" here since it doesn't always work.
18717     is_absolute_path=`$ECHO "$path" | $GREP ^/`
18718     if test -z "$is_absolute_path"; then
18719       # Path to executable is not absolute. Find it.
18720       IFS_save="$IFS"
18721       IFS=:
18722       for p in $PATH; do
18723         if test -f "$p/$path" && test -x "$p/$path"; then
18724           new_path="$p/$path"
18725           break
18726         fi
18727       done
18728       IFS="$IFS_save"
18729     else
18730       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving BUILD_LD (as $path) failed, using $path directly." >&5
18731 $as_echo "$as_me: Resolving BUILD_LD (as $path) failed, using $path directly." >&6;}
18732       new_path="$path"
18733     fi
18734 
18735     if test "x$new_path" = x; then
18736         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
18737 $as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
18738         has_space=`$ECHO "$complete" | $GREP " "`
18739         if test "x$has_space" != x; then
18740           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18741 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18742         fi
18743         as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
18744       fi
18745   fi
18746 
18747       # Now join together the path and the arguments once again
18748       if test "x$arguments" != xEOL; then
18749         new_complete="$new_path ${arguments% *}"
18750       else
18751         new_complete="$new_path"
18752       fi
18753 
18754   if test "x$complete" != "x$new_complete"; then
18755       BUILD_LD="$new_complete"
18756       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_LD to \"$new_complete\"" >&5
18757 $as_echo "$as_me: Rewriting BUILD_LD to \"$new_complete\"" >&6;}
18758     fi
18759 
18760 fi
18761 
18762 
18763 
18764 
18765 # If a devkit is found on the builddeps server, then prepend its path to the
18766 # PATH variable. If there are cross compilers available in the devkit, these
18767 # will be found by AC_PROG_CC et al.
18768 DEVKIT=
18769 
18770 
18771     if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
18772         # Source the builddeps file again, to make sure it uses the latest variables!
18773         . $builddepsfile
18774         # Look for a target and build machine specific resource!
18775         eval resource=\${builddep_devkit_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
18776         if test "x$resource" = x; then
18777             # Ok, lets instead look for a target specific resource
18778             eval resource=\${builddep_devkit_TARGET_${rewritten_target_var}}
18779         fi
18780         if test "x$resource" = x; then
18781             # Ok, lets instead look for a build specific resource
18782             eval resource=\${builddep_devkit_BUILD_${rewritten_build_var}}
18783         fi
18784         if test "x$resource" = x; then
18785             # Ok, lets instead look for a generic resource
18786             # (The devkit comes from M4 and not the shell, thus no need for eval here.)
18787             resource=${builddep_devkit}
18788         fi
18789         if test "x$resource" != x; then
18790             { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for devkit" >&5
18791 $as_echo "$as_me: Using builddeps $resource for devkit" >&6;}
18792             # If the resource in the builddeps.conf file is an existing directory,
18793             # for example /java/linux/cups
18794             if test -d ${resource}; then
18795                depdir=${resource}
18796             else
18797 
18798 # devkit is for example mymodule
18799 # $resource is for example libs/general/libmymod_1_2_3.zip
18800 # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
18801 # $with_builddeps_dir is for example /localhome/builddeps
18802 # depdir is the name of the variable into which we store the depdir, eg MYMOD
18803 # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
18804 # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
18805     filename=`basename $resource`
18806     filebase=`echo $filename | sed 's/\.[^\.]*$//'`
18807     filebase=${filename%%.*}
18808     extension=${filename#*.}
18809     installdir=$with_builddeps_dir/$filebase
18810     if test ! -f $installdir/$filename.unpacked; then
18811         { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency devkit from $with_builddeps_server/$resource and installing into $installdir" >&5
18812 $as_echo "$as_me: Downloading build dependency devkit from $with_builddeps_server/$resource and installing into $installdir" >&6;}
18813         if test ! -d $installdir; then
18814             mkdir -p $installdir
18815         fi
18816         if test ! -d $installdir; then
18817             as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
18818         fi
18819         tmpfile=`mktemp $installdir/devkit.XXXXXXXXX`
18820         touch $tmpfile
18821         if test ! -f $tmpfile; then
18822             as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
18823         fi
18824 
18825     # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
18826     # $tmpfile is the local file name for the downloaded file.
18827     VALID_TOOL=no
18828     if test "x$BDEPS_FTP" = xwget; then
18829        VALID_TOOL=yes
18830        wget -O $tmpfile $with_builddeps_server/$resource
18831     fi
18832     if test "x$BDEPS_FTP" = xlftp; then
18833        VALID_TOOL=yes
18834        lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
18835     fi
18836     if test "x$BDEPS_FTP" = xftp; then
18837         VALID_TOOL=yes
18838         FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
18839         FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
18840         FTPUSERPWD=${FTPSERVER%%@*}
18841         if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
18842             FTPUSER=${userpwd%%:*}
18843             FTPPWD=${userpwd#*@}
18844             FTPSERVER=${FTPSERVER#*@}
18845         else
18846             FTPUSER=ftp
18847             FTPPWD=ftp
18848         fi
18849         # the "pass" command does not work on some
18850         # ftp clients (read ftp.exe) but if it works,
18851         # passive mode is better!
18852         (\
18853             echo "user $FTPUSER $FTPPWD"        ;\
18854             echo "pass"                         ;\
18855             echo "bin"                          ;\
18856             echo "get $FTPPATH $tmpfile"              ;\
18857         ) | ftp -in $FTPSERVER
18858     fi
18859     if test "x$VALID_TOOL" != xyes; then
18860        as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
18861     fi
18862 
18863         mv $tmpfile $installdir/$filename
18864         if test ! -s $installdir/$filename; then
18865             as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
18866         fi
18867         case "$extension" in
18868             zip)  echo "Unzipping $installdir/$filename..."
18869                (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
18870             ;;
18871             tar.gz) echo "Untaring $installdir/$filename..."
18872                (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
18873             ;;
18874             tgz) echo "Untaring $installdir/$filename..."
18875                (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
18876             ;;
18877             *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
18878             ;;
18879         esac
18880     fi
18881     if test -f $installdir/$filename.unpacked; then
18882         depdir=$installdir
18883     fi
18884 
18885             fi
18886             # Source the builddeps file again, because in the previous command, the depdir
18887             # was updated to point at the current build dependency install directory.
18888             . $builddepsfile
18889             # Now extract variables from the builddeps.conf files.
18890             theroot=${builddep_devkit_ROOT}
18891             thecflags=${builddep_devkit_CFLAGS}
18892             thelibs=${builddep_devkit_LIBS}
18893             if test "x$depdir" = x; then
18894                 as_fn_error $? "Could not download build dependency devkit" "$LINENO" 5
18895             fi
18896             DEVKIT=$depdir
18897             if test "x$theroot" != x; then
18898                DEVKIT="$theroot"
18899             fi
18900             if test "x$thecflags" != x; then
18901                DEVKIT_CFLAGS="$thecflags"
18902             fi
18903             if test "x$thelibs" != x; then
18904                DEVKIT_LIBS="$thelibs"
18905             fi
18906             # Found devkit
18907                      PATH="$DEVKIT/bin:$PATH"
18908                      SYS_ROOT="$DEVKIT/${rewritten_target}/sys-root"
18909                      if test "x$x_includes" = "xNONE"; then
18910                          x_includes="$SYS_ROOT/usr/include/X11"
18911                      fi
18912                      if test "x$x_libraries" = "xNONE"; then
18913                          x_libraries="$SYS_ROOT/usr/lib"
18914                      fi
18915 
18916 
18917         fi
18918 
18919     fi
18920 
18921 
18922 if test "x$SYS_ROOT" != "x/" ; then
18923     CFLAGS="--sysroot=$SYS_ROOT $CFLAGS"
18924     CXXFLAGS="--sysroot=$SYS_ROOT $CXXFLAGS"
18925     OBJCFLAGS="--sysroot=$SYS_ROOT $OBJCFLAGS"
18926     OBJCXXFLAGS="--sysroot=$SYS_ROOT $OBJCFLAGS"
18927     CPPFLAGS="--sysroot=$SYS_ROOT $CPPFLAGS"
18928     LDFLAGS="--sysroot=$SYS_ROOT $LDFLAGS"
18929 fi
18930 
18931 # Store the CFLAGS etal passed to the configure script.
18932 ORG_CFLAGS="$CFLAGS"
18933 ORG_CXXFLAGS="$CXXFLAGS"
18934 ORG_OBJCFLAGS="$OBJCFLAGS"
18935 
18936 # autoconf magic only relies on PATH, so update it if tools dir is specified
18937 OLD_PATH="$PATH"
18938 if test "x$TOOLS_DIR" != x; then
18939   PATH=$TOOLS_DIR:$PATH
18940 fi
18941 
18942 
18943 ### Locate C compiler (CC)
18944 
18945 # On windows, only cl.exe is supported.
18946 # On Solaris, cc is preferred to gcc.
18947 # Elsewhere, gcc is preferred to cc.
18948 
18949 if test "x$CC" != x; then
18950   COMPILER_CHECK_LIST="$CC"
18951 elif test "x$OPENJDK_TARGET_OS" = "xwindows"; then
18952   COMPILER_CHECK_LIST="cl"
18953 elif test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
18954   COMPILER_CHECK_LIST="cc gcc"
18955 else
18956   COMPILER_CHECK_LIST="gcc cc"
18957 fi
18958 
18959 
18960   COMPILER_NAME=C
18961 
18962   CC=
18963   # If TOOLS_DIR is set, check for all compiler names in there first
18964   # before checking the rest of the PATH.
18965   if test -n "$TOOLS_DIR"; then
18966     PATH_save="$PATH"
18967     PATH="$TOOLS_DIR"
18968     for ac_prog in $COMPILER_CHECK_LIST
18969 do
18970   # Extract the first word of "$ac_prog", so it can be a program name with args.
18971 set dummy $ac_prog; ac_word=$2
18972 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18973 $as_echo_n "checking for $ac_word... " >&6; }
18974 if test "${ac_cv_path_TOOLS_DIR_CC+set}" = set; then :
18975   $as_echo_n "(cached) " >&6
18976 else
18977   case $TOOLS_DIR_CC in
18978   [\\/]* | ?:[\\/]*)
18979   ac_cv_path_TOOLS_DIR_CC="$TOOLS_DIR_CC" # Let the user override the test with a path.
18980   ;;
18981   *)
18982   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18983 for as_dir in $PATH
18984 do
18985   IFS=$as_save_IFS
18986   test -z "$as_dir" && as_dir=.
18987     for ac_exec_ext in '' $ac_executable_extensions; do
18988   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
18989     ac_cv_path_TOOLS_DIR_CC="$as_dir/$ac_word$ac_exec_ext"
18990     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18991     break 2
18992   fi
18993 done
18994   done
18995 IFS=$as_save_IFS
18996 
18997   ;;
18998 esac
18999 fi
19000 TOOLS_DIR_CC=$ac_cv_path_TOOLS_DIR_CC
19001 if test -n "$TOOLS_DIR_CC"; then
19002   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLS_DIR_CC" >&5
19003 $as_echo "$TOOLS_DIR_CC" >&6; }
19004 else
19005   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19006 $as_echo "no" >&6; }
19007 fi
19008 
19009 
19010   test -n "$TOOLS_DIR_CC" && break
19011 done
19012 
19013     CC=$TOOLS_DIR_CC
19014     PATH="$PATH_save"
19015   fi
19016 
19017   # AC_PATH_PROGS can't be run multiple times with the same variable,
19018   # so create a new name for this run.
19019   if test "x$CC" = x; then
19020     for ac_prog in $COMPILER_CHECK_LIST
19021 do
19022   # Extract the first word of "$ac_prog", so it can be a program name with args.
19023 set dummy $ac_prog; ac_word=$2
19024 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19025 $as_echo_n "checking for $ac_word... " >&6; }
19026 if test "${ac_cv_path_POTENTIAL_CC+set}" = set; then :
19027   $as_echo_n "(cached) " >&6
19028 else
19029   case $POTENTIAL_CC in
19030   [\\/]* | ?:[\\/]*)
19031   ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
19032   ;;
19033   *)
19034   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19035 for as_dir in $PATH
19036 do
19037   IFS=$as_save_IFS
19038   test -z "$as_dir" && as_dir=.
19039     for ac_exec_ext in '' $ac_executable_extensions; do
19040   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
19041     ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
19042     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19043     break 2
19044   fi
19045 done
19046   done
19047 IFS=$as_save_IFS
19048 
19049   ;;
19050 esac
19051 fi
19052 POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
19053 if test -n "$POTENTIAL_CC"; then
19054   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
19055 $as_echo "$POTENTIAL_CC" >&6; }
19056 else
19057   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19058 $as_echo "no" >&6; }
19059 fi
19060 
19061 
19062   test -n "$POTENTIAL_CC" && break
19063 done
19064 
19065     CC=$POTENTIAL_CC
19066   fi
19067 
19068   if test "x$CC" = x; then
19069 
19070     # Print a helpful message on how to acquire the necessary build dependency.
19071     # devkit is the help tag: freetyp2, cups, pulse, alsa etc
19072     MISSING_DEPENDENCY=devkit
19073     PKGHANDLER_COMMAND=
19074 
19075     case $PKGHANDLER in
19076         apt-get)
19077                 apt_help     $MISSING_DEPENDENCY ;;
19078     yum)
19079                 yum_help     $MISSING_DEPENDENCY ;;
19080         port)
19081                 port_help    $MISSING_DEPENDENCY ;;
19082         pkgutil)
19083                 pkgutil_help $MISSING_DEPENDENCY ;;
19084         pkgadd)
19085                 pkgadd_help  $MISSING_DEPENDENCY ;;
19086     * )
19087       break ;;
19088     esac
19089 
19090     if test "x$PKGHANDLER_COMMAND" != x; then
19091         HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
19092     fi
19093 
19094       as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
19095   fi
19096 
19097   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19098 
19099   # First separate the path from the arguments. This will split at the first
19100   # space.
19101   complete="$CC"
19102   path="${complete%% *}"
19103   tmp="$complete EOL"
19104   arguments="${tmp#* }"
19105 
19106   # Input might be given as Windows format, start by converting to
19107   # unix format.
19108   new_path=`$CYGPATH -u "$path"`
19109 
19110   # Now try to locate executable using which
19111   new_path=`$WHICH "$new_path" 2> /dev/null`
19112   # bat and cmd files are not always considered executable in cygwin causing which
19113   # to not find them
19114   if test "x$new_path" = x \
19115            && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19116            && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19117     new_path=`$CYGPATH -u "$path"`
19118   fi
19119   if test "x$new_path" = x; then
19120     # Oops. Which didn't find the executable.
19121     # The splitting of arguments from the executable at a space might have been incorrect,
19122     # since paths with space are more likely in Windows. Give it another try with the whole
19123     # argument.
19124     path="$complete"
19125     arguments="EOL"
19126     new_path=`$CYGPATH -u "$path"`
19127     new_path=`$WHICH "$new_path" 2> /dev/null`
19128     # bat and cmd files are not always considered executable in cygwin causing which
19129     # to not find them
19130     if test "x$new_path" = x \
19131              && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19132              && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19133       new_path=`$CYGPATH -u "$path"`
19134     fi
19135     if test "x$new_path" = x; then
19136       # It's still not found. Now this is an unrecoverable error.
19137       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
19138 $as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
19139       has_space=`$ECHO "$complete" | $GREP " "`
19140       if test "x$has_space" != x; then
19141         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19142 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19143       fi
19144       as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
19145     fi
19146   fi
19147 
19148   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19149   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19150   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19151   # "foo.exe" is OK but "foo" is an error.
19152   #
19153   # This test is therefore slightly more accurate than "test -f" to check for file precense.
19154   # It is also a way to make sure we got the proper file name for the real test later on.
19155   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19156   if test "x$test_shortpath" = x; then
19157     # Short path failed, file does not exist as specified.
19158     # Try adding .exe or .cmd
19159     if test -f "${new_path}.exe"; then
19160        input_to_shortpath="${new_path}.exe"
19161     elif test -f "${new_path}.cmd"; then
19162        input_to_shortpath="${new_path}.cmd"
19163     else
19164       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$new_path\", is invalid." >&5
19165 $as_echo "$as_me: The path of CC, which resolves as \"$new_path\", is invalid." >&6;}
19166       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19167 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19168       as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
19169     fi
19170   else
19171     input_to_shortpath="$new_path"
19172   fi
19173 
19174   # Call helper function which possibly converts this using DOS-style short mode.
19175   # If so, the updated path is stored in $new_path.
19176   new_path="$input_to_shortpath"
19177 
19178   input_path="$input_to_shortpath"
19179   # Check if we need to convert this using DOS-style short mode. If the path
19180   # contains just simple characters, use it. Otherwise (spaces, weird characters),
19181   # take no chances and rewrite it.
19182   # Note: m4 eats our [], so we need to use [ and ] instead.
19183   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19184   if test "x$has_forbidden_chars" != x; then
19185     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19186     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19187     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19188     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19189       # Going to short mode and back again did indeed matter. Since short mode is
19190       # case insensitive, let's make it lowercase to improve readability.
19191       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19192       # Now convert it back to Unix-stile (cygpath)
19193       input_path=`$CYGPATH -u "$shortmode_path"`
19194       new_path="$input_path"
19195     fi
19196   fi
19197 
19198   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19199   if test "x$test_cygdrive_prefix" = x; then
19200     # As a simple fix, exclude /usr/bin since it's not a real path.
19201     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19202       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19203       # a path prefixed by /cygdrive for fixpath to work.
19204       new_path="$CYGWIN_ROOT_PATH$input_path"
19205     fi
19206   fi
19207 
19208   # remove trailing .exe if any
19209   new_path="${new_path/%.exe/}"
19210 
19211   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19212 
19213   # First separate the path from the arguments. This will split at the first
19214   # space.
19215   complete="$CC"
19216   path="${complete%% *}"
19217   tmp="$complete EOL"
19218   arguments="${tmp#* }"
19219 
19220   # Input might be given as Windows format, start by converting to
19221   # unix format.
19222   new_path="$path"
19223 
19224   windows_path="$new_path"
19225   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19226     unix_path=`$CYGPATH -u "$windows_path"`
19227     new_path="$unix_path"
19228   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19229     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19230     new_path="$unix_path"
19231   fi
19232 
19233 
19234   # Now try to locate executable using which
19235   new_path=`$WHICH "$new_path" 2> /dev/null`
19236 
19237   if test "x$new_path" = x; then
19238     # Oops. Which didn't find the executable.
19239     # The splitting of arguments from the executable at a space might have been incorrect,
19240     # since paths with space are more likely in Windows. Give it another try with the whole
19241     # argument.
19242     path="$complete"
19243     arguments="EOL"
19244     new_path="$path"
19245 
19246   windows_path="$new_path"
19247   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19248     unix_path=`$CYGPATH -u "$windows_path"`
19249     new_path="$unix_path"
19250   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19251     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19252     new_path="$unix_path"
19253   fi
19254 
19255 
19256     new_path=`$WHICH "$new_path" 2> /dev/null`
19257 
19258     if test "x$new_path" = x; then
19259       # It's still not found. Now this is an unrecoverable error.
19260       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
19261 $as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
19262       has_space=`$ECHO "$complete" | $GREP " "`
19263       if test "x$has_space" != x; then
19264         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19265 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19266       fi
19267       as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
19268     fi
19269   fi
19270 
19271   # Now new_path has a complete unix path to the binary
19272   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
19273     # Keep paths in /bin as-is, but remove trailing .exe if any
19274     new_path="${new_path/%.exe/}"
19275     # Do not save /bin paths to all_fixpath_prefixes!
19276   else
19277     # Not in mixed or Windows style, start by that.
19278     new_path=`cmd //c echo $new_path`
19279 
19280   input_path="$new_path"
19281   # Check if we need to convert this using DOS-style short mode. If the path
19282   # contains just simple characters, use it. Otherwise (spaces, weird characters),
19283   # take no chances and rewrite it.
19284   # Note: m4 eats our [], so we need to use [ and ] instead.
19285   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19286   if test "x$has_forbidden_chars" != x; then
19287     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19288     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19289   fi
19290 
19291     # Output is in $new_path
19292 
19293   windows_path="$new_path"
19294   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19295     unix_path=`$CYGPATH -u "$windows_path"`
19296     new_path="$unix_path"
19297   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19298     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19299     new_path="$unix_path"
19300   fi
19301 
19302     # remove trailing .exe if any
19303     new_path="${new_path/%.exe/}"
19304 
19305     # Save the first 10 bytes of this path to the storage, so fixpath can work.
19306     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19307   fi
19308 
19309   else
19310     # We're on a posix platform. Hooray! :)
19311     # First separate the path from the arguments. This will split at the first
19312     # space.
19313     complete="$CC"
19314     path="${complete%% *}"
19315     tmp="$complete EOL"
19316     arguments="${tmp#* }"
19317 
19318     # Cannot rely on the command "which" here since it doesn't always work.
19319     is_absolute_path=`$ECHO "$path" | $GREP ^/`
19320     if test -z "$is_absolute_path"; then
19321       # Path to executable is not absolute. Find it.
19322       IFS_save="$IFS"
19323       IFS=:
19324       for p in $PATH; do
19325         if test -f "$p/$path" && test -x "$p/$path"; then
19326           new_path="$p/$path"
19327           break
19328         fi
19329       done
19330       IFS="$IFS_save"
19331     else
19332       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CC (as $path) failed, using $path directly." >&5
19333 $as_echo "$as_me: Resolving CC (as $path) failed, using $path directly." >&6;}
19334       new_path="$path"
19335     fi
19336 
19337     if test "x$new_path" = x; then
19338         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
19339 $as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
19340         has_space=`$ECHO "$complete" | $GREP " "`
19341         if test "x$has_space" != x; then
19342           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19343 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19344         fi
19345         as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
19346       fi
19347   fi
19348 
19349       # Now join together the path and the arguments once again
19350       if test "x$arguments" != xEOL; then
19351         new_complete="$new_path ${arguments% *}"
19352       else
19353         new_complete="$new_path"
19354       fi
19355 
19356   if test "x$complete" != "x$new_complete"; then
19357       CC="$new_complete"
19358       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CC to \"$new_complete\"" >&5
19359 $as_echo "$as_me: Rewriting CC to \"$new_complete\"" >&6;}
19360     fi
19361 
19362   { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CC" >&5
19363 $as_echo_n "checking resolved symbolic links for CC... " >&6; }
19364   TEST_COMPILER="$CC"
19365 
19366     if test "x$OPENJDK_BUILD_OS" != xwindows; then
19367         # Follow a chain of symbolic links. Use readlink
19368         # where it exists, else fall back to horribly
19369         # complicated shell code.
19370         if test "x$READLINK_TESTED" != yes; then
19371             # On MacOSX there is a readlink tool with a different
19372             # purpose than the GNU readlink tool. Check the found readlink.
19373             ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
19374             if test "x$ISGNU" = x; then
19375                  # A readlink that we do not know how to use.
19376                  # Are there other non-GNU readlinks out there?
19377                  READLINK_TESTED=yes
19378                  READLINK=
19379             fi
19380         fi
19381 
19382         if test "x$READLINK" != x; then
19383             TEST_COMPILER=`$READLINK -f $TEST_COMPILER`
19384         else
19385             # Save the current directory for restoring afterwards
19386             STARTDIR=$PWD
19387             COUNTER=0
19388             sym_link_dir=`$DIRNAME $TEST_COMPILER`
19389             sym_link_file=`$BASENAME $TEST_COMPILER`
19390             cd $sym_link_dir
19391             # Use -P flag to resolve symlinks in directories.
19392             cd `$THEPWDCMD -P`
19393             sym_link_dir=`$THEPWDCMD -P`
19394             # Resolve file symlinks
19395             while test $COUNTER -lt 20; do
19396                 ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
19397                 if test "x$ISLINK" == x; then
19398                     # This is not a symbolic link! We are done!
19399                     break
19400                 fi
19401                 # Again resolve directory symlinks since the target of the just found
19402                 # link could be in a different directory
19403                 cd `$DIRNAME $ISLINK`
19404                 sym_link_dir=`$THEPWDCMD -P`
19405                 sym_link_file=`$BASENAME $ISLINK`
19406                 let COUNTER=COUNTER+1
19407             done
19408             cd $STARTDIR
19409             TEST_COMPILER=$sym_link_dir/$sym_link_file
19410         fi
19411     fi
19412 
19413   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_COMPILER" >&5
19414 $as_echo "$TEST_COMPILER" >&6; }
19415   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CC is disguised ccache" >&5
19416 $as_echo_n "checking if CC is disguised ccache... " >&6; }
19417 
19418   COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"`
19419   if test "x$COMPILER_BASENAME" = "xccache"; then
19420     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5
19421 $as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; }
19422     # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache.
19423     # We want to control ccache invocation ourselves, so ignore this cc and try
19424     # searching again.
19425 
19426     # Remove the path to the fake ccache cc from the PATH
19427     RETRY_COMPILER_SAVED_PATH="$PATH"
19428     COMPILER_DIRNAME=`$DIRNAME $CC`
19429     PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`"
19430 
19431     # Try again looking for our compiler
19432     if test -n "$ac_tool_prefix"; then
19433   for ac_prog in $COMPILER_CHECK_LIST
19434   do
19435     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
19436 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
19437 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19438 $as_echo_n "checking for $ac_word... " >&6; }
19439 if test "${ac_cv_prog_PROPER_COMPILER_CC+set}" = set; then :
19440   $as_echo_n "(cached) " >&6
19441 else
19442   if test -n "$PROPER_COMPILER_CC"; then
19443   ac_cv_prog_PROPER_COMPILER_CC="$PROPER_COMPILER_CC" # Let the user override the test.
19444 else
19445 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19446 for as_dir in $PATH
19447 do
19448   IFS=$as_save_IFS
19449   test -z "$as_dir" && as_dir=.
19450     for ac_exec_ext in '' $ac_executable_extensions; do
19451   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
19452     ac_cv_prog_PROPER_COMPILER_CC="$ac_tool_prefix$ac_prog"
19453     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19454     break 2
19455   fi
19456 done
19457   done
19458 IFS=$as_save_IFS
19459 
19460 fi
19461 fi
19462 PROPER_COMPILER_CC=$ac_cv_prog_PROPER_COMPILER_CC
19463 if test -n "$PROPER_COMPILER_CC"; then
19464   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5
19465 $as_echo "$PROPER_COMPILER_CC" >&6; }
19466 else
19467   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19468 $as_echo "no" >&6; }
19469 fi
19470 
19471 
19472     test -n "$PROPER_COMPILER_CC" && break
19473   done
19474 fi
19475 if test -z "$PROPER_COMPILER_CC"; then
19476   ac_ct_PROPER_COMPILER_CC=$PROPER_COMPILER_CC
19477   for ac_prog in $COMPILER_CHECK_LIST
19478 do
19479   # Extract the first word of "$ac_prog", so it can be a program name with args.
19480 set dummy $ac_prog; ac_word=$2
19481 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19482 $as_echo_n "checking for $ac_word... " >&6; }
19483 if test "${ac_cv_prog_ac_ct_PROPER_COMPILER_CC+set}" = set; then :
19484   $as_echo_n "(cached) " >&6
19485 else
19486   if test -n "$ac_ct_PROPER_COMPILER_CC"; then
19487   ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_ct_PROPER_COMPILER_CC" # Let the user override the test.
19488 else
19489 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19490 for as_dir in $PATH
19491 do
19492   IFS=$as_save_IFS
19493   test -z "$as_dir" && as_dir=.
19494     for ac_exec_ext in '' $ac_executable_extensions; do
19495   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
19496     ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_prog"
19497     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19498     break 2
19499   fi
19500 done
19501   done
19502 IFS=$as_save_IFS
19503 
19504 fi
19505 fi
19506 ac_ct_PROPER_COMPILER_CC=$ac_cv_prog_ac_ct_PROPER_COMPILER_CC
19507 if test -n "$ac_ct_PROPER_COMPILER_CC"; then
19508   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CC" >&5
19509 $as_echo "$ac_ct_PROPER_COMPILER_CC" >&6; }
19510 else
19511   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19512 $as_echo "no" >&6; }
19513 fi
19514 
19515 
19516   test -n "$ac_ct_PROPER_COMPILER_CC" && break
19517 done
19518 
19519   if test "x$ac_ct_PROPER_COMPILER_CC" = x; then
19520     PROPER_COMPILER_CC=""
19521   else
19522     case $cross_compiling:$ac_tool_warned in
19523 yes:)
19524 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
19525 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
19526 ac_tool_warned=yes ;;
19527 esac
19528     PROPER_COMPILER_CC=$ac_ct_PROPER_COMPILER_CC
19529   fi
19530 fi
19531 
19532 
19533   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19534 
19535   # First separate the path from the arguments. This will split at the first
19536   # space.
19537   complete="$PROPER_COMPILER_CC"
19538   path="${complete%% *}"
19539   tmp="$complete EOL"
19540   arguments="${tmp#* }"
19541 
19542   # Input might be given as Windows format, start by converting to
19543   # unix format.
19544   new_path=`$CYGPATH -u "$path"`
19545 
19546   # Now try to locate executable using which
19547   new_path=`$WHICH "$new_path" 2> /dev/null`
19548   # bat and cmd files are not always considered executable in cygwin causing which
19549   # to not find them
19550   if test "x$new_path" = x \
19551            && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19552            && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19553     new_path=`$CYGPATH -u "$path"`
19554   fi
19555   if test "x$new_path" = x; then
19556     # Oops. Which didn't find the executable.
19557     # The splitting of arguments from the executable at a space might have been incorrect,
19558     # since paths with space are more likely in Windows. Give it another try with the whole
19559     # argument.
19560     path="$complete"
19561     arguments="EOL"
19562     new_path=`$CYGPATH -u "$path"`
19563     new_path=`$WHICH "$new_path" 2> /dev/null`
19564     # bat and cmd files are not always considered executable in cygwin causing which
19565     # to not find them
19566     if test "x$new_path" = x \
19567              && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19568              && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19569       new_path=`$CYGPATH -u "$path"`
19570     fi
19571     if test "x$new_path" = x; then
19572       # It's still not found. Now this is an unrecoverable error.
19573       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
19574 $as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
19575       has_space=`$ECHO "$complete" | $GREP " "`
19576       if test "x$has_space" != x; then
19577         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19578 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19579       fi
19580       as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
19581     fi
19582   fi
19583 
19584   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19585   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19586   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19587   # "foo.exe" is OK but "foo" is an error.
19588   #
19589   # This test is therefore slightly more accurate than "test -f" to check for file precense.
19590   # It is also a way to make sure we got the proper file name for the real test later on.
19591   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19592   if test "x$test_shortpath" = x; then
19593     # Short path failed, file does not exist as specified.
19594     # Try adding .exe or .cmd
19595     if test -f "${new_path}.exe"; then
19596        input_to_shortpath="${new_path}.exe"
19597     elif test -f "${new_path}.cmd"; then
19598        input_to_shortpath="${new_path}.cmd"
19599     else
19600       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&5
19601 $as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&6;}
19602       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19603 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19604       as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
19605     fi
19606   else
19607     input_to_shortpath="$new_path"
19608   fi
19609 
19610   # Call helper function which possibly converts this using DOS-style short mode.
19611   # If so, the updated path is stored in $new_path.
19612   new_path="$input_to_shortpath"
19613 
19614   input_path="$input_to_shortpath"
19615   # Check if we need to convert this using DOS-style short mode. If the path
19616   # contains just simple characters, use it. Otherwise (spaces, weird characters),
19617   # take no chances and rewrite it.
19618   # Note: m4 eats our [], so we need to use [ and ] instead.
19619   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19620   if test "x$has_forbidden_chars" != x; then
19621     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19622     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19623     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19624     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19625       # Going to short mode and back again did indeed matter. Since short mode is
19626       # case insensitive, let's make it lowercase to improve readability.
19627       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19628       # Now convert it back to Unix-stile (cygpath)
19629       input_path=`$CYGPATH -u "$shortmode_path"`
19630       new_path="$input_path"
19631     fi
19632   fi
19633 
19634   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19635   if test "x$test_cygdrive_prefix" = x; then
19636     # As a simple fix, exclude /usr/bin since it's not a real path.
19637     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19638       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19639       # a path prefixed by /cygdrive for fixpath to work.
19640       new_path="$CYGWIN_ROOT_PATH$input_path"
19641     fi
19642   fi
19643 
19644   # remove trailing .exe if any
19645   new_path="${new_path/%.exe/}"
19646 
19647   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19648 
19649   # First separate the path from the arguments. This will split at the first
19650   # space.
19651   complete="$PROPER_COMPILER_CC"
19652   path="${complete%% *}"
19653   tmp="$complete EOL"
19654   arguments="${tmp#* }"
19655 
19656   # Input might be given as Windows format, start by converting to
19657   # unix format.
19658   new_path="$path"
19659 
19660   windows_path="$new_path"
19661   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19662     unix_path=`$CYGPATH -u "$windows_path"`
19663     new_path="$unix_path"
19664   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19665     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19666     new_path="$unix_path"
19667   fi
19668 
19669 
19670   # Now try to locate executable using which
19671   new_path=`$WHICH "$new_path" 2> /dev/null`
19672 
19673   if test "x$new_path" = x; then
19674     # Oops. Which didn't find the executable.
19675     # The splitting of arguments from the executable at a space might have been incorrect,
19676     # since paths with space are more likely in Windows. Give it another try with the whole
19677     # argument.
19678     path="$complete"
19679     arguments="EOL"
19680     new_path="$path"
19681 
19682   windows_path="$new_path"
19683   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19684     unix_path=`$CYGPATH -u "$windows_path"`
19685     new_path="$unix_path"
19686   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19687     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19688     new_path="$unix_path"
19689   fi
19690 
19691 
19692     new_path=`$WHICH "$new_path" 2> /dev/null`
19693 
19694     if test "x$new_path" = x; then
19695       # It's still not found. Now this is an unrecoverable error.
19696       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
19697 $as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
19698       has_space=`$ECHO "$complete" | $GREP " "`
19699       if test "x$has_space" != x; then
19700         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19701 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19702       fi
19703       as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
19704     fi
19705   fi
19706 
19707   # Now new_path has a complete unix path to the binary
19708   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
19709     # Keep paths in /bin as-is, but remove trailing .exe if any
19710     new_path="${new_path/%.exe/}"
19711     # Do not save /bin paths to all_fixpath_prefixes!
19712   else
19713     # Not in mixed or Windows style, start by that.
19714     new_path=`cmd //c echo $new_path`
19715 
19716   input_path="$new_path"
19717   # Check if we need to convert this using DOS-style short mode. If the path
19718   # contains just simple characters, use it. Otherwise (spaces, weird characters),
19719   # take no chances and rewrite it.
19720   # Note: m4 eats our [], so we need to use [ and ] instead.
19721   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19722   if test "x$has_forbidden_chars" != x; then
19723     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19724     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19725   fi
19726 
19727     # Output is in $new_path
19728 
19729   windows_path="$new_path"
19730   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19731     unix_path=`$CYGPATH -u "$windows_path"`
19732     new_path="$unix_path"
19733   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19734     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19735     new_path="$unix_path"
19736   fi
19737 
19738     # remove trailing .exe if any
19739     new_path="${new_path/%.exe/}"
19740 
19741     # Save the first 10 bytes of this path to the storage, so fixpath can work.
19742     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19743   fi
19744 
19745   else
19746     # We're on a posix platform. Hooray! :)
19747     # First separate the path from the arguments. This will split at the first
19748     # space.
19749     complete="$PROPER_COMPILER_CC"
19750     path="${complete%% *}"
19751     tmp="$complete EOL"
19752     arguments="${tmp#* }"
19753 
19754     # Cannot rely on the command "which" here since it doesn't always work.
19755     is_absolute_path=`$ECHO "$path" | $GREP ^/`
19756     if test -z "$is_absolute_path"; then
19757       # Path to executable is not absolute. Find it.
19758       IFS_save="$IFS"
19759       IFS=:
19760       for p in $PATH; do
19761         if test -f "$p/$path" && test -x "$p/$path"; then
19762           new_path="$p/$path"
19763           break
19764         fi
19765       done
19766       IFS="$IFS_save"
19767     else
19768       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving PROPER_COMPILER_CC (as $path) failed, using $path directly." >&5
19769 $as_echo "$as_me: Resolving PROPER_COMPILER_CC (as $path) failed, using $path directly." >&6;}
19770       new_path="$path"
19771     fi
19772 
19773     if test "x$new_path" = x; then
19774         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
19775 $as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
19776         has_space=`$ECHO "$complete" | $GREP " "`
19777         if test "x$has_space" != x; then
19778           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19779 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19780         fi
19781         as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
19782       fi
19783   fi
19784 
19785       # Now join together the path and the arguments once again
19786       if test "x$arguments" != xEOL; then
19787         new_complete="$new_path ${arguments% *}"
19788       else
19789         new_complete="$new_path"
19790       fi
19791 
19792   if test "x$complete" != "x$new_complete"; then
19793       PROPER_COMPILER_CC="$new_complete"
19794       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&5
19795 $as_echo "$as_me: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&6;}
19796     fi
19797 
19798     PATH="$RETRY_COMPILER_SAVED_PATH"
19799 
19800     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CC" >&5
19801 $as_echo_n "checking for resolved symbolic links for CC... " >&6; }
19802 
19803     if test "x$OPENJDK_BUILD_OS" != xwindows; then
19804         # Follow a chain of symbolic links. Use readlink
19805         # where it exists, else fall back to horribly
19806         # complicated shell code.
19807         if test "x$READLINK_TESTED" != yes; then
19808             # On MacOSX there is a readlink tool with a different
19809             # purpose than the GNU readlink tool. Check the found readlink.
19810             ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
19811             if test "x$ISGNU" = x; then
19812                  # A readlink that we do not know how to use.
19813                  # Are there other non-GNU readlinks out there?
19814                  READLINK_TESTED=yes
19815                  READLINK=
19816             fi
19817         fi
19818 
19819         if test "x$READLINK" != x; then
19820             PROPER_COMPILER_CC=`$READLINK -f $PROPER_COMPILER_CC`
19821         else
19822             # Save the current directory for restoring afterwards
19823             STARTDIR=$PWD
19824             COUNTER=0
19825             sym_link_dir=`$DIRNAME $PROPER_COMPILER_CC`
19826             sym_link_file=`$BASENAME $PROPER_COMPILER_CC`
19827             cd $sym_link_dir
19828             # Use -P flag to resolve symlinks in directories.
19829             cd `$THEPWDCMD -P`
19830             sym_link_dir=`$THEPWDCMD -P`
19831             # Resolve file symlinks
19832             while test $COUNTER -lt 20; do
19833                 ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
19834                 if test "x$ISLINK" == x; then
19835                     # This is not a symbolic link! We are done!
19836                     break
19837                 fi
19838                 # Again resolve directory symlinks since the target of the just found
19839                 # link could be in a different directory
19840                 cd `$DIRNAME $ISLINK`
19841                 sym_link_dir=`$THEPWDCMD -P`
19842                 sym_link_file=`$BASENAME $ISLINK`
19843                 let COUNTER=COUNTER+1
19844             done
19845             cd $STARTDIR
19846             PROPER_COMPILER_CC=$sym_link_dir/$sym_link_file
19847         fi
19848     fi
19849 
19850     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5
19851 $as_echo "$PROPER_COMPILER_CC" >&6; }
19852     CC="$PROPER_COMPILER_CC"
19853   else
19854     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CC" >&5
19855 $as_echo "no, keeping CC" >&6; }
19856     CC="$TEST_COMPILER"
19857   fi
19858 
19859   COMPILER=$CC
19860   COMPILER_NAME=$COMPILER_NAME
19861 
19862   if test "x$OPENJDK_TARGET_OS" = xsolaris; then
19863     # Make sure we use the Sun Studio compiler and not gcc on Solaris, which won't work
19864     COMPILER_VERSION_TEST=`$COMPILER -V 2>&1 | $HEAD -n 1`
19865     $ECHO $COMPILER_VERSION_TEST | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
19866     if test $? -ne 0; then
19867       GCC_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
19868 
19869       { $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
19870 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required Sun Studio compiler." >&6;}
19871       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&5
19872 $as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&6;}
19873       as_fn_error $? "Sun Studio compiler is required. Try setting --with-tools-dir." "$LINENO" 5
19874     else
19875       COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/p"`
19876       COMPILER_VENDOR="Sun Studio"
19877     fi
19878   elif test  "x$OPENJDK_TARGET_OS" = xwindows; then
19879     # First line typically looks something like:
19880     # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.30319.01 for 80x86
19881     COMPILER_VERSION_TEST=`$COMPILER 2>&1 | $HEAD -n 1`
19882     COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*Version \([1-9][0-9.]*\) .*/\1/p"`
19883     COMPILER_VENDOR="Microsoft CL.EXE"
19884     COMPILER_CPU_TEST=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* for \(.*\)$/\1/p"`
19885     if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
19886       if test "x$COMPILER_CPU_TEST" != "x80x86"; then
19887         as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"80x86\"." "$LINENO" 5
19888       fi
19889     elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
19890       if test "x$COMPILER_CPU_TEST" != "xx64"; then
19891         as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." "$LINENO" 5
19892       fi
19893     fi
19894   else
19895     COMPILER_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
19896     # Check that this is likely to be GCC.
19897     $COMPILER --version 2>&1 | $GREP "Free Software Foundation" > /dev/null
19898     if test $? -ne 0; then
19899       { $as_echo "$as_me:${as_lineno-$LINENO}: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&5
19900 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&6;}
19901       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&5
19902 $as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&6;}
19903       as_fn_error $? "GCC compiler is required. Try setting --with-tools-dir." "$LINENO" 5
19904     fi
19905 
19906     # First line typically looks something like:
19907     # gcc (Ubuntu/Linaro 4.5.2-8ubuntu4) 4.5.2
19908     COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* \([1-9][0-9.]*\)/\1/p"`
19909     COMPILER_VENDOR=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^\(.*\) [1-9][0-9.]*/\1/p"`
19910   fi
19911   # This sets CC_VERSION or CXX_VERSION. (This comment is a grep marker)
19912   CC_VERSION="$COMPILER_VERSION"
19913   # This sets CC_VENDOR or CXX_VENDOR. (This comment is a grep marker)
19914   CC_VENDOR="$COMPILER_VENDOR"
19915 
19916   { $as_echo "$as_me:${as_lineno-$LINENO}: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&5
19917 $as_echo "$as_me: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&6;}
19918 
19919 
19920 # Now that we have resolved CC ourself, let autoconf have its go at it
19921 ac_ext=c
19922 ac_cpp='$CPP $CPPFLAGS'
19923 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
19924 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
19925 ac_compiler_gnu=$ac_cv_c_compiler_gnu
19926 if test -n "$ac_tool_prefix"; then
19927   for ac_prog in $CC
19928   do
19929     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
19930 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
19931 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19932 $as_echo_n "checking for $ac_word... " >&6; }
19933 if test "${ac_cv_prog_CC+set}" = set; then :
19934   $as_echo_n "(cached) " >&6
19935 else
19936   if test -n "$CC"; then
19937   ac_cv_prog_CC="$CC" # Let the user override the test.
19938 else
19939 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19940 for as_dir in $PATH
19941 do
19942   IFS=$as_save_IFS
19943   test -z "$as_dir" && as_dir=.
19944     for ac_exec_ext in '' $ac_executable_extensions; do
19945   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
19946     ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
19947     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19948     break 2
19949   fi
19950 done
19951   done
19952 IFS=$as_save_IFS
19953 
19954 fi
19955 fi
19956 CC=$ac_cv_prog_CC
19957 if test -n "$CC"; then
19958   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
19959 $as_echo "$CC" >&6; }
19960 else
19961   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19962 $as_echo "no" >&6; }
19963 fi
19964 
19965 
19966     test -n "$CC" && break
19967   done
19968 fi
19969 if test -z "$CC"; then
19970   ac_ct_CC=$CC
19971   for ac_prog in $CC
19972 do
19973   # Extract the first word of "$ac_prog", so it can be a program name with args.
19974 set dummy $ac_prog; ac_word=$2
19975 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19976 $as_echo_n "checking for $ac_word... " >&6; }
19977 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
19978   $as_echo_n "(cached) " >&6
19979 else
19980   if test -n "$ac_ct_CC"; then
19981   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
19982 else
19983 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19984 for as_dir in $PATH
19985 do
19986   IFS=$as_save_IFS
19987   test -z "$as_dir" && as_dir=.
19988     for ac_exec_ext in '' $ac_executable_extensions; do
19989   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
19990     ac_cv_prog_ac_ct_CC="$ac_prog"
19991     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19992     break 2
19993   fi
19994 done
19995   done
19996 IFS=$as_save_IFS
19997 
19998 fi
19999 fi
20000 ac_ct_CC=$ac_cv_prog_ac_ct_CC
20001 if test -n "$ac_ct_CC"; then
20002   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
20003 $as_echo "$ac_ct_CC" >&6; }
20004 else
20005   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20006 $as_echo "no" >&6; }
20007 fi
20008 
20009 
20010   test -n "$ac_ct_CC" && break
20011 done
20012 
20013   if test "x$ac_ct_CC" = x; then
20014     CC=""
20015   else
20016     case $cross_compiling:$ac_tool_warned in
20017 yes:)
20018 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
20019 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
20020 ac_tool_warned=yes ;;
20021 esac
20022     CC=$ac_ct_CC
20023   fi
20024 fi
20025 
20026 
20027 test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
20028 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
20029 as_fn_error $? "no acceptable C compiler found in \$PATH
20030 See \`config.log' for more details" "$LINENO" 5 ; }
20031 
20032 # Provide some information about the compiler.
20033 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
20034 set X $ac_compile
20035 ac_compiler=$2
20036 for ac_option in --version -v -V -qversion; do
20037   { { ac_try="$ac_compiler $ac_option >&5"
20038 case "(($ac_try" in
20039   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20040   *) ac_try_echo=$ac_try;;
20041 esac
20042 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
20043 $as_echo "$ac_try_echo"; } >&5
20044   (eval "$ac_compiler $ac_option >&5") 2>conftest.err
20045   ac_status=$?
20046   if test -s conftest.err; then
20047     sed '10a\
20048 ... rest of stderr output deleted ...
20049          10q' conftest.err >conftest.er1
20050     cat conftest.er1 >&5
20051   fi
20052   rm -f conftest.er1 conftest.err
20053   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
20054   test $ac_status = 0; }
20055 done
20056 
20057 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20058 /* end confdefs.h.  */
20059 
20060 int
20061 main ()
20062 {
20063 
20064   ;
20065   return 0;
20066 }
20067 _ACEOF
20068 ac_clean_files_save=$ac_clean_files
20069 ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
20070 # Try to create an executable without -o first, disregard a.out.
20071 # It will help us diagnose broken compilers, and finding out an intuition
20072 # of exeext.
20073 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
20074 $as_echo_n "checking whether the C compiler works... " >&6; }
20075 ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
20076 
20077 # The possible output files:
20078 ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
20079 
20080 ac_rmfiles=
20081 for ac_file in $ac_files
20082 do
20083   case $ac_file in
20084     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
20085     * ) ac_rmfiles="$ac_rmfiles $ac_file";;
20086   esac
20087 done
20088 rm -f $ac_rmfiles
20089 
20090 if { { ac_try="$ac_link_default"
20091 case "(($ac_try" in
20092   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20093   *) ac_try_echo=$ac_try;;
20094 esac
20095 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
20096 $as_echo "$ac_try_echo"; } >&5
20097   (eval "$ac_link_default") 2>&5
20098   ac_status=$?
20099   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
20100   test $ac_status = 0; }; then :
20101   # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
20102 # So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
20103 # in a Makefile.  We should not override ac_cv_exeext if it was cached,
20104 # so that the user can short-circuit this test for compilers unknown to
20105 # Autoconf.
20106 for ac_file in $ac_files ''
20107 do
20108   test -f "$ac_file" || continue
20109   case $ac_file in
20110     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
20111         ;;
20112     [ab].out )
20113         # We found the default executable, but exeext='' is most
20114         # certainly right.
20115         break;;
20116     *.* )
20117         if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
20118         then :; else
20119            ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
20120         fi
20121         # We set ac_cv_exeext here because the later test for it is not
20122         # safe: cross compilers may not add the suffix if given an `-o'
20123         # argument, so we may need to know it at that point already.
20124         # Even if this section looks crufty: it has the advantage of
20125         # actually working.
20126         break;;
20127     * )
20128         break;;
20129   esac
20130 done
20131 test "$ac_cv_exeext" = no && ac_cv_exeext=
20132 
20133 else
20134   ac_file=''
20135 fi
20136 if test -z "$ac_file"; then :
20137   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20138 $as_echo "no" >&6; }
20139 $as_echo "$as_me: failed program was:" >&5
20140 sed 's/^/| /' conftest.$ac_ext >&5
20141 
20142 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
20143 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
20144 as_fn_error 77 "C compiler cannot create executables
20145 See \`config.log' for more details" "$LINENO" 5 ; }
20146 else
20147   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
20148 $as_echo "yes" >&6; }
20149 fi
20150 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
20151 $as_echo_n "checking for C compiler default output file name... " >&6; }
20152 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
20153 $as_echo "$ac_file" >&6; }
20154 ac_exeext=$ac_cv_exeext
20155 
20156 rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
20157 ac_clean_files=$ac_clean_files_save
20158 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
20159 $as_echo_n "checking for suffix of executables... " >&6; }
20160 if { { ac_try="$ac_link"
20161 case "(($ac_try" in
20162   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20163   *) ac_try_echo=$ac_try;;
20164 esac
20165 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
20166 $as_echo "$ac_try_echo"; } >&5
20167   (eval "$ac_link") 2>&5
20168   ac_status=$?
20169   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
20170   test $ac_status = 0; }; then :
20171   # If both `conftest.exe' and `conftest' are `present' (well, observable)
20172 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
20173 # work properly (i.e., refer to `conftest.exe'), while it won't with
20174 # `rm'.
20175 for ac_file in conftest.exe conftest conftest.*; do
20176   test -f "$ac_file" || continue
20177   case $ac_file in
20178     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
20179     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
20180           break;;
20181     * ) break;;
20182   esac
20183 done
20184 else
20185   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
20186 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
20187 as_fn_error $? "cannot compute suffix of executables: cannot compile and link
20188 See \`config.log' for more details" "$LINENO" 5 ; }
20189 fi
20190 rm -f conftest conftest$ac_cv_exeext
20191 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
20192 $as_echo "$ac_cv_exeext" >&6; }
20193 
20194 rm -f conftest.$ac_ext
20195 EXEEXT=$ac_cv_exeext
20196 ac_exeext=$EXEEXT
20197 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20198 /* end confdefs.h.  */
20199 #include <stdio.h>
20200 int
20201 main ()
20202 {
20203 FILE *f = fopen ("conftest.out", "w");
20204  return ferror (f) || fclose (f) != 0;
20205 
20206   ;
20207   return 0;
20208 }
20209 _ACEOF
20210 ac_clean_files="$ac_clean_files conftest.out"
20211 # Check that the compiler produces executables we can run.  If not, either
20212 # the compiler is broken, or we cross compile.
20213 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
20214 $as_echo_n "checking whether we are cross compiling... " >&6; }
20215 if test "$cross_compiling" != yes; then
20216   { { ac_try="$ac_link"
20217 case "(($ac_try" in
20218   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20219   *) ac_try_echo=$ac_try;;
20220 esac
20221 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
20222 $as_echo "$ac_try_echo"; } >&5
20223   (eval "$ac_link") 2>&5
20224   ac_status=$?
20225   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
20226   test $ac_status = 0; }
20227   if { ac_try='./conftest$ac_cv_exeext'
20228   { { case "(($ac_try" in
20229   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20230   *) ac_try_echo=$ac_try;;
20231 esac
20232 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
20233 $as_echo "$ac_try_echo"; } >&5
20234   (eval "$ac_try") 2>&5
20235   ac_status=$?
20236   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
20237   test $ac_status = 0; }; }; then
20238     cross_compiling=no
20239   else
20240     if test "$cross_compiling" = maybe; then
20241         cross_compiling=yes
20242     else
20243         { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
20244 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
20245 as_fn_error $? "cannot run C compiled programs.
20246 If you meant to cross compile, use \`--host'.
20247 See \`config.log' for more details" "$LINENO" 5 ; }
20248     fi
20249   fi
20250 fi
20251 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
20252 $as_echo "$cross_compiling" >&6; }
20253 
20254 rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
20255 ac_clean_files=$ac_clean_files_save
20256 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
20257 $as_echo_n "checking for suffix of object files... " >&6; }
20258 if test "${ac_cv_objext+set}" = set; then :
20259   $as_echo_n "(cached) " >&6
20260 else
20261   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20262 /* end confdefs.h.  */
20263 
20264 int
20265 main ()
20266 {
20267 
20268   ;
20269   return 0;
20270 }
20271 _ACEOF
20272 rm -f conftest.o conftest.obj
20273 if { { ac_try="$ac_compile"
20274 case "(($ac_try" in
20275   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20276   *) ac_try_echo=$ac_try;;
20277 esac
20278 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
20279 $as_echo "$ac_try_echo"; } >&5
20280   (eval "$ac_compile") 2>&5
20281   ac_status=$?
20282   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
20283   test $ac_status = 0; }; then :
20284   for ac_file in conftest.o conftest.obj conftest.*; do
20285   test -f "$ac_file" || continue;
20286   case $ac_file in
20287     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
20288     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
20289        break;;
20290   esac
20291 done
20292 else
20293   $as_echo "$as_me: failed program was:" >&5
20294 sed 's/^/| /' conftest.$ac_ext >&5
20295 
20296 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
20297 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
20298 as_fn_error $? "cannot compute suffix of object files: cannot compile
20299 See \`config.log' for more details" "$LINENO" 5 ; }
20300 fi
20301 rm -f conftest.$ac_cv_objext conftest.$ac_ext
20302 fi
20303 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
20304 $as_echo "$ac_cv_objext" >&6; }
20305 OBJEXT=$ac_cv_objext
20306 ac_objext=$OBJEXT
20307 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
20308 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
20309 if test "${ac_cv_c_compiler_gnu+set}" = set; then :
20310   $as_echo_n "(cached) " >&6
20311 else
20312   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20313 /* end confdefs.h.  */
20314 
20315 int
20316 main ()
20317 {
20318 #ifndef __GNUC__
20319        choke me
20320 #endif
20321 
20322   ;
20323   return 0;
20324 }
20325 _ACEOF
20326 if ac_fn_c_try_compile "$LINENO"; then :
20327   ac_compiler_gnu=yes
20328 else
20329   ac_compiler_gnu=no
20330 fi
20331 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20332 ac_cv_c_compiler_gnu=$ac_compiler_gnu
20333 
20334 fi
20335 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
20336 $as_echo "$ac_cv_c_compiler_gnu" >&6; }
20337 if test $ac_compiler_gnu = yes; then
20338   GCC=yes
20339 else
20340   GCC=
20341 fi
20342 ac_test_CFLAGS=${CFLAGS+set}
20343 ac_save_CFLAGS=$CFLAGS
20344 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
20345 $as_echo_n "checking whether $CC accepts -g... " >&6; }
20346 if test "${ac_cv_prog_cc_g+set}" = set; then :
20347   $as_echo_n "(cached) " >&6
20348 else
20349   ac_save_c_werror_flag=$ac_c_werror_flag
20350    ac_c_werror_flag=yes
20351    ac_cv_prog_cc_g=no
20352    CFLAGS="-g"
20353    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20354 /* end confdefs.h.  */
20355 
20356 int
20357 main ()
20358 {
20359 
20360   ;
20361   return 0;
20362 }
20363 _ACEOF
20364 if ac_fn_c_try_compile "$LINENO"; then :
20365   ac_cv_prog_cc_g=yes
20366 else
20367   CFLAGS=""
20368       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20369 /* end confdefs.h.  */
20370 
20371 int
20372 main ()
20373 {
20374 
20375   ;
20376   return 0;
20377 }
20378 _ACEOF
20379 if ac_fn_c_try_compile "$LINENO"; then :
20380 
20381 else
20382   ac_c_werror_flag=$ac_save_c_werror_flag
20383          CFLAGS="-g"
20384          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20385 /* end confdefs.h.  */
20386 
20387 int
20388 main ()
20389 {
20390 
20391   ;
20392   return 0;
20393 }
20394 _ACEOF
20395 if ac_fn_c_try_compile "$LINENO"; then :
20396   ac_cv_prog_cc_g=yes
20397 fi
20398 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20399 fi
20400 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20401 fi
20402 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20403    ac_c_werror_flag=$ac_save_c_werror_flag
20404 fi
20405 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
20406 $as_echo "$ac_cv_prog_cc_g" >&6; }
20407 if test "$ac_test_CFLAGS" = set; then
20408   CFLAGS=$ac_save_CFLAGS
20409 elif test $ac_cv_prog_cc_g = yes; then
20410   if test "$GCC" = yes; then
20411     CFLAGS="-g -O2"
20412   else
20413     CFLAGS="-g"
20414   fi
20415 else
20416   if test "$GCC" = yes; then
20417     CFLAGS="-O2"
20418   else
20419     CFLAGS=
20420   fi
20421 fi
20422 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
20423 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
20424 if test "${ac_cv_prog_cc_c89+set}" = set; then :
20425   $as_echo_n "(cached) " >&6
20426 else
20427   ac_cv_prog_cc_c89=no
20428 ac_save_CC=$CC
20429 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20430 /* end confdefs.h.  */
20431 #include <stdarg.h>
20432 #include <stdio.h>
20433 #include <sys/types.h>
20434 #include <sys/stat.h>
20435 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
20436 struct buf { int x; };
20437 FILE * (*rcsopen) (struct buf *, struct stat *, int);
20438 static char *e (p, i)
20439      char **p;
20440      int i;
20441 {
20442   return p[i];
20443 }
20444 static char *f (char * (*g) (char **, int), char **p, ...)
20445 {
20446   char *s;
20447   va_list v;
20448   va_start (v,p);
20449   s = g (p, va_arg (v,int));
20450   va_end (v);
20451   return s;
20452 }
20453 
20454 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
20455    function prototypes and stuff, but not '\xHH' hex character constants.
20456    These don't provoke an error unfortunately, instead are silently treated
20457    as 'x'.  The following induces an error, until -std is added to get
20458    proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
20459    array size at least.  It's necessary to write '\x00'==0 to get something
20460    that's true only with -std.  */
20461 int osf4_cc_array ['\x00' == 0 ? 1 : -1];
20462 
20463 /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
20464    inside strings and character constants.  */
20465 #define FOO(x) 'x'
20466 int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
20467 
20468 int test (int i, double x);
20469 struct s1 {int (*f) (int a);};
20470 struct s2 {int (*f) (double a);};
20471 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
20472 int argc;
20473 char **argv;
20474 int
20475 main ()
20476 {
20477 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
20478   ;
20479   return 0;
20480 }
20481 _ACEOF
20482 for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
20483         -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
20484 do
20485   CC="$ac_save_CC $ac_arg"
20486   if ac_fn_c_try_compile "$LINENO"; then :
20487   ac_cv_prog_cc_c89=$ac_arg
20488 fi
20489 rm -f core conftest.err conftest.$ac_objext
20490   test "x$ac_cv_prog_cc_c89" != "xno" && break
20491 done
20492 rm -f conftest.$ac_ext
20493 CC=$ac_save_CC
20494 
20495 fi
20496 # AC_CACHE_VAL
20497 case "x$ac_cv_prog_cc_c89" in
20498   x)
20499     { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
20500 $as_echo "none needed" >&6; } ;;
20501   xno)
20502     { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
20503 $as_echo "unsupported" >&6; } ;;
20504   *)
20505     CC="$CC $ac_cv_prog_cc_c89"
20506     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
20507 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
20508 esac
20509 if test "x$ac_cv_prog_cc_c89" != xno; then :
20510 
20511 fi
20512 
20513 ac_ext=cpp
20514 ac_cpp='$CXXCPP $CPPFLAGS'
20515 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
20516 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
20517 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
20518 
20519 
20520 ### Locate C++ compiler (CXX)
20521 
20522 if test "x$CXX" != x; then
20523   COMPILER_CHECK_LIST="$CXX"
20524 elif test "x$OPENJDK_TARGET_OS" = "xwindows"; then
20525   COMPILER_CHECK_LIST="cl"
20526 elif test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
20527   COMPILER_CHECK_LIST="CC g++"
20528 else
20529   COMPILER_CHECK_LIST="g++ CC"
20530 fi
20531 
20532 
20533   COMPILER_NAME=C++
20534 
20535   CXX=
20536   # If TOOLS_DIR is set, check for all compiler names in there first
20537   # before checking the rest of the PATH.
20538   if test -n "$TOOLS_DIR"; then
20539     PATH_save="$PATH"
20540     PATH="$TOOLS_DIR"
20541     for ac_prog in $COMPILER_CHECK_LIST
20542 do
20543   # Extract the first word of "$ac_prog", so it can be a program name with args.
20544 set dummy $ac_prog; ac_word=$2
20545 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20546 $as_echo_n "checking for $ac_word... " >&6; }
20547 if test "${ac_cv_path_TOOLS_DIR_CXX+set}" = set; then :
20548   $as_echo_n "(cached) " >&6
20549 else
20550   case $TOOLS_DIR_CXX in
20551   [\\/]* | ?:[\\/]*)
20552   ac_cv_path_TOOLS_DIR_CXX="$TOOLS_DIR_CXX" # Let the user override the test with a path.
20553   ;;
20554   *)
20555   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20556 for as_dir in $PATH
20557 do
20558   IFS=$as_save_IFS
20559   test -z "$as_dir" && as_dir=.
20560     for ac_exec_ext in '' $ac_executable_extensions; do
20561   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
20562     ac_cv_path_TOOLS_DIR_CXX="$as_dir/$ac_word$ac_exec_ext"
20563     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20564     break 2
20565   fi
20566 done
20567   done
20568 IFS=$as_save_IFS
20569 
20570   ;;
20571 esac
20572 fi
20573 TOOLS_DIR_CXX=$ac_cv_path_TOOLS_DIR_CXX
20574 if test -n "$TOOLS_DIR_CXX"; then
20575   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLS_DIR_CXX" >&5
20576 $as_echo "$TOOLS_DIR_CXX" >&6; }
20577 else
20578   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20579 $as_echo "no" >&6; }
20580 fi
20581 
20582 
20583   test -n "$TOOLS_DIR_CXX" && break
20584 done
20585 
20586     CXX=$TOOLS_DIR_CXX
20587     PATH="$PATH_save"
20588   fi
20589 
20590   # AC_PATH_PROGS can't be run multiple times with the same variable,
20591   # so create a new name for this run.
20592   if test "x$CXX" = x; then
20593     for ac_prog in $COMPILER_CHECK_LIST
20594 do
20595   # Extract the first word of "$ac_prog", so it can be a program name with args.
20596 set dummy $ac_prog; ac_word=$2
20597 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20598 $as_echo_n "checking for $ac_word... " >&6; }
20599 if test "${ac_cv_path_POTENTIAL_CXX+set}" = set; then :
20600   $as_echo_n "(cached) " >&6
20601 else
20602   case $POTENTIAL_CXX in
20603   [\\/]* | ?:[\\/]*)
20604   ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
20605   ;;
20606   *)
20607   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20608 for as_dir in $PATH
20609 do
20610   IFS=$as_save_IFS
20611   test -z "$as_dir" && as_dir=.
20612     for ac_exec_ext in '' $ac_executable_extensions; do
20613   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
20614     ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
20615     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20616     break 2
20617   fi
20618 done
20619   done
20620 IFS=$as_save_IFS
20621 
20622   ;;
20623 esac
20624 fi
20625 POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
20626 if test -n "$POTENTIAL_CXX"; then
20627   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
20628 $as_echo "$POTENTIAL_CXX" >&6; }
20629 else
20630   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20631 $as_echo "no" >&6; }
20632 fi
20633 
20634 
20635   test -n "$POTENTIAL_CXX" && break
20636 done
20637 
20638     CXX=$POTENTIAL_CXX
20639   fi
20640 
20641   if test "x$CXX" = x; then
20642 
20643     # Print a helpful message on how to acquire the necessary build dependency.
20644     # devkit is the help tag: freetyp2, cups, pulse, alsa etc
20645     MISSING_DEPENDENCY=devkit
20646     PKGHANDLER_COMMAND=
20647 
20648     case $PKGHANDLER in
20649         apt-get)
20650                 apt_help     $MISSING_DEPENDENCY ;;
20651     yum)
20652                 yum_help     $MISSING_DEPENDENCY ;;
20653         port)
20654                 port_help    $MISSING_DEPENDENCY ;;
20655         pkgutil)
20656                 pkgutil_help $MISSING_DEPENDENCY ;;
20657         pkgadd)
20658                 pkgadd_help  $MISSING_DEPENDENCY ;;
20659     * )
20660       break ;;
20661     esac
20662 
20663     if test "x$PKGHANDLER_COMMAND" != x; then
20664         HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
20665     fi
20666 
20667       as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
20668   fi
20669 
20670   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20671 
20672   # First separate the path from the arguments. This will split at the first
20673   # space.
20674   complete="$CXX"
20675   path="${complete%% *}"
20676   tmp="$complete EOL"
20677   arguments="${tmp#* }"
20678 
20679   # Input might be given as Windows format, start by converting to
20680   # unix format.
20681   new_path=`$CYGPATH -u "$path"`
20682 
20683   # Now try to locate executable using which
20684   new_path=`$WHICH "$new_path" 2> /dev/null`
20685   # bat and cmd files are not always considered executable in cygwin causing which
20686   # to not find them
20687   if test "x$new_path" = x \
20688            && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20689            && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20690     new_path=`$CYGPATH -u "$path"`
20691   fi
20692   if test "x$new_path" = x; then
20693     # Oops. Which didn't find the executable.
20694     # The splitting of arguments from the executable at a space might have been incorrect,
20695     # since paths with space are more likely in Windows. Give it another try with the whole
20696     # argument.
20697     path="$complete"
20698     arguments="EOL"
20699     new_path=`$CYGPATH -u "$path"`
20700     new_path=`$WHICH "$new_path" 2> /dev/null`
20701     # bat and cmd files are not always considered executable in cygwin causing which
20702     # to not find them
20703     if test "x$new_path" = x \
20704              && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20705              && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20706       new_path=`$CYGPATH -u "$path"`
20707     fi
20708     if test "x$new_path" = x; then
20709       # It's still not found. Now this is an unrecoverable error.
20710       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
20711 $as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
20712       has_space=`$ECHO "$complete" | $GREP " "`
20713       if test "x$has_space" != x; then
20714         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20715 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20716       fi
20717       as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
20718     fi
20719   fi
20720 
20721   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20722   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20723   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20724   # "foo.exe" is OK but "foo" is an error.
20725   #
20726   # This test is therefore slightly more accurate than "test -f" to check for file precense.
20727   # It is also a way to make sure we got the proper file name for the real test later on.
20728   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20729   if test "x$test_shortpath" = x; then
20730     # Short path failed, file does not exist as specified.
20731     # Try adding .exe or .cmd
20732     if test -f "${new_path}.exe"; then
20733        input_to_shortpath="${new_path}.exe"
20734     elif test -f "${new_path}.cmd"; then
20735        input_to_shortpath="${new_path}.cmd"
20736     else
20737       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$new_path\", is invalid." >&5
20738 $as_echo "$as_me: The path of CXX, which resolves as \"$new_path\", is invalid." >&6;}
20739       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
20740 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
20741       as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
20742     fi
20743   else
20744     input_to_shortpath="$new_path"
20745   fi
20746 
20747   # Call helper function which possibly converts this using DOS-style short mode.
20748   # If so, the updated path is stored in $new_path.
20749   new_path="$input_to_shortpath"
20750 
20751   input_path="$input_to_shortpath"
20752   # Check if we need to convert this using DOS-style short mode. If the path
20753   # contains just simple characters, use it. Otherwise (spaces, weird characters),
20754   # take no chances and rewrite it.
20755   # Note: m4 eats our [], so we need to use [ and ] instead.
20756   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20757   if test "x$has_forbidden_chars" != x; then
20758     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20759     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20760     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20761     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20762       # Going to short mode and back again did indeed matter. Since short mode is
20763       # case insensitive, let's make it lowercase to improve readability.
20764       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20765       # Now convert it back to Unix-stile (cygpath)
20766       input_path=`$CYGPATH -u "$shortmode_path"`
20767       new_path="$input_path"
20768     fi
20769   fi
20770 
20771   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20772   if test "x$test_cygdrive_prefix" = x; then
20773     # As a simple fix, exclude /usr/bin since it's not a real path.
20774     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
20775       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20776       # a path prefixed by /cygdrive for fixpath to work.
20777       new_path="$CYGWIN_ROOT_PATH$input_path"
20778     fi
20779   fi
20780 
20781   # remove trailing .exe if any
20782   new_path="${new_path/%.exe/}"
20783 
20784   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20785 
20786   # First separate the path from the arguments. This will split at the first
20787   # space.
20788   complete="$CXX"
20789   path="${complete%% *}"
20790   tmp="$complete EOL"
20791   arguments="${tmp#* }"
20792 
20793   # Input might be given as Windows format, start by converting to
20794   # unix format.
20795   new_path="$path"
20796 
20797   windows_path="$new_path"
20798   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20799     unix_path=`$CYGPATH -u "$windows_path"`
20800     new_path="$unix_path"
20801   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20802     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20803     new_path="$unix_path"
20804   fi
20805 
20806 
20807   # Now try to locate executable using which
20808   new_path=`$WHICH "$new_path" 2> /dev/null`
20809 
20810   if test "x$new_path" = x; then
20811     # Oops. Which didn't find the executable.
20812     # The splitting of arguments from the executable at a space might have been incorrect,
20813     # since paths with space are more likely in Windows. Give it another try with the whole
20814     # argument.
20815     path="$complete"
20816     arguments="EOL"
20817     new_path="$path"
20818 
20819   windows_path="$new_path"
20820   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20821     unix_path=`$CYGPATH -u "$windows_path"`
20822     new_path="$unix_path"
20823   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20824     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20825     new_path="$unix_path"
20826   fi
20827 
20828 
20829     new_path=`$WHICH "$new_path" 2> /dev/null`
20830 
20831     if test "x$new_path" = x; then
20832       # It's still not found. Now this is an unrecoverable error.
20833       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
20834 $as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
20835       has_space=`$ECHO "$complete" | $GREP " "`
20836       if test "x$has_space" != x; then
20837         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20838 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20839       fi
20840       as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
20841     fi
20842   fi
20843 
20844   # Now new_path has a complete unix path to the binary
20845   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
20846     # Keep paths in /bin as-is, but remove trailing .exe if any
20847     new_path="${new_path/%.exe/}"
20848     # Do not save /bin paths to all_fixpath_prefixes!
20849   else
20850     # Not in mixed or Windows style, start by that.
20851     new_path=`cmd //c echo $new_path`
20852 
20853   input_path="$new_path"
20854   # Check if we need to convert this using DOS-style short mode. If the path
20855   # contains just simple characters, use it. Otherwise (spaces, weird characters),
20856   # take no chances and rewrite it.
20857   # Note: m4 eats our [], so we need to use [ and ] instead.
20858   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20859   if test "x$has_forbidden_chars" != x; then
20860     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20861     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20862   fi
20863 
20864     # Output is in $new_path
20865 
20866   windows_path="$new_path"
20867   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20868     unix_path=`$CYGPATH -u "$windows_path"`
20869     new_path="$unix_path"
20870   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20871     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20872     new_path="$unix_path"
20873   fi
20874 
20875     # remove trailing .exe if any
20876     new_path="${new_path/%.exe/}"
20877 
20878     # Save the first 10 bytes of this path to the storage, so fixpath can work.
20879     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20880   fi
20881 
20882   else
20883     # We're on a posix platform. Hooray! :)
20884     # First separate the path from the arguments. This will split at the first
20885     # space.
20886     complete="$CXX"
20887     path="${complete%% *}"
20888     tmp="$complete EOL"
20889     arguments="${tmp#* }"
20890 
20891     # Cannot rely on the command "which" here since it doesn't always work.
20892     is_absolute_path=`$ECHO "$path" | $GREP ^/`
20893     if test -z "$is_absolute_path"; then
20894       # Path to executable is not absolute. Find it.
20895       IFS_save="$IFS"
20896       IFS=:
20897       for p in $PATH; do
20898         if test -f "$p/$path" && test -x "$p/$path"; then
20899           new_path="$p/$path"
20900           break
20901         fi
20902       done
20903       IFS="$IFS_save"
20904     else
20905       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CXX (as $path) failed, using $path directly." >&5
20906 $as_echo "$as_me: Resolving CXX (as $path) failed, using $path directly." >&6;}
20907       new_path="$path"
20908     fi
20909 
20910     if test "x$new_path" = x; then
20911         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
20912 $as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
20913         has_space=`$ECHO "$complete" | $GREP " "`
20914         if test "x$has_space" != x; then
20915           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
20916 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
20917         fi
20918         as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
20919       fi
20920   fi
20921 
20922       # Now join together the path and the arguments once again
20923       if test "x$arguments" != xEOL; then
20924         new_complete="$new_path ${arguments% *}"
20925       else
20926         new_complete="$new_path"
20927       fi
20928 
20929   if test "x$complete" != "x$new_complete"; then
20930       CXX="$new_complete"
20931       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXX to \"$new_complete\"" >&5
20932 $as_echo "$as_me: Rewriting CXX to \"$new_complete\"" >&6;}
20933     fi
20934 
20935   { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CXX" >&5
20936 $as_echo_n "checking resolved symbolic links for CXX... " >&6; }
20937   TEST_COMPILER="$CXX"
20938 
20939     if test "x$OPENJDK_BUILD_OS" != xwindows; then
20940         # Follow a chain of symbolic links. Use readlink
20941         # where it exists, else fall back to horribly
20942         # complicated shell code.
20943         if test "x$READLINK_TESTED" != yes; then
20944             # On MacOSX there is a readlink tool with a different
20945             # purpose than the GNU readlink tool. Check the found readlink.
20946             ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
20947             if test "x$ISGNU" = x; then
20948                  # A readlink that we do not know how to use.
20949                  # Are there other non-GNU readlinks out there?
20950                  READLINK_TESTED=yes
20951                  READLINK=
20952             fi
20953         fi
20954 
20955         if test "x$READLINK" != x; then
20956             TEST_COMPILER=`$READLINK -f $TEST_COMPILER`
20957         else
20958             # Save the current directory for restoring afterwards
20959             STARTDIR=$PWD
20960             COUNTER=0
20961             sym_link_dir=`$DIRNAME $TEST_COMPILER`
20962             sym_link_file=`$BASENAME $TEST_COMPILER`
20963             cd $sym_link_dir
20964             # Use -P flag to resolve symlinks in directories.
20965             cd `$THEPWDCMD -P`
20966             sym_link_dir=`$THEPWDCMD -P`
20967             # Resolve file symlinks
20968             while test $COUNTER -lt 20; do
20969                 ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
20970                 if test "x$ISLINK" == x; then
20971                     # This is not a symbolic link! We are done!
20972                     break
20973                 fi
20974                 # Again resolve directory symlinks since the target of the just found
20975                 # link could be in a different directory
20976                 cd `$DIRNAME $ISLINK`
20977                 sym_link_dir=`$THEPWDCMD -P`
20978                 sym_link_file=`$BASENAME $ISLINK`
20979                 let COUNTER=COUNTER+1
20980             done
20981             cd $STARTDIR
20982             TEST_COMPILER=$sym_link_dir/$sym_link_file
20983         fi
20984     fi
20985 
20986   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_COMPILER" >&5
20987 $as_echo "$TEST_COMPILER" >&6; }
20988   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CXX is disguised ccache" >&5
20989 $as_echo_n "checking if CXX is disguised ccache... " >&6; }
20990 
20991   COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"`
20992   if test "x$COMPILER_BASENAME" = "xccache"; then
20993     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5
20994 $as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; }
20995     # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache.
20996     # We want to control ccache invocation ourselves, so ignore this cc and try
20997     # searching again.
20998 
20999     # Remove the path to the fake ccache cc from the PATH
21000     RETRY_COMPILER_SAVED_PATH="$PATH"
21001     COMPILER_DIRNAME=`$DIRNAME $CXX`
21002     PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`"
21003 
21004     # Try again looking for our compiler
21005     if test -n "$ac_tool_prefix"; then
21006   for ac_prog in $COMPILER_CHECK_LIST
21007   do
21008     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
21009 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
21010 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21011 $as_echo_n "checking for $ac_word... " >&6; }
21012 if test "${ac_cv_prog_PROPER_COMPILER_CXX+set}" = set; then :
21013   $as_echo_n "(cached) " >&6
21014 else
21015   if test -n "$PROPER_COMPILER_CXX"; then
21016   ac_cv_prog_PROPER_COMPILER_CXX="$PROPER_COMPILER_CXX" # Let the user override the test.
21017 else
21018 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21019 for as_dir in $PATH
21020 do
21021   IFS=$as_save_IFS
21022   test -z "$as_dir" && as_dir=.
21023     for ac_exec_ext in '' $ac_executable_extensions; do
21024   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
21025     ac_cv_prog_PROPER_COMPILER_CXX="$ac_tool_prefix$ac_prog"
21026     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21027     break 2
21028   fi
21029 done
21030   done
21031 IFS=$as_save_IFS
21032 
21033 fi
21034 fi
21035 PROPER_COMPILER_CXX=$ac_cv_prog_PROPER_COMPILER_CXX
21036 if test -n "$PROPER_COMPILER_CXX"; then
21037   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5
21038 $as_echo "$PROPER_COMPILER_CXX" >&6; }
21039 else
21040   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21041 $as_echo "no" >&6; }
21042 fi
21043 
21044 
21045     test -n "$PROPER_COMPILER_CXX" && break
21046   done
21047 fi
21048 if test -z "$PROPER_COMPILER_CXX"; then
21049   ac_ct_PROPER_COMPILER_CXX=$PROPER_COMPILER_CXX
21050   for ac_prog in $COMPILER_CHECK_LIST
21051 do
21052   # Extract the first word of "$ac_prog", so it can be a program name with args.
21053 set dummy $ac_prog; ac_word=$2
21054 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21055 $as_echo_n "checking for $ac_word... " >&6; }
21056 if test "${ac_cv_prog_ac_ct_PROPER_COMPILER_CXX+set}" = set; then :
21057   $as_echo_n "(cached) " >&6
21058 else
21059   if test -n "$ac_ct_PROPER_COMPILER_CXX"; then
21060   ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_ct_PROPER_COMPILER_CXX" # Let the user override the test.
21061 else
21062 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21063 for as_dir in $PATH
21064 do
21065   IFS=$as_save_IFS
21066   test -z "$as_dir" && as_dir=.
21067     for ac_exec_ext in '' $ac_executable_extensions; do
21068   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
21069     ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_prog"
21070     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21071     break 2
21072   fi
21073 done
21074   done
21075 IFS=$as_save_IFS
21076 
21077 fi
21078 fi
21079 ac_ct_PROPER_COMPILER_CXX=$ac_cv_prog_ac_ct_PROPER_COMPILER_CXX
21080 if test -n "$ac_ct_PROPER_COMPILER_CXX"; then
21081   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CXX" >&5
21082 $as_echo "$ac_ct_PROPER_COMPILER_CXX" >&6; }
21083 else
21084   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21085 $as_echo "no" >&6; }
21086 fi
21087 
21088 
21089   test -n "$ac_ct_PROPER_COMPILER_CXX" && break
21090 done
21091 
21092   if test "x$ac_ct_PROPER_COMPILER_CXX" = x; then
21093     PROPER_COMPILER_CXX=""
21094   else
21095     case $cross_compiling:$ac_tool_warned in
21096 yes:)
21097 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
21098 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
21099 ac_tool_warned=yes ;;
21100 esac
21101     PROPER_COMPILER_CXX=$ac_ct_PROPER_COMPILER_CXX
21102   fi
21103 fi
21104 
21105 
21106   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21107 
21108   # First separate the path from the arguments. This will split at the first
21109   # space.
21110   complete="$PROPER_COMPILER_CXX"
21111   path="${complete%% *}"
21112   tmp="$complete EOL"
21113   arguments="${tmp#* }"
21114 
21115   # Input might be given as Windows format, start by converting to
21116   # unix format.
21117   new_path=`$CYGPATH -u "$path"`
21118 
21119   # Now try to locate executable using which
21120   new_path=`$WHICH "$new_path" 2> /dev/null`
21121   # bat and cmd files are not always considered executable in cygwin causing which
21122   # to not find them
21123   if test "x$new_path" = x \
21124            && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21125            && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21126     new_path=`$CYGPATH -u "$path"`
21127   fi
21128   if test "x$new_path" = x; then
21129     # Oops. Which didn't find the executable.
21130     # The splitting of arguments from the executable at a space might have been incorrect,
21131     # since paths with space are more likely in Windows. Give it another try with the whole
21132     # argument.
21133     path="$complete"
21134     arguments="EOL"
21135     new_path=`$CYGPATH -u "$path"`
21136     new_path=`$WHICH "$new_path" 2> /dev/null`
21137     # bat and cmd files are not always considered executable in cygwin causing which
21138     # to not find them
21139     if test "x$new_path" = x \
21140              && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21141              && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21142       new_path=`$CYGPATH -u "$path"`
21143     fi
21144     if test "x$new_path" = x; then
21145       # It's still not found. Now this is an unrecoverable error.
21146       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
21147 $as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
21148       has_space=`$ECHO "$complete" | $GREP " "`
21149       if test "x$has_space" != x; then
21150         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21151 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21152       fi
21153       as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
21154     fi
21155   fi
21156 
21157   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21158   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21159   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21160   # "foo.exe" is OK but "foo" is an error.
21161   #
21162   # This test is therefore slightly more accurate than "test -f" to check for file precense.
21163   # It is also a way to make sure we got the proper file name for the real test later on.
21164   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21165   if test "x$test_shortpath" = x; then
21166     # Short path failed, file does not exist as specified.
21167     # Try adding .exe or .cmd
21168     if test -f "${new_path}.exe"; then
21169        input_to_shortpath="${new_path}.exe"
21170     elif test -f "${new_path}.cmd"; then
21171        input_to_shortpath="${new_path}.cmd"
21172     else
21173       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&5
21174 $as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&6;}
21175       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
21176 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
21177       as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
21178     fi
21179   else
21180     input_to_shortpath="$new_path"
21181   fi
21182 
21183   # Call helper function which possibly converts this using DOS-style short mode.
21184   # If so, the updated path is stored in $new_path.
21185   new_path="$input_to_shortpath"
21186 
21187   input_path="$input_to_shortpath"
21188   # Check if we need to convert this using DOS-style short mode. If the path
21189   # contains just simple characters, use it. Otherwise (spaces, weird characters),
21190   # take no chances and rewrite it.
21191   # Note: m4 eats our [], so we need to use [ and ] instead.
21192   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21193   if test "x$has_forbidden_chars" != x; then
21194     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21195     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21196     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21197     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21198       # Going to short mode and back again did indeed matter. Since short mode is
21199       # case insensitive, let's make it lowercase to improve readability.
21200       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21201       # Now convert it back to Unix-stile (cygpath)
21202       input_path=`$CYGPATH -u "$shortmode_path"`
21203       new_path="$input_path"
21204     fi
21205   fi
21206 
21207   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21208   if test "x$test_cygdrive_prefix" = x; then
21209     # As a simple fix, exclude /usr/bin since it's not a real path.
21210     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
21211       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21212       # a path prefixed by /cygdrive for fixpath to work.
21213       new_path="$CYGWIN_ROOT_PATH$input_path"
21214     fi
21215   fi
21216 
21217   # remove trailing .exe if any
21218   new_path="${new_path/%.exe/}"
21219 
21220   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21221 
21222   # First separate the path from the arguments. This will split at the first
21223   # space.
21224   complete="$PROPER_COMPILER_CXX"
21225   path="${complete%% *}"
21226   tmp="$complete EOL"
21227   arguments="${tmp#* }"
21228 
21229   # Input might be given as Windows format, start by converting to
21230   # unix format.
21231   new_path="$path"
21232 
21233   windows_path="$new_path"
21234   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21235     unix_path=`$CYGPATH -u "$windows_path"`
21236     new_path="$unix_path"
21237   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21238     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21239     new_path="$unix_path"
21240   fi
21241 
21242 
21243   # Now try to locate executable using which
21244   new_path=`$WHICH "$new_path" 2> /dev/null`
21245 
21246   if test "x$new_path" = x; then
21247     # Oops. Which didn't find the executable.
21248     # The splitting of arguments from the executable at a space might have been incorrect,
21249     # since paths with space are more likely in Windows. Give it another try with the whole
21250     # argument.
21251     path="$complete"
21252     arguments="EOL"
21253     new_path="$path"
21254 
21255   windows_path="$new_path"
21256   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21257     unix_path=`$CYGPATH -u "$windows_path"`
21258     new_path="$unix_path"
21259   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21260     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21261     new_path="$unix_path"
21262   fi
21263 
21264 
21265     new_path=`$WHICH "$new_path" 2> /dev/null`
21266 
21267     if test "x$new_path" = x; then
21268       # It's still not found. Now this is an unrecoverable error.
21269       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
21270 $as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
21271       has_space=`$ECHO "$complete" | $GREP " "`
21272       if test "x$has_space" != x; then
21273         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21274 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21275       fi
21276       as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
21277     fi
21278   fi
21279 
21280   # Now new_path has a complete unix path to the binary
21281   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
21282     # Keep paths in /bin as-is, but remove trailing .exe if any
21283     new_path="${new_path/%.exe/}"
21284     # Do not save /bin paths to all_fixpath_prefixes!
21285   else
21286     # Not in mixed or Windows style, start by that.
21287     new_path=`cmd //c echo $new_path`
21288 
21289   input_path="$new_path"
21290   # Check if we need to convert this using DOS-style short mode. If the path
21291   # contains just simple characters, use it. Otherwise (spaces, weird characters),
21292   # take no chances and rewrite it.
21293   # Note: m4 eats our [], so we need to use [ and ] instead.
21294   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21295   if test "x$has_forbidden_chars" != x; then
21296     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21297     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21298   fi
21299 
21300     # Output is in $new_path
21301 
21302   windows_path="$new_path"
21303   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21304     unix_path=`$CYGPATH -u "$windows_path"`
21305     new_path="$unix_path"
21306   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21307     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21308     new_path="$unix_path"
21309   fi
21310 
21311     # remove trailing .exe if any
21312     new_path="${new_path/%.exe/}"
21313 
21314     # Save the first 10 bytes of this path to the storage, so fixpath can work.
21315     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21316   fi
21317 
21318   else
21319     # We're on a posix platform. Hooray! :)
21320     # First separate the path from the arguments. This will split at the first
21321     # space.
21322     complete="$PROPER_COMPILER_CXX"
21323     path="${complete%% *}"
21324     tmp="$complete EOL"
21325     arguments="${tmp#* }"
21326 
21327     # Cannot rely on the command "which" here since it doesn't always work.
21328     is_absolute_path=`$ECHO "$path" | $GREP ^/`
21329     if test -z "$is_absolute_path"; then
21330       # Path to executable is not absolute. Find it.
21331       IFS_save="$IFS"
21332       IFS=:
21333       for p in $PATH; do
21334         if test -f "$p/$path" && test -x "$p/$path"; then
21335           new_path="$p/$path"
21336           break
21337         fi
21338       done
21339       IFS="$IFS_save"
21340     else
21341       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving PROPER_COMPILER_CXX (as $path) failed, using $path directly." >&5
21342 $as_echo "$as_me: Resolving PROPER_COMPILER_CXX (as $path) failed, using $path directly." >&6;}
21343       new_path="$path"
21344     fi
21345 
21346     if test "x$new_path" = x; then
21347         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
21348 $as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
21349         has_space=`$ECHO "$complete" | $GREP " "`
21350         if test "x$has_space" != x; then
21351           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
21352 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
21353         fi
21354         as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
21355       fi
21356   fi
21357 
21358       # Now join together the path and the arguments once again
21359       if test "x$arguments" != xEOL; then
21360         new_complete="$new_path ${arguments% *}"
21361       else
21362         new_complete="$new_path"
21363       fi
21364 
21365   if test "x$complete" != "x$new_complete"; then
21366       PROPER_COMPILER_CXX="$new_complete"
21367       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&5
21368 $as_echo "$as_me: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&6;}
21369     fi
21370 
21371     PATH="$RETRY_COMPILER_SAVED_PATH"
21372 
21373     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CXX" >&5
21374 $as_echo_n "checking for resolved symbolic links for CXX... " >&6; }
21375 
21376     if test "x$OPENJDK_BUILD_OS" != xwindows; then
21377         # Follow a chain of symbolic links. Use readlink
21378         # where it exists, else fall back to horribly
21379         # complicated shell code.
21380         if test "x$READLINK_TESTED" != yes; then
21381             # On MacOSX there is a readlink tool with a different
21382             # purpose than the GNU readlink tool. Check the found readlink.
21383             ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
21384             if test "x$ISGNU" = x; then
21385                  # A readlink that we do not know how to use.
21386                  # Are there other non-GNU readlinks out there?
21387                  READLINK_TESTED=yes
21388                  READLINK=
21389             fi
21390         fi
21391 
21392         if test "x$READLINK" != x; then
21393             PROPER_COMPILER_CXX=`$READLINK -f $PROPER_COMPILER_CXX`
21394         else
21395             # Save the current directory for restoring afterwards
21396             STARTDIR=$PWD
21397             COUNTER=0
21398             sym_link_dir=`$DIRNAME $PROPER_COMPILER_CXX`
21399             sym_link_file=`$BASENAME $PROPER_COMPILER_CXX`
21400             cd $sym_link_dir
21401             # Use -P flag to resolve symlinks in directories.
21402             cd `$THEPWDCMD -P`
21403             sym_link_dir=`$THEPWDCMD -P`
21404             # Resolve file symlinks
21405             while test $COUNTER -lt 20; do
21406                 ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
21407                 if test "x$ISLINK" == x; then
21408                     # This is not a symbolic link! We are done!
21409                     break
21410                 fi
21411                 # Again resolve directory symlinks since the target of the just found
21412                 # link could be in a different directory
21413                 cd `$DIRNAME $ISLINK`
21414                 sym_link_dir=`$THEPWDCMD -P`
21415                 sym_link_file=`$BASENAME $ISLINK`
21416                 let COUNTER=COUNTER+1
21417             done
21418             cd $STARTDIR
21419             PROPER_COMPILER_CXX=$sym_link_dir/$sym_link_file
21420         fi
21421     fi
21422 
21423     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5
21424 $as_echo "$PROPER_COMPILER_CXX" >&6; }
21425     CXX="$PROPER_COMPILER_CXX"
21426   else
21427     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CXX" >&5
21428 $as_echo "no, keeping CXX" >&6; }
21429     CXX="$TEST_COMPILER"
21430   fi
21431 
21432   COMPILER=$CXX
21433   COMPILER_NAME=$COMPILER_NAME
21434 
21435   if test "x$OPENJDK_TARGET_OS" = xsolaris; then
21436     # Make sure we use the Sun Studio compiler and not gcc on Solaris, which won't work
21437     COMPILER_VERSION_TEST=`$COMPILER -V 2>&1 | $HEAD -n 1`
21438     $ECHO $COMPILER_VERSION_TEST | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
21439     if test $? -ne 0; then
21440       GCC_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
21441 
21442       { $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
21443 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required Sun Studio compiler." >&6;}
21444       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&5
21445 $as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&6;}
21446       as_fn_error $? "Sun Studio compiler is required. Try setting --with-tools-dir." "$LINENO" 5
21447     else
21448       COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/p"`
21449       COMPILER_VENDOR="Sun Studio"
21450     fi
21451   elif test  "x$OPENJDK_TARGET_OS" = xwindows; then
21452     # First line typically looks something like:
21453     # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.30319.01 for 80x86
21454     COMPILER_VERSION_TEST=`$COMPILER 2>&1 | $HEAD -n 1`
21455     COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*Version \([1-9][0-9.]*\) .*/\1/p"`
21456     COMPILER_VENDOR="Microsoft CL.EXE"
21457     COMPILER_CPU_TEST=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* for \(.*\)$/\1/p"`
21458     if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
21459       if test "x$COMPILER_CPU_TEST" != "x80x86"; then
21460         as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"80x86\"." "$LINENO" 5
21461       fi
21462     elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
21463       if test "x$COMPILER_CPU_TEST" != "xx64"; then
21464         as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." "$LINENO" 5
21465       fi
21466     fi
21467   else
21468     COMPILER_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
21469     # Check that this is likely to be GCC.
21470     $COMPILER --version 2>&1 | $GREP "Free Software Foundation" > /dev/null
21471     if test $? -ne 0; then
21472       { $as_echo "$as_me:${as_lineno-$LINENO}: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&5
21473 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&6;}
21474       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&5
21475 $as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&6;}
21476       as_fn_error $? "GCC compiler is required. Try setting --with-tools-dir." "$LINENO" 5
21477     fi
21478 
21479     # First line typically looks something like:
21480     # gcc (Ubuntu/Linaro 4.5.2-8ubuntu4) 4.5.2
21481     COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* \([1-9][0-9.]*\)/\1/p"`
21482     COMPILER_VENDOR=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^\(.*\) [1-9][0-9.]*/\1/p"`
21483   fi
21484   # This sets CC_VERSION or CXX_VERSION. (This comment is a grep marker)
21485   CXX_VERSION="$COMPILER_VERSION"
21486   # This sets CC_VENDOR or CXX_VENDOR. (This comment is a grep marker)
21487   CXX_VENDOR="$COMPILER_VENDOR"
21488 
21489   { $as_echo "$as_me:${as_lineno-$LINENO}: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&5
21490 $as_echo "$as_me: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&6;}
21491 
21492 
21493 # Now that we have resolved CXX ourself, let autoconf have its go at it
21494 ac_ext=cpp
21495 ac_cpp='$CXXCPP $CPPFLAGS'
21496 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
21497 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
21498 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
21499 if test -z "$CXX"; then
21500   if test -n "$CCC"; then
21501     CXX=$CCC
21502   else
21503     if test -n "$ac_tool_prefix"; then
21504   for ac_prog in $CXX
21505   do
21506     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
21507 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
21508 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21509 $as_echo_n "checking for $ac_word... " >&6; }
21510 if test "${ac_cv_prog_CXX+set}" = set; then :
21511   $as_echo_n "(cached) " >&6
21512 else
21513   if test -n "$CXX"; then
21514   ac_cv_prog_CXX="$CXX" # Let the user override the test.
21515 else
21516 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21517 for as_dir in $PATH
21518 do
21519   IFS=$as_save_IFS
21520   test -z "$as_dir" && as_dir=.
21521     for ac_exec_ext in '' $ac_executable_extensions; do
21522   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
21523     ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
21524     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21525     break 2
21526   fi
21527 done
21528   done
21529 IFS=$as_save_IFS
21530 
21531 fi
21532 fi
21533 CXX=$ac_cv_prog_CXX
21534 if test -n "$CXX"; then
21535   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
21536 $as_echo "$CXX" >&6; }
21537 else
21538   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21539 $as_echo "no" >&6; }
21540 fi
21541 
21542 
21543     test -n "$CXX" && break
21544   done
21545 fi
21546 if test -z "$CXX"; then
21547   ac_ct_CXX=$CXX
21548   for ac_prog in $CXX
21549 do
21550   # Extract the first word of "$ac_prog", so it can be a program name with args.
21551 set dummy $ac_prog; ac_word=$2
21552 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21553 $as_echo_n "checking for $ac_word... " >&6; }
21554 if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then :
21555   $as_echo_n "(cached) " >&6
21556 else
21557   if test -n "$ac_ct_CXX"; then
21558   ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
21559 else
21560 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21561 for as_dir in $PATH
21562 do
21563   IFS=$as_save_IFS
21564   test -z "$as_dir" && as_dir=.
21565     for ac_exec_ext in '' $ac_executable_extensions; do
21566   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
21567     ac_cv_prog_ac_ct_CXX="$ac_prog"
21568     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21569     break 2
21570   fi
21571 done
21572   done
21573 IFS=$as_save_IFS
21574 
21575 fi
21576 fi
21577 ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
21578 if test -n "$ac_ct_CXX"; then
21579   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
21580 $as_echo "$ac_ct_CXX" >&6; }
21581 else
21582   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21583 $as_echo "no" >&6; }
21584 fi
21585 
21586 
21587   test -n "$ac_ct_CXX" && break
21588 done
21589 
21590   if test "x$ac_ct_CXX" = x; then
21591     CXX="g++"
21592   else
21593     case $cross_compiling:$ac_tool_warned in
21594 yes:)
21595 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
21596 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
21597 ac_tool_warned=yes ;;
21598 esac
21599     CXX=$ac_ct_CXX
21600   fi
21601 fi
21602 
21603   fi
21604 fi
21605 # Provide some information about the compiler.
21606 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
21607 set X $ac_compile
21608 ac_compiler=$2
21609 for ac_option in --version -v -V -qversion; do
21610   { { ac_try="$ac_compiler $ac_option >&5"
21611 case "(($ac_try" in
21612   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21613   *) ac_try_echo=$ac_try;;
21614 esac
21615 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
21616 $as_echo "$ac_try_echo"; } >&5
21617   (eval "$ac_compiler $ac_option >&5") 2>conftest.err
21618   ac_status=$?
21619   if test -s conftest.err; then
21620     sed '10a\
21621 ... rest of stderr output deleted ...
21622          10q' conftest.err >conftest.er1
21623     cat conftest.er1 >&5
21624   fi
21625   rm -f conftest.er1 conftest.err
21626   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
21627   test $ac_status = 0; }
21628 done
21629 
21630 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
21631 $as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
21632 if test "${ac_cv_cxx_compiler_gnu+set}" = set; then :
21633   $as_echo_n "(cached) " >&6
21634 else
21635   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21636 /* end confdefs.h.  */
21637 
21638 int
21639 main ()
21640 {
21641 #ifndef __GNUC__
21642        choke me
21643 #endif
21644 
21645   ;
21646   return 0;
21647 }
21648 _ACEOF
21649 if ac_fn_cxx_try_compile "$LINENO"; then :
21650   ac_compiler_gnu=yes
21651 else
21652   ac_compiler_gnu=no
21653 fi
21654 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21655 ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
21656 
21657 fi
21658 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
21659 $as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
21660 if test $ac_compiler_gnu = yes; then
21661   GXX=yes
21662 else
21663   GXX=
21664 fi
21665 ac_test_CXXFLAGS=${CXXFLAGS+set}
21666 ac_save_CXXFLAGS=$CXXFLAGS
21667 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
21668 $as_echo_n "checking whether $CXX accepts -g... " >&6; }
21669 if test "${ac_cv_prog_cxx_g+set}" = set; then :
21670   $as_echo_n "(cached) " >&6
21671 else
21672   ac_save_cxx_werror_flag=$ac_cxx_werror_flag
21673    ac_cxx_werror_flag=yes
21674    ac_cv_prog_cxx_g=no
21675    CXXFLAGS="-g"
21676    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21677 /* end confdefs.h.  */
21678 
21679 int
21680 main ()
21681 {
21682 
21683   ;
21684   return 0;
21685 }
21686 _ACEOF
21687 if ac_fn_cxx_try_compile "$LINENO"; then :
21688   ac_cv_prog_cxx_g=yes
21689 else
21690   CXXFLAGS=""
21691       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21692 /* end confdefs.h.  */
21693 
21694 int
21695 main ()
21696 {
21697 
21698   ;
21699   return 0;
21700 }
21701 _ACEOF
21702 if ac_fn_cxx_try_compile "$LINENO"; then :
21703 
21704 else
21705   ac_cxx_werror_flag=$ac_save_cxx_werror_flag
21706          CXXFLAGS="-g"
21707          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21708 /* end confdefs.h.  */
21709 
21710 int
21711 main ()
21712 {
21713 
21714   ;
21715   return 0;
21716 }
21717 _ACEOF
21718 if ac_fn_cxx_try_compile "$LINENO"; then :
21719   ac_cv_prog_cxx_g=yes
21720 fi
21721 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21722 fi
21723 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21724 fi
21725 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21726    ac_cxx_werror_flag=$ac_save_cxx_werror_flag
21727 fi
21728 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
21729 $as_echo "$ac_cv_prog_cxx_g" >&6; }
21730 if test "$ac_test_CXXFLAGS" = set; then
21731   CXXFLAGS=$ac_save_CXXFLAGS
21732 elif test $ac_cv_prog_cxx_g = yes; then
21733   if test "$GXX" = yes; then
21734     CXXFLAGS="-g -O2"
21735   else
21736     CXXFLAGS="-g"
21737   fi
21738 else
21739   if test "$GXX" = yes; then
21740     CXXFLAGS="-O2"
21741   else
21742     CXXFLAGS=
21743   fi
21744 fi
21745 ac_ext=cpp
21746 ac_cpp='$CXXCPP $CPPFLAGS'
21747 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
21748 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
21749 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
21750 
21751 
21752 ### Locate other tools
21753 
21754 if test "x$OPENJDK_TARGET_OS" = xmacosx; then
21755     ac_ext=m
21756 ac_cpp='$OBJCPP $CPPFLAGS'
21757 ac_compile='$OBJC -c $OBJCFLAGS $CPPFLAGS conftest.$ac_ext >&5'
21758 ac_link='$OBJC -o conftest$ac_exeext $OBJCFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
21759 ac_compiler_gnu=$ac_cv_objc_compiler_gnu
21760 if test -n "$ac_tool_prefix"; then
21761   for ac_prog in gcc objcc objc cc CC
21762   do
21763     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
21764 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
21765 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21766 $as_echo_n "checking for $ac_word... " >&6; }
21767 if test "${ac_cv_prog_OBJC+set}" = set; then :
21768   $as_echo_n "(cached) " >&6
21769 else
21770   if test -n "$OBJC"; then
21771   ac_cv_prog_OBJC="$OBJC" # Let the user override the test.
21772 else
21773 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21774 for as_dir in $PATH
21775 do
21776   IFS=$as_save_IFS
21777   test -z "$as_dir" && as_dir=.
21778     for ac_exec_ext in '' $ac_executable_extensions; do
21779   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
21780     ac_cv_prog_OBJC="$ac_tool_prefix$ac_prog"
21781     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21782     break 2
21783   fi
21784 done
21785   done
21786 IFS=$as_save_IFS
21787 
21788 fi
21789 fi
21790 OBJC=$ac_cv_prog_OBJC
21791 if test -n "$OBJC"; then
21792   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJC" >&5
21793 $as_echo "$OBJC" >&6; }
21794 else
21795   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21796 $as_echo "no" >&6; }
21797 fi
21798 
21799 
21800     test -n "$OBJC" && break
21801   done
21802 fi
21803 if test -z "$OBJC"; then
21804   ac_ct_OBJC=$OBJC
21805   for ac_prog in gcc objcc objc cc CC
21806 do
21807   # Extract the first word of "$ac_prog", so it can be a program name with args.
21808 set dummy $ac_prog; ac_word=$2
21809 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21810 $as_echo_n "checking for $ac_word... " >&6; }
21811 if test "${ac_cv_prog_ac_ct_OBJC+set}" = set; then :
21812   $as_echo_n "(cached) " >&6
21813 else
21814   if test -n "$ac_ct_OBJC"; then
21815   ac_cv_prog_ac_ct_OBJC="$ac_ct_OBJC" # Let the user override the test.
21816 else
21817 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21818 for as_dir in $PATH
21819 do
21820   IFS=$as_save_IFS
21821   test -z "$as_dir" && as_dir=.
21822     for ac_exec_ext in '' $ac_executable_extensions; do
21823   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
21824     ac_cv_prog_ac_ct_OBJC="$ac_prog"
21825     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21826     break 2
21827   fi
21828 done
21829   done
21830 IFS=$as_save_IFS
21831 
21832 fi
21833 fi
21834 ac_ct_OBJC=$ac_cv_prog_ac_ct_OBJC
21835 if test -n "$ac_ct_OBJC"; then
21836   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJC" >&5
21837 $as_echo "$ac_ct_OBJC" >&6; }
21838 else
21839   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21840 $as_echo "no" >&6; }
21841 fi
21842 
21843 
21844   test -n "$ac_ct_OBJC" && break
21845 done
21846 
21847   if test "x$ac_ct_OBJC" = x; then
21848     OBJC="gcc"
21849   else
21850     case $cross_compiling:$ac_tool_warned in
21851 yes:)
21852 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
21853 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
21854 ac_tool_warned=yes ;;
21855 esac
21856     OBJC=$ac_ct_OBJC
21857   fi
21858 fi
21859 
21860 # Provide some information about the compiler.
21861 $as_echo "$as_me:${as_lineno-$LINENO}: checking for Objective C compiler version" >&5
21862 set X $ac_compile
21863 ac_compiler=$2
21864 for ac_option in --version -v -V -qversion; do
21865   { { ac_try="$ac_compiler $ac_option >&5"
21866 case "(($ac_try" in
21867   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21868   *) ac_try_echo=$ac_try;;
21869 esac
21870 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
21871 $as_echo "$ac_try_echo"; } >&5
21872   (eval "$ac_compiler $ac_option >&5") 2>conftest.err
21873   ac_status=$?
21874   if test -s conftest.err; then
21875     sed '10a\
21876 ... rest of stderr output deleted ...
21877          10q' conftest.err >conftest.er1
21878     cat conftest.er1 >&5
21879   fi
21880   rm -f conftest.er1 conftest.err
21881   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
21882   test $ac_status = 0; }
21883 done
21884 
21885 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU Objective C compiler" >&5
21886 $as_echo_n "checking whether we are using the GNU Objective C compiler... " >&6; }
21887 if test "${ac_cv_objc_compiler_gnu+set}" = set; then :
21888   $as_echo_n "(cached) " >&6
21889 else
21890   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21891 /* end confdefs.h.  */
21892 
21893 int
21894 main ()
21895 {
21896 #ifndef __GNUC__
21897        choke me
21898 #endif
21899 
21900   ;
21901   return 0;
21902 }
21903 _ACEOF
21904 if ac_fn_objc_try_compile "$LINENO"; then :
21905   ac_compiler_gnu=yes
21906 else
21907   ac_compiler_gnu=no
21908 fi
21909 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21910 ac_cv_objc_compiler_gnu=$ac_compiler_gnu
21911 
21912 fi
21913 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objc_compiler_gnu" >&5
21914 $as_echo "$ac_cv_objc_compiler_gnu" >&6; }
21915 if test $ac_compiler_gnu = yes; then
21916   GOBJC=yes
21917 else
21918   GOBJC=
21919 fi
21920 ac_test_OBJCFLAGS=${OBJCFLAGS+set}
21921 ac_save_OBJCFLAGS=$OBJCFLAGS
21922 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $OBJC accepts -g" >&5
21923 $as_echo_n "checking whether $OBJC accepts -g... " >&6; }
21924 if test "${ac_cv_prog_objc_g+set}" = set; then :
21925   $as_echo_n "(cached) " >&6
21926 else
21927   ac_save_objc_werror_flag=$ac_objc_werror_flag
21928    ac_objc_werror_flag=yes
21929    ac_cv_prog_objc_g=no
21930    OBJCFLAGS="-g"
21931    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21932 /* end confdefs.h.  */
21933 
21934 int
21935 main ()
21936 {
21937 
21938   ;
21939   return 0;
21940 }
21941 _ACEOF
21942 if ac_fn_objc_try_compile "$LINENO"; then :
21943   ac_cv_prog_objc_g=yes
21944 else
21945   OBJCFLAGS=""
21946       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21947 /* end confdefs.h.  */
21948 
21949 int
21950 main ()
21951 {
21952 
21953   ;
21954   return 0;
21955 }
21956 _ACEOF
21957 if ac_fn_objc_try_compile "$LINENO"; then :
21958 
21959 else
21960   ac_objc_werror_flag=$ac_save_objc_werror_flag
21961          OBJCFLAGS="-g"
21962          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21963 /* end confdefs.h.  */
21964 
21965 int
21966 main ()
21967 {
21968 
21969   ;
21970   return 0;
21971 }
21972 _ACEOF
21973 if ac_fn_objc_try_compile "$LINENO"; then :
21974   ac_cv_prog_objc_g=yes
21975 fi
21976 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21977 fi
21978 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21979 fi
21980 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21981    ac_objc_werror_flag=$ac_save_objc_werror_flag
21982 fi
21983 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_objc_g" >&5
21984 $as_echo "$ac_cv_prog_objc_g" >&6; }
21985 if test "$ac_test_OBJCFLAGS" = set; then
21986   OBJCFLAGS=$ac_save_OBJCFLAGS
21987 elif test $ac_cv_prog_objc_g = yes; then
21988   if test "$GOBJC" = yes; then
21989     OBJCFLAGS="-g -O2"
21990   else
21991     OBJCFLAGS="-g"
21992   fi
21993 else
21994   if test "$GOBJC" = yes; then
21995     OBJCFLAGS="-O2"
21996   else
21997     OBJCFLAGS=
21998   fi
21999 fi
22000 ac_ext=cpp
22001 ac_cpp='$CXXCPP $CPPFLAGS'
22002 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
22003 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
22004 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
22005 
22006 
22007   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22008 
22009   # First separate the path from the arguments. This will split at the first
22010   # space.
22011   complete="$OBJC"
22012   path="${complete%% *}"
22013   tmp="$complete EOL"
22014   arguments="${tmp#* }"
22015 
22016   # Input might be given as Windows format, start by converting to
22017   # unix format.
22018   new_path=`$CYGPATH -u "$path"`
22019 
22020   # Now try to locate executable using which
22021   new_path=`$WHICH "$new_path" 2> /dev/null`
22022   # bat and cmd files are not always considered executable in cygwin causing which
22023   # to not find them
22024   if test "x$new_path" = x \
22025            && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22026            && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22027     new_path=`$CYGPATH -u "$path"`
22028   fi
22029   if test "x$new_path" = x; then
22030     # Oops. Which didn't find the executable.
22031     # The splitting of arguments from the executable at a space might have been incorrect,
22032     # since paths with space are more likely in Windows. Give it another try with the whole
22033     # argument.
22034     path="$complete"
22035     arguments="EOL"
22036     new_path=`$CYGPATH -u "$path"`
22037     new_path=`$WHICH "$new_path" 2> /dev/null`
22038     # bat and cmd files are not always considered executable in cygwin causing which
22039     # to not find them
22040     if test "x$new_path" = x \
22041              && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22042              && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22043       new_path=`$CYGPATH -u "$path"`
22044     fi
22045     if test "x$new_path" = x; then
22046       # It's still not found. Now this is an unrecoverable error.
22047       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
22048 $as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
22049       has_space=`$ECHO "$complete" | $GREP " "`
22050       if test "x$has_space" != x; then
22051         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22052 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22053       fi
22054       as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
22055     fi
22056   fi
22057 
22058   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22059   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22060   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22061   # "foo.exe" is OK but "foo" is an error.
22062   #
22063   # This test is therefore slightly more accurate than "test -f" to check for file precense.
22064   # It is also a way to make sure we got the proper file name for the real test later on.
22065   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22066   if test "x$test_shortpath" = x; then
22067     # Short path failed, file does not exist as specified.
22068     # Try adding .exe or .cmd
22069     if test -f "${new_path}.exe"; then
22070        input_to_shortpath="${new_path}.exe"
22071     elif test -f "${new_path}.cmd"; then
22072        input_to_shortpath="${new_path}.cmd"
22073     else
22074       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$new_path\", is invalid." >&5
22075 $as_echo "$as_me: The path of OBJC, which resolves as \"$new_path\", is invalid." >&6;}
22076       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
22077 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
22078       as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
22079     fi
22080   else
22081     input_to_shortpath="$new_path"
22082   fi
22083 
22084   # Call helper function which possibly converts this using DOS-style short mode.
22085   # If so, the updated path is stored in $new_path.
22086   new_path="$input_to_shortpath"
22087 
22088   input_path="$input_to_shortpath"
22089   # Check if we need to convert this using DOS-style short mode. If the path
22090   # contains just simple characters, use it. Otherwise (spaces, weird characters),
22091   # take no chances and rewrite it.
22092   # Note: m4 eats our [], so we need to use [ and ] instead.
22093   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22094   if test "x$has_forbidden_chars" != x; then
22095     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22096     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22097     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22098     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22099       # Going to short mode and back again did indeed matter. Since short mode is
22100       # case insensitive, let's make it lowercase to improve readability.
22101       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22102       # Now convert it back to Unix-stile (cygpath)
22103       input_path=`$CYGPATH -u "$shortmode_path"`
22104       new_path="$input_path"
22105     fi
22106   fi
22107 
22108   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22109   if test "x$test_cygdrive_prefix" = x; then
22110     # As a simple fix, exclude /usr/bin since it's not a real path.
22111     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
22112       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22113       # a path prefixed by /cygdrive for fixpath to work.
22114       new_path="$CYGWIN_ROOT_PATH$input_path"
22115     fi
22116   fi
22117 
22118   # remove trailing .exe if any
22119   new_path="${new_path/%.exe/}"
22120 
22121   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22122 
22123   # First separate the path from the arguments. This will split at the first
22124   # space.
22125   complete="$OBJC"
22126   path="${complete%% *}"
22127   tmp="$complete EOL"
22128   arguments="${tmp#* }"
22129 
22130   # Input might be given as Windows format, start by converting to
22131   # unix format.
22132   new_path="$path"
22133 
22134   windows_path="$new_path"
22135   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22136     unix_path=`$CYGPATH -u "$windows_path"`
22137     new_path="$unix_path"
22138   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22139     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22140     new_path="$unix_path"
22141   fi
22142 
22143 
22144   # Now try to locate executable using which
22145   new_path=`$WHICH "$new_path" 2> /dev/null`
22146 
22147   if test "x$new_path" = x; then
22148     # Oops. Which didn't find the executable.
22149     # The splitting of arguments from the executable at a space might have been incorrect,
22150     # since paths with space are more likely in Windows. Give it another try with the whole
22151     # argument.
22152     path="$complete"
22153     arguments="EOL"
22154     new_path="$path"
22155 
22156   windows_path="$new_path"
22157   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22158     unix_path=`$CYGPATH -u "$windows_path"`
22159     new_path="$unix_path"
22160   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22161     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22162     new_path="$unix_path"
22163   fi
22164 
22165 
22166     new_path=`$WHICH "$new_path" 2> /dev/null`
22167 
22168     if test "x$new_path" = x; then
22169       # It's still not found. Now this is an unrecoverable error.
22170       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
22171 $as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
22172       has_space=`$ECHO "$complete" | $GREP " "`
22173       if test "x$has_space" != x; then
22174         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22175 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22176       fi
22177       as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
22178     fi
22179   fi
22180 
22181   # Now new_path has a complete unix path to the binary
22182   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
22183     # Keep paths in /bin as-is, but remove trailing .exe if any
22184     new_path="${new_path/%.exe/}"
22185     # Do not save /bin paths to all_fixpath_prefixes!
22186   else
22187     # Not in mixed or Windows style, start by that.
22188     new_path=`cmd //c echo $new_path`
22189 
22190   input_path="$new_path"
22191   # Check if we need to convert this using DOS-style short mode. If the path
22192   # contains just simple characters, use it. Otherwise (spaces, weird characters),
22193   # take no chances and rewrite it.
22194   # Note: m4 eats our [], so we need to use [ and ] instead.
22195   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22196   if test "x$has_forbidden_chars" != x; then
22197     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22198     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22199   fi
22200 
22201     # Output is in $new_path
22202 
22203   windows_path="$new_path"
22204   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22205     unix_path=`$CYGPATH -u "$windows_path"`
22206     new_path="$unix_path"
22207   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22208     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22209     new_path="$unix_path"
22210   fi
22211 
22212     # remove trailing .exe if any
22213     new_path="${new_path/%.exe/}"
22214 
22215     # Save the first 10 bytes of this path to the storage, so fixpath can work.
22216     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22217   fi
22218 
22219   else
22220     # We're on a posix platform. Hooray! :)
22221     # First separate the path from the arguments. This will split at the first
22222     # space.
22223     complete="$OBJC"
22224     path="${complete%% *}"
22225     tmp="$complete EOL"
22226     arguments="${tmp#* }"
22227 
22228     # Cannot rely on the command "which" here since it doesn't always work.
22229     is_absolute_path=`$ECHO "$path" | $GREP ^/`
22230     if test -z "$is_absolute_path"; then
22231       # Path to executable is not absolute. Find it.
22232       IFS_save="$IFS"
22233       IFS=:
22234       for p in $PATH; do
22235         if test -f "$p/$path" && test -x "$p/$path"; then
22236           new_path="$p/$path"
22237           break
22238         fi
22239       done
22240       IFS="$IFS_save"
22241     else
22242       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving OBJC (as $path) failed, using $path directly." >&5
22243 $as_echo "$as_me: Resolving OBJC (as $path) failed, using $path directly." >&6;}
22244       new_path="$path"
22245     fi
22246 
22247     if test "x$new_path" = x; then
22248         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
22249 $as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
22250         has_space=`$ECHO "$complete" | $GREP " "`
22251         if test "x$has_space" != x; then
22252           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
22253 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
22254         fi
22255         as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
22256       fi
22257   fi
22258 
22259       # Now join together the path and the arguments once again
22260       if test "x$arguments" != xEOL; then
22261         new_complete="$new_path ${arguments% *}"
22262       else
22263         new_complete="$new_path"
22264       fi
22265 
22266   if test "x$complete" != "x$new_complete"; then
22267       OBJC="$new_complete"
22268       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJC to \"$new_complete\"" >&5
22269 $as_echo "$as_me: Rewriting OBJC to \"$new_complete\"" >&6;}
22270     fi
22271 
22272 else
22273     OBJC=
22274 fi
22275 
22276 # Restore the flags to the user specified values.
22277 # This is necessary since AC_PROG_CC defaults CFLAGS to "-g -O2"
22278 CFLAGS="$ORG_CFLAGS"
22279 CXXFLAGS="$ORG_CXXFLAGS"
22280 OBJCFLAGS="$ORG_OBJCFLAGS"
22281 
22282 LD="$CC"
22283 LDEXE="$CC"
22284 LDCXX="$CXX"
22285 LDEXECXX="$CXX"
22286 
22287 # LDEXE is the linker to use, when creating executables.
22288 
22289 # Linking C++ libraries.
22290 
22291 # Linking C++ executables.
22292 
22293 
22294 if test "x$OPENJDK_TARGET_OS" != xwindows; then
22295     if test -n "$ac_tool_prefix"; then
22296   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
22297 set dummy ${ac_tool_prefix}ar; ac_word=$2
22298 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22299 $as_echo_n "checking for $ac_word... " >&6; }
22300 if test "${ac_cv_prog_AR+set}" = set; then :
22301   $as_echo_n "(cached) " >&6
22302 else
22303   if test -n "$AR"; then
22304   ac_cv_prog_AR="$AR" # Let the user override the test.
22305 else
22306 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22307 for as_dir in $PATH
22308 do
22309   IFS=$as_save_IFS
22310   test -z "$as_dir" && as_dir=.
22311     for ac_exec_ext in '' $ac_executable_extensions; do
22312   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
22313     ac_cv_prog_AR="${ac_tool_prefix}ar"
22314     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22315     break 2
22316   fi
22317 done
22318   done
22319 IFS=$as_save_IFS
22320 
22321 fi
22322 fi
22323 AR=$ac_cv_prog_AR
22324 if test -n "$AR"; then
22325   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
22326 $as_echo "$AR" >&6; }
22327 else
22328   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22329 $as_echo "no" >&6; }
22330 fi
22331 
22332 
22333 fi
22334 if test -z "$ac_cv_prog_AR"; then
22335   ac_ct_AR=$AR
22336   # Extract the first word of "ar", so it can be a program name with args.
22337 set dummy ar; ac_word=$2
22338 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22339 $as_echo_n "checking for $ac_word... " >&6; }
22340 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then :
22341   $as_echo_n "(cached) " >&6
22342 else
22343   if test -n "$ac_ct_AR"; then
22344   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
22345 else
22346 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22347 for as_dir in $PATH
22348 do
22349   IFS=$as_save_IFS
22350   test -z "$as_dir" && as_dir=.
22351     for ac_exec_ext in '' $ac_executable_extensions; do
22352   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
22353     ac_cv_prog_ac_ct_AR="ar"
22354     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22355     break 2
22356   fi
22357 done
22358   done
22359 IFS=$as_save_IFS
22360 
22361 fi
22362 fi
22363 ac_ct_AR=$ac_cv_prog_ac_ct_AR
22364 if test -n "$ac_ct_AR"; then
22365   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
22366 $as_echo "$ac_ct_AR" >&6; }
22367 else
22368   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22369 $as_echo "no" >&6; }
22370 fi
22371 
22372   if test "x$ac_ct_AR" = x; then
22373     AR=""
22374   else
22375     case $cross_compiling:$ac_tool_warned in
22376 yes:)
22377 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
22378 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
22379 ac_tool_warned=yes ;;
22380 esac
22381     AR=$ac_ct_AR
22382   fi
22383 else
22384   AR="$ac_cv_prog_AR"
22385 fi
22386 
22387 
22388   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22389 
22390   # First separate the path from the arguments. This will split at the first
22391   # space.
22392   complete="$AR"
22393   path="${complete%% *}"
22394   tmp="$complete EOL"
22395   arguments="${tmp#* }"
22396 
22397   # Input might be given as Windows format, start by converting to
22398   # unix format.
22399   new_path=`$CYGPATH -u "$path"`
22400 
22401   # Now try to locate executable using which
22402   new_path=`$WHICH "$new_path" 2> /dev/null`
22403   # bat and cmd files are not always considered executable in cygwin causing which
22404   # to not find them
22405   if test "x$new_path" = x \
22406            && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22407            && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22408     new_path=`$CYGPATH -u "$path"`
22409   fi
22410   if test "x$new_path" = x; then
22411     # Oops. Which didn't find the executable.
22412     # The splitting of arguments from the executable at a space might have been incorrect,
22413     # since paths with space are more likely in Windows. Give it another try with the whole
22414     # argument.
22415     path="$complete"
22416     arguments="EOL"
22417     new_path=`$CYGPATH -u "$path"`
22418     new_path=`$WHICH "$new_path" 2> /dev/null`
22419     # bat and cmd files are not always considered executable in cygwin causing which
22420     # to not find them
22421     if test "x$new_path" = x \
22422              && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22423              && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22424       new_path=`$CYGPATH -u "$path"`
22425     fi
22426     if test "x$new_path" = x; then
22427       # It's still not found. Now this is an unrecoverable error.
22428       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
22429 $as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
22430       has_space=`$ECHO "$complete" | $GREP " "`
22431       if test "x$has_space" != x; then
22432         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22433 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22434       fi
22435       as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
22436     fi
22437   fi
22438 
22439   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22440   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22441   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22442   # "foo.exe" is OK but "foo" is an error.
22443   #
22444   # This test is therefore slightly more accurate than "test -f" to check for file precense.
22445   # It is also a way to make sure we got the proper file name for the real test later on.
22446   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22447   if test "x$test_shortpath" = x; then
22448     # Short path failed, file does not exist as specified.
22449     # Try adding .exe or .cmd
22450     if test -f "${new_path}.exe"; then
22451        input_to_shortpath="${new_path}.exe"
22452     elif test -f "${new_path}.cmd"; then
22453        input_to_shortpath="${new_path}.cmd"
22454     else
22455       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$new_path\", is invalid." >&5
22456 $as_echo "$as_me: The path of AR, which resolves as \"$new_path\", is invalid." >&6;}
22457       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
22458 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
22459       as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
22460     fi
22461   else
22462     input_to_shortpath="$new_path"
22463   fi
22464 
22465   # Call helper function which possibly converts this using DOS-style short mode.
22466   # If so, the updated path is stored in $new_path.
22467   new_path="$input_to_shortpath"
22468 
22469   input_path="$input_to_shortpath"
22470   # Check if we need to convert this using DOS-style short mode. If the path
22471   # contains just simple characters, use it. Otherwise (spaces, weird characters),
22472   # take no chances and rewrite it.
22473   # Note: m4 eats our [], so we need to use [ and ] instead.
22474   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22475   if test "x$has_forbidden_chars" != x; then
22476     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22477     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22478     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22479     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22480       # Going to short mode and back again did indeed matter. Since short mode is
22481       # case insensitive, let's make it lowercase to improve readability.
22482       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22483       # Now convert it back to Unix-stile (cygpath)
22484       input_path=`$CYGPATH -u "$shortmode_path"`
22485       new_path="$input_path"
22486     fi
22487   fi
22488 
22489   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22490   if test "x$test_cygdrive_prefix" = x; then
22491     # As a simple fix, exclude /usr/bin since it's not a real path.
22492     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
22493       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22494       # a path prefixed by /cygdrive for fixpath to work.
22495       new_path="$CYGWIN_ROOT_PATH$input_path"
22496     fi
22497   fi
22498 
22499   # remove trailing .exe if any
22500   new_path="${new_path/%.exe/}"
22501 
22502   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22503 
22504   # First separate the path from the arguments. This will split at the first
22505   # space.
22506   complete="$AR"
22507   path="${complete%% *}"
22508   tmp="$complete EOL"
22509   arguments="${tmp#* }"
22510 
22511   # Input might be given as Windows format, start by converting to
22512   # unix format.
22513   new_path="$path"
22514 
22515   windows_path="$new_path"
22516   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22517     unix_path=`$CYGPATH -u "$windows_path"`
22518     new_path="$unix_path"
22519   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22520     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22521     new_path="$unix_path"
22522   fi
22523 
22524 
22525   # Now try to locate executable using which
22526   new_path=`$WHICH "$new_path" 2> /dev/null`
22527 
22528   if test "x$new_path" = x; then
22529     # Oops. Which didn't find the executable.
22530     # The splitting of arguments from the executable at a space might have been incorrect,
22531     # since paths with space are more likely in Windows. Give it another try with the whole
22532     # argument.
22533     path="$complete"
22534     arguments="EOL"
22535     new_path="$path"
22536 
22537   windows_path="$new_path"
22538   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22539     unix_path=`$CYGPATH -u "$windows_path"`
22540     new_path="$unix_path"
22541   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22542     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22543     new_path="$unix_path"
22544   fi
22545 
22546 
22547     new_path=`$WHICH "$new_path" 2> /dev/null`
22548 
22549     if test "x$new_path" = x; then
22550       # It's still not found. Now this is an unrecoverable error.
22551       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
22552 $as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
22553       has_space=`$ECHO "$complete" | $GREP " "`
22554       if test "x$has_space" != x; then
22555         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22556 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22557       fi
22558       as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
22559     fi
22560   fi
22561 
22562   # Now new_path has a complete unix path to the binary
22563   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
22564     # Keep paths in /bin as-is, but remove trailing .exe if any
22565     new_path="${new_path/%.exe/}"
22566     # Do not save /bin paths to all_fixpath_prefixes!
22567   else
22568     # Not in mixed or Windows style, start by that.
22569     new_path=`cmd //c echo $new_path`
22570 
22571   input_path="$new_path"
22572   # Check if we need to convert this using DOS-style short mode. If the path
22573   # contains just simple characters, use it. Otherwise (spaces, weird characters),
22574   # take no chances and rewrite it.
22575   # Note: m4 eats our [], so we need to use [ and ] instead.
22576   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22577   if test "x$has_forbidden_chars" != x; then
22578     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22579     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22580   fi
22581 
22582     # Output is in $new_path
22583 
22584   windows_path="$new_path"
22585   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22586     unix_path=`$CYGPATH -u "$windows_path"`
22587     new_path="$unix_path"
22588   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22589     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22590     new_path="$unix_path"
22591   fi
22592 
22593     # remove trailing .exe if any
22594     new_path="${new_path/%.exe/}"
22595 
22596     # Save the first 10 bytes of this path to the storage, so fixpath can work.
22597     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22598   fi
22599 
22600   else
22601     # We're on a posix platform. Hooray! :)
22602     # First separate the path from the arguments. This will split at the first
22603     # space.
22604     complete="$AR"
22605     path="${complete%% *}"
22606     tmp="$complete EOL"
22607     arguments="${tmp#* }"
22608 
22609     # Cannot rely on the command "which" here since it doesn't always work.
22610     is_absolute_path=`$ECHO "$path" | $GREP ^/`
22611     if test -z "$is_absolute_path"; then
22612       # Path to executable is not absolute. Find it.
22613       IFS_save="$IFS"
22614       IFS=:
22615       for p in $PATH; do
22616         if test -f "$p/$path" && test -x "$p/$path"; then
22617           new_path="$p/$path"
22618           break
22619         fi
22620       done
22621       IFS="$IFS_save"
22622     else
22623       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving AR (as $path) failed, using $path directly." >&5
22624 $as_echo "$as_me: Resolving AR (as $path) failed, using $path directly." >&6;}
22625       new_path="$path"
22626     fi
22627 
22628     if test "x$new_path" = x; then
22629         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
22630 $as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
22631         has_space=`$ECHO "$complete" | $GREP " "`
22632         if test "x$has_space" != x; then
22633           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
22634 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
22635         fi
22636         as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
22637       fi
22638   fi
22639 
22640       # Now join together the path and the arguments once again
22641       if test "x$arguments" != xEOL; then
22642         new_complete="$new_path ${arguments% *}"
22643       else
22644         new_complete="$new_path"
22645       fi
22646 
22647   if test "x$complete" != "x$new_complete"; then
22648       AR="$new_complete"
22649       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AR to \"$new_complete\"" >&5
22650 $as_echo "$as_me: Rewriting AR to \"$new_complete\"" >&6;}
22651     fi
22652 
22653 fi
22654 if test "x$OPENJDK_TARGET_OS" = xmacosx; then
22655     ARFLAGS="-r"
22656 else
22657     ARFLAGS=""
22658 fi
22659 
22660 
22661 # For hotspot, we need these in Windows mixed path; other platforms keep them the same
22662 HOTSPOT_CXX="$CXX"
22663 HOTSPOT_LD="$LD"
22664 
22665 
22666 
22667 COMPILER_NAME=gcc
22668 COMPILER_TYPE=CC
22669 if test "x$OPENJDK_TARGET_OS" = xwindows; then :
22670 
22671     # For now, assume that we are always compiling using cl.exe.
22672     CC_OUT_OPTION=-Fo
22673     EXE_OUT_OPTION=-out:
22674     LD_OUT_OPTION=-out:
22675     AR_OUT_OPTION=-out:
22676     # On Windows, reject /usr/bin/link (as determined in CYGWIN_LINK), which is a cygwin
22677     # program for something completely different.
22678     # Extract the first word of "link", so it can be a program name with args.
22679 set dummy link; ac_word=$2
22680 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22681 $as_echo_n "checking for $ac_word... " >&6; }
22682 if test "${ac_cv_prog_WINLD+set}" = set; then :
22683   $as_echo_n "(cached) " >&6
22684 else
22685   if test -n "$WINLD"; then
22686   ac_cv_prog_WINLD="$WINLD" # Let the user override the test.
22687 else
22688   ac_prog_rejected=no
22689 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22690 for as_dir in $PATH
22691 do
22692   IFS=$as_save_IFS
22693   test -z "$as_dir" && as_dir=.
22694     for ac_exec_ext in '' $ac_executable_extensions; do
22695   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
22696     if test "$as_dir/$ac_word$ac_exec_ext" = "$CYGWIN_LINK"; then
22697        ac_prog_rejected=yes
22698        continue
22699      fi
22700     ac_cv_prog_WINLD="link"
22701     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22702     break 2
22703   fi
22704 done
22705   done
22706 IFS=$as_save_IFS
22707 
22708 if test $ac_prog_rejected = yes; then
22709   # We found a bogon in the path, so make sure we never use it.
22710   set dummy $ac_cv_prog_WINLD
22711   shift
22712   if test $# != 0; then
22713     # We chose a different compiler from the bogus one.
22714     # However, it has the same basename, so the bogon will be chosen
22715     # first if we set WINLD to just the basename; use the full file name.
22716     shift
22717     ac_cv_prog_WINLD="$as_dir/$ac_word${1+' '}$@"
22718   fi
22719 fi
22720 fi
22721 fi
22722 WINLD=$ac_cv_prog_WINLD
22723 if test -n "$WINLD"; then
22724   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINLD" >&5
22725 $as_echo "$WINLD" >&6; }
22726 else
22727   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22728 $as_echo "no" >&6; }
22729 fi
22730 
22731 
22732     # Since we must ignore the first found link, WINLD will contain
22733     # the full path to the link.exe program.
22734 
22735   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22736 
22737   # First separate the path from the arguments. This will split at the first
22738   # space.
22739   complete="$WINLD"
22740   path="${complete%% *}"
22741   tmp="$complete EOL"
22742   arguments="${tmp#* }"
22743 
22744   # Input might be given as Windows format, start by converting to
22745   # unix format.
22746   new_path=`$CYGPATH -u "$path"`
22747 
22748   # Now try to locate executable using which
22749   new_path=`$WHICH "$new_path" 2> /dev/null`
22750   # bat and cmd files are not always considered executable in cygwin causing which
22751   # to not find them
22752   if test "x$new_path" = x \
22753            && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22754            && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22755     new_path=`$CYGPATH -u "$path"`
22756   fi
22757   if test "x$new_path" = x; then
22758     # Oops. Which didn't find the executable.
22759     # The splitting of arguments from the executable at a space might have been incorrect,
22760     # since paths with space are more likely in Windows. Give it another try with the whole
22761     # argument.
22762     path="$complete"
22763     arguments="EOL"
22764     new_path=`$CYGPATH -u "$path"`
22765     new_path=`$WHICH "$new_path" 2> /dev/null`
22766     # bat and cmd files are not always considered executable in cygwin causing which
22767     # to not find them
22768     if test "x$new_path" = x \
22769              && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22770              && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22771       new_path=`$CYGPATH -u "$path"`
22772     fi
22773     if test "x$new_path" = x; then
22774       # It's still not found. Now this is an unrecoverable error.
22775       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$complete\", is not found." >&5
22776 $as_echo "$as_me: The path of WINLD, which resolves as \"$complete\", is not found." >&6;}
22777       has_space=`$ECHO "$complete" | $GREP " "`
22778       if test "x$has_space" != x; then
22779         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22780 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22781       fi
22782       as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
22783     fi
22784   fi
22785 
22786   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22787   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22788   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22789   # "foo.exe" is OK but "foo" is an error.
22790   #
22791   # This test is therefore slightly more accurate than "test -f" to check for file precense.
22792   # It is also a way to make sure we got the proper file name for the real test later on.
22793   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22794   if test "x$test_shortpath" = x; then
22795     # Short path failed, file does not exist as specified.
22796     # Try adding .exe or .cmd
22797     if test -f "${new_path}.exe"; then
22798        input_to_shortpath="${new_path}.exe"
22799     elif test -f "${new_path}.cmd"; then
22800        input_to_shortpath="${new_path}.cmd"
22801     else
22802       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$new_path\", is invalid." >&5
22803 $as_echo "$as_me: The path of WINLD, which resolves as \"$new_path\", is invalid." >&6;}
22804       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
22805 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
22806       as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
22807     fi
22808   else
22809     input_to_shortpath="$new_path"
22810   fi
22811 
22812   # Call helper function which possibly converts this using DOS-style short mode.
22813   # If so, the updated path is stored in $new_path.
22814   new_path="$input_to_shortpath"
22815 
22816   input_path="$input_to_shortpath"
22817   # Check if we need to convert this using DOS-style short mode. If the path
22818   # contains just simple characters, use it. Otherwise (spaces, weird characters),
22819   # take no chances and rewrite it.
22820   # Note: m4 eats our [], so we need to use [ and ] instead.
22821   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22822   if test "x$has_forbidden_chars" != x; then
22823     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22824     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22825     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22826     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22827       # Going to short mode and back again did indeed matter. Since short mode is
22828       # case insensitive, let's make it lowercase to improve readability.
22829       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22830       # Now convert it back to Unix-stile (cygpath)
22831       input_path=`$CYGPATH -u "$shortmode_path"`
22832       new_path="$input_path"
22833     fi
22834   fi
22835 
22836   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22837   if test "x$test_cygdrive_prefix" = x; then
22838     # As a simple fix, exclude /usr/bin since it's not a real path.
22839     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
22840       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22841       # a path prefixed by /cygdrive for fixpath to work.
22842       new_path="$CYGWIN_ROOT_PATH$input_path"
22843     fi
22844   fi
22845 
22846   # remove trailing .exe if any
22847   new_path="${new_path/%.exe/}"
22848 
22849   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22850 
22851   # First separate the path from the arguments. This will split at the first
22852   # space.
22853   complete="$WINLD"
22854   path="${complete%% *}"
22855   tmp="$complete EOL"
22856   arguments="${tmp#* }"
22857 
22858   # Input might be given as Windows format, start by converting to
22859   # unix format.
22860   new_path="$path"
22861 
22862   windows_path="$new_path"
22863   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22864     unix_path=`$CYGPATH -u "$windows_path"`
22865     new_path="$unix_path"
22866   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22867     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22868     new_path="$unix_path"
22869   fi
22870 
22871 
22872   # Now try to locate executable using which
22873   new_path=`$WHICH "$new_path" 2> /dev/null`
22874 
22875   if test "x$new_path" = x; then
22876     # Oops. Which didn't find the executable.
22877     # The splitting of arguments from the executable at a space might have been incorrect,
22878     # since paths with space are more likely in Windows. Give it another try with the whole
22879     # argument.
22880     path="$complete"
22881     arguments="EOL"
22882     new_path="$path"
22883 
22884   windows_path="$new_path"
22885   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22886     unix_path=`$CYGPATH -u "$windows_path"`
22887     new_path="$unix_path"
22888   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22889     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22890     new_path="$unix_path"
22891   fi
22892 
22893 
22894     new_path=`$WHICH "$new_path" 2> /dev/null`
22895 
22896     if test "x$new_path" = x; then
22897       # It's still not found. Now this is an unrecoverable error.
22898       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$complete\", is not found." >&5
22899 $as_echo "$as_me: The path of WINLD, which resolves as \"$complete\", is not found." >&6;}
22900       has_space=`$ECHO "$complete" | $GREP " "`
22901       if test "x$has_space" != x; then
22902         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22903 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22904       fi
22905       as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
22906     fi
22907   fi
22908 
22909   # Now new_path has a complete unix path to the binary
22910   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
22911     # Keep paths in /bin as-is, but remove trailing .exe if any
22912     new_path="${new_path/%.exe/}"
22913     # Do not save /bin paths to all_fixpath_prefixes!
22914   else
22915     # Not in mixed or Windows style, start by that.
22916     new_path=`cmd //c echo $new_path`
22917 
22918   input_path="$new_path"
22919   # Check if we need to convert this using DOS-style short mode. If the path
22920   # contains just simple characters, use it. Otherwise (spaces, weird characters),
22921   # take no chances and rewrite it.
22922   # Note: m4 eats our [], so we need to use [ and ] instead.
22923   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22924   if test "x$has_forbidden_chars" != x; then
22925     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22926     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22927   fi
22928 
22929     # Output is in $new_path
22930 
22931   windows_path="$new_path"
22932   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22933     unix_path=`$CYGPATH -u "$windows_path"`
22934     new_path="$unix_path"
22935   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22936     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22937     new_path="$unix_path"
22938   fi
22939 
22940     # remove trailing .exe if any
22941     new_path="${new_path/%.exe/}"
22942 
22943     # Save the first 10 bytes of this path to the storage, so fixpath can work.
22944     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22945   fi
22946 
22947   else
22948     # We're on a posix platform. Hooray! :)
22949     # First separate the path from the arguments. This will split at the first
22950     # space.
22951     complete="$WINLD"
22952     path="${complete%% *}"
22953     tmp="$complete EOL"
22954     arguments="${tmp#* }"
22955 
22956     # Cannot rely on the command "which" here since it doesn't always work.
22957     is_absolute_path=`$ECHO "$path" | $GREP ^/`
22958     if test -z "$is_absolute_path"; then
22959       # Path to executable is not absolute. Find it.
22960       IFS_save="$IFS"
22961       IFS=:
22962       for p in $PATH; do
22963         if test -f "$p/$path" && test -x "$p/$path"; then
22964           new_path="$p/$path"
22965           break
22966         fi
22967       done
22968       IFS="$IFS_save"
22969     else
22970       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving WINLD (as $path) failed, using $path directly." >&5
22971 $as_echo "$as_me: Resolving WINLD (as $path) failed, using $path directly." >&6;}
22972       new_path="$path"
22973     fi
22974 
22975     if test "x$new_path" = x; then
22976         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$complete\", is not found." >&5
22977 $as_echo "$as_me: The path of WINLD, which resolves as \"$complete\", is not found." >&6;}
22978         has_space=`$ECHO "$complete" | $GREP " "`
22979         if test "x$has_space" != x; then
22980           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
22981 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
22982         fi
22983         as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
22984       fi
22985   fi
22986 
22987       # Now join together the path and the arguments once again
22988       if test "x$arguments" != xEOL; then
22989         new_complete="$new_path ${arguments% *}"
22990       else
22991         new_complete="$new_path"
22992       fi
22993 
22994   if test "x$complete" != "x$new_complete"; then
22995       WINLD="$new_complete"
22996       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting WINLD to \"$new_complete\"" >&5
22997 $as_echo "$as_me: Rewriting WINLD to \"$new_complete\"" >&6;}
22998     fi
22999 
23000     printf "Windows linker was found at $WINLD\n"
23001     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the found link.exe is actually the Visual Studio linker" >&5
23002 $as_echo_n "checking if the found link.exe is actually the Visual Studio linker... " >&6; }
23003     "$WINLD" --version > /dev/null
23004     if test $? -eq 0 ; then
23005       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23006 $as_echo "no" >&6; }
23007       as_fn_error $? "This is the Cygwin link tool. Please check your PATH and rerun configure." "$LINENO" 5
23008     else
23009       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
23010 $as_echo "yes" >&6; }
23011     fi
23012     LD="$WINLD"
23013     LDEXE="$WINLD"
23014     LDCXX="$WINLD"
23015     LDEXECXX="$WINLD"
23016 
23017     # Extract the first word of "mt", so it can be a program name with args.
23018 set dummy mt; ac_word=$2
23019 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23020 $as_echo_n "checking for $ac_word... " >&6; }
23021 if test "${ac_cv_prog_MT+set}" = set; then :
23022   $as_echo_n "(cached) " >&6
23023 else
23024   if test -n "$MT"; then
23025   ac_cv_prog_MT="$MT" # Let the user override the test.
23026 else
23027   ac_prog_rejected=no
23028 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23029 for as_dir in $PATH
23030 do
23031   IFS=$as_save_IFS
23032   test -z "$as_dir" && as_dir=.
23033     for ac_exec_ext in '' $ac_executable_extensions; do
23034   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
23035     if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/mt"; then
23036        ac_prog_rejected=yes
23037        continue
23038      fi
23039     ac_cv_prog_MT="mt"
23040     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23041     break 2
23042   fi
23043 done
23044   done
23045 IFS=$as_save_IFS
23046 
23047 if test $ac_prog_rejected = yes; then
23048   # We found a bogon in the path, so make sure we never use it.
23049   set dummy $ac_cv_prog_MT
23050   shift
23051   if test $# != 0; then
23052     # We chose a different compiler from the bogus one.
23053     # However, it has the same basename, so the bogon will be chosen
23054     # first if we set MT to just the basename; use the full file name.
23055     shift
23056     ac_cv_prog_MT="$as_dir/$ac_word${1+' '}$@"
23057   fi
23058 fi
23059 fi
23060 fi
23061 MT=$ac_cv_prog_MT
23062 if test -n "$MT"; then
23063   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MT" >&5
23064 $as_echo "$MT" >&6; }
23065 else
23066   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23067 $as_echo "no" >&6; }
23068 fi
23069 
23070 
23071 
23072   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23073 
23074   # First separate the path from the arguments. This will split at the first
23075   # space.
23076   complete="$MT"
23077   path="${complete%% *}"
23078   tmp="$complete EOL"
23079   arguments="${tmp#* }"
23080 
23081   # Input might be given as Windows format, start by converting to
23082   # unix format.
23083   new_path=`$CYGPATH -u "$path"`
23084 
23085   # Now try to locate executable using which
23086   new_path=`$WHICH "$new_path" 2> /dev/null`
23087   # bat and cmd files are not always considered executable in cygwin causing which
23088   # to not find them
23089   if test "x$new_path" = x \
23090            && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23091            && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23092     new_path=`$CYGPATH -u "$path"`
23093   fi
23094   if test "x$new_path" = x; then
23095     # Oops. Which didn't find the executable.
23096     # The splitting of arguments from the executable at a space might have been incorrect,
23097     # since paths with space are more likely in Windows. Give it another try with the whole
23098     # argument.
23099     path="$complete"
23100     arguments="EOL"
23101     new_path=`$CYGPATH -u "$path"`
23102     new_path=`$WHICH "$new_path" 2> /dev/null`
23103     # bat and cmd files are not always considered executable in cygwin causing which
23104     # to not find them
23105     if test "x$new_path" = x \
23106              && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23107              && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23108       new_path=`$CYGPATH -u "$path"`
23109     fi
23110     if test "x$new_path" = x; then
23111       # It's still not found. Now this is an unrecoverable error.
23112       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
23113 $as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
23114       has_space=`$ECHO "$complete" | $GREP " "`
23115       if test "x$has_space" != x; then
23116         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23117 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23118       fi
23119       as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
23120     fi
23121   fi
23122 
23123   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23124   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23125   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23126   # "foo.exe" is OK but "foo" is an error.
23127   #
23128   # This test is therefore slightly more accurate than "test -f" to check for file precense.
23129   # It is also a way to make sure we got the proper file name for the real test later on.
23130   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23131   if test "x$test_shortpath" = x; then
23132     # Short path failed, file does not exist as specified.
23133     # Try adding .exe or .cmd
23134     if test -f "${new_path}.exe"; then
23135        input_to_shortpath="${new_path}.exe"
23136     elif test -f "${new_path}.cmd"; then
23137        input_to_shortpath="${new_path}.cmd"
23138     else
23139       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$new_path\", is invalid." >&5
23140 $as_echo "$as_me: The path of MT, which resolves as \"$new_path\", is invalid." >&6;}
23141       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
23142 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
23143       as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
23144     fi
23145   else
23146     input_to_shortpath="$new_path"
23147   fi
23148 
23149   # Call helper function which possibly converts this using DOS-style short mode.
23150   # If so, the updated path is stored in $new_path.
23151   new_path="$input_to_shortpath"
23152 
23153   input_path="$input_to_shortpath"
23154   # Check if we need to convert this using DOS-style short mode. If the path
23155   # contains just simple characters, use it. Otherwise (spaces, weird characters),
23156   # take no chances and rewrite it.
23157   # Note: m4 eats our [], so we need to use [ and ] instead.
23158   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23159   if test "x$has_forbidden_chars" != x; then
23160     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23161     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23162     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23163     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23164       # Going to short mode and back again did indeed matter. Since short mode is
23165       # case insensitive, let's make it lowercase to improve readability.
23166       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23167       # Now convert it back to Unix-stile (cygpath)
23168       input_path=`$CYGPATH -u "$shortmode_path"`
23169       new_path="$input_path"
23170     fi
23171   fi
23172 
23173   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23174   if test "x$test_cygdrive_prefix" = x; then
23175     # As a simple fix, exclude /usr/bin since it's not a real path.
23176     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
23177       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23178       # a path prefixed by /cygdrive for fixpath to work.
23179       new_path="$CYGWIN_ROOT_PATH$input_path"
23180     fi
23181   fi
23182 
23183   # remove trailing .exe if any
23184   new_path="${new_path/%.exe/}"
23185 
23186   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23187 
23188   # First separate the path from the arguments. This will split at the first
23189   # space.
23190   complete="$MT"
23191   path="${complete%% *}"
23192   tmp="$complete EOL"
23193   arguments="${tmp#* }"
23194 
23195   # Input might be given as Windows format, start by converting to
23196   # unix format.
23197   new_path="$path"
23198 
23199   windows_path="$new_path"
23200   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23201     unix_path=`$CYGPATH -u "$windows_path"`
23202     new_path="$unix_path"
23203   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23204     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23205     new_path="$unix_path"
23206   fi
23207 
23208 
23209   # Now try to locate executable using which
23210   new_path=`$WHICH "$new_path" 2> /dev/null`
23211 
23212   if test "x$new_path" = x; then
23213     # Oops. Which didn't find the executable.
23214     # The splitting of arguments from the executable at a space might have been incorrect,
23215     # since paths with space are more likely in Windows. Give it another try with the whole
23216     # argument.
23217     path="$complete"
23218     arguments="EOL"
23219     new_path="$path"
23220 
23221   windows_path="$new_path"
23222   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23223     unix_path=`$CYGPATH -u "$windows_path"`
23224     new_path="$unix_path"
23225   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23226     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23227     new_path="$unix_path"
23228   fi
23229 
23230 
23231     new_path=`$WHICH "$new_path" 2> /dev/null`
23232 
23233     if test "x$new_path" = x; then
23234       # It's still not found. Now this is an unrecoverable error.
23235       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
23236 $as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
23237       has_space=`$ECHO "$complete" | $GREP " "`
23238       if test "x$has_space" != x; then
23239         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23240 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23241       fi
23242       as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
23243     fi
23244   fi
23245 
23246   # Now new_path has a complete unix path to the binary
23247   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
23248     # Keep paths in /bin as-is, but remove trailing .exe if any
23249     new_path="${new_path/%.exe/}"
23250     # Do not save /bin paths to all_fixpath_prefixes!
23251   else
23252     # Not in mixed or Windows style, start by that.
23253     new_path=`cmd //c echo $new_path`
23254 
23255   input_path="$new_path"
23256   # Check if we need to convert this using DOS-style short mode. If the path
23257   # contains just simple characters, use it. Otherwise (spaces, weird characters),
23258   # take no chances and rewrite it.
23259   # Note: m4 eats our [], so we need to use [ and ] instead.
23260   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23261   if test "x$has_forbidden_chars" != x; then
23262     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23263     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23264   fi
23265 
23266     # Output is in $new_path
23267 
23268   windows_path="$new_path"
23269   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23270     unix_path=`$CYGPATH -u "$windows_path"`
23271     new_path="$unix_path"
23272   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23273     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23274     new_path="$unix_path"
23275   fi
23276 
23277     # remove trailing .exe if any
23278     new_path="${new_path/%.exe/}"
23279 
23280     # Save the first 10 bytes of this path to the storage, so fixpath can work.
23281     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23282   fi
23283 
23284   else
23285     # We're on a posix platform. Hooray! :)
23286     # First separate the path from the arguments. This will split at the first
23287     # space.
23288     complete="$MT"
23289     path="${complete%% *}"
23290     tmp="$complete EOL"
23291     arguments="${tmp#* }"
23292 
23293     # Cannot rely on the command "which" here since it doesn't always work.
23294     is_absolute_path=`$ECHO "$path" | $GREP ^/`
23295     if test -z "$is_absolute_path"; then
23296       # Path to executable is not absolute. Find it.
23297       IFS_save="$IFS"
23298       IFS=:
23299       for p in $PATH; do
23300         if test -f "$p/$path" && test -x "$p/$path"; then
23301           new_path="$p/$path"
23302           break
23303         fi
23304       done
23305       IFS="$IFS_save"
23306     else
23307       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving MT (as $path) failed, using $path directly." >&5
23308 $as_echo "$as_me: Resolving MT (as $path) failed, using $path directly." >&6;}
23309       new_path="$path"
23310     fi
23311 
23312     if test "x$new_path" = x; then
23313         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
23314 $as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
23315         has_space=`$ECHO "$complete" | $GREP " "`
23316         if test "x$has_space" != x; then
23317           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
23318 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
23319         fi
23320         as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
23321       fi
23322   fi
23323 
23324       # Now join together the path and the arguments once again
23325       if test "x$arguments" != xEOL; then
23326         new_complete="$new_path ${arguments% *}"
23327       else
23328         new_complete="$new_path"
23329       fi
23330 
23331   if test "x$complete" != "x$new_complete"; then
23332       MT="$new_complete"
23333       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MT to \"$new_complete\"" >&5
23334 $as_echo "$as_me: Rewriting MT to \"$new_complete\"" >&6;}
23335     fi
23336 
23337     # The resource compiler
23338     # Extract the first word of "rc", so it can be a program name with args.
23339 set dummy rc; ac_word=$2
23340 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23341 $as_echo_n "checking for $ac_word... " >&6; }
23342 if test "${ac_cv_prog_RC+set}" = set; then :
23343   $as_echo_n "(cached) " >&6
23344 else
23345   if test -n "$RC"; then
23346   ac_cv_prog_RC="$RC" # Let the user override the test.
23347 else
23348   ac_prog_rejected=no
23349 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23350 for as_dir in $PATH
23351 do
23352   IFS=$as_save_IFS
23353   test -z "$as_dir" && as_dir=.
23354     for ac_exec_ext in '' $ac_executable_extensions; do
23355   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
23356     if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/rc"; then
23357        ac_prog_rejected=yes
23358        continue
23359      fi
23360     ac_cv_prog_RC="rc"
23361     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23362     break 2
23363   fi
23364 done
23365   done
23366 IFS=$as_save_IFS
23367 
23368 if test $ac_prog_rejected = yes; then
23369   # We found a bogon in the path, so make sure we never use it.
23370   set dummy $ac_cv_prog_RC
23371   shift
23372   if test $# != 0; then
23373     # We chose a different compiler from the bogus one.
23374     # However, it has the same basename, so the bogon will be chosen
23375     # first if we set RC to just the basename; use the full file name.
23376     shift
23377     ac_cv_prog_RC="$as_dir/$ac_word${1+' '}$@"
23378   fi
23379 fi
23380 fi
23381 fi
23382 RC=$ac_cv_prog_RC
23383 if test -n "$RC"; then
23384   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RC" >&5
23385 $as_echo "$RC" >&6; }
23386 else
23387   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23388 $as_echo "no" >&6; }
23389 fi
23390 
23391 
23392 
23393   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23394 
23395   # First separate the path from the arguments. This will split at the first
23396   # space.
23397   complete="$RC"
23398   path="${complete%% *}"
23399   tmp="$complete EOL"
23400   arguments="${tmp#* }"
23401 
23402   # Input might be given as Windows format, start by converting to
23403   # unix format.
23404   new_path=`$CYGPATH -u "$path"`
23405 
23406   # Now try to locate executable using which
23407   new_path=`$WHICH "$new_path" 2> /dev/null`
23408   # bat and cmd files are not always considered executable in cygwin causing which
23409   # to not find them
23410   if test "x$new_path" = x \
23411            && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23412            && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23413     new_path=`$CYGPATH -u "$path"`
23414   fi
23415   if test "x$new_path" = x; then
23416     # Oops. Which didn't find the executable.
23417     # The splitting of arguments from the executable at a space might have been incorrect,
23418     # since paths with space are more likely in Windows. Give it another try with the whole
23419     # argument.
23420     path="$complete"
23421     arguments="EOL"
23422     new_path=`$CYGPATH -u "$path"`
23423     new_path=`$WHICH "$new_path" 2> /dev/null`
23424     # bat and cmd files are not always considered executable in cygwin causing which
23425     # to not find them
23426     if test "x$new_path" = x \
23427              && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23428              && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23429       new_path=`$CYGPATH -u "$path"`
23430     fi
23431     if test "x$new_path" = x; then
23432       # It's still not found. Now this is an unrecoverable error.
23433       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
23434 $as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
23435       has_space=`$ECHO "$complete" | $GREP " "`
23436       if test "x$has_space" != x; then
23437         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23438 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23439       fi
23440       as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
23441     fi
23442   fi
23443 
23444   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23445   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23446   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23447   # "foo.exe" is OK but "foo" is an error.
23448   #
23449   # This test is therefore slightly more accurate than "test -f" to check for file precense.
23450   # It is also a way to make sure we got the proper file name for the real test later on.
23451   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23452   if test "x$test_shortpath" = x; then
23453     # Short path failed, file does not exist as specified.
23454     # Try adding .exe or .cmd
23455     if test -f "${new_path}.exe"; then
23456        input_to_shortpath="${new_path}.exe"
23457     elif test -f "${new_path}.cmd"; then
23458        input_to_shortpath="${new_path}.cmd"
23459     else
23460       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$new_path\", is invalid." >&5
23461 $as_echo "$as_me: The path of RC, which resolves as \"$new_path\", is invalid." >&6;}
23462       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
23463 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
23464       as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
23465     fi
23466   else
23467     input_to_shortpath="$new_path"
23468   fi
23469 
23470   # Call helper function which possibly converts this using DOS-style short mode.
23471   # If so, the updated path is stored in $new_path.
23472   new_path="$input_to_shortpath"
23473 
23474   input_path="$input_to_shortpath"
23475   # Check if we need to convert this using DOS-style short mode. If the path
23476   # contains just simple characters, use it. Otherwise (spaces, weird characters),
23477   # take no chances and rewrite it.
23478   # Note: m4 eats our [], so we need to use [ and ] instead.
23479   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23480   if test "x$has_forbidden_chars" != x; then
23481     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23482     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23483     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23484     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23485       # Going to short mode and back again did indeed matter. Since short mode is
23486       # case insensitive, let's make it lowercase to improve readability.
23487       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23488       # Now convert it back to Unix-stile (cygpath)
23489       input_path=`$CYGPATH -u "$shortmode_path"`
23490       new_path="$input_path"
23491     fi
23492   fi
23493 
23494   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23495   if test "x$test_cygdrive_prefix" = x; then
23496     # As a simple fix, exclude /usr/bin since it's not a real path.
23497     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
23498       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23499       # a path prefixed by /cygdrive for fixpath to work.
23500       new_path="$CYGWIN_ROOT_PATH$input_path"
23501     fi
23502   fi
23503 
23504   # remove trailing .exe if any
23505   new_path="${new_path/%.exe/}"
23506 
23507   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23508 
23509   # First separate the path from the arguments. This will split at the first
23510   # space.
23511   complete="$RC"
23512   path="${complete%% *}"
23513   tmp="$complete EOL"
23514   arguments="${tmp#* }"
23515 
23516   # Input might be given as Windows format, start by converting to
23517   # unix format.
23518   new_path="$path"
23519 
23520   windows_path="$new_path"
23521   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23522     unix_path=`$CYGPATH -u "$windows_path"`
23523     new_path="$unix_path"
23524   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23525     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23526     new_path="$unix_path"
23527   fi
23528 
23529 
23530   # Now try to locate executable using which
23531   new_path=`$WHICH "$new_path" 2> /dev/null`
23532 
23533   if test "x$new_path" = x; then
23534     # Oops. Which didn't find the executable.
23535     # The splitting of arguments from the executable at a space might have been incorrect,
23536     # since paths with space are more likely in Windows. Give it another try with the whole
23537     # argument.
23538     path="$complete"
23539     arguments="EOL"
23540     new_path="$path"
23541 
23542   windows_path="$new_path"
23543   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23544     unix_path=`$CYGPATH -u "$windows_path"`
23545     new_path="$unix_path"
23546   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23547     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23548     new_path="$unix_path"
23549   fi
23550 
23551 
23552     new_path=`$WHICH "$new_path" 2> /dev/null`
23553 
23554     if test "x$new_path" = x; then
23555       # It's still not found. Now this is an unrecoverable error.
23556       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
23557 $as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
23558       has_space=`$ECHO "$complete" | $GREP " "`
23559       if test "x$has_space" != x; then
23560         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23561 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23562       fi
23563       as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
23564     fi
23565   fi
23566 
23567   # Now new_path has a complete unix path to the binary
23568   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
23569     # Keep paths in /bin as-is, but remove trailing .exe if any
23570     new_path="${new_path/%.exe/}"
23571     # Do not save /bin paths to all_fixpath_prefixes!
23572   else
23573     # Not in mixed or Windows style, start by that.
23574     new_path=`cmd //c echo $new_path`
23575 
23576   input_path="$new_path"
23577   # Check if we need to convert this using DOS-style short mode. If the path
23578   # contains just simple characters, use it. Otherwise (spaces, weird characters),
23579   # take no chances and rewrite it.
23580   # Note: m4 eats our [], so we need to use [ and ] instead.
23581   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23582   if test "x$has_forbidden_chars" != x; then
23583     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23584     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23585   fi
23586 
23587     # Output is in $new_path
23588 
23589   windows_path="$new_path"
23590   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23591     unix_path=`$CYGPATH -u "$windows_path"`
23592     new_path="$unix_path"
23593   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23594     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23595     new_path="$unix_path"
23596   fi
23597 
23598     # remove trailing .exe if any
23599     new_path="${new_path/%.exe/}"
23600 
23601     # Save the first 10 bytes of this path to the storage, so fixpath can work.
23602     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23603   fi
23604 
23605   else
23606     # We're on a posix platform. Hooray! :)
23607     # First separate the path from the arguments. This will split at the first
23608     # space.
23609     complete="$RC"
23610     path="${complete%% *}"
23611     tmp="$complete EOL"
23612     arguments="${tmp#* }"
23613 
23614     # Cannot rely on the command "which" here since it doesn't always work.
23615     is_absolute_path=`$ECHO "$path" | $GREP ^/`
23616     if test -z "$is_absolute_path"; then
23617       # Path to executable is not absolute. Find it.
23618       IFS_save="$IFS"
23619       IFS=:
23620       for p in $PATH; do
23621         if test -f "$p/$path" && test -x "$p/$path"; then
23622           new_path="$p/$path"
23623           break
23624         fi
23625       done
23626       IFS="$IFS_save"
23627     else
23628       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving RC (as $path) failed, using $path directly." >&5
23629 $as_echo "$as_me: Resolving RC (as $path) failed, using $path directly." >&6;}
23630       new_path="$path"
23631     fi
23632 
23633     if test "x$new_path" = x; then
23634         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
23635 $as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
23636         has_space=`$ECHO "$complete" | $GREP " "`
23637         if test "x$has_space" != x; then
23638           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
23639 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
23640         fi
23641         as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
23642       fi
23643   fi
23644 
23645       # Now join together the path and the arguments once again
23646       if test "x$arguments" != xEOL; then
23647         new_complete="$new_path ${arguments% *}"
23648       else
23649         new_complete="$new_path"
23650       fi
23651 
23652   if test "x$complete" != "x$new_complete"; then
23653       RC="$new_complete"
23654       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting RC to \"$new_complete\"" >&5
23655 $as_echo "$as_me: Rewriting RC to \"$new_complete\"" >&6;}
23656     fi
23657 
23658 
23659     # For hotspot, we need these in Windows mixed path,
23660     # so rewrite them all. Need added .exe suffix.
23661     HOTSPOT_CXX="$CXX.exe"
23662     HOTSPOT_LD="$LD.exe"
23663     HOTSPOT_MT="$MT.exe"
23664     HOTSPOT_RC="$RC.exe"
23665 
23666   unix_path="$HOTSPOT_CXX"
23667   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23668     windows_path=`$CYGPATH -m "$unix_path"`
23669     HOTSPOT_CXX="$windows_path"
23670   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23671     windows_path=`cmd //c echo $unix_path`
23672     HOTSPOT_CXX="$windows_path"
23673   fi
23674 
23675 
23676   unix_path="$HOTSPOT_LD"
23677   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23678     windows_path=`$CYGPATH -m "$unix_path"`
23679     HOTSPOT_LD="$windows_path"
23680   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23681     windows_path=`cmd //c echo $unix_path`
23682     HOTSPOT_LD="$windows_path"
23683   fi
23684 
23685 
23686   unix_path="$HOTSPOT_MT"
23687   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23688     windows_path=`$CYGPATH -m "$unix_path"`
23689     HOTSPOT_MT="$windows_path"
23690   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23691     windows_path=`cmd //c echo $unix_path`
23692     HOTSPOT_MT="$windows_path"
23693   fi
23694 
23695 
23696   unix_path="$HOTSPOT_RC"
23697   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23698     windows_path=`$CYGPATH -m "$unix_path"`
23699     HOTSPOT_RC="$windows_path"
23700   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23701     windows_path=`cmd //c echo $unix_path`
23702     HOTSPOT_RC="$windows_path"
23703   fi
23704 
23705 
23706 
23707 
23708     RC_FLAGS="-nologo -l 0x409 -r"
23709     if test "x$VARIANT" = xOPT; then :
23710 
23711         RC_FLAGS="$RC_FLAGS -d NDEBUG"
23712 
23713 fi
23714     JDK_UPDATE_VERSION_NOTNULL=$JDK_UPDATE_VERSION
23715     if test "x$JDK_UPDATE_VERSION" = x; then :
23716 
23717         JDK_UPDATE_VERSION_NOTNULL=0
23718 
23719 fi
23720     RC_FLAGS="$RC_FLAGS -d \"JDK_BUILD_ID=$FULL_VERSION\""
23721     RC_FLAGS="$RC_FLAGS -d \"JDK_COMPANY=$COMPANY_NAME\""
23722     RC_FLAGS="$RC_FLAGS -d \"JDK_COMPONENT=$PRODUCT_NAME $JDK_RC_PLATFORM_NAME binary\""
23723     RC_FLAGS="$RC_FLAGS -d \"JDK_VER=$JDK_MINOR_VERSION.$JDK_MICRO_VERSION.$JDK_UPDATE_VERSION_NOTNULL.$COOKED_BUILD_NUMBER\""
23724     RC_FLAGS="$RC_FLAGS -d \"JDK_COPYRIGHT=Copyright \xA9 $COPYRIGHT_YEAR\""
23725     RC_FLAGS="$RC_FLAGS -d \"JDK_NAME=$PRODUCT_NAME $JDK_RC_PLATFORM_NAME $JDK_MINOR_VERSION $JDK_UPDATE_META_TAG\""
23726     RC_FLAGS="$RC_FLAGS -d \"JDK_FVER=$JDK_MINOR_VERSION,$JDK_MICRO_VERSION,$JDK_UPDATE_VERSION_NOTNULL,$COOKED_BUILD_NUMBER\""
23727 
23728     # lib.exe is used to create static libraries.
23729     # Extract the first word of "lib", so it can be a program name with args.
23730 set dummy lib; ac_word=$2
23731 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23732 $as_echo_n "checking for $ac_word... " >&6; }
23733 if test "${ac_cv_prog_WINAR+set}" = set; then :
23734   $as_echo_n "(cached) " >&6
23735 else
23736   if test -n "$WINAR"; then
23737   ac_cv_prog_WINAR="$WINAR" # Let the user override the test.
23738 else
23739 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23740 for as_dir in $PATH
23741 do
23742   IFS=$as_save_IFS
23743   test -z "$as_dir" && as_dir=.
23744     for ac_exec_ext in '' $ac_executable_extensions; do
23745   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
23746     ac_cv_prog_WINAR="lib"
23747     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23748     break 2
23749   fi
23750 done
23751   done
23752 IFS=$as_save_IFS
23753 
23754 fi
23755 fi
23756 WINAR=$ac_cv_prog_WINAR
23757 if test -n "$WINAR"; then
23758   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINAR" >&5
23759 $as_echo "$WINAR" >&6; }
23760 else
23761   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23762 $as_echo "no" >&6; }
23763 fi
23764 
23765 
23766 
23767   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23768 
23769   # First separate the path from the arguments. This will split at the first
23770   # space.
23771   complete="$WINAR"
23772   path="${complete%% *}"
23773   tmp="$complete EOL"
23774   arguments="${tmp#* }"
23775 
23776   # Input might be given as Windows format, start by converting to
23777   # unix format.
23778   new_path=`$CYGPATH -u "$path"`
23779 
23780   # Now try to locate executable using which
23781   new_path=`$WHICH "$new_path" 2> /dev/null`
23782   # bat and cmd files are not always considered executable in cygwin causing which
23783   # to not find them
23784   if test "x$new_path" = x \
23785            && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23786            && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23787     new_path=`$CYGPATH -u "$path"`
23788   fi
23789   if test "x$new_path" = x; then
23790     # Oops. Which didn't find the executable.
23791     # The splitting of arguments from the executable at a space might have been incorrect,
23792     # since paths with space are more likely in Windows. Give it another try with the whole
23793     # argument.
23794     path="$complete"
23795     arguments="EOL"
23796     new_path=`$CYGPATH -u "$path"`
23797     new_path=`$WHICH "$new_path" 2> /dev/null`
23798     # bat and cmd files are not always considered executable in cygwin causing which
23799     # to not find them
23800     if test "x$new_path" = x \
23801              && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23802              && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23803       new_path=`$CYGPATH -u "$path"`
23804     fi
23805     if test "x$new_path" = x; then
23806       # It's still not found. Now this is an unrecoverable error.
23807       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$complete\", is not found." >&5
23808 $as_echo "$as_me: The path of WINAR, which resolves as \"$complete\", is not found." >&6;}
23809       has_space=`$ECHO "$complete" | $GREP " "`
23810       if test "x$has_space" != x; then
23811         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23812 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23813       fi
23814       as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5
23815     fi
23816   fi
23817 
23818   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23819   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23820   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23821   # "foo.exe" is OK but "foo" is an error.
23822   #
23823   # This test is therefore slightly more accurate than "test -f" to check for file precense.
23824   # It is also a way to make sure we got the proper file name for the real test later on.
23825   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23826   if test "x$test_shortpath" = x; then
23827     # Short path failed, file does not exist as specified.
23828     # Try adding .exe or .cmd
23829     if test -f "${new_path}.exe"; then
23830        input_to_shortpath="${new_path}.exe"
23831     elif test -f "${new_path}.cmd"; then
23832        input_to_shortpath="${new_path}.cmd"
23833     else
23834       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$new_path\", is invalid." >&5
23835 $as_echo "$as_me: The path of WINAR, which resolves as \"$new_path\", is invalid." >&6;}
23836       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
23837 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
23838       as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5
23839     fi
23840   else
23841     input_to_shortpath="$new_path"
23842   fi
23843 
23844   # Call helper function which possibly converts this using DOS-style short mode.
23845   # If so, the updated path is stored in $new_path.
23846   new_path="$input_to_shortpath"
23847 
23848   input_path="$input_to_shortpath"
23849   # Check if we need to convert this using DOS-style short mode. If the path
23850   # contains just simple characters, use it. Otherwise (spaces, weird characters),
23851   # take no chances and rewrite it.
23852   # Note: m4 eats our [], so we need to use [ and ] instead.
23853   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23854   if test "x$has_forbidden_chars" != x; then
23855     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23856     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23857     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23858     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23859       # Going to short mode and back again did indeed matter. Since short mode is
23860       # case insensitive, let's make it lowercase to improve readability.
23861       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23862       # Now convert it back to Unix-stile (cygpath)
23863       input_path=`$CYGPATH -u "$shortmode_path"`
23864       new_path="$input_path"
23865     fi
23866   fi
23867 
23868   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23869   if test "x$test_cygdrive_prefix" = x; then
23870     # As a simple fix, exclude /usr/bin since it's not a real path.
23871     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
23872       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23873       # a path prefixed by /cygdrive for fixpath to work.
23874       new_path="$CYGWIN_ROOT_PATH$input_path"
23875     fi
23876   fi
23877 
23878   # remove trailing .exe if any
23879   new_path="${new_path/%.exe/}"
23880 
23881   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23882 
23883   # First separate the path from the arguments. This will split at the first
23884   # space.
23885   complete="$WINAR"
23886   path="${complete%% *}"
23887   tmp="$complete EOL"
23888   arguments="${tmp#* }"
23889 
23890   # Input might be given as Windows format, start by converting to
23891