1 #! /bin/sh
   2 # Guess values for system-dependent variables and create Makefiles.
   3 # Generated by GNU Autoconf 2.68 for OpenJDK jdk8.
   4 #
   5 # Report bugs to <build-dev@openjdk.java.net>.
   6 #
   7 #
   8 # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
   9 # 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software
  10 # Foundation, Inc.
  11 #
  12 #
  13 # This configure script is free software; the Free Software Foundation
  14 # gives unlimited permission to copy, distribute and modify it.
  15 ## -------------------- ##
  16 ## M4sh Initialization. ##
  17 ## -------------------- ##
  18 
  19 # Be more Bourne compatible
  20 DUALCASE=1; export DUALCASE # for MKS sh
  21 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
  22   emulate sh
  23   NULLCMD=:
  24   # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
  25   # is contrary to our usage.  Disable this feature.
  26   alias -g '${1+"$@"}'='"$@"'
  27   setopt NO_GLOB_SUBST
  28 else
  29   case `(set -o) 2>/dev/null` in #(
  30   *posix*) :
  31     set -o posix ;; #(
  32   *) :
  33      ;;
  34 esac
  35 fi
  36 
  37 
  38 as_nl='
  39 '
  40 export as_nl
  41 # Printing a long string crashes Solaris 7 /usr/bin/printf.
  42 as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
  43 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
  44 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
  45 # Prefer a ksh shell builtin over an external printf program on Solaris,
  46 # but without wasting forks for bash or zsh.
  47 if test -z "$BASH_VERSION$ZSH_VERSION" \
  48     && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
  49   as_echo='print -r --'
  50   as_echo_n='print -rn --'
  51 elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
  52   as_echo='printf %s\n'
  53   as_echo_n='printf %s'
  54 else
  55   if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
  56     as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
  57     as_echo_n='/usr/ucb/echo -n'
  58   else
  59     as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
  60     as_echo_n_body='eval
  61       arg=$1;
  62       case $arg in #(
  63       *"$as_nl"*)
  64         expr "X$arg" : "X\\(.*\\)$as_nl";
  65         arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
  66       esac;
  67       expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
  68     '
  69     export as_echo_n_body
  70     as_echo_n='sh -c $as_echo_n_body as_echo'
  71   fi
  72   export as_echo_body
  73   as_echo='sh -c $as_echo_body as_echo'
  74 fi
  75 
  76 # The user is always right.
  77 if test "${PATH_SEPARATOR+set}" != set; then
  78   PATH_SEPARATOR=:
  79   (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
  80     (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
  81       PATH_SEPARATOR=';'
  82   }
  83 fi
  84 
  85 
  86 # IFS
  87 # We need space, tab and new line, in precisely that order.  Quoting is
  88 # there to prevent editors from complaining about space-tab.
  89 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
  90 # splitting by setting IFS to empty value.)
  91 IFS=" ""        $as_nl"
  92 
  93 # Find who we are.  Look in the path if we contain no directory separator.
  94 as_myself=
  95 case $0 in #((
  96   *[\\/]* ) as_myself=$0 ;;
  97   *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
  98 for as_dir in $PATH
  99 do
 100   IFS=$as_save_IFS
 101   test -z "$as_dir" && as_dir=.
 102     test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
 103   done
 104 IFS=$as_save_IFS
 105 
 106      ;;
 107 esac
 108 # We did not find ourselves, most probably we were run as `sh COMMAND'
 109 # in which case we are not to be found in the path.
 110 if test "x$as_myself" = x; then
 111   as_myself=$0
 112 fi
 113 if test ! -f "$as_myself"; then
 114   $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
 115   exit 1
 116 fi
 117 
 118 # Unset variables that we do not need and which cause bugs (e.g. in
 119 # pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
 120 # suppresses any "Segmentation fault" message there.  '((' could
 121 # trigger a bug in pdksh 5.2.14.
 122 for as_var in BASH_ENV ENV MAIL MAILPATH
 123 do eval test x\${$as_var+set} = xset \
 124   && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
 125 done
 126 PS1='$ '
 127 PS2='> '
 128 PS4='+ '
 129 
 130 # NLS nuisances.
 131 LC_ALL=C
 132 export LC_ALL
 133 LANGUAGE=C
 134 export LANGUAGE
 135 
 136 # CDPATH.
 137 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
 138 
 139 if test "x$CONFIG_SHELL" = x; then
 140   as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
 141   emulate sh
 142   NULLCMD=:
 143   # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
 144   # is contrary to our usage.  Disable this feature.
 145   alias -g '\${1+\"\$@\"}'='\"\$@\"'
 146   setopt NO_GLOB_SUBST
 147 else
 148   case \`(set -o) 2>/dev/null\` in #(
 149   *posix*) :
 150     set -o posix ;; #(
 151   *) :
 152      ;;
 153 esac
 154 fi
 155 "
 156   as_required="as_fn_return () { (exit \$1); }
 157 as_fn_success () { as_fn_return 0; }
 158 as_fn_failure () { as_fn_return 1; }
 159 as_fn_ret_success () { return 0; }
 160 as_fn_ret_failure () { return 1; }
 161 
 162 exitcode=0
 163 as_fn_success || { exitcode=1; echo as_fn_success failed.; }
 164 as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
 165 as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
 166 as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
 167 if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
 168 
 169 else
 170   exitcode=1; echo positional parameters were not saved.
 171 fi
 172 test x\$exitcode = x0 || exit 1"
 173   as_suggested="  as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
 174   as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
 175   eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
 176   test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
 177 test \$(( 1 + 1 )) = 2 || exit 1"
 178   if (eval "$as_required") 2>/dev/null; then :
 179   as_have_required=yes
 180 else
 181   as_have_required=no
 182 fi
 183   if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
 184 
 185 else
 186   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
 187 as_found=false
 188 for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
 189 do
 190   IFS=$as_save_IFS
 191   test -z "$as_dir" && as_dir=.
 192   as_found=:
 193   case $as_dir in #(
 194          /*)
 195            for as_base in sh bash ksh sh5; do
 196              # Try only shells that exist, to save several forks.
 197              as_shell=$as_dir/$as_base
 198              if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
 199                     { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
 200   CONFIG_SHELL=$as_shell as_have_required=yes
 201                    if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
 202   break 2
 203 fi
 204 fi
 205            done;;
 206        esac
 207   as_found=false
 208 done
 209 $as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
 210               { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
 211   CONFIG_SHELL=$SHELL as_have_required=yes
 212 fi; }
 213 IFS=$as_save_IFS
 214 
 215 
 216       if test "x$CONFIG_SHELL" != x; then :
 217   # We cannot yet assume a decent shell, so we have to provide a
 218         # neutralization value for shells without unset; and this also
 219         # works around shells that cannot unset nonexistent variables.
 220         # Preserve -v and -x to the replacement shell.
 221         BASH_ENV=/dev/null
 222         ENV=/dev/null
 223         (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
 224         export CONFIG_SHELL
 225         case $- in # ((((
 226           *v*x* | *x*v* ) as_opts=-vx ;;
 227           *v* ) as_opts=-v ;;
 228           *x* ) as_opts=-x ;;
 229           * ) as_opts= ;;
 230         esac
 231         exec "$CONFIG_SHELL" $as_opts "$as_myself" ${1+"$@"}
 232 fi
 233 
 234     if test x$as_have_required = xno; then :
 235   $as_echo "$0: This script requires a shell more modern than all"
 236   $as_echo "$0: the shells that I found on your system."
 237   if test x${ZSH_VERSION+set} = xset ; then
 238     $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
 239     $as_echo "$0: be upgraded to zsh 4.3.4 or later."
 240   else
 241     $as_echo "$0: Please tell bug-autoconf@gnu.org and
 242 $0: build-dev@openjdk.java.net about your system, including
 243 $0: any error possibly output before this message. Then
 244 $0: install a modern shell, or manually run the script
 245 $0: under such a shell if you do have one."
 246   fi
 247   exit 1
 248 fi
 249 fi
 250 fi
 251 SHELL=${CONFIG_SHELL-/bin/sh}
 252 export SHELL
 253 # Unset more variables known to interfere with behavior of common tools.
 254 CLICOLOR_FORCE= GREP_OPTIONS=
 255 unset CLICOLOR_FORCE GREP_OPTIONS
 256 
 257 ## --------------------- ##
 258 ## M4sh Shell Functions. ##
 259 ## --------------------- ##
 260 # as_fn_unset VAR
 261 # ---------------
 262 # Portably unset VAR.
 263 as_fn_unset ()
 264 {
 265   { eval $1=; unset $1;}
 266 }
 267 as_unset=as_fn_unset
 268 
 269 # as_fn_set_status STATUS
 270 # -----------------------
 271 # Set $? to STATUS, without forking.
 272 as_fn_set_status ()
 273 {
 274   return $1
 275 } # as_fn_set_status
 276 
 277 # as_fn_exit STATUS
 278 # -----------------
 279 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
 280 as_fn_exit ()
 281 {
 282   set +e
 283   as_fn_set_status $1
 284   exit $1
 285 } # as_fn_exit
 286 
 287 # as_fn_mkdir_p
 288 # -------------
 289 # Create "$as_dir" as a directory, including parents if necessary.
 290 as_fn_mkdir_p ()
 291 {
 292 
 293   case $as_dir in #(
 294   -*) as_dir=./$as_dir;;
 295   esac
 296   test -d "$as_dir" || eval $as_mkdir_p || {
 297     as_dirs=
 298     while :; do
 299       case $as_dir in #(
 300       *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
 301       *) as_qdir=$as_dir;;
 302       esac
 303       as_dirs="'$as_qdir' $as_dirs"
 304       as_dir=`$as_dirname -- "$as_dir" ||
 305 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
 306          X"$as_dir" : 'X\(//\)[^/]' \| \
 307          X"$as_dir" : 'X\(//\)$' \| \
 308          X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
 309 $as_echo X"$as_dir" |
 310     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
 311             s//\1/
 312             q
 313           }
 314           /^X\(\/\/\)[^/].*/{
 315             s//\1/
 316             q
 317           }
 318           /^X\(\/\/\)$/{
 319             s//\1/
 320             q
 321           }
 322           /^X\(\/\).*/{
 323             s//\1/
 324             q
 325           }
 326           s/.*/./; q'`
 327       test -d "$as_dir" && break
 328     done
 329     test -z "$as_dirs" || eval "mkdir $as_dirs"
 330   } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
 331 
 332 
 333 } # as_fn_mkdir_p
 334 # as_fn_append VAR VALUE
 335 # ----------------------
 336 # Append the text in VALUE to the end of the definition contained in VAR. Take
 337 # advantage of any shell optimizations that allow amortized linear growth over
 338 # repeated appends, instead of the typical quadratic growth present in naive
 339 # implementations.
 340 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
 341   eval 'as_fn_append ()
 342   {
 343     eval $1+=\$2
 344   }'
 345 else
 346   as_fn_append ()
 347   {
 348     eval $1=\$$1\$2
 349   }
 350 fi # as_fn_append
 351 
 352 # as_fn_arith ARG...
 353 # ------------------
 354 # Perform arithmetic evaluation on the ARGs, and store the result in the
 355 # global $as_val. Take advantage of shells that can avoid forks. The arguments
 356 # must be portable across $(()) and expr.
 357 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
 358   eval 'as_fn_arith ()
 359   {
 360     as_val=$(( $* ))
 361   }'
 362 else
 363   as_fn_arith ()
 364   {
 365     as_val=`expr "$@" || test $? -eq 1`
 366   }
 367 fi # as_fn_arith
 368 
 369 
 370 # as_fn_error STATUS ERROR [LINENO LOG_FD]
 371 # ----------------------------------------
 372 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
 373 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
 374 # script with STATUS, using 1 if that was 0.
 375 as_fn_error ()
 376 {
 377   as_status=$1; test $as_status -eq 0 && as_status=1
 378   if test "$4"; then
 379     as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
 380     $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
 381   fi
 382   $as_echo "$as_me: error: $2" >&2
 383   as_fn_exit $as_status
 384 } # as_fn_error
 385 
 386 if expr a : '\(a\)' >/dev/null 2>&1 &&
 387    test "X`expr 00001 : '.*\(...\)'`" = X001; then
 388   as_expr=expr
 389 else
 390   as_expr=false
 391 fi
 392 
 393 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
 394   as_basename=basename
 395 else
 396   as_basename=false
 397 fi
 398 
 399 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
 400   as_dirname=dirname
 401 else
 402   as_dirname=false
 403 fi
 404 
 405 as_me=`$as_basename -- "$0" ||
 406 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
 407          X"$0" : 'X\(//\)$' \| \
 408          X"$0" : 'X\(/\)' \| . 2>/dev/null ||
 409 $as_echo X/"$0" |
 410     sed '/^.*\/\([^/][^/]*\)\/*$/{
 411             s//\1/
 412             q
 413           }
 414           /^X\/\(\/\/\)$/{
 415             s//\1/
 416             q
 417           }
 418           /^X\/\(\/\).*/{
 419             s//\1/
 420             q
 421           }
 422           s/.*/./; q'`
 423 
 424 # Avoid depending upon Character Ranges.
 425 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
 426 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
 427 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
 428 as_cr_digits='0123456789'
 429 as_cr_alnum=$as_cr_Letters$as_cr_digits
 430 
 431 
 432   as_lineno_1=$LINENO as_lineno_1a=$LINENO
 433   as_lineno_2=$LINENO as_lineno_2a=$LINENO
 434   eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
 435   test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
 436   # Blame Lee E. McMahon (1931-1989) for sed's syntax.  :-)
 437   sed -n '
 438     p
 439     /[$]LINENO/=
 440   ' <$as_myself |
 441     sed '
 442       s/[$]LINENO.*/&-/
 443       t lineno
 444       b
 445       :lineno
 446       N
 447       :loop
 448       s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
 449       t loop
 450       s/-\n.*//
 451     ' >$as_me.lineno &&
 452   chmod +x "$as_me.lineno" ||
 453     { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
 454 
 455   # Don't try to exec as it changes $[0], causing all sort of problems
 456   # (the dirname of $[0] is not the place where we might find the
 457   # original and so on.  Autoconf is especially sensitive to this).
 458   . "./$as_me.lineno"
 459   # Exit status is that of the last command.
 460   exit
 461 }
 462 
 463 ECHO_C= ECHO_N= ECHO_T=
 464 case `echo -n x` in #(((((
 465 -n*)
 466   case `echo 'xy\c'` in
 467   *c*) ECHO_T=' ';;     # ECHO_T is single tab character.
 468   xy)  ECHO_C='\c';;
 469   *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
 470        ECHO_T=' ';;
 471   esac;;
 472 *)
 473   ECHO_N='-n';;
 474 esac
 475 
 476 rm -f conf$$ conf$$.exe conf$$.file
 477 if test -d conf$$.dir; then
 478   rm -f conf$$.dir/conf$$.file
 479 else
 480   rm -f conf$$.dir
 481   mkdir conf$$.dir 2>/dev/null
 482 fi
 483 if (echo >conf$$.file) 2>/dev/null; then
 484   if ln -s conf$$.file conf$$ 2>/dev/null; then
 485     as_ln_s='ln -s'
 486     # ... but there are two gotchas:
 487     # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
 488     # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
 489     # In both cases, we have to default to `cp -p'.
 490     ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
 491       as_ln_s='cp -p'
 492   elif ln conf$$.file conf$$ 2>/dev/null; then
 493     as_ln_s=ln
 494   else
 495     as_ln_s='cp -p'
 496   fi
 497 else
 498   as_ln_s='cp -p'
 499 fi
 500 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
 501 rmdir conf$$.dir 2>/dev/null
 502 
 503 if mkdir -p . 2>/dev/null; then
 504   as_mkdir_p='mkdir -p "$as_dir"'
 505 else
 506   test -d ./-p && rmdir ./-p
 507   as_mkdir_p=false
 508 fi
 509 
 510 if test -x / >/dev/null 2>&1; then
 511   as_test_x='test -x'
 512 else
 513   if ls -dL / >/dev/null 2>&1; then
 514     as_ls_L_option=L
 515   else
 516     as_ls_L_option=
 517   fi
 518   as_test_x='
 519     eval sh -c '\''
 520       if test -d "$1"; then
 521         test -d "$1/.";
 522       else
 523         case $1 in #(
 524         -*)set "./$1";;
 525         esac;
 526         case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
 527         ???[sx]*):;;*)false;;esac;fi
 528     '\'' sh
 529   '
 530 fi
 531 as_executable_p=$as_test_x
 532 
 533 # Sed expression to map a string onto a valid CPP name.
 534 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
 535 
 536 # Sed expression to map a string onto a valid variable name.
 537 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
 538 
 539 
 540 test -n "$DJDIR" || exec 7<&0 </dev/null
 541 exec 6>&1
 542 
 543 # Name of the host.
 544 # hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
 545 # so uname gets run too.
 546 ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
 547 
 548 #
 549 # Initializations.
 550 #
 551 ac_default_prefix=/usr/local
 552 ac_clean_files=
 553 ac_config_libobj_dir=.
 554 LIBOBJS=
 555 cross_compiling=no
 556 subdirs=
 557 MFLAGS=
 558 MAKEFLAGS=
 559 
 560 # Identity of this package.
 561 PACKAGE_NAME='OpenJDK'
 562 PACKAGE_TARNAME='openjdk'
 563 PACKAGE_VERSION='jdk8'
 564 PACKAGE_STRING='OpenJDK jdk8'
 565 PACKAGE_BUGREPORT='build-dev@openjdk.java.net'
 566 PACKAGE_URL='http://openjdk.java.net'
 567 
 568 # Factoring default headers for most tests.
 569 ac_includes_default="\
 570 #include <stdio.h>
 571 #ifdef HAVE_SYS_TYPES_H
 572 # include <sys/types.h>
 573 #endif
 574 #ifdef HAVE_SYS_STAT_H
 575 # include <sys/stat.h>
 576 #endif
 577 #ifdef STDC_HEADERS
 578 # include <stdlib.h>
 579 # include <stddef.h>
 580 #else
 581 # ifdef HAVE_STDLIB_H
 582 #  include <stdlib.h>
 583 # endif
 584 #endif
 585 #ifdef HAVE_STRING_H
 586 # if !defined STDC_HEADERS && defined HAVE_MEMORY_H
 587 #  include <memory.h>
 588 # endif
 589 # include <string.h>
 590 #endif
 591 #ifdef HAVE_STRINGS_H
 592 # include <strings.h>
 593 #endif
 594 #ifdef HAVE_INTTYPES_H
 595 # include <inttypes.h>
 596 #endif
 597 #ifdef HAVE_STDINT_H
 598 # include <stdint.h>
 599 #endif
 600 #ifdef HAVE_UNISTD_H
 601 # include <unistd.h>
 602 #endif"
 603 
 604 ac_subst_vars='LTLIBOBJS
 605 LIBOBJS
 606 CCACHE
 607 USE_PRECOMPILED_HEADER
 608 SJAVAC_SERVER_DIR
 609 ENABLE_SJAVAC
 610 SJAVAC_SERVER_JAVA
 611 JOBS
 612 MEMORY_SIZE
 613 NUM_CORES
 614 ENABLE_INTREE_EC
 615 SALIB_NAME
 616 HOTSPOT_MAKE_ARGS
 617 FIXPATH
 618 LIBCXX
 619 LLVM_LIBS
 620 LLVM_LDFLAGS
 621 LLVM_CFLAGS
 622 LLVM_CONFIG
 623 LIBFFI_LIBS
 624 LIBFFI_CFLAGS
 625 STATIC_CXX_SETTING
 626 LIBDL
 627 LIBM
 628 LIBZIP_CAN_USE_MMAP
 629 USE_EXTERNAL_LIBZ
 630 USE_EXTERNAL_LIBGIF
 631 USE_EXTERNAL_LIBJPEG
 632 ALSA_LIBS
 633 ALSA_CFLAGS
 634 FREETYPE2_LIB_PATH
 635 USING_SYSTEM_FT_LIB
 636 FREETYPE2_LIBS
 637 FREETYPE2_CFLAGS
 638 USE_EXTERNAL_ICU_LE
 639 ICU_LE_LIBS
 640 ICU_LE_CFLAGS
 641 CUPS_CFLAGS
 642 OPENWIN_HOME
 643 X_EXTRA_LIBS
 644 X_LIBS
 645 X_PRE_LIBS
 646 X_CFLAGS
 647 XMKMF
 648 CXXFLAGS_DEBUG_SYMBOLS
 649 CFLAGS_DEBUG_SYMBOLS
 650 ZIP_DEBUGINFO_FILES
 651 ENABLE_DEBUG_SYMBOLS
 652 COMPILER_SUPPORTS_TARGET_BITS_FLAG
 653 ZERO_ARCHFLAG
 654 LDFLAGS_CXX_JDK
 655 LDFLAGS_JDKEXE_SUFFIX
 656 LDFLAGS_JDKLIB_SUFFIX
 657 LDFLAGS_JDKEXE
 658 LDFLAGS_JDKLIB
 659 CXXFLAGS_JDKEXE
 660 CXXFLAGS_JDKLIB
 661 CFLAGS_JDKEXE
 662 CFLAGS_JDKLIB
 663 MACOSX_VERSION_MIN
 664 PACKAGE_PATH
 665 LEGACY_EXTRA_LDFLAGS
 666 LEGACY_EXTRA_CXXFLAGS
 667 LEGACY_EXTRA_CFLAGS
 668 CXX_FLAG_DEPS
 669 C_FLAG_DEPS
 670 CXX_O_FLAG_NONE
 671 CXX_O_FLAG_NORM
 672 CXX_O_FLAG_HI
 673 CXX_O_FLAG_HIGHEST
 674 C_O_FLAG_NONE
 675 C_O_FLAG_NORM
 676 C_O_FLAG_HI
 677 C_O_FLAG_HIGHEST
 678 POST_MCS_CMD
 679 POST_STRIP_CMD
 680 SET_EXECUTABLE_ORIGIN
 681 SET_SHARED_LIBRARY_ORIGIN
 682 CXX_FLAG_REORDER
 683 C_FLAG_REORDER
 684 SET_SHARED_LIBRARY_MAPFILE
 685 SET_SHARED_LIBRARY_NAME
 686 SHARED_LIBRARY_FLAGS
 687 EXE_SUFFIX
 688 STATIC_LIBRARY_SUFFIX
 689 SHARED_LIBRARY_SUFFIX
 690 LIBRARY_PREFIX
 691 STATIC_LIBRARY
 692 SHARED_LIBRARY
 693 OBJ_SUFFIX
 694 COMPILER_NAME
 695 JT_HOME
 696 JTREGEXE
 697 LIPO
 698 ac_ct_OBJDUMP
 699 OBJDUMP
 700 ac_ct_OBJCOPY
 701 OBJCOPY
 702 MCS
 703 STRIP
 704 GNM
 705 NM
 706 AS
 707 CXXCPP
 708 CPP
 709 COMPILER_TYPE
 710 RC_FLAGS
 711 DUMPBIN
 712 WINAR
 713 HOTSPOT_RC
 714 HOTSPOT_MT
 715 RC
 716 MT
 717 WINLD
 718 HOTSPOT_LD
 719 HOTSPOT_CXX
 720 ARFLAGS
 721 AR
 722 LDEXECXX
 723 LDCXX
 724 LDEXE
 725 LD
 726 ac_ct_OBJC
 727 OBJCFLAGS
 728 OBJC
 729 ac_ct_CXX
 730 CXXFLAGS
 731 CXX
 732 ac_ct_PROPER_COMPILER_CXX
 733 PROPER_COMPILER_CXX
 734 POTENTIAL_CXX
 735 TOOLS_DIR_CXX
 736 OBJEXT
 737 EXEEXT
 738 ac_ct_CC
 739 CPPFLAGS
 740 LDFLAGS
 741 CFLAGS
 742 CC
 743 ac_ct_PROPER_COMPILER_CC
 744 PROPER_COMPILER_CC
 745 POTENTIAL_CC
 746 TOOLS_DIR_CC
 747 BUILD_LD
 748 BUILD_CXX
 749 BUILD_CC
 750 MSVCR_DLL
 751 DXSDK_INCLUDE_PATH
 752 DXSDK_LIB_PATH
 753 VS_PATH
 754 VS_LIB
 755 VS_INCLUDE
 756 CYGWIN_LINK
 757 AR_OUT_OPTION
 758 LD_OUT_OPTION
 759 EXE_OUT_OPTION
 760 CC_OUT_OPTION
 761 BUILD_HOTSPOT
 762 HOTSPOT_DIST
 763 BUILD_OUTPUT
 764 OVERRIDE_SRC_ROOT
 765 ADD_SRC_ROOT
 766 JDK_TOPDIR
 767 NASHORN_TOPDIR
 768 HOTSPOT_TOPDIR
 769 JAXWS_TOPDIR
 770 JAXP_TOPDIR
 771 CORBA_TOPDIR
 772 LANGTOOLS_TOPDIR
 773 BOOT_JDK_JVMARGS
 774 JAVAC_FLAGS
 775 BOOT_JDK_SOURCETARGET
 776 BOOT_JDK
 777 BOOT_TOOLSJAR
 778 BOOT_RTJAR
 779 JAVA_CHECK
 780 JAVAC_CHECK
 781 COOKED_BUILD_NUMBER
 782 JDK_VERSION
 783 COPYRIGHT_YEAR
 784 MACOSX_BUNDLE_ID_BASE
 785 MACOSX_BUNDLE_NAME_BASE
 786 COMPANY_NAME
 787 JDK_RC_PLATFORM_NAME
 788 PRODUCT_SUFFIX
 789 PRODUCT_NAME
 790 LAUNCHER_NAME
 791 MILESTONE
 792 JDK_BUILD_NUMBER
 793 JDK_UPDATE_VERSION
 794 JDK_MICRO_VERSION
 795 JDK_MINOR_VERSION
 796 JDK_MAJOR_VERSION
 797 USER_RELEASE_SUFFIX
 798 COMPRESS_JARS
 799 UNLIMITED_CRYPTO
 800 CACERTS_FILE
 801 TEST_IN_BUILD
 802 BUILD_HEADLESS
 803 SUPPORT_HEADFUL
 804 SUPPORT_HEADLESS
 805 BDEPS_FTP
 806 BDEPS_UNZIP
 807 OS_VERSION_MICRO
 808 OS_VERSION_MINOR
 809 OS_VERSION_MAJOR
 810 PKG_CONFIG
 811 CODESIGN
 812 XATTR
 813 TIME
 814 STAT
 815 HG
 816 READELF
 817 OTOOL
 818 LDD
 819 ZIP
 820 UNZIP
 821 FIND_DELETE
 822 MAKE
 823 CHECK_TOOLSDIR_MAKE
 824 CHECK_TOOLSDIR_GMAKE
 825 CHECK_MAKE
 826 CHECK_GMAKE
 827 PKGHANDLER
 828 OUTPUT_ROOT
 829 CONF_NAME
 830 SPEC
 831 BUILD_VARIANT_RELEASE
 832 DEBUG_CLASSFILES
 833 FASTDEBUG
 834 VARIANT
 835 DEBUG_LEVEL
 836 MACOSX_UNIVERSAL
 837 INCLUDE_SA
 838 JVM_VARIANT_ZEROSHARK
 839 JVM_VARIANT_ZERO
 840 JVM_VARIANT_KERNEL
 841 JVM_VARIANT_MINIMAL1
 842 JVM_VARIANT_CLIENT
 843 JVM_VARIANT_SERVER
 844 JVM_VARIANTS
 845 JDK_VARIANT
 846 SET_OPENJDK
 847 BUILD_LOG_WRAPPER
 848 BUILD_LOG_PREVIOUS
 849 BUILD_LOG
 850 SYS_ROOT
 851 PATH_SEP
 852 SRC_ROOT
 853 ZERO_ARCHDEF
 854 DEFINE_CROSS_COMPILE_ARCH
 855 LP64
 856 OPENJDK_TARGET_OS_API_DIR
 857 OPENJDK_TARGET_CPU_JLI_CFLAGS
 858 OPENJDK_TARGET_CPU_OSARCH
 859 OPENJDK_TARGET_CPU_ISADIR
 860 OPENJDK_TARGET_CPU_LIBDIR
 861 OPENJDK_TARGET_CPU_LEGACY_LIB
 862 OPENJDK_TARGET_CPU_LEGACY
 863 REQUIRED_OS_VERSION
 864 REQUIRED_OS_NAME
 865 COMPILE_TYPE
 866 OPENJDK_TARGET_CPU_ENDIAN
 867 OPENJDK_TARGET_CPU_BITS
 868 OPENJDK_TARGET_CPU_ARCH
 869 OPENJDK_TARGET_CPU
 870 OPENJDK_TARGET_OS_API
 871 OPENJDK_TARGET_OS
 872 OPENJDK_BUILD_CPU_ENDIAN
 873 OPENJDK_BUILD_CPU_BITS
 874 OPENJDK_BUILD_CPU_ARCH
 875 OPENJDK_BUILD_CPU
 876 OPENJDK_BUILD_OS_API
 877 OPENJDK_BUILD_OS
 878 OPENJDK_BUILD_AUTOCONF_NAME
 879 OPENJDK_TARGET_AUTOCONF_NAME
 880 target_os
 881 target_vendor
 882 target_cpu
 883 target
 884 host_os
 885 host_vendor
 886 host_cpu
 887 host
 888 build_os
 889 build_vendor
 890 build_cpu
 891 build
 892 SETFILE
 893 DF
 894 READLINK
 895 CYGPATH
 896 NAWK
 897 SED
 898 FGREP
 899 EGREP
 900 GREP
 901 AWK
 902 XARGS
 903 WHICH
 904 WC
 905 UNIQ
 906 UNAME
 907 TR
 908 TOUCH
 909 TEE
 910 TAR
 911 TAIL
 912 SORT
 913 SH
 914 RM
 915 PRINTF
 916 MV
 917 MKTEMP
 918 MKDIR
 919 LS
 920 LN
 921 HEAD
 922 FIND
 923 FILE
 924 EXPR
 925 ECHO
 926 DIRNAME
 927 DIFF
 928 DATE
 929 CUT
 930 CPIO
 931 CP
 932 COMM
 933 CMP
 934 CHMOD
 935 CAT
 936 BASH
 937 BASENAME
 938 DATE_WHEN_CONFIGURED
 939 CONFIGURE_COMMAND_LINE
 940 CUSTOM_MAKE_DIR
 941 target_alias
 942 host_alias
 943 build_alias
 944 LIBS
 945 ECHO_T
 946 ECHO_N
 947 ECHO_C
 948 DEFS
 949 mandir
 950 localedir
 951 libdir
 952 psdir
 953 pdfdir
 954 dvidir
 955 htmldir
 956 infodir
 957 docdir
 958 oldincludedir
 959 includedir
 960 localstatedir
 961 sharedstatedir
 962 sysconfdir
 963 datadir
 964 datarootdir
 965 libexecdir
 966 sbindir
 967 bindir
 968 program_transform_name
 969 prefix
 970 exec_prefix
 971 PACKAGE_URL
 972 PACKAGE_BUGREPORT
 973 PACKAGE_STRING
 974 PACKAGE_VERSION
 975 PACKAGE_TARNAME
 976 PACKAGE_NAME
 977 PATH_SEPARATOR
 978 SHELL'
 979 ac_subst_files=''
 980 ac_user_opts='
 981 enable_option_checking
 982 with_custom_make_dir
 983 with_target_bits
 984 with_sys_root
 985 with_tools_dir
 986 with_devkit
 987 enable_openjdk_only
 988 with_jdk_variant
 989 with_jvm_variants
 990 enable_debug
 991 with_debug_level
 992 with_conf_name
 993 with_builddeps_conf
 994 with_builddeps_server
 995 with_builddeps_dir
 996 with_builddeps_group
 997 enable_headful
 998 enable_hotspot_test_in_build
 999 with_cacerts_file
1000 enable_unlimited_crypto
1001 with_milestone
1002 with_update_version
1003 with_build_number
1004 with_user_release_suffix
1005 with_boot_jdk
1006 with_boot_jdk_jvmargs
1007 with_add_source_root
1008 with_override_source_root
1009 with_adds_and_overrides
1010 with_override_langtools
1011 with_override_corba
1012 with_override_jaxp
1013 with_override_jaxws
1014 with_override_hotspot
1015 with_override_jdk
1016 with_import_hotspot
1017 with_msvcr_dll
1018 with_dxsdk
1019 with_dxsdk_lib
1020 with_dxsdk_include
1021 with_jtreg
1022 with_extra_cflags
1023 with_extra_cxxflags
1024 with_extra_ldflags
1025 enable_debug_symbols
1026 enable_zip_debug_info
1027 enable_macosx_runtime_support
1028 with_x
1029 with_cups
1030 with_cups_include
1031 with_icu_le
1032 with_freetype
1033 with_alsa
1034 with_alsa_include
1035 with_alsa_lib
1036 with_giflib
1037 with_zlib
1038 with_stdc__lib
1039 with_num_cores
1040 with_memory_size
1041 with_jobs
1042 with_sjavac_server_java
1043 enable_sjavac
1044 enable_precompiled_headers
1045 enable_ccache
1046 with_ccache_dir
1047 '
1048       ac_precious_vars='build_alias
1049 host_alias
1050 target_alias
1051 PKG_CONFIG
1052 CC
1053 CFLAGS
1054 LDFLAGS
1055 LIBS
1056 CPPFLAGS
1057 CXX
1058 CXXFLAGS
1059 CCC
1060 OBJC
1061 OBJCFLAGS
1062 CPP
1063 CXXCPP
1064 XMKMF
1065 ICU_LE_CFLAGS
1066 ICU_LE_LIBS
1067 FREETYPE2_CFLAGS
1068 FREETYPE2_LIBS
1069 ALSA_CFLAGS
1070 ALSA_LIBS
1071 LIBFFI_CFLAGS
1072 LIBFFI_LIBS'
1073 
1074 
1075 # Initialize some variables set by options.
1076 ac_init_help=
1077 ac_init_version=false
1078 ac_unrecognized_opts=
1079 ac_unrecognized_sep=
1080 # The variables have the same names as the options, with
1081 # dashes changed to underlines.
1082 cache_file=/dev/null
1083 exec_prefix=NONE
1084 no_create=
1085 no_recursion=
1086 prefix=NONE
1087 program_prefix=NONE
1088 program_suffix=NONE
1089 program_transform_name=s,x,x,
1090 silent=
1091 site=
1092 srcdir=
1093 verbose=
1094 x_includes=NONE
1095 x_libraries=NONE
1096 
1097 # Installation directory options.
1098 # These are left unexpanded so users can "make install exec_prefix=/foo"
1099 # and all the variables that are supposed to be based on exec_prefix
1100 # by default will actually change.
1101 # Use braces instead of parens because sh, perl, etc. also accept them.
1102 # (The list follows the same order as the GNU Coding Standards.)
1103 bindir='${exec_prefix}/bin'
1104 sbindir='${exec_prefix}/sbin'
1105 libexecdir='${exec_prefix}/libexec'
1106 datarootdir='${prefix}/share'
1107 datadir='${datarootdir}'
1108 sysconfdir='${prefix}/etc'
1109 sharedstatedir='${prefix}/com'
1110 localstatedir='${prefix}/var'
1111 includedir='${prefix}/include'
1112 oldincludedir='/usr/include'
1113 docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
1114 infodir='${datarootdir}/info'
1115 htmldir='${docdir}'
1116 dvidir='${docdir}'
1117 pdfdir='${docdir}'
1118 psdir='${docdir}'
1119 libdir='${exec_prefix}/lib'
1120 localedir='${datarootdir}/locale'
1121 mandir='${datarootdir}/man'
1122 
1123 ac_prev=
1124 ac_dashdash=
1125 for ac_option
1126 do
1127   # If the previous option needs an argument, assign it.
1128   if test -n "$ac_prev"; then
1129     eval $ac_prev=\$ac_option
1130     ac_prev=
1131     continue
1132   fi
1133 
1134   case $ac_option in
1135   *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
1136   *=)   ac_optarg= ;;
1137   *)    ac_optarg=yes ;;
1138   esac
1139 
1140   # Accept the important Cygnus configure options, so we can diagnose typos.
1141 
1142   case $ac_dashdash$ac_option in
1143   --)
1144     ac_dashdash=yes ;;
1145 
1146   -bindir | --bindir | --bindi | --bind | --bin | --bi)
1147     ac_prev=bindir ;;
1148   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
1149     bindir=$ac_optarg ;;
1150 
1151   -build | --build | --buil | --bui | --bu)
1152     ac_prev=build_alias ;;
1153   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
1154     build_alias=$ac_optarg ;;
1155 
1156   -cache-file | --cache-file | --cache-fil | --cache-fi \
1157   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1158     ac_prev=cache_file ;;
1159   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1160   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
1161     cache_file=$ac_optarg ;;
1162 
1163   --config-cache | -C)
1164     cache_file=config.cache ;;
1165 
1166   -datadir | --datadir | --datadi | --datad)
1167     ac_prev=datadir ;;
1168   -datadir=* | --datadir=* | --datadi=* | --datad=*)
1169     datadir=$ac_optarg ;;
1170 
1171   -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1172   | --dataroo | --dataro | --datar)
1173     ac_prev=datarootdir ;;
1174   -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1175   | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1176     datarootdir=$ac_optarg ;;
1177 
1178   -disable-* | --disable-*)
1179     ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1180     # Reject names that are not valid shell variable names.
1181     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1182       as_fn_error $? "invalid feature name: $ac_useropt"
1183     ac_useropt_orig=$ac_useropt
1184     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1185     case $ac_user_opts in
1186       *"
1187 "enable_$ac_useropt"
1188 "*) ;;
1189       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1190          ac_unrecognized_sep=', ';;
1191     esac
1192     eval enable_$ac_useropt=no ;;
1193 
1194   -docdir | --docdir | --docdi | --doc | --do)
1195     ac_prev=docdir ;;
1196   -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1197     docdir=$ac_optarg ;;
1198 
1199   -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1200     ac_prev=dvidir ;;
1201   -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1202     dvidir=$ac_optarg ;;
1203 
1204   -enable-* | --enable-*)
1205     ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1206     # Reject names that are not valid shell variable names.
1207     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1208       as_fn_error $? "invalid feature name: $ac_useropt"
1209     ac_useropt_orig=$ac_useropt
1210     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1211     case $ac_user_opts in
1212       *"
1213 "enable_$ac_useropt"
1214 "*) ;;
1215       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1216          ac_unrecognized_sep=', ';;
1217     esac
1218     eval enable_$ac_useropt=\$ac_optarg ;;
1219 
1220   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1221   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1222   | --exec | --exe | --ex)
1223     ac_prev=exec_prefix ;;
1224   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1225   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1226   | --exec=* | --exe=* | --ex=*)
1227     exec_prefix=$ac_optarg ;;
1228 
1229   -gas | --gas | --ga | --g)
1230     # Obsolete; use --with-gas.
1231     with_gas=yes ;;
1232 
1233   -help | --help | --hel | --he | -h)
1234     ac_init_help=long ;;
1235   -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1236     ac_init_help=recursive ;;
1237   -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1238     ac_init_help=short ;;
1239 
1240   -host | --host | --hos | --ho)
1241     ac_prev=host_alias ;;
1242   -host=* | --host=* | --hos=* | --ho=*)
1243     host_alias=$ac_optarg ;;
1244 
1245   -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1246     ac_prev=htmldir ;;
1247   -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1248   | --ht=*)
1249     htmldir=$ac_optarg ;;
1250 
1251   -includedir | --includedir | --includedi | --included | --include \
1252   | --includ | --inclu | --incl | --inc)
1253     ac_prev=includedir ;;
1254   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1255   | --includ=* | --inclu=* | --incl=* | --inc=*)
1256     includedir=$ac_optarg ;;
1257 
1258   -infodir | --infodir | --infodi | --infod | --info | --inf)
1259     ac_prev=infodir ;;
1260   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1261     infodir=$ac_optarg ;;
1262 
1263   -libdir | --libdir | --libdi | --libd)
1264     ac_prev=libdir ;;
1265   -libdir=* | --libdir=* | --libdi=* | --libd=*)
1266     libdir=$ac_optarg ;;
1267 
1268   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1269   | --libexe | --libex | --libe)
1270     ac_prev=libexecdir ;;
1271   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1272   | --libexe=* | --libex=* | --libe=*)
1273     libexecdir=$ac_optarg ;;
1274 
1275   -localedir | --localedir | --localedi | --localed | --locale)
1276     ac_prev=localedir ;;
1277   -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1278     localedir=$ac_optarg ;;
1279 
1280   -localstatedir | --localstatedir | --localstatedi | --localstated \
1281   | --localstate | --localstat | --localsta | --localst | --locals)
1282     ac_prev=localstatedir ;;
1283   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1284   | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1285     localstatedir=$ac_optarg ;;
1286 
1287   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1288     ac_prev=mandir ;;
1289   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1290     mandir=$ac_optarg ;;
1291 
1292   -nfp | --nfp | --nf)
1293     # Obsolete; use --without-fp.
1294     with_fp=no ;;
1295 
1296   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1297   | --no-cr | --no-c | -n)
1298     no_create=yes ;;
1299 
1300   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1301   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1302     no_recursion=yes ;;
1303 
1304   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1305   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1306   | --oldin | --oldi | --old | --ol | --o)
1307     ac_prev=oldincludedir ;;
1308   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1309   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1310   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1311     oldincludedir=$ac_optarg ;;
1312 
1313   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1314     ac_prev=prefix ;;
1315   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1316     prefix=$ac_optarg ;;
1317 
1318   -program-prefix | --program-prefix | --program-prefi | --program-pref \
1319   | --program-pre | --program-pr | --program-p)
1320     ac_prev=program_prefix ;;
1321   -program-prefix=* | --program-prefix=* | --program-prefi=* \
1322   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1323     program_prefix=$ac_optarg ;;
1324 
1325   -program-suffix | --program-suffix | --program-suffi | --program-suff \
1326   | --program-suf | --program-su | --program-s)
1327     ac_prev=program_suffix ;;
1328   -program-suffix=* | --program-suffix=* | --program-suffi=* \
1329   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1330     program_suffix=$ac_optarg ;;
1331 
1332   -program-transform-name | --program-transform-name \
1333   | --program-transform-nam | --program-transform-na \
1334   | --program-transform-n | --program-transform- \
1335   | --program-transform | --program-transfor \
1336   | --program-transfo | --program-transf \
1337   | --program-trans | --program-tran \
1338   | --progr-tra | --program-tr | --program-t)
1339     ac_prev=program_transform_name ;;
1340   -program-transform-name=* | --program-transform-name=* \
1341   | --program-transform-nam=* | --program-transform-na=* \
1342   | --program-transform-n=* | --program-transform-=* \
1343   | --program-transform=* | --program-transfor=* \
1344   | --program-transfo=* | --program-transf=* \
1345   | --program-trans=* | --program-tran=* \
1346   | --progr-tra=* | --program-tr=* | --program-t=*)
1347     program_transform_name=$ac_optarg ;;
1348 
1349   -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1350     ac_prev=pdfdir ;;
1351   -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1352     pdfdir=$ac_optarg ;;
1353 
1354   -psdir | --psdir | --psdi | --psd | --ps)
1355     ac_prev=psdir ;;
1356   -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1357     psdir=$ac_optarg ;;
1358 
1359   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1360   | -silent | --silent | --silen | --sile | --sil)
1361     silent=yes ;;
1362 
1363   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1364     ac_prev=sbindir ;;
1365   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1366   | --sbi=* | --sb=*)
1367     sbindir=$ac_optarg ;;
1368 
1369   -sharedstatedir | --sharedstatedir | --sharedstatedi \
1370   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1371   | --sharedst | --shareds | --shared | --share | --shar \
1372   | --sha | --sh)
1373     ac_prev=sharedstatedir ;;
1374   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1375   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1376   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1377   | --sha=* | --sh=*)
1378     sharedstatedir=$ac_optarg ;;
1379 
1380   -site | --site | --sit)
1381     ac_prev=site ;;
1382   -site=* | --site=* | --sit=*)
1383     site=$ac_optarg ;;
1384 
1385   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1386     ac_prev=srcdir ;;
1387   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1388     srcdir=$ac_optarg ;;
1389 
1390   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1391   | --syscon | --sysco | --sysc | --sys | --sy)
1392     ac_prev=sysconfdir ;;
1393   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1394   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1395     sysconfdir=$ac_optarg ;;
1396 
1397   -target | --target | --targe | --targ | --tar | --ta | --t)
1398     ac_prev=target_alias ;;
1399   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1400     target_alias=$ac_optarg ;;
1401 
1402   -v | -verbose | --verbose | --verbos | --verbo | --verb)
1403     verbose=yes ;;
1404 
1405   -version | --version | --versio | --versi | --vers | -V)
1406     ac_init_version=: ;;
1407 
1408   -with-* | --with-*)
1409     ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1410     # Reject names that are not valid shell variable names.
1411     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1412       as_fn_error $? "invalid package name: $ac_useropt"
1413     ac_useropt_orig=$ac_useropt
1414     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1415     case $ac_user_opts in
1416       *"
1417 "with_$ac_useropt"
1418 "*) ;;
1419       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1420          ac_unrecognized_sep=', ';;
1421     esac
1422     eval with_$ac_useropt=\$ac_optarg ;;
1423 
1424   -without-* | --without-*)
1425     ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1426     # Reject names that are not valid shell variable names.
1427     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1428       as_fn_error $? "invalid package name: $ac_useropt"
1429     ac_useropt_orig=$ac_useropt
1430     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1431     case $ac_user_opts in
1432       *"
1433 "with_$ac_useropt"
1434 "*) ;;
1435       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1436          ac_unrecognized_sep=', ';;
1437     esac
1438     eval with_$ac_useropt=no ;;
1439 
1440   --x)
1441     # Obsolete; use --with-x.
1442     with_x=yes ;;
1443 
1444   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1445   | --x-incl | --x-inc | --x-in | --x-i)
1446     ac_prev=x_includes ;;
1447   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1448   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1449     x_includes=$ac_optarg ;;
1450 
1451   -x-libraries | --x-libraries | --x-librarie | --x-librari \
1452   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1453     ac_prev=x_libraries ;;
1454   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1455   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1456     x_libraries=$ac_optarg ;;
1457 
1458   -*) as_fn_error $? "unrecognized option: \`$ac_option'
1459 Try \`$0 --help' for more information"
1460     ;;
1461 
1462   *=*)
1463     ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1464     # Reject names that are not valid shell variable names.
1465     case $ac_envvar in #(
1466       '' | [0-9]* | *[!_$as_cr_alnum]* )
1467       as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1468     esac
1469     eval $ac_envvar=\$ac_optarg
1470     export $ac_envvar ;;
1471 
1472   *)
1473     # FIXME: should be removed in autoconf 3.0.
1474     $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1475     expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1476       $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1477     : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1478     ;;
1479 
1480   esac
1481 done
1482 
1483 if test -n "$ac_prev"; then
1484   ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1485   as_fn_error $? "missing argument to $ac_option"
1486 fi
1487 
1488 if test -n "$ac_unrecognized_opts"; then
1489   case $enable_option_checking in
1490     no) ;;
1491     fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1492     *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1493   esac
1494 fi
1495 
1496 # Check all directory arguments for consistency.
1497 for ac_var in   exec_prefix prefix bindir sbindir libexecdir datarootdir \
1498                 datadir sysconfdir sharedstatedir localstatedir includedir \
1499                 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1500                 libdir localedir mandir
1501 do
1502   eval ac_val=\$$ac_var
1503   # Remove trailing slashes.
1504   case $ac_val in
1505     */ )
1506       ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1507       eval $ac_var=\$ac_val;;
1508   esac
1509   # Be sure to have absolute directory names.
1510   case $ac_val in
1511     [\\/$]* | ?:[\\/]* )  continue;;
1512     NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1513   esac
1514   as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1515 done
1516 
1517 # There might be people who depend on the old broken behavior: `$host'
1518 # used to hold the argument of --host etc.
1519 # FIXME: To remove some day.
1520 build=$build_alias
1521 host=$host_alias
1522 target=$target_alias
1523 
1524 # FIXME: To remove some day.
1525 if test "x$host_alias" != x; then
1526   if test "x$build_alias" = x; then
1527     cross_compiling=maybe
1528     $as_echo "$as_me: WARNING: if you wanted to set the --build type, don't use --host.
1529     If a cross compiler is detected then cross compile mode will be used" >&2
1530   elif test "x$build_alias" != "x$host_alias"; then
1531     cross_compiling=yes
1532   fi
1533 fi
1534 
1535 ac_tool_prefix=
1536 test -n "$host_alias" && ac_tool_prefix=$host_alias-
1537 
1538 test "$silent" = yes && exec 6>/dev/null
1539 
1540 
1541 ac_pwd=`pwd` && test -n "$ac_pwd" &&
1542 ac_ls_di=`ls -di .` &&
1543 ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1544   as_fn_error $? "working directory cannot be determined"
1545 test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1546   as_fn_error $? "pwd does not report name of working directory"
1547 
1548 
1549 # Find the source files, if location was not specified.
1550 if test -z "$srcdir"; then
1551   ac_srcdir_defaulted=yes
1552   # Try the directory containing this script, then the parent directory.
1553   ac_confdir=`$as_dirname -- "$as_myself" ||
1554 $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1555          X"$as_myself" : 'X\(//\)[^/]' \| \
1556          X"$as_myself" : 'X\(//\)$' \| \
1557          X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1558 $as_echo X"$as_myself" |
1559     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1560             s//\1/
1561             q
1562           }
1563           /^X\(\/\/\)[^/].*/{
1564             s//\1/
1565             q
1566           }
1567           /^X\(\/\/\)$/{
1568             s//\1/
1569             q
1570           }
1571           /^X\(\/\).*/{
1572             s//\1/
1573             q
1574           }
1575           s/.*/./; q'`
1576   srcdir=$ac_confdir
1577   if test ! -r "$srcdir/$ac_unique_file"; then
1578     srcdir=..
1579   fi
1580 else
1581   ac_srcdir_defaulted=no
1582 fi
1583 if test ! -r "$srcdir/$ac_unique_file"; then
1584   test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1585   as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1586 fi
1587 ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1588 ac_abs_confdir=`(
1589         cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1590         pwd)`
1591 # When building in place, set srcdir=.
1592 if test "$ac_abs_confdir" = "$ac_pwd"; then
1593   srcdir=.
1594 fi
1595 # Remove unnecessary trailing slashes from srcdir.
1596 # Double slashes in file names in object file debugging info
1597 # mess up M-x gdb in Emacs.
1598 case $srcdir in
1599 */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1600 esac
1601 for ac_var in $ac_precious_vars; do
1602   eval ac_env_${ac_var}_set=\${${ac_var}+set}
1603   eval ac_env_${ac_var}_value=\$${ac_var}
1604   eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1605   eval ac_cv_env_${ac_var}_value=\$${ac_var}
1606 done
1607 
1608 #
1609 # Report the --help message.
1610 #
1611 if test "$ac_init_help" = "long"; then
1612   # Omit some internal or obsolete options to make the list less imposing.
1613   # This message is too long to be a string in the A/UX 3.1 sh.
1614   cat <<_ACEOF
1615 \`configure' configures OpenJDK jdk8 to adapt to many kinds of systems.
1616 
1617 Usage: $0 [OPTION]... [VAR=VALUE]...
1618 
1619 To assign environment variables (e.g., CC, CFLAGS...), specify them as
1620 VAR=VALUE.  See below for descriptions of some of the useful variables.
1621 
1622 Defaults for the options are specified in brackets.
1623 
1624 Configuration:
1625   -h, --help              display this help and exit
1626       --help=short        display options specific to this package
1627       --help=recursive    display the short help of all the included packages
1628   -V, --version           display version information and exit
1629   -q, --quiet, --silent   do not print \`checking ...' messages
1630       --cache-file=FILE   cache test results in FILE [disabled]
1631   -C, --config-cache      alias for \`--cache-file=config.cache'
1632   -n, --no-create         do not create output files
1633       --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1634 
1635 Installation directories:
1636   --prefix=PREFIX         install architecture-independent files in PREFIX
1637                           [$ac_default_prefix]
1638   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1639                           [PREFIX]
1640 
1641 By default, \`make install' will install all the files in
1642 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1643 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1644 for instance \`--prefix=\$HOME'.
1645 
1646 For better control, use the options below.
1647 
1648 Fine tuning of the installation directories:
1649   --bindir=DIR            user executables [EPREFIX/bin]
1650   --sbindir=DIR           system admin executables [EPREFIX/sbin]
1651   --libexecdir=DIR        program executables [EPREFIX/libexec]
1652   --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
1653   --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
1654   --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
1655   --libdir=DIR            object code libraries [EPREFIX/lib]
1656   --includedir=DIR        C header files [PREFIX/include]
1657   --oldincludedir=DIR     C header files for non-gcc [/usr/include]
1658   --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
1659   --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
1660   --infodir=DIR           info documentation [DATAROOTDIR/info]
1661   --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
1662   --mandir=DIR            man documentation [DATAROOTDIR/man]
1663   --docdir=DIR            documentation root [DATAROOTDIR/doc/openjdk]
1664   --htmldir=DIR           html documentation [DOCDIR]
1665   --dvidir=DIR            dvi documentation [DOCDIR]
1666   --pdfdir=DIR            pdf documentation [DOCDIR]
1667   --psdir=DIR             ps documentation [DOCDIR]
1668 _ACEOF
1669 
1670   cat <<\_ACEOF
1671 
1672 X features:
1673   --x-includes=DIR    X include files are in DIR
1674   --x-libraries=DIR   X library files are in DIR
1675 
1676 System types:
1677   --build=BUILD     configure for building on BUILD [guessed]
1678   --host=HOST       cross-compile to build programs to run on HOST [BUILD]
1679   --target=TARGET   configure for building compilers for TARGET [HOST]
1680 _ACEOF
1681 fi
1682 
1683 if test -n "$ac_init_help"; then
1684   case $ac_init_help in
1685      short | recursive ) echo "Configuration of OpenJDK jdk8:";;
1686    esac
1687   cat <<\_ACEOF
1688 
1689 Optional Features:
1690   --disable-option-checking  ignore unrecognized --enable/--with options
1691   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1692   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1693   --enable-openjdk-only   suppress building custom source even if present
1694                           [disabled]
1695   --enable-debug          set the debug level to fastdebug (shorthand for
1696                           --with-debug-level=fastdebug) [disabled]
1697   --disable-headful       disable building headful support (graphical UI
1698                           support) [enabled]
1699   --enable-hotspot-test-in-build
1700                           run the Queens test after Hotspot build [disabled]
1701   --enable-unlimited-crypto
1702                           Enable unlimited crypto policy [disabled]
1703   --disable-debug-symbols disable generation of debug symbols [enabled]
1704   --disable-zip-debug-info
1705                           disable zipping of debug-info files [enabled]
1706   --disable-macosx-runtime-support
1707                           disable the use of MacOSX Java runtime support
1708                           framework [enabled]
1709   --enable-sjavac         use sjavac to do fast incremental compiles
1710                           [disabled]
1711   --disable-precompiled-headers
1712                           disable using precompiled headers when compiling C++
1713                           [enabled]
1714   --disable-ccache        disable using ccache to speed up recompilations
1715                           [enabled]
1716 
1717 Optional Packages:
1718   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
1719   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
1720   --with-custom-make-dir  use this directory for custom build/make files
1721   --with-target-bits      build 32-bit or 64-bit binaries (for platforms that
1722                           support it), e.g. --with-target-bits=32 [guessed]
1723   --with-sys-root         pass this sys-root to the compilers and tools (for
1724                           cross-compiling)
1725   --with-tools-dir        search this directory for compilers and tools (for
1726                           cross-compiling)
1727   --with-devkit           use this directory as base for tools-dir and
1728                           sys-root (for cross-compiling)
1729   --with-jdk-variant      JDK variant to build (normal) [normal]
1730   --with-jvm-variants     JVM variants (separated by commas) to build (server,
1731                           client, minimal1, kernel, zero, zeroshark) [server]
1732   --with-debug-level      set the debug level (release, fastdebug, slowdebug)
1733                           [release]
1734   --with-conf-name        use this as the name of the configuration [generated
1735                           from important configuration options]
1736   --with-builddeps-conf   use this configuration file for the builddeps
1737   --with-builddeps-server download and use build dependencies from this server
1738                           url
1739   --with-builddeps-dir    store downloaded build dependencies here
1740                           [/localhome/builddeps]
1741   --with-builddeps-group  chgrp the downloaded build dependencies to this
1742                           group
1743   --with-cacerts-file     specify alternative cacerts file
1744   --with-milestone        Set milestone value for build [internal]
1745   --with-update-version   Set update version value for build [b00]
1746   --with-build-number     Set build number value for build [b00]
1747   --with-user-release-suffix
1748                           Add a custom string to the version string if build
1749                           number isn't set.[username_builddateb00]
1750   --with-boot-jdk         path to Boot JDK (used to bootstrap build) [probed]
1751   --with-boot-jdk-jvmargs specify JVM arguments to be passed to all
1752                           invocations of the Boot JDK, overriding the default
1753                           values, e.g --with-boot-jdk-jvmargs="-Xmx8G
1754                           -enableassertions"
1755   --with-add-source-root  for each and every source directory, look in this
1756                           additional source root for the same directory; if it
1757                           exists and have files in it, include it in the build
1758   --with-override-source-root
1759                           for each and every source directory, look in this
1760                           override source root for the same directory; if it
1761                           exists, use that directory instead and ignore the
1762                           directory in the original source root
1763   --with-adds-and-overrides
1764                           use the subdirs 'adds' and 'overrides' in the
1765                           specified directory as add-source-root and
1766                           override-source-root
1767   --with-override-langtools
1768                           use this langtools dir for the build
1769   --with-override-corba   use this corba dir for the build
1770   --with-override-jaxp    use this jaxp dir for the build
1771   --with-override-jaxws   use this jaxws dir for the build
1772   --with-override-hotspot use this hotspot dir for the build
1773   --with-override-jdk     use this jdk dir for the build
1774   --with-import-hotspot   import hotspot binaries from this jdk image or
1775                           hotspot build dist dir instead of building from
1776                           source
1777   --with-msvcr-dll        copy this msvcr100.dll into the built JDK (Windows
1778                           only) [probed]
1779   --with-dxsdk            the DirectX SDK (Windows only) [probed]
1780   --with-dxsdk-lib        the DirectX SDK lib directory (Windows only)
1781                           [probed]
1782   --with-dxsdk-include    the DirectX SDK include directory (Windows only)
1783                           [probed]
1784   --with-jtreg            Regression Test Harness [probed]
1785   --with-extra-cflags     extra flags to be used when compiling jdk c-files
1786   --with-extra-cxxflags   extra flags to be used when compiling jdk c++-files
1787   --with-extra-ldflags    extra flags to be used when linking jdk
1788   --with-x                use the X Window System
1789   --with-cups             specify prefix directory for the cups package
1790                           (expecting the headers under PATH/include)
1791   --with-cups-include     specify directory for the cups include files
1792   --with-icu-le           use icu-le from build system or OpenJDK source
1793                           (system, bundled) [bundled]
1794   --with-freetype         specify prefix directory for the freetype2 package
1795                           (expecting the libraries under PATH/lib and the
1796                           headers under PATH/include)
1797   --with-alsa             specify prefix directory for the alsa package
1798                           (expecting the libraries under PATH/lib and the
1799                           headers under PATH/include)
1800   --with-alsa-include     specify directory for the alsa include files
1801   --with-alsa-lib         specify directory for the alsa library
1802   --with-giflib           use giflib from build system or OpenJDK source
1803                           (system, bundled) [bundled]
1804   --with-zlib             use zlib from build system or OpenJDK source
1805                           (system, bundled) [bundled]
1806   --with-stdc++lib=<static>,<dynamic>,<default>
1807                           force linking of the C++ runtime on Linux to either
1808                           static or dynamic, default is static with dynamic as
1809                           fallback
1810   --with-num-cores        number of cores in the build system, e.g.
1811                           --with-num-cores=8 [probed]
1812   --with-memory-size      memory (in MB) available in the build system, e.g.
1813                           --with-memory-size=1024 [probed]
1814   --with-jobs             number of parallel jobs to let make run [calculated
1815                           based on cores and memory]
1816   --with-sjavac-server-java
1817                           use this java binary for running the sjavac
1818                           background server [Boot JDK java]
1819   --with-ccache-dir       where to store ccache files [~/.ccache]
1820 
1821 Some influential environment variables:
1822   PKG_CONFIG  path to pkg-config utility
1823   CC          C compiler command
1824   CFLAGS      C compiler flags
1825   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
1826               nonstandard directory <lib dir>
1827   LIBS        libraries to pass to the linker, e.g. -l<library>
1828   CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
1829               you have headers in a nonstandard directory <include dir>
1830   CXX         C++ compiler command
1831   CXXFLAGS    C++ compiler flags
1832   OBJC        Objective C compiler command
1833   OBJCFLAGS   Objective C compiler flags
1834   CPP         C preprocessor
1835   CXXCPP      C++ preprocessor
1836   XMKMF       Path to xmkmf, Makefile generator for X Window System
1837   ICU_LE_CFLAGS
1838               C compiler flags for ICU_LE, overriding pkg-config
1839   ICU_LE_LIBS linker flags for ICU_LE, overriding pkg-config
1840   FREETYPE2_CFLAGS
1841               C compiler flags for FREETYPE2, overriding pkg-config
1842   FREETYPE2_LIBS
1843               linker flags for FREETYPE2, overriding pkg-config
1844   ALSA_CFLAGS C compiler flags for ALSA, overriding pkg-config
1845   ALSA_LIBS   linker flags for ALSA, overriding pkg-config
1846   LIBFFI_CFLAGS
1847               C compiler flags for LIBFFI, overriding pkg-config
1848   LIBFFI_LIBS linker flags for LIBFFI, overriding pkg-config
1849 
1850 Use these variables to override the choices made by `configure' or to help
1851 it to find libraries and programs with nonstandard names/locations.
1852 
1853 Report bugs to <build-dev@openjdk.java.net>.
1854 OpenJDK home page: <http://openjdk.java.net>.
1855 _ACEOF
1856 ac_status=$?
1857 fi
1858 
1859 if test "$ac_init_help" = "recursive"; then
1860   # If there are subdirs, report their specific --help.
1861   for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
1862     test -d "$ac_dir" ||
1863       { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1864       continue
1865     ac_builddir=.
1866 
1867 case "$ac_dir" in
1868 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1869 *)
1870   ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
1871   # A ".." for each directory in $ac_dir_suffix.
1872   ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
1873   case $ac_top_builddir_sub in
1874   "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1875   *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1876   esac ;;
1877 esac
1878 ac_abs_top_builddir=$ac_pwd
1879 ac_abs_builddir=$ac_pwd$ac_dir_suffix
1880 # for backward compatibility:
1881 ac_top_builddir=$ac_top_build_prefix
1882 
1883 case $srcdir in
1884   .)  # We are building in place.
1885     ac_srcdir=.
1886     ac_top_srcdir=$ac_top_builddir_sub
1887     ac_abs_top_srcdir=$ac_pwd ;;
1888   [\\/]* | ?:[\\/]* )  # Absolute name.
1889     ac_srcdir=$srcdir$ac_dir_suffix;
1890     ac_top_srcdir=$srcdir
1891     ac_abs_top_srcdir=$srcdir ;;
1892   *) # Relative name.
1893     ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1894     ac_top_srcdir=$ac_top_build_prefix$srcdir
1895     ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
1896 esac
1897 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
1898 
1899     cd "$ac_dir" || { ac_status=$?; continue; }
1900     # Check for guested configure.
1901     if test -f "$ac_srcdir/configure.gnu"; then
1902       echo &&
1903       $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1904     elif test -f "$ac_srcdir/configure"; then
1905       echo &&
1906       $SHELL "$ac_srcdir/configure" --help=recursive
1907     else
1908       $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1909     fi || ac_status=$?
1910     cd "$ac_pwd" || { ac_status=$?; break; }
1911   done
1912 fi
1913 
1914 test -n "$ac_init_help" && exit $ac_status
1915 if $ac_init_version; then
1916   cat <<\_ACEOF
1917 OpenJDK configure jdk8
1918 generated by GNU Autoconf 2.68
1919 
1920 Copyright (C) 2010 Free Software Foundation, Inc.
1921 This configure script is free software; the Free Software Foundation
1922 gives unlimited permission to copy, distribute and modify it.
1923 _ACEOF
1924   exit
1925 fi
1926 
1927 ## ------------------------ ##
1928 ## Autoconf initialization. ##
1929 ## ------------------------ ##
1930 
1931 # ac_fn_c_try_compile LINENO
1932 # --------------------------
1933 # Try to compile conftest.$ac_ext, and return whether this succeeded.
1934 ac_fn_c_try_compile ()
1935 {
1936   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1937   rm -f conftest.$ac_objext
1938   if { { ac_try="$ac_compile"
1939 case "(($ac_try" in
1940   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1941   *) ac_try_echo=$ac_try;;
1942 esac
1943 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1944 $as_echo "$ac_try_echo"; } >&5
1945   (eval "$ac_compile") 2>conftest.err
1946   ac_status=$?
1947   if test -s conftest.err; then
1948     grep -v '^ *+' conftest.err >conftest.er1
1949     cat conftest.er1 >&5
1950     mv -f conftest.er1 conftest.err
1951   fi
1952   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1953   test $ac_status = 0; } && {
1954          test -z "$ac_c_werror_flag" ||
1955          test ! -s conftest.err
1956        } && test -s conftest.$ac_objext; then :
1957   ac_retval=0
1958 else
1959   $as_echo "$as_me: failed program was:" >&5
1960 sed 's/^/| /' conftest.$ac_ext >&5
1961 
1962         ac_retval=1
1963 fi
1964   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1965   as_fn_set_status $ac_retval
1966 
1967 } # ac_fn_c_try_compile
1968 
1969 # ac_fn_cxx_try_compile LINENO
1970 # ----------------------------
1971 # Try to compile conftest.$ac_ext, and return whether this succeeded.
1972 ac_fn_cxx_try_compile ()
1973 {
1974   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1975   rm -f conftest.$ac_objext
1976   if { { ac_try="$ac_compile"
1977 case "(($ac_try" in
1978   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1979   *) ac_try_echo=$ac_try;;
1980 esac
1981 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1982 $as_echo "$ac_try_echo"; } >&5
1983   (eval "$ac_compile") 2>conftest.err
1984   ac_status=$?
1985   if test -s conftest.err; then
1986     grep -v '^ *+' conftest.err >conftest.er1
1987     cat conftest.er1 >&5
1988     mv -f conftest.er1 conftest.err
1989   fi
1990   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1991   test $ac_status = 0; } && {
1992          test -z "$ac_cxx_werror_flag" ||
1993          test ! -s conftest.err
1994        } && test -s conftest.$ac_objext; then :
1995   ac_retval=0
1996 else
1997   $as_echo "$as_me: failed program was:" >&5
1998 sed 's/^/| /' conftest.$ac_ext >&5
1999 
2000         ac_retval=1
2001 fi
2002   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2003   as_fn_set_status $ac_retval
2004 
2005 } # ac_fn_cxx_try_compile
2006 
2007 # ac_fn_objc_try_compile LINENO
2008 # -----------------------------
2009 # Try to compile conftest.$ac_ext, and return whether this succeeded.
2010 ac_fn_objc_try_compile ()
2011 {
2012   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2013   rm -f conftest.$ac_objext
2014   if { { ac_try="$ac_compile"
2015 case "(($ac_try" in
2016   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2017   *) ac_try_echo=$ac_try;;
2018 esac
2019 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2020 $as_echo "$ac_try_echo"; } >&5
2021   (eval "$ac_compile") 2>conftest.err
2022   ac_status=$?
2023   if test -s conftest.err; then
2024     grep -v '^ *+' conftest.err >conftest.er1
2025     cat conftest.er1 >&5
2026     mv -f conftest.er1 conftest.err
2027   fi
2028   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2029   test $ac_status = 0; } && {
2030          test -z "$ac_objc_werror_flag" ||
2031          test ! -s conftest.err
2032        } && test -s conftest.$ac_objext; then :
2033   ac_retval=0
2034 else
2035   $as_echo "$as_me: failed program was:" >&5
2036 sed 's/^/| /' conftest.$ac_ext >&5
2037 
2038         ac_retval=1
2039 fi
2040   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2041   as_fn_set_status $ac_retval
2042 
2043 } # ac_fn_objc_try_compile
2044 
2045 # ac_fn_c_try_cpp LINENO
2046 # ----------------------
2047 # Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2048 ac_fn_c_try_cpp ()
2049 {
2050   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2051   if { { ac_try="$ac_cpp conftest.$ac_ext"
2052 case "(($ac_try" in
2053   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2054   *) ac_try_echo=$ac_try;;
2055 esac
2056 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2057 $as_echo "$ac_try_echo"; } >&5
2058   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2059   ac_status=$?
2060   if test -s conftest.err; then
2061     grep -v '^ *+' conftest.err >conftest.er1
2062     cat conftest.er1 >&5
2063     mv -f conftest.er1 conftest.err
2064   fi
2065   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2066   test $ac_status = 0; } > conftest.i && {
2067          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
2068          test ! -s conftest.err
2069        }; then :
2070   ac_retval=0
2071 else
2072   $as_echo "$as_me: failed program was:" >&5
2073 sed 's/^/| /' conftest.$ac_ext >&5
2074 
2075     ac_retval=1
2076 fi
2077   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2078   as_fn_set_status $ac_retval
2079 
2080 } # ac_fn_c_try_cpp
2081 
2082 # ac_fn_cxx_try_cpp LINENO
2083 # ------------------------
2084 # Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2085 ac_fn_cxx_try_cpp ()
2086 {
2087   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2088   if { { ac_try="$ac_cpp conftest.$ac_ext"
2089 case "(($ac_try" in
2090   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2091   *) ac_try_echo=$ac_try;;
2092 esac
2093 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2094 $as_echo "$ac_try_echo"; } >&5
2095   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2096   ac_status=$?
2097   if test -s conftest.err; then
2098     grep -v '^ *+' conftest.err >conftest.er1
2099     cat conftest.er1 >&5
2100     mv -f conftest.er1 conftest.err
2101   fi
2102   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2103   test $ac_status = 0; } > conftest.i && {
2104          test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
2105          test ! -s conftest.err
2106        }; then :
2107   ac_retval=0
2108 else
2109   $as_echo "$as_me: failed program was:" >&5
2110 sed 's/^/| /' conftest.$ac_ext >&5
2111 
2112     ac_retval=1
2113 fi
2114   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2115   as_fn_set_status $ac_retval
2116 
2117 } # ac_fn_cxx_try_cpp
2118 
2119 # ac_fn_cxx_check_header_mongrel LINENO HEADER VAR INCLUDES
2120 # ---------------------------------------------------------
2121 # Tests whether HEADER exists, giving a warning if it cannot be compiled using
2122 # the include files in INCLUDES and setting the cache variable VAR
2123 # accordingly.
2124 ac_fn_cxx_check_header_mongrel ()
2125 {
2126   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2127   if eval \${$3+:} false; then :
2128   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2129 $as_echo_n "checking for $2... " >&6; }
2130 if eval \${$3+:} false; then :
2131   $as_echo_n "(cached) " >&6
2132 fi
2133 eval ac_res=\$$3
2134                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2135 $as_echo "$ac_res" >&6; }
2136 else
2137   # Is the header compilable?
2138 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
2139 $as_echo_n "checking $2 usability... " >&6; }
2140 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2141 /* end confdefs.h.  */
2142 $4
2143 #include <$2>
2144 _ACEOF
2145 if ac_fn_cxx_try_compile "$LINENO"; then :
2146   ac_header_compiler=yes
2147 else
2148   ac_header_compiler=no
2149 fi
2150 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2151 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
2152 $as_echo "$ac_header_compiler" >&6; }
2153 
2154 # Is the header present?
2155 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
2156 $as_echo_n "checking $2 presence... " >&6; }
2157 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2158 /* end confdefs.h.  */
2159 #include <$2>
2160 _ACEOF
2161 if ac_fn_cxx_try_cpp "$LINENO"; then :
2162   ac_header_preproc=yes
2163 else
2164   ac_header_preproc=no
2165 fi
2166 rm -f conftest.err conftest.i conftest.$ac_ext
2167 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
2168 $as_echo "$ac_header_preproc" >&6; }
2169 
2170 # So?  What about this header?
2171 case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in #((
2172   yes:no: )
2173     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
2174 $as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
2175     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2176 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2177     ;;
2178   no:yes:* )
2179     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
2180 $as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
2181     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
2182 $as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
2183     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
2184 $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
2185     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
2186 $as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
2187     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2188 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2189 ( $as_echo "## ----------------------------------------- ##
2190 ## Report this to build-dev@openjdk.java.net ##
2191 ## ----------------------------------------- ##"
2192      ) | sed "s/^/$as_me: WARNING:     /" >&2
2193     ;;
2194 esac
2195   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2196 $as_echo_n "checking for $2... " >&6; }
2197 if eval \${$3+:} false; then :
2198   $as_echo_n "(cached) " >&6
2199 else
2200   eval "$3=\$ac_header_compiler"
2201 fi
2202 eval ac_res=\$$3
2203                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2204 $as_echo "$ac_res" >&6; }
2205 fi
2206   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2207 
2208 } # ac_fn_cxx_check_header_mongrel
2209 
2210 # ac_fn_cxx_try_run LINENO
2211 # ------------------------
2212 # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
2213 # that executables *can* be run.
2214 ac_fn_cxx_try_run ()
2215 {
2216   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2217   if { { ac_try="$ac_link"
2218 case "(($ac_try" in
2219   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2220   *) ac_try_echo=$ac_try;;
2221 esac
2222 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2223 $as_echo "$ac_try_echo"; } >&5
2224   (eval "$ac_link") 2>&5
2225   ac_status=$?
2226   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2227   test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
2228   { { case "(($ac_try" in
2229   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2230   *) ac_try_echo=$ac_try;;
2231 esac
2232 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2233 $as_echo "$ac_try_echo"; } >&5
2234   (eval "$ac_try") 2>&5
2235   ac_status=$?
2236   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2237   test $ac_status = 0; }; }; then :
2238   ac_retval=0
2239 else
2240   $as_echo "$as_me: program exited with status $ac_status" >&5
2241        $as_echo "$as_me: failed program was:" >&5
2242 sed 's/^/| /' conftest.$ac_ext >&5
2243 
2244        ac_retval=$ac_status
2245 fi
2246   rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2247   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2248   as_fn_set_status $ac_retval
2249 
2250 } # ac_fn_cxx_try_run
2251 
2252 # ac_fn_cxx_check_header_compile LINENO HEADER VAR INCLUDES
2253 # ---------------------------------------------------------
2254 # Tests whether HEADER exists and can be compiled using the include files in
2255 # INCLUDES, setting the cache variable VAR accordingly.
2256 ac_fn_cxx_check_header_compile ()
2257 {
2258   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2259   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2260 $as_echo_n "checking for $2... " >&6; }
2261 if eval \${$3+:} false; then :
2262   $as_echo_n "(cached) " >&6
2263 else
2264   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2265 /* end confdefs.h.  */
2266 $4
2267 #include <$2>
2268 _ACEOF
2269 if ac_fn_cxx_try_compile "$LINENO"; then :
2270   eval "$3=yes"
2271 else
2272   eval "$3=no"
2273 fi
2274 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2275 fi
2276 eval ac_res=\$$3
2277                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2278 $as_echo "$ac_res" >&6; }
2279   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2280 
2281 } # ac_fn_cxx_check_header_compile
2282 
2283 # ac_fn_cxx_compute_int LINENO EXPR VAR INCLUDES
2284 # ----------------------------------------------
2285 # Tries to find the compile-time value of EXPR in a program that includes
2286 # INCLUDES, setting VAR accordingly. Returns whether the value could be
2287 # computed
2288 ac_fn_cxx_compute_int ()
2289 {
2290   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2291   if test "$cross_compiling" = yes; then
2292     # Depending upon the size, compute the lo and hi bounds.
2293 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2294 /* end confdefs.h.  */
2295 $4
2296 int
2297 main ()
2298 {
2299 static int test_array [1 - 2 * !(($2) >= 0)];
2300 test_array [0] = 0
2301 
2302   ;
2303   return 0;
2304 }
2305 _ACEOF
2306 if ac_fn_cxx_try_compile "$LINENO"; then :
2307   ac_lo=0 ac_mid=0
2308   while :; do
2309     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2310 /* end confdefs.h.  */
2311 $4
2312 int
2313 main ()
2314 {
2315 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2316 test_array [0] = 0
2317 
2318   ;
2319   return 0;
2320 }
2321 _ACEOF
2322 if ac_fn_cxx_try_compile "$LINENO"; then :
2323   ac_hi=$ac_mid; break
2324 else
2325   as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2326                         if test $ac_lo -le $ac_mid; then
2327                           ac_lo= ac_hi=
2328                           break
2329                         fi
2330                         as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2331 fi
2332 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2333   done
2334 else
2335   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2336 /* end confdefs.h.  */
2337 $4
2338 int
2339 main ()
2340 {
2341 static int test_array [1 - 2 * !(($2) < 0)];
2342 test_array [0] = 0
2343 
2344   ;
2345   return 0;
2346 }
2347 _ACEOF
2348 if ac_fn_cxx_try_compile "$LINENO"; then :
2349   ac_hi=-1 ac_mid=-1
2350   while :; do
2351     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2352 /* end confdefs.h.  */
2353 $4
2354 int
2355 main ()
2356 {
2357 static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2358 test_array [0] = 0
2359 
2360   ;
2361   return 0;
2362 }
2363 _ACEOF
2364 if ac_fn_cxx_try_compile "$LINENO"; then :
2365   ac_lo=$ac_mid; break
2366 else
2367   as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2368                         if test $ac_mid -le $ac_hi; then
2369                           ac_lo= ac_hi=
2370                           break
2371                         fi
2372                         as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2373 fi
2374 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2375   done
2376 else
2377   ac_lo= ac_hi=
2378 fi
2379 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2380 fi
2381 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2382 # Binary search between lo and hi bounds.
2383 while test "x$ac_lo" != "x$ac_hi"; do
2384   as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2385   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2386 /* end confdefs.h.  */
2387 $4
2388 int
2389 main ()
2390 {
2391 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2392 test_array [0] = 0
2393 
2394   ;
2395   return 0;
2396 }
2397 _ACEOF
2398 if ac_fn_cxx_try_compile "$LINENO"; then :
2399   ac_hi=$ac_mid
2400 else
2401   as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2402 fi
2403 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2404 done
2405 case $ac_lo in #((
2406 ?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2407 '') ac_retval=1 ;;
2408 esac
2409   else
2410     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2411 /* end confdefs.h.  */
2412 $4
2413 static long int longval () { return $2; }
2414 static unsigned long int ulongval () { return $2; }
2415 #include <stdio.h>
2416 #include <stdlib.h>
2417 int
2418 main ()
2419 {
2420 
2421   FILE *f = fopen ("conftest.val", "w");
2422   if (! f)
2423     return 1;
2424   if (($2) < 0)
2425     {
2426       long int i = longval ();
2427       if (i != ($2))
2428         return 1;
2429       fprintf (f, "%ld", i);
2430     }
2431   else
2432     {
2433       unsigned long int i = ulongval ();
2434       if (i != ($2))
2435         return 1;
2436       fprintf (f, "%lu", i);
2437     }
2438   /* Do not output a trailing newline, as this causes \r\n confusion
2439      on some platforms.  */
2440   return ferror (f) || fclose (f) != 0;
2441 
2442   ;
2443   return 0;
2444 }
2445 _ACEOF
2446 if ac_fn_cxx_try_run "$LINENO"; then :
2447   echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2448 else
2449   ac_retval=1
2450 fi
2451 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2452   conftest.$ac_objext conftest.beam conftest.$ac_ext
2453 rm -f conftest.val
2454 
2455   fi
2456   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2457   as_fn_set_status $ac_retval
2458 
2459 } # ac_fn_cxx_compute_int
2460 
2461 # ac_fn_cxx_try_link LINENO
2462 # -------------------------
2463 # Try to link conftest.$ac_ext, and return whether this succeeded.
2464 ac_fn_cxx_try_link ()
2465 {
2466   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2467   rm -f conftest.$ac_objext conftest$ac_exeext
2468   if { { ac_try="$ac_link"
2469 case "(($ac_try" in
2470   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2471   *) ac_try_echo=$ac_try;;
2472 esac
2473 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2474 $as_echo "$ac_try_echo"; } >&5
2475   (eval "$ac_link") 2>conftest.err
2476   ac_status=$?
2477   if test -s conftest.err; then
2478     grep -v '^ *+' conftest.err >conftest.er1
2479     cat conftest.er1 >&5
2480     mv -f conftest.er1 conftest.err
2481   fi
2482   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2483   test $ac_status = 0; } && {
2484          test -z "$ac_cxx_werror_flag" ||
2485          test ! -s conftest.err
2486        } && test -s conftest$ac_exeext && {
2487          test "$cross_compiling" = yes ||
2488          $as_test_x conftest$ac_exeext
2489        }; then :
2490   ac_retval=0
2491 else
2492   $as_echo "$as_me: failed program was:" >&5
2493 sed 's/^/| /' conftest.$ac_ext >&5
2494 
2495         ac_retval=1
2496 fi
2497   # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2498   # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2499   # interfere with the next link command; also delete a directory that is
2500   # left behind by Apple's compiler.  We do this before executing the actions.
2501   rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2502   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2503   as_fn_set_status $ac_retval
2504 
2505 } # ac_fn_cxx_try_link
2506 
2507 # ac_fn_cxx_check_func LINENO FUNC VAR
2508 # ------------------------------------
2509 # Tests whether FUNC exists, setting the cache variable VAR accordingly
2510 ac_fn_cxx_check_func ()
2511 {
2512   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2513   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2514 $as_echo_n "checking for $2... " >&6; }
2515 if eval \${$3+:} false; then :
2516   $as_echo_n "(cached) " >&6
2517 else
2518   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2519 /* end confdefs.h.  */
2520 /* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2521    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
2522 #define $2 innocuous_$2
2523 
2524 /* System header to define __stub macros and hopefully few prototypes,
2525     which can conflict with char $2 (); below.
2526     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2527     <limits.h> exists even on freestanding compilers.  */
2528 
2529 #ifdef __STDC__
2530 # include <limits.h>
2531 #else
2532 # include <assert.h>
2533 #endif
2534 
2535 #undef $2
2536 
2537 /* Override any GCC internal prototype to avoid an error.
2538    Use char because int might match the return type of a GCC
2539    builtin and then its argument prototype would still apply.  */
2540 #ifdef __cplusplus
2541 extern "C"
2542 #endif
2543 char $2 ();
2544 /* The GNU C library defines this for functions which it implements
2545     to always fail with ENOSYS.  Some functions are actually named
2546     something starting with __ and the normal name is an alias.  */
2547 #if defined __stub_$2 || defined __stub___$2
2548 choke me
2549 #endif
2550 
2551 int
2552 main ()
2553 {
2554 return $2 ();
2555   ;
2556   return 0;
2557 }
2558 _ACEOF
2559 if ac_fn_cxx_try_link "$LINENO"; then :
2560   eval "$3=yes"
2561 else
2562   eval "$3=no"
2563 fi
2564 rm -f core conftest.err conftest.$ac_objext \
2565     conftest$ac_exeext conftest.$ac_ext
2566 fi
2567 eval ac_res=\$$3
2568                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2569 $as_echo "$ac_res" >&6; }
2570   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2571 
2572 } # ac_fn_cxx_check_func
2573 
2574 # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
2575 # -------------------------------------------------------
2576 # Tests whether HEADER exists and can be compiled using the include files in
2577 # INCLUDES, setting the cache variable VAR accordingly.
2578 ac_fn_c_check_header_compile ()
2579 {
2580   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2581   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2582 $as_echo_n "checking for $2... " >&6; }
2583 if eval \${$3+:} false; then :
2584   $as_echo_n "(cached) " >&6
2585 else
2586   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2587 /* end confdefs.h.  */
2588 $4
2589 #include <$2>
2590 _ACEOF
2591 if ac_fn_c_try_compile "$LINENO"; then :
2592   eval "$3=yes"
2593 else
2594   eval "$3=no"
2595 fi
2596 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2597 fi
2598 eval ac_res=\$$3
2599                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2600 $as_echo "$ac_res" >&6; }
2601   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2602 
2603 } # ac_fn_c_check_header_compile
2604 cat >config.log <<_ACEOF
2605 This file contains any messages produced by compilers while
2606 running configure, to aid debugging if configure makes a mistake.
2607 
2608 It was created by OpenJDK $as_me jdk8, which was
2609 generated by GNU Autoconf 2.68.  Invocation command line was
2610 
2611   $ $0 $@
2612 
2613 _ACEOF
2614 exec 5>>config.log
2615 {
2616 cat <<_ASUNAME
2617 ## --------- ##
2618 ## Platform. ##
2619 ## --------- ##
2620 
2621 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2622 uname -m = `(uname -m) 2>/dev/null || echo unknown`
2623 uname -r = `(uname -r) 2>/dev/null || echo unknown`
2624 uname -s = `(uname -s) 2>/dev/null || echo unknown`
2625 uname -v = `(uname -v) 2>/dev/null || echo unknown`
2626 
2627 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2628 /bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
2629 
2630 /bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
2631 /usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
2632 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2633 /usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
2634 /bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
2635 /usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
2636 /bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
2637 
2638 _ASUNAME
2639 
2640 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2641 for as_dir in $PATH
2642 do
2643   IFS=$as_save_IFS
2644   test -z "$as_dir" && as_dir=.
2645     $as_echo "PATH: $as_dir"
2646   done
2647 IFS=$as_save_IFS
2648 
2649 } >&5
2650 
2651 cat >&5 <<_ACEOF
2652 
2653 
2654 ## ----------- ##
2655 ## Core tests. ##
2656 ## ----------- ##
2657 
2658 _ACEOF
2659 
2660 
2661 # Keep a trace of the command line.
2662 # Strip out --no-create and --no-recursion so they do not pile up.
2663 # Strip out --silent because we don't want to record it for future runs.
2664 # Also quote any args containing shell meta-characters.
2665 # Make two passes to allow for proper duplicate-argument suppression.
2666 ac_configure_args=
2667 ac_configure_args0=
2668 ac_configure_args1=
2669 ac_must_keep_next=false
2670 for ac_pass in 1 2
2671 do
2672   for ac_arg
2673   do
2674     case $ac_arg in
2675     -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2676     -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2677     | -silent | --silent | --silen | --sile | --sil)
2678       continue ;;
2679     *\'*)
2680       ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2681     esac
2682     case $ac_pass in
2683     1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2684     2)
2685       as_fn_append ac_configure_args1 " '$ac_arg'"
2686       if test $ac_must_keep_next = true; then
2687         ac_must_keep_next=false # Got value, back to normal.
2688       else
2689         case $ac_arg in
2690           *=* | --config-cache | -C | -disable-* | --disable-* \
2691           | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2692           | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2693           | -with-* | --with-* | -without-* | --without-* | --x)
2694             case "$ac_configure_args0 " in
2695               "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2696             esac
2697             ;;
2698           -* ) ac_must_keep_next=true ;;
2699         esac
2700       fi
2701       as_fn_append ac_configure_args " '$ac_arg'"
2702       ;;
2703     esac
2704   done
2705 done
2706 { ac_configure_args0=; unset ac_configure_args0;}
2707 { ac_configure_args1=; unset ac_configure_args1;}
2708 
2709 # When interrupted or exit'd, cleanup temporary files, and complete
2710 # config.log.  We remove comments because anyway the quotes in there
2711 # would cause problems or look ugly.
2712 # WARNING: Use '\'' to represent an apostrophe within the trap.
2713 # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2714 trap 'exit_status=$?
2715   # Save into config.log some information that might help in debugging.
2716   {
2717     echo
2718 
2719     $as_echo "## ---------------- ##
2720 ## Cache variables. ##
2721 ## ---------------- ##"
2722     echo
2723     # The following way of writing the cache mishandles newlines in values,
2724 (
2725   for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2726     eval ac_val=\$$ac_var
2727     case $ac_val in #(
2728     *${as_nl}*)
2729       case $ac_var in #(
2730       *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2731 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
2732       esac
2733       case $ac_var in #(
2734       _ | IFS | as_nl) ;; #(
2735       BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2736       *) { eval $ac_var=; unset $ac_var;} ;;
2737       esac ;;
2738     esac
2739   done
2740   (set) 2>&1 |
2741     case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2742     *${as_nl}ac_space=\ *)
2743       sed -n \
2744         "s/'\''/'\''\\\\'\'''\''/g;
2745           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2746       ;; #(
2747     *)
2748       sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
2749       ;;
2750     esac |
2751     sort
2752 )
2753     echo
2754 
2755     $as_echo "## ----------------- ##
2756 ## Output variables. ##
2757 ## ----------------- ##"
2758     echo
2759     for ac_var in $ac_subst_vars
2760     do
2761       eval ac_val=\$$ac_var
2762       case $ac_val in
2763       *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2764       esac
2765       $as_echo "$ac_var='\''$ac_val'\''"
2766     done | sort
2767     echo
2768 
2769     if test -n "$ac_subst_files"; then
2770       $as_echo "## ------------------- ##
2771 ## File substitutions. ##
2772 ## ------------------- ##"
2773       echo
2774       for ac_var in $ac_subst_files
2775       do
2776         eval ac_val=\$$ac_var
2777         case $ac_val in
2778         *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2779         esac
2780         $as_echo "$ac_var='\''$ac_val'\''"
2781       done | sort
2782       echo
2783     fi
2784 
2785     if test -s confdefs.h; then
2786       $as_echo "## ----------- ##
2787 ## confdefs.h. ##
2788 ## ----------- ##"
2789       echo
2790       cat confdefs.h
2791       echo
2792     fi
2793     test "$ac_signal" != 0 &&
2794       $as_echo "$as_me: caught signal $ac_signal"
2795     $as_echo "$as_me: exit $exit_status"
2796   } >&5
2797   rm -f core *.core core.conftest.* &&
2798     rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
2799     exit $exit_status
2800 ' 0
2801 for ac_signal in 1 2 13 15; do
2802   trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
2803 done
2804 ac_signal=0
2805 
2806 # confdefs.h avoids OS command line length limits that DEFS can exceed.
2807 rm -f -r conftest* confdefs.h
2808 
2809 $as_echo "/* confdefs.h */" > confdefs.h
2810 
2811 # Predefined preprocessor variables.
2812 
2813 cat >>confdefs.h <<_ACEOF
2814 #define PACKAGE_NAME "$PACKAGE_NAME"
2815 _ACEOF
2816 
2817 cat >>confdefs.h <<_ACEOF
2818 #define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2819 _ACEOF
2820 
2821 cat >>confdefs.h <<_ACEOF
2822 #define PACKAGE_VERSION "$PACKAGE_VERSION"
2823 _ACEOF
2824 
2825 cat >>confdefs.h <<_ACEOF
2826 #define PACKAGE_STRING "$PACKAGE_STRING"
2827 _ACEOF
2828 
2829 cat >>confdefs.h <<_ACEOF
2830 #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2831 _ACEOF
2832 
2833 cat >>confdefs.h <<_ACEOF
2834 #define PACKAGE_URL "$PACKAGE_URL"
2835 _ACEOF
2836 
2837 
2838 # Let the site file select an alternate cache file if it wants to.
2839 # Prefer an explicitly selected file to automatically selected ones.
2840 ac_site_file1=NONE
2841 ac_site_file2=NONE
2842 if test -n "$CONFIG_SITE"; then
2843   # We do not want a PATH search for config.site.
2844   case $CONFIG_SITE in #((
2845     -*)  ac_site_file1=./$CONFIG_SITE;;
2846     */*) ac_site_file1=$CONFIG_SITE;;
2847     *)   ac_site_file1=./$CONFIG_SITE;;
2848   esac
2849 elif test "x$prefix" != xNONE; then
2850   ac_site_file1=$prefix/share/config.site
2851   ac_site_file2=$prefix/etc/config.site
2852 else
2853   ac_site_file1=$ac_default_prefix/share/config.site
2854   ac_site_file2=$ac_default_prefix/etc/config.site
2855 fi
2856 for ac_site_file in "$ac_site_file1" "$ac_site_file2"
2857 do
2858   test "x$ac_site_file" = xNONE && continue
2859   if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2860     { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2861 $as_echo "$as_me: loading site script $ac_site_file" >&6;}
2862     sed 's/^/| /' "$ac_site_file" >&5
2863     . "$ac_site_file" \
2864       || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2865 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2866 as_fn_error $? "failed to load site script $ac_site_file
2867 See \`config.log' for more details" "$LINENO" 5; }
2868   fi
2869 done
2870 
2871 if test -r "$cache_file"; then
2872   # Some versions of bash will fail to source /dev/null (special files
2873   # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
2874   if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2875     { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2876 $as_echo "$as_me: loading cache $cache_file" >&6;}
2877     case $cache_file in
2878       [\\/]* | ?:[\\/]* ) . "$cache_file";;
2879       *)                      . "./$cache_file";;
2880     esac
2881   fi
2882 else
2883   { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2884 $as_echo "$as_me: creating cache $cache_file" >&6;}
2885   >$cache_file
2886 fi
2887 
2888 # Check that the precious variables saved in the cache have kept the same
2889 # value.
2890 ac_cache_corrupted=false
2891 for ac_var in $ac_precious_vars; do
2892   eval ac_old_set=\$ac_cv_env_${ac_var}_set
2893   eval ac_new_set=\$ac_env_${ac_var}_set
2894   eval ac_old_val=\$ac_cv_env_${ac_var}_value
2895   eval ac_new_val=\$ac_env_${ac_var}_value
2896   case $ac_old_set,$ac_new_set in
2897     set,)
2898       { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2899 $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
2900       ac_cache_corrupted=: ;;
2901     ,set)
2902       { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2903 $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
2904       ac_cache_corrupted=: ;;
2905     ,);;
2906     *)
2907       if test "x$ac_old_val" != "x$ac_new_val"; then
2908         # differences in whitespace do not lead to failure.
2909         ac_old_val_w=`echo x $ac_old_val`
2910         ac_new_val_w=`echo x $ac_new_val`
2911         if test "$ac_old_val_w" != "$ac_new_val_w"; then
2912           { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2913 $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2914           ac_cache_corrupted=:
2915         else
2916           { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2917 $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2918           eval $ac_var=\$ac_old_val
2919         fi
2920         { $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
2921 $as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
2922         { $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
2923 $as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
2924       fi;;
2925   esac
2926   # Pass precious variables to config.status.
2927   if test "$ac_new_set" = set; then
2928     case $ac_new_val in
2929     *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
2930     *) ac_arg=$ac_var=$ac_new_val ;;
2931     esac
2932     case " $ac_configure_args " in
2933       *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
2934       *) as_fn_append ac_configure_args " '$ac_arg'" ;;
2935     esac
2936   fi
2937 done
2938 if $ac_cache_corrupted; then
2939   { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2940 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2941   { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2942 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
2943   as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
2944 fi
2945 ## -------------------- ##
2946 ## Main body of script. ##
2947 ## -------------------- ##
2948 
2949 ac_ext=c
2950 ac_cpp='$CPP $CPPFLAGS'
2951 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2952 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2953 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2954 
2955 
2956 
2957 ac_aux_dir=
2958 for ac_dir in build-aux "$srcdir"/build-aux; do
2959   if test -f "$ac_dir/install-sh"; then
2960     ac_aux_dir=$ac_dir
2961     ac_install_sh="$ac_aux_dir/install-sh -c"
2962     break
2963   elif test -f "$ac_dir/install.sh"; then
2964     ac_aux_dir=$ac_dir
2965     ac_install_sh="$ac_aux_dir/install.sh -c"
2966     break
2967   elif test -f "$ac_dir/shtool"; then
2968     ac_aux_dir=$ac_dir
2969     ac_install_sh="$ac_aux_dir/shtool install -c"
2970     break
2971   fi
2972 done
2973 if test -z "$ac_aux_dir"; then
2974   as_fn_error $? "cannot find install-sh, install.sh, or shtool in build-aux \"$srcdir\"/build-aux" "$LINENO" 5
2975 fi
2976 
2977 # These three variables are undocumented and unsupported,
2978 # and are intended to be withdrawn in a future Autoconf release.
2979 # They can cause serious problems if a builder's source tree is in a directory
2980 # whose full name contains unusual characters.
2981 ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
2982 ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
2983 ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
2984 
2985 
2986 # pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
2987 
2988 #
2989 # Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
2990 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
2991 #
2992 # This code is free software; you can redistribute it and/or modify it
2993 # under the terms of the GNU General Public License version 2 only, as
2994 # published by the Free Software Foundation.  Oracle designates this
2995 # particular file as subject to the "Classpath" exception as provided
2996 # by Oracle in the LICENSE file that accompanied this code.
2997 #
2998 # This code is distributed in the hope that it will be useful, but WITHOUT
2999 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3000 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3001 # version 2 for more details (a copy is included in the LICENSE file that
3002 # accompanied this code).
3003 #
3004 # You should have received a copy of the GNU General Public License version
3005 # 2 along with this work; if not, write to the Free Software Foundation,
3006 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3007 #
3008 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3009 # or visit www.oracle.com if you need additional information or have any
3010 # questions.
3011 #
3012 
3013 #
3014 # Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
3015 #
3016 # This program is free software; you can redistribute it and/or modify
3017 # it under the terms of the GNU General Public License as published by
3018 # the Free Software Foundation; either version 2 of the License, or
3019 # (at your option) any later version.
3020 #
3021 # This program is distributed in the hope that it will be useful, but
3022 # WITHOUT ANY WARRANTY; without even the implied warranty of
3023 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
3024 # General Public License for more details.
3025 #
3026 # You should have received a copy of the GNU General Public License
3027 # along with this program; if not, write to the Free Software
3028 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
3029 #
3030 # As a special exception to the GNU General Public License, if you
3031 # distribute this file as part of a program that contains a
3032 # configuration script generated by Autoconf, you may include it under
3033 # the same distribution terms that you use for the rest of that program.
3034 
3035 # PKG_PROG_PKG_CONFIG([MIN-VERSION])
3036 # ----------------------------------
3037 # PKG_PROG_PKG_CONFIG
3038 
3039 # PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
3040 #
3041 # Check to see whether a particular set of modules exists.  Similar
3042 # to PKG_CHECK_MODULES(), but does not set variables or print errors.
3043 #
3044 #
3045 # Similar to PKG_CHECK_MODULES, make sure that the first instance of
3046 # this or PKG_CHECK_MODULES is called, or make sure to call
3047 # PKG_CHECK_EXISTS manually
3048 # --------------------------------------------------------------
3049 
3050 
3051 
3052 # _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
3053 # ---------------------------------------------
3054 # _PKG_CONFIG
3055 
3056 # _PKG_SHORT_ERRORS_SUPPORTED
3057 # -----------------------------
3058 # _PKG_SHORT_ERRORS_SUPPORTED
3059 
3060 
3061 # PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
3062 # [ACTION-IF-NOT-FOUND])
3063 #
3064 #
3065 # Note that if there is a possibility the first call to
3066 # PKG_CHECK_MODULES might not happen, you should be sure to include an
3067 # explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
3068 #
3069 #
3070 # --------------------------------------------------------------
3071 # PKG_CHECK_MODULES
3072 
3073 
3074 # Include these first...
3075 #
3076 # Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
3077 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3078 #
3079 # This code is free software; you can redistribute it and/or modify it
3080 # under the terms of the GNU General Public License version 2 only, as
3081 # published by the Free Software Foundation.  Oracle designates this
3082 # particular file as subject to the "Classpath" exception as provided
3083 # by Oracle in the LICENSE file that accompanied this code.
3084 #
3085 # This code is distributed in the hope that it will be useful, but WITHOUT
3086 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3087 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3088 # version 2 for more details (a copy is included in the LICENSE file that
3089 # accompanied this code).
3090 #
3091 # You should have received a copy of the GNU General Public License version
3092 # 2 along with this work; if not, write to the Free Software Foundation,
3093 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3094 #
3095 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3096 # or visit www.oracle.com if you need additional information or have any
3097 # questions.
3098 #
3099 
3100 # Test if $1 is a valid argument to $3 (often is $JAVA passed as $3)
3101 # If so, then append $1 to $2\
3102 # Also set JVM_ARG_OK to true/false depending on outcome.
3103 
3104 
3105 # This will make sure the given variable points to a full and proper
3106 # path. This means:
3107 # 1) There will be no spaces in the path. On posix platforms,
3108 #    spaces in the path will result in an error. On Windows,
3109 #    the path will be rewritten using short-style to be space-free.
3110 # 2) The path will be absolute, and it will be in unix-style (on
3111 #     cygwin).
3112 # $1: The name of the variable to fix
3113 
3114 
3115 # This will make sure the given variable points to a executable
3116 # with a full and proper path. This means:
3117 # 1) There will be no spaces in the path. On posix platforms,
3118 #    spaces in the path will result in an error. On Windows,
3119 #    the path will be rewritten using short-style to be space-free.
3120 # 2) The path will be absolute, and it will be in unix-style (on
3121 #     cygwin).
3122 # Any arguments given to the executable is preserved.
3123 # If the input variable does not have a directory specification, then
3124 # it need to be in the PATH.
3125 # $1: The name of the variable to fix
3126 
3127 
3128 
3129 
3130 
3131 
3132 # Test that variable $1 denoting a program is not empty. If empty, exit with an error.
3133 # $1: variable to check
3134 # $2: executable name to print in warning (optional)
3135 
3136 
3137 # Does AC_PATH_PROG followed by BASIC_CHECK_NONEMPTY.
3138 # Arguments as AC_PATH_PROG:
3139 # $1: variable to set
3140 # $2: executable name to look for
3141 
3142 
3143 # Setup the most fundamental tools that relies on not much else to set up,
3144 # but is used by much of the early bootstrap code.
3145 
3146 
3147 # Setup basic configuration paths, and platform-specific stuff related to PATHs.
3148 
3149 
3150 
3151 
3152 
3153 
3154 
3155 #%%% Simple tools %%%
3156 
3157 # Check if we have found a usable version of make
3158 # $1: the path to a potential make binary (or empty)
3159 # $2: the description on how we found this
3160 
3161 
3162 # Goes looking for a usable version of GNU make.
3163 
3164 
3165 
3166 
3167 
3168 
3169 # Check if build directory is on local disk. If not possible to determine,
3170 # we prefer to claim it's local.
3171 # Argument 1: directory to test
3172 # Argument 2: what to do if it is on local disk
3173 # Argument 3: what to do otherwise (remote disk or failure)
3174 
3175 
3176 # Check that source files have basic read permissions set. This might
3177 # not be the case in cygwin in certain conditions.
3178 
3179 
3180 
3181 
3182 #
3183 # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3184 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3185 #
3186 # This code is free software; you can redistribute it and/or modify it
3187 # under the terms of the GNU General Public License version 2 only, as
3188 # published by the Free Software Foundation.  Oracle designates this
3189 # particular file as subject to the "Classpath" exception as provided
3190 # by Oracle in the LICENSE file that accompanied this code.
3191 #
3192 # This code is distributed in the hope that it will be useful, but WITHOUT
3193 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3194 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3195 # version 2 for more details (a copy is included in the LICENSE file that
3196 # accompanied this code).
3197 #
3198 # You should have received a copy of the GNU General Public License version
3199 # 2 along with this work; if not, write to the Free Software Foundation,
3200 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3201 #
3202 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3203 # or visit www.oracle.com if you need additional information or have any
3204 # questions.
3205 #
3206 
3207 
3208 
3209 
3210 
3211 # Helper function which possibly converts a path using DOS-style short mode.
3212 # If so, the updated path is stored in $new_path.
3213 # $1: The path to check
3214 
3215 
3216 # Helper function which possibly converts a path using DOS-style short mode.
3217 # If so, the updated path is stored in $new_path.
3218 # $1: The path to check
3219 
3220 
3221 # FIXME: The BASIC_FIXUP_*_CYGWIN/MSYS is most likely too convoluted
3222 # and could probably be heavily simplified. However, all changes in this
3223 # area tend to need lot of testing in different scenarios, and in lack of
3224 # proper unit testing, cleaning this up has not been deemed worth the effort
3225 # at the moment.
3226 
3227 
3228 
3229 
3230 
3231 
3232 
3233 
3234 
3235 # Setup basic configuration paths, and platform-specific stuff related to PATHs.
3236 
3237 
3238 
3239 
3240 #
3241 # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3242 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3243 #
3244 # This code is free software; you can redistribute it and/or modify it
3245 # under the terms of the GNU General Public License version 2 only, as
3246 # published by the Free Software Foundation.  Oracle designates this
3247 # particular file as subject to the "Classpath" exception as provided
3248 # by Oracle in the LICENSE file that accompanied this code.
3249 #
3250 # This code is distributed in the hope that it will be useful, but WITHOUT
3251 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3252 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3253 # version 2 for more details (a copy is included in the LICENSE file that
3254 # accompanied this code).
3255 #
3256 # You should have received a copy of the GNU General Public License version
3257 # 2 along with this work; if not, write to the Free Software Foundation,
3258 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3259 #
3260 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3261 # or visit www.oracle.com if you need additional information or have any
3262 # questions.
3263 #
3264 
3265 
3266 
3267 
3268 
3269 
3270 
3271 
3272 
3273 
3274 
3275 # ... then the rest
3276 #
3277 # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3278 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3279 #
3280 # This code is free software; you can redistribute it and/or modify it
3281 # under the terms of the GNU General Public License version 2 only, as
3282 # published by the Free Software Foundation.  Oracle designates this
3283 # particular file as subject to the "Classpath" exception as provided
3284 # by Oracle in the LICENSE file that accompanied this code.
3285 #
3286 # This code is distributed in the hope that it will be useful, but WITHOUT
3287 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3288 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3289 # version 2 for more details (a copy is included in the LICENSE file that
3290 # accompanied this code).
3291 #
3292 # You should have received a copy of the GNU General Public License version
3293 # 2 along with this work; if not, write to the Free Software Foundation,
3294 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3295 #
3296 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3297 # or visit www.oracle.com if you need additional information or have any
3298 # questions.
3299 #
3300 
3301 # Execute the check given as argument, and verify the result
3302 # If the Boot JDK was previously found, do nothing
3303 # $1 A command line (typically autoconf macro) to execute
3304 
3305 
3306 # Test: Is bootjdk explicitely set by command line arguments?
3307 
3308 
3309 # Test: Is bootjdk available from builddeps?
3310 
3311 
3312 # Test: Is $JAVA_HOME set?
3313 
3314 
3315 # Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
3316 
3317 
3318 # Test: Is there a /usr/libexec/java_home? (Typically on MacOSX)
3319 
3320 
3321 # Look for a jdk in the given path. If there are multiple, try to select the newest.
3322 # If found, set BOOT_JDK and BOOT_JDK_FOUND.
3323 # $1 = Path to directory containing jdk installations.
3324 # $2 = String to append to the found JDK directory to get the proper JDK home
3325 
3326 
3327 # Call BOOTJDK_FIND_BEST_JDK_IN_DIRECTORY, but use the given
3328 # environmental variable as base for where to look.
3329 # $1 Name of an environmal variable, assumed to point to the Program Files directory.
3330 
3331 
3332 # Test: Is there a JDK installed in default, well-known locations?
3333 
3334 
3335 # Check that a command-line tool in the Boot JDK is correct
3336 # $1 = name of variable to assign
3337 # $2 = name of binary
3338 
3339 
3340 ###############################################################################
3341 #
3342 # We need a Boot JDK to bootstrap the build.
3343 #
3344 
3345 
3346 
3347 
3348 
3349 #
3350 # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3351 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3352 #
3353 # This code is free software; you can redistribute it and/or modify it
3354 # under the terms of the GNU General Public License version 2 only, as
3355 # published by the Free Software Foundation.  Oracle designates this
3356 # particular file as subject to the "Classpath" exception as provided
3357 # by Oracle in the LICENSE file that accompanied this code.
3358 #
3359 # This code is distributed in the hope that it will be useful, but WITHOUT
3360 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3361 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3362 # version 2 for more details (a copy is included in the LICENSE file that
3363 # accompanied this code).
3364 #
3365 # You should have received a copy of the GNU General Public License version
3366 # 2 along with this work; if not, write to the Free Software Foundation,
3367 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3368 #
3369 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3370 # or visit www.oracle.com if you need additional information or have any
3371 # questions.
3372 #
3373 
3374 
3375 
3376 
3377 
3378 
3379 
3380 
3381 
3382 
3383 
3384 
3385 
3386 
3387 
3388 
3389 
3390 
3391 
3392 
3393 #
3394 # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3395 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3396 #
3397 # This code is free software; you can redistribute it and/or modify it
3398 # under the terms of the GNU General Public License version 2 only, as
3399 # published by the Free Software Foundation.  Oracle designates this
3400 # particular file as subject to the "Classpath" exception as provided
3401 # by Oracle in the LICENSE file that accompanied this code.
3402 #
3403 # This code is distributed in the hope that it will be useful, but WITHOUT
3404 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3405 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3406 # version 2 for more details (a copy is included in the LICENSE file that
3407 # accompanied this code).
3408 #
3409 # You should have received a copy of the GNU General Public License version
3410 # 2 along with this work; if not, write to the Free Software Foundation,
3411 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3412 #
3413 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3414 # or visit www.oracle.com if you need additional information or have any
3415 # questions.
3416 #
3417 
3418 
3419 
3420 
3421 
3422 cygwin_help() {
3423     case $1 in
3424     unzip)
3425         PKGHANDLER_COMMAND="cd <location of cygwin setup.exe> && cmd /c setup -q -P unzip" ;;
3426     zip)
3427         PKGHANDLER_COMMAND="cd <location of cygwin setup.exe> && cmd /c setup -q -P zip" ;;
3428     make)
3429         PKGHANDLER_COMMAND="cd <location of cygwin setup.exe> && cmd /c setup -q -P make" ;;
3430     * )
3431        break ;;
3432     esac
3433 }
3434 
3435 apt_help() {
3436     case $1 in
3437     devkit)
3438         PKGHANDLER_COMMAND="sudo apt-get install build-essential" ;;
3439     openjdk)
3440         PKGHANDLER_COMMAND="sudo apt-get install openjdk-7-jdk" ;;
3441     alsa)
3442         PKGHANDLER_COMMAND="sudo apt-get install libasound2-dev" ;;
3443     cups)
3444         PKGHANDLER_COMMAND="sudo apt-get install libcups2-dev" ;;
3445     freetype2)
3446         PKGHANDLER_COMMAND="sudo apt-get install libfreetype6-dev" ;;
3447     pulse)
3448         PKGHANDLER_COMMAND="sudo apt-get install libpulse-dev" ;;
3449     x11)
3450         PKGHANDLER_COMMAND="sudo apt-get install libX11-dev libxext-dev libxrender-dev libxtst-dev" ;;
3451     ccache)
3452         PKGHANDLER_COMMAND="sudo apt-get install ccache" ;;
3453     * )
3454        break ;;
3455     esac
3456 }
3457 
3458 yum_help() {
3459     case $1 in
3460     devkit)
3461         PKGHANDLER_COMMAND="sudo yum groupinstall \"Development Tools\"" ;;
3462     openjdk)
3463         PKGHANDLER_COMMAND="sudo yum install java-1.7.0-openjdk" ;;
3464     alsa)
3465         PKGHANDLER_COMMAND="sudo yum install alsa-lib-devel" ;;
3466     cups)
3467         PKGHANDLER_COMMAND="sudo yum install cups-devel" ;;
3468     freetype2)
3469         PKGHANDLER_COMMAND="sudo yum install freetype2-devel" ;;
3470     pulse)
3471         PKGHANDLER_COMMAND="sudo yum install pulseaudio-libs-devel" ;;
3472     x11)
3473         PKGHANDLER_COMMAND="sudo yum install libXtst-devel" ;;
3474     ccache)
3475         PKGHANDLER_COMMAND="sudo yum install ccache" ;;
3476     * )
3477        break ;;
3478     esac
3479 }
3480 
3481 port_help() {
3482     PKGHANDLER_COMMAND=""
3483 }
3484 
3485 pkgutil_help() {
3486     PKGHANDLER_COMMAND=""
3487 }
3488 
3489 pkgadd_help() {
3490     PKGHANDLER_COMMAND=""
3491 }
3492 
3493 
3494 
3495 #
3496 # Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
3497 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3498 #
3499 # This code is free software; you can redistribute it and/or modify it
3500 # under the terms of the GNU General Public License version 2 only, as
3501 # published by the Free Software Foundation.  Oracle designates this
3502 # particular file as subject to the "Classpath" exception as provided
3503 # by Oracle in the LICENSE file that accompanied this code.
3504 #
3505 # This code is distributed in the hope that it will be useful, but WITHOUT
3506 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3507 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3508 # version 2 for more details (a copy is included in the LICENSE file that
3509 # accompanied this code).
3510 #
3511 # You should have received a copy of the GNU General Public License version
3512 # 2 along with this work; if not, write to the Free Software Foundation,
3513 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3514 #
3515 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3516 # or visit www.oracle.com if you need additional information or have any
3517 # questions.
3518 #
3519 
3520 
3521 
3522 
3523 
3524 
3525 
3526 
3527 ###############################################################################
3528 #
3529 # Should we build only OpenJDK even if closed sources are present?
3530 #
3531 
3532 
3533 
3534 
3535 ###############################################################################
3536 #
3537 # Setup version numbers
3538 #
3539 
3540 
3541 
3542 
3543 
3544 
3545 # Support for customization of the build process. Some build files
3546 # will include counterparts from this location, if they exist. This allows
3547 # for a degree of customization of the build targets and the rules/recipes
3548 # to create them
3549 
3550 # Check whether --with-custom-make-dir was given.
3551 if test "${with_custom_make_dir+set}" = set; then :
3552   withval=$with_custom_make_dir; CUSTOM_MAKE_DIR=$with_custom_make_dir
3553 fi
3554 
3555 
3556 
3557 #
3558 # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3559 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3560 #
3561 # This code is free software; you can redistribute it and/or modify it
3562 # under the terms of the GNU General Public License version 2 only, as
3563 # published by the Free Software Foundation.  Oracle designates this
3564 # particular file as subject to the "Classpath" exception as provided
3565 # by Oracle in the LICENSE file that accompanied this code.
3566 #
3567 # This code is distributed in the hope that it will be useful, but WITHOUT
3568 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3569 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3570 # version 2 for more details (a copy is included in the LICENSE file that
3571 # accompanied this code).
3572 #
3573 # You should have received a copy of the GNU General Public License version
3574 # 2 along with this work; if not, write to the Free Software Foundation,
3575 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3576 #
3577 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3578 # or visit www.oracle.com if you need additional information or have any
3579 # questions.
3580 #
3581 
3582 
3583 
3584 
3585 
3586 
3587 
3588 
3589 
3590 
3591 
3592 
3593 
3594 
3595 
3596 
3597 
3598 #
3599 # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3600 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3601 #
3602 # This code is free software; you can redistribute it and/or modify it
3603 # under the terms of the GNU General Public License version 2 only, as
3604 # published by the Free Software Foundation.  Oracle designates this
3605 # particular file as subject to the "Classpath" exception as provided
3606 # by Oracle in the LICENSE file that accompanied this code.
3607 #
3608 # This code is distributed in the hope that it will be useful, but WITHOUT
3609 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3610 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3611 # version 2 for more details (a copy is included in the LICENSE file that
3612 # accompanied this code).
3613 #
3614 # You should have received a copy of the GNU General Public License version
3615 # 2 along with this work; if not, write to the Free Software Foundation,
3616 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3617 #
3618 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3619 # or visit www.oracle.com if you need additional information or have any
3620 # questions.
3621 #
3622 
3623 # Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
3624 # Converts autoconf style CPU name to OpenJDK style, into
3625 # VAR_CPU, VAR_CPU_ARCH, VAR_CPU_BITS and VAR_CPU_ENDIAN.
3626 
3627 
3628 # Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
3629 # Converts autoconf style OS name to OpenJDK style, into
3630 # VAR_OS and VAR_OS_API.
3631 
3632 
3633 # Expects $host_os $host_cpu $build_os and $build_cpu
3634 # and $with_target_bits to have been setup!
3635 #
3636 # Translate the standard triplet(quadruplet) definition
3637 # of the target/build system into OPENJDK_TARGET_OS, OPENJDK_TARGET_CPU,
3638 # OPENJDK_BUILD_OS, etc.
3639 
3640 
3641 # Check if a reduced build (32-bit on 64-bit platforms) is requested, and modify behaviour
3642 # accordingly. Must be done after setting up build and target system, but before
3643 # doing anything else with these values.
3644 
3645 
3646     # Setup the legacy variables, for controlling the old makefiles.
3647     #
3648 
3649 
3650 
3651 
3652 #%%% Build and target systems %%%
3653 
3654 
3655 
3656 
3657 # Support macro for PLATFORM_SETUP_OPENJDK_TARGET_BITS.
3658 # Add -mX to various FLAGS variables.
3659 
3660 
3661 
3662 
3663 
3664 
3665 #
3666 # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3667 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3668 #
3669 # This code is free software; you can redistribute it and/or modify it
3670 # under the terms of the GNU General Public License version 2 only, as
3671 # published by the Free Software Foundation.  Oracle designates this
3672 # particular file as subject to the "Classpath" exception as provided
3673 # by Oracle in the LICENSE file that accompanied this code.
3674 #
3675 # This code is distributed in the hope that it will be useful, but WITHOUT
3676 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3677 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3678 # version 2 for more details (a copy is included in the LICENSE file that
3679 # accompanied this code).
3680 #
3681 # You should have received a copy of the GNU General Public License version
3682 # 2 along with this work; if not, write to the Free Software Foundation,
3683 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3684 #
3685 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3686 # or visit www.oracle.com if you need additional information or have any
3687 # questions.
3688 #
3689 
3690 
3691 
3692 
3693 
3694 
3695 
3696 
3697 #
3698 # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3699 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3700 #
3701 # This code is free software; you can redistribute it and/or modify it
3702 # under the terms of the GNU General Public License version 2 only, as
3703 # published by the Free Software Foundation.  Oracle designates this
3704 # particular file as subject to the "Classpath" exception as provided
3705 # by Oracle in the LICENSE file that accompanied this code.
3706 #
3707 # This code is distributed in the hope that it will be useful, but WITHOUT
3708 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3709 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3710 # version 2 for more details (a copy is included in the LICENSE file that
3711 # accompanied this code).
3712 #
3713 # You should have received a copy of the GNU General Public License version
3714 # 2 along with this work; if not, write to the Free Software Foundation,
3715 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3716 #
3717 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3718 # or visit www.oracle.com if you need additional information or have any
3719 # questions.
3720 #
3721 
3722 # $1 = compiler to test (CC or CXX)
3723 # $2 = human readable name of compiler (C or C++)
3724 
3725 
3726 
3727 
3728 
3729 # $1 = compiler to test (CC or CXX)
3730 # $2 = human readable name of compiler (C or C++)
3731 # $3 = list of compiler names to search for
3732 
3733 
3734 
3735 
3736 
3737 
3738 
3739 
3740 
3741 
3742 
3743 
3744 
3745 # TOOLCHAIN_COMPILER_CHECK_ARGUMENTS([ARGUMENT], [RUN-IF-TRUE],
3746 #                                   [RUN-IF-FALSE])
3747 # ------------------------------------------------------------
3748 # Check that the c and c++ compilers support an argument
3749 
3750 
3751 
3752 
3753 # Setup the JTREG paths
3754 
3755 
3756 #
3757 # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3758 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3759 #
3760 # This code is free software; you can redistribute it and/or modify it
3761 # under the terms of the GNU General Public License version 2 only, as
3762 # published by the Free Software Foundation.  Oracle designates this
3763 # particular file as subject to the "Classpath" exception as provided
3764 # by Oracle in the LICENSE file that accompanied this code.
3765 #
3766 # This code is distributed in the hope that it will be useful, but WITHOUT
3767 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3768 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3769 # version 2 for more details (a copy is included in the LICENSE file that
3770 # accompanied this code).
3771 #
3772 # You should have received a copy of the GNU General Public License version
3773 # 2 along with this work; if not, write to the Free Software Foundation,
3774 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3775 #
3776 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3777 # or visit www.oracle.com if you need additional information or have any
3778 # questions.
3779 #
3780 
3781 
3782 
3783 
3784 
3785 
3786 
3787 # Check if the VS env variables were setup prior to running configure.
3788 # If not, then find vcvarsall.bat and run it automatically, and integrate
3789 # the set env variables into the spec file.
3790 
3791 
3792 
3793 # Setup the DXSDK paths
3794 
3795 
3796 
3797 
3798 
3799 
3800 # This line needs to be here, verbatim, after all includes and the dummy hook
3801 # definitions. It is replaced with custom functionality when building
3802 # custom sources.
3803 #CUSTOM_AUTOCONF_INCLUDE
3804 
3805 # Do not change or remove the following line, it is needed for consistency checks:
3806 DATE_WHEN_GENERATED=1370373382
3807 
3808 ###############################################################################
3809 #
3810 # Initialization / Boot-strapping
3811 #
3812 # The bootstrapping process needs to solve the "chicken or the egg" problem,
3813 # thus it jumps back and forth, each time gaining something needed later on.
3814 #
3815 ###############################################################################
3816 
3817 # Basic initialization that must happen first of all
3818 
3819 # Save the original command line. This is passed to us by the wrapper configure script.
3820 
3821 DATE_WHEN_CONFIGURED=`LANG=C date`
3822 
3823 { $as_echo "$as_me:${as_lineno-$LINENO}: Configuration created at $DATE_WHEN_CONFIGURED." >&5
3824 $as_echo "$as_me: Configuration created at $DATE_WHEN_CONFIGURED." >&6;}
3825 { $as_echo "$as_me:${as_lineno-$LINENO}: configure script generated at timestamp $DATE_WHEN_GENERATED." >&5
3826 $as_echo "$as_me: configure script generated at timestamp $DATE_WHEN_GENERATED." >&6;}
3827 
3828 
3829 
3830 # Start with tools that do not need have cross compilation support
3831 # and can be expected to be found in the default PATH. These tools are
3832 # used by configure. Nor are these tools expected to be found in the
3833 # devkit from the builddeps server either, since they are
3834 # needed to download the devkit.
3835 
3836 # First are all the simple required tools.
3837 
3838     for ac_prog in basename
3839 do
3840   # Extract the first word of "$ac_prog", so it can be a program name with args.
3841 set dummy $ac_prog; ac_word=$2
3842 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3843 $as_echo_n "checking for $ac_word... " >&6; }
3844 if ${ac_cv_path_BASENAME+:} false; then :
3845   $as_echo_n "(cached) " >&6
3846 else
3847   case $BASENAME in
3848   [\\/]* | ?:[\\/]*)
3849   ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
3850   ;;
3851   *)
3852   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3853 for as_dir in $PATH
3854 do
3855   IFS=$as_save_IFS
3856   test -z "$as_dir" && as_dir=.
3857     for ac_exec_ext in '' $ac_executable_extensions; do
3858   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3859     ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
3860     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3861     break 2
3862   fi
3863 done
3864   done
3865 IFS=$as_save_IFS
3866 
3867   ;;
3868 esac
3869 fi
3870 BASENAME=$ac_cv_path_BASENAME
3871 if test -n "$BASENAME"; then
3872   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
3873 $as_echo "$BASENAME" >&6; }
3874 else
3875   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3876 $as_echo "no" >&6; }
3877 fi
3878 
3879 
3880   test -n "$BASENAME" && break
3881 done
3882 
3883 
3884     if test "x$BASENAME" = x; then
3885         if test "xbasename" = x; then
3886           PROG_NAME=basename
3887         else
3888           PROG_NAME=basename
3889         fi
3890         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
3891 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
3892         as_fn_error $? "Cannot continue" "$LINENO" 5
3893     fi
3894 
3895 
3896 
3897     for ac_prog in bash
3898 do
3899   # Extract the first word of "$ac_prog", so it can be a program name with args.
3900 set dummy $ac_prog; ac_word=$2
3901 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3902 $as_echo_n "checking for $ac_word... " >&6; }
3903 if ${ac_cv_path_BASH+:} false; then :
3904   $as_echo_n "(cached) " >&6
3905 else
3906   case $BASH in
3907   [\\/]* | ?:[\\/]*)
3908   ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
3909   ;;
3910   *)
3911   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3912 for as_dir in $PATH
3913 do
3914   IFS=$as_save_IFS
3915   test -z "$as_dir" && as_dir=.
3916     for ac_exec_ext in '' $ac_executable_extensions; do
3917   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3918     ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
3919     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3920     break 2
3921   fi
3922 done
3923   done
3924 IFS=$as_save_IFS
3925 
3926   ;;
3927 esac
3928 fi
3929 BASH=$ac_cv_path_BASH
3930 if test -n "$BASH"; then
3931   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
3932 $as_echo "$BASH" >&6; }
3933 else
3934   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3935 $as_echo "no" >&6; }
3936 fi
3937 
3938 
3939   test -n "$BASH" && break
3940 done
3941 
3942 
3943     if test "x$BASH" = x; then
3944         if test "xbash" = x; then
3945           PROG_NAME=bash
3946         else
3947           PROG_NAME=bash
3948         fi
3949         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
3950 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
3951         as_fn_error $? "Cannot continue" "$LINENO" 5
3952     fi
3953 
3954 
3955 
3956     for ac_prog in cat
3957 do
3958   # Extract the first word of "$ac_prog", so it can be a program name with args.
3959 set dummy $ac_prog; ac_word=$2
3960 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3961 $as_echo_n "checking for $ac_word... " >&6; }
3962 if ${ac_cv_path_CAT+:} false; then :
3963   $as_echo_n "(cached) " >&6
3964 else
3965   case $CAT in
3966   [\\/]* | ?:[\\/]*)
3967   ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
3968   ;;
3969   *)
3970   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3971 for as_dir in $PATH
3972 do
3973   IFS=$as_save_IFS
3974   test -z "$as_dir" && as_dir=.
3975     for ac_exec_ext in '' $ac_executable_extensions; do
3976   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3977     ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
3978     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3979     break 2
3980   fi
3981 done
3982   done
3983 IFS=$as_save_IFS
3984 
3985   ;;
3986 esac
3987 fi
3988 CAT=$ac_cv_path_CAT
3989 if test -n "$CAT"; then
3990   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
3991 $as_echo "$CAT" >&6; }
3992 else
3993   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3994 $as_echo "no" >&6; }
3995 fi
3996 
3997 
3998   test -n "$CAT" && break
3999 done
4000 
4001 
4002     if test "x$CAT" = x; then
4003         if test "xcat" = x; then
4004           PROG_NAME=cat
4005         else
4006           PROG_NAME=cat
4007         fi
4008         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4009 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4010         as_fn_error $? "Cannot continue" "$LINENO" 5
4011     fi
4012 
4013 
4014 
4015     for ac_prog in chmod
4016 do
4017   # Extract the first word of "$ac_prog", so it can be a program name with args.
4018 set dummy $ac_prog; ac_word=$2
4019 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4020 $as_echo_n "checking for $ac_word... " >&6; }
4021 if ${ac_cv_path_CHMOD+:} false; then :
4022   $as_echo_n "(cached) " >&6
4023 else
4024   case $CHMOD in
4025   [\\/]* | ?:[\\/]*)
4026   ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
4027   ;;
4028   *)
4029   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4030 for as_dir in $PATH
4031 do
4032   IFS=$as_save_IFS
4033   test -z "$as_dir" && as_dir=.
4034     for ac_exec_ext in '' $ac_executable_extensions; do
4035   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4036     ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
4037     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4038     break 2
4039   fi
4040 done
4041   done
4042 IFS=$as_save_IFS
4043 
4044   ;;
4045 esac
4046 fi
4047 CHMOD=$ac_cv_path_CHMOD
4048 if test -n "$CHMOD"; then
4049   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
4050 $as_echo "$CHMOD" >&6; }
4051 else
4052   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4053 $as_echo "no" >&6; }
4054 fi
4055 
4056 
4057   test -n "$CHMOD" && break
4058 done
4059 
4060 
4061     if test "x$CHMOD" = x; then
4062         if test "xchmod" = x; then
4063           PROG_NAME=chmod
4064         else
4065           PROG_NAME=chmod
4066         fi
4067         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4068 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4069         as_fn_error $? "Cannot continue" "$LINENO" 5
4070     fi
4071 
4072 
4073 
4074     for ac_prog in cmp
4075 do
4076   # Extract the first word of "$ac_prog", so it can be a program name with args.
4077 set dummy $ac_prog; ac_word=$2
4078 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4079 $as_echo_n "checking for $ac_word... " >&6; }
4080 if ${ac_cv_path_CMP+:} false; then :
4081   $as_echo_n "(cached) " >&6
4082 else
4083   case $CMP in
4084   [\\/]* | ?:[\\/]*)
4085   ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
4086   ;;
4087   *)
4088   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4089 for as_dir in $PATH
4090 do
4091   IFS=$as_save_IFS
4092   test -z "$as_dir" && as_dir=.
4093     for ac_exec_ext in '' $ac_executable_extensions; do
4094   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4095     ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
4096     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4097     break 2
4098   fi
4099 done
4100   done
4101 IFS=$as_save_IFS
4102 
4103   ;;
4104 esac
4105 fi
4106 CMP=$ac_cv_path_CMP
4107 if test -n "$CMP"; then
4108   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
4109 $as_echo "$CMP" >&6; }
4110 else
4111   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4112 $as_echo "no" >&6; }
4113 fi
4114 
4115 
4116   test -n "$CMP" && break
4117 done
4118 
4119 
4120     if test "x$CMP" = x; then
4121         if test "xcmp" = x; then
4122           PROG_NAME=cmp
4123         else
4124           PROG_NAME=cmp
4125         fi
4126         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4127 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4128         as_fn_error $? "Cannot continue" "$LINENO" 5
4129     fi
4130 
4131 
4132 
4133     for ac_prog in comm
4134 do
4135   # Extract the first word of "$ac_prog", so it can be a program name with args.
4136 set dummy $ac_prog; ac_word=$2
4137 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4138 $as_echo_n "checking for $ac_word... " >&6; }
4139 if ${ac_cv_path_COMM+:} false; then :
4140   $as_echo_n "(cached) " >&6
4141 else
4142   case $COMM in
4143   [\\/]* | ?:[\\/]*)
4144   ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
4145   ;;
4146   *)
4147   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4148 for as_dir in $PATH
4149 do
4150   IFS=$as_save_IFS
4151   test -z "$as_dir" && as_dir=.
4152     for ac_exec_ext in '' $ac_executable_extensions; do
4153   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4154     ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
4155     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4156     break 2
4157   fi
4158 done
4159   done
4160 IFS=$as_save_IFS
4161 
4162   ;;
4163 esac
4164 fi
4165 COMM=$ac_cv_path_COMM
4166 if test -n "$COMM"; then
4167   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
4168 $as_echo "$COMM" >&6; }
4169 else
4170   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4171 $as_echo "no" >&6; }
4172 fi
4173 
4174 
4175   test -n "$COMM" && break
4176 done
4177 
4178 
4179     if test "x$COMM" = x; then
4180         if test "xcomm" = x; then
4181           PROG_NAME=comm
4182         else
4183           PROG_NAME=comm
4184         fi
4185         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4186 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4187         as_fn_error $? "Cannot continue" "$LINENO" 5
4188     fi
4189 
4190 
4191 
4192     for ac_prog in cp
4193 do
4194   # Extract the first word of "$ac_prog", so it can be a program name with args.
4195 set dummy $ac_prog; ac_word=$2
4196 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4197 $as_echo_n "checking for $ac_word... " >&6; }
4198 if ${ac_cv_path_CP+:} false; then :
4199   $as_echo_n "(cached) " >&6
4200 else
4201   case $CP in
4202   [\\/]* | ?:[\\/]*)
4203   ac_cv_path_CP="$CP" # Let the user override the test with a path.
4204   ;;
4205   *)
4206   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4207 for as_dir in $PATH
4208 do
4209   IFS=$as_save_IFS
4210   test -z "$as_dir" && as_dir=.
4211     for ac_exec_ext in '' $ac_executable_extensions; do
4212   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4213     ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
4214     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4215     break 2
4216   fi
4217 done
4218   done
4219 IFS=$as_save_IFS
4220 
4221   ;;
4222 esac
4223 fi
4224 CP=$ac_cv_path_CP
4225 if test -n "$CP"; then
4226   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
4227 $as_echo "$CP" >&6; }
4228 else
4229   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4230 $as_echo "no" >&6; }
4231 fi
4232 
4233 
4234   test -n "$CP" && break
4235 done
4236 
4237 
4238     if test "x$CP" = x; then
4239         if test "xcp" = x; then
4240           PROG_NAME=cp
4241         else
4242           PROG_NAME=cp
4243         fi
4244         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4245 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4246         as_fn_error $? "Cannot continue" "$LINENO" 5
4247     fi
4248 
4249 
4250 
4251     for ac_prog in cpio
4252 do
4253   # Extract the first word of "$ac_prog", so it can be a program name with args.
4254 set dummy $ac_prog; ac_word=$2
4255 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4256 $as_echo_n "checking for $ac_word... " >&6; }
4257 if ${ac_cv_path_CPIO+:} false; then :
4258   $as_echo_n "(cached) " >&6
4259 else
4260   case $CPIO in
4261   [\\/]* | ?:[\\/]*)
4262   ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
4263   ;;
4264   *)
4265   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4266 for as_dir in $PATH
4267 do
4268   IFS=$as_save_IFS
4269   test -z "$as_dir" && as_dir=.
4270     for ac_exec_ext in '' $ac_executable_extensions; do
4271   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4272     ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
4273     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4274     break 2
4275   fi
4276 done
4277   done
4278 IFS=$as_save_IFS
4279 
4280   ;;
4281 esac
4282 fi
4283 CPIO=$ac_cv_path_CPIO
4284 if test -n "$CPIO"; then
4285   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
4286 $as_echo "$CPIO" >&6; }
4287 else
4288   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4289 $as_echo "no" >&6; }
4290 fi
4291 
4292 
4293   test -n "$CPIO" && break
4294 done
4295 
4296 
4297     if test "x$CPIO" = x; then
4298         if test "xcpio" = x; then
4299           PROG_NAME=cpio
4300         else
4301           PROG_NAME=cpio
4302         fi
4303         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4304 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4305         as_fn_error $? "Cannot continue" "$LINENO" 5
4306     fi
4307 
4308 
4309 
4310     for ac_prog in cut
4311 do
4312   # Extract the first word of "$ac_prog", so it can be a program name with args.
4313 set dummy $ac_prog; ac_word=$2
4314 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4315 $as_echo_n "checking for $ac_word... " >&6; }
4316 if ${ac_cv_path_CUT+:} false; then :
4317   $as_echo_n "(cached) " >&6
4318 else
4319   case $CUT in
4320   [\\/]* | ?:[\\/]*)
4321   ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
4322   ;;
4323   *)
4324   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4325 for as_dir in $PATH
4326 do
4327   IFS=$as_save_IFS
4328   test -z "$as_dir" && as_dir=.
4329     for ac_exec_ext in '' $ac_executable_extensions; do
4330   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4331     ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
4332     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4333     break 2
4334   fi
4335 done
4336   done
4337 IFS=$as_save_IFS
4338 
4339   ;;
4340 esac
4341 fi
4342 CUT=$ac_cv_path_CUT
4343 if test -n "$CUT"; then
4344   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
4345 $as_echo "$CUT" >&6; }
4346 else
4347   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4348 $as_echo "no" >&6; }
4349 fi
4350 
4351 
4352   test -n "$CUT" && break
4353 done
4354 
4355 
4356     if test "x$CUT" = x; then
4357         if test "xcut" = x; then
4358           PROG_NAME=cut
4359         else
4360           PROG_NAME=cut
4361         fi
4362         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4363 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4364         as_fn_error $? "Cannot continue" "$LINENO" 5
4365     fi
4366 
4367 
4368 
4369     for ac_prog in date
4370 do
4371   # Extract the first word of "$ac_prog", so it can be a program name with args.
4372 set dummy $ac_prog; ac_word=$2
4373 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4374 $as_echo_n "checking for $ac_word... " >&6; }
4375 if ${ac_cv_path_DATE+:} false; then :
4376   $as_echo_n "(cached) " >&6
4377 else
4378   case $DATE in
4379   [\\/]* | ?:[\\/]*)
4380   ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
4381   ;;
4382   *)
4383   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4384 for as_dir in $PATH
4385 do
4386   IFS=$as_save_IFS
4387   test -z "$as_dir" && as_dir=.
4388     for ac_exec_ext in '' $ac_executable_extensions; do
4389   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4390     ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
4391     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4392     break 2
4393   fi
4394 done
4395   done
4396 IFS=$as_save_IFS
4397 
4398   ;;
4399 esac
4400 fi
4401 DATE=$ac_cv_path_DATE
4402 if test -n "$DATE"; then
4403   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
4404 $as_echo "$DATE" >&6; }
4405 else
4406   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4407 $as_echo "no" >&6; }
4408 fi
4409 
4410 
4411   test -n "$DATE" && break
4412 done
4413 
4414 
4415     if test "x$DATE" = x; then
4416         if test "xdate" = x; then
4417           PROG_NAME=date
4418         else
4419           PROG_NAME=date
4420         fi
4421         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4422 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4423         as_fn_error $? "Cannot continue" "$LINENO" 5
4424     fi
4425 
4426 
4427 
4428     for ac_prog in gdiff diff
4429 do
4430   # Extract the first word of "$ac_prog", so it can be a program name with args.
4431 set dummy $ac_prog; ac_word=$2
4432 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4433 $as_echo_n "checking for $ac_word... " >&6; }
4434 if ${ac_cv_path_DIFF+:} false; then :
4435   $as_echo_n "(cached) " >&6
4436 else
4437   case $DIFF in
4438   [\\/]* | ?:[\\/]*)
4439   ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
4440   ;;
4441   *)
4442   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4443 for as_dir in $PATH
4444 do
4445   IFS=$as_save_IFS
4446   test -z "$as_dir" && as_dir=.
4447     for ac_exec_ext in '' $ac_executable_extensions; do
4448   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4449     ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
4450     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4451     break 2
4452   fi
4453 done
4454   done
4455 IFS=$as_save_IFS
4456 
4457   ;;
4458 esac
4459 fi
4460 DIFF=$ac_cv_path_DIFF
4461 if test -n "$DIFF"; then
4462   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
4463 $as_echo "$DIFF" >&6; }
4464 else
4465   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4466 $as_echo "no" >&6; }
4467 fi
4468 
4469 
4470   test -n "$DIFF" && break
4471 done
4472 
4473 
4474     if test "x$DIFF" = x; then
4475         if test "xgdiff diff" = x; then
4476           PROG_NAME=diff
4477         else
4478           PROG_NAME=gdiff diff
4479         fi
4480         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4481 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4482         as_fn_error $? "Cannot continue" "$LINENO" 5
4483     fi
4484 
4485 
4486 
4487     for ac_prog in dirname
4488 do
4489   # Extract the first word of "$ac_prog", so it can be a program name with args.
4490 set dummy $ac_prog; ac_word=$2
4491 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4492 $as_echo_n "checking for $ac_word... " >&6; }
4493 if ${ac_cv_path_DIRNAME+:} false; then :
4494   $as_echo_n "(cached) " >&6
4495 else
4496   case $DIRNAME in
4497   [\\/]* | ?:[\\/]*)
4498   ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
4499   ;;
4500   *)
4501   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4502 for as_dir in $PATH
4503 do
4504   IFS=$as_save_IFS
4505   test -z "$as_dir" && as_dir=.
4506     for ac_exec_ext in '' $ac_executable_extensions; do
4507   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4508     ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
4509     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4510     break 2
4511   fi
4512 done
4513   done
4514 IFS=$as_save_IFS
4515 
4516   ;;
4517 esac
4518 fi
4519 DIRNAME=$ac_cv_path_DIRNAME
4520 if test -n "$DIRNAME"; then
4521   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
4522 $as_echo "$DIRNAME" >&6; }
4523 else
4524   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4525 $as_echo "no" >&6; }
4526 fi
4527 
4528 
4529   test -n "$DIRNAME" && break
4530 done
4531 
4532 
4533     if test "x$DIRNAME" = x; then
4534         if test "xdirname" = x; then
4535           PROG_NAME=dirname
4536         else
4537           PROG_NAME=dirname
4538         fi
4539         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4540 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4541         as_fn_error $? "Cannot continue" "$LINENO" 5
4542     fi
4543 
4544 
4545 
4546     for ac_prog in echo
4547 do
4548   # Extract the first word of "$ac_prog", so it can be a program name with args.
4549 set dummy $ac_prog; ac_word=$2
4550 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4551 $as_echo_n "checking for $ac_word... " >&6; }
4552 if ${ac_cv_path_ECHO+:} false; then :
4553   $as_echo_n "(cached) " >&6
4554 else
4555   case $ECHO in
4556   [\\/]* | ?:[\\/]*)
4557   ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
4558   ;;
4559   *)
4560   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4561 for as_dir in $PATH
4562 do
4563   IFS=$as_save_IFS
4564   test -z "$as_dir" && as_dir=.
4565     for ac_exec_ext in '' $ac_executable_extensions; do
4566   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4567     ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
4568     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4569     break 2
4570   fi
4571 done
4572   done
4573 IFS=$as_save_IFS
4574 
4575   ;;
4576 esac
4577 fi
4578 ECHO=$ac_cv_path_ECHO
4579 if test -n "$ECHO"; then
4580   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
4581 $as_echo "$ECHO" >&6; }
4582 else
4583   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4584 $as_echo "no" >&6; }
4585 fi
4586 
4587 
4588   test -n "$ECHO" && break
4589 done
4590 
4591 
4592     if test "x$ECHO" = x; then
4593         if test "xecho" = x; then
4594           PROG_NAME=echo
4595         else
4596           PROG_NAME=echo
4597         fi
4598         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4599 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4600         as_fn_error $? "Cannot continue" "$LINENO" 5
4601     fi
4602 
4603 
4604 
4605     for ac_prog in expr
4606 do
4607   # Extract the first word of "$ac_prog", so it can be a program name with args.
4608 set dummy $ac_prog; ac_word=$2
4609 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4610 $as_echo_n "checking for $ac_word... " >&6; }
4611 if ${ac_cv_path_EXPR+:} false; then :
4612   $as_echo_n "(cached) " >&6
4613 else
4614   case $EXPR in
4615   [\\/]* | ?:[\\/]*)
4616   ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
4617   ;;
4618   *)
4619   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4620 for as_dir in $PATH
4621 do
4622   IFS=$as_save_IFS
4623   test -z "$as_dir" && as_dir=.
4624     for ac_exec_ext in '' $ac_executable_extensions; do
4625   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4626     ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
4627     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4628     break 2
4629   fi
4630 done
4631   done
4632 IFS=$as_save_IFS
4633 
4634   ;;
4635 esac
4636 fi
4637 EXPR=$ac_cv_path_EXPR
4638 if test -n "$EXPR"; then
4639   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
4640 $as_echo "$EXPR" >&6; }
4641 else
4642   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4643 $as_echo "no" >&6; }
4644 fi
4645 
4646 
4647   test -n "$EXPR" && break
4648 done
4649 
4650 
4651     if test "x$EXPR" = x; then
4652         if test "xexpr" = x; then
4653           PROG_NAME=expr
4654         else
4655           PROG_NAME=expr
4656         fi
4657         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4658 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4659         as_fn_error $? "Cannot continue" "$LINENO" 5
4660     fi
4661 
4662 
4663 
4664     for ac_prog in file
4665 do
4666   # Extract the first word of "$ac_prog", so it can be a program name with args.
4667 set dummy $ac_prog; ac_word=$2
4668 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4669 $as_echo_n "checking for $ac_word... " >&6; }
4670 if ${ac_cv_path_FILE+:} false; then :
4671   $as_echo_n "(cached) " >&6
4672 else
4673   case $FILE in
4674   [\\/]* | ?:[\\/]*)
4675   ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
4676   ;;
4677   *)
4678   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4679 for as_dir in $PATH
4680 do
4681   IFS=$as_save_IFS
4682   test -z "$as_dir" && as_dir=.
4683     for ac_exec_ext in '' $ac_executable_extensions; do
4684   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4685     ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
4686     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4687     break 2
4688   fi
4689 done
4690   done
4691 IFS=$as_save_IFS
4692 
4693   ;;
4694 esac
4695 fi
4696 FILE=$ac_cv_path_FILE
4697 if test -n "$FILE"; then
4698   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
4699 $as_echo "$FILE" >&6; }
4700 else
4701   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4702 $as_echo "no" >&6; }
4703 fi
4704 
4705 
4706   test -n "$FILE" && break
4707 done
4708 
4709 
4710     if test "x$FILE" = x; then
4711         if test "xfile" = x; then
4712           PROG_NAME=file
4713         else
4714           PROG_NAME=file
4715         fi
4716         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4717 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4718         as_fn_error $? "Cannot continue" "$LINENO" 5
4719     fi
4720 
4721 
4722 
4723     for ac_prog in find
4724 do
4725   # Extract the first word of "$ac_prog", so it can be a program name with args.
4726 set dummy $ac_prog; ac_word=$2
4727 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4728 $as_echo_n "checking for $ac_word... " >&6; }
4729 if ${ac_cv_path_FIND+:} false; then :
4730   $as_echo_n "(cached) " >&6
4731 else
4732   case $FIND in
4733   [\\/]* | ?:[\\/]*)
4734   ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
4735   ;;
4736   *)
4737   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4738 for as_dir in $PATH
4739 do
4740   IFS=$as_save_IFS
4741   test -z "$as_dir" && as_dir=.
4742     for ac_exec_ext in '' $ac_executable_extensions; do
4743   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4744     ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
4745     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4746     break 2
4747   fi
4748 done
4749   done
4750 IFS=$as_save_IFS
4751 
4752   ;;
4753 esac
4754 fi
4755 FIND=$ac_cv_path_FIND
4756 if test -n "$FIND"; then
4757   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
4758 $as_echo "$FIND" >&6; }
4759 else
4760   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4761 $as_echo "no" >&6; }
4762 fi
4763 
4764 
4765   test -n "$FIND" && break
4766 done
4767 
4768 
4769     if test "x$FIND" = x; then
4770         if test "xfind" = x; then
4771           PROG_NAME=find
4772         else
4773           PROG_NAME=find
4774         fi
4775         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4776 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4777         as_fn_error $? "Cannot continue" "$LINENO" 5
4778     fi
4779 
4780 
4781 
4782     for ac_prog in head
4783 do
4784   # Extract the first word of "$ac_prog", so it can be a program name with args.
4785 set dummy $ac_prog; ac_word=$2
4786 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4787 $as_echo_n "checking for $ac_word... " >&6; }
4788 if ${ac_cv_path_HEAD+:} false; then :
4789   $as_echo_n "(cached) " >&6
4790 else
4791   case $HEAD in
4792   [\\/]* | ?:[\\/]*)
4793   ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
4794   ;;
4795   *)
4796   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4797 for as_dir in $PATH
4798 do
4799   IFS=$as_save_IFS
4800   test -z "$as_dir" && as_dir=.
4801     for ac_exec_ext in '' $ac_executable_extensions; do
4802   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4803     ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
4804     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4805     break 2
4806   fi
4807 done
4808   done
4809 IFS=$as_save_IFS
4810 
4811   ;;
4812 esac
4813 fi
4814 HEAD=$ac_cv_path_HEAD
4815 if test -n "$HEAD"; then
4816   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
4817 $as_echo "$HEAD" >&6; }
4818 else
4819   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4820 $as_echo "no" >&6; }
4821 fi
4822 
4823 
4824   test -n "$HEAD" && break
4825 done
4826 
4827 
4828     if test "x$HEAD" = x; then
4829         if test "xhead" = x; then
4830           PROG_NAME=head
4831         else
4832           PROG_NAME=head
4833         fi
4834         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4835 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4836         as_fn_error $? "Cannot continue" "$LINENO" 5
4837     fi
4838 
4839 
4840 
4841     for ac_prog in ln
4842 do
4843   # Extract the first word of "$ac_prog", so it can be a program name with args.
4844 set dummy $ac_prog; ac_word=$2
4845 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4846 $as_echo_n "checking for $ac_word... " >&6; }
4847 if ${ac_cv_path_LN+:} false; then :
4848   $as_echo_n "(cached) " >&6
4849 else
4850   case $LN in
4851   [\\/]* | ?:[\\/]*)
4852   ac_cv_path_LN="$LN" # Let the user override the test with a path.
4853   ;;
4854   *)
4855   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4856 for as_dir in $PATH
4857 do
4858   IFS=$as_save_IFS
4859   test -z "$as_dir" && as_dir=.
4860     for ac_exec_ext in '' $ac_executable_extensions; do
4861   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4862     ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
4863     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4864     break 2
4865   fi
4866 done
4867   done
4868 IFS=$as_save_IFS
4869 
4870   ;;
4871 esac
4872 fi
4873 LN=$ac_cv_path_LN
4874 if test -n "$LN"; then
4875   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
4876 $as_echo "$LN" >&6; }
4877 else
4878   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4879 $as_echo "no" >&6; }
4880 fi
4881 
4882 
4883   test -n "$LN" && break
4884 done
4885 
4886 
4887     if test "x$LN" = x; then
4888         if test "xln" = x; then
4889           PROG_NAME=ln
4890         else
4891           PROG_NAME=ln
4892         fi
4893         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4894 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4895         as_fn_error $? "Cannot continue" "$LINENO" 5
4896     fi
4897 
4898 
4899 
4900     for ac_prog in ls
4901 do
4902   # Extract the first word of "$ac_prog", so it can be a program name with args.
4903 set dummy $ac_prog; ac_word=$2
4904 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4905 $as_echo_n "checking for $ac_word... " >&6; }
4906 if ${ac_cv_path_LS+:} false; then :
4907   $as_echo_n "(cached) " >&6
4908 else
4909   case $LS in
4910   [\\/]* | ?:[\\/]*)
4911   ac_cv_path_LS="$LS" # Let the user override the test with a path.
4912   ;;
4913   *)
4914   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4915 for as_dir in $PATH
4916 do
4917   IFS=$as_save_IFS
4918   test -z "$as_dir" && as_dir=.
4919     for ac_exec_ext in '' $ac_executable_extensions; do
4920   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4921     ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
4922     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4923     break 2
4924   fi
4925 done
4926   done
4927 IFS=$as_save_IFS
4928 
4929   ;;
4930 esac
4931 fi
4932 LS=$ac_cv_path_LS
4933 if test -n "$LS"; then
4934   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
4935 $as_echo "$LS" >&6; }
4936 else
4937   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4938 $as_echo "no" >&6; }
4939 fi
4940 
4941 
4942   test -n "$LS" && break
4943 done
4944 
4945 
4946     if test "x$LS" = x; then
4947         if test "xls" = x; then
4948           PROG_NAME=ls
4949         else
4950           PROG_NAME=ls
4951         fi
4952         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4953 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4954         as_fn_error $? "Cannot continue" "$LINENO" 5
4955     fi
4956 
4957 
4958 
4959     for ac_prog in mkdir
4960 do
4961   # Extract the first word of "$ac_prog", so it can be a program name with args.
4962 set dummy $ac_prog; ac_word=$2
4963 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4964 $as_echo_n "checking for $ac_word... " >&6; }
4965 if ${ac_cv_path_MKDIR+:} false; then :
4966   $as_echo_n "(cached) " >&6
4967 else
4968   case $MKDIR in
4969   [\\/]* | ?:[\\/]*)
4970   ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
4971   ;;
4972   *)
4973   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4974 for as_dir in $PATH
4975 do
4976   IFS=$as_save_IFS
4977   test -z "$as_dir" && as_dir=.
4978     for ac_exec_ext in '' $ac_executable_extensions; do
4979   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4980     ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
4981     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4982     break 2
4983   fi
4984 done
4985   done
4986 IFS=$as_save_IFS
4987 
4988   ;;
4989 esac
4990 fi
4991 MKDIR=$ac_cv_path_MKDIR
4992 if test -n "$MKDIR"; then
4993   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
4994 $as_echo "$MKDIR" >&6; }
4995 else
4996   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4997 $as_echo "no" >&6; }
4998 fi
4999 
5000 
5001   test -n "$MKDIR" && break
5002 done
5003 
5004 
5005     if test "x$MKDIR" = x; then
5006         if test "xmkdir" = x; then
5007           PROG_NAME=mkdir
5008         else
5009           PROG_NAME=mkdir
5010         fi
5011         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5012 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5013         as_fn_error $? "Cannot continue" "$LINENO" 5
5014     fi
5015 
5016 
5017 
5018     for ac_prog in mktemp
5019 do
5020   # Extract the first word of "$ac_prog", so it can be a program name with args.
5021 set dummy $ac_prog; ac_word=$2
5022 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5023 $as_echo_n "checking for $ac_word... " >&6; }
5024 if ${ac_cv_path_MKTEMP+:} false; then :
5025   $as_echo_n "(cached) " >&6
5026 else
5027   case $MKTEMP in
5028   [\\/]* | ?:[\\/]*)
5029   ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
5030   ;;
5031   *)
5032   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5033 for as_dir in $PATH
5034 do
5035   IFS=$as_save_IFS
5036   test -z "$as_dir" && as_dir=.
5037     for ac_exec_ext in '' $ac_executable_extensions; do
5038   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5039     ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
5040     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5041     break 2
5042   fi
5043 done
5044   done
5045 IFS=$as_save_IFS
5046 
5047   ;;
5048 esac
5049 fi
5050 MKTEMP=$ac_cv_path_MKTEMP
5051 if test -n "$MKTEMP"; then
5052   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
5053 $as_echo "$MKTEMP" >&6; }
5054 else
5055   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5056 $as_echo "no" >&6; }
5057 fi
5058 
5059 
5060   test -n "$MKTEMP" && break
5061 done
5062 
5063 
5064     if test "x$MKTEMP" = x; then
5065         if test "xmktemp" = x; then
5066           PROG_NAME=mktemp
5067         else
5068           PROG_NAME=mktemp
5069         fi
5070         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5071 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5072         as_fn_error $? "Cannot continue" "$LINENO" 5
5073     fi
5074 
5075 
5076 
5077     for ac_prog in mv
5078 do
5079   # Extract the first word of "$ac_prog", so it can be a program name with args.
5080 set dummy $ac_prog; ac_word=$2
5081 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5082 $as_echo_n "checking for $ac_word... " >&6; }
5083 if ${ac_cv_path_MV+:} false; then :
5084   $as_echo_n "(cached) " >&6
5085 else
5086   case $MV in
5087   [\\/]* | ?:[\\/]*)
5088   ac_cv_path_MV="$MV" # Let the user override the test with a path.
5089   ;;
5090   *)
5091   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5092 for as_dir in $PATH
5093 do
5094   IFS=$as_save_IFS
5095   test -z "$as_dir" && as_dir=.
5096     for ac_exec_ext in '' $ac_executable_extensions; do
5097   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5098     ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
5099     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5100     break 2
5101   fi
5102 done
5103   done
5104 IFS=$as_save_IFS
5105 
5106   ;;
5107 esac
5108 fi
5109 MV=$ac_cv_path_MV
5110 if test -n "$MV"; then
5111   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
5112 $as_echo "$MV" >&6; }
5113 else
5114   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5115 $as_echo "no" >&6; }
5116 fi
5117 
5118 
5119   test -n "$MV" && break
5120 done
5121 
5122 
5123     if test "x$MV" = x; then
5124         if test "xmv" = x; then
5125           PROG_NAME=mv
5126         else
5127           PROG_NAME=mv
5128         fi
5129         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5130 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5131         as_fn_error $? "Cannot continue" "$LINENO" 5
5132     fi
5133 
5134 
5135 
5136     for ac_prog in printf
5137 do
5138   # Extract the first word of "$ac_prog", so it can be a program name with args.
5139 set dummy $ac_prog; ac_word=$2
5140 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5141 $as_echo_n "checking for $ac_word... " >&6; }
5142 if ${ac_cv_path_PRINTF+:} false; then :
5143   $as_echo_n "(cached) " >&6
5144 else
5145   case $PRINTF in
5146   [\\/]* | ?:[\\/]*)
5147   ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
5148   ;;
5149   *)
5150   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5151 for as_dir in $PATH
5152 do
5153   IFS=$as_save_IFS
5154   test -z "$as_dir" && as_dir=.
5155     for ac_exec_ext in '' $ac_executable_extensions; do
5156   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5157     ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
5158     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5159     break 2
5160   fi
5161 done
5162   done
5163 IFS=$as_save_IFS
5164 
5165   ;;
5166 esac
5167 fi
5168 PRINTF=$ac_cv_path_PRINTF
5169 if test -n "$PRINTF"; then
5170   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
5171 $as_echo "$PRINTF" >&6; }
5172 else
5173   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5174 $as_echo "no" >&6; }
5175 fi
5176 
5177 
5178   test -n "$PRINTF" && break
5179 done
5180 
5181 
5182     if test "x$PRINTF" = x; then
5183         if test "xprintf" = x; then
5184           PROG_NAME=printf
5185         else
5186           PROG_NAME=printf
5187         fi
5188         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5189 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5190         as_fn_error $? "Cannot continue" "$LINENO" 5
5191     fi
5192 
5193 
5194 
5195     for ac_prog in rm
5196 do
5197   # Extract the first word of "$ac_prog", so it can be a program name with args.
5198 set dummy $ac_prog; ac_word=$2
5199 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5200 $as_echo_n "checking for $ac_word... " >&6; }
5201 if ${ac_cv_path_RM+:} false; then :
5202   $as_echo_n "(cached) " >&6
5203 else
5204   case $RM in
5205   [\\/]* | ?:[\\/]*)
5206   ac_cv_path_RM="$RM" # Let the user override the test with a path.
5207   ;;
5208   *)
5209   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5210 for as_dir in $PATH
5211 do
5212   IFS=$as_save_IFS
5213   test -z "$as_dir" && as_dir=.
5214     for ac_exec_ext in '' $ac_executable_extensions; do
5215   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5216     ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
5217     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5218     break 2
5219   fi
5220 done
5221   done
5222 IFS=$as_save_IFS
5223 
5224   ;;
5225 esac
5226 fi
5227 RM=$ac_cv_path_RM
5228 if test -n "$RM"; then
5229   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
5230 $as_echo "$RM" >&6; }
5231 else
5232   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5233 $as_echo "no" >&6; }
5234 fi
5235 
5236 
5237   test -n "$RM" && break
5238 done
5239 
5240 
5241     if test "x$RM" = x; then
5242         if test "xrm" = x; then
5243           PROG_NAME=rm
5244         else
5245           PROG_NAME=rm
5246         fi
5247         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5248 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5249         as_fn_error $? "Cannot continue" "$LINENO" 5
5250     fi
5251 
5252 
5253 
5254     for ac_prog in sh
5255 do
5256   # Extract the first word of "$ac_prog", so it can be a program name with args.
5257 set dummy $ac_prog; ac_word=$2
5258 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5259 $as_echo_n "checking for $ac_word... " >&6; }
5260 if ${ac_cv_path_SH+:} false; then :
5261   $as_echo_n "(cached) " >&6
5262 else
5263   case $SH in
5264   [\\/]* | ?:[\\/]*)
5265   ac_cv_path_SH="$SH" # Let the user override the test with a path.
5266   ;;
5267   *)
5268   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5269 for as_dir in $PATH
5270 do
5271   IFS=$as_save_IFS
5272   test -z "$as_dir" && as_dir=.
5273     for ac_exec_ext in '' $ac_executable_extensions; do
5274   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5275     ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
5276     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5277     break 2
5278   fi
5279 done
5280   done
5281 IFS=$as_save_IFS
5282 
5283   ;;
5284 esac
5285 fi
5286 SH=$ac_cv_path_SH
5287 if test -n "$SH"; then
5288   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
5289 $as_echo "$SH" >&6; }
5290 else
5291   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5292 $as_echo "no" >&6; }
5293 fi
5294 
5295 
5296   test -n "$SH" && break
5297 done
5298 
5299 
5300     if test "x$SH" = x; then
5301         if test "xsh" = x; then
5302           PROG_NAME=sh
5303         else
5304           PROG_NAME=sh
5305         fi
5306         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5307 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5308         as_fn_error $? "Cannot continue" "$LINENO" 5
5309     fi
5310 
5311 
5312 
5313     for ac_prog in sort
5314 do
5315   # Extract the first word of "$ac_prog", so it can be a program name with args.
5316 set dummy $ac_prog; ac_word=$2
5317 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5318 $as_echo_n "checking for $ac_word... " >&6; }
5319 if ${ac_cv_path_SORT+:} false; then :
5320   $as_echo_n "(cached) " >&6
5321 else
5322   case $SORT in
5323   [\\/]* | ?:[\\/]*)
5324   ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
5325   ;;
5326   *)
5327   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5328 for as_dir in $PATH
5329 do
5330   IFS=$as_save_IFS
5331   test -z "$as_dir" && as_dir=.
5332     for ac_exec_ext in '' $ac_executable_extensions; do
5333   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5334     ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
5335     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5336     break 2
5337   fi
5338 done
5339   done
5340 IFS=$as_save_IFS
5341 
5342   ;;
5343 esac
5344 fi
5345 SORT=$ac_cv_path_SORT
5346 if test -n "$SORT"; then
5347   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
5348 $as_echo "$SORT" >&6; }
5349 else
5350   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5351 $as_echo "no" >&6; }
5352 fi
5353 
5354 
5355   test -n "$SORT" && break
5356 done
5357 
5358 
5359     if test "x$SORT" = x; then
5360         if test "xsort" = x; then
5361           PROG_NAME=sort
5362         else
5363           PROG_NAME=sort
5364         fi
5365         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5366 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5367         as_fn_error $? "Cannot continue" "$LINENO" 5
5368     fi
5369 
5370 
5371 
5372     for ac_prog in tail
5373 do
5374   # Extract the first word of "$ac_prog", so it can be a program name with args.
5375 set dummy $ac_prog; ac_word=$2
5376 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5377 $as_echo_n "checking for $ac_word... " >&6; }
5378 if ${ac_cv_path_TAIL+:} false; then :
5379   $as_echo_n "(cached) " >&6
5380 else
5381   case $TAIL in
5382   [\\/]* | ?:[\\/]*)
5383   ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
5384   ;;
5385   *)
5386   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5387 for as_dir in $PATH
5388 do
5389   IFS=$as_save_IFS
5390   test -z "$as_dir" && as_dir=.
5391     for ac_exec_ext in '' $ac_executable_extensions; do
5392   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5393     ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
5394     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5395     break 2
5396   fi
5397 done
5398   done
5399 IFS=$as_save_IFS
5400 
5401   ;;
5402 esac
5403 fi
5404 TAIL=$ac_cv_path_TAIL
5405 if test -n "$TAIL"; then
5406   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
5407 $as_echo "$TAIL" >&6; }
5408 else
5409   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5410 $as_echo "no" >&6; }
5411 fi
5412 
5413 
5414   test -n "$TAIL" && break
5415 done
5416 
5417 
5418     if test "x$TAIL" = x; then
5419         if test "xtail" = x; then
5420           PROG_NAME=tail
5421         else
5422           PROG_NAME=tail
5423         fi
5424         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5425 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5426         as_fn_error $? "Cannot continue" "$LINENO" 5
5427     fi
5428 
5429 
5430 
5431     for ac_prog in tar
5432 do
5433   # Extract the first word of "$ac_prog", so it can be a program name with args.
5434 set dummy $ac_prog; ac_word=$2
5435 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5436 $as_echo_n "checking for $ac_word... " >&6; }
5437 if ${ac_cv_path_TAR+:} false; then :
5438   $as_echo_n "(cached) " >&6
5439 else
5440   case $TAR in
5441   [\\/]* | ?:[\\/]*)
5442   ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
5443   ;;
5444   *)
5445   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5446 for as_dir in $PATH
5447 do
5448   IFS=$as_save_IFS
5449   test -z "$as_dir" && as_dir=.
5450     for ac_exec_ext in '' $ac_executable_extensions; do
5451   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5452     ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
5453     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5454     break 2
5455   fi
5456 done
5457   done
5458 IFS=$as_save_IFS
5459 
5460   ;;
5461 esac
5462 fi
5463 TAR=$ac_cv_path_TAR
5464 if test -n "$TAR"; then
5465   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
5466 $as_echo "$TAR" >&6; }
5467 else
5468   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5469 $as_echo "no" >&6; }
5470 fi
5471 
5472 
5473   test -n "$TAR" && break
5474 done
5475 
5476 
5477     if test "x$TAR" = x; then
5478         if test "xtar" = x; then
5479           PROG_NAME=tar
5480         else
5481           PROG_NAME=tar
5482         fi
5483         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5484 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5485         as_fn_error $? "Cannot continue" "$LINENO" 5
5486     fi
5487 
5488 
5489 
5490     for ac_prog in tee
5491 do
5492   # Extract the first word of "$ac_prog", so it can be a program name with args.
5493 set dummy $ac_prog; ac_word=$2
5494 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5495 $as_echo_n "checking for $ac_word... " >&6; }
5496 if ${ac_cv_path_TEE+:} false; then :
5497   $as_echo_n "(cached) " >&6
5498 else
5499   case $TEE in
5500   [\\/]* | ?:[\\/]*)
5501   ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
5502   ;;
5503   *)
5504   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5505 for as_dir in $PATH
5506 do
5507   IFS=$as_save_IFS
5508   test -z "$as_dir" && as_dir=.
5509     for ac_exec_ext in '' $ac_executable_extensions; do
5510   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5511     ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
5512     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5513     break 2
5514   fi
5515 done
5516   done
5517 IFS=$as_save_IFS
5518 
5519   ;;
5520 esac
5521 fi
5522 TEE=$ac_cv_path_TEE
5523 if test -n "$TEE"; then
5524   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
5525 $as_echo "$TEE" >&6; }
5526 else
5527   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5528 $as_echo "no" >&6; }
5529 fi
5530 
5531 
5532   test -n "$TEE" && break
5533 done
5534 
5535 
5536     if test "x$TEE" = x; then
5537         if test "xtee" = x; then
5538           PROG_NAME=tee
5539         else
5540           PROG_NAME=tee
5541         fi
5542         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5543 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5544         as_fn_error $? "Cannot continue" "$LINENO" 5
5545     fi
5546 
5547 
5548 
5549     for ac_prog in touch
5550 do
5551   # Extract the first word of "$ac_prog", so it can be a program name with args.
5552 set dummy $ac_prog; ac_word=$2
5553 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5554 $as_echo_n "checking for $ac_word... " >&6; }
5555 if ${ac_cv_path_TOUCH+:} false; then :
5556   $as_echo_n "(cached) " >&6
5557 else
5558   case $TOUCH in
5559   [\\/]* | ?:[\\/]*)
5560   ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
5561   ;;
5562   *)
5563   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5564 for as_dir in $PATH
5565 do
5566   IFS=$as_save_IFS
5567   test -z "$as_dir" && as_dir=.
5568     for ac_exec_ext in '' $ac_executable_extensions; do
5569   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5570     ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
5571     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5572     break 2
5573   fi
5574 done
5575   done
5576 IFS=$as_save_IFS
5577 
5578   ;;
5579 esac
5580 fi
5581 TOUCH=$ac_cv_path_TOUCH
5582 if test -n "$TOUCH"; then
5583   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
5584 $as_echo "$TOUCH" >&6; }
5585 else
5586   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5587 $as_echo "no" >&6; }
5588 fi
5589 
5590 
5591   test -n "$TOUCH" && break
5592 done
5593 
5594 
5595     if test "x$TOUCH" = x; then
5596         if test "xtouch" = x; then
5597           PROG_NAME=touch
5598         else
5599           PROG_NAME=touch
5600         fi
5601         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5602 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5603         as_fn_error $? "Cannot continue" "$LINENO" 5
5604     fi
5605 
5606 
5607 
5608     for ac_prog in tr
5609 do
5610   # Extract the first word of "$ac_prog", so it can be a program name with args.
5611 set dummy $ac_prog; ac_word=$2
5612 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5613 $as_echo_n "checking for $ac_word... " >&6; }
5614 if ${ac_cv_path_TR+:} false; then :
5615   $as_echo_n "(cached) " >&6
5616 else
5617   case $TR in
5618   [\\/]* | ?:[\\/]*)
5619   ac_cv_path_TR="$TR" # Let the user override the test with a path.
5620   ;;
5621   *)
5622   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5623 for as_dir in $PATH
5624 do
5625   IFS=$as_save_IFS
5626   test -z "$as_dir" && as_dir=.
5627     for ac_exec_ext in '' $ac_executable_extensions; do
5628   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5629     ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
5630     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5631     break 2
5632   fi
5633 done
5634   done
5635 IFS=$as_save_IFS
5636 
5637   ;;
5638 esac
5639 fi
5640 TR=$ac_cv_path_TR
5641 if test -n "$TR"; then
5642   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
5643 $as_echo "$TR" >&6; }
5644 else
5645   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5646 $as_echo "no" >&6; }
5647 fi
5648 
5649 
5650   test -n "$TR" && break
5651 done
5652 
5653 
5654     if test "x$TR" = x; then
5655         if test "xtr" = x; then
5656           PROG_NAME=tr
5657         else
5658           PROG_NAME=tr
5659         fi
5660         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5661 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5662         as_fn_error $? "Cannot continue" "$LINENO" 5
5663     fi
5664 
5665 
5666 
5667     for ac_prog in uname
5668 do
5669   # Extract the first word of "$ac_prog", so it can be a program name with args.
5670 set dummy $ac_prog; ac_word=$2
5671 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5672 $as_echo_n "checking for $ac_word... " >&6; }
5673 if ${ac_cv_path_UNAME+:} false; then :
5674   $as_echo_n "(cached) " >&6
5675 else
5676   case $UNAME in
5677   [\\/]* | ?:[\\/]*)
5678   ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
5679   ;;
5680   *)
5681   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5682 for as_dir in $PATH
5683 do
5684   IFS=$as_save_IFS
5685   test -z "$as_dir" && as_dir=.
5686     for ac_exec_ext in '' $ac_executable_extensions; do
5687   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5688     ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
5689     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5690     break 2
5691   fi
5692 done
5693   done
5694 IFS=$as_save_IFS
5695 
5696   ;;
5697 esac
5698 fi
5699 UNAME=$ac_cv_path_UNAME
5700 if test -n "$UNAME"; then
5701   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
5702 $as_echo "$UNAME" >&6; }
5703 else
5704   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5705 $as_echo "no" >&6; }
5706 fi
5707 
5708 
5709   test -n "$UNAME" && break
5710 done
5711 
5712 
5713     if test "x$UNAME" = x; then
5714         if test "xuname" = x; then
5715           PROG_NAME=uname
5716         else
5717           PROG_NAME=uname
5718         fi
5719         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5720 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5721         as_fn_error $? "Cannot continue" "$LINENO" 5
5722     fi
5723 
5724 
5725 
5726     for ac_prog in uniq
5727 do
5728   # Extract the first word of "$ac_prog", so it can be a program name with args.
5729 set dummy $ac_prog; ac_word=$2
5730 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5731 $as_echo_n "checking for $ac_word... " >&6; }
5732 if ${ac_cv_path_UNIQ+:} false; then :
5733   $as_echo_n "(cached) " >&6
5734 else
5735   case $UNIQ in
5736   [\\/]* | ?:[\\/]*)
5737   ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
5738   ;;
5739   *)
5740   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5741 for as_dir in $PATH
5742 do
5743   IFS=$as_save_IFS
5744   test -z "$as_dir" && as_dir=.
5745     for ac_exec_ext in '' $ac_executable_extensions; do
5746   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5747     ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
5748     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5749     break 2
5750   fi
5751 done
5752   done
5753 IFS=$as_save_IFS
5754 
5755   ;;
5756 esac
5757 fi
5758 UNIQ=$ac_cv_path_UNIQ
5759 if test -n "$UNIQ"; then
5760   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
5761 $as_echo "$UNIQ" >&6; }
5762 else
5763   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5764 $as_echo "no" >&6; }
5765 fi
5766 
5767 
5768   test -n "$UNIQ" && break
5769 done
5770 
5771 
5772     if test "x$UNIQ" = x; then
5773         if test "xuniq" = x; then
5774           PROG_NAME=uniq
5775         else
5776           PROG_NAME=uniq
5777         fi
5778         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5779 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5780         as_fn_error $? "Cannot continue" "$LINENO" 5
5781     fi
5782 
5783 
5784 
5785     for ac_prog in wc
5786 do
5787   # Extract the first word of "$ac_prog", so it can be a program name with args.
5788 set dummy $ac_prog; ac_word=$2
5789 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5790 $as_echo_n "checking for $ac_word... " >&6; }
5791 if ${ac_cv_path_WC+:} false; then :
5792   $as_echo_n "(cached) " >&6
5793 else
5794   case $WC in
5795   [\\/]* | ?:[\\/]*)
5796   ac_cv_path_WC="$WC" # Let the user override the test with a path.
5797   ;;
5798   *)
5799   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5800 for as_dir in $PATH
5801 do
5802   IFS=$as_save_IFS
5803   test -z "$as_dir" && as_dir=.
5804     for ac_exec_ext in '' $ac_executable_extensions; do
5805   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5806     ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
5807     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5808     break 2
5809   fi
5810 done
5811   done
5812 IFS=$as_save_IFS
5813 
5814   ;;
5815 esac
5816 fi
5817 WC=$ac_cv_path_WC
5818 if test -n "$WC"; then
5819   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
5820 $as_echo "$WC" >&6; }
5821 else
5822   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5823 $as_echo "no" >&6; }
5824 fi
5825 
5826 
5827   test -n "$WC" && break
5828 done
5829 
5830 
5831     if test "x$WC" = x; then
5832         if test "xwc" = x; then
5833           PROG_NAME=wc
5834         else
5835           PROG_NAME=wc
5836         fi
5837         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5838 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5839         as_fn_error $? "Cannot continue" "$LINENO" 5
5840     fi
5841 
5842 
5843 
5844     for ac_prog in which
5845 do
5846   # Extract the first word of "$ac_prog", so it can be a program name with args.
5847 set dummy $ac_prog; ac_word=$2
5848 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5849 $as_echo_n "checking for $ac_word... " >&6; }
5850 if ${ac_cv_path_WHICH+:} false; then :
5851   $as_echo_n "(cached) " >&6
5852 else
5853   case $WHICH in
5854   [\\/]* | ?:[\\/]*)
5855   ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
5856   ;;
5857   *)
5858   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5859 for as_dir in $PATH
5860 do
5861   IFS=$as_save_IFS
5862   test -z "$as_dir" && as_dir=.
5863     for ac_exec_ext in '' $ac_executable_extensions; do
5864   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5865     ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
5866     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5867     break 2
5868   fi
5869 done
5870   done
5871 IFS=$as_save_IFS
5872 
5873   ;;
5874 esac
5875 fi
5876 WHICH=$ac_cv_path_WHICH
5877 if test -n "$WHICH"; then
5878   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
5879 $as_echo "$WHICH" >&6; }
5880 else
5881   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5882 $as_echo "no" >&6; }
5883 fi
5884 
5885 
5886   test -n "$WHICH" && break
5887 done
5888 
5889 
5890     if test "x$WHICH" = x; then
5891         if test "xwhich" = x; then
5892           PROG_NAME=which
5893         else
5894           PROG_NAME=which
5895         fi
5896         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5897 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5898         as_fn_error $? "Cannot continue" "$LINENO" 5
5899     fi
5900 
5901 
5902 
5903     for ac_prog in xargs
5904 do
5905   # Extract the first word of "$ac_prog", so it can be a program name with args.
5906 set dummy $ac_prog; ac_word=$2
5907 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5908 $as_echo_n "checking for $ac_word... " >&6; }
5909 if ${ac_cv_path_XARGS+:} false; then :
5910   $as_echo_n "(cached) " >&6
5911 else
5912   case $XARGS in
5913   [\\/]* | ?:[\\/]*)
5914   ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
5915   ;;
5916   *)
5917   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5918 for as_dir in $PATH
5919 do
5920   IFS=$as_save_IFS
5921   test -z "$as_dir" && as_dir=.
5922     for ac_exec_ext in '' $ac_executable_extensions; do
5923   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5924     ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
5925     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5926     break 2
5927   fi
5928 done
5929   done
5930 IFS=$as_save_IFS
5931 
5932   ;;
5933 esac
5934 fi
5935 XARGS=$ac_cv_path_XARGS
5936 if test -n "$XARGS"; then
5937   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
5938 $as_echo "$XARGS" >&6; }
5939 else
5940   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5941 $as_echo "no" >&6; }
5942 fi
5943 
5944 
5945   test -n "$XARGS" && break
5946 done
5947 
5948 
5949     if test "x$XARGS" = x; then
5950         if test "xxargs" = x; then
5951           PROG_NAME=xargs
5952         else
5953           PROG_NAME=xargs
5954         fi
5955         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5956 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5957         as_fn_error $? "Cannot continue" "$LINENO" 5
5958     fi
5959 
5960 
5961 
5962 # Then required tools that require some special treatment.
5963 for ac_prog in gawk mawk nawk awk
5964 do
5965   # Extract the first word of "$ac_prog", so it can be a program name with args.
5966 set dummy $ac_prog; ac_word=$2
5967 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5968 $as_echo_n "checking for $ac_word... " >&6; }
5969 if ${ac_cv_prog_AWK+:} false; then :
5970   $as_echo_n "(cached) " >&6
5971 else
5972   if test -n "$AWK"; then
5973   ac_cv_prog_AWK="$AWK" # Let the user override the test.
5974 else
5975 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5976 for as_dir in $PATH
5977 do
5978   IFS=$as_save_IFS
5979   test -z "$as_dir" && as_dir=.
5980     for ac_exec_ext in '' $ac_executable_extensions; do
5981   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5982     ac_cv_prog_AWK="$ac_prog"
5983     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5984     break 2
5985   fi
5986 done
5987   done
5988 IFS=$as_save_IFS
5989 
5990 fi
5991 fi
5992 AWK=$ac_cv_prog_AWK
5993 if test -n "$AWK"; then
5994   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
5995 $as_echo "$AWK" >&6; }
5996 else
5997   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5998 $as_echo "no" >&6; }
5999 fi
6000 
6001 
6002   test -n "$AWK" && break
6003 done
6004 
6005 
6006     if test "x$AWK" = x; then
6007         if test "x" = x; then
6008           PROG_NAME=awk
6009         else
6010           PROG_NAME=
6011         fi
6012         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6013 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6014         as_fn_error $? "Cannot continue" "$LINENO" 5
6015     fi
6016 
6017 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
6018 $as_echo_n "checking for grep that handles long lines and -e... " >&6; }
6019 if ${ac_cv_path_GREP+:} false; then :
6020   $as_echo_n "(cached) " >&6
6021 else
6022   if test -z "$GREP"; then
6023   ac_path_GREP_found=false
6024   # Loop through the user's path and test for each of PROGNAME-LIST
6025   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6026 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
6027 do
6028   IFS=$as_save_IFS
6029   test -z "$as_dir" && as_dir=.
6030     for ac_prog in grep ggrep; do
6031     for ac_exec_ext in '' $ac_executable_extensions; do
6032       ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
6033       { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
6034 # Check for GNU ac_path_GREP and select it if it is found.
6035   # Check for GNU $ac_path_GREP
6036 case `"$ac_path_GREP" --version 2>&1` in
6037 *GNU*)
6038   ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
6039 *)
6040   ac_count=0
6041   $as_echo_n 0123456789 >"conftest.in"
6042   while :
6043   do
6044     cat "conftest.in" "conftest.in" >"conftest.tmp"
6045     mv "conftest.tmp" "conftest.in"
6046     cp "conftest.in" "conftest.nl"
6047     $as_echo 'GREP' >> "conftest.nl"
6048     "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
6049     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6050     as_fn_arith $ac_count + 1 && ac_count=$as_val
6051     if test $ac_count -gt ${ac_path_GREP_max-0}; then
6052       # Best one so far, save it but keep looking for a better one
6053       ac_cv_path_GREP="$ac_path_GREP"
6054       ac_path_GREP_max=$ac_count
6055     fi
6056     # 10*(2^10) chars as input seems more than enough
6057     test $ac_count -gt 10 && break
6058   done
6059   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6060 esac
6061 
6062       $ac_path_GREP_found && break 3
6063     done
6064   done
6065   done
6066 IFS=$as_save_IFS
6067   if test -z "$ac_cv_path_GREP"; then
6068     as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
6069   fi
6070 else
6071   ac_cv_path_GREP=$GREP
6072 fi
6073 
6074 fi
6075 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
6076 $as_echo "$ac_cv_path_GREP" >&6; }
6077  GREP="$ac_cv_path_GREP"
6078 
6079 
6080 
6081     if test "x$GREP" = x; then
6082         if test "x" = x; then
6083           PROG_NAME=grep
6084         else
6085           PROG_NAME=
6086         fi
6087         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6088 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6089         as_fn_error $? "Cannot continue" "$LINENO" 5
6090     fi
6091 
6092 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
6093 $as_echo_n "checking for egrep... " >&6; }
6094 if ${ac_cv_path_EGREP+:} false; then :
6095   $as_echo_n "(cached) " >&6
6096 else
6097   if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
6098    then ac_cv_path_EGREP="$GREP -E"
6099    else
6100      if test -z "$EGREP"; then
6101   ac_path_EGREP_found=false
6102   # Loop through the user's path and test for each of PROGNAME-LIST
6103   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6104 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
6105 do
6106   IFS=$as_save_IFS
6107   test -z "$as_dir" && as_dir=.
6108     for ac_prog in egrep; do
6109     for ac_exec_ext in '' $ac_executable_extensions; do
6110       ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
6111       { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
6112 # Check for GNU ac_path_EGREP and select it if it is found.
6113   # Check for GNU $ac_path_EGREP
6114 case `"$ac_path_EGREP" --version 2>&1` in
6115 *GNU*)
6116   ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
6117 *)
6118   ac_count=0
6119   $as_echo_n 0123456789 >"conftest.in"
6120   while :
6121   do
6122     cat "conftest.in" "conftest.in" >"conftest.tmp"
6123     mv "conftest.tmp" "conftest.in"
6124     cp "conftest.in" "conftest.nl"
6125     $as_echo 'EGREP' >> "conftest.nl"
6126     "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
6127     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6128     as_fn_arith $ac_count + 1 && ac_count=$as_val
6129     if test $ac_count -gt ${ac_path_EGREP_max-0}; then
6130       # Best one so far, save it but keep looking for a better one
6131       ac_cv_path_EGREP="$ac_path_EGREP"
6132       ac_path_EGREP_max=$ac_count
6133     fi
6134     # 10*(2^10) chars as input seems more than enough
6135     test $ac_count -gt 10 && break
6136   done
6137   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6138 esac
6139 
6140       $ac_path_EGREP_found && break 3
6141     done
6142   done
6143   done
6144 IFS=$as_save_IFS
6145   if test -z "$ac_cv_path_EGREP"; then
6146     as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
6147   fi
6148 else
6149   ac_cv_path_EGREP=$EGREP
6150 fi
6151 
6152    fi
6153 fi
6154 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
6155 $as_echo "$ac_cv_path_EGREP" >&6; }
6156  EGREP="$ac_cv_path_EGREP"
6157 
6158 
6159 
6160     if test "x$EGREP" = x; then
6161         if test "x" = x; then
6162           PROG_NAME=egrep
6163         else
6164           PROG_NAME=
6165         fi
6166         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6167 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6168         as_fn_error $? "Cannot continue" "$LINENO" 5
6169     fi
6170 
6171 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
6172 $as_echo_n "checking for fgrep... " >&6; }
6173 if ${ac_cv_path_FGREP+:} false; then :
6174   $as_echo_n "(cached) " >&6
6175 else
6176   if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
6177    then ac_cv_path_FGREP="$GREP -F"
6178    else
6179      if test -z "$FGREP"; then
6180   ac_path_FGREP_found=false
6181   # Loop through the user's path and test for each of PROGNAME-LIST
6182   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6183 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
6184 do
6185   IFS=$as_save_IFS
6186   test -z "$as_dir" && as_dir=.
6187     for ac_prog in fgrep; do
6188     for ac_exec_ext in '' $ac_executable_extensions; do
6189       ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
6190       { test -f "$ac_path_FGREP" && $as_test_x "$ac_path_FGREP"; } || continue
6191 # Check for GNU ac_path_FGREP and select it if it is found.
6192   # Check for GNU $ac_path_FGREP
6193 case `"$ac_path_FGREP" --version 2>&1` in
6194 *GNU*)
6195   ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
6196 *)
6197   ac_count=0
6198   $as_echo_n 0123456789 >"conftest.in"
6199   while :
6200   do
6201     cat "conftest.in" "conftest.in" >"conftest.tmp"
6202     mv "conftest.tmp" "conftest.in"
6203     cp "conftest.in" "conftest.nl"
6204     $as_echo 'FGREP' >> "conftest.nl"
6205     "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
6206     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6207     as_fn_arith $ac_count + 1 && ac_count=$as_val
6208     if test $ac_count -gt ${ac_path_FGREP_max-0}; then
6209       # Best one so far, save it but keep looking for a better one
6210       ac_cv_path_FGREP="$ac_path_FGREP"
6211       ac_path_FGREP_max=$ac_count
6212     fi
6213     # 10*(2^10) chars as input seems more than enough
6214     test $ac_count -gt 10 && break
6215   done
6216   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6217 esac
6218 
6219       $ac_path_FGREP_found && break 3
6220     done
6221   done
6222   done
6223 IFS=$as_save_IFS
6224   if test -z "$ac_cv_path_FGREP"; then
6225     as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
6226   fi
6227 else
6228   ac_cv_path_FGREP=$FGREP
6229 fi
6230 
6231    fi
6232 fi
6233 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
6234 $as_echo "$ac_cv_path_FGREP" >&6; }
6235  FGREP="$ac_cv_path_FGREP"
6236 
6237 
6238 
6239     if test "x$FGREP" = x; then
6240         if test "x" = x; then
6241           PROG_NAME=fgrep
6242         else
6243           PROG_NAME=
6244         fi
6245         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6246 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6247         as_fn_error $? "Cannot continue" "$LINENO" 5
6248     fi
6249 
6250 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
6251 $as_echo_n "checking for a sed that does not truncate output... " >&6; }
6252 if ${ac_cv_path_SED+:} false; then :
6253   $as_echo_n "(cached) " >&6
6254 else
6255             ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
6256      for ac_i in 1 2 3 4 5 6 7; do
6257        ac_script="$ac_script$as_nl$ac_script"
6258      done
6259      echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
6260      { ac_script=; unset ac_script;}
6261      if test -z "$SED"; then
6262   ac_path_SED_found=false
6263   # Loop through the user's path and test for each of PROGNAME-LIST
6264   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6265 for as_dir in $PATH
6266 do
6267   IFS=$as_save_IFS
6268   test -z "$as_dir" && as_dir=.
6269     for ac_prog in sed gsed; do
6270     for ac_exec_ext in '' $ac_executable_extensions; do
6271       ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
6272       { test -f "$ac_path_SED" && $as_test_x "$ac_path_SED"; } || continue
6273 # Check for GNU ac_path_SED and select it if it is found.
6274   # Check for GNU $ac_path_SED
6275 case `"$ac_path_SED" --version 2>&1` in
6276 *GNU*)
6277   ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
6278 *)
6279   ac_count=0
6280   $as_echo_n 0123456789 >"conftest.in"
6281   while :
6282   do
6283     cat "conftest.in" "conftest.in" >"conftest.tmp"
6284     mv "conftest.tmp" "conftest.in"
6285     cp "conftest.in" "conftest.nl"
6286     $as_echo '' >> "conftest.nl"
6287     "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
6288     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6289     as_fn_arith $ac_count + 1 && ac_count=$as_val
6290     if test $ac_count -gt ${ac_path_SED_max-0}; then
6291       # Best one so far, save it but keep looking for a better one
6292       ac_cv_path_SED="$ac_path_SED"
6293       ac_path_SED_max=$ac_count
6294     fi
6295     # 10*(2^10) chars as input seems more than enough
6296     test $ac_count -gt 10 && break
6297   done
6298   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6299 esac
6300 
6301       $ac_path_SED_found && break 3
6302     done
6303   done
6304   done
6305 IFS=$as_save_IFS
6306   if test -z "$ac_cv_path_SED"; then
6307     as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
6308   fi
6309 else
6310   ac_cv_path_SED=$SED
6311 fi
6312 
6313 fi
6314 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
6315 $as_echo "$ac_cv_path_SED" >&6; }
6316  SED="$ac_cv_path_SED"
6317   rm -f conftest.sed
6318 
6319 
6320     if test "x$SED" = x; then
6321         if test "x" = x; then
6322           PROG_NAME=sed
6323         else
6324           PROG_NAME=
6325         fi
6326         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6327 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6328         as_fn_error $? "Cannot continue" "$LINENO" 5
6329     fi
6330 
6331 
6332 for ac_prog in nawk gawk awk
6333 do
6334   # Extract the first word of "$ac_prog", so it can be a program name with args.
6335 set dummy $ac_prog; ac_word=$2
6336 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6337 $as_echo_n "checking for $ac_word... " >&6; }
6338 if ${ac_cv_path_NAWK+:} false; then :
6339   $as_echo_n "(cached) " >&6
6340 else
6341   case $NAWK in
6342   [\\/]* | ?:[\\/]*)
6343   ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
6344   ;;
6345   *)
6346   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6347 for as_dir in $PATH
6348 do
6349   IFS=$as_save_IFS
6350   test -z "$as_dir" && as_dir=.
6351     for ac_exec_ext in '' $ac_executable_extensions; do
6352   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6353     ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
6354     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6355     break 2
6356   fi
6357 done
6358   done
6359 IFS=$as_save_IFS
6360 
6361   ;;
6362 esac
6363 fi
6364 NAWK=$ac_cv_path_NAWK
6365 if test -n "$NAWK"; then
6366   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
6367 $as_echo "$NAWK" >&6; }
6368 else
6369   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6370 $as_echo "no" >&6; }
6371 fi
6372 
6373 
6374   test -n "$NAWK" && break
6375 done
6376 
6377 
6378     if test "x$NAWK" = x; then
6379         if test "x" = x; then
6380           PROG_NAME=nawk
6381         else
6382           PROG_NAME=
6383         fi
6384         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6385 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6386         as_fn_error $? "Cannot continue" "$LINENO" 5
6387     fi
6388 
6389 
6390 # Always force rm.
6391 RM="$RM -f"
6392 
6393 # pwd behaves differently on various platforms and some don't support the -L flag.
6394 # Always use the bash builtin pwd to get uniform behavior.
6395 THEPWDCMD=pwd
6396 
6397 # These are not required on all platforms
6398 # Extract the first word of "cygpath", so it can be a program name with args.
6399 set dummy cygpath; ac_word=$2
6400 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6401 $as_echo_n "checking for $ac_word... " >&6; }
6402 if ${ac_cv_path_CYGPATH+:} false; then :
6403   $as_echo_n "(cached) " >&6
6404 else
6405   case $CYGPATH in
6406   [\\/]* | ?:[\\/]*)
6407   ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
6408   ;;
6409   *)
6410   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6411 for as_dir in $PATH
6412 do
6413   IFS=$as_save_IFS
6414   test -z "$as_dir" && as_dir=.
6415     for ac_exec_ext in '' $ac_executable_extensions; do
6416   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6417     ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
6418     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6419     break 2
6420   fi
6421 done
6422   done
6423 IFS=$as_save_IFS
6424 
6425   ;;
6426 esac
6427 fi
6428 CYGPATH=$ac_cv_path_CYGPATH
6429 if test -n "$CYGPATH"; then
6430   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
6431 $as_echo "$CYGPATH" >&6; }
6432 else
6433   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6434 $as_echo "no" >&6; }
6435 fi
6436 
6437 
6438 # Extract the first word of "readlink", so it can be a program name with args.
6439 set dummy readlink; ac_word=$2
6440 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6441 $as_echo_n "checking for $ac_word... " >&6; }
6442 if ${ac_cv_path_READLINK+:} false; then :
6443   $as_echo_n "(cached) " >&6
6444 else
6445   case $READLINK in
6446   [\\/]* | ?:[\\/]*)
6447   ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
6448   ;;
6449   *)
6450   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6451 for as_dir in $PATH
6452 do
6453   IFS=$as_save_IFS
6454   test -z "$as_dir" && as_dir=.
6455     for ac_exec_ext in '' $ac_executable_extensions; do
6456   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6457     ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
6458     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6459     break 2
6460   fi
6461 done
6462   done
6463 IFS=$as_save_IFS
6464 
6465   ;;
6466 esac
6467 fi
6468 READLINK=$ac_cv_path_READLINK
6469 if test -n "$READLINK"; then
6470   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
6471 $as_echo "$READLINK" >&6; }
6472 else
6473   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6474 $as_echo "no" >&6; }
6475 fi
6476 
6477 
6478 # Extract the first word of "df", so it can be a program name with args.
6479 set dummy df; ac_word=$2
6480 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6481 $as_echo_n "checking for $ac_word... " >&6; }
6482 if ${ac_cv_path_DF+:} false; then :
6483   $as_echo_n "(cached) " >&6
6484 else
6485   case $DF in
6486   [\\/]* | ?:[\\/]*)
6487   ac_cv_path_DF="$DF" # Let the user override the test with a path.
6488   ;;
6489   *)
6490   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6491 for as_dir in $PATH
6492 do
6493   IFS=$as_save_IFS
6494   test -z "$as_dir" && as_dir=.
6495     for ac_exec_ext in '' $ac_executable_extensions; do
6496   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6497     ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
6498     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6499     break 2
6500   fi
6501 done
6502   done
6503 IFS=$as_save_IFS
6504 
6505   ;;
6506 esac
6507 fi
6508 DF=$ac_cv_path_DF
6509 if test -n "$DF"; then
6510   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
6511 $as_echo "$DF" >&6; }
6512 else
6513   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6514 $as_echo "no" >&6; }
6515 fi
6516 
6517 
6518 # Extract the first word of "SetFile", so it can be a program name with args.
6519 set dummy SetFile; ac_word=$2
6520 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6521 $as_echo_n "checking for $ac_word... " >&6; }
6522 if ${ac_cv_path_SETFILE+:} false; then :
6523   $as_echo_n "(cached) " >&6
6524 else
6525   case $SETFILE in
6526   [\\/]* | ?:[\\/]*)
6527   ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
6528   ;;
6529   *)
6530   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6531 for as_dir in $PATH
6532 do
6533   IFS=$as_save_IFS
6534   test -z "$as_dir" && as_dir=.
6535     for ac_exec_ext in '' $ac_executable_extensions; do
6536   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6537     ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
6538     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6539     break 2
6540   fi
6541 done
6542   done
6543 IFS=$as_save_IFS
6544 
6545   ;;
6546 esac
6547 fi
6548 SETFILE=$ac_cv_path_SETFILE
6549 if test -n "$SETFILE"; then
6550   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
6551 $as_echo "$SETFILE" >&6; }
6552 else
6553   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6554 $as_echo "no" >&6; }
6555 fi
6556 
6557 
6558 
6559 
6560 # Now we can determine OpenJDK build and target platforms. This is required to
6561 # have early on.
6562 # Make sure we can run config.sub.
6563 $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
6564   as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
6565 
6566 { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
6567 $as_echo_n "checking build system type... " >&6; }
6568 if ${ac_cv_build+:} false; then :
6569   $as_echo_n "(cached) " >&6
6570 else
6571   ac_build_alias=$build_alias
6572 test "x$ac_build_alias" = x &&
6573   ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
6574 test "x$ac_build_alias" = x &&
6575   as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
6576 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
6577   as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
6578 
6579 fi
6580 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
6581 $as_echo "$ac_cv_build" >&6; }
6582 case $ac_cv_build in
6583 *-*-*) ;;
6584 *) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
6585 esac
6586 build=$ac_cv_build
6587 ac_save_IFS=$IFS; IFS='-'
6588 set x $ac_cv_build
6589 shift
6590 build_cpu=$1
6591 build_vendor=$2
6592 shift; shift
6593 # Remember, the first character of IFS is used to create $*,
6594 # except with old shells:
6595 build_os=$*
6596 IFS=$ac_save_IFS
6597 case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
6598 
6599 
6600 { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
6601 $as_echo_n "checking host system type... " >&6; }
6602 if ${ac_cv_host+:} false; then :
6603   $as_echo_n "(cached) " >&6
6604 else
6605   if test "x$host_alias" = x; then
6606   ac_cv_host=$ac_cv_build
6607 else
6608   ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
6609     as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
6610 fi
6611 
6612 fi
6613 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
6614 $as_echo "$ac_cv_host" >&6; }
6615 case $ac_cv_host in
6616 *-*-*) ;;
6617 *) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
6618 esac
6619 host=$ac_cv_host
6620 ac_save_IFS=$IFS; IFS='-'
6621 set x $ac_cv_host
6622 shift
6623 host_cpu=$1
6624 host_vendor=$2
6625 shift; shift
6626 # Remember, the first character of IFS is used to create $*,
6627 # except with old shells:
6628 host_os=$*
6629 IFS=$ac_save_IFS
6630 case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
6631 
6632 
6633 { $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
6634 $as_echo_n "checking target system type... " >&6; }
6635 if ${ac_cv_target+:} false; then :
6636   $as_echo_n "(cached) " >&6
6637 else
6638   if test "x$target_alias" = x; then
6639   ac_cv_target=$ac_cv_host
6640 else
6641   ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
6642     as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
6643 fi
6644 
6645 fi
6646 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
6647 $as_echo "$ac_cv_target" >&6; }
6648 case $ac_cv_target in
6649 *-*-*) ;;
6650 *) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
6651 esac
6652 target=$ac_cv_target
6653 ac_save_IFS=$IFS; IFS='-'
6654 set x $ac_cv_target
6655 shift
6656 target_cpu=$1
6657 target_vendor=$2
6658 shift; shift
6659 # Remember, the first character of IFS is used to create $*,
6660 # except with old shells:
6661 target_os=$*
6662 IFS=$ac_save_IFS
6663 case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
6664 
6665 
6666 # The aliases save the names the user supplied, while $host etc.
6667 # will get canonicalized.
6668 test -n "$target_alias" &&
6669   test "$program_prefix$program_suffix$program_transform_name" = \
6670     NONENONEs,x,x, &&
6671   program_prefix=${target_alias}-
6672 
6673 # Figure out the build and target systems. # Note that in autoconf terminology, "build" is obvious, but "target"
6674 # is confusing; it assumes you are cross-compiling a cross-compiler (!)  and "target" is thus the target of the
6675 # product you're building. The target of this build is called "host". Since this is confusing to most people, we
6676 # have not adopted that system, but use "target" as the platform we are building for. In some places though we need
6677 # to use the configure naming style.
6678 
6679 
6680 
6681 
6682 
6683     # Copy the autoconf trip/quadruplet verbatim to OPENJDK_TARGET_AUTOCONF_NAME
6684     # (from the autoconf "host") and OPENJDK_BUILD_AUTOCONF_NAME
6685     # Note that we might later on rewrite e.g. OPENJDK_TARGET_CPU due to reduced build,
6686     # but this will not change the value of OPENJDK_TARGET_AUTOCONF_NAME.
6687     OPENJDK_TARGET_AUTOCONF_NAME="$host"
6688     OPENJDK_BUILD_AUTOCONF_NAME="$build"
6689 
6690 
6691 
6692     # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
6693 
6694   case "$build_os" in
6695     *linux*)
6696       VAR_OS=linux
6697       VAR_OS_API=posix
6698       VAR_OS_ENV=linux
6699       ;;
6700     *solaris*)
6701       VAR_OS=solaris
6702       VAR_OS_API=posix
6703       VAR_OS_ENV=solaris
6704       ;;
6705     *darwin*)
6706       VAR_OS=macosx
6707       VAR_OS_API=posix
6708       VAR_OS_ENV=macosx
6709       ;;
6710     *bsd*)
6711       VAR_OS=bsd
6712       VAR_OS_API=posix
6713       VAR_OS_ENV=bsd
6714       ;;
6715     *cygwin*)
6716       VAR_OS=windows
6717       VAR_OS_API=winapi
6718       VAR_OS_ENV=windows.cygwin
6719       ;;
6720     *mingw*)
6721       VAR_OS=windows
6722       VAR_OS_API=winapi
6723       VAR_OS_ENV=windows.msys
6724       ;;
6725     *)
6726       as_fn_error $? "unsupported operating system $build_os" "$LINENO" 5
6727       ;;
6728   esac
6729 
6730 
6731   # First argument is the cpu name from the trip/quad
6732   case "$build_cpu" in
6733     x86_64)
6734       VAR_CPU=x86_64
6735       VAR_CPU_ARCH=x86
6736       VAR_CPU_BITS=64
6737       VAR_CPU_ENDIAN=little
6738       ;;
6739     i?86)
6740       VAR_CPU=x86
6741       VAR_CPU_ARCH=x86
6742       VAR_CPU_BITS=32
6743       VAR_CPU_ENDIAN=little
6744       ;;
6745     arm*)
6746       VAR_CPU=arm
6747       VAR_CPU_ARCH=arm
6748       VAR_CPU_BITS=32
6749       VAR_CPU_ENDIAN=little
6750       ;;
6751     powerpc)
6752       VAR_CPU=ppc
6753       VAR_CPU_ARCH=ppc
6754       VAR_CPU_BITS=32
6755       VAR_CPU_ENDIAN=big
6756        ;;
6757     powerpc64)
6758       VAR_CPU=ppc64
6759       VAR_CPU_ARCH=ppc
6760       VAR_CPU_BITS=64
6761       VAR_CPU_ENDIAN=big
6762        ;;
6763     sparc)
6764       VAR_CPU=sparc
6765       VAR_CPU_ARCH=sparc
6766       VAR_CPU_BITS=32
6767       VAR_CPU_ENDIAN=big
6768        ;;
6769     sparcv9)
6770       VAR_CPU=sparcv9
6771       VAR_CPU_ARCH=sparc
6772       VAR_CPU_BITS=64
6773       VAR_CPU_ENDIAN=big
6774        ;;
6775     *)
6776       as_fn_error $? "unsupported cpu $build_cpu" "$LINENO" 5
6777       ;;
6778   esac
6779 
6780     # ..and setup our own variables. (Do this explicitely to facilitate searching)
6781     OPENJDK_BUILD_OS="$VAR_OS"
6782     OPENJDK_BUILD_OS_API="$VAR_OS_API"
6783     OPENJDK_BUILD_OS_ENV="$VAR_OS_ENV"
6784     OPENJDK_BUILD_CPU="$VAR_CPU"
6785     OPENJDK_BUILD_CPU_ARCH="$VAR_CPU_ARCH"
6786     OPENJDK_BUILD_CPU_BITS="$VAR_CPU_BITS"
6787     OPENJDK_BUILD_CPU_ENDIAN="$VAR_CPU_ENDIAN"
6788 
6789 
6790 
6791 
6792 
6793 
6794 
6795     { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-build os-cpu" >&5
6796 $as_echo_n "checking openjdk-build os-cpu... " >&6; }
6797     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&5
6798 $as_echo "$OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&6; }
6799 
6800     # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
6801 
6802   case "$host_os" in
6803     *linux*)
6804       VAR_OS=linux
6805       VAR_OS_API=posix
6806       VAR_OS_ENV=linux
6807       ;;
6808     *solaris*)
6809       VAR_OS=solaris
6810       VAR_OS_API=posix
6811       VAR_OS_ENV=solaris
6812       ;;
6813     *darwin*)
6814       VAR_OS=macosx
6815       VAR_OS_API=posix
6816       VAR_OS_ENV=macosx
6817       ;;
6818     *bsd*)
6819       VAR_OS=bsd
6820       VAR_OS_API=posix
6821       VAR_OS_ENV=bsd
6822       ;;
6823     *cygwin*)
6824       VAR_OS=windows
6825       VAR_OS_API=winapi
6826       VAR_OS_ENV=windows.cygwin
6827       ;;
6828     *mingw*)
6829       VAR_OS=windows
6830       VAR_OS_API=winapi
6831       VAR_OS_ENV=windows.msys
6832       ;;
6833     *)
6834       as_fn_error $? "unsupported operating system $host_os" "$LINENO" 5
6835       ;;
6836   esac
6837 
6838 
6839   # First argument is the cpu name from the trip/quad
6840   case "$host_cpu" in
6841     x86_64)
6842       VAR_CPU=x86_64
6843       VAR_CPU_ARCH=x86
6844       VAR_CPU_BITS=64
6845       VAR_CPU_ENDIAN=little
6846       ;;
6847     i?86)
6848       VAR_CPU=x86
6849       VAR_CPU_ARCH=x86
6850       VAR_CPU_BITS=32
6851       VAR_CPU_ENDIAN=little
6852       ;;
6853     arm*)
6854       VAR_CPU=arm
6855       VAR_CPU_ARCH=arm
6856       VAR_CPU_BITS=32
6857       VAR_CPU_ENDIAN=little
6858       ;;
6859     powerpc)
6860       VAR_CPU=ppc
6861       VAR_CPU_ARCH=ppc
6862       VAR_CPU_BITS=32
6863       VAR_CPU_ENDIAN=big
6864        ;;
6865     powerpc64)
6866       VAR_CPU=ppc64
6867       VAR_CPU_ARCH=ppc
6868       VAR_CPU_BITS=64
6869       VAR_CPU_ENDIAN=big
6870        ;;
6871     sparc)
6872       VAR_CPU=sparc
6873       VAR_CPU_ARCH=sparc
6874       VAR_CPU_BITS=32
6875       VAR_CPU_ENDIAN=big
6876        ;;
6877     sparcv9)
6878       VAR_CPU=sparcv9
6879       VAR_CPU_ARCH=sparc
6880       VAR_CPU_BITS=64
6881       VAR_CPU_ENDIAN=big
6882        ;;
6883     *)
6884       as_fn_error $? "unsupported cpu $host_cpu" "$LINENO" 5
6885       ;;
6886   esac
6887 
6888     # ... and setup our own variables. (Do this explicitely to facilitate searching)
6889     OPENJDK_TARGET_OS="$VAR_OS"
6890     OPENJDK_TARGET_OS_API="$VAR_OS_API"
6891     OPENJDK_TARGET_OS_ENV="$VAR_OS_ENV"
6892     OPENJDK_TARGET_CPU="$VAR_CPU"
6893     OPENJDK_TARGET_CPU_ARCH="$VAR_CPU_ARCH"
6894     OPENJDK_TARGET_CPU_BITS="$VAR_CPU_BITS"
6895     OPENJDK_TARGET_CPU_ENDIAN="$VAR_CPU_ENDIAN"
6896 
6897 
6898 
6899 
6900 
6901 
6902 
6903     { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-target os-cpu" >&5
6904 $as_echo_n "checking openjdk-target os-cpu... " >&6; }
6905     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&5
6906 $as_echo "$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&6; }
6907 
6908 
6909 
6910 # Check whether --with-target-bits was given.
6911 if test "${with_target_bits+set}" = set; then :
6912   withval=$with_target_bits;
6913 fi
6914 
6915 
6916   # We have three types of compiles:
6917   # native  == normal compilation, target system == build system
6918   # cross   == traditional cross compilation, target system != build system; special toolchain needed
6919   # reduced == using native compilers, but with special flags (e.g. -m32) to produce 32-bit builds on 64-bit machines
6920   #
6921   if test "x$OPENJDK_BUILD_AUTOCONF_NAME" != "x$OPENJDK_TARGET_AUTOCONF_NAME"; then
6922     # We're doing a proper cross-compilation
6923     COMPILE_TYPE="cross"
6924   else
6925     COMPILE_TYPE="native"
6926   fi
6927 
6928   if test "x$with_target_bits" != x; then
6929     if test "x$COMPILE_TYPE" = "xcross"; then
6930       as_fn_error $? "It is not possible to combine --with-target-bits=X and proper cross-compilation. Choose either." "$LINENO" 5
6931     fi
6932 
6933     if test "x$with_target_bits" = x32 && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
6934       # A reduced build is requested
6935       COMPILE_TYPE="reduced"
6936       OPENJDK_TARGET_CPU_BITS=32
6937       if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
6938         OPENJDK_TARGET_CPU=x86
6939       elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
6940         OPENJDK_TARGET_CPU=sparc
6941       else
6942         as_fn_error $? "Reduced build (--with-target-bits=32) is only supported on x86_64 and sparcv9" "$LINENO" 5
6943       fi
6944     elif test "x$with_target_bits" = x64 && test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
6945       as_fn_error $? "It is not possible to use --with-target-bits=64 on a 32 bit system. Use proper cross-compilation instead." "$LINENO" 5
6946     elif test "x$with_target_bits" = "x$OPENJDK_TARGET_CPU_BITS"; then
6947       { $as_echo "$as_me:${as_lineno-$LINENO}: --with-target-bits are set to build platform address size; argument has no meaning" >&5
6948 $as_echo "$as_me: --with-target-bits are set to build platform address size; argument has no meaning" >&6;}
6949     else
6950       as_fn_error $? "--with-target-bits can only be 32 or 64, you specified $with_target_bits!" "$LINENO" 5
6951     fi
6952   fi
6953 
6954 
6955 { $as_echo "$as_me:${as_lineno-$LINENO}: checking compilation type" >&5
6956 $as_echo_n "checking compilation type... " >&6; }
6957 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMPILE_TYPE" >&5
6958 $as_echo "$COMPILE_TYPE" >&6; }
6959 
6960 
6961     if test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
6962        REQUIRED_OS_NAME=SunOS
6963        REQUIRED_OS_VERSION=5.10
6964     fi
6965     if test "x$OPENJDK_TARGET_OS" = "xlinux"; then
6966        REQUIRED_OS_NAME=Linux
6967        REQUIRED_OS_VERSION=2.6
6968     fi
6969     if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
6970         REQUIRED_OS_NAME=Windows
6971         if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
6972             REQUIRED_OS_VERSION=5.2
6973         else
6974             REQUIRED_OS_VERSION=5.1
6975         fi
6976     fi
6977     if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
6978         REQUIRED_OS_NAME=Darwin
6979         REQUIRED_OS_VERSION=11.2
6980     fi
6981 
6982 
6983 
6984 
6985 
6986     # Also store the legacy naming of the cpu.
6987     # Ie i586 and amd64 instead of x86 and x86_64
6988     OPENJDK_TARGET_CPU_LEGACY="$OPENJDK_TARGET_CPU"
6989     if test "x$OPENJDK_TARGET_CPU" = xx86; then
6990       OPENJDK_TARGET_CPU_LEGACY="i586"
6991     elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
6992       # On all platforms except MacOSX replace x86_64 with amd64.
6993       OPENJDK_TARGET_CPU_LEGACY="amd64"
6994     fi
6995 
6996 
6997     # And the second legacy naming of the cpu.
6998     # Ie i386 and amd64 instead of x86 and x86_64.
6999     OPENJDK_TARGET_CPU_LEGACY_LIB="$OPENJDK_TARGET_CPU"
7000     if test "x$OPENJDK_TARGET_CPU" = xx86; then
7001       OPENJDK_TARGET_CPU_LEGACY_LIB="i386"
7002     elif test "x$OPENJDK_TARGET_CPU" = xx86_64; then
7003       OPENJDK_TARGET_CPU_LEGACY_LIB="amd64"
7004     fi
7005 
7006 
7007     # This is the name of the cpu (but using i386 and amd64 instead of
7008     # x86 and x86_64, respectively), preceeded by a /, to be used when
7009     # locating libraries. On macosx, it's empty, though.
7010     OPENJDK_TARGET_CPU_LIBDIR="/$OPENJDK_TARGET_CPU_LEGACY_LIB"
7011     if test "x$OPENJDK_TARGET_OS" = xmacosx; then
7012         OPENJDK_TARGET_CPU_LIBDIR=""
7013     fi
7014 
7015 
7016     # OPENJDK_TARGET_CPU_ISADIR is normally empty. On 64-bit Solaris systems, it is set to
7017     # /amd64 or /sparcv9. This string is appended to some library paths, like this:
7018     # /usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libexample.so
7019     OPENJDK_TARGET_CPU_ISADIR=""
7020     if test "x$OPENJDK_TARGET_OS" = xsolaris; then
7021       if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
7022           OPENJDK_TARGET_CPU_ISADIR="/amd64"
7023       elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
7024           OPENJDK_TARGET_CPU_ISADIR="/sparcv9"
7025       fi
7026     fi
7027 
7028 
7029     # Setup OPENJDK_TARGET_CPU_OSARCH, which is used to set the os.arch Java system property
7030     OPENJDK_TARGET_CPU_OSARCH="$OPENJDK_TARGET_CPU"
7031     if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$OPENJDK_TARGET_CPU" = xx86; then
7032       # On linux only, we replace x86 with i386.
7033       OPENJDK_TARGET_CPU_OSARCH="i386"
7034     elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
7035       # On all platforms except macosx, we replace x86_64 with amd64.
7036       OPENJDK_TARGET_CPU_OSARCH="amd64"
7037     fi
7038 
7039 
7040     OPENJDK_TARGET_CPU_JLI="$OPENJDK_TARGET_CPU"
7041     if test "x$OPENJDK_TARGET_CPU" = xx86; then
7042       OPENJDK_TARGET_CPU_JLI="i386"
7043     elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
7044       # On all platforms except macosx, we replace x86_64 with amd64.
7045       OPENJDK_TARGET_CPU_JLI="amd64"
7046     fi
7047     # Now setup the -D flags for building libjli.
7048     OPENJDK_TARGET_CPU_JLI_CFLAGS="-DLIBARCHNAME='\"$OPENJDK_TARGET_CPU_JLI\"'"
7049     if test "x$OPENJDK_TARGET_OS" = xsolaris; then
7050       if test "x$OPENJDK_TARGET_CPU_ARCH" = xsparc; then
7051         OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"sparc\"' -DLIBARCH64NAME='\"sparcv9\"'"
7052       elif test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
7053         OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"i386\"' -DLIBARCH64NAME='\"amd64\"'"
7054       fi
7055     fi
7056 
7057 
7058     # Setup OPENJDK_TARGET_OS_API_DIR, used in source paths.
7059     if test "x$OPENJDK_TARGET_OS_API" = xposix; then
7060         OPENJDK_TARGET_OS_API_DIR="solaris"
7061     fi
7062     if test "x$OPENJDK_TARGET_OS_API" = xwinapi; then
7063         OPENJDK_TARGET_OS_API_DIR="windows"
7064     fi
7065 
7066 
7067     if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
7068         A_LP64="LP64:="
7069         # -D_LP64=1 is only set on linux and mac. Setting on windows causes diff in
7070         # unpack200.exe
7071         if test "x$OPENJDK_TARGET_OS" = xlinux || test "x$OPENJDK_TARGET_OS" = xmacosx; then
7072             ADD_LP64="-D_LP64=1"
7073         fi
7074     fi
7075     LP64=$A_LP64
7076 
7077 
7078     if test "x$COMPILE_TYPE" = "xcross"; then
7079       # FIXME: ... or should this include reduced builds..?
7080       DEFINE_CROSS_COMPILE_ARCH="CROSS_COMPILE_ARCH:=$OPENJDK_TARGET_CPU_LEGACY"
7081     else
7082       DEFINE_CROSS_COMPILE_ARCH=""
7083     fi
7084 
7085 
7086     # ZERO_ARCHDEF is used to enable architecture-specific code
7087     case "${OPENJDK_TARGET_CPU}" in
7088       ppc*)    ZERO_ARCHDEF=PPC   ;;
7089       s390*)   ZERO_ARCHDEF=S390  ;;
7090       sparc*)  ZERO_ARCHDEF=SPARC ;;
7091       x86_64*) ZERO_ARCHDEF=AMD64 ;;
7092       x86)     ZERO_ARCHDEF=IA32  ;;
7093       *)      ZERO_ARCHDEF=$(echo "${OPENJDK_TARGET_CPU_LEGACY_LIB}" | tr a-z A-Z)
7094     esac
7095 
7096 
7097 
7098 
7099 
7100 # Continue setting up basic stuff. Most remaining code require fundamental tools.
7101 
7102 # Locate the directory of this script.
7103 SCRIPT="$0"
7104 AUTOCONF_DIR=`cd \`$DIRNAME $SCRIPT\`; $THEPWDCMD -L`
7105 
7106 # Where is the source? It is located two levels above the configure script.
7107 CURDIR="$PWD"
7108 cd "$AUTOCONF_DIR/../.."
7109 SRC_ROOT="`$THEPWDCMD -L`"
7110 
7111 if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
7112   PATH_SEP=";"
7113 
7114   SRC_ROOT_LENGTH=`$THEPWDCMD -L|$WC -m`
7115   if test $SRC_ROOT_LENGTH -gt 100; then
7116       as_fn_error $? "Your base path is too long. It is $SRC_ROOT_LENGTH characters long, but only 100 is supported" "$LINENO" 5
7117   fi
7118 
7119   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7120     { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin release" >&5
7121 $as_echo_n "checking cygwin release... " >&6; }
7122     CYGWIN_VERSION=`$UNAME -r`
7123     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_VERSION" >&5
7124 $as_echo "$CYGWIN_VERSION" >&6; }
7125     WINDOWS_ENV_VENDOR='cygwin'
7126     WINDOWS_ENV_VERSION="$CYGWIN_VERSION"
7127 
7128     CYGWIN_VERSION_OK=`$ECHO $CYGWIN_VERSION | $GREP ^1.7.`
7129     if test "x$CYGWIN_VERSION_OK" = x; then
7130       { $as_echo "$as_me:${as_lineno-$LINENO}: Your cygwin is too old. You are running $CYGWIN_VERSION, but at least cygwin 1.7 is required. Please upgrade." >&5
7131 $as_echo "$as_me: Your cygwin is too old. You are running $CYGWIN_VERSION, but at least cygwin 1.7 is required. Please upgrade." >&6;}
7132       as_fn_error $? "Cannot continue" "$LINENO" 5
7133     fi
7134     if test "x$CYGPATH" = x; then
7135         as_fn_error $? "Something is wrong with your cygwin installation since I cannot find cygpath.exe in your path" "$LINENO" 5
7136     fi
7137     { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin root directory as unix-style path" >&5
7138 $as_echo_n "checking cygwin root directory as unix-style path... " >&6; }
7139     # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
7140     cygwin_winpath_root=`cd / ; cmd /c cd | grep ".*"`
7141     # Force cygpath to report the proper root by including a trailing space, and then stripping it off again.
7142     CYGWIN_ROOT_PATH=`$CYGPATH -u "$cygwin_winpath_root " | $CUT -f 1 -d " "`
7143     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_ROOT_PATH" >&5
7144 $as_echo "$CYGWIN_ROOT_PATH" >&6; }
7145     WINDOWS_ENV_ROOT_PATH="$CYGWIN_ROOT_PATH"
7146     test_cygdrive_prefix=`$ECHO $CYGWIN_ROOT_PATH | $GREP ^/cygdrive/`
7147     if test "x$test_cygdrive_prefix" = x; then
7148         as_fn_error $? "Your cygdrive prefix is not /cygdrive. This is currently not supported. Change with mount -c." "$LINENO" 5
7149     fi
7150   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7151     { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys release" >&5
7152 $as_echo_n "checking msys release... " >&6; }
7153     MSYS_VERSION=`$UNAME -r`
7154     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_VERSION" >&5
7155 $as_echo "$MSYS_VERSION" >&6; }
7156 
7157     WINDOWS_ENV_VENDOR='msys'
7158     WINDOWS_ENV_VERSION="$MSYS_VERSION"
7159 
7160     { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys root directory as unix-style path" >&5
7161 $as_echo_n "checking msys root directory as unix-style path... " >&6; }
7162     # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
7163     MSYS_ROOT_PATH=`cd / ; cmd /c cd | grep ".*"`
7164 
7165   windows_path="$MSYS_ROOT_PATH"
7166   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7167     unix_path=`$CYGPATH -u "$windows_path"`
7168     MSYS_ROOT_PATH="$unix_path"
7169   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7170     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
7171     MSYS_ROOT_PATH="$unix_path"
7172   fi
7173 
7174     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_ROOT_PATH" >&5
7175 $as_echo "$MSYS_ROOT_PATH" >&6; }
7176     WINDOWS_ENV_ROOT_PATH="$MSYS_ROOT_PATH"
7177   else
7178     as_fn_error $? "Unknown Windows environment. Neither cygwin nor msys was detected." "$LINENO" 5
7179   fi
7180 
7181   # Test if windows or unix (cygwin/msys) find is first in path.
7182   { $as_echo "$as_me:${as_lineno-$LINENO}: checking what kind of 'find' is first on the PATH" >&5
7183 $as_echo_n "checking what kind of 'find' is first on the PATH... " >&6; }
7184   FIND_BINARY_OUTPUT=`find --version 2>&1`
7185   if test "x`echo $FIND_BINARY_OUTPUT | $GREP GNU`" != x; then
7186     { $as_echo "$as_me:${as_lineno-$LINENO}: result: unix style" >&5
7187 $as_echo "unix style" >&6; }
7188   elif test "x`echo $FIND_BINARY_OUTPUT | $GREP FIND`" != x; then
7189     { $as_echo "$as_me:${as_lineno-$LINENO}: result: Windows" >&5
7190 $as_echo "Windows" >&6; }
7191     { $as_echo "$as_me:${as_lineno-$LINENO}: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&5
7192 $as_echo "$as_me: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&6;}
7193     { $as_echo "$as_me:${as_lineno-$LINENO}: This will not work. Please correct and make sure /usr/bin (or similar) is first in path." >&5
7194 $as_echo "$as_me: This will not work. Please correct and make sure /usr/bin (or similar) is first in path." >&6;}
7195     as_fn_error $? "Cannot continue" "$LINENO" 5
7196   else
7197     { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
7198 $as_echo "unknown" >&6; }
7199     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: It seems that your find utility is non-standard." >&5
7200 $as_echo "$as_me: WARNING: It seems that your find utility is non-standard." >&2;}
7201   fi
7202 
7203 else
7204   PATH_SEP=":"
7205 fi
7206 
7207 
7208 
7209 cd "$CURDIR"
7210 
7211 
7212   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7213 
7214   # Input might be given as Windows format, start by converting to
7215   # unix format.
7216   path="$SRC_ROOT"
7217   new_path=`$CYGPATH -u "$path"`
7218 
7219   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
7220   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
7221   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
7222   # "foo.exe" is OK but "foo" is an error.
7223   #
7224   # This test is therefore slightly more accurate than "test -f" to check for file precense.
7225   # It is also a way to make sure we got the proper file name for the real test later on.
7226   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
7227   if test "x$test_shortpath" = x; then
7228     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&5
7229 $as_echo "$as_me: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&6;}
7230     as_fn_error $? "Cannot locate the the path of SRC_ROOT" "$LINENO" 5
7231   fi
7232 
7233   # Call helper function which possibly converts this using DOS-style short mode.
7234   # If so, the updated path is stored in $new_path.
7235 
7236   input_path="$new_path"
7237   # Check if we need to convert this using DOS-style short mode. If the path
7238   # contains just simple characters, use it. Otherwise (spaces, weird characters),
7239   # take no chances and rewrite it.
7240   # Note: m4 eats our [], so we need to use [ and ] instead.
7241   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
7242   if test "x$has_forbidden_chars" != x; then
7243     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7244     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
7245     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
7246     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
7247       # Going to short mode and back again did indeed matter. Since short mode is
7248       # case insensitive, let's make it lowercase to improve readability.
7249       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7250       # Now convert it back to Unix-stile (cygpath)
7251       input_path=`$CYGPATH -u "$shortmode_path"`
7252       new_path="$input_path"
7253     fi
7254   fi
7255 
7256   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
7257   if test "x$test_cygdrive_prefix" = x; then
7258     # As a simple fix, exclude /usr/bin since it's not a real path.
7259     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
7260       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
7261       # a path prefixed by /cygdrive for fixpath to work.
7262       new_path="$CYGWIN_ROOT_PATH$input_path"
7263     fi
7264   fi
7265 
7266 
7267   if test "x$path" != "x$new_path"; then
7268     SRC_ROOT="$new_path"
7269     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting SRC_ROOT to \"$new_path\"" >&5
7270 $as_echo "$as_me: Rewriting SRC_ROOT to \"$new_path\"" >&6;}
7271   fi
7272 
7273   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7274 
7275   path="$SRC_ROOT"
7276   has_colon=`$ECHO $path | $GREP ^.:`
7277   new_path="$path"
7278   if test "x$has_colon" = x; then
7279     # Not in mixed or Windows style, start by that.
7280     new_path=`cmd //c echo $path`
7281   fi
7282 
7283 
7284   input_path="$new_path"
7285   # Check if we need to convert this using DOS-style short mode. If the path
7286   # contains just simple characters, use it. Otherwise (spaces, weird characters),
7287   # take no chances and rewrite it.
7288   # Note: m4 eats our [], so we need to use [ and ] instead.
7289   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
7290   if test "x$has_forbidden_chars" != x; then
7291     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7292     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7293   fi
7294 
7295 
7296   windows_path="$new_path"
7297   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7298     unix_path=`$CYGPATH -u "$windows_path"`
7299     new_path="$unix_path"
7300   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7301     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
7302     new_path="$unix_path"
7303   fi
7304 
7305   if test "x$path" != "x$new_path"; then
7306     SRC_ROOT="$new_path"
7307     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting SRC_ROOT to \"$new_path\"" >&5
7308 $as_echo "$as_me: Rewriting SRC_ROOT to \"$new_path\"" >&6;}
7309   fi
7310 
7311   # Save the first 10 bytes of this path to the storage, so fixpath can work.
7312   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
7313 
7314   else
7315     # We're on a posix platform. Hooray! :)
7316     path="$SRC_ROOT"
7317     has_space=`$ECHO "$path" | $GREP " "`
7318     if test "x$has_space" != x; then
7319       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&5
7320 $as_echo "$as_me: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&6;}
7321       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
7322     fi
7323 
7324     # Use eval to expand a potential ~
7325     eval path="$path"
7326     if test ! -f "$path" && test ! -d "$path"; then
7327       as_fn_error $? "The path of SRC_ROOT, which resolves as \"$path\", is not found." "$LINENO" 5
7328     fi
7329 
7330     SRC_ROOT="`cd "$path"; $THEPWDCMD -L`"
7331   fi
7332 
7333 
7334   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7335 
7336   # Input might be given as Windows format, start by converting to
7337   # unix format.
7338   path="$CURDIR"
7339   new_path=`$CYGPATH -u "$path"`
7340 
7341   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
7342   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
7343   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
7344   # "foo.exe" is OK but "foo" is an error.
7345   #
7346   # This test is therefore slightly more accurate than "test -f" to check for file precense.
7347   # It is also a way to make sure we got the proper file name for the real test later on.
7348   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
7349   if test "x$test_shortpath" = x; then
7350     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
7351 $as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
7352     as_fn_error $? "Cannot locate the the path of CURDIR" "$LINENO" 5
7353   fi
7354 
7355   # Call helper function which possibly converts this using DOS-style short mode.
7356   # If so, the updated path is stored in $new_path.
7357 
7358   input_path="$new_path"
7359   # Check if we need to convert this using DOS-style short mode. If the path
7360   # contains just simple characters, use it. Otherwise (spaces, weird characters),
7361   # take no chances and rewrite it.
7362   # Note: m4 eats our [], so we need to use [ and ] instead.
7363   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
7364   if test "x$has_forbidden_chars" != x; then
7365     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7366     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
7367     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
7368     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
7369       # Going to short mode and back again did indeed matter. Since short mode is
7370       # case insensitive, let's make it lowercase to improve readability.
7371       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7372       # Now convert it back to Unix-stile (cygpath)
7373       input_path=`$CYGPATH -u "$shortmode_path"`
7374       new_path="$input_path"
7375     fi
7376   fi
7377 
7378   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
7379   if test "x$test_cygdrive_prefix" = x; then
7380     # As a simple fix, exclude /usr/bin since it's not a real path.
7381     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
7382       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
7383       # a path prefixed by /cygdrive for fixpath to work.
7384       new_path="$CYGWIN_ROOT_PATH$input_path"
7385     fi
7386   fi
7387 
7388 
7389   if test "x$path" != "x$new_path"; then
7390     CURDIR="$new_path"
7391     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
7392 $as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
7393   fi
7394 
7395   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7396 
7397   path="$CURDIR"
7398   has_colon=`$ECHO $path | $GREP ^.:`
7399   new_path="$path"
7400   if test "x$has_colon" = x; then
7401     # Not in mixed or Windows style, start by that.
7402     new_path=`cmd //c echo $path`
7403   fi
7404 
7405 
7406   input_path="$new_path"
7407   # Check if we need to convert this using DOS-style short mode. If the path
7408   # contains just simple characters, use it. Otherwise (spaces, weird characters),
7409   # take no chances and rewrite it.
7410   # Note: m4 eats our [], so we need to use [ and ] instead.
7411   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
7412   if test "x$has_forbidden_chars" != x; then
7413     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7414     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7415   fi
7416 
7417 
7418   windows_path="$new_path"
7419   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7420     unix_path=`$CYGPATH -u "$windows_path"`
7421     new_path="$unix_path"
7422   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7423     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
7424     new_path="$unix_path"
7425   fi
7426 
7427   if test "x$path" != "x$new_path"; then
7428     CURDIR="$new_path"
7429     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
7430 $as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
7431   fi
7432 
7433   # Save the first 10 bytes of this path to the storage, so fixpath can work.
7434   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
7435 
7436   else
7437     # We're on a posix platform. Hooray! :)
7438     path="$CURDIR"
7439     has_space=`$ECHO "$path" | $GREP " "`
7440     if test "x$has_space" != x; then
7441       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
7442 $as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
7443       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
7444     fi
7445 
7446     # Use eval to expand a potential ~
7447     eval path="$path"
7448     if test ! -f "$path" && test ! -d "$path"; then
7449       as_fn_error $? "The path of CURDIR, which resolves as \"$path\", is not found." "$LINENO" 5
7450     fi
7451 
7452     CURDIR="`cd "$path"; $THEPWDCMD -L`"
7453   fi
7454 
7455 
7456 if test "x$OPENJDK_BUILD_OS" = "xsolaris"; then
7457     # Add extra search paths on solaris for utilities like ar and as etc...
7458     PATH="$PATH:/usr/ccs/bin:/usr/sfw/bin:/opt/csw/bin"
7459 fi
7460 
7461 # You can force the sys-root if the sys-root encoded into the cross compiler tools
7462 # is not correct.
7463 
7464 # Check whether --with-sys-root was given.
7465 if test "${with_sys_root+set}" = set; then :
7466   withval=$with_sys_root;
7467 fi
7468 
7469 
7470 if test "x$with_sys_root" != x; then
7471   SYS_ROOT=$with_sys_root
7472 else
7473   SYS_ROOT=/
7474 fi
7475 
7476 
7477 
7478 # Check whether --with-tools-dir was given.
7479 if test "${with_tools_dir+set}" = set; then :
7480   withval=$with_tools_dir; TOOLS_DIR=$with_tools_dir
7481 fi
7482 
7483 
7484 
7485 # Check whether --with-devkit was given.
7486 if test "${with_devkit+set}" = set; then :
7487   withval=$with_devkit;
7488     if test "x$with_sys_root" != x; then
7489       as_fn_error $? "Cannot specify both --with-devkit and --with-sys-root at the same time" "$LINENO" 5
7490     fi
7491     if test "x$with_tools_dir" != x; then
7492       as_fn_error $? "Cannot specify both --with-devkit and --with-tools-dir at the same time" "$LINENO" 5
7493     fi
7494     TOOLS_DIR=$with_devkit/bin
7495     SYS_ROOT=$with_devkit/$host_alias/libc
7496 
7497 fi
7498 
7499 
7500 
7501 
7502 # Setup default logging of stdout and stderr to build.log in the output root.
7503 BUILD_LOG='$(OUTPUT_ROOT)/build.log'
7504 BUILD_LOG_PREVIOUS='$(OUTPUT_ROOT)/build.log.old'
7505 BUILD_LOG_WRAPPER='$(BASH) $(SRC_ROOT)/common/bin/logger.sh $(BUILD_LOG)'
7506 
7507 
7508 
7509 
7510 
7511 # Check if it's a pure open build or if custom sources are to be used.
7512 
7513   # Check whether --enable-openjdk-only was given.
7514 if test "${enable_openjdk_only+set}" = set; then :
7515   enableval=$enable_openjdk_only;
7516 else
7517   enable_openjdk_only="no"
7518 fi
7519 
7520 
7521   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for presence of closed sources" >&5
7522 $as_echo_n "checking for presence of closed sources... " >&6; }
7523   if test -d "$SRC_ROOT/jdk/src/closed"; then
7524     CLOSED_SOURCE_PRESENT=yes
7525   else
7526     CLOSED_SOURCE_PRESENT=no
7527   fi
7528   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CLOSED_SOURCE_PRESENT" >&5
7529 $as_echo "$CLOSED_SOURCE_PRESENT" >&6; }
7530 
7531   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if closed source is suppressed (openjdk-only)" >&5
7532 $as_echo_n "checking if closed source is suppressed (openjdk-only)... " >&6; }
7533   SUPPRESS_CLOSED_SOURCE="$enable_openjdk_only"
7534   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SUPPRESS_CLOSED_SOURCE" >&5
7535 $as_echo "$SUPPRESS_CLOSED_SOURCE" >&6; }
7536 
7537   if test "x$CLOSED_SOURCE_PRESENT" = xno; then
7538     OPENJDK=true
7539     if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then
7540       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&5
7541 $as_echo "$as_me: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&2;}
7542     fi
7543   else
7544     if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then
7545       OPENJDK=true
7546     else
7547       OPENJDK=false
7548     fi
7549   fi
7550 
7551   if test "x$OPENJDK" = "xtrue"; then
7552     SET_OPENJDK="OPENJDK=true"
7553   fi
7554 
7555 
7556 
7557 
7558 # These are needed to be able to create a configuration name (and thus the output directory)
7559 
7560 ###############################################################################
7561 #
7562 # Check which variant of the JDK that we want to build.
7563 # Currently we have:
7564 #    normal:   standard edition
7565 # but the custom make system may add other variants
7566 #
7567 # Effectively the JDK variant gives a name to a specific set of
7568 # modules to compile into the JDK. In the future, these modules
7569 # might even be Jigsaw modules.
7570 #
7571 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variant of the JDK to build" >&5
7572 $as_echo_n "checking which variant of the JDK to build... " >&6; }
7573 
7574 # Check whether --with-jdk-variant was given.
7575 if test "${with_jdk_variant+set}" = set; then :
7576   withval=$with_jdk_variant;
7577 fi
7578 
7579 
7580 if test "x$with_jdk_variant" = xnormal || test "x$with_jdk_variant" = x; then
7581     JDK_VARIANT="normal"
7582 else
7583     as_fn_error $? "The available JDK variants are: normal" "$LINENO" 5
7584 fi
7585 
7586 
7587 
7588 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JDK_VARIANT" >&5
7589 $as_echo "$JDK_VARIANT" >&6; }
7590 
7591 
7592 
7593 ###############################################################################
7594 #
7595 # Check which variants of the JVM that we want to build.
7596 # Currently we have:
7597 #    server: normal interpreter and a tiered C1/C2 compiler
7598 #    client: normal interpreter and C1 (no C2 compiler) (only 32-bit platforms)
7599 #    minimal1: reduced form of client with optional VM services and features stripped out
7600 #    kernel: kernel footprint JVM that passes the TCK without major performance problems,
7601 #             ie normal interpreter and C1, only the serial GC, kernel jvmti etc
7602 #    zero: no machine code interpreter, no compiler
7603 #    zeroshark: zero interpreter and shark/llvm compiler backend
7604 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variants of the JVM to build" >&5
7605 $as_echo_n "checking which variants of the JVM to build... " >&6; }
7606 
7607 # Check whether --with-jvm-variants was given.
7608 if test "${with_jvm_variants+set}" = set; then :
7609   withval=$with_jvm_variants;
7610 fi
7611 
7612 
7613 if test "x$with_jvm_variants" = x; then
7614      with_jvm_variants="server"
7615 fi
7616 
7617 JVM_VARIANTS=",$with_jvm_variants,"
7618 TEST_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/server,//' -e 's/client,//'  -e 's/minimal1,//' -e 's/kernel,//' -e 's/zero,//' -e 's/zeroshark,//'`
7619 
7620 if test "x$TEST_VARIANTS" != "x,"; then
7621    as_fn_error $? "The available JVM variants are: server, client, minimal1, kernel, zero, zeroshark" "$LINENO" 5
7622 fi
7623 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_jvm_variants" >&5
7624 $as_echo "$with_jvm_variants" >&6; }
7625 
7626 JVM_VARIANT_SERVER=`$ECHO "$JVM_VARIANTS" | $SED -e '/,server,/!s/.*/false/g' -e '/,server,/s/.*/true/g'`
7627 JVM_VARIANT_CLIENT=`$ECHO "$JVM_VARIANTS" | $SED -e '/,client,/!s/.*/false/g' -e '/,client,/s/.*/true/g'`
7628 JVM_VARIANT_MINIMAL1=`$ECHO "$JVM_VARIANTS" | $SED -e '/,minimal1,/!s/.*/false/g' -e '/,minimal1,/s/.*/true/g'`
7629 JVM_VARIANT_KERNEL=`$ECHO "$JVM_VARIANTS" | $SED -e '/,kernel,/!s/.*/false/g' -e '/,kernel,/s/.*/true/g'`
7630 JVM_VARIANT_ZERO=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zero,/!s/.*/false/g' -e '/,zero,/s/.*/true/g'`
7631 JVM_VARIANT_ZEROSHARK=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zeroshark,/!s/.*/false/g' -e '/,zeroshark,/s/.*/true/g'`
7632 
7633 if test "x$JVM_VARIANT_CLIENT" = xtrue; then
7634     if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
7635         as_fn_error $? "You cannot build a client JVM for a 64-bit machine." "$LINENO" 5
7636     fi
7637 fi
7638 if test "x$JVM_VARIANT_KERNEL" = xtrue; then
7639     if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
7640         as_fn_error $? "You cannot build a kernel JVM for a 64-bit machine." "$LINENO" 5
7641     fi
7642 fi
7643 if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
7644     if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
7645         as_fn_error $? "You cannot build a minimal JVM for a 64-bit machine." "$LINENO" 5
7646     fi
7647 fi
7648 
7649 # Replace the commas with AND for use in the build directory name.
7650 ANDED_JVM_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/^,//' -e 's/,$//' -e 's/,/AND/'`
7651 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/'`
7652 if test "x$COUNT_VARIANTS" != "x,1"; then
7653     BUILDING_MULTIPLE_JVM_VARIANTS=yes
7654 else
7655     BUILDING_MULTIPLE_JVM_VARIANTS=no
7656 fi
7657 
7658 
7659 
7660 
7661 
7662 
7663 
7664 
7665 
7666 INCLUDE_SA=true
7667 if test "x$JVM_VARIANT_ZERO" = xtrue ; then
7668     INCLUDE_SA=false
7669 fi
7670 if test "x$JVM_VARIANT_ZEROSHARK" = xtrue ; then
7671     INCLUDE_SA=false
7672 fi
7673 
7674 
7675 if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
7676    MACOSX_UNIVERSAL="true"
7677 fi
7678 
7679 
7680 
7681 
7682 
7683 ###############################################################################
7684 #
7685 # Set the debug level
7686 #    release: no debug information, all optimizations, no asserts.
7687 #    fastdebug: debug information (-g), all optimizations, all asserts
7688 #    slowdebug: debug information (-g), no optimizations, all asserts
7689 #
7690 DEBUG_LEVEL="release"
7691 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which debug level to use" >&5
7692 $as_echo_n "checking which debug level to use... " >&6; }
7693 # Check whether --enable-debug was given.
7694 if test "${enable_debug+set}" = set; then :
7695   enableval=$enable_debug;
7696         ENABLE_DEBUG="${enableval}"
7697         DEBUG_LEVEL="fastdebug"
7698 
7699 else
7700   ENABLE_DEBUG="no"
7701 fi
7702 
7703 
7704 
7705 # Check whether --with-debug-level was given.
7706 if test "${with_debug_level+set}" = set; then :
7707   withval=$with_debug_level;
7708         DEBUG_LEVEL="${withval}"
7709         if test "x$ENABLE_DEBUG" = xyes; then
7710                         as_fn_error $? "You cannot use both --enable-debug and --with-debug-level at the same time." "$LINENO" 5
7711         fi
7712 
7713 fi
7714 
7715 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEBUG_LEVEL" >&5
7716 $as_echo "$DEBUG_LEVEL" >&6; }
7717 
7718 if test "x$DEBUG_LEVEL" != xrelease && \
7719    test "x$DEBUG_LEVEL" != xfastdebug && \
7720    test "x$DEBUG_LEVEL" != xslowdebug; then
7721    as_fn_error $? "Allowed debug levels are: release, fastdebug and slowdebug" "$LINENO" 5
7722 fi
7723 
7724 
7725 ###############################################################################
7726 #
7727 # Setup legacy vars/targets and new vars to deal with different debug levels.
7728 #
7729 
7730 case $DEBUG_LEVEL in
7731       release )
7732           VARIANT="OPT"
7733           FASTDEBUG="false"
7734           DEBUG_CLASSFILES="false"
7735           BUILD_VARIANT_RELEASE=""
7736           HOTSPOT_DEBUG_LEVEL="product"
7737           HOTSPOT_EXPORT="product"
7738            ;;
7739       fastdebug )
7740           VARIANT="DBG"
7741           FASTDEBUG="true"
7742           DEBUG_CLASSFILES="true"
7743           BUILD_VARIANT_RELEASE="-fastdebug"
7744           HOTSPOT_DEBUG_LEVEL="fastdebug"
7745           HOTSPOT_EXPORT="fastdebug"
7746            ;;
7747       slowdebug )
7748           VARIANT="DBG"
7749           FASTDEBUG="false"
7750           DEBUG_CLASSFILES="true"
7751           BUILD_VARIANT_RELEASE="-debug"
7752           HOTSPOT_DEBUG_LEVEL="jvmg"
7753           HOTSPOT_EXPORT="debug"
7754            ;;
7755 esac
7756 
7757 #####
7758 # Generate the legacy makefile targets for hotspot.
7759 # The hotspot api for selecting the build artifacts, really, needs to be improved.
7760 # JDK-7195896 will fix this on the hotspot side by using the JVM_VARIANT_* variables to
7761 # determine what needs to be built. All we will need to set here is all_product, all_fastdebug etc
7762 # But until then ...
7763 HOTSPOT_TARGET=""
7764 
7765 if test "x$JVM_VARIANT_SERVER" = xtrue; then
7766     HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL} "
7767 fi
7768 
7769 if test "x$JVM_VARIANT_CLIENT" = xtrue; then
7770     HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}1 "
7771 fi
7772 
7773 if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
7774     HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}minimal1 "
7775 fi
7776 
7777 if test "x$JVM_VARIANT_KERNEL" = xtrue; then
7778     HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}kernel "
7779 fi
7780 
7781 if test "x$JVM_VARIANT_ZERO" = xtrue; then
7782     HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}zero "
7783 fi
7784 
7785 if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
7786     HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}shark "
7787 fi
7788 
7789 HOTSPOT_TARGET="$HOTSPOT_TARGET docs export_$HOTSPOT_EXPORT"
7790 
7791 # On Macosx universal binaries are produced, but they only contain
7792 # 64 bit intel. This invalidates control of which jvms are built
7793 # from configure, but only server is valid anyway. Fix this
7794 # when hotspot makefiles are rewritten.
7795 if test "x$MACOSX_UNIVERSAL" = xtrue; then
7796     HOTSPOT_TARGET=universal_${HOTSPOT_EXPORT}
7797 fi
7798 
7799 #####
7800 
7801 
7802 
7803 
7804 
7805 
7806 
7807 
7808 # With basic setup done, call the custom early hook.
7809 
7810 
7811 # To properly create a configuration name, we need to have the OpenJDK target
7812 # and options (variants and debug level) parsed.
7813 
7814 
7815 
7816 # Check whether --with-conf-name was given.
7817 if test "${with_conf_name+set}" = set; then :
7818   withval=$with_conf_name;  CONF_NAME=${with_conf_name}
7819 fi
7820 
7821 
7822 # Test from where we are running configure, in or outside of src root.
7823 if test "x$CURDIR" = "x$SRC_ROOT" || test "x$CURDIR" = "x$SRC_ROOT/common" \
7824         || test "x$CURDIR" = "x$SRC_ROOT/common/autoconf" \
7825         || test "x$CURDIR" = "x$SRC_ROOT/common/makefiles" ; then
7826     # We are running configure from the src root.
7827     # Create a default ./build/target-variant-debuglevel output root.
7828     if test "x${CONF_NAME}" = x; then
7829         CONF_NAME="${OPENJDK_TARGET_OS}-${OPENJDK_TARGET_CPU}-${JDK_VARIANT}-${ANDED_JVM_VARIANTS}-${DEBUG_LEVEL}"
7830     fi
7831     OUTPUT_ROOT="$SRC_ROOT/build/${CONF_NAME}"
7832     $MKDIR -p "$OUTPUT_ROOT"
7833     if test ! -d "$OUTPUT_ROOT"; then
7834         as_fn_error $? "Could not create build directory $OUTPUT_ROOT" "$LINENO" 5
7835     fi
7836 else
7837     # We are running configure from outside of the src dir.
7838     # Then use the current directory as output dir!
7839     # If configuration is situated in normal build directory, just use the build
7840     # directory name as configuration name, otherwise use the complete path.
7841     if test "x${CONF_NAME}" = x; then
7842         CONF_NAME=`$ECHO $CURDIR | $SED -e "s!^${SRC_ROOT}/build/!!"`
7843     fi
7844     OUTPUT_ROOT="$CURDIR"
7845 
7846     # WARNING: This might be a bad thing to do. You need to be sure you want to
7847     # have a configuration in this directory. Do some sanity checks!
7848 
7849     if test ! -e "$OUTPUT_ROOT/spec.gmk"; then
7850       # If we have a spec.gmk, we have run here before and we are OK. Otherwise, check for
7851       # other files
7852       files_present=`$LS $OUTPUT_ROOT`
7853       # Configure has already touched config.log and confdefs.h in the current dir when this check
7854       # is performed.
7855       filtered_files=`$ECHO "$files_present" | $SED -e 's/config.log//g' -e 's/confdefs.h//g' -e 's/ //g' \
7856                                              | $TR -d '\n'`
7857       if test "x$filtered_files" != x; then
7858         { $as_echo "$as_me:${as_lineno-$LINENO}: Current directory is $CURDIR." >&5
7859 $as_echo "$as_me: Current directory is $CURDIR." >&6;}
7860         { $as_echo "$as_me:${as_lineno-$LINENO}: Since this is not the source root, configure will output the configuration here" >&5
7861 $as_echo "$as_me: Since this is not the source root, configure will output the configuration here" >&6;}
7862         { $as_echo "$as_me:${as_lineno-$LINENO}: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&5
7863 $as_echo "$as_me: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&6;}
7864         { $as_echo "$as_me:${as_lineno-$LINENO}: However, this directory is not empty. This is not allowed, since it could" >&5
7865 $as_echo "$as_me: However, this directory is not empty. This is not allowed, since it could" >&6;}
7866         { $as_echo "$as_me:${as_lineno-$LINENO}: seriously mess up just about everything." >&5
7867 $as_echo "$as_me: seriously mess up just about everything." >&6;}
7868         { $as_echo "$as_me:${as_lineno-$LINENO}: Try 'cd $SRC_ROOT' and restart configure" >&5
7869 $as_echo "$as_me: Try 'cd $SRC_ROOT' and restart configure" >&6;}
7870         { $as_echo "$as_me:${as_lineno-$LINENO}: (or create a new empty directory and cd to it)." >&5
7871 $as_echo "$as_me: (or create a new empty directory and cd to it)." >&6;}
7872         as_fn_error $? "Will not continue creating configuration in $CURDIR" "$LINENO" 5
7873       fi
7874     fi
7875 fi
7876 { $as_echo "$as_me:${as_lineno-$LINENO}: checking what configuration name to use" >&5
7877 $as_echo_n "checking what configuration name to use... " >&6; }
7878 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CONF_NAME" >&5
7879 $as_echo "$CONF_NAME" >&6; }
7880 
7881 
7882   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7883 
7884   # Input might be given as Windows format, start by converting to
7885   # unix format.
7886   path="$OUTPUT_ROOT"
7887   new_path=`$CYGPATH -u "$path"`
7888 
7889   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
7890   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
7891   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
7892   # "foo.exe" is OK but "foo" is an error.
7893   #
7894   # This test is therefore slightly more accurate than "test -f" to check for file precense.
7895   # It is also a way to make sure we got the proper file name for the real test later on.
7896   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
7897   if test "x$test_shortpath" = x; then
7898     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
7899 $as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
7900     as_fn_error $? "Cannot locate the the path of OUTPUT_ROOT" "$LINENO" 5
7901   fi
7902 
7903   # Call helper function which possibly converts this using DOS-style short mode.
7904   # If so, the updated path is stored in $new_path.
7905 
7906   input_path="$new_path"
7907   # Check if we need to convert this using DOS-style short mode. If the path
7908   # contains just simple characters, use it. Otherwise (spaces, weird characters),
7909   # take no chances and rewrite it.
7910   # Note: m4 eats our [], so we need to use [ and ] instead.
7911   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
7912   if test "x$has_forbidden_chars" != x; then
7913     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7914     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
7915     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
7916     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
7917       # Going to short mode and back again did indeed matter. Since short mode is
7918       # case insensitive, let's make it lowercase to improve readability.
7919       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7920       # Now convert it back to Unix-stile (cygpath)
7921       input_path=`$CYGPATH -u "$shortmode_path"`
7922       new_path="$input_path"
7923     fi
7924   fi
7925 
7926   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
7927   if test "x$test_cygdrive_prefix" = x; then
7928     # As a simple fix, exclude /usr/bin since it's not a real path.
7929     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
7930       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
7931       # a path prefixed by /cygdrive for fixpath to work.
7932       new_path="$CYGWIN_ROOT_PATH$input_path"
7933     fi
7934   fi
7935 
7936 
7937   if test "x$path" != "x$new_path"; then
7938     OUTPUT_ROOT="$new_path"
7939     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
7940 $as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
7941   fi
7942 
7943   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7944 
7945   path="$OUTPUT_ROOT"
7946   has_colon=`$ECHO $path | $GREP ^.:`
7947   new_path="$path"
7948   if test "x$has_colon" = x; then
7949     # Not in mixed or Windows style, start by that.
7950     new_path=`cmd //c echo $path`
7951   fi
7952 
7953 
7954   input_path="$new_path"
7955   # Check if we need to convert this using DOS-style short mode. If the path
7956   # contains just simple characters, use it. Otherwise (spaces, weird characters),
7957   # take no chances and rewrite it.
7958   # Note: m4 eats our [], so we need to use [ and ] instead.
7959   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
7960   if test "x$has_forbidden_chars" != x; then
7961     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7962     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7963   fi
7964 
7965 
7966   windows_path="$new_path"
7967   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7968     unix_path=`$CYGPATH -u "$windows_path"`
7969     new_path="$unix_path"
7970   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7971     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
7972     new_path="$unix_path"
7973   fi
7974 
7975   if test "x$path" != "x$new_path"; then
7976     OUTPUT_ROOT="$new_path"
7977     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
7978 $as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
7979   fi
7980 
7981   # Save the first 10 bytes of this path to the storage, so fixpath can work.
7982   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
7983 
7984   else
7985     # We're on a posix platform. Hooray! :)
7986     path="$OUTPUT_ROOT"
7987     has_space=`$ECHO "$path" | $GREP " "`
7988     if test "x$has_space" != x; then
7989       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
7990 $as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
7991       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
7992     fi
7993 
7994     # Use eval to expand a potential ~
7995     eval path="$path"
7996     if test ! -f "$path" && test ! -d "$path"; then
7997       as_fn_error $? "The path of OUTPUT_ROOT, which resolves as \"$path\", is not found." "$LINENO" 5
7998     fi
7999 
8000     OUTPUT_ROOT="`cd "$path"; $THEPWDCMD -L`"
8001   fi
8002 
8003 
8004 SPEC=$OUTPUT_ROOT/spec.gmk
8005 
8006 CONF_NAME=$CONF_NAME
8007 
8008 OUTPUT_ROOT=$OUTPUT_ROOT
8009 
8010 
8011 # Most of the probed defines are put into config.h
8012 ac_config_headers="$ac_config_headers $OUTPUT_ROOT/config.h:$AUTOCONF_DIR/config.h.in"
8013 
8014 # The spec.gmk file contains all variables for the make system.
8015 ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in"
8016 
8017 # The hotspot-spec.gmk file contains legacy variables for the hotspot make system.
8018 ac_config_files="$ac_config_files $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in"
8019 
8020 # The bootcycle-spec.gmk file contains support for boot cycle builds.
8021 ac_config_files="$ac_config_files $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in"
8022 
8023 # The compare.sh is used to compare the build output to other builds.
8024 ac_config_files="$ac_config_files $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in"
8025 
8026 # Spec.sh is currently used by compare-objects.sh
8027 ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.sh:$AUTOCONF_DIR/spec.sh.in"
8028 
8029 # The generated Makefile knows where the spec.gmk is and where the source is.
8030 # You can run make from the OUTPUT_ROOT, or from the top-level Makefile
8031 # which will look for generated configurations
8032 ac_config_files="$ac_config_files $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in"
8033 
8034 
8035 # Save the arguments given to us
8036 echo "$CONFIGURE_COMMAND_LINE" > $OUTPUT_ROOT/configure-arguments
8037 
8038 
8039 # Must be done before we can call HELP_MSG_MISSING_DEPENDENCY.
8040 
8041     for ac_prog in apt-get yum port pkgutil pkgadd
8042 do
8043   # Extract the first word of "$ac_prog", so it can be a program name with args.
8044 set dummy $ac_prog; ac_word=$2
8045 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8046 $as_echo_n "checking for $ac_word... " >&6; }
8047 if ${ac_cv_prog_PKGHANDLER+:} false; then :
8048   $as_echo_n "(cached) " >&6
8049 else
8050   if test -n "$PKGHANDLER"; then
8051   ac_cv_prog_PKGHANDLER="$PKGHANDLER" # Let the user override the test.
8052 else
8053 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8054 for as_dir in $PATH
8055 do
8056   IFS=$as_save_IFS
8057   test -z "$as_dir" && as_dir=.
8058     for ac_exec_ext in '' $ac_executable_extensions; do
8059   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8060     ac_cv_prog_PKGHANDLER="$ac_prog"
8061     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8062     break 2
8063   fi
8064 done
8065   done
8066 IFS=$as_save_IFS
8067 
8068 fi
8069 fi
8070 PKGHANDLER=$ac_cv_prog_PKGHANDLER
8071 if test -n "$PKGHANDLER"; then
8072   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKGHANDLER" >&5
8073 $as_echo "$PKGHANDLER" >&6; }
8074 else
8075   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8076 $as_echo "no" >&6; }
8077 fi
8078 
8079 
8080   test -n "$PKGHANDLER" && break
8081 done
8082 
8083 
8084 
8085 # Setup tools that requires more complex handling, or that is not needed by the configure script.
8086 
8087 
8088   # We need to find a recent version of GNU make. Especially on Solaris, this can be tricky.
8089   if test "x$MAKE" != x; then
8090     # User has supplied a make, test it.
8091     if test ! -f "$MAKE"; then
8092       as_fn_error $? "The specified make (by MAKE=$MAKE) is not found." "$LINENO" 5
8093     fi
8094 
8095   MAKE_CANDIDATE=""$MAKE""
8096   DESCRIPTION="user supplied MAKE=$MAKE"
8097   if test "x$MAKE_CANDIDATE" != x; then
8098     { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
8099 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
8100     MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
8101     IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
8102     if test "x$IS_GNU_MAKE" = x; then
8103       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
8104 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
8105     else
8106       IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'`
8107       if test "x$IS_MODERN_MAKE" = x; then
8108         { $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
8109 $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;}
8110       else
8111         if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
8112           if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8113             MAKE_EXPECTED_ENV='cygwin'
8114           elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8115             MAKE_EXPECTED_ENV='msys'
8116           else
8117             as_fn_error $? "Unknown Windows environment" "$LINENO" 5
8118           fi
8119           MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
8120           IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
8121         else
8122           # Not relevant for non-Windows
8123           IS_MAKE_CORRECT_ENV=true
8124         fi
8125         if test "x$IS_MAKE_CORRECT_ENV" = x; then
8126           { $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
8127 $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;}
8128         else
8129           FOUND_MAKE=$MAKE_CANDIDATE
8130 
8131   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8132 
8133   # First separate the path from the arguments. This will split at the first
8134   # space.
8135   complete="$FOUND_MAKE"
8136   path="${complete%% *}"
8137   tmp="$complete EOL"
8138   arguments="${tmp#* }"
8139 
8140   # Input might be given as Windows format, start by converting to
8141   # unix format.
8142   new_path=`$CYGPATH -u "$path"`
8143 
8144   # Now try to locate executable using which
8145   new_path=`$WHICH "$new_path" 2> /dev/null`
8146   # bat and cmd files are not always considered executable in cygwin causing which
8147   # to not find them
8148   if test "x$new_path" = x \
8149            && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8150            && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8151     new_path=`$CYGPATH -u "$path"`
8152   fi
8153   if test "x$new_path" = x; then
8154     # Oops. Which didn't find the executable.
8155     # The splitting of arguments from the executable at a space might have been incorrect,
8156     # since paths with space are more likely in Windows. Give it another try with the whole
8157     # argument.
8158     path="$complete"
8159     arguments="EOL"
8160     new_path=`$CYGPATH -u "$path"`
8161     new_path=`$WHICH "$new_path" 2> /dev/null`
8162     # bat and cmd files are not always considered executable in cygwin causing which
8163     # to not find them
8164     if test "x$new_path" = x \
8165              && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8166              && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8167       new_path=`$CYGPATH -u "$path"`
8168     fi
8169     if test "x$new_path" = x; then
8170       # It's still not found. Now this is an unrecoverable error.
8171       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8172 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8173       has_space=`$ECHO "$complete" | $GREP " "`
8174       if test "x$has_space" != x; then
8175         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8176 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8177       fi
8178       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8179     fi
8180   fi
8181 
8182   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
8183   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
8184   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
8185   # "foo.exe" is OK but "foo" is an error.
8186   #
8187   # This test is therefore slightly more accurate than "test -f" to check for file precense.
8188   # It is also a way to make sure we got the proper file name for the real test later on.
8189   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
8190   if test "x$test_shortpath" = x; then
8191     # Short path failed, file does not exist as specified.
8192     # Try adding .exe or .cmd
8193     if test -f "${new_path}.exe"; then
8194        input_to_shortpath="${new_path}.exe"
8195     elif test -f "${new_path}.cmd"; then
8196        input_to_shortpath="${new_path}.cmd"
8197     else
8198       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
8199 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
8200       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
8201 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
8202       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8203     fi
8204   else
8205     input_to_shortpath="$new_path"
8206   fi
8207 
8208   # Call helper function which possibly converts this using DOS-style short mode.
8209   # If so, the updated path is stored in $new_path.
8210   new_path="$input_to_shortpath"
8211 
8212   input_path="$input_to_shortpath"
8213   # Check if we need to convert this using DOS-style short mode. If the path
8214   # contains just simple characters, use it. Otherwise (spaces, weird characters),
8215   # take no chances and rewrite it.
8216   # Note: m4 eats our [], so we need to use [ and ] instead.
8217   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
8218   if test "x$has_forbidden_chars" != x; then
8219     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8220     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
8221     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
8222     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
8223       # Going to short mode and back again did indeed matter. Since short mode is
8224       # case insensitive, let's make it lowercase to improve readability.
8225       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8226       # Now convert it back to Unix-stile (cygpath)
8227       input_path=`$CYGPATH -u "$shortmode_path"`
8228       new_path="$input_path"
8229     fi
8230   fi
8231 
8232   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
8233   if test "x$test_cygdrive_prefix" = x; then
8234     # As a simple fix, exclude /usr/bin since it's not a real path.
8235     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
8236       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
8237       # a path prefixed by /cygdrive for fixpath to work.
8238       new_path="$CYGWIN_ROOT_PATH$input_path"
8239     fi
8240   fi
8241 
8242   # remove trailing .exe if any
8243   new_path="${new_path/%.exe/}"
8244 
8245   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8246 
8247   # First separate the path from the arguments. This will split at the first
8248   # space.
8249   complete="$FOUND_MAKE"
8250   path="${complete%% *}"
8251   tmp="$complete EOL"
8252   arguments="${tmp#* }"
8253 
8254   # Input might be given as Windows format, start by converting to
8255   # unix format.
8256   new_path="$path"
8257 
8258   windows_path="$new_path"
8259   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8260     unix_path=`$CYGPATH -u "$windows_path"`
8261     new_path="$unix_path"
8262   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8263     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8264     new_path="$unix_path"
8265   fi
8266 
8267 
8268   # Now try to locate executable using which
8269   new_path=`$WHICH "$new_path" 2> /dev/null`
8270 
8271   if test "x$new_path" = x; then
8272     # Oops. Which didn't find the executable.
8273     # The splitting of arguments from the executable at a space might have been incorrect,
8274     # since paths with space are more likely in Windows. Give it another try with the whole
8275     # argument.
8276     path="$complete"
8277     arguments="EOL"
8278     new_path="$path"
8279 
8280   windows_path="$new_path"
8281   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8282     unix_path=`$CYGPATH -u "$windows_path"`
8283     new_path="$unix_path"
8284   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8285     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8286     new_path="$unix_path"
8287   fi
8288 
8289 
8290     new_path=`$WHICH "$new_path" 2> /dev/null`
8291 
8292     if test "x$new_path" = x; then
8293       # It's still not found. Now this is an unrecoverable error.
8294       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8295 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8296       has_space=`$ECHO "$complete" | $GREP " "`
8297       if test "x$has_space" != x; then
8298         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8299 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8300       fi
8301       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8302     fi
8303   fi
8304 
8305   # Now new_path has a complete unix path to the binary
8306   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
8307     # Keep paths in /bin as-is, but remove trailing .exe if any
8308     new_path="${new_path/%.exe/}"
8309     # Do not save /bin paths to all_fixpath_prefixes!
8310   else
8311     # Not in mixed or Windows style, start by that.
8312     new_path=`cmd //c echo $new_path`
8313 
8314   input_path="$new_path"
8315   # Check if we need to convert this using DOS-style short mode. If the path
8316   # contains just simple characters, use it. Otherwise (spaces, weird characters),
8317   # take no chances and rewrite it.
8318   # Note: m4 eats our [], so we need to use [ and ] instead.
8319   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
8320   if test "x$has_forbidden_chars" != x; then
8321     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8322     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8323   fi
8324 
8325     # Output is in $new_path
8326 
8327   windows_path="$new_path"
8328   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8329     unix_path=`$CYGPATH -u "$windows_path"`
8330     new_path="$unix_path"
8331   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8332     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8333     new_path="$unix_path"
8334   fi
8335 
8336     # remove trailing .exe if any
8337     new_path="${new_path/%.exe/}"
8338 
8339     # Save the first 10 bytes of this path to the storage, so fixpath can work.
8340     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
8341   fi
8342 
8343   else
8344     # We're on a posix platform. Hooray! :)
8345     # First separate the path from the arguments. This will split at the first
8346     # space.
8347     complete="$FOUND_MAKE"
8348     path="${complete%% *}"
8349     tmp="$complete EOL"
8350     arguments="${tmp#* }"
8351 
8352     # Cannot rely on the command "which" here since it doesn't always work.
8353     is_absolute_path=`$ECHO "$path" | $GREP ^/`
8354     if test -z "$is_absolute_path"; then
8355       # Path to executable is not absolute. Find it.
8356       IFS_save="$IFS"
8357       IFS=:
8358       for p in $PATH; do
8359         if test -f "$p/$path" && test -x "$p/$path"; then
8360           new_path="$p/$path"
8361           break
8362         fi
8363       done
8364       IFS="$IFS_save"
8365     else
8366       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
8367 $as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
8368       new_path="$path"
8369     fi
8370 
8371     if test "x$new_path" = x; then
8372         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8373 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8374         has_space=`$ECHO "$complete" | $GREP " "`
8375         if test "x$has_space" != x; then
8376           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
8377 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
8378         fi
8379         as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8380       fi
8381   fi
8382 
8383       # Now join together the path and the arguments once again
8384       if test "x$arguments" != xEOL; then
8385         new_complete="$new_path ${arguments% *}"
8386       else
8387         new_complete="$new_path"
8388       fi
8389 
8390   if test "x$complete" != "x$new_complete"; then
8391       FOUND_MAKE="$new_complete"
8392       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
8393 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
8394     fi
8395 
8396         fi
8397       fi
8398     fi
8399   fi
8400 
8401     if test "x$FOUND_MAKE" = x; then
8402       as_fn_error $? "The specified make (by MAKE=$MAKE) is not GNU make 3.81 or newer." "$LINENO" 5
8403     fi
8404   else
8405     # Try our hardest to locate a correct version of GNU make
8406     for ac_prog in gmake
8407 do
8408   # Extract the first word of "$ac_prog", so it can be a program name with args.
8409 set dummy $ac_prog; ac_word=$2
8410 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8411 $as_echo_n "checking for $ac_word... " >&6; }
8412 if ${ac_cv_path_CHECK_GMAKE+:} false; then :
8413   $as_echo_n "(cached) " >&6
8414 else
8415   case $CHECK_GMAKE in
8416   [\\/]* | ?:[\\/]*)
8417   ac_cv_path_CHECK_GMAKE="$CHECK_GMAKE" # Let the user override the test with a path.
8418   ;;
8419   *)
8420   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8421 for as_dir in $PATH
8422 do
8423   IFS=$as_save_IFS
8424   test -z "$as_dir" && as_dir=.
8425     for ac_exec_ext in '' $ac_executable_extensions; do
8426   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8427     ac_cv_path_CHECK_GMAKE="$as_dir/$ac_word$ac_exec_ext"
8428     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8429     break 2
8430   fi
8431 done
8432   done
8433 IFS=$as_save_IFS
8434 
8435   ;;
8436 esac
8437 fi
8438 CHECK_GMAKE=$ac_cv_path_CHECK_GMAKE
8439 if test -n "$CHECK_GMAKE"; then
8440   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_GMAKE" >&5
8441 $as_echo "$CHECK_GMAKE" >&6; }
8442 else
8443   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8444 $as_echo "no" >&6; }
8445 fi
8446 
8447 
8448   test -n "$CHECK_GMAKE" && break
8449 done
8450 
8451 
8452   MAKE_CANDIDATE=""$CHECK_GMAKE""
8453   DESCRIPTION="gmake in PATH"
8454   if test "x$MAKE_CANDIDATE" != x; then
8455     { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
8456 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
8457     MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
8458     IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
8459     if test "x$IS_GNU_MAKE" = x; then
8460       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
8461 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
8462     else
8463       IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'`
8464       if test "x$IS_MODERN_MAKE" = x; then
8465         { $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
8466 $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;}
8467       else
8468         if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
8469           if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8470             MAKE_EXPECTED_ENV='cygwin'
8471           elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8472             MAKE_EXPECTED_ENV='msys'
8473           else
8474             as_fn_error $? "Unknown Windows environment" "$LINENO" 5
8475           fi
8476           MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
8477           IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
8478         else
8479           # Not relevant for non-Windows
8480           IS_MAKE_CORRECT_ENV=true
8481         fi
8482         if test "x$IS_MAKE_CORRECT_ENV" = x; then
8483           { $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
8484 $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;}
8485         else
8486           FOUND_MAKE=$MAKE_CANDIDATE
8487 
8488   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8489 
8490   # First separate the path from the arguments. This will split at the first
8491   # space.
8492   complete="$FOUND_MAKE"
8493   path="${complete%% *}"
8494   tmp="$complete EOL"
8495   arguments="${tmp#* }"
8496 
8497   # Input might be given as Windows format, start by converting to
8498   # unix format.
8499   new_path=`$CYGPATH -u "$path"`
8500 
8501   # Now try to locate executable using which
8502   new_path=`$WHICH "$new_path" 2> /dev/null`
8503   # bat and cmd files are not always considered executable in cygwin causing which
8504   # to not find them
8505   if test "x$new_path" = x \
8506            && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8507            && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8508     new_path=`$CYGPATH -u "$path"`
8509   fi
8510   if test "x$new_path" = x; then
8511     # Oops. Which didn't find the executable.
8512     # The splitting of arguments from the executable at a space might have been incorrect,
8513     # since paths with space are more likely in Windows. Give it another try with the whole
8514     # argument.
8515     path="$complete"
8516     arguments="EOL"
8517     new_path=`$CYGPATH -u "$path"`
8518     new_path=`$WHICH "$new_path" 2> /dev/null`
8519     # bat and cmd files are not always considered executable in cygwin causing which
8520     # to not find them
8521     if test "x$new_path" = x \
8522              && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8523              && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8524       new_path=`$CYGPATH -u "$path"`
8525     fi
8526     if test "x$new_path" = x; then
8527       # It's still not found. Now this is an unrecoverable error.
8528       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8529 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8530       has_space=`$ECHO "$complete" | $GREP " "`
8531       if test "x$has_space" != x; then
8532         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8533 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8534       fi
8535       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8536     fi
8537   fi
8538 
8539   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
8540   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
8541   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
8542   # "foo.exe" is OK but "foo" is an error.
8543   #
8544   # This test is therefore slightly more accurate than "test -f" to check for file precense.
8545   # It is also a way to make sure we got the proper file name for the real test later on.
8546   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
8547   if test "x$test_shortpath" = x; then
8548     # Short path failed, file does not exist as specified.
8549     # Try adding .exe or .cmd
8550     if test -f "${new_path}.exe"; then
8551        input_to_shortpath="${new_path}.exe"
8552     elif test -f "${new_path}.cmd"; then
8553        input_to_shortpath="${new_path}.cmd"
8554     else
8555       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
8556 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
8557       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
8558 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
8559       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8560     fi
8561   else
8562     input_to_shortpath="$new_path"
8563   fi
8564 
8565   # Call helper function which possibly converts this using DOS-style short mode.
8566   # If so, the updated path is stored in $new_path.
8567   new_path="$input_to_shortpath"
8568 
8569   input_path="$input_to_shortpath"
8570   # Check if we need to convert this using DOS-style short mode. If the path
8571   # contains just simple characters, use it. Otherwise (spaces, weird characters),
8572   # take no chances and rewrite it.
8573   # Note: m4 eats our [], so we need to use [ and ] instead.
8574   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
8575   if test "x$has_forbidden_chars" != x; then
8576     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8577     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
8578     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
8579     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
8580       # Going to short mode and back again did indeed matter. Since short mode is
8581       # case insensitive, let's make it lowercase to improve readability.
8582       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8583       # Now convert it back to Unix-stile (cygpath)
8584       input_path=`$CYGPATH -u "$shortmode_path"`
8585       new_path="$input_path"
8586     fi
8587   fi
8588 
8589   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
8590   if test "x$test_cygdrive_prefix" = x; then
8591     # As a simple fix, exclude /usr/bin since it's not a real path.
8592     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
8593       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
8594       # a path prefixed by /cygdrive for fixpath to work.
8595       new_path="$CYGWIN_ROOT_PATH$input_path"
8596     fi
8597   fi
8598 
8599   # remove trailing .exe if any
8600   new_path="${new_path/%.exe/}"
8601 
8602   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8603 
8604   # First separate the path from the arguments. This will split at the first
8605   # space.
8606   complete="$FOUND_MAKE"
8607   path="${complete%% *}"
8608   tmp="$complete EOL"
8609   arguments="${tmp#* }"
8610 
8611   # Input might be given as Windows format, start by converting to
8612   # unix format.
8613   new_path="$path"
8614 
8615   windows_path="$new_path"
8616   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8617     unix_path=`$CYGPATH -u "$windows_path"`
8618     new_path="$unix_path"
8619   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8620     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8621     new_path="$unix_path"
8622   fi
8623 
8624 
8625   # Now try to locate executable using which
8626   new_path=`$WHICH "$new_path" 2> /dev/null`
8627 
8628   if test "x$new_path" = x; then
8629     # Oops. Which didn't find the executable.
8630     # The splitting of arguments from the executable at a space might have been incorrect,
8631     # since paths with space are more likely in Windows. Give it another try with the whole
8632     # argument.
8633     path="$complete"
8634     arguments="EOL"
8635     new_path="$path"
8636 
8637   windows_path="$new_path"
8638   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8639     unix_path=`$CYGPATH -u "$windows_path"`
8640     new_path="$unix_path"
8641   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8642     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8643     new_path="$unix_path"
8644   fi
8645 
8646 
8647     new_path=`$WHICH "$new_path" 2> /dev/null`
8648 
8649     if test "x$new_path" = x; then
8650       # It's still not found. Now this is an unrecoverable error.
8651       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8652 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8653       has_space=`$ECHO "$complete" | $GREP " "`
8654       if test "x$has_space" != x; then
8655         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8656 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8657       fi
8658       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8659     fi
8660   fi
8661 
8662   # Now new_path has a complete unix path to the binary
8663   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
8664     # Keep paths in /bin as-is, but remove trailing .exe if any
8665     new_path="${new_path/%.exe/}"
8666     # Do not save /bin paths to all_fixpath_prefixes!
8667   else
8668     # Not in mixed or Windows style, start by that.
8669     new_path=`cmd //c echo $new_path`
8670 
8671   input_path="$new_path"
8672   # Check if we need to convert this using DOS-style short mode. If the path
8673   # contains just simple characters, use it. Otherwise (spaces, weird characters),
8674   # take no chances and rewrite it.
8675   # Note: m4 eats our [], so we need to use [ and ] instead.
8676   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
8677   if test "x$has_forbidden_chars" != x; then
8678     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8679     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8680   fi
8681 
8682     # Output is in $new_path
8683 
8684   windows_path="$new_path"
8685   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8686     unix_path=`$CYGPATH -u "$windows_path"`
8687     new_path="$unix_path"
8688   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8689     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8690     new_path="$unix_path"
8691   fi
8692 
8693     # remove trailing .exe if any
8694     new_path="${new_path/%.exe/}"
8695 
8696     # Save the first 10 bytes of this path to the storage, so fixpath can work.
8697     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
8698   fi
8699 
8700   else
8701     # We're on a posix platform. Hooray! :)
8702     # First separate the path from the arguments. This will split at the first
8703     # space.
8704     complete="$FOUND_MAKE"
8705     path="${complete%% *}"
8706     tmp="$complete EOL"
8707     arguments="${tmp#* }"
8708 
8709     # Cannot rely on the command "which" here since it doesn't always work.
8710     is_absolute_path=`$ECHO "$path" | $GREP ^/`
8711     if test -z "$is_absolute_path"; then
8712       # Path to executable is not absolute. Find it.
8713       IFS_save="$IFS"
8714       IFS=:
8715       for p in $PATH; do
8716         if test -f "$p/$path" && test -x "$p/$path"; then
8717           new_path="$p/$path"
8718           break
8719         fi
8720       done
8721       IFS="$IFS_save"
8722     else
8723       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
8724 $as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
8725       new_path="$path"
8726     fi
8727 
8728     if test "x$new_path" = x; then
8729         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8730 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8731         has_space=`$ECHO "$complete" | $GREP " "`
8732         if test "x$has_space" != x; then
8733           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
8734 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
8735         fi
8736         as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8737       fi
8738   fi
8739 
8740       # Now join together the path and the arguments once again
8741       if test "x$arguments" != xEOL; then
8742         new_complete="$new_path ${arguments% *}"
8743       else
8744         new_complete="$new_path"
8745       fi
8746 
8747   if test "x$complete" != "x$new_complete"; then
8748       FOUND_MAKE="$new_complete"
8749       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
8750 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
8751     fi
8752 
8753         fi
8754       fi
8755     fi
8756   fi
8757 
8758 
8759     if test "x$FOUND_MAKE" = x; then
8760       for ac_prog in make
8761 do
8762   # Extract the first word of "$ac_prog", so it can be a program name with args.
8763 set dummy $ac_prog; ac_word=$2
8764 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8765 $as_echo_n "checking for $ac_word... " >&6; }
8766 if ${ac_cv_path_CHECK_MAKE+:} false; then :
8767   $as_echo_n "(cached) " >&6
8768 else
8769   case $CHECK_MAKE in
8770   [\\/]* | ?:[\\/]*)
8771   ac_cv_path_CHECK_MAKE="$CHECK_MAKE" # Let the user override the test with a path.
8772   ;;
8773   *)
8774   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8775 for as_dir in $PATH
8776 do
8777   IFS=$as_save_IFS
8778   test -z "$as_dir" && as_dir=.
8779     for ac_exec_ext in '' $ac_executable_extensions; do
8780   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8781     ac_cv_path_CHECK_MAKE="$as_dir/$ac_word$ac_exec_ext"
8782     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8783     break 2
8784   fi
8785 done
8786   done
8787 IFS=$as_save_IFS
8788 
8789   ;;
8790 esac
8791 fi
8792 CHECK_MAKE=$ac_cv_path_CHECK_MAKE
8793 if test -n "$CHECK_MAKE"; then
8794   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_MAKE" >&5
8795 $as_echo "$CHECK_MAKE" >&6; }
8796 else
8797   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8798 $as_echo "no" >&6; }
8799 fi
8800 
8801 
8802   test -n "$CHECK_MAKE" && break
8803 done
8804 
8805 
8806   MAKE_CANDIDATE=""$CHECK_MAKE""
8807   DESCRIPTION="make in PATH"
8808   if test "x$MAKE_CANDIDATE" != x; then
8809     { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
8810 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
8811     MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
8812     IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
8813     if test "x$IS_GNU_MAKE" = x; then
8814       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
8815 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
8816     else
8817       IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'`
8818       if test "x$IS_MODERN_MAKE" = x; then
8819         { $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
8820 $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;}
8821       else
8822         if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
8823           if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8824             MAKE_EXPECTED_ENV='cygwin'
8825           elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8826             MAKE_EXPECTED_ENV='msys'
8827           else
8828             as_fn_error $? "Unknown Windows environment" "$LINENO" 5
8829           fi
8830           MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
8831           IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
8832         else
8833           # Not relevant for non-Windows
8834           IS_MAKE_CORRECT_ENV=true
8835         fi
8836         if test "x$IS_MAKE_CORRECT_ENV" = x; then
8837           { $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
8838 $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;}
8839         else
8840           FOUND_MAKE=$MAKE_CANDIDATE
8841 
8842   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8843 
8844   # First separate the path from the arguments. This will split at the first
8845   # space.
8846   complete="$FOUND_MAKE"
8847   path="${complete%% *}"
8848   tmp="$complete EOL"
8849   arguments="${tmp#* }"
8850 
8851   # Input might be given as Windows format, start by converting to
8852   # unix format.
8853   new_path=`$CYGPATH -u "$path"`
8854 
8855   # Now try to locate executable using which
8856   new_path=`$WHICH "$new_path" 2> /dev/null`
8857   # bat and cmd files are not always considered executable in cygwin causing which
8858   # to not find them
8859   if test "x$new_path" = x \
8860            && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8861            && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8862     new_path=`$CYGPATH -u "$path"`
8863   fi
8864   if test "x$new_path" = x; then
8865     # Oops. Which didn't find the executable.
8866     # The splitting of arguments from the executable at a space might have been incorrect,
8867     # since paths with space are more likely in Windows. Give it another try with the whole
8868     # argument.
8869     path="$complete"
8870     arguments="EOL"
8871     new_path=`$CYGPATH -u "$path"`
8872     new_path=`$WHICH "$new_path" 2> /dev/null`
8873     # bat and cmd files are not always considered executable in cygwin causing which
8874     # to not find them
8875     if test "x$new_path" = x \
8876              && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8877              && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8878       new_path=`$CYGPATH -u "$path"`
8879     fi
8880     if test "x$new_path" = x; then
8881       # It's still not found. Now this is an unrecoverable error.
8882       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8883 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8884       has_space=`$ECHO "$complete" | $GREP " "`
8885       if test "x$has_space" != x; then
8886         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8887 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8888       fi
8889       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8890     fi
8891   fi
8892 
8893   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
8894   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
8895   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
8896   # "foo.exe" is OK but "foo" is an error.
8897   #
8898   # This test is therefore slightly more accurate than "test -f" to check for file precense.
8899   # It is also a way to make sure we got the proper file name for the real test later on.
8900   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
8901   if test "x$test_shortpath" = x; then
8902     # Short path failed, file does not exist as specified.
8903     # Try adding .exe or .cmd
8904     if test -f "${new_path}.exe"; then
8905        input_to_shortpath="${new_path}.exe"
8906     elif test -f "${new_path}.cmd"; then
8907        input_to_shortpath="${new_path}.cmd"
8908     else
8909       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
8910 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
8911       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
8912 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
8913       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8914     fi
8915   else
8916     input_to_shortpath="$new_path"
8917   fi
8918 
8919   # Call helper function which possibly converts this using DOS-style short mode.
8920   # If so, the updated path is stored in $new_path.
8921   new_path="$input_to_shortpath"
8922 
8923   input_path="$input_to_shortpath"
8924   # Check if we need to convert this using DOS-style short mode. If the path
8925   # contains just simple characters, use it. Otherwise (spaces, weird characters),
8926   # take no chances and rewrite it.
8927   # Note: m4 eats our [], so we need to use [ and ] instead.
8928   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
8929   if test "x$has_forbidden_chars" != x; then
8930     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8931     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
8932     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
8933     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
8934       # Going to short mode and back again did indeed matter. Since short mode is
8935       # case insensitive, let's make it lowercase to improve readability.
8936       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8937       # Now convert it back to Unix-stile (cygpath)
8938       input_path=`$CYGPATH -u "$shortmode_path"`
8939       new_path="$input_path"
8940     fi
8941   fi
8942 
8943   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
8944   if test "x$test_cygdrive_prefix" = x; then
8945     # As a simple fix, exclude /usr/bin since it's not a real path.
8946     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
8947       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
8948       # a path prefixed by /cygdrive for fixpath to work.
8949       new_path="$CYGWIN_ROOT_PATH$input_path"
8950     fi
8951   fi
8952 
8953   # remove trailing .exe if any
8954   new_path="${new_path/%.exe/}"
8955 
8956   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8957 
8958   # First separate the path from the arguments. This will split at the first
8959   # space.
8960   complete="$FOUND_MAKE"
8961   path="${complete%% *}"
8962   tmp="$complete EOL"
8963   arguments="${tmp#* }"
8964 
8965   # Input might be given as Windows format, start by converting to
8966   # unix format.
8967   new_path="$path"
8968 
8969   windows_path="$new_path"
8970   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8971     unix_path=`$CYGPATH -u "$windows_path"`
8972     new_path="$unix_path"
8973   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8974     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8975     new_path="$unix_path"
8976   fi
8977 
8978 
8979   # Now try to locate executable using which
8980   new_path=`$WHICH "$new_path" 2> /dev/null`
8981 
8982   if test "x$new_path" = x; then
8983     # Oops. Which didn't find the executable.
8984     # The splitting of arguments from the executable at a space might have been incorrect,
8985     # since paths with space are more likely in Windows. Give it another try with the whole
8986     # argument.
8987     path="$complete"
8988     arguments="EOL"
8989     new_path="$path"
8990 
8991   windows_path="$new_path"
8992   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8993     unix_path=`$CYGPATH -u "$windows_path"`
8994     new_path="$unix_path"
8995   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8996     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8997     new_path="$unix_path"
8998   fi
8999 
9000 
9001     new_path=`$WHICH "$new_path" 2> /dev/null`
9002 
9003     if test "x$new_path" = x; then
9004       # It's still not found. Now this is an unrecoverable error.
9005       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9006 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9007       has_space=`$ECHO "$complete" | $GREP " "`
9008       if test "x$has_space" != x; then
9009         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9010 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9011       fi
9012       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9013     fi
9014   fi
9015 
9016   # Now new_path has a complete unix path to the binary
9017   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
9018     # Keep paths in /bin as-is, but remove trailing .exe if any
9019     new_path="${new_path/%.exe/}"
9020     # Do not save /bin paths to all_fixpath_prefixes!
9021   else
9022     # Not in mixed or Windows style, start by that.
9023     new_path=`cmd //c echo $new_path`
9024 
9025   input_path="$new_path"
9026   # Check if we need to convert this using DOS-style short mode. If the path
9027   # contains just simple characters, use it. Otherwise (spaces, weird characters),
9028   # take no chances and rewrite it.
9029   # Note: m4 eats our [], so we need to use [ and ] instead.
9030   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
9031   if test "x$has_forbidden_chars" != x; then
9032     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9033     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9034   fi
9035 
9036     # Output is in $new_path
9037 
9038   windows_path="$new_path"
9039   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9040     unix_path=`$CYGPATH -u "$windows_path"`
9041     new_path="$unix_path"
9042   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9043     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9044     new_path="$unix_path"
9045   fi
9046 
9047     # remove trailing .exe if any
9048     new_path="${new_path/%.exe/}"
9049 
9050     # Save the first 10 bytes of this path to the storage, so fixpath can work.
9051     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
9052   fi
9053 
9054   else
9055     # We're on a posix platform. Hooray! :)
9056     # First separate the path from the arguments. This will split at the first
9057     # space.
9058     complete="$FOUND_MAKE"
9059     path="${complete%% *}"
9060     tmp="$complete EOL"
9061     arguments="${tmp#* }"
9062 
9063     # Cannot rely on the command "which" here since it doesn't always work.
9064     is_absolute_path=`$ECHO "$path" | $GREP ^/`
9065     if test -z "$is_absolute_path"; then
9066       # Path to executable is not absolute. Find it.
9067       IFS_save="$IFS"
9068       IFS=:
9069       for p in $PATH; do
9070         if test -f "$p/$path" && test -x "$p/$path"; then
9071           new_path="$p/$path"
9072           break
9073         fi
9074       done
9075       IFS="$IFS_save"
9076     else
9077       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
9078 $as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
9079       new_path="$path"
9080     fi
9081 
9082     if test "x$new_path" = x; then
9083         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9084 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9085         has_space=`$ECHO "$complete" | $GREP " "`
9086         if test "x$has_space" != x; then
9087           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
9088 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
9089         fi
9090         as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9091       fi
9092   fi
9093 
9094       # Now join together the path and the arguments once again
9095       if test "x$arguments" != xEOL; then
9096         new_complete="$new_path ${arguments% *}"
9097       else
9098         new_complete="$new_path"
9099       fi
9100 
9101   if test "x$complete" != "x$new_complete"; then
9102       FOUND_MAKE="$new_complete"
9103       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
9104 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
9105     fi
9106 
9107         fi
9108       fi
9109     fi
9110   fi
9111 
9112     fi
9113 
9114     if test "x$FOUND_MAKE" = x; then
9115       if test "x$TOOLS_DIR" != x; then
9116         # We have a tools-dir, check that as well before giving up.
9117         OLD_PATH=$PATH
9118         PATH=$TOOLS_DIR:$PATH
9119         for ac_prog in gmake
9120 do
9121   # Extract the first word of "$ac_prog", so it can be a program name with args.
9122 set dummy $ac_prog; ac_word=$2
9123 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9124 $as_echo_n "checking for $ac_word... " >&6; }
9125 if ${ac_cv_path_CHECK_TOOLSDIR_GMAKE+:} false; then :
9126   $as_echo_n "(cached) " >&6
9127 else
9128   case $CHECK_TOOLSDIR_GMAKE in
9129   [\\/]* | ?:[\\/]*)
9130   ac_cv_path_CHECK_TOOLSDIR_GMAKE="$CHECK_TOOLSDIR_GMAKE" # Let the user override the test with a path.
9131   ;;
9132   *)
9133   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9134 for as_dir in $PATH
9135 do
9136   IFS=$as_save_IFS
9137   test -z "$as_dir" && as_dir=.
9138     for ac_exec_ext in '' $ac_executable_extensions; do
9139   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9140     ac_cv_path_CHECK_TOOLSDIR_GMAKE="$as_dir/$ac_word$ac_exec_ext"
9141     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9142     break 2
9143   fi
9144 done
9145   done
9146 IFS=$as_save_IFS
9147 
9148   ;;
9149 esac
9150 fi
9151 CHECK_TOOLSDIR_GMAKE=$ac_cv_path_CHECK_TOOLSDIR_GMAKE
9152 if test -n "$CHECK_TOOLSDIR_GMAKE"; then
9153   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_GMAKE" >&5
9154 $as_echo "$CHECK_TOOLSDIR_GMAKE" >&6; }
9155 else
9156   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9157 $as_echo "no" >&6; }
9158 fi
9159 
9160 
9161   test -n "$CHECK_TOOLSDIR_GMAKE" && break
9162 done
9163 
9164 
9165   MAKE_CANDIDATE=""$CHECK_TOOLSDIR_GMAKE""
9166   DESCRIPTION="gmake in tools-dir"
9167   if test "x$MAKE_CANDIDATE" != x; then
9168     { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
9169 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
9170     MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
9171     IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
9172     if test "x$IS_GNU_MAKE" = x; then
9173       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
9174 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
9175     else
9176       IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'`
9177       if test "x$IS_MODERN_MAKE" = x; then
9178         { $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
9179 $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;}
9180       else
9181         if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
9182           if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9183             MAKE_EXPECTED_ENV='cygwin'
9184           elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9185             MAKE_EXPECTED_ENV='msys'
9186           else
9187             as_fn_error $? "Unknown Windows environment" "$LINENO" 5
9188           fi
9189           MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
9190           IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
9191         else
9192           # Not relevant for non-Windows
9193           IS_MAKE_CORRECT_ENV=true
9194         fi
9195         if test "x$IS_MAKE_CORRECT_ENV" = x; then
9196           { $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
9197 $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;}
9198         else
9199           FOUND_MAKE=$MAKE_CANDIDATE
9200 
9201   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9202 
9203   # First separate the path from the arguments. This will split at the first
9204   # space.
9205   complete="$FOUND_MAKE"
9206   path="${complete%% *}"
9207   tmp="$complete EOL"
9208   arguments="${tmp#* }"
9209 
9210   # Input might be given as Windows format, start by converting to
9211   # unix format.
9212   new_path=`$CYGPATH -u "$path"`
9213 
9214   # Now try to locate executable using which
9215   new_path=`$WHICH "$new_path" 2> /dev/null`
9216   # bat and cmd files are not always considered executable in cygwin causing which
9217   # to not find them
9218   if test "x$new_path" = x \
9219            && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
9220            && test "x`$LS \"$path\" 2>/dev/null`" != x; then
9221     new_path=`$CYGPATH -u "$path"`
9222   fi
9223   if test "x$new_path" = x; then
9224     # Oops. Which didn't find the executable.
9225     # The splitting of arguments from the executable at a space might have been incorrect,
9226     # since paths with space are more likely in Windows. Give it another try with the whole
9227     # argument.
9228     path="$complete"
9229     arguments="EOL"
9230     new_path=`$CYGPATH -u "$path"`
9231     new_path=`$WHICH "$new_path" 2> /dev/null`
9232     # bat and cmd files are not always considered executable in cygwin causing which
9233     # to not find them
9234     if test "x$new_path" = x \
9235              && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
9236              && test "x`$LS \"$path\" 2>/dev/null`" != x; then
9237       new_path=`$CYGPATH -u "$path"`
9238     fi
9239     if test "x$new_path" = x; then
9240       # It's still not found. Now this is an unrecoverable error.
9241       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9242 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9243       has_space=`$ECHO "$complete" | $GREP " "`
9244       if test "x$has_space" != x; then
9245         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9246 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9247       fi
9248       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9249     fi
9250   fi
9251 
9252   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
9253   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
9254   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
9255   # "foo.exe" is OK but "foo" is an error.
9256   #
9257   # This test is therefore slightly more accurate than "test -f" to check for file precense.
9258   # It is also a way to make sure we got the proper file name for the real test later on.
9259   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
9260   if test "x$test_shortpath" = x; then
9261     # Short path failed, file does not exist as specified.
9262     # Try adding .exe or .cmd
9263     if test -f "${new_path}.exe"; then
9264        input_to_shortpath="${new_path}.exe"
9265     elif test -f "${new_path}.cmd"; then
9266        input_to_shortpath="${new_path}.cmd"
9267     else
9268       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
9269 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
9270       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
9271 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
9272       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9273     fi
9274   else
9275     input_to_shortpath="$new_path"
9276   fi
9277 
9278   # Call helper function which possibly converts this using DOS-style short mode.
9279   # If so, the updated path is stored in $new_path.
9280   new_path="$input_to_shortpath"
9281 
9282   input_path="$input_to_shortpath"
9283   # Check if we need to convert this using DOS-style short mode. If the path
9284   # contains just simple characters, use it. Otherwise (spaces, weird characters),
9285   # take no chances and rewrite it.
9286   # Note: m4 eats our [], so we need to use [ and ] instead.
9287   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
9288   if test "x$has_forbidden_chars" != x; then
9289     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9290     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
9291     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
9292     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
9293       # Going to short mode and back again did indeed matter. Since short mode is
9294       # case insensitive, let's make it lowercase to improve readability.
9295       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9296       # Now convert it back to Unix-stile (cygpath)
9297       input_path=`$CYGPATH -u "$shortmode_path"`
9298       new_path="$input_path"
9299     fi
9300   fi
9301 
9302   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
9303   if test "x$test_cygdrive_prefix" = x; then
9304     # As a simple fix, exclude /usr/bin since it's not a real path.
9305     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
9306       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
9307       # a path prefixed by /cygdrive for fixpath to work.
9308       new_path="$CYGWIN_ROOT_PATH$input_path"
9309     fi
9310   fi
9311 
9312   # remove trailing .exe if any
9313   new_path="${new_path/%.exe/}"
9314 
9315   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9316 
9317   # First separate the path from the arguments. This will split at the first
9318   # space.
9319   complete="$FOUND_MAKE"
9320   path="${complete%% *}"
9321   tmp="$complete EOL"
9322   arguments="${tmp#* }"
9323 
9324   # Input might be given as Windows format, start by converting to
9325   # unix format.
9326   new_path="$path"
9327 
9328   windows_path="$new_path"
9329   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9330     unix_path=`$CYGPATH -u "$windows_path"`
9331     new_path="$unix_path"
9332   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9333     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9334     new_path="$unix_path"
9335   fi
9336 
9337 
9338   # Now try to locate executable using which
9339   new_path=`$WHICH "$new_path" 2> /dev/null`
9340 
9341   if test "x$new_path" = x; then
9342     # Oops. Which didn't find the executable.
9343     # The splitting of arguments from the executable at a space might have been incorrect,
9344     # since paths with space are more likely in Windows. Give it another try with the whole
9345     # argument.
9346     path="$complete"
9347     arguments="EOL"
9348     new_path="$path"
9349 
9350   windows_path="$new_path"
9351   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9352     unix_path=`$CYGPATH -u "$windows_path"`
9353     new_path="$unix_path"
9354   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9355     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9356     new_path="$unix_path"
9357   fi
9358 
9359 
9360     new_path=`$WHICH "$new_path" 2> /dev/null`
9361 
9362     if test "x$new_path" = x; then
9363       # It's still not found. Now this is an unrecoverable error.
9364       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9365 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9366       has_space=`$ECHO "$complete" | $GREP " "`
9367       if test "x$has_space" != x; then
9368         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9369 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9370       fi
9371       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9372     fi
9373   fi
9374 
9375   # Now new_path has a complete unix path to the binary
9376   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
9377     # Keep paths in /bin as-is, but remove trailing .exe if any
9378     new_path="${new_path/%.exe/}"
9379     # Do not save /bin paths to all_fixpath_prefixes!
9380   else
9381     # Not in mixed or Windows style, start by that.
9382     new_path=`cmd //c echo $new_path`
9383 
9384   input_path="$new_path"
9385   # Check if we need to convert this using DOS-style short mode. If the path
9386   # contains just simple characters, use it. Otherwise (spaces, weird characters),
9387   # take no chances and rewrite it.
9388   # Note: m4 eats our [], so we need to use [ and ] instead.
9389   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
9390   if test "x$has_forbidden_chars" != x; then
9391     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9392     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9393   fi
9394 
9395     # Output is in $new_path
9396 
9397   windows_path="$new_path"
9398   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9399     unix_path=`$CYGPATH -u "$windows_path"`
9400     new_path="$unix_path"
9401   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9402     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9403     new_path="$unix_path"
9404   fi
9405 
9406     # remove trailing .exe if any
9407     new_path="${new_path/%.exe/}"
9408 
9409     # Save the first 10 bytes of this path to the storage, so fixpath can work.
9410     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
9411   fi
9412 
9413   else
9414     # We're on a posix platform. Hooray! :)
9415     # First separate the path from the arguments. This will split at the first
9416     # space.
9417     complete="$FOUND_MAKE"
9418     path="${complete%% *}"
9419     tmp="$complete EOL"
9420     arguments="${tmp#* }"
9421 
9422     # Cannot rely on the command "which" here since it doesn't always work.
9423     is_absolute_path=`$ECHO "$path" | $GREP ^/`
9424     if test -z "$is_absolute_path"; then
9425       # Path to executable is not absolute. Find it.
9426       IFS_save="$IFS"
9427       IFS=:
9428       for p in $PATH; do
9429         if test -f "$p/$path" && test -x "$p/$path"; then
9430           new_path="$p/$path"
9431           break
9432         fi
9433       done
9434       IFS="$IFS_save"
9435     else
9436       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
9437 $as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
9438       new_path="$path"
9439     fi
9440 
9441     if test "x$new_path" = x; then
9442         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9443 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9444         has_space=`$ECHO "$complete" | $GREP " "`
9445         if test "x$has_space" != x; then
9446           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
9447 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
9448         fi
9449         as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9450       fi
9451   fi
9452 
9453       # Now join together the path and the arguments once again
9454       if test "x$arguments" != xEOL; then
9455         new_complete="$new_path ${arguments% *}"
9456       else
9457         new_complete="$new_path"
9458       fi
9459 
9460   if test "x$complete" != "x$new_complete"; then
9461       FOUND_MAKE="$new_complete"
9462       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
9463 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
9464     fi
9465 
9466         fi
9467       fi
9468     fi
9469   fi
9470 
9471         if test "x$FOUND_MAKE" = x; then
9472           for ac_prog in make
9473 do
9474   # Extract the first word of "$ac_prog", so it can be a program name with args.
9475 set dummy $ac_prog; ac_word=$2
9476 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9477 $as_echo_n "checking for $ac_word... " >&6; }
9478 if ${ac_cv_path_CHECK_TOOLSDIR_MAKE+:} false; then :
9479   $as_echo_n "(cached) " >&6
9480 else
9481   case $CHECK_TOOLSDIR_MAKE in
9482   [\\/]* | ?:[\\/]*)
9483   ac_cv_path_CHECK_TOOLSDIR_MAKE="$CHECK_TOOLSDIR_MAKE" # Let the user override the test with a path.
9484   ;;
9485   *)
9486   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9487 for as_dir in $PATH
9488 do
9489   IFS=$as_save_IFS
9490   test -z "$as_dir" && as_dir=.
9491     for ac_exec_ext in '' $ac_executable_extensions; do
9492   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9493     ac_cv_path_CHECK_TOOLSDIR_MAKE="$as_dir/$ac_word$ac_exec_ext"
9494     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9495     break 2
9496   fi
9497 done
9498   done
9499 IFS=$as_save_IFS
9500 
9501   ;;
9502 esac
9503 fi
9504 CHECK_TOOLSDIR_MAKE=$ac_cv_path_CHECK_TOOLSDIR_MAKE
9505 if test -n "$CHECK_TOOLSDIR_MAKE"; then
9506   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_MAKE" >&5
9507 $as_echo "$CHECK_TOOLSDIR_MAKE" >&6; }
9508 else
9509   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9510 $as_echo "no" >&6; }
9511 fi
9512 
9513 
9514   test -n "$CHECK_TOOLSDIR_MAKE" && break
9515 done
9516 
9517 
9518   MAKE_CANDIDATE=""$CHECK_TOOLSDIR_MAKE""
9519   DESCRIPTION="make in tools-dir"
9520   if test "x$MAKE_CANDIDATE" != x; then
9521     { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
9522 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
9523     MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
9524     IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
9525     if test "x$IS_GNU_MAKE" = x; then
9526       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
9527 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
9528     else
9529       IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'`
9530       if test "x$IS_MODERN_MAKE" = x; then
9531         { $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
9532 $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;}
9533       else
9534         if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
9535           if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9536             MAKE_EXPECTED_ENV='cygwin'
9537           elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9538             MAKE_EXPECTED_ENV='msys'
9539           else
9540             as_fn_error $? "Unknown Windows environment" "$LINENO" 5
9541           fi
9542           MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
9543           IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
9544         else
9545           # Not relevant for non-Windows
9546           IS_MAKE_CORRECT_ENV=true
9547         fi
9548         if test "x$IS_MAKE_CORRECT_ENV" = x; then
9549           { $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
9550 $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;}
9551         else
9552           FOUND_MAKE=$MAKE_CANDIDATE
9553 
9554   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9555 
9556   # First separate the path from the arguments. This will split at the first
9557   # space.
9558   complete="$FOUND_MAKE"
9559   path="${complete%% *}"
9560   tmp="$complete EOL"
9561   arguments="${tmp#* }"
9562 
9563   # Input might be given as Windows format, start by converting to
9564   # unix format.
9565   new_path=`$CYGPATH -u "$path"`
9566 
9567   # Now try to locate executable using which
9568   new_path=`$WHICH "$new_path" 2> /dev/null`
9569   # bat and cmd files are not always considered executable in cygwin causing which
9570   # to not find them
9571   if test "x$new_path" = x \
9572            && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
9573            && test "x`$LS \"$path\" 2>/dev/null`" != x; then
9574     new_path=`$CYGPATH -u "$path"`
9575   fi
9576   if test "x$new_path" = x; then
9577     # Oops. Which didn't find the executable.
9578     # The splitting of arguments from the executable at a space might have been incorrect,
9579     # since paths with space are more likely in Windows. Give it another try with the whole
9580     # argument.
9581     path="$complete"
9582     arguments="EOL"
9583     new_path=`$CYGPATH -u "$path"`
9584     new_path=`$WHICH "$new_path" 2> /dev/null`
9585     # bat and cmd files are not always considered executable in cygwin causing which
9586     # to not find them
9587     if test "x$new_path" = x \
9588              && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
9589              && test "x`$LS \"$path\" 2>/dev/null`" != x; then
9590       new_path=`$CYGPATH -u "$path"`
9591     fi
9592     if test "x$new_path" = x; then
9593       # It's still not found. Now this is an unrecoverable error.
9594       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9595 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9596       has_space=`$ECHO "$complete" | $GREP " "`
9597       if test "x$has_space" != x; then
9598         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9599 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9600       fi
9601       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9602     fi
9603   fi
9604 
9605   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
9606   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
9607   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
9608   # "foo.exe" is OK but "foo" is an error.
9609   #
9610   # This test is therefore slightly more accurate than "test -f" to check for file precense.
9611   # It is also a way to make sure we got the proper file name for the real test later on.
9612   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
9613   if test "x$test_shortpath" = x; then
9614     # Short path failed, file does not exist as specified.
9615     # Try adding .exe or .cmd
9616     if test -f "${new_path}.exe"; then
9617        input_to_shortpath="${new_path}.exe"
9618     elif test -f "${new_path}.cmd"; then
9619        input_to_shortpath="${new_path}.cmd"
9620     else
9621       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
9622 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
9623       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
9624 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
9625       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9626     fi
9627   else
9628     input_to_shortpath="$new_path"
9629   fi
9630 
9631   # Call helper function which possibly converts this using DOS-style short mode.
9632   # If so, the updated path is stored in $new_path.
9633   new_path="$input_to_shortpath"
9634 
9635   input_path="$input_to_shortpath"
9636   # Check if we need to convert this using DOS-style short mode. If the path
9637   # contains just simple characters, use it. Otherwise (spaces, weird characters),
9638   # take no chances and rewrite it.
9639   # Note: m4 eats our [], so we need to use [ and ] instead.
9640   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
9641   if test "x$has_forbidden_chars" != x; then
9642     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9643     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
9644     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
9645     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
9646       # Going to short mode and back again did indeed matter. Since short mode is
9647       # case insensitive, let's make it lowercase to improve readability.
9648       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9649       # Now convert it back to Unix-stile (cygpath)
9650       input_path=`$CYGPATH -u "$shortmode_path"`
9651       new_path="$input_path"
9652     fi
9653   fi
9654 
9655   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
9656   if test "x$test_cygdrive_prefix" = x; then
9657     # As a simple fix, exclude /usr/bin since it's not a real path.
9658     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
9659       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
9660       # a path prefixed by /cygdrive for fixpath to work.
9661       new_path="$CYGWIN_ROOT_PATH$input_path"
9662     fi
9663   fi
9664 
9665   # remove trailing .exe if any
9666   new_path="${new_path/%.exe/}"
9667 
9668   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9669 
9670   # First separate the path from the arguments. This will split at the first
9671   # space.
9672   complete="$FOUND_MAKE"
9673   path="${complete%% *}"
9674   tmp="$complete EOL"
9675   arguments="${tmp#* }"
9676 
9677   # Input might be given as Windows format, start by converting to
9678   # unix format.
9679   new_path="$path"
9680 
9681   windows_path="$new_path"
9682   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9683     unix_path=`$CYGPATH -u "$windows_path"`
9684     new_path="$unix_path"
9685   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9686     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9687     new_path="$unix_path"
9688   fi
9689 
9690 
9691   # Now try to locate executable using which
9692   new_path=`$WHICH "$new_path" 2> /dev/null`
9693 
9694   if test "x$new_path" = x; then
9695     # Oops. Which didn't find the executable.
9696     # The splitting of arguments from the executable at a space might have been incorrect,
9697     # since paths with space are more likely in Windows. Give it another try with the whole
9698     # argument.
9699     path="$complete"
9700     arguments="EOL"
9701     new_path="$path"
9702 
9703   windows_path="$new_path"
9704   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9705     unix_path=`$CYGPATH -u "$windows_path"`
9706     new_path="$unix_path"
9707   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9708     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9709     new_path="$unix_path"
9710   fi
9711 
9712 
9713     new_path=`$WHICH "$new_path" 2> /dev/null`
9714 
9715     if test "x$new_path" = x; then
9716       # It's still not found. Now this is an unrecoverable error.
9717       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9718 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9719       has_space=`$ECHO "$complete" | $GREP " "`
9720       if test "x$has_space" != x; then
9721         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9722 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9723       fi
9724       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9725     fi
9726   fi
9727 
9728   # Now new_path has a complete unix path to the binary
9729   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
9730     # Keep paths in /bin as-is, but remove trailing .exe if any
9731     new_path="${new_path/%.exe/}"
9732     # Do not save /bin paths to all_fixpath_prefixes!
9733   else
9734     # Not in mixed or Windows style, start by that.
9735     new_path=`cmd //c echo $new_path`
9736 
9737   input_path="$new_path"
9738   # Check if we need to convert this using DOS-style short mode. If the path
9739   # contains just simple characters, use it. Otherwise (spaces, weird characters),
9740   # take no chances and rewrite it.
9741   # Note: m4 eats our [], so we need to use [ and ] instead.
9742   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
9743   if test "x$has_forbidden_chars" != x; then
9744     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9745     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9746   fi
9747 
9748     # Output is in $new_path
9749 
9750   windows_path="$new_path"
9751   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9752     unix_path=`$CYGPATH -u "$windows_path"`
9753     new_path="$unix_path"
9754   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9755     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9756     new_path="$unix_path"
9757   fi
9758 
9759     # remove trailing .exe if any
9760     new_path="${new_path/%.exe/}"
9761 
9762     # Save the first 10 bytes of this path to the storage, so fixpath can work.
9763     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
9764   fi
9765 
9766   else
9767     # We're on a posix platform. Hooray! :)
9768     # First separate the path from the arguments. This will split at the first
9769     # space.
9770     complete="$FOUND_MAKE"
9771     path="${complete%% *}"
9772     tmp="$complete EOL"
9773     arguments="${tmp#* }"
9774 
9775     # Cannot rely on the command "which" here since it doesn't always work.
9776     is_absolute_path=`$ECHO "$path" | $GREP ^/`
9777     if test -z "$is_absolute_path"; then
9778       # Path to executable is not absolute. Find it.
9779       IFS_save="$IFS"
9780       IFS=:
9781       for p in $PATH; do
9782         if test -f "$p/$path" && test -x "$p/$path"; then
9783           new_path="$p/$path"
9784           break
9785         fi
9786       done
9787       IFS="$IFS_save"
9788     else
9789       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
9790 $as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
9791       new_path="$path"
9792     fi
9793 
9794     if test "x$new_path" = x; then
9795         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9796 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9797         has_space=`$ECHO "$complete" | $GREP " "`
9798         if test "x$has_space" != x; then
9799           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
9800 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
9801         fi
9802         as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9803       fi
9804   fi
9805 
9806       # Now join together the path and the arguments once again
9807       if test "x$arguments" != xEOL; then
9808         new_complete="$new_path ${arguments% *}"
9809       else
9810         new_complete="$new_path"
9811       fi
9812 
9813   if test "x$complete" != "x$new_complete"; then
9814       FOUND_MAKE="$new_complete"
9815       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
9816 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
9817     fi
9818 
9819         fi
9820       fi
9821     fi
9822   fi
9823 
9824         fi
9825         PATH=$OLD_PATH
9826       fi
9827     fi
9828 
9829     if test "x$FOUND_MAKE" = x; then
9830       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
9831     fi
9832   fi
9833 
9834   MAKE=$FOUND_MAKE
9835 
9836   { $as_echo "$as_me:${as_lineno-$LINENO}: Using GNU make 3.81 (or later) at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&5
9837 $as_echo "$as_me: Using GNU make 3.81 (or later) at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&6;}
9838 
9839 
9840 
9841     # Test if find supports -delete
9842     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if find supports -delete" >&5
9843 $as_echo_n "checking if find supports -delete... " >&6; }
9844     FIND_DELETE="-delete"
9845 
9846     DELETEDIR=`$MKTEMP -d tmp.XXXXXXXXXX` || (echo Could not create temporary directory!; exit $?)
9847 
9848     echo Hejsan > $DELETEDIR/TestIfFindSupportsDelete
9849 
9850     TEST_DELETE=`$FIND "$DELETEDIR" -name TestIfFindSupportsDelete $FIND_DELETE 2>&1`
9851     if test -f $DELETEDIR/TestIfFindSupportsDelete; then
9852         # No, it does not.
9853         rm $DELETEDIR/TestIfFindSupportsDelete
9854         FIND_DELETE="-exec rm \{\} \+"
9855         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9856 $as_echo "no" >&6; }
9857     else
9858         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9859 $as_echo "yes" >&6; }
9860     fi
9861     rmdir $DELETEDIR
9862 
9863 
9864 
9865 # These tools might not be installed by default,
9866 # need hint on how to install them.
9867 
9868     for ac_prog in unzip
9869 do
9870   # Extract the first word of "$ac_prog", so it can be a program name with args.
9871 set dummy $ac_prog; ac_word=$2
9872 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9873 $as_echo_n "checking for $ac_word... " >&6; }
9874 if ${ac_cv_path_UNZIP+:} false; then :
9875   $as_echo_n "(cached) " >&6
9876 else
9877   case $UNZIP in
9878   [\\/]* | ?:[\\/]*)
9879   ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
9880   ;;
9881   *)
9882   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9883 for as_dir in $PATH
9884 do
9885   IFS=$as_save_IFS
9886   test -z "$as_dir" && as_dir=.
9887     for ac_exec_ext in '' $ac_executable_extensions; do
9888   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9889     ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
9890     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9891     break 2
9892   fi
9893 done
9894   done
9895 IFS=$as_save_IFS
9896 
9897   ;;
9898 esac
9899 fi
9900 UNZIP=$ac_cv_path_UNZIP
9901 if test -n "$UNZIP"; then
9902   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
9903 $as_echo "$UNZIP" >&6; }
9904 else
9905   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9906 $as_echo "no" >&6; }
9907 fi
9908 
9909 
9910   test -n "$UNZIP" && break
9911 done
9912 
9913 
9914     if test "x$UNZIP" = x; then
9915         if test "xunzip" = x; then
9916           PROG_NAME=unzip
9917         else
9918           PROG_NAME=unzip
9919         fi
9920         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
9921 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
9922         as_fn_error $? "Cannot continue" "$LINENO" 5
9923     fi
9924 
9925 
9926 
9927     for ac_prog in zip
9928 do
9929   # Extract the first word of "$ac_prog", so it can be a program name with args.
9930 set dummy $ac_prog; ac_word=$2
9931 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9932 $as_echo_n "checking for $ac_word... " >&6; }
9933 if ${ac_cv_path_ZIP+:} false; then :
9934   $as_echo_n "(cached) " >&6
9935 else
9936   case $ZIP in
9937   [\\/]* | ?:[\\/]*)
9938   ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
9939   ;;
9940   *)
9941   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9942 for as_dir in $PATH
9943 do
9944   IFS=$as_save_IFS
9945   test -z "$as_dir" && as_dir=.
9946     for ac_exec_ext in '' $ac_executable_extensions; do
9947   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9948     ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
9949     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9950     break 2
9951   fi
9952 done
9953   done
9954 IFS=$as_save_IFS
9955 
9956   ;;
9957 esac
9958 fi
9959 ZIP=$ac_cv_path_ZIP
9960 if test -n "$ZIP"; then
9961   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
9962 $as_echo "$ZIP" >&6; }
9963 else
9964   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9965 $as_echo "no" >&6; }
9966 fi
9967 
9968 
9969   test -n "$ZIP" && break
9970 done
9971 
9972 
9973     if test "x$ZIP" = x; then
9974         if test "xzip" = x; then
9975           PROG_NAME=zip
9976         else
9977           PROG_NAME=zip
9978         fi
9979         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
9980 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
9981         as_fn_error $? "Cannot continue" "$LINENO" 5
9982     fi
9983 
9984 
9985 
9986 # Non-required basic tools
9987 
9988 # Extract the first word of "ldd", so it can be a program name with args.
9989 set dummy ldd; ac_word=$2
9990 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9991 $as_echo_n "checking for $ac_word... " >&6; }
9992 if ${ac_cv_path_LDD+:} false; then :
9993   $as_echo_n "(cached) " >&6
9994 else
9995   case $LDD in
9996   [\\/]* | ?:[\\/]*)
9997   ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
9998   ;;
9999   *)
10000   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10001 for as_dir in $PATH
10002 do
10003   IFS=$as_save_IFS
10004   test -z "$as_dir" && as_dir=.
10005     for ac_exec_ext in '' $ac_executable_extensions; do
10006   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10007     ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
10008     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10009     break 2
10010   fi
10011 done
10012   done
10013 IFS=$as_save_IFS
10014 
10015   ;;
10016 esac
10017 fi
10018 LDD=$ac_cv_path_LDD
10019 if test -n "$LDD"; then
10020   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
10021 $as_echo "$LDD" >&6; }
10022 else
10023   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10024 $as_echo "no" >&6; }
10025 fi
10026 
10027 
10028 if test "x$LDD" = "x"; then
10029     # List shared lib dependencies is used for
10030     # debug output and checking for forbidden dependencies.
10031     # We can build without it.
10032     LDD="true"
10033 fi
10034 # Extract the first word of "otool", so it can be a program name with args.
10035 set dummy otool; ac_word=$2
10036 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10037 $as_echo_n "checking for $ac_word... " >&6; }
10038 if ${ac_cv_path_OTOOL+:} false; then :
10039   $as_echo_n "(cached) " >&6
10040 else
10041   case $OTOOL in
10042   [\\/]* | ?:[\\/]*)
10043   ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
10044   ;;
10045   *)
10046   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10047 for as_dir in $PATH
10048 do
10049   IFS=$as_save_IFS
10050   test -z "$as_dir" && as_dir=.
10051     for ac_exec_ext in '' $ac_executable_extensions; do
10052   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10053     ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
10054     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10055     break 2
10056   fi
10057 done
10058   done
10059 IFS=$as_save_IFS
10060 
10061   ;;
10062 esac
10063 fi
10064 OTOOL=$ac_cv_path_OTOOL
10065 if test -n "$OTOOL"; then
10066   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
10067 $as_echo "$OTOOL" >&6; }
10068 else
10069   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10070 $as_echo "no" >&6; }
10071 fi
10072 
10073 
10074 if test "x$OTOOL" = "x"; then
10075    OTOOL="true"
10076 fi
10077 for ac_prog in readelf greadelf
10078 do
10079   # Extract the first word of "$ac_prog", so it can be a program name with args.
10080 set dummy $ac_prog; ac_word=$2
10081 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10082 $as_echo_n "checking for $ac_word... " >&6; }
10083 if ${ac_cv_path_READELF+:} false; then :
10084   $as_echo_n "(cached) " >&6
10085 else
10086   case $READELF in
10087   [\\/]* | ?:[\\/]*)
10088   ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
10089   ;;
10090   *)
10091   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10092 for as_dir in $PATH
10093 do
10094   IFS=$as_save_IFS
10095   test -z "$as_dir" && as_dir=.
10096     for ac_exec_ext in '' $ac_executable_extensions; do
10097   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10098     ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
10099     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10100     break 2
10101   fi
10102 done
10103   done
10104 IFS=$as_save_IFS
10105 
10106   ;;
10107 esac
10108 fi
10109 READELF=$ac_cv_path_READELF
10110 if test -n "$READELF"; then
10111   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
10112 $as_echo "$READELF" >&6; }
10113 else
10114   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10115 $as_echo "no" >&6; }
10116 fi
10117 
10118 
10119   test -n "$READELF" && break
10120 done
10121 
10122 # Extract the first word of "hg", so it can be a program name with args.
10123 set dummy hg; ac_word=$2
10124 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10125 $as_echo_n "checking for $ac_word... " >&6; }
10126 if ${ac_cv_path_HG+:} false; then :
10127   $as_echo_n "(cached) " >&6
10128 else
10129   case $HG in
10130   [\\/]* | ?:[\\/]*)
10131   ac_cv_path_HG="$HG" # Let the user override the test with a path.
10132   ;;
10133   *)
10134   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10135 for as_dir in $PATH
10136 do
10137   IFS=$as_save_IFS
10138   test -z "$as_dir" && as_dir=.
10139     for ac_exec_ext in '' $ac_executable_extensions; do
10140   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10141     ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
10142     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10143     break 2
10144   fi
10145 done
10146   done
10147 IFS=$as_save_IFS
10148 
10149   ;;
10150 esac
10151 fi
10152 HG=$ac_cv_path_HG
10153 if test -n "$HG"; then
10154   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
10155 $as_echo "$HG" >&6; }
10156 else
10157   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10158 $as_echo "no" >&6; }
10159 fi
10160 
10161 
10162 # Extract the first word of "stat", so it can be a program name with args.
10163 set dummy stat; ac_word=$2
10164 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10165 $as_echo_n "checking for $ac_word... " >&6; }
10166 if ${ac_cv_path_STAT+:} false; then :
10167   $as_echo_n "(cached) " >&6
10168 else
10169   case $STAT in
10170   [\\/]* | ?:[\\/]*)
10171   ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
10172   ;;
10173   *)
10174   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10175 for as_dir in $PATH
10176 do
10177   IFS=$as_save_IFS
10178   test -z "$as_dir" && as_dir=.
10179     for ac_exec_ext in '' $ac_executable_extensions; do
10180   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10181     ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
10182     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10183     break 2
10184   fi
10185 done
10186   done
10187 IFS=$as_save_IFS
10188 
10189   ;;
10190 esac
10191 fi
10192 STAT=$ac_cv_path_STAT
10193 if test -n "$STAT"; then
10194   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
10195 $as_echo "$STAT" >&6; }
10196 else
10197   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10198 $as_echo "no" >&6; }
10199 fi
10200 
10201 
10202 # Extract the first word of "time", so it can be a program name with args.
10203 set dummy time; ac_word=$2
10204 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10205 $as_echo_n "checking for $ac_word... " >&6; }
10206 if ${ac_cv_path_TIME+:} false; then :
10207   $as_echo_n "(cached) " >&6
10208 else
10209   case $TIME in
10210   [\\/]* | ?:[\\/]*)
10211   ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
10212   ;;
10213   *)
10214   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10215 for as_dir in $PATH
10216 do
10217   IFS=$as_save_IFS
10218   test -z "$as_dir" && as_dir=.
10219     for ac_exec_ext in '' $ac_executable_extensions; do
10220   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10221     ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
10222     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10223     break 2
10224   fi
10225 done
10226   done
10227 IFS=$as_save_IFS
10228 
10229   ;;
10230 esac
10231 fi
10232 TIME=$ac_cv_path_TIME
10233 if test -n "$TIME"; then
10234   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
10235 $as_echo "$TIME" >&6; }
10236 else
10237   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10238 $as_echo "no" >&6; }
10239 fi
10240 
10241 
10242 
10243 if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
10244 
10245     for ac_prog in comm
10246 do
10247   # Extract the first word of "$ac_prog", so it can be a program name with args.
10248 set dummy $ac_prog; ac_word=$2
10249 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10250 $as_echo_n "checking for $ac_word... " >&6; }
10251 if ${ac_cv_path_COMM+:} false; then :
10252   $as_echo_n "(cached) " >&6
10253 else
10254   case $COMM in
10255   [\\/]* | ?:[\\/]*)
10256   ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
10257   ;;
10258   *)
10259   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10260 for as_dir in $PATH
10261 do
10262   IFS=$as_save_IFS
10263   test -z "$as_dir" && as_dir=.
10264     for ac_exec_ext in '' $ac_executable_extensions; do
10265   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10266     ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
10267     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10268     break 2
10269   fi
10270 done
10271   done
10272 IFS=$as_save_IFS
10273 
10274   ;;
10275 esac
10276 fi
10277 COMM=$ac_cv_path_COMM
10278 if test -n "$COMM"; then
10279   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
10280 $as_echo "$COMM" >&6; }
10281 else
10282   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10283 $as_echo "no" >&6; }
10284 fi
10285 
10286 
10287   test -n "$COMM" && break
10288 done
10289 
10290 
10291     if test "x$COMM" = x; then
10292         if test "xcomm" = x; then
10293           PROG_NAME=comm
10294         else
10295           PROG_NAME=comm
10296         fi
10297         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
10298 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
10299         as_fn_error $? "Cannot continue" "$LINENO" 5
10300     fi
10301 
10302 
10303 fi
10304 
10305 if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
10306 
10307     for ac_prog in xattr
10308 do
10309   # Extract the first word of "$ac_prog", so it can be a program name with args.
10310 set dummy $ac_prog; ac_word=$2
10311 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10312 $as_echo_n "checking for $ac_word... " >&6; }
10313 if ${ac_cv_path_XATTR+:} false; then :
10314   $as_echo_n "(cached) " >&6
10315 else
10316   case $XATTR in
10317   [\\/]* | ?:[\\/]*)
10318   ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
10319   ;;
10320   *)
10321   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10322 for as_dir in $PATH
10323 do
10324   IFS=$as_save_IFS
10325   test -z "$as_dir" && as_dir=.
10326     for ac_exec_ext in '' $ac_executable_extensions; do
10327   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10328     ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
10329     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10330     break 2
10331   fi
10332 done
10333   done
10334 IFS=$as_save_IFS
10335 
10336   ;;
10337 esac
10338 fi
10339 XATTR=$ac_cv_path_XATTR
10340 if test -n "$XATTR"; then
10341   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
10342 $as_echo "$XATTR" >&6; }
10343 else
10344   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10345 $as_echo "no" >&6; }
10346 fi
10347 
10348 
10349   test -n "$XATTR" && break
10350 done
10351 
10352 
10353     if test "x$XATTR" = x; then
10354         if test "xxattr" = x; then
10355           PROG_NAME=xattr
10356         else
10357           PROG_NAME=xattr
10358         fi
10359         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
10360 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
10361         as_fn_error $? "Cannot continue" "$LINENO" 5
10362     fi
10363 
10364 
10365   # Extract the first word of "codesign", so it can be a program name with args.
10366 set dummy codesign; ac_word=$2
10367 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10368 $as_echo_n "checking for $ac_word... " >&6; }
10369 if ${ac_cv_path_CODESIGN+:} false; then :
10370   $as_echo_n "(cached) " >&6
10371 else
10372   case $CODESIGN in
10373   [\\/]* | ?:[\\/]*)
10374   ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
10375   ;;
10376   *)
10377   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10378 for as_dir in $PATH
10379 do
10380   IFS=$as_save_IFS
10381   test -z "$as_dir" && as_dir=.
10382     for ac_exec_ext in '' $ac_executable_extensions; do
10383   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10384     ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
10385     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10386     break 2
10387   fi
10388 done
10389   done
10390 IFS=$as_save_IFS
10391 
10392   ;;
10393 esac
10394 fi
10395 CODESIGN=$ac_cv_path_CODESIGN
10396 if test -n "$CODESIGN"; then
10397   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
10398 $as_echo "$CODESIGN" >&6; }
10399 else
10400   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10401 $as_echo "no" >&6; }
10402 fi
10403 
10404 
10405   if test "x$CODESIGN" != "x"; then
10406     # Verify that the openjdk_codesign certificate is present
10407     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if openjdk_codesign certificate is present" >&5
10408 $as_echo_n "checking if openjdk_codesign certificate is present... " >&6; }
10409     rm -f codesign-testfile
10410     touch codesign-testfile
10411     codesign -s openjdk_codesign codesign-testfile 2>&5 >&5 || CODESIGN=
10412     rm -f codesign-testfile
10413     if test "x$CODESIGN" = x; then
10414       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10415 $as_echo "no" >&6; }
10416     else
10417       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10418 $as_echo "yes" >&6; }
10419     fi
10420   fi
10421 fi
10422 
10423 
10424 # Check if pkg-config is available.
10425 
10426 
10427 if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
10428         if test -n "$ac_tool_prefix"; then
10429   # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
10430 set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
10431 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10432 $as_echo_n "checking for $ac_word... " >&6; }
10433 if ${ac_cv_path_PKG_CONFIG+:} false; then :
10434   $as_echo_n "(cached) " >&6
10435 else
10436   case $PKG_CONFIG in
10437   [\\/]* | ?:[\\/]*)
10438   ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
10439   ;;
10440   *)
10441   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10442 for as_dir in $PATH
10443 do
10444   IFS=$as_save_IFS
10445   test -z "$as_dir" && as_dir=.
10446     for ac_exec_ext in '' $ac_executable_extensions; do
10447   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10448     ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
10449     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10450     break 2
10451   fi
10452 done
10453   done
10454 IFS=$as_save_IFS
10455 
10456   ;;
10457 esac
10458 fi
10459 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
10460 if test -n "$PKG_CONFIG"; then
10461   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
10462 $as_echo "$PKG_CONFIG" >&6; }
10463 else
10464   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10465 $as_echo "no" >&6; }
10466 fi
10467 
10468 
10469 fi
10470 if test -z "$ac_cv_path_PKG_CONFIG"; then
10471   ac_pt_PKG_CONFIG=$PKG_CONFIG
10472   # Extract the first word of "pkg-config", so it can be a program name with args.
10473 set dummy pkg-config; ac_word=$2
10474 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10475 $as_echo_n "checking for $ac_word... " >&6; }
10476 if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
10477   $as_echo_n "(cached) " >&6
10478 else
10479   case $ac_pt_PKG_CONFIG in
10480   [\\/]* | ?:[\\/]*)
10481   ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
10482   ;;
10483   *)
10484   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10485 for as_dir in $PATH
10486 do
10487   IFS=$as_save_IFS
10488   test -z "$as_dir" && as_dir=.
10489     for ac_exec_ext in '' $ac_executable_extensions; do
10490   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10491     ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
10492     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10493     break 2
10494   fi
10495 done
10496   done
10497 IFS=$as_save_IFS
10498 
10499   ;;
10500 esac
10501 fi
10502 ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
10503 if test -n "$ac_pt_PKG_CONFIG"; then
10504   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
10505 $as_echo "$ac_pt_PKG_CONFIG" >&6; }
10506 else
10507   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10508 $as_echo "no" >&6; }
10509 fi
10510 
10511   if test "x$ac_pt_PKG_CONFIG" = x; then
10512     PKG_CONFIG=""
10513   else
10514     case $cross_compiling:$ac_tool_warned in
10515 yes:)
10516 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
10517 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
10518 ac_tool_warned=yes ;;
10519 esac
10520     PKG_CONFIG=$ac_pt_PKG_CONFIG
10521   fi
10522 else
10523   PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
10524 fi
10525 
10526 fi
10527 if test -n "$PKG_CONFIG"; then
10528         _pkg_min_version=0.9.0
10529         { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
10530 $as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
10531         if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
10532                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10533 $as_echo "yes" >&6; }
10534         else
10535                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10536 $as_echo "no" >&6; }
10537                 PKG_CONFIG=""
10538         fi
10539 
10540 fi
10541 
10542 # After basic tools have been setup, we can check build os specific details.
10543 
10544 ###############################################################################
10545 
10546 # Note that this is the build platform OS version!
10547 
10548 OS_VERSION="`uname -r | ${SED} 's!\.! !g' | ${SED} 's!-! !g'`"
10549 OS_VERSION_MAJOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 1 -d ' '`"
10550 OS_VERSION_MINOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 2 -d ' '`"
10551 OS_VERSION_MICRO="`${ECHO} ${OS_VERSION} | ${CUT} -f 3 -d ' '`"
10552 
10553 
10554 
10555 
10556 
10557 # Setup builddeps, for automatic downloading of tools we need.
10558 # This is needed before we can call BDEPS_CHECK_MODULE, which is done in
10559 # boot-jdk setup, but we need to have basic tools setup first.
10560 
10561 
10562 # Check whether --with-builddeps-conf was given.
10563 if test "${with_builddeps_conf+set}" = set; then :
10564   withval=$with_builddeps_conf;
10565 fi
10566 
10567 
10568 
10569 # Check whether --with-builddeps-server was given.
10570 if test "${with_builddeps_server+set}" = set; then :
10571   withval=$with_builddeps_server;
10572 fi
10573 
10574 
10575 
10576 # Check whether --with-builddeps-dir was given.
10577 if test "${with_builddeps_dir+set}" = set; then :
10578   withval=$with_builddeps_dir;
10579 else
10580   with_builddeps_dir=/localhome/builddeps
10581 fi
10582 
10583 
10584 
10585 # Check whether --with-builddeps-group was given.
10586 if test "${with_builddeps_group+set}" = set; then :
10587   withval=$with_builddeps_group;
10588 fi
10589 
10590 
10591 
10592 
10593     if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
10594         if test "x$with_builddeps_conf" != x; then
10595             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for supplied builddeps configuration file" >&5
10596 $as_echo_n "checking for supplied builddeps configuration file... " >&6; }
10597             builddepsfile=$with_builddeps_conf
10598             if test -s $builddepsfile; then
10599                 . $builddepsfile
10600                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: loaded!" >&5
10601 $as_echo "loaded!" >&6; }
10602             else
10603                as_fn_error $? "The given builddeps conf file $with_builddeps_conf could not be loaded!" "$LINENO" 5
10604            fi
10605         else
10606             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builddeps.conf files in sources..." >&5
10607 $as_echo_n "checking for builddeps.conf files in sources...... " >&6; }
10608             builddepsfile=`mktemp`
10609             touch $builddepsfile
10610             # Put all found confs into a single file.
10611             find ${SRC_ROOT} -name builddeps.conf -exec cat \{\} \; >> $builddepsfile
10612             # Source the file to acquire the variables
10613             if test -s $builddepsfile; then
10614                 . $builddepsfile
10615                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: found at least one!" >&5
10616 $as_echo "found at least one!" >&6; }
10617             else
10618                as_fn_error $? "Could not find any builddeps.conf at all!" "$LINENO" 5
10619            fi
10620         fi
10621         # Create build and target names that use _ instead of "-" and ".".
10622         # This is necessary to use them in variable names.
10623         build_var=`echo ${OPENJDK_BUILD_AUTOCONF_NAME} | tr '-' '_' | tr '.' '_'`
10624         target_var=`echo ${OPENJDK_TARGET_AUTOCONF_NAME} | tr '-' '_' | tr '.' '_'`
10625         # Extract rewrite information for build and target
10626         eval rewritten_build=\${REWRITE_${build_var}}
10627         if test "x$rewritten_build" = x; then
10628             rewritten_build=${OPENJDK_BUILD_AUTOCONF_NAME}
10629             echo Build stays the same $rewritten_build
10630         else
10631             echo Rewriting build for builddeps into $rewritten_build
10632         fi
10633         eval rewritten_target=\${REWRITE_${target_var}}
10634         if test "x$rewritten_target" = x; then
10635             rewritten_target=${OPENJDK_TARGET_AUTOCONF_NAME}
10636             echo Target stays the same $rewritten_target
10637         else
10638             echo Rewriting target for builddeps into $rewritten_target
10639         fi
10640         rewritten_build_var=`echo ${rewritten_build} | tr '-' '_' | tr '.' '_'`
10641         rewritten_target_var=`echo ${rewritten_target} | tr '-' '_' | tr '.' '_'`
10642     fi
10643     for ac_prog in 7z unzip
10644 do
10645   # Extract the first word of "$ac_prog", so it can be a program name with args.
10646 set dummy $ac_prog; ac_word=$2
10647 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10648 $as_echo_n "checking for $ac_word... " >&6; }
10649 if ${ac_cv_prog_BDEPS_UNZIP+:} false; then :
10650   $as_echo_n "(cached) " >&6
10651 else
10652   if test -n "$BDEPS_UNZIP"; then
10653   ac_cv_prog_BDEPS_UNZIP="$BDEPS_UNZIP" # Let the user override the test.
10654 else
10655 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10656 for as_dir in $PATH
10657 do
10658   IFS=$as_save_IFS
10659   test -z "$as_dir" && as_dir=.
10660     for ac_exec_ext in '' $ac_executable_extensions; do
10661   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10662     ac_cv_prog_BDEPS_UNZIP="$ac_prog"
10663     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10664     break 2
10665   fi
10666 done
10667   done
10668 IFS=$as_save_IFS
10669 
10670 fi
10671 fi
10672 BDEPS_UNZIP=$ac_cv_prog_BDEPS_UNZIP
10673 if test -n "$BDEPS_UNZIP"; then
10674   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BDEPS_UNZIP" >&5
10675 $as_echo "$BDEPS_UNZIP" >&6; }
10676 else
10677   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10678 $as_echo "no" >&6; }
10679 fi
10680 
10681 
10682   test -n "$BDEPS_UNZIP" && break
10683 done
10684 
10685     if test "x$BDEPS_UNZIP" = x7z; then
10686         BDEPS_UNZIP="7z x"
10687     fi
10688 
10689     for ac_prog in wget lftp ftp
10690 do
10691   # Extract the first word of "$ac_prog", so it can be a program name with args.
10692 set dummy $ac_prog; ac_word=$2
10693 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10694 $as_echo_n "checking for $ac_word... " >&6; }
10695 if ${ac_cv_prog_BDEPS_FTP+:} false; then :
10696   $as_echo_n "(cached) " >&6
10697 else
10698   if test -n "$BDEPS_FTP"; then
10699   ac_cv_prog_BDEPS_FTP="$BDEPS_FTP" # Let the user override the test.
10700 else
10701 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10702 for as_dir in $PATH
10703 do
10704   IFS=$as_save_IFS
10705   test -z "$as_dir" && as_dir=.
10706     for ac_exec_ext in '' $ac_executable_extensions; do
10707   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10708     ac_cv_prog_BDEPS_FTP="$ac_prog"
10709     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10710     break 2
10711   fi
10712 done
10713   done
10714 IFS=$as_save_IFS
10715 
10716 fi
10717 fi
10718 BDEPS_FTP=$ac_cv_prog_BDEPS_FTP
10719 if test -n "$BDEPS_FTP"; then
10720   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BDEPS_FTP" >&5
10721 $as_echo "$BDEPS_FTP" >&6; }
10722 else
10723   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10724 $as_echo "no" >&6; }
10725 fi
10726 
10727 
10728   test -n "$BDEPS_FTP" && break
10729 done
10730 
10731 
10732 
10733 ###############################################################################
10734 #
10735 # Determine OpenJDK variants, options and version numbers.
10736 #
10737 ###############################################################################
10738 
10739 # We need build & target for this.
10740 
10741 
10742 ###############################################################################
10743 #
10744 # Should we build a JDK/JVM with headful support (ie a graphical ui)?
10745 # We always build headless support.
10746 #
10747 { $as_echo "$as_me:${as_lineno-$LINENO}: checking headful support" >&5
10748 $as_echo_n "checking headful support... " >&6; }
10749 # Check whether --enable-headful was given.
10750 if test "${enable_headful+set}" = set; then :
10751   enableval=$enable_headful; SUPPORT_HEADFUL=${enable_headful}
10752 else
10753   SUPPORT_HEADFUL=yes
10754 fi
10755 
10756 
10757 SUPPORT_HEADLESS=yes
10758 BUILD_HEADLESS="BUILD_HEADLESS:=true"
10759 
10760 if test "x$SUPPORT_HEADFUL" = xyes; then
10761     # We are building both headful and headless.
10762     headful_msg="inlude support for both headful and headless"
10763 fi
10764 
10765 if test "x$SUPPORT_HEADFUL" = xno; then
10766     # Thus we are building headless only.
10767     BUILD_HEADLESS="BUILD_HEADLESS:=true"
10768     headful_msg="headless only"
10769 fi
10770 
10771 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $headful_msg" >&5
10772 $as_echo "$headful_msg" >&6; }
10773 
10774 
10775 
10776 
10777 
10778 # Control wether Hotspot runs Queens test after build.
10779 # Check whether --enable-hotspot-test-in-build was given.
10780 if test "${enable_hotspot_test_in_build+set}" = set; then :
10781   enableval=$enable_hotspot_test_in_build;
10782 else
10783   enable_hotspot_test_in_build=no
10784 fi
10785 
10786 if test "x$enable_hotspot_test_in_build" = "xyes"; then
10787     TEST_IN_BUILD=true
10788 else
10789     TEST_IN_BUILD=false
10790 fi
10791 
10792 
10793 ###############################################################################
10794 #
10795 # Choose cacerts source file
10796 #
10797 
10798 # Check whether --with-cacerts-file was given.
10799 if test "${with_cacerts_file+set}" = set; then :
10800   withval=$with_cacerts_file;
10801 fi
10802 
10803 if test "x$with_cacerts_file" != x; then
10804     CACERTS_FILE=$with_cacerts_file
10805 else
10806     if test "x$OPENJDK" = "xtrue"; then
10807         CACERTS_FILE=${SRC_ROOT}/jdk/src/share/lib/security/cacerts
10808     else
10809         CACERTS_FILE=${SRC_ROOT}/jdk/src/closed/share/lib/security/cacerts.internal
10810     fi
10811 fi
10812 
10813 
10814 ###############################################################################
10815 #
10816 # Enable or disable unlimited crypto
10817 #
10818 # Check whether --enable-unlimited-crypto was given.
10819 if test "${enable_unlimited_crypto+set}" = set; then :
10820   enableval=$enable_unlimited_crypto;
10821 else
10822   enable_unlimited_crypto=no
10823 fi
10824 
10825 if test "x$enable_unlimited_crypto" = "xyes"; then
10826     UNLIMITED_CRYPTO=true
10827 else
10828     UNLIMITED_CRYPTO=false
10829 fi
10830 
10831 
10832 ###############################################################################
10833 #
10834 # Enable or disable the elliptic curve crypto implementation
10835 #
10836 
10837 
10838 ###############################################################################
10839 #
10840 # Compress jars
10841 #
10842 COMPRESS_JARS=false
10843 
10844 
10845 
10846 
10847 # Source the version numbers
10848 . $AUTOCONF_DIR/version-numbers
10849 
10850 # Get the settings from parameters
10851 
10852 # Check whether --with-milestone was given.
10853 if test "${with_milestone+set}" = set; then :
10854   withval=$with_milestone;
10855 fi
10856 
10857 if test "x$with_milestone" = xyes; then
10858   as_fn_error $? "Milestone must have a value" "$LINENO" 5
10859 elif test "x$with_milestone" != x; then
10860     MILESTONE="$with_milestone"
10861 fi
10862 if test "x$MILESTONE" = x; then
10863   MILESTONE=internal
10864 fi
10865 
10866 
10867 # Check whether --with-update-version was given.
10868 if test "${with_update_version+set}" = set; then :
10869   withval=$with_update_version;
10870 fi
10871 
10872 if test "x$with_update_version" = xyes; then
10873   as_fn_error $? "Update version must have a value" "$LINENO" 5
10874 elif test "x$with_update_version" != x; then
10875   JDK_UPDATE_VERSION="$with_update_version"
10876 fi
10877 
10878 
10879 # Check whether --with-build-number was given.
10880 if test "${with_build_number+set}" = set; then :
10881   withval=$with_build_number;
10882 fi
10883 
10884 if test "x$with_build_number" = xyes; then
10885   as_fn_error $? "Build number must have a value" "$LINENO" 5
10886 elif test "x$with_build_number" != x; then
10887   JDK_BUILD_NUMBER="$with_build_number"
10888 fi
10889 if test "x$JDK_BUILD_NUMBER" = x; then
10890   JDK_BUILD_NUMBER=b00
10891 fi
10892 
10893 
10894 # Check whether --with-user-release-suffix was given.
10895 if test "${with_user_release_suffix+set}" = set; then :
10896   withval=$with_user_release_suffix;
10897 fi
10898 
10899 if test "x$with_user_release_suffix" = xyes; then
10900   as_fn_error $? "Release suffix must have a value" "$LINENO" 5
10901 elif test "x$with_user_release_suffix" != x; then
10902   USER_RELEASE_SUFFIX="$with_user_release_suffix"
10903 else
10904   BUILD_DATE=`date '+%Y_%m_%d_%H_%M'`
10905   # Avoid [:alnum:] since it depends on the locale.
10906   CLEAN_USERNAME=`echo "$USER" | $TR -d -c 'abcdefghijklmnopqrstuvqxyz0123456789'`
10907   USER_RELEASE_SUFFIX=`echo "${CLEAN_USERNAME}_${BUILD_DATE}" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
10908 fi
10909 
10910 
10911 # Now set the JDK version, milestone, build number etc.
10912 
10913 
10914 
10915 
10916 
10917 
10918 
10919 
10920 
10921 
10922 
10923 
10924 
10925 
10926 COPYRIGHT_YEAR=`date +'%Y'`
10927 
10928 
10929 if test "x$JDK_UPDATE_VERSION" != x; then
10930   JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}_${JDK_UPDATE_VERSION}"
10931 else
10932   JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}"
10933 fi
10934 
10935 
10936 COOKED_BUILD_NUMBER=`$ECHO $JDK_BUILD_NUMBER | $SED -e 's/^b//' -e 's/^0//'`
10937 
10938 
10939 
10940 ###############################################################################
10941 #
10942 # Setup BootJDK, used to bootstrap the build.
10943 #
10944 ###############################################################################
10945 
10946 
10947 BOOT_JDK_FOUND=no
10948 
10949 # Check whether --with-boot-jdk was given.
10950 if test "${with_boot_jdk+set}" = set; then :
10951   withval=$with_boot_jdk;
10952 fi
10953 
10954 
10955 # We look for the Boot JDK through various means, going from more certain to
10956 # more of a guess-work. After each test, BOOT_JDK_FOUND is set to "yes" if
10957 # we detected something (if so, the path to the jdk is in BOOT_JDK). But we
10958 # must check if this is indeed valid; otherwise we'll continue looking.
10959 
10960 # Test: Is bootjdk explicitely set by command line arguments?
10961 
10962   if test "x$BOOT_JDK_FOUND" = xno; then
10963     # Now execute the test
10964 
10965 if test "x$with_boot_jdk" != x; then
10966     BOOT_JDK=$with_boot_jdk
10967     BOOT_JDK_FOUND=maybe
10968     { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using configure arguments" >&5
10969 $as_echo "$as_me: Found potential Boot JDK using configure arguments" >&6;}
10970 fi
10971 
10972 
10973     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
10974     if test "x$BOOT_JDK_FOUND" = xmaybe; then
10975       # Do we have a bin/java?
10976       if test ! -x "$BOOT_JDK/bin/java"; then
10977         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
10978 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
10979         BOOT_JDK_FOUND=no
10980       else
10981         # Do we have a bin/javac?
10982         if test ! -x "$BOOT_JDK/bin/javac"; then
10983           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
10984 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
10985           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
10986 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
10987           BOOT_JDK_FOUND=no
10988         else
10989           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
10990           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
10991             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
10992 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
10993             BOOT_JDK_FOUND=no
10994           else
10995             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
10996             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
10997 
10998             # Extra M4 quote needed to protect [] in grep expression.
10999             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
11000             if test "x$FOUND_VERSION_78" = x; then
11001               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
11002 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
11003               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
11004 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
11005               BOOT_JDK_FOUND=no
11006             else
11007               # We're done! :-)
11008               BOOT_JDK_FOUND=yes
11009 
11010   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11011 
11012   # Input might be given as Windows format, start by converting to
11013   # unix format.
11014   path="$BOOT_JDK"
11015   new_path=`$CYGPATH -u "$path"`
11016 
11017   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
11018   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
11019   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
11020   # "foo.exe" is OK but "foo" is an error.
11021   #
11022   # This test is therefore slightly more accurate than "test -f" to check for file precense.
11023   # It is also a way to make sure we got the proper file name for the real test later on.
11024   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
11025   if test "x$test_shortpath" = x; then
11026     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11027 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11028     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
11029   fi
11030 
11031   # Call helper function which possibly converts this using DOS-style short mode.
11032   # If so, the updated path is stored in $new_path.
11033 
11034   input_path="$new_path"
11035   # Check if we need to convert this using DOS-style short mode. If the path
11036   # contains just simple characters, use it. Otherwise (spaces, weird characters),
11037   # take no chances and rewrite it.
11038   # Note: m4 eats our [], so we need to use [ and ] instead.
11039   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
11040   if test "x$has_forbidden_chars" != x; then
11041     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11042     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
11043     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
11044     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
11045       # Going to short mode and back again did indeed matter. Since short mode is
11046       # case insensitive, let's make it lowercase to improve readability.
11047       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11048       # Now convert it back to Unix-stile (cygpath)
11049       input_path=`$CYGPATH -u "$shortmode_path"`
11050       new_path="$input_path"
11051     fi
11052   fi
11053 
11054   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
11055   if test "x$test_cygdrive_prefix" = x; then
11056     # As a simple fix, exclude /usr/bin since it's not a real path.
11057     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
11058       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
11059       # a path prefixed by /cygdrive for fixpath to work.
11060       new_path="$CYGWIN_ROOT_PATH$input_path"
11061     fi
11062   fi
11063 
11064 
11065   if test "x$path" != "x$new_path"; then
11066     BOOT_JDK="$new_path"
11067     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11068 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11069   fi
11070 
11071   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11072 
11073   path="$BOOT_JDK"
11074   has_colon=`$ECHO $path | $GREP ^.:`
11075   new_path="$path"
11076   if test "x$has_colon" = x; then
11077     # Not in mixed or Windows style, start by that.
11078     new_path=`cmd //c echo $path`
11079   fi
11080 
11081 
11082   input_path="$new_path"
11083   # Check if we need to convert this using DOS-style short mode. If the path
11084   # contains just simple characters, use it. Otherwise (spaces, weird characters),
11085   # take no chances and rewrite it.
11086   # Note: m4 eats our [], so we need to use [ and ] instead.
11087   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
11088   if test "x$has_forbidden_chars" != x; then
11089     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11090     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11091   fi
11092 
11093 
11094   windows_path="$new_path"
11095   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11096     unix_path=`$CYGPATH -u "$windows_path"`
11097     new_path="$unix_path"
11098   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11099     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11100     new_path="$unix_path"
11101   fi
11102 
11103   if test "x$path" != "x$new_path"; then
11104     BOOT_JDK="$new_path"
11105     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11106 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11107   fi
11108 
11109   # Save the first 10 bytes of this path to the storage, so fixpath can work.
11110   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
11111 
11112   else
11113     # We're on a posix platform. Hooray! :)
11114     path="$BOOT_JDK"
11115     has_space=`$ECHO "$path" | $GREP " "`
11116     if test "x$has_space" != x; then
11117       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11118 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11119       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
11120     fi
11121 
11122     # Use eval to expand a potential ~
11123     eval path="$path"
11124     if test ! -f "$path" && test ! -d "$path"; then
11125       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
11126     fi
11127 
11128     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
11129   fi
11130 
11131               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
11132 $as_echo_n "checking for Boot JDK... " >&6; }
11133               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
11134 $as_echo "$BOOT_JDK" >&6; }
11135               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
11136 $as_echo_n "checking Boot JDK version... " >&6; }
11137               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
11138               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
11139 $as_echo "$BOOT_JDK_VERSION" >&6; }
11140             fi # end check jdk version
11141           fi # end check rt.jar
11142         fi # end check javac
11143       fi # end check java
11144     fi # end check boot jdk found
11145   fi
11146 
11147 if test "x$with_boot_jdk" != x && test "x$BOOT_JDK_FOUND" = xno; then
11148   # Having specified an argument which is incorrect will produce an instant failure;
11149   # we should not go on looking
11150   as_fn_error $? "The path given by --with-boot-jdk does not contain a valid Boot JDK" "$LINENO" 5
11151 fi
11152 
11153 # Test: Is bootjdk available from builddeps?
11154 
11155   if test "x$BOOT_JDK_FOUND" = xno; then
11156     # Now execute the test
11157 
11158 
11159 
11160     if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
11161         # Source the builddeps file again, to make sure it uses the latest variables!
11162         . $builddepsfile
11163         # Look for a target and build machine specific resource!
11164         eval resource=\${builddep_bootjdk_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
11165         if test "x$resource" = x; then
11166             # Ok, lets instead look for a target specific resource
11167             eval resource=\${builddep_bootjdk_TARGET_${rewritten_target_var}}
11168         fi
11169         if test "x$resource" = x; then
11170             # Ok, lets instead look for a build specific resource
11171             eval resource=\${builddep_bootjdk_BUILD_${rewritten_build_var}}
11172         fi
11173         if test "x$resource" = x; then
11174             # Ok, lets instead look for a generic resource
11175             # (The bootjdk comes from M4 and not the shell, thus no need for eval here.)
11176             resource=${builddep_bootjdk}
11177         fi
11178         if test "x$resource" != x; then
11179             { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for bootjdk" >&5
11180 $as_echo "$as_me: Using builddeps $resource for bootjdk" >&6;}
11181             # If the resource in the builddeps.conf file is an existing directory,
11182             # for example /java/linux/cups
11183             if test -d ${resource}; then
11184                depdir=${resource}
11185             else
11186 
11187 # bootjdk is for example mymodule
11188 # $resource is for example libs/general/libmymod_1_2_3.zip
11189 # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
11190 # $with_builddeps_dir is for example /localhome/builddeps
11191 # depdir is the name of the variable into which we store the depdir, eg MYMOD
11192 # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
11193 # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
11194     filename=`basename $resource`
11195     filebase=`echo $filename | sed 's/\.[^\.]*$//'`
11196     filebase=${filename%%.*}
11197     extension=${filename#*.}
11198     installdir=$with_builddeps_dir/$filebase
11199     if test ! -f $installdir/$filename.unpacked; then
11200         { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency bootjdk from $with_builddeps_server/$resource and installing into $installdir" >&5
11201 $as_echo "$as_me: Downloading build dependency bootjdk from $with_builddeps_server/$resource and installing into $installdir" >&6;}
11202         if test ! -d $installdir; then
11203             mkdir -p $installdir
11204         fi
11205         if test ! -d $installdir; then
11206             as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
11207         fi
11208         tmpfile=`mktemp $installdir/bootjdk.XXXXXXXXX`
11209         touch $tmpfile
11210         if test ! -f $tmpfile; then
11211             as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
11212         fi
11213 
11214     # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
11215     # $tmpfile is the local file name for the downloaded file.
11216     VALID_TOOL=no
11217     if test "x$BDEPS_FTP" = xwget; then
11218        VALID_TOOL=yes
11219        wget -O $tmpfile $with_builddeps_server/$resource
11220     fi
11221     if test "x$BDEPS_FTP" = xlftp; then
11222        VALID_TOOL=yes
11223        lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
11224     fi
11225     if test "x$BDEPS_FTP" = xftp; then
11226         VALID_TOOL=yes
11227         FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
11228         FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
11229         FTPUSERPWD=${FTPSERVER%%@*}
11230         if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
11231             FTPUSER=${userpwd%%:*}
11232             FTPPWD=${userpwd#*@}
11233             FTPSERVER=${FTPSERVER#*@}
11234         else
11235             FTPUSER=ftp
11236             FTPPWD=ftp
11237         fi
11238         # the "pass" command does not work on some
11239         # ftp clients (read ftp.exe) but if it works,
11240         # passive mode is better!
11241         (\
11242             echo "user $FTPUSER $FTPPWD"        ;\
11243             echo "pass"                         ;\
11244             echo "bin"                          ;\
11245             echo "get $FTPPATH $tmpfile"              ;\
11246         ) | ftp -in $FTPSERVER
11247     fi
11248     if test "x$VALID_TOOL" != xyes; then
11249        as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
11250     fi
11251 
11252         mv $tmpfile $installdir/$filename
11253         if test ! -s $installdir/$filename; then
11254             as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
11255         fi
11256         case "$extension" in
11257             zip)  echo "Unzipping $installdir/$filename..."
11258                (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
11259             ;;
11260             tar.gz) echo "Untaring $installdir/$filename..."
11261                (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
11262             ;;
11263             tgz) echo "Untaring $installdir/$filename..."
11264                (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
11265             ;;
11266             *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
11267             ;;
11268         esac
11269     fi
11270     if test -f $installdir/$filename.unpacked; then
11271         depdir=$installdir
11272     fi
11273 
11274             fi
11275             # Source the builddeps file again, because in the previous command, the depdir
11276             # was updated to point at the current build dependency install directory.
11277             . $builddepsfile
11278             # Now extract variables from the builddeps.conf files.
11279             theroot=${builddep_bootjdk_ROOT}
11280             thecflags=${builddep_bootjdk_CFLAGS}
11281             thelibs=${builddep_bootjdk_LIBS}
11282             if test "x$depdir" = x; then
11283                 as_fn_error $? "Could not download build dependency bootjdk" "$LINENO" 5
11284             fi
11285             BOOT_JDK=$depdir
11286             if test "x$theroot" != x; then
11287                BOOT_JDK="$theroot"
11288             fi
11289             if test "x$thecflags" != x; then
11290                BOOT_JDK_CFLAGS="$thecflags"
11291             fi
11292             if test "x$thelibs" != x; then
11293                BOOT_JDK_LIBS="$thelibs"
11294             fi
11295             BOOT_JDK_FOUND=maybe
11296             else BOOT_JDK_FOUND=no
11297 
11298         fi
11299         else BOOT_JDK_FOUND=no
11300 
11301     fi
11302 
11303 
11304 
11305     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
11306     if test "x$BOOT_JDK_FOUND" = xmaybe; then
11307       # Do we have a bin/java?
11308       if test ! -x "$BOOT_JDK/bin/java"; then
11309         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
11310 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
11311         BOOT_JDK_FOUND=no
11312       else
11313         # Do we have a bin/javac?
11314         if test ! -x "$BOOT_JDK/bin/javac"; then
11315           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
11316 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
11317           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
11318 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
11319           BOOT_JDK_FOUND=no
11320         else
11321           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
11322           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
11323             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
11324 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
11325             BOOT_JDK_FOUND=no
11326           else
11327             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
11328             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
11329 
11330             # Extra M4 quote needed to protect [] in grep expression.
11331             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
11332             if test "x$FOUND_VERSION_78" = x; then
11333               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
11334 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
11335               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
11336 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
11337               BOOT_JDK_FOUND=no
11338             else
11339               # We're done! :-)
11340               BOOT_JDK_FOUND=yes
11341 
11342   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11343 
11344   # Input might be given as Windows format, start by converting to
11345   # unix format.
11346   path="$BOOT_JDK"
11347   new_path=`$CYGPATH -u "$path"`
11348 
11349   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
11350   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
11351   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
11352   # "foo.exe" is OK but "foo" is an error.
11353   #
11354   # This test is therefore slightly more accurate than "test -f" to check for file precense.
11355   # It is also a way to make sure we got the proper file name for the real test later on.
11356   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
11357   if test "x$test_shortpath" = x; then
11358     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11359 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11360     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
11361   fi
11362 
11363   # Call helper function which possibly converts this using DOS-style short mode.
11364   # If so, the updated path is stored in $new_path.
11365 
11366   input_path="$new_path"
11367   # Check if we need to convert this using DOS-style short mode. If the path
11368   # contains just simple characters, use it. Otherwise (spaces, weird characters),
11369   # take no chances and rewrite it.
11370   # Note: m4 eats our [], so we need to use [ and ] instead.
11371   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
11372   if test "x$has_forbidden_chars" != x; then
11373     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11374     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
11375     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
11376     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
11377       # Going to short mode and back again did indeed matter. Since short mode is
11378       # case insensitive, let's make it lowercase to improve readability.
11379       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11380       # Now convert it back to Unix-stile (cygpath)
11381       input_path=`$CYGPATH -u "$shortmode_path"`
11382       new_path="$input_path"
11383     fi
11384   fi
11385 
11386   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
11387   if test "x$test_cygdrive_prefix" = x; then
11388     # As a simple fix, exclude /usr/bin since it's not a real path.
11389     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
11390       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
11391       # a path prefixed by /cygdrive for fixpath to work.
11392       new_path="$CYGWIN_ROOT_PATH$input_path"
11393     fi
11394   fi
11395 
11396 
11397   if test "x$path" != "x$new_path"; then
11398     BOOT_JDK="$new_path"
11399     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11400 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11401   fi
11402 
11403   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11404 
11405   path="$BOOT_JDK"
11406   has_colon=`$ECHO $path | $GREP ^.:`
11407   new_path="$path"
11408   if test "x$has_colon" = x; then
11409     # Not in mixed or Windows style, start by that.
11410     new_path=`cmd //c echo $path`
11411   fi
11412 
11413 
11414   input_path="$new_path"
11415   # Check if we need to convert this using DOS-style short mode. If the path
11416   # contains just simple characters, use it. Otherwise (spaces, weird characters),
11417   # take no chances and rewrite it.
11418   # Note: m4 eats our [], so we need to use [ and ] instead.
11419   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
11420   if test "x$has_forbidden_chars" != x; then
11421     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11422     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11423   fi
11424 
11425 
11426   windows_path="$new_path"
11427   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11428     unix_path=`$CYGPATH -u "$windows_path"`
11429     new_path="$unix_path"
11430   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11431     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11432     new_path="$unix_path"
11433   fi
11434 
11435   if test "x$path" != "x$new_path"; then
11436     BOOT_JDK="$new_path"
11437     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11438 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11439   fi
11440 
11441   # Save the first 10 bytes of this path to the storage, so fixpath can work.
11442   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
11443 
11444   else
11445     # We're on a posix platform. Hooray! :)
11446     path="$BOOT_JDK"
11447     has_space=`$ECHO "$path" | $GREP " "`
11448     if test "x$has_space" != x; then
11449       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11450 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11451       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
11452     fi
11453 
11454     # Use eval to expand a potential ~
11455     eval path="$path"
11456     if test ! -f "$path" && test ! -d "$path"; then
11457       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
11458     fi
11459 
11460     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
11461   fi
11462 
11463               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
11464 $as_echo_n "checking for Boot JDK... " >&6; }
11465               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
11466 $as_echo "$BOOT_JDK" >&6; }
11467               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
11468 $as_echo_n "checking Boot JDK version... " >&6; }
11469               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
11470               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
11471 $as_echo "$BOOT_JDK_VERSION" >&6; }
11472             fi # end check jdk version
11473           fi # end check rt.jar
11474         fi # end check javac
11475       fi # end check java
11476     fi # end check boot jdk found
11477   fi
11478 
11479 
11480 # Test: Is $JAVA_HOME set?
11481 
11482   if test "x$BOOT_JDK_FOUND" = xno; then
11483     # Now execute the test
11484 
11485     if test "x$JAVA_HOME" != x; then
11486         JAVA_HOME_PROCESSED="$JAVA_HOME"
11487 
11488   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11489 
11490   # Input might be given as Windows format, start by converting to
11491   # unix format.
11492   path="$JAVA_HOME_PROCESSED"
11493   new_path=`$CYGPATH -u "$path"`
11494 
11495   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
11496   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
11497   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
11498   # "foo.exe" is OK but "foo" is an error.
11499   #
11500   # This test is therefore slightly more accurate than "test -f" to check for file precense.
11501   # It is also a way to make sure we got the proper file name for the real test later on.
11502   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
11503   if test "x$test_shortpath" = x; then
11504     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
11505 $as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
11506     as_fn_error $? "Cannot locate the the path of JAVA_HOME_PROCESSED" "$LINENO" 5
11507   fi
11508 
11509   # Call helper function which possibly converts this using DOS-style short mode.
11510   # If so, the updated path is stored in $new_path.
11511 
11512   input_path="$new_path"
11513   # Check if we need to convert this using DOS-style short mode. If the path
11514   # contains just simple characters, use it. Otherwise (spaces, weird characters),
11515   # take no chances and rewrite it.
11516   # Note: m4 eats our [], so we need to use [ and ] instead.
11517   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
11518   if test "x$has_forbidden_chars" != x; then
11519     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11520     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
11521     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
11522     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
11523       # Going to short mode and back again did indeed matter. Since short mode is
11524       # case insensitive, let's make it lowercase to improve readability.
11525       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11526       # Now convert it back to Unix-stile (cygpath)
11527       input_path=`$CYGPATH -u "$shortmode_path"`
11528       new_path="$input_path"
11529     fi
11530   fi
11531 
11532   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
11533   if test "x$test_cygdrive_prefix" = x; then
11534     # As a simple fix, exclude /usr/bin since it's not a real path.
11535     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
11536       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
11537       # a path prefixed by /cygdrive for fixpath to work.
11538       new_path="$CYGWIN_ROOT_PATH$input_path"
11539     fi
11540   fi
11541 
11542 
11543   if test "x$path" != "x$new_path"; then
11544     JAVA_HOME_PROCESSED="$new_path"
11545     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
11546 $as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
11547   fi
11548 
11549   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11550 
11551   path="$JAVA_HOME_PROCESSED"
11552   has_colon=`$ECHO $path | $GREP ^.:`
11553   new_path="$path"
11554   if test "x$has_colon" = x; then
11555     # Not in mixed or Windows style, start by that.
11556     new_path=`cmd //c echo $path`
11557   fi
11558 
11559 
11560   input_path="$new_path"
11561   # Check if we need to convert this using DOS-style short mode. If the path
11562   # contains just simple characters, use it. Otherwise (spaces, weird characters),
11563   # take no chances and rewrite it.
11564   # Note: m4 eats our [], so we need to use [ and ] instead.
11565   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
11566   if test "x$has_forbidden_chars" != x; then
11567     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11568     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11569   fi
11570 
11571 
11572   windows_path="$new_path"
11573   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11574     unix_path=`$CYGPATH -u "$windows_path"`
11575     new_path="$unix_path"
11576   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11577     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11578     new_path="$unix_path"
11579   fi
11580 
11581   if test "x$path" != "x$new_path"; then
11582     JAVA_HOME_PROCESSED="$new_path"
11583     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
11584 $as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
11585   fi
11586 
11587   # Save the first 10 bytes of this path to the storage, so fixpath can work.
11588   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
11589 
11590   else
11591     # We're on a posix platform. Hooray! :)
11592     path="$JAVA_HOME_PROCESSED"
11593     has_space=`$ECHO "$path" | $GREP " "`
11594     if test "x$has_space" != x; then
11595       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
11596 $as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
11597       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
11598     fi
11599 
11600     # Use eval to expand a potential ~
11601     eval path="$path"
11602     if test ! -f "$path" && test ! -d "$path"; then
11603       as_fn_error $? "The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is not found." "$LINENO" 5
11604     fi
11605 
11606     JAVA_HOME_PROCESSED="`cd "$path"; $THEPWDCMD -L`"
11607   fi
11608 
11609         if test ! -d "$JAVA_HOME_PROCESSED"; then
11610             { $as_echo "$as_me:${as_lineno-$LINENO}: Your JAVA_HOME points to a non-existing directory!" >&5
11611 $as_echo "$as_me: Your JAVA_HOME points to a non-existing directory!" >&6;}
11612         else
11613           # Aha, the user has set a JAVA_HOME
11614           # let us use that as the Boot JDK.
11615           BOOT_JDK="$JAVA_HOME_PROCESSED"
11616           BOOT_JDK_FOUND=maybe
11617           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using JAVA_HOME" >&5
11618 $as_echo "$as_me: Found potential Boot JDK using JAVA_HOME" >&6;}
11619         fi
11620     fi
11621 
11622 
11623     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
11624     if test "x$BOOT_JDK_FOUND" = xmaybe; then
11625       # Do we have a bin/java?
11626       if test ! -x "$BOOT_JDK/bin/java"; then
11627         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
11628 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
11629         BOOT_JDK_FOUND=no
11630       else
11631         # Do we have a bin/javac?
11632         if test ! -x "$BOOT_JDK/bin/javac"; then
11633           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
11634 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
11635           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
11636 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
11637           BOOT_JDK_FOUND=no
11638         else
11639           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
11640           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
11641             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
11642 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
11643             BOOT_JDK_FOUND=no
11644           else
11645             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
11646             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
11647 
11648             # Extra M4 quote needed to protect [] in grep expression.
11649             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
11650             if test "x$FOUND_VERSION_78" = x; then
11651               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
11652 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
11653               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
11654 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
11655               BOOT_JDK_FOUND=no
11656             else
11657               # We're done! :-)
11658               BOOT_JDK_FOUND=yes
11659 
11660   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11661 
11662   # Input might be given as Windows format, start by converting to
11663   # unix format.
11664   path="$BOOT_JDK"
11665   new_path=`$CYGPATH -u "$path"`
11666 
11667   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
11668   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
11669   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
11670   # "foo.exe" is OK but "foo" is an error.
11671   #
11672   # This test is therefore slightly more accurate than "test -f" to check for file precense.
11673   # It is also a way to make sure we got the proper file name for the real test later on.
11674   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
11675   if test "x$test_shortpath" = x; then
11676     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11677 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11678     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
11679   fi
11680 
11681   # Call helper function which possibly converts this using DOS-style short mode.
11682   # If so, the updated path is stored in $new_path.
11683 
11684   input_path="$new_path"
11685   # Check if we need to convert this using DOS-style short mode. If the path
11686   # contains just simple characters, use it. Otherwise (spaces, weird characters),
11687   # take no chances and rewrite it.
11688   # Note: m4 eats our [], so we need to use [ and ] instead.
11689   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
11690   if test "x$has_forbidden_chars" != x; then
11691     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11692     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
11693     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
11694     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
11695       # Going to short mode and back again did indeed matter. Since short mode is
11696       # case insensitive, let's make it lowercase to improve readability.
11697       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11698       # Now convert it back to Unix-stile (cygpath)
11699       input_path=`$CYGPATH -u "$shortmode_path"`
11700       new_path="$input_path"
11701     fi
11702   fi
11703 
11704   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
11705   if test "x$test_cygdrive_prefix" = x; then
11706     # As a simple fix, exclude /usr/bin since it's not a real path.
11707     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
11708       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
11709       # a path prefixed by /cygdrive for fixpath to work.
11710       new_path="$CYGWIN_ROOT_PATH$input_path"
11711     fi
11712   fi
11713 
11714 
11715   if test "x$path" != "x$new_path"; then
11716     BOOT_JDK="$new_path"
11717     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11718 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11719   fi
11720 
11721   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11722 
11723   path="$BOOT_JDK"
11724   has_colon=`$ECHO $path | $GREP ^.:`
11725   new_path="$path"
11726   if test "x$has_colon" = x; then
11727     # Not in mixed or Windows style, start by that.
11728     new_path=`cmd //c echo $path`
11729   fi
11730 
11731 
11732   input_path="$new_path"
11733   # Check if we need to convert this using DOS-style short mode. If the path
11734   # contains just simple characters, use it. Otherwise (spaces, weird characters),
11735   # take no chances and rewrite it.
11736   # Note: m4 eats our [], so we need to use [ and ] instead.
11737   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
11738   if test "x$has_forbidden_chars" != x; then
11739     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11740     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11741   fi
11742 
11743 
11744   windows_path="$new_path"
11745   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11746     unix_path=`$CYGPATH -u "$windows_path"`
11747     new_path="$unix_path"
11748   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11749     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11750     new_path="$unix_path"
11751   fi
11752 
11753   if test "x$path" != "x$new_path"; then
11754     BOOT_JDK="$new_path"
11755     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11756 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11757   fi
11758 
11759   # Save the first 10 bytes of this path to the storage, so fixpath can work.
11760   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
11761 
11762   else
11763     # We're on a posix platform. Hooray! :)
11764     path="$BOOT_JDK"
11765     has_space=`$ECHO "$path" | $GREP " "`
11766     if test "x$has_space" != x; then
11767       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11768 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11769       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
11770     fi
11771 
11772     # Use eval to expand a potential ~
11773     eval path="$path"
11774     if test ! -f "$path" && test ! -d "$path"; then
11775       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
11776     fi
11777 
11778     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
11779   fi
11780 
11781               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
11782 $as_echo_n "checking for Boot JDK... " >&6; }
11783               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
11784 $as_echo "$BOOT_JDK" >&6; }
11785               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
11786 $as_echo_n "checking Boot JDK version... " >&6; }
11787               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
11788               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
11789 $as_echo "$BOOT_JDK_VERSION" >&6; }
11790             fi # end check jdk version
11791           fi # end check rt.jar
11792         fi # end check javac
11793       fi # end check java
11794     fi # end check boot jdk found
11795   fi
11796 
11797 
11798 # Test: Is there a /usr/libexec/java_home? (Typically on MacOSX)
11799 
11800   if test "x$BOOT_JDK_FOUND" = xno; then
11801     # Now execute the test
11802 
11803     if test -x /usr/libexec/java_home; then
11804         BOOT_JDK=`/usr/libexec/java_home`
11805         BOOT_JDK_FOUND=maybe
11806         { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home" >&5
11807 $as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home" >&6;}
11808     fi
11809 
11810 
11811     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
11812     if test "x$BOOT_JDK_FOUND" = xmaybe; then
11813       # Do we have a bin/java?
11814       if test ! -x "$BOOT_JDK/bin/java"; then
11815         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
11816 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
11817         BOOT_JDK_FOUND=no
11818       else
11819         # Do we have a bin/javac?
11820         if test ! -x "$BOOT_JDK/bin/javac"; then
11821           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
11822 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
11823           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
11824 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
11825           BOOT_JDK_FOUND=no
11826         else
11827           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
11828           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
11829             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
11830 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
11831             BOOT_JDK_FOUND=no
11832           else
11833             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
11834             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
11835 
11836             # Extra M4 quote needed to protect [] in grep expression.
11837             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
11838             if test "x$FOUND_VERSION_78" = x; then
11839               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
11840 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
11841               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
11842 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
11843               BOOT_JDK_FOUND=no
11844             else
11845               # We're done! :-)
11846               BOOT_JDK_FOUND=yes
11847 
11848   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11849 
11850   # Input might be given as Windows format, start by converting to
11851   # unix format.
11852   path="$BOOT_JDK"
11853   new_path=`$CYGPATH -u "$path"`
11854 
11855   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
11856   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
11857   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
11858   # "foo.exe" is OK but "foo" is an error.
11859   #
11860   # This test is therefore slightly more accurate than "test -f" to check for file precense.
11861   # It is also a way to make sure we got the proper file name for the real test later on.
11862   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
11863   if test "x$test_shortpath" = x; then
11864     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11865 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11866     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
11867   fi
11868 
11869   # Call helper function which possibly converts this using DOS-style short mode.
11870   # If so, the updated path is stored in $new_path.
11871 
11872   input_path="$new_path"
11873   # Check if we need to convert this using DOS-style short mode. If the path
11874   # contains just simple characters, use it. Otherwise (spaces, weird characters),
11875   # take no chances and rewrite it.
11876   # Note: m4 eats our [], so we need to use [ and ] instead.
11877   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
11878   if test "x$has_forbidden_chars" != x; then
11879     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11880     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
11881     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
11882     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
11883       # Going to short mode and back again did indeed matter. Since short mode is
11884       # case insensitive, let's make it lowercase to improve readability.
11885       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11886       # Now convert it back to Unix-stile (cygpath)
11887       input_path=`$CYGPATH -u "$shortmode_path"`
11888       new_path="$input_path"
11889     fi
11890   fi
11891 
11892   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
11893   if test "x$test_cygdrive_prefix" = x; then
11894     # As a simple fix, exclude /usr/bin since it's not a real path.
11895     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
11896       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
11897       # a path prefixed by /cygdrive for fixpath to work.
11898       new_path="$CYGWIN_ROOT_PATH$input_path"
11899     fi
11900   fi
11901 
11902 
11903   if test "x$path" != "x$new_path"; then
11904     BOOT_JDK="$new_path"
11905     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11906 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11907   fi
11908 
11909   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11910 
11911   path="$BOOT_JDK"
11912   has_colon=`$ECHO $path | $GREP ^.:`
11913   new_path="$path"
11914   if test "x$has_colon" = x; then
11915     # Not in mixed or Windows style, start by that.
11916     new_path=`cmd //c echo $path`
11917   fi
11918 
11919 
11920   input_path="$new_path"
11921   # Check if we need to convert this using DOS-style short mode. If the path
11922   # contains just simple characters, use it. Otherwise (spaces, weird characters),
11923   # take no chances and rewrite it.
11924   # Note: m4 eats our [], so we need to use [ and ] instead.
11925   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
11926   if test "x$has_forbidden_chars" != x; then
11927     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11928     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11929   fi
11930 
11931 
11932   windows_path="$new_path"
11933   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11934     unix_path=`$CYGPATH -u "$windows_path"`
11935     new_path="$unix_path"
11936   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11937     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11938     new_path="$unix_path"
11939   fi
11940 
11941   if test "x$path" != "x$new_path"; then
11942     BOOT_JDK="$new_path"
11943     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11944 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11945   fi
11946 
11947   # Save the first 10 bytes of this path to the storage, so fixpath can work.
11948   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
11949 
11950   else
11951     # We're on a posix platform. Hooray! :)
11952     path="$BOOT_JDK"
11953     has_space=`$ECHO "$path" | $GREP " "`
11954     if test "x$has_space" != x; then
11955       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11956 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11957       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
11958     fi
11959 
11960     # Use eval to expand a potential ~
11961     eval path="$path"
11962     if test ! -f "$path" && test ! -d "$path"; then
11963       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
11964     fi
11965 
11966     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
11967   fi
11968 
11969               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
11970 $as_echo_n "checking for Boot JDK... " >&6; }
11971               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
11972 $as_echo "$BOOT_JDK" >&6; }
11973               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
11974 $as_echo_n "checking Boot JDK version... " >&6; }
11975               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
11976               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
11977 $as_echo "$BOOT_JDK_VERSION" >&6; }
11978             fi # end check jdk version
11979           fi # end check rt.jar
11980         fi # end check javac
11981       fi # end check java
11982     fi # end check boot jdk found
11983   fi
11984 
11985 
11986 # Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
11987 
11988   if test "x$BOOT_JDK_FOUND" = xno; then
11989     # Now execute the test
11990 
11991     # Extract the first word of "javac", so it can be a program name with args.
11992 set dummy javac; ac_word=$2
11993 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11994 $as_echo_n "checking for $ac_word... " >&6; }
11995 if ${ac_cv_path_JAVAC_CHECK+:} false; then :
11996   $as_echo_n "(cached) " >&6
11997 else
11998   case $JAVAC_CHECK in
11999   [\\/]* | ?:[\\/]*)
12000   ac_cv_path_JAVAC_CHECK="$JAVAC_CHECK" # Let the user override the test with a path.
12001   ;;
12002   *)
12003   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12004 for as_dir in $PATH
12005 do
12006   IFS=$as_save_IFS
12007   test -z "$as_dir" && as_dir=.
12008     for ac_exec_ext in '' $ac_executable_extensions; do
12009   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
12010     ac_cv_path_JAVAC_CHECK="$as_dir/$ac_word$ac_exec_ext"
12011     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12012     break 2
12013   fi
12014 done
12015   done
12016 IFS=$as_save_IFS
12017 
12018   ;;
12019 esac
12020 fi
12021 JAVAC_CHECK=$ac_cv_path_JAVAC_CHECK
12022 if test -n "$JAVAC_CHECK"; then
12023   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC_CHECK" >&5
12024 $as_echo "$JAVAC_CHECK" >&6; }
12025 else
12026   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12027 $as_echo "no" >&6; }
12028 fi
12029 
12030 
12031     # Extract the first word of "java", so it can be a program name with args.
12032 set dummy java; ac_word=$2
12033 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12034 $as_echo_n "checking for $ac_word... " >&6; }
12035 if ${ac_cv_path_JAVA_CHECK+:} false; then :
12036   $as_echo_n "(cached) " >&6
12037 else
12038   case $JAVA_CHECK in
12039   [\\/]* | ?:[\\/]*)
12040   ac_cv_path_JAVA_CHECK="$JAVA_CHECK" # Let the user override the test with a path.
12041   ;;
12042   *)
12043   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12044 for as_dir in $PATH
12045 do
12046   IFS=$as_save_IFS
12047   test -z "$as_dir" && as_dir=.
12048     for ac_exec_ext in '' $ac_executable_extensions; do
12049   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
12050     ac_cv_path_JAVA_CHECK="$as_dir/$ac_word$ac_exec_ext"
12051     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12052     break 2
12053   fi
12054 done
12055   done
12056 IFS=$as_save_IFS
12057 
12058   ;;
12059 esac
12060 fi
12061 JAVA_CHECK=$ac_cv_path_JAVA_CHECK
12062 if test -n "$JAVA_CHECK"; then
12063   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA_CHECK" >&5
12064 $as_echo "$JAVA_CHECK" >&6; }
12065 else
12066   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12067 $as_echo "no" >&6; }
12068 fi
12069 
12070 
12071     BINARY="$JAVAC_CHECK"
12072     if test "x$JAVAC_CHECK" = x; then
12073         BINARY="$JAVA_CHECK"
12074     fi
12075     if test "x$BINARY" != x; then
12076         # So there is a java(c) binary, it might be part of a JDK.
12077         # Lets find the JDK/JRE directory by following symbolic links.
12078         # Linux/GNU systems often have links from /usr/bin/java to
12079         # /etc/alternatives/java to the real JDK binary.
12080 
12081     if test "x$OPENJDK_BUILD_OS" != xwindows; then
12082         # Follow a chain of symbolic links. Use readlink
12083         # where it exists, else fall back to horribly
12084         # complicated shell code.
12085         if test "x$READLINK_TESTED" != yes; then
12086             # On MacOSX there is a readlink tool with a different
12087             # purpose than the GNU readlink tool. Check the found readlink.
12088             ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
12089             if test "x$ISGNU" = x; then
12090                  # A readlink that we do not know how to use.
12091                  # Are there other non-GNU readlinks out there?
12092                  READLINK_TESTED=yes
12093                  READLINK=
12094             fi
12095         fi
12096 
12097         if test "x$READLINK" != x; then
12098             BINARY=`$READLINK -f $BINARY`
12099         else
12100             # Save the current directory for restoring afterwards
12101             STARTDIR=$PWD
12102             COUNTER=0
12103             sym_link_dir=`$DIRNAME $BINARY`
12104             sym_link_file=`$BASENAME $BINARY`
12105             cd $sym_link_dir
12106             # Use -P flag to resolve symlinks in directories.
12107             cd `$THEPWDCMD -P`
12108             sym_link_dir=`$THEPWDCMD -P`
12109             # Resolve file symlinks
12110             while test $COUNTER -lt 20; do
12111                 ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
12112                 if test "x$ISLINK" == x; then
12113                     # This is not a symbolic link! We are done!
12114                     break
12115                 fi
12116                 # Again resolve directory symlinks since the target of the just found
12117                 # link could be in a different directory
12118                 cd `$DIRNAME $ISLINK`
12119                 sym_link_dir=`$THEPWDCMD -P`
12120                 sym_link_file=`$BASENAME $ISLINK`
12121                 let COUNTER=COUNTER+1
12122             done
12123             cd $STARTDIR
12124             BINARY=$sym_link_dir/$sym_link_file
12125         fi
12126     fi
12127 
12128         BOOT_JDK=`dirname "$BINARY"`
12129         BOOT_JDK=`cd "$BOOT_JDK/.."; pwd`
12130         if test -x "$BOOT_JDK/bin/javac" && test -x "$BOOT_JDK/bin/java"; then
12131             # Looks like we found ourselves an JDK
12132             BOOT_JDK_FOUND=maybe
12133             { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using java(c) in PATH" >&5
12134 $as_echo "$as_me: Found potential Boot JDK using java(c) in PATH" >&6;}
12135         fi
12136     fi
12137 
12138 
12139     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12140     if test "x$BOOT_JDK_FOUND" = xmaybe; then
12141       # Do we have a bin/java?
12142       if test ! -x "$BOOT_JDK/bin/java"; then
12143         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12144 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12145         BOOT_JDK_FOUND=no
12146       else
12147         # Do we have a bin/javac?
12148         if test ! -x "$BOOT_JDK/bin/javac"; then
12149           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12150 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12151           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12152 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12153           BOOT_JDK_FOUND=no
12154         else
12155           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12156           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12157             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12158 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12159             BOOT_JDK_FOUND=no
12160           else
12161             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12162             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12163 
12164             # Extra M4 quote needed to protect [] in grep expression.
12165             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12166             if test "x$FOUND_VERSION_78" = x; then
12167               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12168 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12169               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12170 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12171               BOOT_JDK_FOUND=no
12172             else
12173               # We're done! :-)
12174               BOOT_JDK_FOUND=yes
12175 
12176   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12177 
12178   # Input might be given as Windows format, start by converting to
12179   # unix format.
12180   path="$BOOT_JDK"
12181   new_path=`$CYGPATH -u "$path"`
12182 
12183   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12184   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12185   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12186   # "foo.exe" is OK but "foo" is an error.
12187   #
12188   # This test is therefore slightly more accurate than "test -f" to check for file precense.
12189   # It is also a way to make sure we got the proper file name for the real test later on.
12190   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12191   if test "x$test_shortpath" = x; then
12192     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12193 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12194     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12195   fi
12196 
12197   # Call helper function which possibly converts this using DOS-style short mode.
12198   # If so, the updated path is stored in $new_path.
12199 
12200   input_path="$new_path"
12201   # Check if we need to convert this using DOS-style short mode. If the path
12202   # contains just simple characters, use it. Otherwise (spaces, weird characters),
12203   # take no chances and rewrite it.
12204   # Note: m4 eats our [], so we need to use [ and ] instead.
12205   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12206   if test "x$has_forbidden_chars" != x; then
12207     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12208     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12209     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12210     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12211       # Going to short mode and back again did indeed matter. Since short mode is
12212       # case insensitive, let's make it lowercase to improve readability.
12213       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12214       # Now convert it back to Unix-stile (cygpath)
12215       input_path=`$CYGPATH -u "$shortmode_path"`
12216       new_path="$input_path"
12217     fi
12218   fi
12219 
12220   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12221   if test "x$test_cygdrive_prefix" = x; then
12222     # As a simple fix, exclude /usr/bin since it's not a real path.
12223     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12224       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12225       # a path prefixed by /cygdrive for fixpath to work.
12226       new_path="$CYGWIN_ROOT_PATH$input_path"
12227     fi
12228   fi
12229 
12230 
12231   if test "x$path" != "x$new_path"; then
12232     BOOT_JDK="$new_path"
12233     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12234 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12235   fi
12236 
12237   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12238 
12239   path="$BOOT_JDK"
12240   has_colon=`$ECHO $path | $GREP ^.:`
12241   new_path="$path"
12242   if test "x$has_colon" = x; then
12243     # Not in mixed or Windows style, start by that.
12244     new_path=`cmd //c echo $path`
12245   fi
12246 
12247 
12248   input_path="$new_path"
12249   # Check if we need to convert this using DOS-style short mode. If the path
12250   # contains just simple characters, use it. Otherwise (spaces, weird characters),
12251   # take no chances and rewrite it.
12252   # Note: m4 eats our [], so we need to use [ and ] instead.
12253   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12254   if test "x$has_forbidden_chars" != x; then
12255     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12256     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12257   fi
12258 
12259 
12260   windows_path="$new_path"
12261   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12262     unix_path=`$CYGPATH -u "$windows_path"`
12263     new_path="$unix_path"
12264   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12265     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12266     new_path="$unix_path"
12267   fi
12268 
12269   if test "x$path" != "x$new_path"; then
12270     BOOT_JDK="$new_path"
12271     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12272 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12273   fi
12274 
12275   # Save the first 10 bytes of this path to the storage, so fixpath can work.
12276   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12277 
12278   else
12279     # We're on a posix platform. Hooray! :)
12280     path="$BOOT_JDK"
12281     has_space=`$ECHO "$path" | $GREP " "`
12282     if test "x$has_space" != x; then
12283       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12284 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12285       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
12286     fi
12287 
12288     # Use eval to expand a potential ~
12289     eval path="$path"
12290     if test ! -f "$path" && test ! -d "$path"; then
12291       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
12292     fi
12293 
12294     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
12295   fi
12296 
12297               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12298 $as_echo_n "checking for Boot JDK... " >&6; }
12299               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12300 $as_echo "$BOOT_JDK" >&6; }
12301               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12302 $as_echo_n "checking Boot JDK version... " >&6; }
12303               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12304               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12305 $as_echo "$BOOT_JDK_VERSION" >&6; }
12306             fi # end check jdk version
12307           fi # end check rt.jar
12308         fi # end check javac
12309       fi # end check java
12310     fi # end check boot jdk found
12311   fi
12312 
12313 
12314 # Test: Is there a JDK installed in default, well-known locations?
12315 
12316   if test "x$BOOT_JDK_FOUND" = xno; then
12317     # Now execute the test
12318 
12319   if test "x$OPENJDK_TARGET_OS" = xwindows; then
12320 
12321   if test "x$BOOT_JDK_FOUND" = xno; then
12322     # Now execute the test
12323 
12324   if test "x$ProgramW6432" != x; then
12325     VIRTUAL_DIR="$ProgramW6432/Java"
12326 
12327   windows_path="$VIRTUAL_DIR"
12328   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12329     unix_path=`$CYGPATH -u "$windows_path"`
12330     VIRTUAL_DIR="$unix_path"
12331   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12332     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12333     VIRTUAL_DIR="$unix_path"
12334   fi
12335 
12336 
12337   BOOT_JDK_PREFIX="$VIRTUAL_DIR"
12338   BOOT_JDK_SUFFIX=""
12339   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
12340   if test "x$ALL_JDKS_FOUND" != x; then
12341     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
12342 
12343   if test "x$BOOT_JDK_FOUND" = xno; then
12344     # Now execute the test
12345 
12346         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
12347         if test -d "$BOOT_JDK"; then
12348           BOOT_JDK_FOUND=maybe
12349           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
12350 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
12351         fi
12352 
12353 
12354     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12355     if test "x$BOOT_JDK_FOUND" = xmaybe; then
12356       # Do we have a bin/java?
12357       if test ! -x "$BOOT_JDK/bin/java"; then
12358         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12359 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12360         BOOT_JDK_FOUND=no
12361       else
12362         # Do we have a bin/javac?
12363         if test ! -x "$BOOT_JDK/bin/javac"; then
12364           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12365 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12366           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12367 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12368           BOOT_JDK_FOUND=no
12369         else
12370           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12371           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12372             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12373 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12374             BOOT_JDK_FOUND=no
12375           else
12376             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12377             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12378 
12379             # Extra M4 quote needed to protect [] in grep expression.
12380             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12381             if test "x$FOUND_VERSION_78" = x; then
12382               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12383 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12384               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12385 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12386               BOOT_JDK_FOUND=no
12387             else
12388               # We're done! :-)
12389               BOOT_JDK_FOUND=yes
12390 
12391   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12392 
12393   # Input might be given as Windows format, start by converting to
12394   # unix format.
12395   path="$BOOT_JDK"
12396   new_path=`$CYGPATH -u "$path"`
12397 
12398   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12399   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12400   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12401   # "foo.exe" is OK but "foo" is an error.
12402   #
12403   # This test is therefore slightly more accurate than "test -f" to check for file precense.
12404   # It is also a way to make sure we got the proper file name for the real test later on.
12405   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12406   if test "x$test_shortpath" = x; then
12407     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12408 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12409     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12410   fi
12411 
12412   # Call helper function which possibly converts this using DOS-style short mode.
12413   # If so, the updated path is stored in $new_path.
12414 
12415   input_path="$new_path"
12416   # Check if we need to convert this using DOS-style short mode. If the path
12417   # contains just simple characters, use it. Otherwise (spaces, weird characters),
12418   # take no chances and rewrite it.
12419   # Note: m4 eats our [], so we need to use [ and ] instead.
12420   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12421   if test "x$has_forbidden_chars" != x; then
12422     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12423     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12424     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12425     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12426       # Going to short mode and back again did indeed matter. Since short mode is
12427       # case insensitive, let's make it lowercase to improve readability.
12428       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12429       # Now convert it back to Unix-stile (cygpath)
12430       input_path=`$CYGPATH -u "$shortmode_path"`
12431       new_path="$input_path"
12432     fi
12433   fi
12434 
12435   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12436   if test "x$test_cygdrive_prefix" = x; then
12437     # As a simple fix, exclude /usr/bin since it's not a real path.
12438     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12439       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12440       # a path prefixed by /cygdrive for fixpath to work.
12441       new_path="$CYGWIN_ROOT_PATH$input_path"
12442     fi
12443   fi
12444 
12445 
12446   if test "x$path" != "x$new_path"; then
12447     BOOT_JDK="$new_path"
12448     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12449 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12450   fi
12451 
12452   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12453 
12454   path="$BOOT_JDK"
12455   has_colon=`$ECHO $path | $GREP ^.:`
12456   new_path="$path"
12457   if test "x$has_colon" = x; then
12458     # Not in mixed or Windows style, start by that.
12459     new_path=`cmd //c echo $path`
12460   fi
12461 
12462 
12463   input_path="$new_path"
12464   # Check if we need to convert this using DOS-style short mode. If the path
12465   # contains just simple characters, use it. Otherwise (spaces, weird characters),
12466   # take no chances and rewrite it.
12467   # Note: m4 eats our [], so we need to use [ and ] instead.
12468   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12469   if test "x$has_forbidden_chars" != x; then
12470     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12471     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12472   fi
12473 
12474 
12475   windows_path="$new_path"
12476   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12477     unix_path=`$CYGPATH -u "$windows_path"`
12478     new_path="$unix_path"
12479   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12480     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12481     new_path="$unix_path"
12482   fi
12483 
12484   if test "x$path" != "x$new_path"; then
12485     BOOT_JDK="$new_path"
12486     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12487 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12488   fi
12489 
12490   # Save the first 10 bytes of this path to the storage, so fixpath can work.
12491   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12492 
12493   else
12494     # We're on a posix platform. Hooray! :)
12495     path="$BOOT_JDK"
12496     has_space=`$ECHO "$path" | $GREP " "`
12497     if test "x$has_space" != x; then
12498       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12499 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12500       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
12501     fi
12502 
12503     # Use eval to expand a potential ~
12504     eval path="$path"
12505     if test ! -f "$path" && test ! -d "$path"; then
12506       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
12507     fi
12508 
12509     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
12510   fi
12511 
12512               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12513 $as_echo_n "checking for Boot JDK... " >&6; }
12514               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12515 $as_echo "$BOOT_JDK" >&6; }
12516               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12517 $as_echo_n "checking Boot JDK version... " >&6; }
12518               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12519               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12520 $as_echo "$BOOT_JDK_VERSION" >&6; }
12521             fi # end check jdk version
12522           fi # end check rt.jar
12523         fi # end check javac
12524       fi # end check java
12525     fi # end check boot jdk found
12526   fi
12527 
12528     done
12529   fi
12530 
12531   fi
12532 
12533 
12534     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12535     if test "x$BOOT_JDK_FOUND" = xmaybe; then
12536       # Do we have a bin/java?
12537       if test ! -x "$BOOT_JDK/bin/java"; then
12538         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12539 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12540         BOOT_JDK_FOUND=no
12541       else
12542         # Do we have a bin/javac?
12543         if test ! -x "$BOOT_JDK/bin/javac"; then
12544           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12545 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12546           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12547 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12548           BOOT_JDK_FOUND=no
12549         else
12550           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12551           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12552             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12553 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12554             BOOT_JDK_FOUND=no
12555           else
12556             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12557             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12558 
12559             # Extra M4 quote needed to protect [] in grep expression.
12560             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12561             if test "x$FOUND_VERSION_78" = x; then
12562               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12563 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12564               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12565 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12566               BOOT_JDK_FOUND=no
12567             else
12568               # We're done! :-)
12569               BOOT_JDK_FOUND=yes
12570 
12571   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12572 
12573   # Input might be given as Windows format, start by converting to
12574   # unix format.
12575   path="$BOOT_JDK"
12576   new_path=`$CYGPATH -u "$path"`
12577 
12578   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12579   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12580   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12581   # "foo.exe" is OK but "foo" is an error.
12582   #
12583   # This test is therefore slightly more accurate than "test -f" to check for file precense.
12584   # It is also a way to make sure we got the proper file name for the real test later on.
12585   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12586   if test "x$test_shortpath" = x; then
12587     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12588 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12589     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12590   fi
12591 
12592   # Call helper function which possibly converts this using DOS-style short mode.
12593   # If so, the updated path is stored in $new_path.
12594 
12595   input_path="$new_path"
12596   # Check if we need to convert this using DOS-style short mode. If the path
12597   # contains just simple characters, use it. Otherwise (spaces, weird characters),
12598   # take no chances and rewrite it.
12599   # Note: m4 eats our [], so we need to use [ and ] instead.
12600   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12601   if test "x$has_forbidden_chars" != x; then
12602     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12603     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12604     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12605     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12606       # Going to short mode and back again did indeed matter. Since short mode is
12607       # case insensitive, let's make it lowercase to improve readability.
12608       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12609       # Now convert it back to Unix-stile (cygpath)
12610       input_path=`$CYGPATH -u "$shortmode_path"`
12611       new_path="$input_path"
12612     fi
12613   fi
12614 
12615   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12616   if test "x$test_cygdrive_prefix" = x; then
12617     # As a simple fix, exclude /usr/bin since it's not a real path.
12618     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12619       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12620       # a path prefixed by /cygdrive for fixpath to work.
12621       new_path="$CYGWIN_ROOT_PATH$input_path"
12622     fi
12623   fi
12624 
12625 
12626   if test "x$path" != "x$new_path"; then
12627     BOOT_JDK="$new_path"
12628     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12629 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12630   fi
12631 
12632   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12633 
12634   path="$BOOT_JDK"
12635   has_colon=`$ECHO $path | $GREP ^.:`
12636   new_path="$path"
12637   if test "x$has_colon" = x; then
12638     # Not in mixed or Windows style, start by that.
12639     new_path=`cmd //c echo $path`
12640   fi
12641 
12642 
12643   input_path="$new_path"
12644   # Check if we need to convert this using DOS-style short mode. If the path
12645   # contains just simple characters, use it. Otherwise (spaces, weird characters),
12646   # take no chances and rewrite it.
12647   # Note: m4 eats our [], so we need to use [ and ] instead.
12648   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12649   if test "x$has_forbidden_chars" != x; then
12650     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12651     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12652   fi
12653 
12654 
12655   windows_path="$new_path"
12656   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12657     unix_path=`$CYGPATH -u "$windows_path"`
12658     new_path="$unix_path"
12659   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12660     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12661     new_path="$unix_path"
12662   fi
12663 
12664   if test "x$path" != "x$new_path"; then
12665     BOOT_JDK="$new_path"
12666     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12667 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12668   fi
12669 
12670   # Save the first 10 bytes of this path to the storage, so fixpath can work.
12671   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12672 
12673   else
12674     # We're on a posix platform. Hooray! :)
12675     path="$BOOT_JDK"
12676     has_space=`$ECHO "$path" | $GREP " "`
12677     if test "x$has_space" != x; then
12678       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12679 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12680       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
12681     fi
12682 
12683     # Use eval to expand a potential ~
12684     eval path="$path"
12685     if test ! -f "$path" && test ! -d "$path"; then
12686       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
12687     fi
12688 
12689     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
12690   fi
12691 
12692               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12693 $as_echo_n "checking for Boot JDK... " >&6; }
12694               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12695 $as_echo "$BOOT_JDK" >&6; }
12696               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12697 $as_echo_n "checking Boot JDK version... " >&6; }
12698               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12699               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12700 $as_echo "$BOOT_JDK_VERSION" >&6; }
12701             fi # end check jdk version
12702           fi # end check rt.jar
12703         fi # end check javac
12704       fi # end check java
12705     fi # end check boot jdk found
12706   fi
12707 
12708 
12709   if test "x$BOOT_JDK_FOUND" = xno; then
12710     # Now execute the test
12711 
12712   if test "x$PROGRAMW6432" != x; then
12713     VIRTUAL_DIR="$PROGRAMW6432/Java"
12714 
12715   windows_path="$VIRTUAL_DIR"
12716   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12717     unix_path=`$CYGPATH -u "$windows_path"`
12718     VIRTUAL_DIR="$unix_path"
12719   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12720     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12721     VIRTUAL_DIR="$unix_path"
12722   fi
12723 
12724 
12725   BOOT_JDK_PREFIX="$VIRTUAL_DIR"
12726   BOOT_JDK_SUFFIX=""
12727   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
12728   if test "x$ALL_JDKS_FOUND" != x; then
12729     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
12730 
12731   if test "x$BOOT_JDK_FOUND" = xno; then
12732     # Now execute the test
12733 
12734         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
12735         if test -d "$BOOT_JDK"; then
12736           BOOT_JDK_FOUND=maybe
12737           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
12738 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
12739         fi
12740 
12741 
12742     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12743     if test "x$BOOT_JDK_FOUND" = xmaybe; then
12744       # Do we have a bin/java?
12745       if test ! -x "$BOOT_JDK/bin/java"; then
12746         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12747 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12748         BOOT_JDK_FOUND=no
12749       else
12750         # Do we have a bin/javac?
12751         if test ! -x "$BOOT_JDK/bin/javac"; then
12752           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12753 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12754           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12755 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12756           BOOT_JDK_FOUND=no
12757         else
12758           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12759           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12760             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12761 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12762             BOOT_JDK_FOUND=no
12763           else
12764             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12765             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12766 
12767             # Extra M4 quote needed to protect [] in grep expression.
12768             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12769             if test "x$FOUND_VERSION_78" = x; then
12770               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12771 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12772               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12773 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12774               BOOT_JDK_FOUND=no
12775             else
12776               # We're done! :-)
12777               BOOT_JDK_FOUND=yes
12778 
12779   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12780 
12781   # Input might be given as Windows format, start by converting to
12782   # unix format.
12783   path="$BOOT_JDK"
12784   new_path=`$CYGPATH -u "$path"`
12785 
12786   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12787   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12788   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12789   # "foo.exe" is OK but "foo" is an error.
12790   #
12791   # This test is therefore slightly more accurate than "test -f" to check for file precense.
12792   # It is also a way to make sure we got the proper file name for the real test later on.
12793   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12794   if test "x$test_shortpath" = x; then
12795     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12796 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12797     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12798   fi
12799 
12800   # Call helper function which possibly converts this using DOS-style short mode.
12801   # If so, the updated path is stored in $new_path.
12802 
12803   input_path="$new_path"
12804   # Check if we need to convert this using DOS-style short mode. If the path
12805   # contains just simple characters, use it. Otherwise (spaces, weird characters),
12806   # take no chances and rewrite it.
12807   # Note: m4 eats our [], so we need to use [ and ] instead.
12808   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12809   if test "x$has_forbidden_chars" != x; then
12810     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12811     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12812     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12813     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12814       # Going to short mode and back again did indeed matter. Since short mode is
12815       # case insensitive, let's make it lowercase to improve readability.
12816       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12817       # Now convert it back to Unix-stile (cygpath)
12818       input_path=`$CYGPATH -u "$shortmode_path"`
12819       new_path="$input_path"
12820     fi
12821   fi
12822 
12823   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12824   if test "x$test_cygdrive_prefix" = x; then
12825     # As a simple fix, exclude /usr/bin since it's not a real path.
12826     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12827       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12828       # a path prefixed by /cygdrive for fixpath to work.
12829       new_path="$CYGWIN_ROOT_PATH$input_path"
12830     fi
12831   fi
12832 
12833 
12834   if test "x$path" != "x$new_path"; then
12835     BOOT_JDK="$new_path"
12836     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12837 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12838   fi
12839 
12840   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12841 
12842   path="$BOOT_JDK"
12843   has_colon=`$ECHO $path | $GREP ^.:`
12844   new_path="$path"
12845   if test "x$has_colon" = x; then
12846     # Not in mixed or Windows style, start by that.
12847     new_path=`cmd //c echo $path`
12848   fi
12849 
12850 
12851   input_path="$new_path"
12852   # Check if we need to convert this using DOS-style short mode. If the path
12853   # contains just simple characters, use it. Otherwise (spaces, weird characters),
12854   # take no chances and rewrite it.
12855   # Note: m4 eats our [], so we need to use [ and ] instead.
12856   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12857   if test "x$has_forbidden_chars" != x; then
12858     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12859     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12860   fi
12861 
12862 
12863   windows_path="$new_path"
12864   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12865     unix_path=`$CYGPATH -u "$windows_path"`
12866     new_path="$unix_path"
12867   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12868     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12869     new_path="$unix_path"
12870   fi
12871 
12872   if test "x$path" != "x$new_path"; then
12873     BOOT_JDK="$new_path"
12874     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12875 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12876   fi
12877 
12878   # Save the first 10 bytes of this path to the storage, so fixpath can work.
12879   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12880 
12881   else
12882     # We're on a posix platform. Hooray! :)
12883     path="$BOOT_JDK"
12884     has_space=`$ECHO "$path" | $GREP " "`
12885     if test "x$has_space" != x; then
12886       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12887 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12888       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
12889     fi
12890 
12891     # Use eval to expand a potential ~
12892     eval path="$path"
12893     if test ! -f "$path" && test ! -d "$path"; then
12894       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
12895     fi
12896 
12897     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
12898   fi
12899 
12900               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12901 $as_echo_n "checking for Boot JDK... " >&6; }
12902               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12903 $as_echo "$BOOT_JDK" >&6; }
12904               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12905 $as_echo_n "checking Boot JDK version... " >&6; }
12906               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12907               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12908 $as_echo "$BOOT_JDK_VERSION" >&6; }
12909             fi # end check jdk version
12910           fi # end check rt.jar
12911         fi # end check javac
12912       fi # end check java
12913     fi # end check boot jdk found
12914   fi
12915 
12916     done
12917   fi
12918 
12919   fi
12920 
12921 
12922     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12923     if test "x$BOOT_JDK_FOUND" = xmaybe; then
12924       # Do we have a bin/java?
12925       if test ! -x "$BOOT_JDK/bin/java"; then
12926         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12927 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12928         BOOT_JDK_FOUND=no
12929       else
12930         # Do we have a bin/javac?
12931         if test ! -x "$BOOT_JDK/bin/javac"; then
12932           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12933 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12934           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12935 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12936           BOOT_JDK_FOUND=no
12937         else
12938           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12939           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12940             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12941 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12942             BOOT_JDK_FOUND=no
12943           else
12944             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12945             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12946 
12947             # Extra M4 quote needed to protect [] in grep expression.
12948             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12949             if test "x$FOUND_VERSION_78" = x; then
12950               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12951 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12952               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12953 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12954               BOOT_JDK_FOUND=no
12955             else
12956               # We're done! :-)
12957               BOOT_JDK_FOUND=yes
12958 
12959   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12960 
12961   # Input might be given as Windows format, start by converting to
12962   # unix format.
12963   path="$BOOT_JDK"
12964   new_path=`$CYGPATH -u "$path"`
12965 
12966   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12967   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12968   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12969   # "foo.exe" is OK but "foo" is an error.
12970   #
12971   # This test is therefore slightly more accurate than "test -f" to check for file precense.
12972   # It is also a way to make sure we got the proper file name for the real test later on.
12973   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12974   if test "x$test_shortpath" = x; then
12975     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12976 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12977     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12978   fi
12979 
12980   # Call helper function which possibly converts this using DOS-style short mode.
12981   # If so, the updated path is stored in $new_path.
12982 
12983   input_path="$new_path"
12984   # Check if we need to convert this using DOS-style short mode. If the path
12985   # contains just simple characters, use it. Otherwise (spaces, weird characters),
12986   # take no chances and rewrite it.
12987   # Note: m4 eats our [], so we need to use [ and ] instead.
12988   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12989   if test "x$has_forbidden_chars" != x; then
12990     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12991     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12992     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12993     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12994       # Going to short mode and back again did indeed matter. Since short mode is
12995       # case insensitive, let's make it lowercase to improve readability.
12996       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12997       # Now convert it back to Unix-stile (cygpath)
12998       input_path=`$CYGPATH -u "$shortmode_path"`
12999       new_path="$input_path"
13000     fi
13001   fi
13002 
13003   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13004   if test "x$test_cygdrive_prefix" = x; then
13005     # As a simple fix, exclude /usr/bin since it's not a real path.
13006     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13007       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13008       # a path prefixed by /cygdrive for fixpath to work.
13009       new_path="$CYGWIN_ROOT_PATH$input_path"
13010     fi
13011   fi
13012 
13013 
13014   if test "x$path" != "x$new_path"; then
13015     BOOT_JDK="$new_path"
13016     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13017 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13018   fi
13019 
13020   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13021 
13022   path="$BOOT_JDK"
13023   has_colon=`$ECHO $path | $GREP ^.:`
13024   new_path="$path"
13025   if test "x$has_colon" = x; then
13026     # Not in mixed or Windows style, start by that.
13027     new_path=`cmd //c echo $path`
13028   fi
13029 
13030 
13031   input_path="$new_path"
13032   # Check if we need to convert this using DOS-style short mode. If the path
13033   # contains just simple characters, use it. Otherwise (spaces, weird characters),
13034   # take no chances and rewrite it.
13035   # Note: m4 eats our [], so we need to use [ and ] instead.
13036   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13037   if test "x$has_forbidden_chars" != x; then
13038     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13039     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13040   fi
13041 
13042 
13043   windows_path="$new_path"
13044   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13045     unix_path=`$CYGPATH -u "$windows_path"`
13046     new_path="$unix_path"
13047   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13048     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13049     new_path="$unix_path"
13050   fi
13051 
13052   if test "x$path" != "x$new_path"; then
13053     BOOT_JDK="$new_path"
13054     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13055 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13056   fi
13057 
13058   # Save the first 10 bytes of this path to the storage, so fixpath can work.
13059   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13060 
13061   else
13062     # We're on a posix platform. Hooray! :)
13063     path="$BOOT_JDK"
13064     has_space=`$ECHO "$path" | $GREP " "`
13065     if test "x$has_space" != x; then
13066       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13067 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13068       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13069     fi
13070 
13071     # Use eval to expand a potential ~
13072     eval path="$path"
13073     if test ! -f "$path" && test ! -d "$path"; then
13074       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13075     fi
13076 
13077     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
13078   fi
13079 
13080               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13081 $as_echo_n "checking for Boot JDK... " >&6; }
13082               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13083 $as_echo "$BOOT_JDK" >&6; }
13084               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13085 $as_echo_n "checking Boot JDK version... " >&6; }
13086               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13087               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13088 $as_echo "$BOOT_JDK_VERSION" >&6; }
13089             fi # end check jdk version
13090           fi # end check rt.jar
13091         fi # end check javac
13092       fi # end check java
13093     fi # end check boot jdk found
13094   fi
13095 
13096 
13097   if test "x$BOOT_JDK_FOUND" = xno; then
13098     # Now execute the test
13099 
13100   if test "x$PROGRAMFILES" != x; then
13101     VIRTUAL_DIR="$PROGRAMFILES/Java"
13102 
13103   windows_path="$VIRTUAL_DIR"
13104   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13105     unix_path=`$CYGPATH -u "$windows_path"`
13106     VIRTUAL_DIR="$unix_path"
13107   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13108     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13109     VIRTUAL_DIR="$unix_path"
13110   fi
13111 
13112 
13113   BOOT_JDK_PREFIX="$VIRTUAL_DIR"
13114   BOOT_JDK_SUFFIX=""
13115   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
13116   if test "x$ALL_JDKS_FOUND" != x; then
13117     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
13118 
13119   if test "x$BOOT_JDK_FOUND" = xno; then
13120     # Now execute the test
13121 
13122         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
13123         if test -d "$BOOT_JDK"; then
13124           BOOT_JDK_FOUND=maybe
13125           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
13126 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
13127         fi
13128 
13129 
13130     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13131     if test "x$BOOT_JDK_FOUND" = xmaybe; then
13132       # Do we have a bin/java?
13133       if test ! -x "$BOOT_JDK/bin/java"; then
13134         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13135 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13136         BOOT_JDK_FOUND=no
13137       else
13138         # Do we have a bin/javac?
13139         if test ! -x "$BOOT_JDK/bin/javac"; then
13140           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13141 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13142           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13143 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13144           BOOT_JDK_FOUND=no
13145         else
13146           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13147           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13148             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13149 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13150             BOOT_JDK_FOUND=no
13151           else
13152             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13153             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13154 
13155             # Extra M4 quote needed to protect [] in grep expression.
13156             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13157             if test "x$FOUND_VERSION_78" = x; then
13158               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13159 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13160               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13161 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13162               BOOT_JDK_FOUND=no
13163             else
13164               # We're done! :-)
13165               BOOT_JDK_FOUND=yes
13166 
13167   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13168 
13169   # Input might be given as Windows format, start by converting to
13170   # unix format.
13171   path="$BOOT_JDK"
13172   new_path=`$CYGPATH -u "$path"`
13173 
13174   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13175   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13176   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13177   # "foo.exe" is OK but "foo" is an error.
13178   #
13179   # This test is therefore slightly more accurate than "test -f" to check for file precense.
13180   # It is also a way to make sure we got the proper file name for the real test later on.
13181   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13182   if test "x$test_shortpath" = x; then
13183     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13184 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13185     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13186   fi
13187 
13188   # Call helper function which possibly converts this using DOS-style short mode.
13189   # If so, the updated path is stored in $new_path.
13190 
13191   input_path="$new_path"
13192   # Check if we need to convert this using DOS-style short mode. If the path
13193   # contains just simple characters, use it. Otherwise (spaces, weird characters),
13194   # take no chances and rewrite it.
13195   # Note: m4 eats our [], so we need to use [ and ] instead.
13196   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13197   if test "x$has_forbidden_chars" != x; then
13198     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13199     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13200     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13201     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13202       # Going to short mode and back again did indeed matter. Since short mode is
13203       # case insensitive, let's make it lowercase to improve readability.
13204       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13205       # Now convert it back to Unix-stile (cygpath)
13206       input_path=`$CYGPATH -u "$shortmode_path"`
13207       new_path="$input_path"
13208     fi
13209   fi
13210 
13211   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13212   if test "x$test_cygdrive_prefix" = x; then
13213     # As a simple fix, exclude /usr/bin since it's not a real path.
13214     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13215       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13216       # a path prefixed by /cygdrive for fixpath to work.
13217       new_path="$CYGWIN_ROOT_PATH$input_path"
13218     fi
13219   fi
13220 
13221 
13222   if test "x$path" != "x$new_path"; then
13223     BOOT_JDK="$new_path"
13224     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13225 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13226   fi
13227 
13228   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13229 
13230   path="$BOOT_JDK"
13231   has_colon=`$ECHO $path | $GREP ^.:`
13232   new_path="$path"
13233   if test "x$has_colon" = x; then
13234     # Not in mixed or Windows style, start by that.
13235     new_path=`cmd //c echo $path`
13236   fi
13237 
13238 
13239   input_path="$new_path"
13240   # Check if we need to convert this using DOS-style short mode. If the path
13241   # contains just simple characters, use it. Otherwise (spaces, weird characters),
13242   # take no chances and rewrite it.
13243   # Note: m4 eats our [], so we need to use [ and ] instead.
13244   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13245   if test "x$has_forbidden_chars" != x; then
13246     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13247     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13248   fi
13249 
13250 
13251   windows_path="$new_path"
13252   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13253     unix_path=`$CYGPATH -u "$windows_path"`
13254     new_path="$unix_path"
13255   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13256     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13257     new_path="$unix_path"
13258   fi
13259 
13260   if test "x$path" != "x$new_path"; then
13261     BOOT_JDK="$new_path"
13262     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13263 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13264   fi
13265 
13266   # Save the first 10 bytes of this path to the storage, so fixpath can work.
13267   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13268 
13269   else
13270     # We're on a posix platform. Hooray! :)
13271     path="$BOOT_JDK"
13272     has_space=`$ECHO "$path" | $GREP " "`
13273     if test "x$has_space" != x; then
13274       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13275 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13276       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13277     fi
13278 
13279     # Use eval to expand a potential ~
13280     eval path="$path"
13281     if test ! -f "$path" && test ! -d "$path"; then
13282       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13283     fi
13284 
13285     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
13286   fi
13287 
13288               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13289 $as_echo_n "checking for Boot JDK... " >&6; }
13290               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13291 $as_echo "$BOOT_JDK" >&6; }
13292               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13293 $as_echo_n "checking Boot JDK version... " >&6; }
13294               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13295               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13296 $as_echo "$BOOT_JDK_VERSION" >&6; }
13297             fi # end check jdk version
13298           fi # end check rt.jar
13299         fi # end check javac
13300       fi # end check java
13301     fi # end check boot jdk found
13302   fi
13303 
13304     done
13305   fi
13306 
13307   fi
13308 
13309 
13310     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13311     if test "x$BOOT_JDK_FOUND" = xmaybe; then
13312       # Do we have a bin/java?
13313       if test ! -x "$BOOT_JDK/bin/java"; then
13314         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13315 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13316         BOOT_JDK_FOUND=no
13317       else
13318         # Do we have a bin/javac?
13319         if test ! -x "$BOOT_JDK/bin/javac"; then
13320           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13321 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13322           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13323 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13324           BOOT_JDK_FOUND=no
13325         else
13326           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13327           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13328             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13329 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13330             BOOT_JDK_FOUND=no
13331           else
13332             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13333             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13334 
13335             # Extra M4 quote needed to protect [] in grep expression.
13336             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13337             if test "x$FOUND_VERSION_78" = x; then
13338               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13339 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13340               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13341 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13342               BOOT_JDK_FOUND=no
13343             else
13344               # We're done! :-)
13345               BOOT_JDK_FOUND=yes
13346 
13347   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13348 
13349   # Input might be given as Windows format, start by converting to
13350   # unix format.
13351   path="$BOOT_JDK"
13352   new_path=`$CYGPATH -u "$path"`
13353 
13354   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13355   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13356   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13357   # "foo.exe" is OK but "foo" is an error.
13358   #
13359   # This test is therefore slightly more accurate than "test -f" to check for file precense.
13360   # It is also a way to make sure we got the proper file name for the real test later on.
13361   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13362   if test "x$test_shortpath" = x; then
13363     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13364 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13365     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13366   fi
13367 
13368   # Call helper function which possibly converts this using DOS-style short mode.
13369   # If so, the updated path is stored in $new_path.
13370 
13371   input_path="$new_path"
13372   # Check if we need to convert this using DOS-style short mode. If the path
13373   # contains just simple characters, use it. Otherwise (spaces, weird characters),
13374   # take no chances and rewrite it.
13375   # Note: m4 eats our [], so we need to use [ and ] instead.
13376   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13377   if test "x$has_forbidden_chars" != x; then
13378     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13379     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13380     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13381     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13382       # Going to short mode and back again did indeed matter. Since short mode is
13383       # case insensitive, let's make it lowercase to improve readability.
13384       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13385       # Now convert it back to Unix-stile (cygpath)
13386       input_path=`$CYGPATH -u "$shortmode_path"`
13387       new_path="$input_path"
13388     fi
13389   fi
13390 
13391   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13392   if test "x$test_cygdrive_prefix" = x; then
13393     # As a simple fix, exclude /usr/bin since it's not a real path.
13394     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13395       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13396       # a path prefixed by /cygdrive for fixpath to work.
13397       new_path="$CYGWIN_ROOT_PATH$input_path"
13398     fi
13399   fi
13400 
13401 
13402   if test "x$path" != "x$new_path"; then
13403     BOOT_JDK="$new_path"
13404     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13405 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13406   fi
13407 
13408   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13409 
13410   path="$BOOT_JDK"
13411   has_colon=`$ECHO $path | $GREP ^.:`
13412   new_path="$path"
13413   if test "x$has_colon" = x; then
13414     # Not in mixed or Windows style, start by that.
13415     new_path=`cmd //c echo $path`
13416   fi
13417 
13418 
13419   input_path="$new_path"
13420   # Check if we need to convert this using DOS-style short mode. If the path
13421   # contains just simple characters, use it. Otherwise (spaces, weird characters),
13422   # take no chances and rewrite it.
13423   # Note: m4 eats our [], so we need to use [ and ] instead.
13424   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13425   if test "x$has_forbidden_chars" != x; then
13426     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13427     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13428   fi
13429 
13430 
13431   windows_path="$new_path"
13432   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13433     unix_path=`$CYGPATH -u "$windows_path"`
13434     new_path="$unix_path"
13435   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13436     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13437     new_path="$unix_path"
13438   fi
13439 
13440   if test "x$path" != "x$new_path"; then
13441     BOOT_JDK="$new_path"
13442     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13443 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13444   fi
13445 
13446   # Save the first 10 bytes of this path to the storage, so fixpath can work.
13447   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13448 
13449   else
13450     # We're on a posix platform. Hooray! :)
13451     path="$BOOT_JDK"
13452     has_space=`$ECHO "$path" | $GREP " "`
13453     if test "x$has_space" != x; then
13454       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13455 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13456       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13457     fi
13458 
13459     # Use eval to expand a potential ~
13460     eval path="$path"
13461     if test ! -f "$path" && test ! -d "$path"; then
13462       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13463     fi
13464 
13465     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
13466   fi
13467 
13468               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13469 $as_echo_n "checking for Boot JDK... " >&6; }
13470               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13471 $as_echo "$BOOT_JDK" >&6; }
13472               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13473 $as_echo_n "checking Boot JDK version... " >&6; }
13474               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13475               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13476 $as_echo "$BOOT_JDK_VERSION" >&6; }
13477             fi # end check jdk version
13478           fi # end check rt.jar
13479         fi # end check javac
13480       fi # end check java
13481     fi # end check boot jdk found
13482   fi
13483 
13484 
13485   if test "x$BOOT_JDK_FOUND" = xno; then
13486     # Now execute the test
13487 
13488   if test "x$ProgramFiles" != x; then
13489     VIRTUAL_DIR="$ProgramFiles/Java"
13490 
13491   windows_path="$VIRTUAL_DIR"
13492   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13493     unix_path=`$CYGPATH -u "$windows_path"`
13494     VIRTUAL_DIR="$unix_path"
13495   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13496     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13497     VIRTUAL_DIR="$unix_path"
13498   fi
13499 
13500 
13501   BOOT_JDK_PREFIX="$VIRTUAL_DIR"
13502   BOOT_JDK_SUFFIX=""
13503   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
13504   if test "x$ALL_JDKS_FOUND" != x; then
13505     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
13506 
13507   if test "x$BOOT_JDK_FOUND" = xno; then
13508     # Now execute the test
13509 
13510         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
13511         if test -d "$BOOT_JDK"; then
13512           BOOT_JDK_FOUND=maybe
13513           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
13514 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
13515         fi
13516 
13517 
13518     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13519     if test "x$BOOT_JDK_FOUND" = xmaybe; then
13520       # Do we have a bin/java?
13521       if test ! -x "$BOOT_JDK/bin/java"; then
13522         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13523 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13524         BOOT_JDK_FOUND=no
13525       else
13526         # Do we have a bin/javac?
13527         if test ! -x "$BOOT_JDK/bin/javac"; then
13528           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13529 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13530           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13531 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13532           BOOT_JDK_FOUND=no
13533         else
13534           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13535           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13536             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13537 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13538             BOOT_JDK_FOUND=no
13539           else
13540             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13541             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13542 
13543             # Extra M4 quote needed to protect [] in grep expression.
13544             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13545             if test "x$FOUND_VERSION_78" = x; then
13546               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13547 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13548               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13549 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13550               BOOT_JDK_FOUND=no
13551             else
13552               # We're done! :-)
13553               BOOT_JDK_FOUND=yes
13554 
13555   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13556 
13557   # Input might be given as Windows format, start by converting to
13558   # unix format.
13559   path="$BOOT_JDK"
13560   new_path=`$CYGPATH -u "$path"`
13561 
13562   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13563   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13564   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13565   # "foo.exe" is OK but "foo" is an error.
13566   #
13567   # This test is therefore slightly more accurate than "test -f" to check for file precense.
13568   # It is also a way to make sure we got the proper file name for the real test later on.
13569   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13570   if test "x$test_shortpath" = x; then
13571     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13572 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13573     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13574   fi
13575 
13576   # Call helper function which possibly converts this using DOS-style short mode.
13577   # If so, the updated path is stored in $new_path.
13578 
13579   input_path="$new_path"
13580   # Check if we need to convert this using DOS-style short mode. If the path
13581   # contains just simple characters, use it. Otherwise (spaces, weird characters),
13582   # take no chances and rewrite it.
13583   # Note: m4 eats our [], so we need to use [ and ] instead.
13584   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13585   if test "x$has_forbidden_chars" != x; then
13586     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13587     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13588     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13589     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13590       # Going to short mode and back again did indeed matter. Since short mode is
13591       # case insensitive, let's make it lowercase to improve readability.
13592       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13593       # Now convert it back to Unix-stile (cygpath)
13594       input_path=`$CYGPATH -u "$shortmode_path"`
13595       new_path="$input_path"
13596     fi
13597   fi
13598 
13599   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13600   if test "x$test_cygdrive_prefix" = x; then
13601     # As a simple fix, exclude /usr/bin since it's not a real path.
13602     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13603       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13604       # a path prefixed by /cygdrive for fixpath to work.
13605       new_path="$CYGWIN_ROOT_PATH$input_path"
13606     fi
13607   fi
13608 
13609 
13610   if test "x$path" != "x$new_path"; then
13611     BOOT_JDK="$new_path"
13612     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13613 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13614   fi
13615 
13616   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13617 
13618   path="$BOOT_JDK"
13619   has_colon=`$ECHO $path | $GREP ^.:`
13620   new_path="$path"
13621   if test "x$has_colon" = x; then
13622     # Not in mixed or Windows style, start by that.
13623     new_path=`cmd //c echo $path`
13624   fi
13625 
13626 
13627   input_path="$new_path"
13628   # Check if we need to convert this using DOS-style short mode. If the path
13629   # contains just simple characters, use it. Otherwise (spaces, weird characters),
13630   # take no chances and rewrite it.
13631   # Note: m4 eats our [], so we need to use [ and ] instead.
13632   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13633   if test "x$has_forbidden_chars" != x; then
13634     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13635     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13636   fi
13637 
13638 
13639   windows_path="$new_path"
13640   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13641     unix_path=`$CYGPATH -u "$windows_path"`
13642     new_path="$unix_path"
13643   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13644     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13645     new_path="$unix_path"
13646   fi
13647 
13648   if test "x$path" != "x$new_path"; then
13649     BOOT_JDK="$new_path"
13650     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13651 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13652   fi
13653 
13654   # Save the first 10 bytes of this path to the storage, so fixpath can work.
13655   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13656 
13657   else
13658     # We're on a posix platform. Hooray! :)
13659     path="$BOOT_JDK"
13660     has_space=`$ECHO "$path" | $GREP " "`
13661     if test "x$has_space" != x; then
13662       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13663 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13664       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13665     fi
13666 
13667     # Use eval to expand a potential ~
13668     eval path="$path"
13669     if test ! -f "$path" && test ! -d "$path"; then
13670       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13671     fi
13672 
13673     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
13674   fi
13675 
13676               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13677 $as_echo_n "checking for Boot JDK... " >&6; }
13678               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13679 $as_echo "$BOOT_JDK" >&6; }
13680               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13681 $as_echo_n "checking Boot JDK version... " >&6; }
13682               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13683               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13684 $as_echo "$BOOT_JDK_VERSION" >&6; }
13685             fi # end check jdk version
13686           fi # end check rt.jar
13687         fi # end check javac
13688       fi # end check java
13689     fi # end check boot jdk found
13690   fi
13691 
13692     done
13693   fi
13694 
13695   fi
13696 
13697 
13698     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13699     if test "x$BOOT_JDK_FOUND" = xmaybe; then
13700       # Do we have a bin/java?
13701       if test ! -x "$BOOT_JDK/bin/java"; then
13702         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13703 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13704         BOOT_JDK_FOUND=no
13705       else
13706         # Do we have a bin/javac?
13707         if test ! -x "$BOOT_JDK/bin/javac"; then
13708           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13709 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13710           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13711 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13712           BOOT_JDK_FOUND=no
13713         else
13714           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13715           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13716             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13717 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13718             BOOT_JDK_FOUND=no
13719           else
13720             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13721             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13722 
13723             # Extra M4 quote needed to protect [] in grep expression.
13724             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13725             if test "x$FOUND_VERSION_78" = x; then
13726               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13727 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13728               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13729 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13730               BOOT_JDK_FOUND=no
13731             else
13732               # We're done! :-)
13733               BOOT_JDK_FOUND=yes
13734 
13735   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13736 
13737   # Input might be given as Windows format, start by converting to
13738   # unix format.
13739   path="$BOOT_JDK"
13740   new_path=`$CYGPATH -u "$path"`
13741 
13742   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13743   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13744   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13745   # "foo.exe" is OK but "foo" is an error.
13746   #
13747   # This test is therefore slightly more accurate than "test -f" to check for file precense.
13748   # It is also a way to make sure we got the proper file name for the real test later on.
13749   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13750   if test "x$test_shortpath" = x; then
13751     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13752 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13753     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13754   fi
13755 
13756   # Call helper function which possibly converts this using DOS-style short mode.
13757   # If so, the updated path is stored in $new_path.
13758 
13759   input_path="$new_path"
13760   # Check if we need to convert this using DOS-style short mode. If the path
13761   # contains just simple characters, use it. Otherwise (spaces, weird characters),
13762   # take no chances and rewrite it.
13763   # Note: m4 eats our [], so we need to use [ and ] instead.
13764   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13765   if test "x$has_forbidden_chars" != x; then
13766     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13767     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13768     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13769     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13770       # Going to short mode and back again did indeed matter. Since short mode is
13771       # case insensitive, let's make it lowercase to improve readability.
13772       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13773       # Now convert it back to Unix-stile (cygpath)
13774       input_path=`$CYGPATH -u "$shortmode_path"`
13775       new_path="$input_path"
13776     fi
13777   fi
13778 
13779   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13780   if test "x$test_cygdrive_prefix" = x; then
13781     # As a simple fix, exclude /usr/bin since it's not a real path.
13782     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13783       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13784       # a path prefixed by /cygdrive for fixpath to work.
13785       new_path="$CYGWIN_ROOT_PATH$input_path"
13786     fi
13787   fi
13788 
13789 
13790   if test "x$path" != "x$new_path"; then
13791     BOOT_JDK="$new_path"
13792     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13793 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13794   fi
13795 
13796   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13797 
13798   path="$BOOT_JDK"
13799   has_colon=`$ECHO $path | $GREP ^.:`
13800   new_path="$path"
13801   if test "x$has_colon" = x; then
13802     # Not in mixed or Windows style, start by that.
13803     new_path=`cmd //c echo $path`
13804   fi
13805 
13806 
13807   input_path="$new_path"
13808   # Check if we need to convert this using DOS-style short mode. If the path
13809   # contains just simple characters, use it. Otherwise (spaces, weird characters),
13810   # take no chances and rewrite it.
13811   # Note: m4 eats our [], so we need to use [ and ] instead.
13812   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13813   if test "x$has_forbidden_chars" != x; then
13814     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13815     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13816   fi
13817 
13818 
13819   windows_path="$new_path"
13820   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13821     unix_path=`$CYGPATH -u "$windows_path"`
13822     new_path="$unix_path"
13823   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13824     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13825     new_path="$unix_path"
13826   fi
13827 
13828   if test "x$path" != "x$new_path"; then
13829     BOOT_JDK="$new_path"
13830     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13831 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13832   fi
13833 
13834   # Save the first 10 bytes of this path to the storage, so fixpath can work.
13835   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13836 
13837   else
13838     # We're on a posix platform. Hooray! :)
13839     path="$BOOT_JDK"
13840     has_space=`$ECHO "$path" | $GREP " "`
13841     if test "x$has_space" != x; then
13842       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13843 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13844       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13845     fi
13846 
13847     # Use eval to expand a potential ~
13848     eval path="$path"
13849     if test ! -f "$path" && test ! -d "$path"; then
13850       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13851     fi
13852 
13853     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
13854   fi
13855 
13856               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13857 $as_echo_n "checking for Boot JDK... " >&6; }
13858               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13859 $as_echo "$BOOT_JDK" >&6; }
13860               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13861 $as_echo_n "checking Boot JDK version... " >&6; }
13862               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13863               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13864 $as_echo "$BOOT_JDK_VERSION" >&6; }
13865             fi # end check jdk version
13866           fi # end check rt.jar
13867         fi # end check javac
13868       fi # end check java
13869     fi # end check boot jdk found
13870   fi
13871 
13872 
13873   if test "x$BOOT_JDK_FOUND" = xno; then
13874     # Now execute the test
13875 
13876   BOOT_JDK_PREFIX="/cygdrive/c/Program Files/Java"
13877   BOOT_JDK_SUFFIX=""
13878   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
13879   if test "x$ALL_JDKS_FOUND" != x; then
13880     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
13881 
13882   if test "x$BOOT_JDK_FOUND" = xno; then
13883     # Now execute the test
13884 
13885         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
13886         if test -d "$BOOT_JDK"; then
13887           BOOT_JDK_FOUND=maybe
13888           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
13889 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
13890         fi
13891 
13892 
13893     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13894     if test "x$BOOT_JDK_FOUND" = xmaybe; then
13895       # Do we have a bin/java?
13896       if test ! -x "$BOOT_JDK/bin/java"; then
13897         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13898 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13899         BOOT_JDK_FOUND=no
13900       else
13901         # Do we have a bin/javac?
13902         if test ! -x "$BOOT_JDK/bin/javac"; then
13903           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13904 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13905           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13906 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13907           BOOT_JDK_FOUND=no
13908         else
13909           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13910           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13911             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13912 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13913             BOOT_JDK_FOUND=no
13914           else
13915             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13916             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13917 
13918             # Extra M4 quote needed to protect [] in grep expression.
13919             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13920             if test "x$FOUND_VERSION_78" = x; then
13921               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13922 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13923               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13924 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13925               BOOT_JDK_FOUND=no
13926             else
13927               # We're done! :-)
13928               BOOT_JDK_FOUND=yes
13929 
13930   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13931 
13932   # Input might be given as Windows format, start by converting to
13933   # unix format.
13934   path="$BOOT_JDK"
13935   new_path=`$CYGPATH -u "$path"`
13936 
13937   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13938   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13939   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13940   # "foo.exe" is OK but "foo" is an error.
13941   #
13942   # This test is therefore slightly more accurate than "test -f" to check for file precense.
13943   # It is also a way to make sure we got the proper file name for the real test later on.
13944   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13945   if test "x$test_shortpath" = x; then
13946     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13947 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13948     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13949   fi
13950 
13951   # Call helper function which possibly converts this using DOS-style short mode.
13952   # If so, the updated path is stored in $new_path.
13953 
13954   input_path="$new_path"
13955   # Check if we need to convert this using DOS-style short mode. If the path
13956   # contains just simple characters, use it. Otherwise (spaces, weird characters),
13957   # take no chances and rewrite it.
13958   # Note: m4 eats our [], so we need to use [ and ] instead.
13959   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13960   if test "x$has_forbidden_chars" != x; then
13961     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13962     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13963     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13964     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13965       # Going to short mode and back again did indeed matter. Since short mode is
13966       # case insensitive, let's make it lowercase to improve readability.
13967       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13968       # Now convert it back to Unix-stile (cygpath)
13969       input_path=`$CYGPATH -u "$shortmode_path"`
13970       new_path="$input_path"
13971     fi
13972   fi
13973 
13974   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13975   if test "x$test_cygdrive_prefix" = x; then
13976     # As a simple fix, exclude /usr/bin since it's not a real path.
13977     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13978       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13979       # a path prefixed by /cygdrive for fixpath to work.
13980       new_path="$CYGWIN_ROOT_PATH$input_path"
13981     fi
13982   fi
13983 
13984 
13985   if test "x$path" != "x$new_path"; then
13986     BOOT_JDK="$new_path"
13987     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13988 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13989   fi
13990 
13991   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13992 
13993   path="$BOOT_JDK"
13994   has_colon=`$ECHO $path | $GREP ^.:`
13995   new_path="$path"
13996   if test "x$has_colon" = x; then
13997     # Not in mixed or Windows style, start by that.
13998     new_path=`cmd //c echo $path`
13999   fi
14000 
14001 
14002   input_path="$new_path"
14003   # Check if we need to convert this using DOS-style short mode. If the path
14004   # contains just simple characters, use it. Otherwise (spaces, weird characters),
14005   # take no chances and rewrite it.
14006   # Note: m4 eats our [], so we need to use [ and ] instead.
14007   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14008   if test "x$has_forbidden_chars" != x; then
14009     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14010     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14011   fi
14012 
14013 
14014   windows_path="$new_path"
14015   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14016     unix_path=`$CYGPATH -u "$windows_path"`
14017     new_path="$unix_path"
14018   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14019     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14020     new_path="$unix_path"
14021   fi
14022 
14023   if test "x$path" != "x$new_path"; then
14024     BOOT_JDK="$new_path"
14025     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14026 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14027   fi
14028 
14029   # Save the first 10 bytes of this path to the storage, so fixpath can work.
14030   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14031 
14032   else
14033     # We're on a posix platform. Hooray! :)
14034     path="$BOOT_JDK"
14035     has_space=`$ECHO "$path" | $GREP " "`
14036     if test "x$has_space" != x; then
14037       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14038 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14039       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14040     fi
14041 
14042     # Use eval to expand a potential ~
14043     eval path="$path"
14044     if test ! -f "$path" && test ! -d "$path"; then
14045       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14046     fi
14047 
14048     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
14049   fi
14050 
14051               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14052 $as_echo_n "checking for Boot JDK... " >&6; }
14053               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14054 $as_echo "$BOOT_JDK" >&6; }
14055               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14056 $as_echo_n "checking Boot JDK version... " >&6; }
14057               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14058               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14059 $as_echo "$BOOT_JDK_VERSION" >&6; }
14060             fi # end check jdk version
14061           fi # end check rt.jar
14062         fi # end check javac
14063       fi # end check java
14064     fi # end check boot jdk found
14065   fi
14066 
14067     done
14068   fi
14069 
14070 
14071     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14072     if test "x$BOOT_JDK_FOUND" = xmaybe; then
14073       # Do we have a bin/java?
14074       if test ! -x "$BOOT_JDK/bin/java"; then
14075         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14076 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14077         BOOT_JDK_FOUND=no
14078       else
14079         # Do we have a bin/javac?
14080         if test ! -x "$BOOT_JDK/bin/javac"; then
14081           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14082 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14083           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14084 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14085           BOOT_JDK_FOUND=no
14086         else
14087           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14088           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14089             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14090 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14091             BOOT_JDK_FOUND=no
14092           else
14093             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14094             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14095 
14096             # Extra M4 quote needed to protect [] in grep expression.
14097             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14098             if test "x$FOUND_VERSION_78" = x; then
14099               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14100 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14101               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14102 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14103               BOOT_JDK_FOUND=no
14104             else
14105               # We're done! :-)
14106               BOOT_JDK_FOUND=yes
14107 
14108   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14109 
14110   # Input might be given as Windows format, start by converting to
14111   # unix format.
14112   path="$BOOT_JDK"
14113   new_path=`$CYGPATH -u "$path"`
14114 
14115   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14116   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14117   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14118   # "foo.exe" is OK but "foo" is an error.
14119   #
14120   # This test is therefore slightly more accurate than "test -f" to check for file precense.
14121   # It is also a way to make sure we got the proper file name for the real test later on.
14122   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14123   if test "x$test_shortpath" = x; then
14124     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14125 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14126     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14127   fi
14128 
14129   # Call helper function which possibly converts this using DOS-style short mode.
14130   # If so, the updated path is stored in $new_path.
14131 
14132   input_path="$new_path"
14133   # Check if we need to convert this using DOS-style short mode. If the path
14134   # contains just simple characters, use it. Otherwise (spaces, weird characters),
14135   # take no chances and rewrite it.
14136   # Note: m4 eats our [], so we need to use [ and ] instead.
14137   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14138   if test "x$has_forbidden_chars" != x; then
14139     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14140     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14141     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14142     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14143       # Going to short mode and back again did indeed matter. Since short mode is
14144       # case insensitive, let's make it lowercase to improve readability.
14145       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14146       # Now convert it back to Unix-stile (cygpath)
14147       input_path=`$CYGPATH -u "$shortmode_path"`
14148       new_path="$input_path"
14149     fi
14150   fi
14151 
14152   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14153   if test "x$test_cygdrive_prefix" = x; then
14154     # As a simple fix, exclude /usr/bin since it's not a real path.
14155     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14156       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14157       # a path prefixed by /cygdrive for fixpath to work.
14158       new_path="$CYGWIN_ROOT_PATH$input_path"
14159     fi
14160   fi
14161 
14162 
14163   if test "x$path" != "x$new_path"; then
14164     BOOT_JDK="$new_path"
14165     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14166 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14167   fi
14168 
14169   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14170 
14171   path="$BOOT_JDK"
14172   has_colon=`$ECHO $path | $GREP ^.:`
14173   new_path="$path"
14174   if test "x$has_colon" = x; then
14175     # Not in mixed or Windows style, start by that.
14176     new_path=`cmd //c echo $path`
14177   fi
14178 
14179 
14180   input_path="$new_path"
14181   # Check if we need to convert this using DOS-style short mode. If the path
14182   # contains just simple characters, use it. Otherwise (spaces, weird characters),
14183   # take no chances and rewrite it.
14184   # Note: m4 eats our [], so we need to use [ and ] instead.
14185   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14186   if test "x$has_forbidden_chars" != x; then
14187     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14188     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14189   fi
14190 
14191 
14192   windows_path="$new_path"
14193   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14194     unix_path=`$CYGPATH -u "$windows_path"`
14195     new_path="$unix_path"
14196   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14197     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14198     new_path="$unix_path"
14199   fi
14200 
14201   if test "x$path" != "x$new_path"; then
14202     BOOT_JDK="$new_path"
14203     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14204 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14205   fi
14206 
14207   # Save the first 10 bytes of this path to the storage, so fixpath can work.
14208   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14209 
14210   else
14211     # We're on a posix platform. Hooray! :)
14212     path="$BOOT_JDK"
14213     has_space=`$ECHO "$path" | $GREP " "`
14214     if test "x$has_space" != x; then
14215       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14216 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14217       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14218     fi
14219 
14220     # Use eval to expand a potential ~
14221     eval path="$path"
14222     if test ! -f "$path" && test ! -d "$path"; then
14223       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14224     fi
14225 
14226     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
14227   fi
14228 
14229               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14230 $as_echo_n "checking for Boot JDK... " >&6; }
14231               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14232 $as_echo "$BOOT_JDK" >&6; }
14233               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14234 $as_echo_n "checking Boot JDK version... " >&6; }
14235               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14236               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14237 $as_echo "$BOOT_JDK_VERSION" >&6; }
14238             fi # end check jdk version
14239           fi # end check rt.jar
14240         fi # end check javac
14241       fi # end check java
14242     fi # end check boot jdk found
14243   fi
14244 
14245   elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
14246 
14247   if test "x$BOOT_JDK_FOUND" = xno; then
14248     # Now execute the test
14249 
14250   BOOT_JDK_PREFIX="/Library/Java/JavaVirtualMachines"
14251   BOOT_JDK_SUFFIX="/Contents/Home"
14252   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
14253   if test "x$ALL_JDKS_FOUND" != x; then
14254     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
14255 
14256   if test "x$BOOT_JDK_FOUND" = xno; then
14257     # Now execute the test
14258 
14259         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
14260         if test -d "$BOOT_JDK"; then
14261           BOOT_JDK_FOUND=maybe
14262           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
14263 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
14264         fi
14265 
14266 
14267     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14268     if test "x$BOOT_JDK_FOUND" = xmaybe; then
14269       # Do we have a bin/java?
14270       if test ! -x "$BOOT_JDK/bin/java"; then
14271         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14272 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14273         BOOT_JDK_FOUND=no
14274       else
14275         # Do we have a bin/javac?
14276         if test ! -x "$BOOT_JDK/bin/javac"; then
14277           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14278 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14279           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14280 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14281           BOOT_JDK_FOUND=no
14282         else
14283           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14284           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14285             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14286 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14287             BOOT_JDK_FOUND=no
14288           else
14289             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14290             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14291 
14292             # Extra M4 quote needed to protect [] in grep expression.
14293             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14294             if test "x$FOUND_VERSION_78" = x; then
14295               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14296 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14297               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14298 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14299               BOOT_JDK_FOUND=no
14300             else
14301               # We're done! :-)
14302               BOOT_JDK_FOUND=yes
14303 
14304   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14305 
14306   # Input might be given as Windows format, start by converting to
14307   # unix format.
14308   path="$BOOT_JDK"
14309   new_path=`$CYGPATH -u "$path"`
14310 
14311   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14312   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14313   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14314   # "foo.exe" is OK but "foo" is an error.
14315   #
14316   # This test is therefore slightly more accurate than "test -f" to check for file precense.
14317   # It is also a way to make sure we got the proper file name for the real test later on.
14318   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14319   if test "x$test_shortpath" = x; then
14320     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14321 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14322     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14323   fi
14324 
14325   # Call helper function which possibly converts this using DOS-style short mode.
14326   # If so, the updated path is stored in $new_path.
14327 
14328   input_path="$new_path"
14329   # Check if we need to convert this using DOS-style short mode. If the path
14330   # contains just simple characters, use it. Otherwise (spaces, weird characters),
14331   # take no chances and rewrite it.
14332   # Note: m4 eats our [], so we need to use [ and ] instead.
14333   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14334   if test "x$has_forbidden_chars" != x; then
14335     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14336     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14337     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14338     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14339       # Going to short mode and back again did indeed matter. Since short mode is
14340       # case insensitive, let's make it lowercase to improve readability.
14341       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14342       # Now convert it back to Unix-stile (cygpath)
14343       input_path=`$CYGPATH -u "$shortmode_path"`
14344       new_path="$input_path"
14345     fi
14346   fi
14347 
14348   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14349   if test "x$test_cygdrive_prefix" = x; then
14350     # As a simple fix, exclude /usr/bin since it's not a real path.
14351     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14352       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14353       # a path prefixed by /cygdrive for fixpath to work.
14354       new_path="$CYGWIN_ROOT_PATH$input_path"
14355     fi
14356   fi
14357 
14358 
14359   if test "x$path" != "x$new_path"; then
14360     BOOT_JDK="$new_path"
14361     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14362 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14363   fi
14364 
14365   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14366 
14367   path="$BOOT_JDK"
14368   has_colon=`$ECHO $path | $GREP ^.:`
14369   new_path="$path"
14370   if test "x$has_colon" = x; then
14371     # Not in mixed or Windows style, start by that.
14372     new_path=`cmd //c echo $path`
14373   fi
14374 
14375 
14376   input_path="$new_path"
14377   # Check if we need to convert this using DOS-style short mode. If the path
14378   # contains just simple characters, use it. Otherwise (spaces, weird characters),
14379   # take no chances and rewrite it.
14380   # Note: m4 eats our [], so we need to use [ and ] instead.
14381   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14382   if test "x$has_forbidden_chars" != x; then
14383     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14384     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14385   fi
14386 
14387 
14388   windows_path="$new_path"
14389   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14390     unix_path=`$CYGPATH -u "$windows_path"`
14391     new_path="$unix_path"
14392   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14393     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14394     new_path="$unix_path"
14395   fi
14396 
14397   if test "x$path" != "x$new_path"; then
14398     BOOT_JDK="$new_path"
14399     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14400 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14401   fi
14402 
14403   # Save the first 10 bytes of this path to the storage, so fixpath can work.
14404   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14405 
14406   else
14407     # We're on a posix platform. Hooray! :)
14408     path="$BOOT_JDK"
14409     has_space=`$ECHO "$path" | $GREP " "`
14410     if test "x$has_space" != x; then
14411       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14412 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14413       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14414     fi
14415 
14416     # Use eval to expand a potential ~
14417     eval path="$path"
14418     if test ! -f "$path" && test ! -d "$path"; then
14419       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14420     fi
14421 
14422     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
14423   fi
14424 
14425               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14426 $as_echo_n "checking for Boot JDK... " >&6; }
14427               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14428 $as_echo "$BOOT_JDK" >&6; }
14429               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14430 $as_echo_n "checking Boot JDK version... " >&6; }
14431               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14432               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14433 $as_echo "$BOOT_JDK_VERSION" >&6; }
14434             fi # end check jdk version
14435           fi # end check rt.jar
14436         fi # end check javac
14437       fi # end check java
14438     fi # end check boot jdk found
14439   fi
14440 
14441     done
14442   fi
14443 
14444 
14445     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14446     if test "x$BOOT_JDK_FOUND" = xmaybe; then
14447       # Do we have a bin/java?
14448       if test ! -x "$BOOT_JDK/bin/java"; then
14449         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14450 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14451         BOOT_JDK_FOUND=no
14452       else
14453         # Do we have a bin/javac?
14454         if test ! -x "$BOOT_JDK/bin/javac"; then
14455           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14456 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14457           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14458 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14459           BOOT_JDK_FOUND=no
14460         else
14461           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14462           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14463             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14464 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14465             BOOT_JDK_FOUND=no
14466           else
14467             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14468             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14469 
14470             # Extra M4 quote needed to protect [] in grep expression.
14471             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14472             if test "x$FOUND_VERSION_78" = x; then
14473               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14474 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14475               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14476 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14477               BOOT_JDK_FOUND=no
14478             else
14479               # We're done! :-)
14480               BOOT_JDK_FOUND=yes
14481 
14482   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14483 
14484   # Input might be given as Windows format, start by converting to
14485   # unix format.
14486   path="$BOOT_JDK"
14487   new_path=`$CYGPATH -u "$path"`
14488 
14489   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14490   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14491   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14492   # "foo.exe" is OK but "foo" is an error.
14493   #
14494   # This test is therefore slightly more accurate than "test -f" to check for file precense.
14495   # It is also a way to make sure we got the proper file name for the real test later on.
14496   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14497   if test "x$test_shortpath" = x; then
14498     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14499 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14500     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14501   fi
14502 
14503   # Call helper function which possibly converts this using DOS-style short mode.
14504   # If so, the updated path is stored in $new_path.
14505 
14506   input_path="$new_path"
14507   # Check if we need to convert this using DOS-style short mode. If the path
14508   # contains just simple characters, use it. Otherwise (spaces, weird characters),
14509   # take no chances and rewrite it.
14510   # Note: m4 eats our [], so we need to use [ and ] instead.
14511   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14512   if test "x$has_forbidden_chars" != x; then
14513     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14514     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14515     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14516     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14517       # Going to short mode and back again did indeed matter. Since short mode is
14518       # case insensitive, let's make it lowercase to improve readability.
14519       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14520       # Now convert it back to Unix-stile (cygpath)
14521       input_path=`$CYGPATH -u "$shortmode_path"`
14522       new_path="$input_path"
14523     fi
14524   fi
14525 
14526   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14527   if test "x$test_cygdrive_prefix" = x; then
14528     # As a simple fix, exclude /usr/bin since it's not a real path.
14529     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14530       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14531       # a path prefixed by /cygdrive for fixpath to work.
14532       new_path="$CYGWIN_ROOT_PATH$input_path"
14533     fi
14534   fi
14535 
14536 
14537   if test "x$path" != "x$new_path"; then
14538     BOOT_JDK="$new_path"
14539     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14540 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14541   fi
14542 
14543   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14544 
14545   path="$BOOT_JDK"
14546   has_colon=`$ECHO $path | $GREP ^.:`
14547   new_path="$path"
14548   if test "x$has_colon" = x; then
14549     # Not in mixed or Windows style, start by that.
14550     new_path=`cmd //c echo $path`
14551   fi
14552 
14553 
14554   input_path="$new_path"
14555   # Check if we need to convert this using DOS-style short mode. If the path
14556   # contains just simple characters, use it. Otherwise (spaces, weird characters),
14557   # take no chances and rewrite it.
14558   # Note: m4 eats our [], so we need to use [ and ] instead.
14559   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14560   if test "x$has_forbidden_chars" != x; then
14561     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14562     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14563   fi
14564 
14565 
14566   windows_path="$new_path"
14567   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14568     unix_path=`$CYGPATH -u "$windows_path"`
14569     new_path="$unix_path"
14570   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14571     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14572     new_path="$unix_path"
14573   fi
14574 
14575   if test "x$path" != "x$new_path"; then
14576     BOOT_JDK="$new_path"
14577     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14578 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14579   fi
14580 
14581   # Save the first 10 bytes of this path to the storage, so fixpath can work.
14582   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14583 
14584   else
14585     # We're on a posix platform. Hooray! :)
14586     path="$BOOT_JDK"
14587     has_space=`$ECHO "$path" | $GREP " "`
14588     if test "x$has_space" != x; then
14589       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14590 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14591       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14592     fi
14593 
14594     # Use eval to expand a potential ~
14595     eval path="$path"
14596     if test ! -f "$path" && test ! -d "$path"; then
14597       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14598     fi
14599 
14600     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
14601   fi
14602 
14603               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14604 $as_echo_n "checking for Boot JDK... " >&6; }
14605               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14606 $as_echo "$BOOT_JDK" >&6; }
14607               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14608 $as_echo_n "checking Boot JDK version... " >&6; }
14609               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14610               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14611 $as_echo "$BOOT_JDK_VERSION" >&6; }
14612             fi # end check jdk version
14613           fi # end check rt.jar
14614         fi # end check javac
14615       fi # end check java
14616     fi # end check boot jdk found
14617   fi
14618 
14619 
14620   if test "x$BOOT_JDK_FOUND" = xno; then
14621     # Now execute the test
14622 
14623   BOOT_JDK_PREFIX="/System/Library/Java/JavaVirtualMachines"
14624   BOOT_JDK_SUFFIX="/Contents/Home"
14625   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
14626   if test "x$ALL_JDKS_FOUND" != x; then
14627     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
14628 
14629   if test "x$BOOT_JDK_FOUND" = xno; then
14630     # Now execute the test
14631 
14632         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
14633         if test -d "$BOOT_JDK"; then
14634           BOOT_JDK_FOUND=maybe
14635           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
14636 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
14637         fi
14638 
14639 
14640     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14641     if test "x$BOOT_JDK_FOUND" = xmaybe; then
14642       # Do we have a bin/java?
14643       if test ! -x "$BOOT_JDK/bin/java"; then
14644         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14645 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14646         BOOT_JDK_FOUND=no
14647       else
14648         # Do we have a bin/javac?
14649         if test ! -x "$BOOT_JDK/bin/javac"; then
14650           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14651 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14652           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14653 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14654           BOOT_JDK_FOUND=no
14655         else
14656           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14657           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14658             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14659 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14660             BOOT_JDK_FOUND=no
14661           else
14662             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14663             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14664 
14665             # Extra M4 quote needed to protect [] in grep expression.
14666             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14667             if test "x$FOUND_VERSION_78" = x; then
14668               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14669 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14670               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14671 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14672               BOOT_JDK_FOUND=no
14673             else
14674               # We're done! :-)
14675               BOOT_JDK_FOUND=yes
14676 
14677   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14678 
14679   # Input might be given as Windows format, start by converting to
14680   # unix format.
14681   path="$BOOT_JDK"
14682   new_path=`$CYGPATH -u "$path"`
14683 
14684   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14685   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14686   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14687   # "foo.exe" is OK but "foo" is an error.
14688   #
14689   # This test is therefore slightly more accurate than "test -f" to check for file precense.
14690   # It is also a way to make sure we got the proper file name for the real test later on.
14691   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14692   if test "x$test_shortpath" = x; then
14693     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14694 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14695     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14696   fi
14697 
14698   # Call helper function which possibly converts this using DOS-style short mode.
14699   # If so, the updated path is stored in $new_path.
14700 
14701   input_path="$new_path"
14702   # Check if we need to convert this using DOS-style short mode. If the path
14703   # contains just simple characters, use it. Otherwise (spaces, weird characters),
14704   # take no chances and rewrite it.
14705   # Note: m4 eats our [], so we need to use [ and ] instead.
14706   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14707   if test "x$has_forbidden_chars" != x; then
14708     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14709     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14710     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14711     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14712       # Going to short mode and back again did indeed matter. Since short mode is
14713       # case insensitive, let's make it lowercase to improve readability.
14714       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14715       # Now convert it back to Unix-stile (cygpath)
14716       input_path=`$CYGPATH -u "$shortmode_path"`
14717       new_path="$input_path"
14718     fi
14719   fi
14720 
14721   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14722   if test "x$test_cygdrive_prefix" = x; then
14723     # As a simple fix, exclude /usr/bin since it's not a real path.
14724     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14725       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14726       # a path prefixed by /cygdrive for fixpath to work.
14727       new_path="$CYGWIN_ROOT_PATH$input_path"
14728     fi
14729   fi
14730 
14731 
14732   if test "x$path" != "x$new_path"; then
14733     BOOT_JDK="$new_path"
14734     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14735 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14736   fi
14737 
14738   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14739 
14740   path="$BOOT_JDK"
14741   has_colon=`$ECHO $path | $GREP ^.:`
14742   new_path="$path"
14743   if test "x$has_colon" = x; then
14744     # Not in mixed or Windows style, start by that.
14745     new_path=`cmd //c echo $path`
14746   fi
14747 
14748 
14749   input_path="$new_path"
14750   # Check if we need to convert this using DOS-style short mode. If the path
14751   # contains just simple characters, use it. Otherwise (spaces, weird characters),
14752   # take no chances and rewrite it.
14753   # Note: m4 eats our [], so we need to use [ and ] instead.
14754   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14755   if test "x$has_forbidden_chars" != x; then
14756     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14757     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14758   fi
14759 
14760 
14761   windows_path="$new_path"
14762   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14763     unix_path=`$CYGPATH -u "$windows_path"`
14764     new_path="$unix_path"
14765   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14766     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14767     new_path="$unix_path"
14768   fi
14769 
14770   if test "x$path" != "x$new_path"; then
14771     BOOT_JDK="$new_path"
14772     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14773 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14774   fi
14775 
14776   # Save the first 10 bytes of this path to the storage, so fixpath can work.
14777   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14778 
14779   else
14780     # We're on a posix platform. Hooray! :)
14781     path="$BOOT_JDK"
14782     has_space=`$ECHO "$path" | $GREP " "`
14783     if test "x$has_space" != x; then
14784       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14785 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14786       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14787     fi
14788 
14789     # Use eval to expand a potential ~
14790     eval path="$path"
14791     if test ! -f "$path" && test ! -d "$path"; then
14792       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14793     fi
14794 
14795     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
14796   fi
14797 
14798               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14799 $as_echo_n "checking for Boot JDK... " >&6; }
14800               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14801 $as_echo "$BOOT_JDK" >&6; }
14802               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14803 $as_echo_n "checking Boot JDK version... " >&6; }
14804               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14805               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14806 $as_echo "$BOOT_JDK_VERSION" >&6; }
14807             fi # end check jdk version
14808           fi # end check rt.jar
14809         fi # end check javac
14810       fi # end check java
14811     fi # end check boot jdk found
14812   fi
14813 
14814     done
14815   fi
14816 
14817 
14818     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14819     if test "x$BOOT_JDK_FOUND" = xmaybe; then
14820       # Do we have a bin/java?
14821       if test ! -x "$BOOT_JDK/bin/java"; then
14822         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14823 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14824         BOOT_JDK_FOUND=no
14825       else
14826         # Do we have a bin/javac?
14827         if test ! -x "$BOOT_JDK/bin/javac"; then
14828           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14829 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14830           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14831 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14832           BOOT_JDK_FOUND=no
14833         else
14834           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14835           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14836             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14837 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14838             BOOT_JDK_FOUND=no
14839           else
14840             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14841             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14842 
14843             # Extra M4 quote needed to protect [] in grep expression.
14844             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14845             if test "x$FOUND_VERSION_78" = x; then
14846               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14847 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14848               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14849 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14850               BOOT_JDK_FOUND=no
14851             else
14852               # We're done! :-)
14853               BOOT_JDK_FOUND=yes
14854 
14855   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14856 
14857   # Input might be given as Windows format, start by converting to
14858   # unix format.
14859   path="$BOOT_JDK"
14860   new_path=`$CYGPATH -u "$path"`
14861 
14862   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14863   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14864   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14865   # "foo.exe" is OK but "foo" is an error.
14866   #
14867   # This test is therefore slightly more accurate than "test -f" to check for file precense.
14868   # It is also a way to make sure we got the proper file name for the real test later on.
14869   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14870   if test "x$test_shortpath" = x; then
14871     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14872 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14873     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14874   fi
14875 
14876   # Call helper function which possibly converts this using DOS-style short mode.
14877   # If so, the updated path is stored in $new_path.
14878 
14879   input_path="$new_path"
14880   # Check if we need to convert this using DOS-style short mode. If the path
14881   # contains just simple characters, use it. Otherwise (spaces, weird characters),
14882   # take no chances and rewrite it.
14883   # Note: m4 eats our [], so we need to use [ and ] instead.
14884   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14885   if test "x$has_forbidden_chars" != x; then
14886     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14887     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14888     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14889     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14890       # Going to short mode and back again did indeed matter. Since short mode is
14891       # case insensitive, let's make it lowercase to improve readability.
14892       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14893       # Now convert it back to Unix-stile (cygpath)
14894       input_path=`$CYGPATH -u "$shortmode_path"`
14895       new_path="$input_path"
14896     fi
14897   fi
14898 
14899   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14900   if test "x$test_cygdrive_prefix" = x; then
14901     # As a simple fix, exclude /usr/bin since it's not a real path.
14902     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14903       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14904       # a path prefixed by /cygdrive for fixpath to work.
14905       new_path="$CYGWIN_ROOT_PATH$input_path"
14906     fi
14907   fi
14908 
14909 
14910   if test "x$path" != "x$new_path"; then
14911     BOOT_JDK="$new_path"
14912     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14913 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14914   fi
14915 
14916   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14917 
14918   path="$BOOT_JDK"
14919   has_colon=`$ECHO $path | $GREP ^.:`
14920   new_path="$path"
14921   if test "x$has_colon" = x; then
14922     # Not in mixed or Windows style, start by that.
14923     new_path=`cmd //c echo $path`
14924   fi
14925 
14926 
14927   input_path="$new_path"
14928   # Check if we need to convert this using DOS-style short mode. If the path
14929   # contains just simple characters, use it. Otherwise (spaces, weird characters),
14930   # take no chances and rewrite it.
14931   # Note: m4 eats our [], so we need to use [ and ] instead.
14932   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14933   if test "x$has_forbidden_chars" != x; then
14934     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14935     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14936   fi
14937 
14938 
14939   windows_path="$new_path"
14940   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14941     unix_path=`$CYGPATH -u "$windows_path"`
14942     new_path="$unix_path"
14943   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14944     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14945     new_path="$unix_path"
14946   fi
14947 
14948   if test "x$path" != "x$new_path"; then
14949     BOOT_JDK="$new_path"
14950     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14951 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14952   fi
14953 
14954   # Save the first 10 bytes of this path to the storage, so fixpath can work.
14955   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14956 
14957   else
14958     # We're on a posix platform. Hooray! :)
14959     path="$BOOT_JDK"
14960     has_space=`$ECHO "$path" | $GREP " "`
14961     if test "x$has_space" != x; then
14962       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14963 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14964       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14965     fi
14966 
14967     # Use eval to expand a potential ~
14968     eval path="$path"
14969     if test ! -f "$path" && test ! -d "$path"; then
14970       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14971     fi
14972 
14973     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
14974   fi
14975 
14976               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14977 $as_echo_n "checking for Boot JDK... " >&6; }
14978               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14979 $as_echo "$BOOT_JDK" >&6; }
14980               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14981 $as_echo_n "checking Boot JDK version... " >&6; }
14982               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14983               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14984 $as_echo "$BOOT_JDK_VERSION" >&6; }
14985             fi # end check jdk version
14986           fi # end check rt.jar
14987         fi # end check javac
14988       fi # end check java
14989     fi # end check boot jdk found
14990   fi
14991 
14992   elif test "x$OPENJDK_TARGET_OS" = xlinux; then
14993 
14994   if test "x$BOOT_JDK_FOUND" = xno; then
14995     # Now execute the test
14996 
14997   BOOT_JDK_PREFIX="/usr/lib/jvm"
14998   BOOT_JDK_SUFFIX=""
14999   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
15000   if test "x$ALL_JDKS_FOUND" != x; then
15001     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
15002 
15003   if test "x$BOOT_JDK_FOUND" = xno; then
15004     # Now execute the test
15005 
15006         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
15007         if test -d "$BOOT_JDK"; then
15008           BOOT_JDK_FOUND=maybe
15009           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
15010 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
15011         fi
15012 
15013 
15014     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
15015     if test "x$BOOT_JDK_FOUND" = xmaybe; then
15016       # Do we have a bin/java?
15017       if test ! -x "$BOOT_JDK/bin/java"; then
15018         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
15019 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
15020         BOOT_JDK_FOUND=no
15021       else
15022         # Do we have a bin/javac?
15023         if test ! -x "$BOOT_JDK/bin/javac"; then
15024           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
15025 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
15026           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
15027 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
15028           BOOT_JDK_FOUND=no
15029         else
15030           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
15031           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
15032             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
15033 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
15034             BOOT_JDK_FOUND=no
15035           else
15036             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
15037             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
15038 
15039             # Extra M4 quote needed to protect [] in grep expression.
15040             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
15041             if test "x$FOUND_VERSION_78" = x; then
15042               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
15043 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
15044               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
15045 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
15046               BOOT_JDK_FOUND=no
15047             else
15048               # We're done! :-)
15049               BOOT_JDK_FOUND=yes
15050 
15051   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15052 
15053   # Input might be given as Windows format, start by converting to
15054   # unix format.
15055   path="$BOOT_JDK"
15056   new_path=`$CYGPATH -u "$path"`
15057 
15058   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15059   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15060   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15061   # "foo.exe" is OK but "foo" is an error.
15062   #
15063   # This test is therefore slightly more accurate than "test -f" to check for file precense.
15064   # It is also a way to make sure we got the proper file name for the real test later on.
15065   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15066   if test "x$test_shortpath" = x; then
15067     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15068 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15069     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
15070   fi
15071 
15072   # Call helper function which possibly converts this using DOS-style short mode.
15073   # If so, the updated path is stored in $new_path.
15074 
15075   input_path="$new_path"
15076   # Check if we need to convert this using DOS-style short mode. If the path
15077   # contains just simple characters, use it. Otherwise (spaces, weird characters),
15078   # take no chances and rewrite it.
15079   # Note: m4 eats our [], so we need to use [ and ] instead.
15080   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15081   if test "x$has_forbidden_chars" != x; then
15082     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15083     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15084     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15085     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15086       # Going to short mode and back again did indeed matter. Since short mode is
15087       # case insensitive, let's make it lowercase to improve readability.
15088       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15089       # Now convert it back to Unix-stile (cygpath)
15090       input_path=`$CYGPATH -u "$shortmode_path"`
15091       new_path="$input_path"
15092     fi
15093   fi
15094 
15095   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15096   if test "x$test_cygdrive_prefix" = x; then
15097     # As a simple fix, exclude /usr/bin since it's not a real path.
15098     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15099       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15100       # a path prefixed by /cygdrive for fixpath to work.
15101       new_path="$CYGWIN_ROOT_PATH$input_path"
15102     fi
15103   fi
15104 
15105 
15106   if test "x$path" != "x$new_path"; then
15107     BOOT_JDK="$new_path"
15108     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15109 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15110   fi
15111 
15112   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15113 
15114   path="$BOOT_JDK"
15115   has_colon=`$ECHO $path | $GREP ^.:`
15116   new_path="$path"
15117   if test "x$has_colon" = x; then
15118     # Not in mixed or Windows style, start by that.
15119     new_path=`cmd //c echo $path`
15120   fi
15121 
15122 
15123   input_path="$new_path"
15124   # Check if we need to convert this using DOS-style short mode. If the path
15125   # contains just simple characters, use it. Otherwise (spaces, weird characters),
15126   # take no chances and rewrite it.
15127   # Note: m4 eats our [], so we need to use [ and ] instead.
15128   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15129   if test "x$has_forbidden_chars" != x; then
15130     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15131     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15132   fi
15133 
15134 
15135   windows_path="$new_path"
15136   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15137     unix_path=`$CYGPATH -u "$windows_path"`
15138     new_path="$unix_path"
15139   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15140     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15141     new_path="$unix_path"
15142   fi
15143 
15144   if test "x$path" != "x$new_path"; then
15145     BOOT_JDK="$new_path"
15146     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15147 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15148   fi
15149 
15150   # Save the first 10 bytes of this path to the storage, so fixpath can work.
15151   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15152 
15153   else
15154     # We're on a posix platform. Hooray! :)
15155     path="$BOOT_JDK"
15156     has_space=`$ECHO "$path" | $GREP " "`
15157     if test "x$has_space" != x; then
15158       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15159 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15160       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15161     fi
15162 
15163     # Use eval to expand a potential ~
15164     eval path="$path"
15165     if test ! -f "$path" && test ! -d "$path"; then
15166       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
15167     fi
15168 
15169     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
15170   fi
15171 
15172               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
15173 $as_echo_n "checking for Boot JDK... " >&6; }
15174               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
15175 $as_echo "$BOOT_JDK" >&6; }
15176               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
15177 $as_echo_n "checking Boot JDK version... " >&6; }
15178               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
15179               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
15180 $as_echo "$BOOT_JDK_VERSION" >&6; }
15181             fi # end check jdk version
15182           fi # end check rt.jar
15183         fi # end check javac
15184       fi # end check java
15185     fi # end check boot jdk found
15186   fi
15187 
15188     done
15189   fi
15190 
15191 
15192     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
15193     if test "x$BOOT_JDK_FOUND" = xmaybe; then
15194       # Do we have a bin/java?
15195       if test ! -x "$BOOT_JDK/bin/java"; then
15196         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
15197 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
15198         BOOT_JDK_FOUND=no
15199       else
15200         # Do we have a bin/javac?
15201         if test ! -x "$BOOT_JDK/bin/javac"; then
15202           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
15203 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
15204           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
15205 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
15206           BOOT_JDK_FOUND=no
15207         else
15208           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
15209           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
15210             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
15211 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
15212             BOOT_JDK_FOUND=no
15213           else
15214             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
15215             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
15216 
15217             # Extra M4 quote needed to protect [] in grep expression.
15218             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
15219             if test "x$FOUND_VERSION_78" = x; then
15220               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
15221 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
15222               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
15223 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
15224               BOOT_JDK_FOUND=no
15225             else
15226               # We're done! :-)
15227               BOOT_JDK_FOUND=yes
15228 
15229   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15230 
15231   # Input might be given as Windows format, start by converting to
15232   # unix format.
15233   path="$BOOT_JDK"
15234   new_path=`$CYGPATH -u "$path"`
15235 
15236   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15237   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15238   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15239   # "foo.exe" is OK but "foo" is an error.
15240   #
15241   # This test is therefore slightly more accurate than "test -f" to check for file precense.
15242   # It is also a way to make sure we got the proper file name for the real test later on.
15243   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15244   if test "x$test_shortpath" = x; then
15245     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15246 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15247     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
15248   fi
15249 
15250   # Call helper function which possibly converts this using DOS-style short mode.
15251   # If so, the updated path is stored in $new_path.
15252 
15253   input_path="$new_path"
15254   # Check if we need to convert this using DOS-style short mode. If the path
15255   # contains just simple characters, use it. Otherwise (spaces, weird characters),
15256   # take no chances and rewrite it.
15257   # Note: m4 eats our [], so we need to use [ and ] instead.
15258   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15259   if test "x$has_forbidden_chars" != x; then
15260     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15261     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15262     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15263     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15264       # Going to short mode and back again did indeed matter. Since short mode is
15265       # case insensitive, let's make it lowercase to improve readability.
15266       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15267       # Now convert it back to Unix-stile (cygpath)
15268       input_path=`$CYGPATH -u "$shortmode_path"`
15269       new_path="$input_path"
15270     fi
15271   fi
15272 
15273   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15274   if test "x$test_cygdrive_prefix" = x; then
15275     # As a simple fix, exclude /usr/bin since it's not a real path.
15276     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15277       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15278       # a path prefixed by /cygdrive for fixpath to work.
15279       new_path="$CYGWIN_ROOT_PATH$input_path"
15280     fi
15281   fi
15282 
15283 
15284   if test "x$path" != "x$new_path"; then
15285     BOOT_JDK="$new_path"
15286     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15287 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15288   fi
15289 
15290   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15291 
15292   path="$BOOT_JDK"
15293   has_colon=`$ECHO $path | $GREP ^.:`
15294   new_path="$path"
15295   if test "x$has_colon" = x; then
15296     # Not in mixed or Windows style, start by that.
15297     new_path=`cmd //c echo $path`
15298   fi
15299 
15300 
15301   input_path="$new_path"
15302   # Check if we need to convert this using DOS-style short mode. If the path
15303   # contains just simple characters, use it. Otherwise (spaces, weird characters),
15304   # take no chances and rewrite it.
15305   # Note: m4 eats our [], so we need to use [ and ] instead.
15306   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15307   if test "x$has_forbidden_chars" != x; then
15308     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15309     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15310   fi
15311 
15312 
15313   windows_path="$new_path"
15314   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15315     unix_path=`$CYGPATH -u "$windows_path"`
15316     new_path="$unix_path"
15317   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15318     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15319     new_path="$unix_path"
15320   fi
15321 
15322   if test "x$path" != "x$new_path"; then
15323     BOOT_JDK="$new_path"
15324     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15325 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15326   fi
15327 
15328   # Save the first 10 bytes of this path to the storage, so fixpath can work.
15329   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15330 
15331   else
15332     # We're on a posix platform. Hooray! :)
15333     path="$BOOT_JDK"
15334     has_space=`$ECHO "$path" | $GREP " "`
15335     if test "x$has_space" != x; then
15336       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15337 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15338       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15339     fi
15340 
15341     # Use eval to expand a potential ~
15342     eval path="$path"
15343     if test ! -f "$path" && test ! -d "$path"; then
15344       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
15345     fi
15346 
15347     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
15348   fi
15349 
15350               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
15351 $as_echo_n "checking for Boot JDK... " >&6; }
15352               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
15353 $as_echo "$BOOT_JDK" >&6; }
15354               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
15355 $as_echo_n "checking Boot JDK version... " >&6; }
15356               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
15357               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
15358 $as_echo "$BOOT_JDK_VERSION" >&6; }
15359             fi # end check jdk version
15360           fi # end check rt.jar
15361         fi # end check javac
15362       fi # end check java
15363     fi # end check boot jdk found
15364   fi
15365 
15366   fi
15367 
15368 
15369     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
15370     if test "x$BOOT_JDK_FOUND" = xmaybe; then
15371       # Do we have a bin/java?
15372       if test ! -x "$BOOT_JDK/bin/java"; then
15373         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
15374 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
15375         BOOT_JDK_FOUND=no
15376       else
15377         # Do we have a bin/javac?
15378         if test ! -x "$BOOT_JDK/bin/javac"; then
15379           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
15380 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
15381           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
15382 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
15383           BOOT_JDK_FOUND=no
15384         else
15385           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
15386           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
15387             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
15388 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
15389             BOOT_JDK_FOUND=no
15390           else
15391             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
15392             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
15393 
15394             # Extra M4 quote needed to protect [] in grep expression.
15395             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
15396             if test "x$FOUND_VERSION_78" = x; then
15397               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
15398 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
15399               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
15400 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
15401               BOOT_JDK_FOUND=no
15402             else
15403               # We're done! :-)
15404               BOOT_JDK_FOUND=yes
15405 
15406   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15407 
15408   # Input might be given as Windows format, start by converting to
15409   # unix format.
15410   path="$BOOT_JDK"
15411   new_path=`$CYGPATH -u "$path"`
15412 
15413   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15414   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15415   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15416   # "foo.exe" is OK but "foo" is an error.
15417   #
15418   # This test is therefore slightly more accurate than "test -f" to check for file precense.
15419   # It is also a way to make sure we got the proper file name for the real test later on.
15420   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15421   if test "x$test_shortpath" = x; then
15422     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15423 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15424     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
15425   fi
15426 
15427   # Call helper function which possibly converts this using DOS-style short mode.
15428   # If so, the updated path is stored in $new_path.
15429 
15430   input_path="$new_path"
15431   # Check if we need to convert this using DOS-style short mode. If the path
15432   # contains just simple characters, use it. Otherwise (spaces, weird characters),
15433   # take no chances and rewrite it.
15434   # Note: m4 eats our [], so we need to use [ and ] instead.
15435   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15436   if test "x$has_forbidden_chars" != x; then
15437     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15438     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15439     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15440     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15441       # Going to short mode and back again did indeed matter. Since short mode is
15442       # case insensitive, let's make it lowercase to improve readability.
15443       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15444       # Now convert it back to Unix-stile (cygpath)
15445       input_path=`$CYGPATH -u "$shortmode_path"`
15446       new_path="$input_path"
15447     fi
15448   fi
15449 
15450   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15451   if test "x$test_cygdrive_prefix" = x; then
15452     # As a simple fix, exclude /usr/bin since it's not a real path.
15453     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15454       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15455       # a path prefixed by /cygdrive for fixpath to work.
15456       new_path="$CYGWIN_ROOT_PATH$input_path"
15457     fi
15458   fi
15459 
15460 
15461   if test "x$path" != "x$new_path"; then
15462     BOOT_JDK="$new_path"
15463     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15464 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15465   fi
15466 
15467   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15468 
15469   path="$BOOT_JDK"
15470   has_colon=`$ECHO $path | $GREP ^.:`
15471   new_path="$path"
15472   if test "x$has_colon" = x; then
15473     # Not in mixed or Windows style, start by that.
15474     new_path=`cmd //c echo $path`
15475   fi
15476 
15477 
15478   input_path="$new_path"
15479   # Check if we need to convert this using DOS-style short mode. If the path
15480   # contains just simple characters, use it. Otherwise (spaces, weird characters),
15481   # take no chances and rewrite it.
15482   # Note: m4 eats our [], so we need to use [ and ] instead.
15483   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15484   if test "x$has_forbidden_chars" != x; then
15485     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15486     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15487   fi
15488 
15489 
15490   windows_path="$new_path"
15491   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15492     unix_path=`$CYGPATH -u "$windows_path"`
15493     new_path="$unix_path"
15494   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15495     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15496     new_path="$unix_path"
15497   fi
15498 
15499   if test "x$path" != "x$new_path"; then
15500     BOOT_JDK="$new_path"
15501     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15502 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15503   fi
15504 
15505   # Save the first 10 bytes of this path to the storage, so fixpath can work.
15506   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15507 
15508   else
15509     # We're on a posix platform. Hooray! :)
15510     path="$BOOT_JDK"
15511     has_space=`$ECHO "$path" | $GREP " "`
15512     if test "x$has_space" != x; then
15513       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15514 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15515       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15516     fi
15517 
15518     # Use eval to expand a potential ~
15519     eval path="$path"
15520     if test ! -f "$path" && test ! -d "$path"; then
15521       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
15522     fi
15523 
15524     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
15525   fi
15526 
15527               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
15528 $as_echo_n "checking for Boot JDK... " >&6; }
15529               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
15530 $as_echo "$BOOT_JDK" >&6; }
15531               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
15532 $as_echo_n "checking Boot JDK version... " >&6; }
15533               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
15534               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
15535 $as_echo "$BOOT_JDK_VERSION" >&6; }
15536             fi # end check jdk version
15537           fi # end check rt.jar
15538         fi # end check javac
15539       fi # end check java
15540     fi # end check boot jdk found
15541   fi
15542 
15543 
15544 # If we haven't found anything yet, we've truly lost. Give up.
15545 if test "x$BOOT_JDK_FOUND" = xno; then
15546 
15547     # Print a helpful message on how to acquire the necessary build dependency.
15548     # openjdk is the help tag: freetyp2, cups, pulse, alsa etc
15549     MISSING_DEPENDENCY=openjdk
15550     PKGHANDLER_COMMAND=
15551 
15552     case $PKGHANDLER in
15553         apt-get)
15554                 apt_help     $MISSING_DEPENDENCY ;;
15555     yum)
15556                 yum_help     $MISSING_DEPENDENCY ;;
15557         port)
15558                 port_help    $MISSING_DEPENDENCY ;;
15559         pkgutil)
15560                 pkgutil_help $MISSING_DEPENDENCY ;;
15561         pkgadd)
15562                 pkgadd_help  $MISSING_DEPENDENCY ;;
15563     * )
15564       break ;;
15565     esac
15566 
15567     if test "x$PKGHANDLER_COMMAND" != x; then
15568         HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
15569     fi
15570 
15571   { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find a valid Boot JDK. $HELP_MSG" >&5
15572 $as_echo "$as_me: Could not find a valid Boot JDK. $HELP_MSG" >&6;}
15573   { $as_echo "$as_me:${as_lineno-$LINENO}: This might be fixed by explicitely setting --with-boot-jdk" >&5
15574 $as_echo "$as_me: This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15575   as_fn_error $? "Cannot continue" "$LINENO" 5
15576 fi
15577 
15578 # Setup proper paths for what we found
15579 BOOT_RTJAR="$BOOT_JDK/jre/lib/rt.jar"
15580 if test ! -f "$BOOT_RTJAR"; then
15581     # On MacOSX it is called classes.jar
15582     BOOT_RTJAR="$BOOT_JDK/../Classes/classes.jar"
15583     if test -f "$BOOT_RTJAR"; then
15584       # Remove the ..
15585       BOOT_RTJAR="`cd ${BOOT_RTJAR%/*} && pwd`/${BOOT_RTJAR##*/}"
15586     fi
15587 fi
15588 BOOT_TOOLSJAR="$BOOT_JDK/lib/tools.jar"
15589 BOOT_JDK="$BOOT_JDK"
15590 
15591 
15592 
15593 
15594 # Setup tools from the Boot JDK.
15595 
15596   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
15597 $as_echo_n "checking for java in Boot JDK... " >&6; }
15598   JAVA=$BOOT_JDK/bin/java
15599   if test ! -x $JAVA; then
15600       { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15601 $as_echo "not found" >&6; }
15602       { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15603 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15604       as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
15605   fi
15606   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15607 $as_echo "ok" >&6; }
15608 
15609 
15610   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
15611 $as_echo_n "checking for javac in Boot JDK... " >&6; }
15612   JAVAC=$BOOT_JDK/bin/javac
15613   if test ! -x $JAVAC; then
15614       { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15615 $as_echo "not found" >&6; }
15616       { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15617 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15618       as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
15619   fi
15620   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15621 $as_echo "ok" >&6; }
15622 
15623 
15624   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
15625 $as_echo_n "checking for javah in Boot JDK... " >&6; }
15626   JAVAH=$BOOT_JDK/bin/javah
15627   if test ! -x $JAVAH; then
15628       { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15629 $as_echo "not found" >&6; }
15630       { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15631 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15632       as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
15633   fi
15634   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15635 $as_echo "ok" >&6; }
15636 
15637 
15638   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javap in Boot JDK" >&5
15639 $as_echo_n "checking for javap in Boot JDK... " >&6; }
15640   JAVAP=$BOOT_JDK/bin/javap
15641   if test ! -x $JAVAP; then
15642       { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15643 $as_echo "not found" >&6; }
15644       { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15645 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15646       as_fn_error $? "Could not find javap in the Boot JDK" "$LINENO" 5
15647   fi
15648   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15649 $as_echo "ok" >&6; }
15650 
15651 
15652   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
15653 $as_echo_n "checking for jar in Boot JDK... " >&6; }
15654   JAR=$BOOT_JDK/bin/jar
15655   if test ! -x $JAR; then
15656       { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15657 $as_echo "not found" >&6; }
15658       { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15659 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15660       as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
15661   fi
15662   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15663 $as_echo "ok" >&6; }
15664 
15665 
15666   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for rmic in Boot JDK" >&5
15667 $as_echo_n "checking for rmic in Boot JDK... " >&6; }
15668   RMIC=$BOOT_JDK/bin/rmic
15669   if test ! -x $RMIC; then
15670       { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15671 $as_echo "not found" >&6; }
15672       { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15673 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15674       as_fn_error $? "Could not find rmic in the Boot JDK" "$LINENO" 5
15675   fi
15676   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15677 $as_echo "ok" >&6; }
15678 
15679 
15680   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for native2ascii in Boot JDK" >&5
15681 $as_echo_n "checking for native2ascii in Boot JDK... " >&6; }
15682   NATIVE2ASCII=$BOOT_JDK/bin/native2ascii
15683   if test ! -x $NATIVE2ASCII; then
15684       { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15685 $as_echo "not found" >&6; }
15686       { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15687 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15688       as_fn_error $? "Could not find native2ascii in the Boot JDK" "$LINENO" 5
15689   fi
15690   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15691 $as_echo "ok" >&6; }
15692 
15693 
15694 # Finally, set some other options...
15695 
15696 # When compiling code to be executed by the Boot JDK, force jdk7 compatibility.
15697 BOOT_JDK_SOURCETARGET="-source 7 -target 7"
15698 
15699 
15700 
15701 
15702 ##############################################################################
15703 #
15704 # Specify options for anything that is run with the Boot JDK.
15705 #
15706 
15707 # Check whether --with-boot-jdk-jvmargs was given.
15708 if test "${with_boot_jdk_jvmargs+set}" = set; then :
15709   withval=$with_boot_jdk_jvmargs;
15710 fi
15711 
15712 
15713 if test "x$with_boot_jdk_jvmargs" = x; then
15714     # Not all JVM:s accept the same arguments on the command line.
15715     # OpenJDK specific increase in thread stack for JDK build,
15716     # well more specifically, when running javac.
15717     if test "x$BUILD_NUM_BITS" = x32; then
15718        STACK_SIZE=768
15719     else
15720        # Running Javac on a JVM on a 64-bit machine, the stack takes more space
15721        # since 64-bit pointers are pushed on the stach. Apparently, we need
15722        # to increase the stack space when javacing the JDK....
15723        STACK_SIZE=1536
15724     fi
15725 
15726     # Minimum amount of heap memory.
15727 
15728     $ECHO "Check if jvm arg is ok: -Xms64M" >&5
15729     $ECHO "Command: $JAVA -Xms64M -version" >&5
15730     OUTPUT=`$JAVA -Xms64M -version 2>&1`
15731     FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
15732     FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
15733     if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15734         boot_jdk_jvmargs="$boot_jdk_jvmargs -Xms64M"
15735         JVM_ARG_OK=true
15736     else
15737         $ECHO "Arg failed:" >&5
15738         $ECHO "$OUTPUT" >&5
15739         JVM_ARG_OK=false
15740     fi
15741 
15742     if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
15743         # Why does macosx need more heap? Its the huge JDK batch.
15744 
15745     $ECHO "Check if jvm arg is ok: -Xmx1600M" >&5
15746     $ECHO "Command: $JAVA -Xmx1600M -version" >&5
15747     OUTPUT=`$JAVA -Xmx1600M -version 2>&1`
15748     FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
15749     FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
15750     if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15751         boot_jdk_jvmargs="$boot_jdk_jvmargs -Xmx1600M"
15752         JVM_ARG_OK=true
15753     else
15754         $ECHO "Arg failed:" >&5
15755         $ECHO "$OUTPUT" >&5
15756         JVM_ARG_OK=false
15757     fi
15758 
15759     else
15760 
15761     $ECHO "Check if jvm arg is ok: -Xmx1100M" >&5
15762     $ECHO "Command: $JAVA -Xmx1100M -version" >&5
15763     OUTPUT=`$JAVA -Xmx1100M -version 2>&1`
15764     FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
15765     FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
15766     if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15767         boot_jdk_jvmargs="$boot_jdk_jvmargs -Xmx1100M"
15768         JVM_ARG_OK=true
15769     else
15770         $ECHO "Arg failed:" >&5
15771         $ECHO "$OUTPUT" >&5
15772         JVM_ARG_OK=false
15773     fi
15774 
15775     fi
15776     # When is adding -client something that speeds up the JVM?
15777     # ADD_JVM_ARG_IF_OK([-client],boot_jdk_jvmargs,[$JAVA])
15778 
15779     $ECHO "Check if jvm arg is ok: -XX:PermSize=32m" >&5
15780     $ECHO "Command: $JAVA -XX:PermSize=32m -version" >&5
15781     OUTPUT=`$JAVA -XX:PermSize=32m -version 2>&1`
15782     FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
15783     FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
15784     if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15785         boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:PermSize=32m"
15786         JVM_ARG_OK=true
15787     else
15788         $ECHO "Arg failed:" >&5
15789         $ECHO "$OUTPUT" >&5
15790         JVM_ARG_OK=false
15791     fi
15792 
15793 
15794     $ECHO "Check if jvm arg is ok: -XX:MaxPermSize=160m" >&5
15795     $ECHO "Command: $JAVA -XX:MaxPermSize=160m -version" >&5
15796     OUTPUT=`$JAVA -XX:MaxPermSize=160m -version 2>&1`
15797     FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
15798     FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
15799     if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15800         boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:MaxPermSize=160m"
15801         JVM_ARG_OK=true
15802     else
15803         $ECHO "Arg failed:" >&5
15804         $ECHO "$OUTPUT" >&5
15805         JVM_ARG_OK=false
15806     fi
15807 
15808 
15809     $ECHO "Check if jvm arg is ok: -XX:ThreadStackSize=$STACK_SIZE" >&5
15810     $ECHO "Command: $JAVA -XX:ThreadStackSize=$STACK_SIZE -version" >&5
15811     OUTPUT=`$JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1`
15812     FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
15813     FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
15814     if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15815         boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:ThreadStackSize=$STACK_SIZE"
15816         JVM_ARG_OK=true
15817     else
15818         $ECHO "Arg failed:" >&5
15819         $ECHO "$OUTPUT" >&5
15820         JVM_ARG_OK=false
15821     fi
15822 
15823     # Disable special log output when a debug build is used as Boot JDK...
15824 
15825     $ECHO "Check if jvm arg is ok: -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput" >&5
15826     $ECHO "Command: $JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version" >&5
15827     OUTPUT=`$JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version 2>&1`
15828     FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
15829     FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
15830     if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15831         boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput"
15832         JVM_ARG_OK=true
15833     else
15834         $ECHO "Arg failed:" >&5
15835         $ECHO "$OUTPUT" >&5
15836         JVM_ARG_OK=false
15837     fi
15838 
15839 fi
15840 
15841 BOOT_JDK_JVMARGS=$boot_jdk_jvmargs
15842 
15843 
15844 
15845 ###############################################################################
15846 #
15847 # Configure the sources to use. We can add or override individual directories.
15848 #
15849 ###############################################################################
15850 
15851 
15852 
15853 # Where are the sources. Any of these can be overridden
15854 # using --with-override-corba and the likes.
15855 LANGTOOLS_TOPDIR="$SRC_ROOT/langtools"
15856 CORBA_TOPDIR="$SRC_ROOT/corba"
15857 JAXP_TOPDIR="$SRC_ROOT/jaxp"
15858 JAXWS_TOPDIR="$SRC_ROOT/jaxws"
15859 HOTSPOT_TOPDIR="$SRC_ROOT/hotspot"
15860 NASHORN_TOPDIR="$SRC_ROOT/nashorn"
15861 JDK_TOPDIR="$SRC_ROOT/jdk"
15862 
15863 
15864 
15865 
15866 
15867 
15868 
15869 
15870 
15871 
15872 ###############################################################################
15873 #
15874 # Pickup additional source for a component from outside of the source root
15875 # or override source for a component.
15876 #
15877 
15878 # Check whether --with-add-source-root was given.
15879 if test "${with_add_source_root+set}" = set; then :
15880   withval=$with_add_source_root;
15881 fi
15882 
15883 
15884 
15885 # Check whether --with-override-source-root was given.
15886 if test "${with_override_source_root+set}" = set; then :
15887   withval=$with_override_source_root;
15888 fi
15889 
15890 
15891 
15892 # Check whether --with-adds-and-overrides was given.
15893 if test "${with_adds_and_overrides+set}" = set; then :
15894   withval=$with_adds_and_overrides;
15895 fi
15896 
15897 
15898 if test "x$with_adds_and_overrides" != x; then
15899     with_add_source_root="$with_adds_and_overrides/adds"
15900     with_override_source_root="$with_adds_and_overrides/overrides"
15901 fi
15902 
15903 if test "x$with_add_source_root" != x; then
15904     if ! test -d $with_add_source_root; then
15905        as_fn_error $? "Trying to use a non-existant add-source-root $with_add_source_root" "$LINENO" 5
15906     fi
15907     CURDIR="$PWD"
15908     cd "$with_add_source_root"
15909     ADD_SRC_ROOT="`pwd`"
15910     cd "$CURDIR"
15911     # Verify that the addon source root does not have any root makefiles.
15912     # If it does, then it is usually an error, prevent this.
15913     if test -f $with_add_source_root/langtools/makefiles/Makefile || \
15914        test -f $with_add_source_root/langtools/make/Makefile; then
15915         as_fn_error $? "Your add source root seems to contain a full langtools repo! An add source root should only contain additional sources." "$LINENO" 5
15916     fi
15917     if test -f $with_add_source_root/corba/makefiles/Makefile || \
15918        test -f $with_add_source_root/corba/make/Makefile; then
15919         as_fn_error $? "Your add source root seems to contain a full corba repo! An add source root should only contain additional sources." "$LINENO" 5
15920     fi
15921     if test -f $with_add_source_root/jaxp/makefiles/Makefile || \
15922        test -f $with_add_source_root/jaxp/make/Makefile; then
15923         as_fn_error $? "Your add source root seems to contain a full jaxp repo! An add source root should only contain additional sources." "$LINENO" 5
15924     fi
15925     if test -f $with_add_source_root/jaxws/makefiles/Makefile || \
15926        test -f $with_add_source_root/jaxws/make/Makefile; then
15927         as_fn_error $? "Your add source root seems to contain a full jaxws repo! An add source root should only contain additional sources." "$LINENO" 5
15928     fi
15929     if test -f $with_add_source_root/hotspot/makefiles/Makefile || \
15930        test -f $with_add_source_root/hotspot/make/Makefile; then
15931         as_fn_error $? "Your add source root seems to contain a full hotspot repo! An add source root should only contain additional sources." "$LINENO" 5
15932     fi
15933     if test -f $with_add_source_root/jdk/makefiles/Makefile || \
15934        test -f $with_add_source_root/jdk/make/Makefile; then
15935         as_fn_error $? "Your add source root seems to contain a full JDK repo! An add source root should only contain additional sources." "$LINENO" 5
15936     fi
15937 fi
15938 
15939 
15940 if test "x$with_override_source_root" != x; then
15941     if ! test -d $with_override_source_root; then
15942        as_fn_error $? "Trying to use a non-existant override-source-root $with_override_source_root" "$LINENO" 5
15943     fi
15944     CURDIR="$PWD"
15945     cd "$with_override_source_root"
15946     OVERRIDE_SRC_ROOT="`pwd`"
15947     cd "$CURDIR"
15948     if test -f $with_override_source_root/langtools/makefiles/Makefile || \
15949        test -f $with_override_source_root/langtools/make/Makefile; then
15950         as_fn_error $? "Your override source root seems to contain a full langtools repo! An override source root should only contain sources that override." "$LINENO" 5
15951     fi
15952     if test -f $with_override_source_root/corba/makefiles/Makefile || \
15953        test -f $with_override_source_root/corba/make/Makefile; then
15954         as_fn_error $? "Your override source root seems to contain a full corba repo! An override source root should only contain sources that override." "$LINENO" 5
15955     fi
15956     if test -f $with_override_source_root/jaxp/makefiles/Makefile || \
15957        test -f $with_override_source_root/jaxp/make/Makefile; then
15958         as_fn_error $? "Your override source root seems to contain a full jaxp repo! An override source root should only contain sources that override." "$LINENO" 5
15959     fi
15960     if test -f $with_override_source_root/jaxws/makefiles/Makefile || \
15961        test -f $with_override_source_root/jaxws/make/Makefile; then
15962         as_fn_error $? "Your override source root seems to contain a full jaxws repo! An override source root should only contain sources that override." "$LINENO" 5
15963     fi
15964     if test -f $with_override_source_root/hotspot/makefiles/Makefile || \
15965        test -f $with_override_source_root/hotspot/make/Makefile; then
15966         as_fn_error $? "Your override source root seems to contain a full hotspot repo! An override source root should only contain sources that override." "$LINENO" 5
15967     fi
15968     if test -f $with_override_source_root/jdk/makefiles/Makefile || \
15969        test -f $with_override_source_root/jdk/make/Makefile; then
15970         as_fn_error $? "Your override source root seems to contain a full JDK repo! An override source root should only contain sources that override." "$LINENO" 5
15971     fi
15972 fi
15973 
15974 
15975 ###############################################################################
15976 #
15977 # Override a repo completely, this is used for example when you have 3 small
15978 # development sandboxes of the langtools sources and want to avoid having 3 full
15979 # OpenJDK sources checked out on disk.
15980 #
15981 # Assuming that the 3 langtools sandboxes are located here:
15982 # /home/fredrik/sandbox1/langtools
15983 # /home/fredrik/sandbox2/langtools
15984 # /home/fredrik/sandbox3/langtools
15985 #
15986 # From the source root you create build subdirs manually:
15987 #     mkdir -p build1 build2 build3
15988 # in each build directory run:
15989 #     (cd build1 && ../configure --with-override-langtools=/home/fredrik/sandbox1 && make)
15990 #     (cd build2 && ../configure --with-override-langtools=/home/fredrik/sandbox2 && make)
15991 #     (cd build3 && ../configure --with-override-langtools=/home/fredrik/sandbox3 && make)
15992 #
15993 
15994 
15995 # Check whether --with-override-langtools was given.
15996 if test "${with_override_langtools+set}" = set; then :
15997   withval=$with_override_langtools;
15998 fi
15999 
16000 
16001 
16002 # Check whether --with-override-corba was given.
16003 if test "${with_override_corba+set}" = set; then :
16004   withval=$with_override_corba;
16005 fi
16006 
16007 
16008 
16009 # Check whether --with-override-jaxp was given.
16010 if test "${with_override_jaxp+set}" = set; then :
16011   withval=$with_override_jaxp;
16012 fi
16013 
16014 
16015 
16016 # Check whether --with-override-jaxws was given.
16017 if test "${with_override_jaxws+set}" = set; then :
16018   withval=$with_override_jaxws;
16019 fi
16020 
16021 
16022 
16023 # Check whether --with-override-hotspot was given.
16024 if test "${with_override_hotspot+set}" = set; then :
16025   withval=$with_override_hotspot;
16026 fi
16027 
16028 
16029 
16030 # Check whether --with-override-jdk was given.
16031 if test "${with_override_jdk+set}" = set; then :
16032   withval=$with_override_jdk;
16033 fi
16034 
16035 
16036 if test "x$with_override_langtools" != x; then
16037     CURDIR="$PWD"
16038     cd "$with_override_langtools"
16039     LANGTOOLS_TOPDIR="`pwd`"
16040     cd "$CURDIR"
16041     if ! test -f $LANGTOOLS_TOPDIR/makefiles/Makefile; then
16042         as_fn_error $? "You have to override langtools with a full langtools repo!" "$LINENO" 5
16043     fi
16044     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if langtools should be overridden" >&5
16045 $as_echo_n "checking if langtools should be overridden... " >&6; }
16046     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $LANGTOOLS_TOPDIR" >&5
16047 $as_echo "yes with $LANGTOOLS_TOPDIR" >&6; }
16048 fi
16049 if test "x$with_override_corba" != x; then
16050     CURDIR="$PWD"
16051     cd "$with_override_corba"
16052     CORBA_TOPDIR="`pwd`"
16053     cd "$CURDIR"
16054     if ! test -f $CORBA_TOPDIR/makefiles/Makefile; then
16055         as_fn_error $? "You have to override corba with a full corba repo!" "$LINENO" 5
16056     fi
16057     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if corba should be overridden" >&5
16058 $as_echo_n "checking if corba should be overridden... " >&6; }
16059     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $CORBA_TOPDIR" >&5
16060 $as_echo "yes with $CORBA_TOPDIR" >&6; }
16061 fi
16062 if test "x$with_override_jaxp" != x; then
16063     CURDIR="$PWD"
16064     cd "$with_override_jaxp"
16065     JAXP_TOPDIR="`pwd`"
16066     cd "$CURDIR"
16067     if ! test -f $JAXP_TOPDIR/makefiles/Makefile; then
16068         as_fn_error $? "You have to override jaxp with a full jaxp repo!" "$LINENO" 5
16069     fi
16070     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jaxp should be overridden" >&5
16071 $as_echo_n "checking if jaxp should be overridden... " >&6; }
16072     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JAXP_TOPDIR" >&5
16073 $as_echo "yes with $JAXP_TOPDIR" >&6; }
16074 fi
16075 if test "x$with_override_jaxws" != x; then
16076     CURDIR="$PWD"
16077     cd "$with_override_jaxws"
16078     JAXWS_TOPDIR="`pwd`"
16079     cd "$CURDIR"
16080     if ! test -f $JAXWS_TOPDIR/makefiles/Makefile; then
16081         as_fn_error $? "You have to override jaxws with a full jaxws repo!" "$LINENO" 5
16082     fi
16083     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jaxws should be overridden" >&5
16084 $as_echo_n "checking if jaxws should be overridden... " >&6; }
16085     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JAXWS_TOPDIR" >&5
16086 $as_echo "yes with $JAXWS_TOPDIR" >&6; }
16087 fi
16088 if test "x$with_override_hotspot" != x; then
16089     CURDIR="$PWD"
16090     cd "$with_override_hotspot"
16091     HOTSPOT_TOPDIR="`pwd`"
16092     cd "$CURDIR"
16093     if ! test -f $HOTSPOT_TOPDIR/make/Makefile && \
16094        ! test -f $HOTSPOT_TOPDIR/makefiles/Makefile; then
16095         as_fn_error $? "You have to override hotspot with a full hotspot repo!" "$LINENO" 5
16096     fi
16097     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be overridden" >&5
16098 $as_echo_n "checking if hotspot should be overridden... " >&6; }
16099     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $HOTSPOT_TOPDIR" >&5
16100 $as_echo "yes with $HOTSPOT_TOPDIR" >&6; }
16101 fi
16102 if test "x$with_override_nashorn" != x; then
16103     CURDIR="$PWD"
16104     cd "$with_override_nashorn"
16105     NASHORN_TOPDIR="`pwd`"
16106     cd "$CURDIR"
16107     if ! test -f $NASHORN_TOPDIR/makefiles/BuildNashorn.gmk; then
16108         as_fn_error $? "You have to override nashorn with a full nashorn repo!" "$LINENO" 5
16109     fi
16110     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if nashorn should be overridden" >&5
16111 $as_echo_n "checking if nashorn should be overridden... " >&6; }
16112     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $NASHORN_TOPDIR" >&5
16113 $as_echo "yes with $NASHORN_TOPDIR" >&6; }
16114 fi
16115 if test "x$with_override_jdk" != x; then
16116     CURDIR="$PWD"
16117     cd "$with_override_jdk"
16118     JDK_TOPDIR="`pwd`"
16119     cd "$CURDIR"
16120     if ! test -f $JDK_TOPDIR/makefiles/Makefile; then
16121         as_fn_error $? "You have to override JDK with a full JDK repo!" "$LINENO" 5
16122     fi
16123     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if JDK should be overridden" >&5
16124 $as_echo_n "checking if JDK should be overridden... " >&6; }
16125     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JDK_TOPDIR" >&5
16126 $as_echo "yes with $JDK_TOPDIR" >&6; }
16127 fi
16128 
16129 
16130 
16131 BUILD_OUTPUT="$OUTPUT_ROOT"
16132 
16133 
16134 HOTSPOT_DIST="$OUTPUT_ROOT/hotspot/dist"
16135 BUILD_HOTSPOT=true
16136 
16137 
16138 
16139 # Check whether --with-import-hotspot was given.
16140 if test "${with_import_hotspot+set}" = set; then :
16141   withval=$with_import_hotspot;
16142 fi
16143 
16144 if test "x$with_import_hotspot" != x; then
16145     CURDIR="$PWD"
16146     cd "$with_import_hotspot"
16147     HOTSPOT_DIST="`pwd`"
16148     cd "$CURDIR"
16149     if ! (test -d $HOTSPOT_DIST/lib && test -d $HOTSPOT_DIST/jre/lib); then
16150         as_fn_error $? "You have to import hotspot from a full jdk image or hotspot build dist dir!" "$LINENO" 5
16151     fi
16152     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be imported" >&5
16153 $as_echo_n "checking if hotspot should be imported... " >&6; }
16154     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes from $HOTSPOT_DIST" >&5
16155 $as_echo "yes from $HOTSPOT_DIST" >&6; }
16156     BUILD_HOTSPOT=false
16157 fi
16158 
16159 JDK_OUTPUTDIR="$OUTPUT_ROOT/jdk"
16160 
16161 
16162 ###############################################################################
16163 #
16164 # Setup the toolchain (compilers etc), i.e. the tools that need to be
16165 # cross-compilation aware.
16166 #
16167 ###############################################################################
16168 
16169 
16170 ###############################################################################
16171 #
16172 # Configure the development tool paths and potential sysroot.
16173 #
16174 ac_ext=cpp
16175 ac_cpp='$CXXCPP $CPPFLAGS'
16176 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
16177 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
16178 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
16179 
16180 
16181 # The option used to specify the target .o,.a or .so file.
16182 # When compiling, how to specify the to be created object file.
16183 CC_OUT_OPTION='-o$(SPACE)'
16184 # When linking, how to specify the to be created executable.
16185 EXE_OUT_OPTION='-o$(SPACE)'
16186 # When linking, how to specify the to be created dynamically linkable library.
16187 LD_OUT_OPTION='-o$(SPACE)'
16188 # When archiving, how to specify the to be create static archive for object files.
16189 AR_OUT_OPTION='rcs$(SPACE)'
16190 
16191 
16192 
16193 
16194 
16195 # Locate the actual tools
16196 
16197 
16198 # Check whether --with-jtreg was given.
16199 if test "${with_jtreg+set}" = set; then :
16200   withval=$with_jtreg;
16201 else
16202   with_jtreg=no
16203 fi
16204 
16205 
16206   if test "x$with_jtreg" = xno; then
16207     # jtreg disabled
16208     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
16209 $as_echo_n "checking for jtreg... " >&6; }
16210     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16211 $as_echo "no" >&6; }
16212   else
16213     if test "x$with_jtreg" != xyes; then
16214       # with path specified.
16215       JT_HOME="$with_jtreg"
16216     fi
16217 
16218     if test "x$JT_HOME" != x; then
16219       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
16220 $as_echo_n "checking for jtreg... " >&6; }
16221 
16222       # use JT_HOME enviroment var.
16223 
16224   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16225 
16226   # Input might be given as Windows format, start by converting to
16227   # unix format.
16228   path="$JT_HOME"
16229   new_path=`$CYGPATH -u "$path"`
16230 
16231   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16232   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16233   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16234   # "foo.exe" is OK but "foo" is an error.
16235   #
16236   # This test is therefore slightly more accurate than "test -f" to check for file precense.
16237   # It is also a way to make sure we got the proper file name for the real test later on.
16238   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16239   if test "x$test_shortpath" = x; then
16240     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
16241 $as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
16242     as_fn_error $? "Cannot locate the the path of JT_HOME" "$LINENO" 5
16243   fi
16244 
16245   # Call helper function which possibly converts this using DOS-style short mode.
16246   # If so, the updated path is stored in $new_path.
16247 
16248   input_path="$new_path"
16249   # Check if we need to convert this using DOS-style short mode. If the path
16250   # contains just simple characters, use it. Otherwise (spaces, weird characters),
16251   # take no chances and rewrite it.
16252   # Note: m4 eats our [], so we need to use [ and ] instead.
16253   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16254   if test "x$has_forbidden_chars" != x; then
16255     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16256     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16257     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16258     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16259       # Going to short mode and back again did indeed matter. Since short mode is
16260       # case insensitive, let's make it lowercase to improve readability.
16261       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16262       # Now convert it back to Unix-stile (cygpath)
16263       input_path=`$CYGPATH -u "$shortmode_path"`
16264       new_path="$input_path"
16265     fi
16266   fi
16267 
16268   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16269   if test "x$test_cygdrive_prefix" = x; then
16270     # As a simple fix, exclude /usr/bin since it's not a real path.
16271     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
16272       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16273       # a path prefixed by /cygdrive for fixpath to work.
16274       new_path="$CYGWIN_ROOT_PATH$input_path"
16275     fi
16276   fi
16277 
16278 
16279   if test "x$path" != "x$new_path"; then
16280     JT_HOME="$new_path"
16281     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
16282 $as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
16283   fi
16284 
16285   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16286 
16287   path="$JT_HOME"
16288   has_colon=`$ECHO $path | $GREP ^.:`
16289   new_path="$path"
16290   if test "x$has_colon" = x; then
16291     # Not in mixed or Windows style, start by that.
16292     new_path=`cmd //c echo $path`
16293   fi
16294 
16295 
16296   input_path="$new_path"
16297   # Check if we need to convert this using DOS-style short mode. If the path
16298   # contains just simple characters, use it. Otherwise (spaces, weird characters),
16299   # take no chances and rewrite it.
16300   # Note: m4 eats our [], so we need to use [ and ] instead.
16301   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16302   if test "x$has_forbidden_chars" != x; then
16303     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16304     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16305   fi
16306 
16307 
16308   windows_path="$new_path"
16309   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16310     unix_path=`$CYGPATH -u "$windows_path"`
16311     new_path="$unix_path"
16312   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16313     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16314     new_path="$unix_path"
16315   fi
16316 
16317   if test "x$path" != "x$new_path"; then
16318     JT_HOME="$new_path"
16319     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
16320 $as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
16321   fi
16322 
16323   # Save the first 10 bytes of this path to the storage, so fixpath can work.
16324   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16325 
16326   else
16327     # We're on a posix platform. Hooray! :)
16328     path="$JT_HOME"
16329     has_space=`$ECHO "$path" | $GREP " "`
16330     if test "x$has_space" != x; then
16331       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
16332 $as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
16333       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
16334     fi
16335 
16336     # Use eval to expand a potential ~
16337     eval path="$path"
16338     if test ! -f "$path" && test ! -d "$path"; then
16339       as_fn_error $? "The path of JT_HOME, which resolves as \"$path\", is not found." "$LINENO" 5
16340     fi
16341 
16342     JT_HOME="`cd "$path"; $THEPWDCMD -L`"
16343   fi
16344 
16345 
16346       # jtreg win32 script works for everybody
16347       JTREGEXE="$JT_HOME/win32/bin/jtreg"
16348 
16349       if test ! -f "$JTREGEXE"; then
16350         as_fn_error $? "JTReg executable does not exist: $JTREGEXE" "$LINENO" 5
16351       fi
16352 
16353       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
16354 $as_echo "$JTREGEXE" >&6; }
16355     else
16356       # try to find jtreg on path
16357 
16358     for ac_prog in jtreg
16359 do
16360   # Extract the first word of "$ac_prog", so it can be a program name with args.
16361 set dummy $ac_prog; ac_word=$2
16362 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16363 $as_echo_n "checking for $ac_word... " >&6; }
16364 if ${ac_cv_path_JTREGEXE+:} false; then :
16365   $as_echo_n "(cached) " >&6
16366 else
16367   case $JTREGEXE in
16368   [\\/]* | ?:[\\/]*)
16369   ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
16370   ;;
16371   *)
16372   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16373 for as_dir in $PATH
16374 do
16375   IFS=$as_save_IFS
16376   test -z "$as_dir" && as_dir=.
16377     for ac_exec_ext in '' $ac_executable_extensions; do
16378   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
16379     ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
16380     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16381     break 2
16382   fi
16383 done
16384   done
16385 IFS=$as_save_IFS
16386 
16387   ;;
16388 esac
16389 fi
16390 JTREGEXE=$ac_cv_path_JTREGEXE
16391 if test -n "$JTREGEXE"; then
16392   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
16393 $as_echo "$JTREGEXE" >&6; }
16394 else
16395   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16396 $as_echo "no" >&6; }
16397 fi
16398 
16399 
16400   test -n "$JTREGEXE" && break
16401 done
16402 
16403 
16404     if test "x$JTREGEXE" = x; then
16405         if test "xjtreg" = x; then
16406           PROG_NAME=jtregexe
16407         else
16408           PROG_NAME=jtreg
16409         fi
16410         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
16411 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
16412         as_fn_error $? "Cannot continue" "$LINENO" 5
16413     fi
16414 
16415 
16416       JT_HOME="`$DIRNAME $JTREGEXE`"
16417     fi
16418   fi
16419 
16420 
16421 
16422 
16423 
16424 if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
16425 
16426   # Store path to cygwin link.exe to help excluding it when searching for
16427   # VS linker. This must be done before changing the PATH when looking for VS.
16428   # Extract the first word of "link", so it can be a program name with args.
16429 set dummy link; ac_word=$2
16430 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16431 $as_echo_n "checking for $ac_word... " >&6; }
16432 if ${ac_cv_path_CYGWIN_LINK+:} false; then :
16433   $as_echo_n "(cached) " >&6
16434 else
16435   case $CYGWIN_LINK in
16436   [\\/]* | ?:[\\/]*)
16437   ac_cv_path_CYGWIN_LINK="$CYGWIN_LINK" # Let the user override the test with a path.
16438   ;;
16439   *)
16440   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16441 for as_dir in $PATH
16442 do
16443   IFS=$as_save_IFS
16444   test -z "$as_dir" && as_dir=.
16445     for ac_exec_ext in '' $ac_executable_extensions; do
16446   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
16447     ac_cv_path_CYGWIN_LINK="$as_dir/$ac_word$ac_exec_ext"
16448     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16449     break 2
16450   fi
16451 done
16452   done
16453 IFS=$as_save_IFS
16454 
16455   ;;
16456 esac
16457 fi
16458 CYGWIN_LINK=$ac_cv_path_CYGWIN_LINK
16459 if test -n "$CYGWIN_LINK"; then
16460   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_LINK" >&5
16461 $as_echo "$CYGWIN_LINK" >&6; }
16462 else
16463   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16464 $as_echo "no" >&6; }
16465 fi
16466 
16467 
16468   if test "x$CYGWIN_LINK" != x; then
16469     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the first found link.exe is actually the Cygwin link tool" >&5
16470 $as_echo_n "checking if the first found link.exe is actually the Cygwin link tool... " >&6; }
16471     "$CYGWIN_LINK" --version > /dev/null
16472     if test $? -eq 0 ; then
16473       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16474 $as_echo "yes" >&6; }
16475     else
16476       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16477 $as_echo "no" >&6; }
16478       # This might be the VS linker. Don't exclude it later on.
16479       CYGWIN_LINK=""
16480     fi
16481   fi
16482 
16483   # First-hand choice is to locate and run the vsvars bat file.
16484 
16485   if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
16486     VCVARSFILE="vc/bin/vcvars32.bat"
16487   else
16488     VCVARSFILE="vc/bin/amd64/vcvars64.bat"
16489   fi
16490 
16491   VS_ENV_CMD=""
16492   VS_ENV_ARGS=""
16493   if test "x$with_toolsdir" != x; then
16494 
16495   if test "x$VS_ENV_CMD" = x; then
16496     VS100BASE="$with_toolsdir/../.."
16497     METHOD="--with-tools-dir"
16498 
16499   windows_path="$VS100BASE"
16500   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16501     unix_path=`$CYGPATH -u "$windows_path"`
16502     VS100BASE="$unix_path"
16503   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16504     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16505     VS100BASE="$unix_path"
16506   fi
16507 
16508     if test -d "$VS100BASE"; then
16509       if test -f "$VS100BASE/$VCVARSFILE"; then
16510         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16511 $as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16512         VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16513       else
16514         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16515 $as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16516         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16517 $as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16518       fi
16519     fi
16520   fi
16521 
16522   fi
16523 
16524   if test "x$with_toolsdir" != x && test "x$VS_ENV_CMD" = x; then
16525     # Having specified an argument which is incorrect will produce an instant failure;
16526     # we should not go on looking
16527     { $as_echo "$as_me:${as_lineno-$LINENO}: The path given by --with-tools-dir does not contain a valid Visual Studio installation" >&5
16528 $as_echo "$as_me: The path given by --with-tools-dir does not contain a valid Visual Studio installation" >&6;}
16529     { $as_echo "$as_me:${as_lineno-$LINENO}: Please point to the VC/bin directory within the Visual Studio installation" >&5
16530 $as_echo "$as_me: Please point to the VC/bin directory within the Visual Studio installation" >&6;}
16531     as_fn_error $? "Cannot locate a valid Visual Studio installation" "$LINENO" 5
16532   fi
16533 
16534   if test "x$ProgramW6432" != x; then
16535 
16536   if test "x$VS_ENV_CMD" = x; then
16537     WIN_SDK_BASE="$ProgramW6432/Microsoft SDKs/Windows/v7.1/Bin"
16538     METHOD="well-known name"
16539 
16540   windows_path="$WIN_SDK_BASE"
16541   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16542     unix_path=`$CYGPATH -u "$windows_path"`
16543     WIN_SDK_BASE="$unix_path"
16544   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16545     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16546     WIN_SDK_BASE="$unix_path"
16547   fi
16548 
16549     if test -d "$WIN_SDK_BASE"; then
16550       # There have been cases of partial or broken SDK installations. A missing
16551       # lib dir is not going to work.
16552       if test ! -d "$WIN_SDK_BASE/../lib"; then
16553         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16554 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16555         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
16556 $as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
16557       elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
16558         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16559 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16560         VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
16561         if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
16562           VS_ENV_ARGS="/x86"
16563         else
16564           VS_ENV_ARGS="/x64"
16565         fi
16566       else
16567         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16568 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16569         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
16570 $as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
16571       fi
16572     fi
16573   fi
16574 
16575   fi
16576   if test "x$PROGRAMW6432" != x; then
16577 
16578   if test "x$VS_ENV_CMD" = x; then
16579     WIN_SDK_BASE="$PROGRAMW6432/Microsoft SDKs/Windows/v7.1/Bin"
16580     METHOD="well-known name"
16581 
16582   windows_path="$WIN_SDK_BASE"
16583   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16584     unix_path=`$CYGPATH -u "$windows_path"`
16585     WIN_SDK_BASE="$unix_path"
16586   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16587     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16588     WIN_SDK_BASE="$unix_path"
16589   fi
16590 
16591     if test -d "$WIN_SDK_BASE"; then
16592       # There have been cases of partial or broken SDK installations. A missing
16593       # lib dir is not going to work.
16594       if test ! -d "$WIN_SDK_BASE/../lib"; then
16595         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16596 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16597         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
16598 $as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
16599       elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
16600         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16601 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16602         VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
16603         if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
16604           VS_ENV_ARGS="/x86"
16605         else
16606           VS_ENV_ARGS="/x64"
16607         fi
16608       else
16609         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16610 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16611         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
16612 $as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
16613       fi
16614     fi
16615   fi
16616 
16617   fi
16618   if test "x$PROGRAMFILES" != x; then
16619 
16620   if test "x$VS_ENV_CMD" = x; then
16621     WIN_SDK_BASE="$PROGRAMFILES/Microsoft SDKs/Windows/v7.1/Bin"
16622     METHOD="well-known name"
16623 
16624   windows_path="$WIN_SDK_BASE"
16625   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16626     unix_path=`$CYGPATH -u "$windows_path"`
16627     WIN_SDK_BASE="$unix_path"
16628   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16629     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16630     WIN_SDK_BASE="$unix_path"
16631   fi
16632 
16633     if test -d "$WIN_SDK_BASE"; then
16634       # There have been cases of partial or broken SDK installations. A missing
16635       # lib dir is not going to work.
16636       if test ! -d "$WIN_SDK_BASE/../lib"; then
16637         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16638 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16639         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
16640 $as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
16641       elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
16642         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16643 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16644         VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
16645         if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
16646           VS_ENV_ARGS="/x86"
16647         else
16648           VS_ENV_ARGS="/x64"
16649         fi
16650       else
16651         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16652 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16653         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
16654 $as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
16655       fi
16656     fi
16657   fi
16658 
16659   fi
16660 
16661   if test "x$VS_ENV_CMD" = x; then
16662     WIN_SDK_BASE="C:/Program Files/Microsoft SDKs/Windows/v7.1/Bin"
16663     METHOD="well-known name"
16664 
16665   windows_path="$WIN_SDK_BASE"
16666   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16667     unix_path=`$CYGPATH -u "$windows_path"`
16668     WIN_SDK_BASE="$unix_path"
16669   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16670     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16671     WIN_SDK_BASE="$unix_path"
16672   fi
16673 
16674     if test -d "$WIN_SDK_BASE"; then
16675       # There have been cases of partial or broken SDK installations. A missing
16676       # lib dir is not going to work.
16677       if test ! -d "$WIN_SDK_BASE/../lib"; then
16678         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16679 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16680         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
16681 $as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
16682       elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
16683         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16684 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16685         VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
16686         if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
16687           VS_ENV_ARGS="/x86"
16688         else
16689           VS_ENV_ARGS="/x64"
16690         fi
16691       else
16692         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16693 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16694         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
16695 $as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
16696       fi
16697     fi
16698   fi
16699 
16700 
16701   if test "x$VS_ENV_CMD" = x; then
16702     WIN_SDK_BASE="C:/Program Files (x86)/Microsoft SDKs/Windows/v7.1/Bin"
16703     METHOD="well-known name"
16704 
16705   windows_path="$WIN_SDK_BASE"
16706   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16707     unix_path=`$CYGPATH -u "$windows_path"`
16708     WIN_SDK_BASE="$unix_path"
16709   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16710     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16711     WIN_SDK_BASE="$unix_path"
16712   fi
16713 
16714     if test -d "$WIN_SDK_BASE"; then
16715       # There have been cases of partial or broken SDK installations. A missing
16716       # lib dir is not going to work.
16717       if test ! -d "$WIN_SDK_BASE/../lib"; then
16718         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16719 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16720         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
16721 $as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
16722       elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
16723         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16724 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16725         VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
16726         if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
16727           VS_ENV_ARGS="/x86"
16728         else
16729           VS_ENV_ARGS="/x64"
16730         fi
16731       else
16732         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16733 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16734         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
16735 $as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
16736       fi
16737     fi
16738   fi
16739 
16740 
16741   if test "x$VS100COMNTOOLS" != x; then
16742 
16743   if test "x$VS_ENV_CMD" = x; then
16744     VS100BASE="$VS100COMNTOOLS/../.."
16745     METHOD="VS100COMNTOOLS variable"
16746 
16747   windows_path="$VS100BASE"
16748   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16749     unix_path=`$CYGPATH -u "$windows_path"`
16750     VS100BASE="$unix_path"
16751   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16752     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16753     VS100BASE="$unix_path"
16754   fi
16755 
16756     if test -d "$VS100BASE"; then
16757       if test -f "$VS100BASE/$VCVARSFILE"; then
16758         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16759 $as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16760         VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16761       else
16762         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16763 $as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16764         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16765 $as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16766       fi
16767     fi
16768   fi
16769 
16770   fi
16771   if test "x$PROGRAMFILES" != x; then
16772 
16773   if test "x$VS_ENV_CMD" = x; then
16774     VS100BASE="$PROGRAMFILES/Microsoft Visual Studio 10.0"
16775     METHOD="well-known name"
16776 
16777   windows_path="$VS100BASE"
16778   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16779     unix_path=`$CYGPATH -u "$windows_path"`
16780     VS100BASE="$unix_path"
16781   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16782     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16783     VS100BASE="$unix_path"
16784   fi
16785 
16786     if test -d "$VS100BASE"; then
16787       if test -f "$VS100BASE/$VCVARSFILE"; then
16788         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16789 $as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16790         VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16791       else
16792         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16793 $as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16794         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16795 $as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16796       fi
16797     fi
16798   fi
16799 
16800   fi
16801 
16802   if test "x$VS_ENV_CMD" = x; then
16803     VS100BASE="C:/Program Files/Microsoft Visual Studio 10.0"
16804     METHOD="well-known name"
16805 
16806   windows_path="$VS100BASE"
16807   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16808     unix_path=`$CYGPATH -u "$windows_path"`
16809     VS100BASE="$unix_path"
16810   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16811     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16812     VS100BASE="$unix_path"
16813   fi
16814 
16815     if test -d "$VS100BASE"; then
16816       if test -f "$VS100BASE/$VCVARSFILE"; then
16817         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16818 $as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16819         VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16820       else
16821         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16822 $as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16823         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16824 $as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16825       fi
16826     fi
16827   fi
16828 
16829 
16830   if test "x$VS_ENV_CMD" = x; then
16831     VS100BASE="C:/Program Files (x86)/Microsoft Visual Studio 10.0"
16832     METHOD="well-known name"
16833 
16834   windows_path="$VS100BASE"
16835   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16836     unix_path=`$CYGPATH -u "$windows_path"`
16837     VS100BASE="$unix_path"
16838   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16839     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16840     VS100BASE="$unix_path"
16841   fi
16842 
16843     if test -d "$VS100BASE"; then
16844       if test -f "$VS100BASE/$VCVARSFILE"; then
16845         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16846 $as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16847         VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16848       else
16849         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16850 $as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16851         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16852 $as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16853       fi
16854     fi
16855   fi
16856 
16857 
16858   if test "x$VS_ENV_CMD" != x; then
16859     # We have found a Visual Studio environment on disk, let's extract variables from the vsvars bat file.
16860 
16861   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16862 
16863   # First separate the path from the arguments. This will split at the first
16864   # space.
16865   complete="$VS_ENV_CMD"
16866   path="${complete%% *}"
16867   tmp="$complete EOL"
16868   arguments="${tmp#* }"
16869 
16870   # Input might be given as Windows format, start by converting to
16871   # unix format.
16872   new_path=`$CYGPATH -u "$path"`
16873 
16874   # Now try to locate executable using which
16875   new_path=`$WHICH "$new_path" 2> /dev/null`
16876   # bat and cmd files are not always considered executable in cygwin causing which
16877   # to not find them
16878   if test "x$new_path" = x \
16879            && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16880            && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16881     new_path=`$CYGPATH -u "$path"`
16882   fi
16883   if test "x$new_path" = x; then
16884     # Oops. Which didn't find the executable.
16885     # The splitting of arguments from the executable at a space might have been incorrect,
16886     # since paths with space are more likely in Windows. Give it another try with the whole
16887     # argument.
16888     path="$complete"
16889     arguments="EOL"
16890     new_path=`$CYGPATH -u "$path"`
16891     new_path=`$WHICH "$new_path" 2> /dev/null`
16892     # bat and cmd files are not always considered executable in cygwin causing which
16893     # to not find them
16894     if test "x$new_path" = x \
16895              && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16896              && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16897       new_path=`$CYGPATH -u "$path"`
16898     fi
16899     if test "x$new_path" = x; then
16900       # It's still not found. Now this is an unrecoverable error.
16901       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
16902 $as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
16903       has_space=`$ECHO "$complete" | $GREP " "`
16904       if test "x$has_space" != x; then
16905         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16906 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16907       fi
16908       as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
16909     fi
16910   fi
16911 
16912   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16913   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16914   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16915   # "foo.exe" is OK but "foo" is an error.
16916   #
16917   # This test is therefore slightly more accurate than "test -f" to check for file precense.
16918   # It is also a way to make sure we got the proper file name for the real test later on.
16919   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16920   if test "x$test_shortpath" = x; then
16921     # Short path failed, file does not exist as specified.
16922     # Try adding .exe or .cmd
16923     if test -f "${new_path}.exe"; then
16924        input_to_shortpath="${new_path}.exe"
16925     elif test -f "${new_path}.cmd"; then
16926        input_to_shortpath="${new_path}.cmd"
16927     else
16928       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&5
16929 $as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&6;}
16930       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
16931 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
16932       as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
16933     fi
16934   else
16935     input_to_shortpath="$new_path"
16936   fi
16937 
16938   # Call helper function which possibly converts this using DOS-style short mode.
16939   # If so, the updated path is stored in $new_path.
16940   new_path="$input_to_shortpath"
16941 
16942   input_path="$input_to_shortpath"
16943   # Check if we need to convert this using DOS-style short mode. If the path
16944   # contains just simple characters, use it. Otherwise (spaces, weird characters),
16945   # take no chances and rewrite it.
16946   # Note: m4 eats our [], so we need to use [ and ] instead.
16947   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16948   if test "x$has_forbidden_chars" != x; then
16949     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16950     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16951     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16952     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16953       # Going to short mode and back again did indeed matter. Since short mode is
16954       # case insensitive, let's make it lowercase to improve readability.
16955       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16956       # Now convert it back to Unix-stile (cygpath)
16957       input_path=`$CYGPATH -u "$shortmode_path"`
16958       new_path="$input_path"
16959     fi
16960   fi
16961 
16962   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16963   if test "x$test_cygdrive_prefix" = x; then
16964     # As a simple fix, exclude /usr/bin since it's not a real path.
16965     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
16966       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16967       # a path prefixed by /cygdrive for fixpath to work.
16968       new_path="$CYGWIN_ROOT_PATH$input_path"
16969     fi
16970   fi
16971 
16972   # remove trailing .exe if any
16973   new_path="${new_path/%.exe/}"
16974 
16975   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16976 
16977   # First separate the path from the arguments. This will split at the first
16978   # space.
16979   complete="$VS_ENV_CMD"
16980   path="${complete%% *}"
16981   tmp="$complete EOL"
16982   arguments="${tmp#* }"
16983 
16984   # Input might be given as Windows format, start by converting to
16985   # unix format.
16986   new_path="$path"
16987 
16988   windows_path="$new_path"
16989   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16990     unix_path=`$CYGPATH -u "$windows_path"`
16991     new_path="$unix_path"
16992   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16993     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16994     new_path="$unix_path"
16995   fi
16996 
16997 
16998   # Now try to locate executable using which
16999   new_path=`$WHICH "$new_path" 2> /dev/null`
17000 
17001   if test "x$new_path" = x; then
17002     # Oops. Which didn't find the executable.
17003     # The splitting of arguments from the executable at a space might have been incorrect,
17004     # since paths with space are more likely in Windows. Give it another try with the whole
17005     # argument.
17006     path="$complete"
17007     arguments="EOL"
17008     new_path="$path"
17009 
17010   windows_path="$new_path"
17011   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17012     unix_path=`$CYGPATH -u "$windows_path"`
17013     new_path="$unix_path"
17014   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17015     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17016     new_path="$unix_path"
17017   fi
17018 
17019 
17020     new_path=`$WHICH "$new_path" 2> /dev/null`
17021 
17022     if test "x$new_path" = x; then
17023       # It's still not found. Now this is an unrecoverable error.
17024       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
17025 $as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
17026       has_space=`$ECHO "$complete" | $GREP " "`
17027       if test "x$has_space" != x; then
17028         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17029 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17030       fi
17031       as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
17032     fi
17033   fi
17034 
17035   # Now new_path has a complete unix path to the binary
17036   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
17037     # Keep paths in /bin as-is, but remove trailing .exe if any
17038     new_path="${new_path/%.exe/}"
17039     # Do not save /bin paths to all_fixpath_prefixes!
17040   else
17041     # Not in mixed or Windows style, start by that.
17042     new_path=`cmd //c echo $new_path`
17043 
17044   input_path="$new_path"
17045   # Check if we need to convert this using DOS-style short mode. If the path
17046   # contains just simple characters, use it. Otherwise (spaces, weird characters),
17047   # take no chances and rewrite it.
17048   # Note: m4 eats our [], so we need to use [ and ] instead.
17049   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17050   if test "x$has_forbidden_chars" != x; then
17051     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17052     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17053   fi
17054 
17055     # Output is in $new_path
17056 
17057   windows_path="$new_path"
17058   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17059     unix_path=`$CYGPATH -u "$windows_path"`
17060     new_path="$unix_path"
17061   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17062     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17063     new_path="$unix_path"
17064   fi
17065 
17066     # remove trailing .exe if any
17067     new_path="${new_path/%.exe/}"
17068 
17069     # Save the first 10 bytes of this path to the storage, so fixpath can work.
17070     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17071   fi
17072 
17073   else
17074     # We're on a posix platform. Hooray! :)
17075     # First separate the path from the arguments. This will split at the first
17076     # space.
17077     complete="$VS_ENV_CMD"
17078     path="${complete%% *}"
17079     tmp="$complete EOL"
17080     arguments="${tmp#* }"
17081 
17082     # Cannot rely on the command "which" here since it doesn't always work.
17083     is_absolute_path=`$ECHO "$path" | $GREP ^/`
17084     if test -z "$is_absolute_path"; then
17085       # Path to executable is not absolute. Find it.
17086       IFS_save="$IFS"
17087       IFS=:
17088       for p in $PATH; do
17089         if test -f "$p/$path" && test -x "$p/$path"; then
17090           new_path="$p/$path"
17091           break
17092         fi
17093       done
17094       IFS="$IFS_save"
17095     else
17096       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving VS_ENV_CMD (as $path) failed, using $path directly." >&5
17097 $as_echo "$as_me: Resolving VS_ENV_CMD (as $path) failed, using $path directly." >&6;}
17098       new_path="$path"
17099     fi
17100 
17101     if test "x$new_path" = x; then
17102         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
17103 $as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
17104         has_space=`$ECHO "$complete" | $GREP " "`
17105         if test "x$has_space" != x; then
17106           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
17107 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
17108         fi
17109         as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
17110       fi
17111   fi
17112 
17113       # Now join together the path and the arguments once again
17114       if test "x$arguments" != xEOL; then
17115         new_complete="$new_path ${arguments% *}"
17116       else
17117         new_complete="$new_path"
17118       fi
17119 
17120   if test "x$complete" != "x$new_complete"; then
17121       VS_ENV_CMD="$new_complete"
17122       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting VS_ENV_CMD to \"$new_complete\"" >&5
17123 $as_echo "$as_me: Rewriting VS_ENV_CMD to \"$new_complete\"" >&6;}
17124     fi
17125 
17126 
17127     # Lets extract the variables that are set by vcvarsall.bat/vsvars32.bat/vsvars64.bat
17128     { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to extract Visual Studio environment variables" >&5
17129 $as_echo "$as_me: Trying to extract Visual Studio environment variables" >&6;}
17130     cd $OUTPUT_ROOT
17131     # FIXME: The code betweeen ---- was inlined from a separate script and is not properly adapted
17132     # to autoconf standards.
17133 
17134     #----
17135 
17136     # Cannot use the VS10 setup script directly (since it only updates the DOS subshell environment)
17137     # but calculate the difference in Cygwin environment before/after running it and then
17138     # apply the diff.
17139 
17140     if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
17141       _vs10varsall=`cygpath -a -m -s "$VS_ENV_CMD"`
17142       _dosvs10varsall=`cygpath -a -w -s $_vs10varsall`
17143       _dosbash=`cygpath -a -w -s \`which bash\`.*`
17144     else
17145       _dosvs10varsall=`cmd //c echo $VS_ENV_CMD`
17146       _dosbash=`cmd //c echo \`which bash\``
17147     fi
17148 
17149     # generate the set of exported vars before/after the vs10 setup
17150     $ECHO "@echo off"                                           >  localdevenvtmp.bat
17151     $ECHO "$_dosbash -c \"export -p\" > localdevenvtmp.export0" >> localdevenvtmp.bat
17152     $ECHO "call $_dosvs10varsall $VS_ENV_ARGS"                  >> localdevenvtmp.bat
17153     $ECHO "$_dosbash -c \"export -p\" > localdevenvtmp.export1" >> localdevenvtmp.bat
17154 
17155     # Now execute the newly created bat file.
17156     # The | cat is to stop SetEnv.Cmd to mess with system colors on msys
17157     cmd /c localdevenvtmp.bat | cat
17158 
17159     # apply the diff (less some non-vs10 vars named by "!")
17160     $SORT localdevenvtmp.export0 | $GREP -v "!" > localdevenvtmp.export0.sort
17161     $SORT localdevenvtmp.export1 | $GREP -v "!" > localdevenvtmp.export1.sort
17162     $COMM -1 -3 localdevenvtmp.export0.sort localdevenvtmp.export1.sort > localdevenv.sh
17163 
17164     # cleanup
17165     $RM localdevenvtmp*
17166     #----
17167     cd $CURDIR
17168     if test ! -s $OUTPUT_ROOT/localdevenv.sh; then
17169       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17170 $as_echo "no" >&6; }
17171       { $as_echo "$as_me:${as_lineno-$LINENO}: Could not succesfully extract the envionment variables needed for the VS setup." >&5
17172 $as_echo "$as_me: Could not succesfully extract the envionment variables needed for the VS setup." >&6;}
17173       { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
17174 $as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
17175       { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
17176 $as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
17177       as_fn_error $? "Cannot continue" "$LINENO" 5
17178     fi
17179 
17180     # Now set all paths and other env variables. This will allow the rest of
17181     # the configure script to find and run the compiler in the proper way.
17182     { $as_echo "$as_me:${as_lineno-$LINENO}: Setting extracted environment variables" >&5
17183 $as_echo "$as_me: Setting extracted environment variables" >&6;}
17184     . $OUTPUT_ROOT/localdevenv.sh
17185   else
17186     # We did not find a vsvars bat file, let's hope we are run from a VS command prompt.
17187     { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio installation, checking current environment" >&5
17188 $as_echo "$as_me: Cannot locate a valid Visual Studio installation, checking current environment" >&6;}
17189   fi
17190 
17191   # At this point, we should have corrent variables in the environment, or we can't continue.
17192   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Visual Studio variables" >&5
17193 $as_echo_n "checking for Visual Studio variables... " >&6; }
17194 
17195   if test "x$VCINSTALLDIR" != x || test "x$WindowsSDKDir" != x || test "x$WINDOWSSDKDIR" != x; then
17196     if test "x$INCLUDE" = x || test "x$LIB" = x; then
17197       { $as_echo "$as_me:${as_lineno-$LINENO}: result: present but broken" >&5
17198 $as_echo "present but broken" >&6; }
17199       as_fn_error $? "Your VC command prompt seems broken, INCLUDE and/or LIB is missing." "$LINENO" 5
17200     else
17201       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
17202 $as_echo "ok" >&6; }
17203       # Remove any trailing \ from INCLUDE and LIB to avoid trouble in spec.gmk.
17204       VS_INCLUDE=`$ECHO "$INCLUDE" | $SED 's/\\\\$//'`
17205       VS_LIB=`$ECHO "$LIB" | $SED 's/\\\\$//'`
17206       VS_PATH="$PATH"
17207 
17208 
17209 
17210     fi
17211   else
17212     { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
17213 $as_echo "not found" >&6; }
17214 
17215     if test "x$VS_ENV_CMD" = x; then
17216       { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&5
17217 $as_echo "$as_me: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&6;}
17218       { $as_echo "$as_me:${as_lineno-$LINENO}: nor is this script run from a Visual Studio command prompt." >&5
17219 $as_echo "$as_me: nor is this script run from a Visual Studio command prompt." >&6;}
17220     else
17221       { $as_echo "$as_me:${as_lineno-$LINENO}: Running the extraction script failed." >&5
17222 $as_echo "$as_me: Running the extraction script failed." >&6;}
17223     fi
17224     { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
17225 $as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
17226     { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
17227 $as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
17228     as_fn_error $? "Cannot continue" "$LINENO" 5
17229   fi
17230 
17231   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
17232 $as_echo_n "checking for msvcr100.dll... " >&6; }
17233 
17234 # Check whether --with-msvcr-dll was given.
17235 if test "${with_msvcr_dll+set}" = set; then :
17236   withval=$with_msvcr_dll;
17237 fi
17238 
17239   if test "x$with_msvcr_dll" != x; then
17240     MSVCR_DLL="$with_msvcr_dll"
17241   else
17242     if test "x$VCINSTALLDIR" != x; then
17243       if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
17244         MSVCR_DLL=`find "$VCINSTALLDIR" -name msvcr100.dll | grep x64 | head --lines 1`
17245       else
17246         MSVCR_DLL=`find "$VCINSTALLDIR" -name msvcr100.dll | grep x86 | grep -v ia64 | grep -v x64 | head --lines 1`
17247         if test "x$MSVCR_DLL" = x; then
17248           MSVCR_DLL=`find "$VCINSTALLDIR" -name msvcr100.dll | head --lines 1`
17249         fi
17250       fi
17251       if test "x$MSVCR_DLL" != x; then
17252         { $as_echo "$as_me:${as_lineno-$LINENO}: msvcr100.dll found in VCINSTALLDIR: $VCINSTALLDIR" >&5
17253 $as_echo "$as_me: msvcr100.dll found in VCINSTALLDIR: $VCINSTALLDIR" >&6;}
17254       else
17255         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: msvcr100.dll not found in VCINSTALLDIR: $VCINSTALLDIR" >&5
17256 $as_echo "$as_me: Warning: msvcr100.dll not found in VCINSTALLDIR: $VCINSTALLDIR" >&6;}
17257       fi
17258     fi
17259     if test "x$MSVCR_DLL" = x; then
17260       if test -f "$SYSTEMROOT/system32/msvcr100.dll"; then
17261         { $as_echo "$as_me:${as_lineno-$LINENO}: msvcr100.dll found in $SYSTEMROOT/system32" >&5
17262 $as_echo "$as_me: msvcr100.dll found in $SYSTEMROOT/system32" >&6;}
17263         MSVCR_DLL="$SYSTEMROOT/system32/msvcr100.dll"
17264       fi
17265     fi
17266   fi
17267   if test "x$MSVCR_DLL" = x; then
17268     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17269 $as_echo "no" >&6; }
17270     as_fn_error $? "Could not find msvcr100.dll !" "$LINENO" 5
17271   fi
17272   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
17273 $as_echo "$MSVCR_DLL" >&6; }
17274 
17275   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17276 
17277   # Input might be given as Windows format, start by converting to
17278   # unix format.
17279   path="$MSVCR_DLL"
17280   new_path=`$CYGPATH -u "$path"`
17281 
17282   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17283   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17284   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17285   # "foo.exe" is OK but "foo" is an error.
17286   #
17287   # This test is therefore slightly more accurate than "test -f" to check for file precense.
17288   # It is also a way to make sure we got the proper file name for the real test later on.
17289   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17290   if test "x$test_shortpath" = x; then
17291     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&5
17292 $as_echo "$as_me: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&6;}
17293     as_fn_error $? "Cannot locate the the path of MSVCR_DLL" "$LINENO" 5
17294   fi
17295 
17296   # Call helper function which possibly converts this using DOS-style short mode.
17297   # If so, the updated path is stored in $new_path.
17298 
17299   input_path="$new_path"
17300   # Check if we need to convert this using DOS-style short mode. If the path
17301   # contains just simple characters, use it. Otherwise (spaces, weird characters),
17302   # take no chances and rewrite it.
17303   # Note: m4 eats our [], so we need to use [ and ] instead.
17304   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17305   if test "x$has_forbidden_chars" != x; then
17306     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17307     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17308     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17309     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17310       # Going to short mode and back again did indeed matter. Since short mode is
17311       # case insensitive, let's make it lowercase to improve readability.
17312       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17313       # Now convert it back to Unix-stile (cygpath)
17314       input_path=`$CYGPATH -u "$shortmode_path"`
17315       new_path="$input_path"
17316     fi
17317   fi
17318 
17319   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17320   if test "x$test_cygdrive_prefix" = x; then
17321     # As a simple fix, exclude /usr/bin since it's not a real path.
17322     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
17323       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17324       # a path prefixed by /cygdrive for fixpath to work.
17325       new_path="$CYGWIN_ROOT_PATH$input_path"
17326     fi
17327   fi
17328 
17329 
17330   if test "x$path" != "x$new_path"; then
17331     MSVCR_DLL="$new_path"
17332     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVCR_DLL to \"$new_path\"" >&5
17333 $as_echo "$as_me: Rewriting MSVCR_DLL to \"$new_path\"" >&6;}
17334   fi
17335 
17336   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17337 
17338   path="$MSVCR_DLL"
17339   has_colon=`$ECHO $path | $GREP ^.:`
17340   new_path="$path"
17341   if test "x$has_colon" = x; then
17342     # Not in mixed or Windows style, start by that.
17343     new_path=`cmd //c echo $path`
17344   fi
17345 
17346 
17347   input_path="$new_path"
17348   # Check if we need to convert this using DOS-style short mode. If the path
17349   # contains just simple characters, use it. Otherwise (spaces, weird characters),
17350   # take no chances and rewrite it.
17351   # Note: m4 eats our [], so we need to use [ and ] instead.
17352   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17353   if test "x$has_forbidden_chars" != x; then
17354     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17355     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17356   fi
17357 
17358 
17359   windows_path="$new_path"
17360   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17361     unix_path=`$CYGPATH -u "$windows_path"`
17362     new_path="$unix_path"
17363   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17364     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17365     new_path="$unix_path"
17366   fi
17367 
17368   if test "x$path" != "x$new_path"; then
17369     MSVCR_DLL="$new_path"
17370     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVCR_DLL to \"$new_path\"" >&5
17371 $as_echo "$as_me: Rewriting MSVCR_DLL to \"$new_path\"" >&6;}
17372   fi
17373 
17374   # Save the first 10 bytes of this path to the storage, so fixpath can work.
17375   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17376 
17377   else
17378     # We're on a posix platform. Hooray! :)
17379     path="$MSVCR_DLL"
17380     has_space=`$ECHO "$path" | $GREP " "`
17381     if test "x$has_space" != x; then
17382       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&5
17383 $as_echo "$as_me: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&6;}
17384       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
17385     fi
17386 
17387     # Use eval to expand a potential ~
17388     eval path="$path"
17389     if test ! -f "$path" && test ! -d "$path"; then
17390       as_fn_error $? "The path of MSVCR_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
17391     fi
17392 
17393     MSVCR_DLL="`cd "$path"; $THEPWDCMD -L`"
17394   fi
17395 
17396 
17397 
17398 
17399 # Check whether --with-dxsdk was given.
17400 if test "${with_dxsdk+set}" = set; then :
17401   withval=$with_dxsdk;
17402 fi
17403 
17404 
17405 # Check whether --with-dxsdk-lib was given.
17406 if test "${with_dxsdk_lib+set}" = set; then :
17407   withval=$with_dxsdk_lib;
17408 fi
17409 
17410 
17411 # Check whether --with-dxsdk-include was given.
17412 if test "${with_dxsdk_include+set}" = set; then :
17413   withval=$with_dxsdk_include;
17414 fi
17415 
17416 
17417   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DirectX SDK" >&5
17418 $as_echo_n "checking for DirectX SDK... " >&6; }
17419 
17420   if test "x$with_dxsdk" != x; then
17421     dxsdk_path="$with_dxsdk"
17422   elif test "x$DXSDK_DIR" != x; then
17423     dxsdk_path="$DXSDK_DIR"
17424   elif test -d "C:/DXSDK"; then
17425     dxsdk_path="C:/DXSDK"
17426   else
17427     as_fn_error $? "Could not find the DirectX SDK" "$LINENO" 5
17428   fi
17429   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $dxsdk_path" >&5
17430 $as_echo "$dxsdk_path" >&6; }
17431 
17432   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17433 
17434   # Input might be given as Windows format, start by converting to
17435   # unix format.
17436   path="$dxsdk_path"
17437   new_path=`$CYGPATH -u "$path"`
17438 
17439   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17440   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17441   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17442   # "foo.exe" is OK but "foo" is an error.
17443   #
17444   # This test is therefore slightly more accurate than "test -f" to check for file precense.
17445   # It is also a way to make sure we got the proper file name for the real test later on.
17446   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17447   if test "x$test_shortpath" = x; then
17448     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of dxsdk_path, which resolves as \"$path\", is invalid." >&5
17449 $as_echo "$as_me: The path of dxsdk_path, which resolves as \"$path\", is invalid." >&6;}
17450     as_fn_error $? "Cannot locate the the path of dxsdk_path" "$LINENO" 5
17451   fi
17452 
17453   # Call helper function which possibly converts this using DOS-style short mode.
17454   # If so, the updated path is stored in $new_path.
17455 
17456   input_path="$new_path"
17457   # Check if we need to convert this using DOS-style short mode. If the path
17458   # contains just simple characters, use it. Otherwise (spaces, weird characters),
17459   # take no chances and rewrite it.
17460   # Note: m4 eats our [], so we need to use [ and ] instead.
17461   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17462   if test "x$has_forbidden_chars" != x; then
17463     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17464     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17465     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17466     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17467       # Going to short mode and back again did indeed matter. Since short mode is
17468       # case insensitive, let's make it lowercase to improve readability.
17469       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17470       # Now convert it back to Unix-stile (cygpath)
17471       input_path=`$CYGPATH -u "$shortmode_path"`
17472       new_path="$input_path"
17473     fi
17474   fi
17475 
17476   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17477   if test "x$test_cygdrive_prefix" = x; then
17478     # As a simple fix, exclude /usr/bin since it's not a real path.
17479     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
17480       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17481       # a path prefixed by /cygdrive for fixpath to work.
17482       new_path="$CYGWIN_ROOT_PATH$input_path"
17483     fi
17484   fi
17485 
17486 
17487   if test "x$path" != "x$new_path"; then
17488     dxsdk_path="$new_path"
17489     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting dxsdk_path to \"$new_path\"" >&5
17490 $as_echo "$as_me: Rewriting dxsdk_path to \"$new_path\"" >&6;}
17491   fi
17492 
17493   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17494 
17495   path="$dxsdk_path"
17496   has_colon=`$ECHO $path | $GREP ^.:`
17497   new_path="$path"
17498   if test "x$has_colon" = x; then
17499     # Not in mixed or Windows style, start by that.
17500     new_path=`cmd //c echo $path`
17501   fi
17502 
17503 
17504   input_path="$new_path"
17505   # Check if we need to convert this using DOS-style short mode. If the path
17506   # contains just simple characters, use it. Otherwise (spaces, weird characters),
17507   # take no chances and rewrite it.
17508   # Note: m4 eats our [], so we need to use [ and ] instead.
17509   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17510   if test "x$has_forbidden_chars" != x; then
17511     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17512     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17513   fi
17514 
17515 
17516   windows_path="$new_path"
17517   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17518     unix_path=`$CYGPATH -u "$windows_path"`
17519     new_path="$unix_path"
17520   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17521     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17522     new_path="$unix_path"
17523   fi
17524 
17525   if test "x$path" != "x$new_path"; then
17526     dxsdk_path="$new_path"
17527     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting dxsdk_path to \"$new_path\"" >&5
17528 $as_echo "$as_me: Rewriting dxsdk_path to \"$new_path\"" >&6;}
17529   fi
17530 
17531   # Save the first 10 bytes of this path to the storage, so fixpath can work.
17532   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17533 
17534   else
17535     # We're on a posix platform. Hooray! :)
17536     path="$dxsdk_path"
17537     has_space=`$ECHO "$path" | $GREP " "`
17538     if test "x$has_space" != x; then
17539       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of dxsdk_path, which resolves as \"$path\", is invalid." >&5
17540 $as_echo "$as_me: The path of dxsdk_path, which resolves as \"$path\", is invalid." >&6;}
17541       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
17542     fi
17543 
17544     # Use eval to expand a potential ~
17545     eval path="$path"
17546     if test ! -f "$path" && test ! -d "$path"; then
17547       as_fn_error $? "The path of dxsdk_path, which resolves as \"$path\", is not found." "$LINENO" 5
17548     fi
17549 
17550     dxsdk_path="`cd "$path"; $THEPWDCMD -L`"
17551   fi
17552 
17553 
17554   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DirectX SDK lib dir" >&5
17555 $as_echo_n "checking for DirectX SDK lib dir... " >&6; }
17556   if test "x$with_dxsdk_lib" != x; then
17557     DXSDK_LIB_PATH="$with_dxsdk_lib"
17558   elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
17559     DXSDK_LIB_PATH="$dxsdk_path/Lib/x64"
17560   else
17561     DXSDK_LIB_PATH="$dxsdk_path/Lib"
17562   fi
17563   # dsound.lib is linked to in jsoundds
17564   if test ! -f "$DXSDK_LIB_PATH/dsound.lib"; then
17565     as_fn_error $? "Invalid DirectX SDK lib dir" "$LINENO" 5
17566   fi
17567   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DXSDK_LIB_PATH" >&5
17568 $as_echo "$DXSDK_LIB_PATH" >&6; }
17569 
17570   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17571 
17572   # Input might be given as Windows format, start by converting to
17573   # unix format.
17574   path="$DXSDK_LIB_PATH"
17575   new_path=`$CYGPATH -u "$path"`
17576 
17577   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17578   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17579   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17580   # "foo.exe" is OK but "foo" is an error.
17581   #
17582   # This test is therefore slightly more accurate than "test -f" to check for file precense.
17583   # It is also a way to make sure we got the proper file name for the real test later on.
17584   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17585   if test "x$test_shortpath" = x; then
17586     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DXSDK_LIB_PATH, which resolves as \"$path\", is invalid." >&5
17587 $as_echo "$as_me: The path of DXSDK_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
17588     as_fn_error $? "Cannot locate the the path of DXSDK_LIB_PATH" "$LINENO" 5
17589   fi
17590 
17591   # Call helper function which possibly converts this using DOS-style short mode.
17592   # If so, the updated path is stored in $new_path.
17593 
17594   input_path="$new_path"
17595   # Check if we need to convert this using DOS-style short mode. If the path
17596   # contains just simple characters, use it. Otherwise (spaces, weird characters),
17597   # take no chances and rewrite it.
17598   # Note: m4 eats our [], so we need to use [ and ] instead.
17599   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17600   if test "x$has_forbidden_chars" != x; then
17601     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17602     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17603     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17604     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17605       # Going to short mode and back again did indeed matter. Since short mode is
17606       # case insensitive, let's make it lowercase to improve readability.
17607       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17608       # Now convert it back to Unix-stile (cygpath)
17609       input_path=`$CYGPATH -u "$shortmode_path"`
17610       new_path="$input_path"
17611     fi
17612   fi
17613 
17614   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17615   if test "x$test_cygdrive_prefix" = x; then
17616     # As a simple fix, exclude /usr/bin since it's not a real path.
17617     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
17618       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17619       # a path prefixed by /cygdrive for fixpath to work.
17620       new_path="$CYGWIN_ROOT_PATH$input_path"
17621     fi
17622   fi
17623 
17624 
17625   if test "x$path" != "x$new_path"; then
17626     DXSDK_LIB_PATH="$new_path"
17627     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DXSDK_LIB_PATH to \"$new_path\"" >&5
17628 $as_echo "$as_me: Rewriting DXSDK_LIB_PATH to \"$new_path\"" >&6;}
17629   fi
17630 
17631   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17632 
17633   path="$DXSDK_LIB_PATH"
17634   has_colon=`$ECHO $path | $GREP ^.:`
17635   new_path="$path"
17636   if test "x$has_colon" = x; then
17637     # Not in mixed or Windows style, start by that.
17638     new_path=`cmd //c echo $path`
17639   fi
17640 
17641 
17642   input_path="$new_path"
17643   # Check if we need to convert this using DOS-style short mode. If the path
17644   # contains just simple characters, use it. Otherwise (spaces, weird characters),
17645   # take no chances and rewrite it.
17646   # Note: m4 eats our [], so we need to use [ and ] instead.
17647   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17648   if test "x$has_forbidden_chars" != x; then
17649     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17650     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17651   fi
17652 
17653 
17654   windows_path="$new_path"
17655   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17656     unix_path=`$CYGPATH -u "$windows_path"`
17657     new_path="$unix_path"
17658   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17659     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17660     new_path="$unix_path"
17661   fi
17662 
17663   if test "x$path" != "x$new_path"; then
17664     DXSDK_LIB_PATH="$new_path"
17665     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DXSDK_LIB_PATH to \"$new_path\"" >&5
17666 $as_echo "$as_me: Rewriting DXSDK_LIB_PATH to \"$new_path\"" >&6;}
17667   fi
17668 
17669   # Save the first 10 bytes of this path to the storage, so fixpath can work.
17670   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17671 
17672   else
17673     # We're on a posix platform. Hooray! :)
17674     path="$DXSDK_LIB_PATH"
17675     has_space=`$ECHO "$path" | $GREP " "`
17676     if test "x$has_space" != x; then
17677       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DXSDK_LIB_PATH, which resolves as \"$path\", is invalid." >&5
17678 $as_echo "$as_me: The path of DXSDK_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
17679       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
17680     fi
17681 
17682     # Use eval to expand a potential ~
17683     eval path="$path"
17684     if test ! -f "$path" && test ! -d "$path"; then
17685       as_fn_error $? "The path of DXSDK_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
17686     fi
17687 
17688     DXSDK_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
17689   fi
17690 
17691 
17692   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DirectX SDK include dir" >&5
17693 $as_echo_n "checking for DirectX SDK include dir... " >&6; }
17694   if test "x$with_dxsdk_include" != x; then
17695     DXSDK_INCLUDE_PATH="$with_dxsdk_include"
17696   else
17697     DXSDK_INCLUDE_PATH="$dxsdk_path/Include"
17698   fi
17699   # dsound.h is included in jsoundds
17700   if test ! -f "$DXSDK_INCLUDE_PATH/dsound.h"; then
17701     as_fn_error $? "Invalid DirectX SDK lib dir" "$LINENO" 5
17702   fi
17703   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DXSDK_INCLUDE_PATH" >&5
17704 $as_echo "$DXSDK_INCLUDE_PATH" >&6; }
17705 
17706   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17707 
17708   # Input might be given as Windows format, start by converting to
17709   # unix format.
17710   path="$DXSDK_INCLUDE_PATH"
17711   new_path=`$CYGPATH -u "$path"`
17712 
17713   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17714   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17715   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17716   # "foo.exe" is OK but "foo" is an error.
17717   #
17718   # This test is therefore slightly more accurate than "test -f" to check for file precense.
17719   # It is also a way to make sure we got the proper file name for the real test later on.
17720   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17721   if test "x$test_shortpath" = x; then
17722     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DXSDK_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
17723 $as_echo "$as_me: The path of DXSDK_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
17724     as_fn_error $? "Cannot locate the the path of DXSDK_INCLUDE_PATH" "$LINENO" 5
17725   fi
17726 
17727   # Call helper function which possibly converts this using DOS-style short mode.
17728   # If so, the updated path is stored in $new_path.
17729 
17730   input_path="$new_path"
17731   # Check if we need to convert this using DOS-style short mode. If the path
17732   # contains just simple characters, use it. Otherwise (spaces, weird characters),
17733   # take no chances and rewrite it.
17734   # Note: m4 eats our [], so we need to use [ and ] instead.
17735   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17736   if test "x$has_forbidden_chars" != x; then
17737     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17738     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17739     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17740     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17741       # Going to short mode and back again did indeed matter. Since short mode is
17742       # case insensitive, let's make it lowercase to improve readability.
17743       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17744       # Now convert it back to Unix-stile (cygpath)
17745       input_path=`$CYGPATH -u "$shortmode_path"`
17746       new_path="$input_path"
17747     fi
17748   fi
17749 
17750   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17751   if test "x$test_cygdrive_prefix" = x; then
17752     # As a simple fix, exclude /usr/bin since it's not a real path.
17753     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
17754       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17755       # a path prefixed by /cygdrive for fixpath to work.
17756       new_path="$CYGWIN_ROOT_PATH$input_path"
17757     fi
17758   fi
17759 
17760 
17761   if test "x$path" != "x$new_path"; then
17762     DXSDK_INCLUDE_PATH="$new_path"
17763     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DXSDK_INCLUDE_PATH to \"$new_path\"" >&5
17764 $as_echo "$as_me: Rewriting DXSDK_INCLUDE_PATH to \"$new_path\"" >&6;}
17765   fi
17766 
17767   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17768 
17769   path="$DXSDK_INCLUDE_PATH"
17770   has_colon=`$ECHO $path | $GREP ^.:`
17771   new_path="$path"
17772   if test "x$has_colon" = x; then
17773     # Not in mixed or Windows style, start by that.
17774     new_path=`cmd //c echo $path`
17775   fi
17776 
17777 
17778   input_path="$new_path"
17779   # Check if we need to convert this using DOS-style short mode. If the path
17780   # contains just simple characters, use it. Otherwise (spaces, weird characters),
17781   # take no chances and rewrite it.
17782   # Note: m4 eats our [], so we need to use [ and ] instead.
17783   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17784   if test "x$has_forbidden_chars" != x; then
17785     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17786     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17787   fi
17788 
17789 
17790   windows_path="$new_path"
17791   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17792     unix_path=`$CYGPATH -u "$windows_path"`
17793     new_path="$unix_path"
17794   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17795     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17796     new_path="$unix_path"
17797   fi
17798 
17799   if test "x$path" != "x$new_path"; then
17800     DXSDK_INCLUDE_PATH="$new_path"
17801     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DXSDK_INCLUDE_PATH to \"$new_path\"" >&5
17802 $as_echo "$as_me: Rewriting DXSDK_INCLUDE_PATH to \"$new_path\"" >&6;}
17803   fi
17804 
17805   # Save the first 10 bytes of this path to the storage, so fixpath can work.
17806   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17807 
17808   else
17809     # We're on a posix platform. Hooray! :)
17810     path="$DXSDK_INCLUDE_PATH"
17811     has_space=`$ECHO "$path" | $GREP " "`
17812     if test "x$has_space" != x; then
17813       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DXSDK_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
17814 $as_echo "$as_me: The path of DXSDK_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
17815       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
17816     fi
17817 
17818     # Use eval to expand a potential ~
17819     eval path="$path"
17820     if test ! -f "$path" && test ! -d "$path"; then
17821       as_fn_error $? "The path of DXSDK_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
17822     fi
17823 
17824     DXSDK_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
17825   fi
17826 
17827 
17828 
17829 
17830   LDFLAGS_JDK="$LDFLAGS_JDK -libpath:$DXSDK_LIB_PATH"
17831 
17832 fi
17833 
17834 
17835 
17836 # If --build AND --host is set, then the configure script will find any
17837 # cross compilation tools in the PATH. Cross compilation tools
17838 # follows the cross compilation standard where they are prefixed with ${host}.
17839 # For example the binary i686-sun-solaris2.10-gcc
17840 # will cross compile for i686-sun-solaris2.10
17841 # If neither of build and host is not set, then build=host and the
17842 # default compiler found in the path will be used.
17843 # Setting only --host, does not seem to be really supported.
17844 # Please set both --build and --host if you want to cross compile.
17845 
17846 if test "x$COMPILE_TYPE" = "xcross"; then
17847     # Now we to find a C/C++ compiler that can build executables for the build
17848     # platform. We can't use the AC_PROG_CC macro, since it can only be used
17849     # once. Also, we need to do this before adding a tools dir to the path,
17850     # otherwise we might pick up cross-compilers which don't use standard naming.
17851     # Otherwise, we'll set the BUILD_tools to the native tools, but that'll have
17852     # to wait until they are properly discovered.
17853     for ac_prog in cl cc gcc
17854 do
17855   # Extract the first word of "$ac_prog", so it can be a program name with args.
17856 set dummy $ac_prog; ac_word=$2
17857 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17858 $as_echo_n "checking for $ac_word... " >&6; }
17859 if ${ac_cv_path_BUILD_CC+:} false; then :
17860   $as_echo_n "(cached) " >&6
17861 else
17862   case $BUILD_CC in
17863   [\\/]* | ?:[\\/]*)
17864   ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
17865   ;;
17866   *)
17867   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17868 for as_dir in $PATH
17869 do
17870   IFS=$as_save_IFS
17871   test -z "$as_dir" && as_dir=.
17872     for ac_exec_ext in '' $ac_executable_extensions; do
17873   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
17874     ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
17875     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17876     break 2
17877   fi
17878 done
17879   done
17880 IFS=$as_save_IFS
17881 
17882   ;;
17883 esac
17884 fi
17885 BUILD_CC=$ac_cv_path_BUILD_CC
17886 if test -n "$BUILD_CC"; then
17887   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
17888 $as_echo "$BUILD_CC" >&6; }
17889 else
17890   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17891 $as_echo "no" >&6; }
17892 fi
17893 
17894 
17895   test -n "$BUILD_CC" && break
17896 done
17897 
17898 
17899   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17900 
17901   # First separate the path from the arguments. This will split at the first
17902   # space.
17903   complete="$BUILD_CC"
17904   path="${complete%% *}"
17905   tmp="$complete EOL"
17906   arguments="${tmp#* }"
17907 
17908   # Input might be given as Windows format, start by converting to
17909   # unix format.
17910   new_path=`$CYGPATH -u "$path"`
17911 
17912   # Now try to locate executable using which
17913   new_path=`$WHICH "$new_path" 2> /dev/null`
17914   # bat and cmd files are not always considered executable in cygwin causing which
17915   # to not find them
17916   if test "x$new_path" = x \
17917            && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17918            && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17919     new_path=`$CYGPATH -u "$path"`
17920   fi
17921   if test "x$new_path" = x; then
17922     # Oops. Which didn't find the executable.
17923     # The splitting of arguments from the executable at a space might have been incorrect,
17924     # since paths with space are more likely in Windows. Give it another try with the whole
17925     # argument.
17926     path="$complete"
17927     arguments="EOL"
17928     new_path=`$CYGPATH -u "$path"`
17929     new_path=`$WHICH "$new_path" 2> /dev/null`
17930     # bat and cmd files are not always considered executable in cygwin causing which
17931     # to not find them
17932     if test "x$new_path" = x \
17933              && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17934              && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17935       new_path=`$CYGPATH -u "$path"`
17936     fi
17937     if test "x$new_path" = x; then
17938       # It's still not found. Now this is an unrecoverable error.
17939       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
17940 $as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
17941       has_space=`$ECHO "$complete" | $GREP " "`
17942       if test "x$has_space" != x; then
17943         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17944 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17945       fi
17946       as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
17947     fi
17948   fi
17949 
17950   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17951   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17952   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17953   # "foo.exe" is OK but "foo" is an error.
17954   #
17955   # This test is therefore slightly more accurate than "test -f" to check for file precense.
17956   # It is also a way to make sure we got the proper file name for the real test later on.
17957   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17958   if test "x$test_shortpath" = x; then
17959     # Short path failed, file does not exist as specified.
17960     # Try adding .exe or .cmd
17961     if test -f "${new_path}.exe"; then
17962        input_to_shortpath="${new_path}.exe"
17963     elif test -f "${new_path}.cmd"; then
17964        input_to_shortpath="${new_path}.cmd"
17965     else
17966       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&5
17967 $as_echo "$as_me: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&6;}
17968       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
17969 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
17970       as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
17971     fi
17972   else
17973     input_to_shortpath="$new_path"
17974   fi
17975 
17976   # Call helper function which possibly converts this using DOS-style short mode.
17977   # If so, the updated path is stored in $new_path.
17978   new_path="$input_to_shortpath"
17979 
17980   input_path="$input_to_shortpath"
17981   # Check if we need to convert this using DOS-style short mode. If the path
17982   # contains just simple characters, use it. Otherwise (spaces, weird characters),
17983   # take no chances and rewrite it.
17984   # Note: m4 eats our [], so we need to use [ and ] instead.
17985   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17986   if test "x$has_forbidden_chars" != x; then
17987     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17988     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17989     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17990     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17991       # Going to short mode and back again did indeed matter. Since short mode is
17992       # case insensitive, let's make it lowercase to improve readability.
17993       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17994       # Now convert it back to Unix-stile (cygpath)
17995       input_path=`$CYGPATH -u "$shortmode_path"`
17996       new_path="$input_path"
17997     fi
17998   fi
17999 
18000   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18001   if test "x$test_cygdrive_prefix" = x; then
18002     # As a simple fix, exclude /usr/bin since it's not a real path.
18003     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18004       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18005       # a path prefixed by /cygdrive for fixpath to work.
18006       new_path="$CYGWIN_ROOT_PATH$input_path"
18007     fi
18008   fi
18009 
18010   # remove trailing .exe if any
18011   new_path="${new_path/%.exe/}"
18012 
18013   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18014 
18015   # First separate the path from the arguments. This will split at the first
18016   # space.
18017   complete="$BUILD_CC"
18018   path="${complete%% *}"
18019   tmp="$complete EOL"
18020   arguments="${tmp#* }"
18021 
18022   # Input might be given as Windows format, start by converting to
18023   # unix format.
18024   new_path="$path"
18025 
18026   windows_path="$new_path"
18027   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18028     unix_path=`$CYGPATH -u "$windows_path"`
18029     new_path="$unix_path"
18030   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18031     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18032     new_path="$unix_path"
18033   fi
18034 
18035 
18036   # Now try to locate executable using which
18037   new_path=`$WHICH "$new_path" 2> /dev/null`
18038 
18039   if test "x$new_path" = x; then
18040     # Oops. Which didn't find the executable.
18041     # The splitting of arguments from the executable at a space might have been incorrect,
18042     # since paths with space are more likely in Windows. Give it another try with the whole
18043     # argument.
18044     path="$complete"
18045     arguments="EOL"
18046     new_path="$path"
18047 
18048   windows_path="$new_path"
18049   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18050     unix_path=`$CYGPATH -u "$windows_path"`
18051     new_path="$unix_path"
18052   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18053     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18054     new_path="$unix_path"
18055   fi
18056 
18057 
18058     new_path=`$WHICH "$new_path" 2> /dev/null`
18059 
18060     if test "x$new_path" = x; then
18061       # It's still not found. Now this is an unrecoverable error.
18062       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
18063 $as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
18064       has_space=`$ECHO "$complete" | $GREP " "`
18065       if test "x$has_space" != x; then
18066         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18067 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18068       fi
18069       as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
18070     fi
18071   fi
18072 
18073   # Now new_path has a complete unix path to the binary
18074   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18075     # Keep paths in /bin as-is, but remove trailing .exe if any
18076     new_path="${new_path/%.exe/}"
18077     # Do not save /bin paths to all_fixpath_prefixes!
18078   else
18079     # Not in mixed or Windows style, start by that.
18080     new_path=`cmd //c echo $new_path`
18081 
18082   input_path="$new_path"
18083   # Check if we need to convert this using DOS-style short mode. If the path
18084   # contains just simple characters, use it. Otherwise (spaces, weird characters),
18085   # take no chances and rewrite it.
18086   # Note: m4 eats our [], so we need to use [ and ] instead.
18087   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18088   if test "x$has_forbidden_chars" != x; then
18089     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18090     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18091   fi
18092 
18093     # Output is in $new_path
18094 
18095   windows_path="$new_path"
18096   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18097     unix_path=`$CYGPATH -u "$windows_path"`
18098     new_path="$unix_path"
18099   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18100     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18101     new_path="$unix_path"
18102   fi
18103 
18104     # remove trailing .exe if any
18105     new_path="${new_path/%.exe/}"
18106 
18107     # Save the first 10 bytes of this path to the storage, so fixpath can work.
18108     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18109   fi
18110 
18111   else
18112     # We're on a posix platform. Hooray! :)
18113     # First separate the path from the arguments. This will split at the first
18114     # space.
18115     complete="$BUILD_CC"
18116     path="${complete%% *}"
18117     tmp="$complete EOL"
18118     arguments="${tmp#* }"
18119 
18120     # Cannot rely on the command "which" here since it doesn't always work.
18121     is_absolute_path=`$ECHO "$path" | $GREP ^/`
18122     if test -z "$is_absolute_path"; then
18123       # Path to executable is not absolute. Find it.
18124       IFS_save="$IFS"
18125       IFS=:
18126       for p in $PATH; do
18127         if test -f "$p/$path" && test -x "$p/$path"; then
18128           new_path="$p/$path"
18129           break
18130         fi
18131       done
18132       IFS="$IFS_save"
18133     else
18134       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving BUILD_CC (as $path) failed, using $path directly." >&5
18135 $as_echo "$as_me: Resolving BUILD_CC (as $path) failed, using $path directly." >&6;}
18136       new_path="$path"
18137     fi
18138 
18139     if test "x$new_path" = x; then
18140         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
18141 $as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
18142         has_space=`$ECHO "$complete" | $GREP " "`
18143         if test "x$has_space" != x; then
18144           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18145 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18146         fi
18147         as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
18148       fi
18149   fi
18150 
18151       # Now join together the path and the arguments once again
18152       if test "x$arguments" != xEOL; then
18153         new_complete="$new_path ${arguments% *}"
18154       else
18155         new_complete="$new_path"
18156       fi
18157 
18158   if test "x$complete" != "x$new_complete"; then
18159       BUILD_CC="$new_complete"
18160       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CC to \"$new_complete\"" >&5
18161 $as_echo "$as_me: Rewriting BUILD_CC to \"$new_complete\"" >&6;}
18162     fi
18163 
18164     for ac_prog in cl CC g++
18165 do
18166   # Extract the first word of "$ac_prog", so it can be a program name with args.
18167 set dummy $ac_prog; ac_word=$2
18168 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18169 $as_echo_n "checking for $ac_word... " >&6; }
18170 if ${ac_cv_path_BUILD_CXX+:} false; then :
18171   $as_echo_n "(cached) " >&6
18172 else
18173   case $BUILD_CXX in
18174   [\\/]* | ?:[\\/]*)
18175   ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
18176   ;;
18177   *)
18178   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18179 for as_dir in $PATH
18180 do
18181   IFS=$as_save_IFS
18182   test -z "$as_dir" && as_dir=.
18183     for ac_exec_ext in '' $ac_executable_extensions; do
18184   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
18185     ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
18186     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18187     break 2
18188   fi
18189 done
18190   done
18191 IFS=$as_save_IFS
18192 
18193   ;;
18194 esac
18195 fi
18196 BUILD_CXX=$ac_cv_path_BUILD_CXX
18197 if test -n "$BUILD_CXX"; then
18198   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
18199 $as_echo "$BUILD_CXX" >&6; }
18200 else
18201   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18202 $as_echo "no" >&6; }
18203 fi
18204 
18205 
18206   test -n "$BUILD_CXX" && break
18207 done
18208 
18209 
18210   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18211 
18212   # First separate the path from the arguments. This will split at the first
18213   # space.
18214   complete="$BUILD_CXX"
18215   path="${complete%% *}"
18216   tmp="$complete EOL"
18217   arguments="${tmp#* }"
18218 
18219   # Input might be given as Windows format, start by converting to
18220   # unix format.
18221   new_path=`$CYGPATH -u "$path"`
18222 
18223   # Now try to locate executable using which
18224   new_path=`$WHICH "$new_path" 2> /dev/null`
18225   # bat and cmd files are not always considered executable in cygwin causing which
18226   # to not find them
18227   if test "x$new_path" = x \
18228            && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18229            && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18230     new_path=`$CYGPATH -u "$path"`
18231   fi
18232   if test "x$new_path" = x; then
18233     # Oops. Which didn't find the executable.
18234     # The splitting of arguments from the executable at a space might have been incorrect,
18235     # since paths with space are more likely in Windows. Give it another try with the whole
18236     # argument.
18237     path="$complete"
18238     arguments="EOL"
18239     new_path=`$CYGPATH -u "$path"`
18240     new_path=`$WHICH "$new_path" 2> /dev/null`
18241     # bat and cmd files are not always considered executable in cygwin causing which
18242     # to not find them
18243     if test "x$new_path" = x \
18244              && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18245              && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18246       new_path=`$CYGPATH -u "$path"`
18247     fi
18248     if test "x$new_path" = x; then
18249       # It's still not found. Now this is an unrecoverable error.
18250       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
18251 $as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
18252       has_space=`$ECHO "$complete" | $GREP " "`
18253       if test "x$has_space" != x; then
18254         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18255 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18256       fi
18257       as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
18258     fi
18259   fi
18260 
18261   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18262   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18263   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18264   # "foo.exe" is OK but "foo" is an error.
18265   #
18266   # This test is therefore slightly more accurate than "test -f" to check for file precense.
18267   # It is also a way to make sure we got the proper file name for the real test later on.
18268   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18269   if test "x$test_shortpath" = x; then
18270     # Short path failed, file does not exist as specified.
18271     # Try adding .exe or .cmd
18272     if test -f "${new_path}.exe"; then
18273        input_to_shortpath="${new_path}.exe"
18274     elif test -f "${new_path}.cmd"; then
18275        input_to_shortpath="${new_path}.cmd"
18276     else
18277       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&5
18278 $as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&6;}
18279       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18280 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18281       as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
18282     fi
18283   else
18284     input_to_shortpath="$new_path"
18285   fi
18286 
18287   # Call helper function which possibly converts this using DOS-style short mode.
18288   # If so, the updated path is stored in $new_path.
18289   new_path="$input_to_shortpath"
18290 
18291   input_path="$input_to_shortpath"
18292   # Check if we need to convert this using DOS-style short mode. If the path
18293   # contains just simple characters, use it. Otherwise (spaces, weird characters),
18294   # take no chances and rewrite it.
18295   # Note: m4 eats our [], so we need to use [ and ] instead.
18296   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18297   if test "x$has_forbidden_chars" != x; then
18298     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18299     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18300     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18301     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18302       # Going to short mode and back again did indeed matter. Since short mode is
18303       # case insensitive, let's make it lowercase to improve readability.
18304       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18305       # Now convert it back to Unix-stile (cygpath)
18306       input_path=`$CYGPATH -u "$shortmode_path"`
18307       new_path="$input_path"
18308     fi
18309   fi
18310 
18311   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18312   if test "x$test_cygdrive_prefix" = x; then
18313     # As a simple fix, exclude /usr/bin since it's not a real path.
18314     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18315       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18316       # a path prefixed by /cygdrive for fixpath to work.
18317       new_path="$CYGWIN_ROOT_PATH$input_path"
18318     fi
18319   fi
18320 
18321   # remove trailing .exe if any
18322   new_path="${new_path/%.exe/}"
18323 
18324   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18325 
18326   # First separate the path from the arguments. This will split at the first
18327   # space.
18328   complete="$BUILD_CXX"
18329   path="${complete%% *}"
18330   tmp="$complete EOL"
18331   arguments="${tmp#* }"
18332 
18333   # Input might be given as Windows format, start by converting to
18334   # unix format.
18335   new_path="$path"
18336 
18337   windows_path="$new_path"
18338   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18339     unix_path=`$CYGPATH -u "$windows_path"`
18340     new_path="$unix_path"
18341   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18342     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18343     new_path="$unix_path"
18344   fi
18345 
18346 
18347   # Now try to locate executable using which
18348   new_path=`$WHICH "$new_path" 2> /dev/null`
18349 
18350   if test "x$new_path" = x; then
18351     # Oops. Which didn't find the executable.
18352     # The splitting of arguments from the executable at a space might have been incorrect,
18353     # since paths with space are more likely in Windows. Give it another try with the whole
18354     # argument.
18355     path="$complete"
18356     arguments="EOL"
18357     new_path="$path"
18358 
18359   windows_path="$new_path"
18360   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18361     unix_path=`$CYGPATH -u "$windows_path"`
18362     new_path="$unix_path"
18363   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18364     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18365     new_path="$unix_path"
18366   fi
18367 
18368 
18369     new_path=`$WHICH "$new_path" 2> /dev/null`
18370 
18371     if test "x$new_path" = x; then
18372       # It's still not found. Now this is an unrecoverable error.
18373       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
18374 $as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
18375       has_space=`$ECHO "$complete" | $GREP " "`
18376       if test "x$has_space" != x; then
18377         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18378 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18379       fi
18380       as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
18381     fi
18382   fi
18383 
18384   # Now new_path has a complete unix path to the binary
18385   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18386     # Keep paths in /bin as-is, but remove trailing .exe if any
18387     new_path="${new_path/%.exe/}"
18388     # Do not save /bin paths to all_fixpath_prefixes!
18389   else
18390     # Not in mixed or Windows style, start by that.
18391     new_path=`cmd //c echo $new_path`
18392 
18393   input_path="$new_path"
18394   # Check if we need to convert this using DOS-style short mode. If the path
18395   # contains just simple characters, use it. Otherwise (spaces, weird characters),
18396   # take no chances and rewrite it.
18397   # Note: m4 eats our [], so we need to use [ and ] instead.
18398   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18399   if test "x$has_forbidden_chars" != x; then
18400     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18401     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18402   fi
18403 
18404     # Output is in $new_path
18405 
18406   windows_path="$new_path"
18407   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18408     unix_path=`$CYGPATH -u "$windows_path"`
18409     new_path="$unix_path"
18410   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18411     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18412     new_path="$unix_path"
18413   fi
18414 
18415     # remove trailing .exe if any
18416     new_path="${new_path/%.exe/}"
18417 
18418     # Save the first 10 bytes of this path to the storage, so fixpath can work.
18419     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18420   fi
18421 
18422   else
18423     # We're on a posix platform. Hooray! :)
18424     # First separate the path from the arguments. This will split at the first
18425     # space.
18426     complete="$BUILD_CXX"
18427     path="${complete%% *}"
18428     tmp="$complete EOL"
18429     arguments="${tmp#* }"
18430 
18431     # Cannot rely on the command "which" here since it doesn't always work.
18432     is_absolute_path=`$ECHO "$path" | $GREP ^/`
18433     if test -z "$is_absolute_path"; then
18434       # Path to executable is not absolute. Find it.
18435       IFS_save="$IFS"
18436       IFS=:
18437       for p in $PATH; do
18438         if test -f "$p/$path" && test -x "$p/$path"; then
18439           new_path="$p/$path"
18440           break
18441         fi
18442       done
18443       IFS="$IFS_save"
18444     else
18445       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving BUILD_CXX (as $path) failed, using $path directly." >&5
18446 $as_echo "$as_me: Resolving BUILD_CXX (as $path) failed, using $path directly." >&6;}
18447       new_path="$path"
18448     fi
18449 
18450     if test "x$new_path" = x; then
18451         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
18452 $as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
18453         has_space=`$ECHO "$complete" | $GREP " "`
18454         if test "x$has_space" != x; then
18455           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18456 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18457         fi
18458         as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
18459       fi
18460   fi
18461 
18462       # Now join together the path and the arguments once again
18463       if test "x$arguments" != xEOL; then
18464         new_complete="$new_path ${arguments% *}"
18465       else
18466         new_complete="$new_path"
18467       fi
18468 
18469   if test "x$complete" != "x$new_complete"; then
18470       BUILD_CXX="$new_complete"
18471       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CXX to \"$new_complete\"" >&5
18472 $as_echo "$as_me: Rewriting BUILD_CXX to \"$new_complete\"" >&6;}
18473     fi
18474 
18475     # Extract the first word of "ld", so it can be a program name with args.
18476 set dummy ld; ac_word=$2
18477 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18478 $as_echo_n "checking for $ac_word... " >&6; }
18479 if ${ac_cv_path_BUILD_LD+:} false; then :
18480   $as_echo_n "(cached) " >&6
18481 else
18482   case $BUILD_LD in
18483   [\\/]* | ?:[\\/]*)
18484   ac_cv_path_BUILD_LD="$BUILD_LD" # Let the user override the test with a path.
18485   ;;
18486   *)
18487   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18488 for as_dir in $PATH
18489 do
18490   IFS=$as_save_IFS
18491   test -z "$as_dir" && as_dir=.
18492     for ac_exec_ext in '' $ac_executable_extensions; do
18493   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
18494     ac_cv_path_BUILD_LD="$as_dir/$ac_word$ac_exec_ext"
18495     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18496     break 2
18497   fi
18498 done
18499   done
18500 IFS=$as_save_IFS
18501 
18502   ;;
18503 esac
18504 fi
18505 BUILD_LD=$ac_cv_path_BUILD_LD
18506 if test -n "$BUILD_LD"; then
18507   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_LD" >&5
18508 $as_echo "$BUILD_LD" >&6; }
18509 else
18510   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18511 $as_echo "no" >&6; }
18512 fi
18513 
18514 
18515 
18516   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18517 
18518   # First separate the path from the arguments. This will split at the first
18519   # space.
18520   complete="$BUILD_LD"
18521   path="${complete%% *}"
18522   tmp="$complete EOL"
18523   arguments="${tmp#* }"
18524 
18525   # Input might be given as Windows format, start by converting to
18526   # unix format.
18527   new_path=`$CYGPATH -u "$path"`
18528 
18529   # Now try to locate executable using which
18530   new_path=`$WHICH "$new_path" 2> /dev/null`
18531   # bat and cmd files are not always considered executable in cygwin causing which
18532   # to not find them
18533   if test "x$new_path" = x \
18534            && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18535            && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18536     new_path=`$CYGPATH -u "$path"`
18537   fi
18538   if test "x$new_path" = x; then
18539     # Oops. Which didn't find the executable.
18540     # The splitting of arguments from the executable at a space might have been incorrect,
18541     # since paths with space are more likely in Windows. Give it another try with the whole
18542     # argument.
18543     path="$complete"
18544     arguments="EOL"
18545     new_path=`$CYGPATH -u "$path"`
18546     new_path=`$WHICH "$new_path" 2> /dev/null`
18547     # bat and cmd files are not always considered executable in cygwin causing which
18548     # to not find them
18549     if test "x$new_path" = x \
18550              && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18551              && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18552       new_path=`$CYGPATH -u "$path"`
18553     fi
18554     if test "x$new_path" = x; then
18555       # It's still not found. Now this is an unrecoverable error.
18556       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
18557 $as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
18558       has_space=`$ECHO "$complete" | $GREP " "`
18559       if test "x$has_space" != x; then
18560         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18561 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18562       fi
18563       as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
18564     fi
18565   fi
18566 
18567   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18568   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18569   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18570   # "foo.exe" is OK but "foo" is an error.
18571   #
18572   # This test is therefore slightly more accurate than "test -f" to check for file precense.
18573   # It is also a way to make sure we got the proper file name for the real test later on.
18574   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18575   if test "x$test_shortpath" = x; then
18576     # Short path failed, file does not exist as specified.
18577     # Try adding .exe or .cmd
18578     if test -f "${new_path}.exe"; then
18579        input_to_shortpath="${new_path}.exe"
18580     elif test -f "${new_path}.cmd"; then
18581        input_to_shortpath="${new_path}.cmd"
18582     else
18583       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$new_path\", is invalid." >&5
18584 $as_echo "$as_me: The path of BUILD_LD, which resolves as \"$new_path\", is invalid." >&6;}
18585       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18586 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18587       as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
18588     fi
18589   else
18590     input_to_shortpath="$new_path"
18591   fi
18592 
18593   # Call helper function which possibly converts this using DOS-style short mode.
18594   # If so, the updated path is stored in $new_path.
18595   new_path="$input_to_shortpath"
18596 
18597   input_path="$input_to_shortpath"
18598   # Check if we need to convert this using DOS-style short mode. If the path
18599   # contains just simple characters, use it. Otherwise (spaces, weird characters),
18600   # take no chances and rewrite it.
18601   # Note: m4 eats our [], so we need to use [ and ] instead.
18602   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18603   if test "x$has_forbidden_chars" != x; then
18604     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18605     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18606     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18607     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18608       # Going to short mode and back again did indeed matter. Since short mode is
18609       # case insensitive, let's make it lowercase to improve readability.
18610       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18611       # Now convert it back to Unix-stile (cygpath)
18612       input_path=`$CYGPATH -u "$shortmode_path"`
18613       new_path="$input_path"
18614     fi
18615   fi
18616 
18617   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18618   if test "x$test_cygdrive_prefix" = x; then
18619     # As a simple fix, exclude /usr/bin since it's not a real path.
18620     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18621       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18622       # a path prefixed by /cygdrive for fixpath to work.
18623       new_path="$CYGWIN_ROOT_PATH$input_path"
18624     fi
18625   fi
18626 
18627   # remove trailing .exe if any
18628   new_path="${new_path/%.exe/}"
18629 
18630   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18631 
18632   # First separate the path from the arguments. This will split at the first
18633   # space.
18634   complete="$BUILD_LD"
18635   path="${complete%% *}"
18636   tmp="$complete EOL"
18637   arguments="${tmp#* }"
18638 
18639   # Input might be given as Windows format, start by converting to
18640   # unix format.
18641   new_path="$path"
18642 
18643   windows_path="$new_path"
18644   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18645     unix_path=`$CYGPATH -u "$windows_path"`
18646     new_path="$unix_path"
18647   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18648     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18649     new_path="$unix_path"
18650   fi
18651 
18652 
18653   # Now try to locate executable using which
18654   new_path=`$WHICH "$new_path" 2> /dev/null`
18655 
18656   if test "x$new_path" = x; then
18657     # Oops. Which didn't find the executable.
18658     # The splitting of arguments from the executable at a space might have been incorrect,
18659     # since paths with space are more likely in Windows. Give it another try with the whole
18660     # argument.
18661     path="$complete"
18662     arguments="EOL"
18663     new_path="$path"
18664 
18665   windows_path="$new_path"
18666   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18667     unix_path=`$CYGPATH -u "$windows_path"`
18668     new_path="$unix_path"
18669   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18670     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18671     new_path="$unix_path"
18672   fi
18673 
18674 
18675     new_path=`$WHICH "$new_path" 2> /dev/null`
18676 
18677     if test "x$new_path" = x; then
18678       # It's still not found. Now this is an unrecoverable error.
18679       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
18680 $as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
18681       has_space=`$ECHO "$complete" | $GREP " "`
18682       if test "x$has_space" != x; then
18683         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18684 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18685       fi
18686       as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
18687     fi
18688   fi
18689 
18690   # Now new_path has a complete unix path to the binary
18691   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18692     # Keep paths in /bin as-is, but remove trailing .exe if any
18693     new_path="${new_path/%.exe/}"
18694     # Do not save /bin paths to all_fixpath_prefixes!
18695   else
18696     # Not in mixed or Windows style, start by that.
18697     new_path=`cmd //c echo $new_path`
18698 
18699   input_path="$new_path"
18700   # Check if we need to convert this using DOS-style short mode. If the path
18701   # contains just simple characters, use it. Otherwise (spaces, weird characters),
18702   # take no chances and rewrite it.
18703   # Note: m4 eats our [], so we need to use [ and ] instead.
18704   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18705   if test "x$has_forbidden_chars" != x; then
18706     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18707     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18708   fi
18709 
18710     # Output is in $new_path
18711 
18712   windows_path="$new_path"
18713   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18714     unix_path=`$CYGPATH -u "$windows_path"`
18715     new_path="$unix_path"
18716   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18717     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18718     new_path="$unix_path"
18719   fi
18720 
18721     # remove trailing .exe if any
18722     new_path="${new_path/%.exe/}"
18723 
18724     # Save the first 10 bytes of this path to the storage, so fixpath can work.
18725     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18726   fi
18727 
18728   else
18729     # We're on a posix platform. Hooray! :)
18730     # First separate the path from the arguments. This will split at the first
18731     # space.
18732     complete="$BUILD_LD"
18733     path="${complete%% *}"
18734     tmp="$complete EOL"
18735     arguments="${tmp#* }"
18736 
18737     # Cannot rely on the command "which" here since it doesn't always work.
18738     is_absolute_path=`$ECHO "$path" | $GREP ^/`
18739     if test -z "$is_absolute_path"; then
18740       # Path to executable is not absolute. Find it.
18741       IFS_save="$IFS"
18742       IFS=:
18743       for p in $PATH; do
18744         if test -f "$p/$path" && test -x "$p/$path"; then
18745           new_path="$p/$path"
18746           break
18747         fi
18748       done
18749       IFS="$IFS_save"
18750     else
18751       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving BUILD_LD (as $path) failed, using $path directly." >&5
18752 $as_echo "$as_me: Resolving BUILD_LD (as $path) failed, using $path directly." >&6;}
18753       new_path="$path"
18754     fi
18755 
18756     if test "x$new_path" = x; then
18757         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
18758 $as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
18759         has_space=`$ECHO "$complete" | $GREP " "`
18760         if test "x$has_space" != x; then
18761           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18762 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18763         fi
18764         as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
18765       fi
18766   fi
18767 
18768       # Now join together the path and the arguments once again
18769       if test "x$arguments" != xEOL; then
18770         new_complete="$new_path ${arguments% *}"
18771       else
18772         new_complete="$new_path"
18773       fi
18774 
18775   if test "x$complete" != "x$new_complete"; then
18776       BUILD_LD="$new_complete"
18777       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_LD to \"$new_complete\"" >&5
18778 $as_echo "$as_me: Rewriting BUILD_LD to \"$new_complete\"" >&6;}
18779     fi
18780 
18781 fi
18782 
18783 
18784 
18785 
18786 # If a devkit is found on the builddeps server, then prepend its path to the
18787 # PATH variable. If there are cross compilers available in the devkit, these
18788 # will be found by AC_PROG_CC et al.
18789 DEVKIT=
18790 
18791 
18792     if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
18793         # Source the builddeps file again, to make sure it uses the latest variables!
18794         . $builddepsfile
18795         # Look for a target and build machine specific resource!
18796         eval resource=\${builddep_devkit_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
18797         if test "x$resource" = x; then
18798             # Ok, lets instead look for a target specific resource
18799             eval resource=\${builddep_devkit_TARGET_${rewritten_target_var}}
18800         fi
18801         if test "x$resource" = x; then
18802             # Ok, lets instead look for a build specific resource
18803             eval resource=\${builddep_devkit_BUILD_${rewritten_build_var}}
18804         fi
18805         if test "x$resource" = x; then
18806             # Ok, lets instead look for a generic resource
18807             # (The devkit comes from M4 and not the shell, thus no need for eval here.)
18808             resource=${builddep_devkit}
18809         fi
18810         if test "x$resource" != x; then
18811             { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for devkit" >&5
18812 $as_echo "$as_me: Using builddeps $resource for devkit" >&6;}
18813             # If the resource in the builddeps.conf file is an existing directory,
18814             # for example /java/linux/cups
18815             if test -d ${resource}; then
18816                depdir=${resource}
18817             else
18818 
18819 # devkit is for example mymodule
18820 # $resource is for example libs/general/libmymod_1_2_3.zip
18821 # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
18822 # $with_builddeps_dir is for example /localhome/builddeps
18823 # depdir is the name of the variable into which we store the depdir, eg MYMOD
18824 # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
18825 # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
18826     filename=`basename $resource`
18827     filebase=`echo $filename | sed 's/\.[^\.]*$//'`
18828     filebase=${filename%%.*}
18829     extension=${filename#*.}
18830     installdir=$with_builddeps_dir/$filebase
18831     if test ! -f $installdir/$filename.unpacked; then
18832         { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency devkit from $with_builddeps_server/$resource and installing into $installdir" >&5
18833 $as_echo "$as_me: Downloading build dependency devkit from $with_builddeps_server/$resource and installing into $installdir" >&6;}
18834         if test ! -d $installdir; then
18835             mkdir -p $installdir
18836         fi
18837         if test ! -d $installdir; then
18838             as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
18839         fi
18840         tmpfile=`mktemp $installdir/devkit.XXXXXXXXX`
18841         touch $tmpfile
18842         if test ! -f $tmpfile; then
18843             as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
18844         fi
18845 
18846     # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
18847     # $tmpfile is the local file name for the downloaded file.
18848     VALID_TOOL=no
18849     if test "x$BDEPS_FTP" = xwget; then
18850        VALID_TOOL=yes
18851        wget -O $tmpfile $with_builddeps_server/$resource
18852     fi
18853     if test "x$BDEPS_FTP" = xlftp; then
18854        VALID_TOOL=yes
18855        lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
18856     fi
18857     if test "x$BDEPS_FTP" = xftp; then
18858         VALID_TOOL=yes
18859         FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
18860         FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
18861         FTPUSERPWD=${FTPSERVER%%@*}
18862         if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
18863             FTPUSER=${userpwd%%:*}
18864             FTPPWD=${userpwd#*@}
18865             FTPSERVER=${FTPSERVER#*@}
18866         else
18867             FTPUSER=ftp
18868             FTPPWD=ftp
18869         fi
18870         # the "pass" command does not work on some
18871         # ftp clients (read ftp.exe) but if it works,
18872         # passive mode is better!
18873         (\
18874             echo "user $FTPUSER $FTPPWD"        ;\
18875             echo "pass"                         ;\
18876             echo "bin"                          ;\
18877             echo "get $FTPPATH $tmpfile"              ;\
18878         ) | ftp -in $FTPSERVER
18879     fi
18880     if test "x$VALID_TOOL" != xyes; then
18881        as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
18882     fi
18883 
18884         mv $tmpfile $installdir/$filename
18885         if test ! -s $installdir/$filename; then
18886             as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
18887         fi
18888         case "$extension" in
18889             zip)  echo "Unzipping $installdir/$filename..."
18890                (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
18891             ;;
18892             tar.gz) echo "Untaring $installdir/$filename..."
18893                (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
18894             ;;
18895             tgz) echo "Untaring $installdir/$filename..."
18896                (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
18897             ;;
18898             *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
18899             ;;
18900         esac
18901     fi
18902     if test -f $installdir/$filename.unpacked; then
18903         depdir=$installdir
18904     fi
18905 
18906             fi
18907             # Source the builddeps file again, because in the previous command, the depdir
18908             # was updated to point at the current build dependency install directory.
18909             . $builddepsfile
18910             # Now extract variables from the builddeps.conf files.
18911             theroot=${builddep_devkit_ROOT}
18912             thecflags=${builddep_devkit_CFLAGS}
18913             thelibs=${builddep_devkit_LIBS}
18914             if test "x$depdir" = x; then
18915                 as_fn_error $? "Could not download build dependency devkit" "$LINENO" 5
18916             fi
18917             DEVKIT=$depdir
18918             if test "x$theroot" != x; then
18919                DEVKIT="$theroot"
18920             fi
18921             if test "x$thecflags" != x; then
18922                DEVKIT_CFLAGS="$thecflags"
18923             fi
18924             if test "x$thelibs" != x; then
18925                DEVKIT_LIBS="$thelibs"
18926             fi
18927             # Found devkit
18928                      PATH="$DEVKIT/bin:$PATH"
18929                      SYS_ROOT="$DEVKIT/${rewritten_target}/sys-root"
18930                      if test "x$x_includes" = "xNONE"; then
18931                          x_includes="$SYS_ROOT/usr/include/X11"
18932                      fi
18933                      if test "x$x_libraries" = "xNONE"; then
18934                          x_libraries="$SYS_ROOT/usr/lib"
18935                      fi
18936 
18937 
18938         fi
18939 
18940     fi
18941 
18942 
18943 if test "x$SYS_ROOT" != "x/" ; then
18944     CFLAGS="--sysroot=$SYS_ROOT $CFLAGS"
18945     CXXFLAGS="--sysroot=$SYS_ROOT $CXXFLAGS"
18946     OBJCFLAGS="--sysroot=$SYS_ROOT $OBJCFLAGS"
18947     OBJCXXFLAGS="--sysroot=$SYS_ROOT $OBJCFLAGS"
18948     CPPFLAGS="--sysroot=$SYS_ROOT $CPPFLAGS"
18949     LDFLAGS="--sysroot=$SYS_ROOT $LDFLAGS"
18950 fi
18951 
18952 # Store the CFLAGS etal passed to the configure script.
18953 ORG_CFLAGS="$CFLAGS"
18954 ORG_CXXFLAGS="$CXXFLAGS"
18955 ORG_OBJCFLAGS="$OBJCFLAGS"
18956 
18957 # autoconf magic only relies on PATH, so update it if tools dir is specified
18958 OLD_PATH="$PATH"
18959 if test "x$TOOLS_DIR" != x; then
18960   PATH=$TOOLS_DIR:$PATH
18961 fi
18962 
18963 
18964 ### Locate C compiler (CC)
18965 
18966 # On windows, only cl.exe is supported.
18967 # On Solaris, cc is preferred to gcc.
18968 # Elsewhere, gcc is preferred to cc.
18969 
18970 if test "x$CC" != x; then
18971   COMPILER_CHECK_LIST="$CC"
18972 elif test "x$OPENJDK_TARGET_OS" = "xwindows"; then
18973   COMPILER_CHECK_LIST="cl"
18974 elif test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
18975   COMPILER_CHECK_LIST="cc gcc"
18976 else
18977   COMPILER_CHECK_LIST="gcc cc"
18978 fi
18979 
18980 
18981   COMPILER_NAME=C
18982 
18983   CC=
18984   # If TOOLS_DIR is set, check for all compiler names in there first
18985   # before checking the rest of the PATH.
18986   if test -n "$TOOLS_DIR"; then
18987     PATH_save="$PATH"
18988     PATH="$TOOLS_DIR"
18989     for ac_prog in $COMPILER_CHECK_LIST
18990 do
18991   # Extract the first word of "$ac_prog", so it can be a program name with args.
18992 set dummy $ac_prog; ac_word=$2
18993 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18994 $as_echo_n "checking for $ac_word... " >&6; }
18995 if ${ac_cv_path_TOOLS_DIR_CC+:} false; then :
18996   $as_echo_n "(cached) " >&6
18997 else
18998   case $TOOLS_DIR_CC in
18999   [\\/]* | ?:[\\/]*)
19000   ac_cv_path_TOOLS_DIR_CC="$TOOLS_DIR_CC" # Let the user override the test with a path.
19001   ;;
19002   *)
19003   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19004 for as_dir in $PATH
19005 do
19006   IFS=$as_save_IFS
19007   test -z "$as_dir" && as_dir=.
19008     for ac_exec_ext in '' $ac_executable_extensions; do
19009   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
19010     ac_cv_path_TOOLS_DIR_CC="$as_dir/$ac_word$ac_exec_ext"
19011     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19012     break 2
19013   fi
19014 done
19015   done
19016 IFS=$as_save_IFS
19017 
19018   ;;
19019 esac
19020 fi
19021 TOOLS_DIR_CC=$ac_cv_path_TOOLS_DIR_CC
19022 if test -n "$TOOLS_DIR_CC"; then
19023   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLS_DIR_CC" >&5
19024 $as_echo "$TOOLS_DIR_CC" >&6; }
19025 else
19026   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19027 $as_echo "no" >&6; }
19028 fi
19029 
19030 
19031   test -n "$TOOLS_DIR_CC" && break
19032 done
19033 
19034     CC=$TOOLS_DIR_CC
19035     PATH="$PATH_save"
19036   fi
19037 
19038   # AC_PATH_PROGS can't be run multiple times with the same variable,
19039   # so create a new name for this run.
19040   if test "x$CC" = x; then
19041     for ac_prog in $COMPILER_CHECK_LIST
19042 do
19043   # Extract the first word of "$ac_prog", so it can be a program name with args.
19044 set dummy $ac_prog; ac_word=$2
19045 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19046 $as_echo_n "checking for $ac_word... " >&6; }
19047 if ${ac_cv_path_POTENTIAL_CC+:} false; then :
19048   $as_echo_n "(cached) " >&6
19049 else
19050   case $POTENTIAL_CC in
19051   [\\/]* | ?:[\\/]*)
19052   ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
19053   ;;
19054   *)
19055   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19056 for as_dir in $PATH
19057 do
19058   IFS=$as_save_IFS
19059   test -z "$as_dir" && as_dir=.
19060     for ac_exec_ext in '' $ac_executable_extensions; do
19061   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
19062     ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
19063     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19064     break 2
19065   fi
19066 done
19067   done
19068 IFS=$as_save_IFS
19069 
19070   ;;
19071 esac
19072 fi
19073 POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
19074 if test -n "$POTENTIAL_CC"; then
19075   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
19076 $as_echo "$POTENTIAL_CC" >&6; }
19077 else
19078   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19079 $as_echo "no" >&6; }
19080 fi
19081 
19082 
19083   test -n "$POTENTIAL_CC" && break
19084 done
19085 
19086     CC=$POTENTIAL_CC
19087   fi
19088 
19089   if test "x$CC" = x; then
19090 
19091     # Print a helpful message on how to acquire the necessary build dependency.
19092     # devkit is the help tag: freetyp2, cups, pulse, alsa etc
19093     MISSING_DEPENDENCY=devkit
19094     PKGHANDLER_COMMAND=
19095 
19096     case $PKGHANDLER in
19097         apt-get)
19098                 apt_help     $MISSING_DEPENDENCY ;;
19099     yum)
19100                 yum_help     $MISSING_DEPENDENCY ;;
19101         port)
19102                 port_help    $MISSING_DEPENDENCY ;;
19103         pkgutil)
19104                 pkgutil_help $MISSING_DEPENDENCY ;;
19105         pkgadd)
19106                 pkgadd_help  $MISSING_DEPENDENCY ;;
19107     * )
19108       break ;;
19109     esac
19110 
19111     if test "x$PKGHANDLER_COMMAND" != x; then
19112         HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
19113     fi
19114 
19115       as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
19116   fi
19117 
19118   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19119 
19120   # First separate the path from the arguments. This will split at the first
19121   # space.
19122   complete="$CC"
19123   path="${complete%% *}"
19124   tmp="$complete EOL"
19125   arguments="${tmp#* }"
19126 
19127   # Input might be given as Windows format, start by converting to
19128   # unix format.
19129   new_path=`$CYGPATH -u "$path"`
19130 
19131   # Now try to locate executable using which
19132   new_path=`$WHICH "$new_path" 2> /dev/null`
19133   # bat and cmd files are not always considered executable in cygwin causing which
19134   # to not find them
19135   if test "x$new_path" = x \
19136            && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19137            && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19138     new_path=`$CYGPATH -u "$path"`
19139   fi
19140   if test "x$new_path" = x; then
19141     # Oops. Which didn't find the executable.
19142     # The splitting of arguments from the executable at a space might have been incorrect,
19143     # since paths with space are more likely in Windows. Give it another try with the whole
19144     # argument.
19145     path="$complete"
19146     arguments="EOL"
19147     new_path=`$CYGPATH -u "$path"`
19148     new_path=`$WHICH "$new_path" 2> /dev/null`
19149     # bat and cmd files are not always considered executable in cygwin causing which
19150     # to not find them
19151     if test "x$new_path" = x \
19152              && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19153              && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19154       new_path=`$CYGPATH -u "$path"`
19155     fi
19156     if test "x$new_path" = x; then
19157       # It's still not found. Now this is an unrecoverable error.
19158       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
19159 $as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
19160       has_space=`$ECHO "$complete" | $GREP " "`
19161       if test "x$has_space" != x; then
19162         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19163 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19164       fi
19165       as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
19166     fi
19167   fi
19168 
19169   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19170   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19171   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19172   # "foo.exe" is OK but "foo" is an error.
19173   #
19174   # This test is therefore slightly more accurate than "test -f" to check for file precense.
19175   # It is also a way to make sure we got the proper file name for the real test later on.
19176   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19177   if test "x$test_shortpath" = x; then
19178     # Short path failed, file does not exist as specified.
19179     # Try adding .exe or .cmd
19180     if test -f "${new_path}.exe"; then
19181        input_to_shortpath="${new_path}.exe"
19182     elif test -f "${new_path}.cmd"; then
19183        input_to_shortpath="${new_path}.cmd"
19184     else
19185       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$new_path\", is invalid." >&5
19186 $as_echo "$as_me: The path of CC, which resolves as \"$new_path\", is invalid." >&6;}
19187       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19188 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19189       as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
19190     fi
19191   else
19192     input_to_shortpath="$new_path"
19193   fi
19194 
19195   # Call helper function which possibly converts this using DOS-style short mode.
19196   # If so, the updated path is stored in $new_path.
19197   new_path="$input_to_shortpath"
19198 
19199   input_path="$input_to_shortpath"
19200   # Check if we need to convert this using DOS-style short mode. If the path
19201   # contains just simple characters, use it. Otherwise (spaces, weird characters),
19202   # take no chances and rewrite it.
19203   # Note: m4 eats our [], so we need to use [ and ] instead.
19204   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19205   if test "x$has_forbidden_chars" != x; then
19206     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19207     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19208     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19209     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19210       # Going to short mode and back again did indeed matter. Since short mode is
19211       # case insensitive, let's make it lowercase to improve readability.
19212       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19213       # Now convert it back to Unix-stile (cygpath)
19214       input_path=`$CYGPATH -u "$shortmode_path"`
19215       new_path="$input_path"
19216     fi
19217   fi
19218 
19219   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19220   if test "x$test_cygdrive_prefix" = x; then
19221     # As a simple fix, exclude /usr/bin since it's not a real path.
19222     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19223       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19224       # a path prefixed by /cygdrive for fixpath to work.
19225       new_path="$CYGWIN_ROOT_PATH$input_path"
19226     fi
19227   fi
19228 
19229   # remove trailing .exe if any
19230   new_path="${new_path/%.exe/}"
19231 
19232   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19233 
19234   # First separate the path from the arguments. This will split at the first
19235   # space.
19236   complete="$CC"
19237   path="${complete%% *}"
19238   tmp="$complete EOL"
19239   arguments="${tmp#* }"
19240 
19241   # Input might be given as Windows format, start by converting to
19242   # unix format.
19243   new_path="$path"
19244 
19245   windows_path="$new_path"
19246   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19247     unix_path=`$CYGPATH -u "$windows_path"`
19248     new_path="$unix_path"
19249   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19250     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19251     new_path="$unix_path"
19252   fi
19253 
19254 
19255   # Now try to locate executable using which
19256   new_path=`$WHICH "$new_path" 2> /dev/null`
19257 
19258   if test "x$new_path" = x; then
19259     # Oops. Which didn't find the executable.
19260     # The splitting of arguments from the executable at a space might have been incorrect,
19261     # since paths with space are more likely in Windows. Give it another try with the whole
19262     # argument.
19263     path="$complete"
19264     arguments="EOL"
19265     new_path="$path"
19266 
19267   windows_path="$new_path"
19268   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19269     unix_path=`$CYGPATH -u "$windows_path"`
19270     new_path="$unix_path"
19271   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19272     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19273     new_path="$unix_path"
19274   fi
19275 
19276 
19277     new_path=`$WHICH "$new_path" 2> /dev/null`
19278 
19279     if test "x$new_path" = x; then
19280       # It's still not found. Now this is an unrecoverable error.
19281       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
19282 $as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
19283       has_space=`$ECHO "$complete" | $GREP " "`
19284       if test "x$has_space" != x; then
19285         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19286 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19287       fi
19288       as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
19289     fi
19290   fi
19291 
19292   # Now new_path has a complete unix path to the binary
19293   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
19294     # Keep paths in /bin as-is, but remove trailing .exe if any
19295     new_path="${new_path/%.exe/}"
19296     # Do not save /bin paths to all_fixpath_prefixes!
19297   else
19298     # Not in mixed or Windows style, start by that.
19299     new_path=`cmd //c echo $new_path`
19300 
19301   input_path="$new_path"
19302   # Check if we need to convert this using DOS-style short mode. If the path
19303   # contains just simple characters, use it. Otherwise (spaces, weird characters),
19304   # take no chances and rewrite it.
19305   # Note: m4 eats our [], so we need to use [ and ] instead.
19306   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19307   if test "x$has_forbidden_chars" != x; then
19308     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19309     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19310   fi
19311 
19312     # Output is in $new_path
19313 
19314   windows_path="$new_path"
19315   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19316     unix_path=`$CYGPATH -u "$windows_path"`
19317     new_path="$unix_path"
19318   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19319     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19320     new_path="$unix_path"
19321   fi
19322 
19323     # remove trailing .exe if any
19324     new_path="${new_path/%.exe/}"
19325 
19326     # Save the first 10 bytes of this path to the storage, so fixpath can work.
19327     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19328   fi
19329 
19330   else
19331     # We're on a posix platform. Hooray! :)
19332     # First separate the path from the arguments. This will split at the first
19333     # space.
19334     complete="$CC"
19335     path="${complete%% *}"
19336     tmp="$complete EOL"
19337     arguments="${tmp#* }"
19338 
19339     # Cannot rely on the command "which" here since it doesn't always work.
19340     is_absolute_path=`$ECHO "$path" | $GREP ^/`
19341     if test -z "$is_absolute_path"; then
19342       # Path to executable is not absolute. Find it.
19343       IFS_save="$IFS"
19344       IFS=:
19345       for p in $PATH; do
19346         if test -f "$p/$path" && test -x "$p/$path"; then
19347           new_path="$p/$path"
19348           break
19349         fi
19350       done
19351       IFS="$IFS_save"
19352     else
19353       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CC (as $path) failed, using $path directly." >&5
19354 $as_echo "$as_me: Resolving CC (as $path) failed, using $path directly." >&6;}
19355       new_path="$path"
19356     fi
19357 
19358     if test "x$new_path" = x; then
19359         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
19360 $as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
19361         has_space=`$ECHO "$complete" | $GREP " "`
19362         if test "x$has_space" != x; then
19363           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19364 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19365         fi
19366         as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
19367       fi
19368   fi
19369 
19370       # Now join together the path and the arguments once again
19371       if test "x$arguments" != xEOL; then
19372         new_complete="$new_path ${arguments% *}"
19373       else
19374         new_complete="$new_path"
19375       fi
19376 
19377   if test "x$complete" != "x$new_complete"; then
19378       CC="$new_complete"
19379       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CC to \"$new_complete\"" >&5
19380 $as_echo "$as_me: Rewriting CC to \"$new_complete\"" >&6;}
19381     fi
19382 
19383   { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CC" >&5
19384 $as_echo_n "checking resolved symbolic links for CC... " >&6; }
19385   TEST_COMPILER="$CC"
19386 
19387     if test "x$OPENJDK_BUILD_OS" != xwindows; then
19388         # Follow a chain of symbolic links. Use readlink
19389         # where it exists, else fall back to horribly
19390         # complicated shell code.
19391         if test "x$READLINK_TESTED" != yes; then
19392             # On MacOSX there is a readlink tool with a different
19393             # purpose than the GNU readlink tool. Check the found readlink.
19394             ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
19395             if test "x$ISGNU" = x; then
19396                  # A readlink that we do not know how to use.
19397                  # Are there other non-GNU readlinks out there?
19398                  READLINK_TESTED=yes
19399                  READLINK=
19400             fi
19401         fi
19402 
19403         if test "x$READLINK" != x; then
19404             TEST_COMPILER=`$READLINK -f $TEST_COMPILER`
19405         else
19406             # Save the current directory for restoring afterwards
19407             STARTDIR=$PWD
19408             COUNTER=0
19409             sym_link_dir=`$DIRNAME $TEST_COMPILER`
19410             sym_link_file=`$BASENAME $TEST_COMPILER`
19411             cd $sym_link_dir
19412             # Use -P flag to resolve symlinks in directories.
19413             cd `$THEPWDCMD -P`
19414             sym_link_dir=`$THEPWDCMD -P`
19415             # Resolve file symlinks
19416             while test $COUNTER -lt 20; do
19417                 ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
19418                 if test "x$ISLINK" == x; then
19419                     # This is not a symbolic link! We are done!
19420                     break
19421                 fi
19422                 # Again resolve directory symlinks since the target of the just found
19423                 # link could be in a different directory
19424                 cd `$DIRNAME $ISLINK`
19425                 sym_link_dir=`$THEPWDCMD -P`
19426                 sym_link_file=`$BASENAME $ISLINK`
19427                 let COUNTER=COUNTER+1
19428             done
19429             cd $STARTDIR
19430             TEST_COMPILER=$sym_link_dir/$sym_link_file
19431         fi
19432     fi
19433 
19434   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_COMPILER" >&5
19435 $as_echo "$TEST_COMPILER" >&6; }
19436   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CC is disguised ccache" >&5
19437 $as_echo_n "checking if CC is disguised ccache... " >&6; }
19438 
19439   COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"`
19440   if test "x$COMPILER_BASENAME" = "xccache"; then
19441     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5
19442 $as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; }
19443     # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache.
19444     # We want to control ccache invocation ourselves, so ignore this cc and try
19445     # searching again.
19446 
19447     # Remove the path to the fake ccache cc from the PATH
19448     RETRY_COMPILER_SAVED_PATH="$PATH"
19449     COMPILER_DIRNAME=`$DIRNAME $CC`
19450     PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`"
19451 
19452     # Try again looking for our compiler
19453     if test -n "$ac_tool_prefix"; then
19454   for ac_prog in $COMPILER_CHECK_LIST
19455   do
19456     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
19457 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
19458 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19459 $as_echo_n "checking for $ac_word... " >&6; }
19460 if ${ac_cv_prog_PROPER_COMPILER_CC+:} false; then :
19461   $as_echo_n "(cached) " >&6
19462 else
19463   if test -n "$PROPER_COMPILER_CC"; then
19464   ac_cv_prog_PROPER_COMPILER_CC="$PROPER_COMPILER_CC" # Let the user override the test.
19465 else
19466 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19467 for as_dir in $PATH
19468 do
19469   IFS=$as_save_IFS
19470   test -z "$as_dir" && as_dir=.
19471     for ac_exec_ext in '' $ac_executable_extensions; do
19472   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
19473     ac_cv_prog_PROPER_COMPILER_CC="$ac_tool_prefix$ac_prog"
19474     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19475     break 2
19476   fi
19477 done
19478   done
19479 IFS=$as_save_IFS
19480 
19481 fi
19482 fi
19483 PROPER_COMPILER_CC=$ac_cv_prog_PROPER_COMPILER_CC
19484 if test -n "$PROPER_COMPILER_CC"; then
19485   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5
19486 $as_echo "$PROPER_COMPILER_CC" >&6; }
19487 else
19488   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19489 $as_echo "no" >&6; }
19490 fi
19491 
19492 
19493     test -n "$PROPER_COMPILER_CC" && break
19494   done
19495 fi
19496 if test -z "$PROPER_COMPILER_CC"; then
19497   ac_ct_PROPER_COMPILER_CC=$PROPER_COMPILER_CC
19498   for ac_prog in $COMPILER_CHECK_LIST
19499 do
19500   # Extract the first word of "$ac_prog", so it can be a program name with args.
19501 set dummy $ac_prog; ac_word=$2
19502 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19503 $as_echo_n "checking for $ac_word... " >&6; }
19504 if ${ac_cv_prog_ac_ct_PROPER_COMPILER_CC+:} false; then :
19505   $as_echo_n "(cached) " >&6
19506 else
19507   if test -n "$ac_ct_PROPER_COMPILER_CC"; then
19508   ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_ct_PROPER_COMPILER_CC" # Let the user override the test.
19509 else
19510 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19511 for as_dir in $PATH
19512 do
19513   IFS=$as_save_IFS
19514   test -z "$as_dir" && as_dir=.
19515     for ac_exec_ext in '' $ac_executable_extensions; do
19516   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
19517     ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_prog"
19518     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19519     break 2
19520   fi
19521 done
19522   done
19523 IFS=$as_save_IFS
19524 
19525 fi
19526 fi
19527 ac_ct_PROPER_COMPILER_CC=$ac_cv_prog_ac_ct_PROPER_COMPILER_CC
19528 if test -n "$ac_ct_PROPER_COMPILER_CC"; then
19529   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CC" >&5
19530 $as_echo "$ac_ct_PROPER_COMPILER_CC" >&6; }
19531 else
19532   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19533 $as_echo "no" >&6; }
19534 fi
19535 
19536 
19537   test -n "$ac_ct_PROPER_COMPILER_CC" && break
19538 done
19539 
19540   if test "x$ac_ct_PROPER_COMPILER_CC" = x; then
19541     PROPER_COMPILER_CC=""
19542   else
19543     case $cross_compiling:$ac_tool_warned in
19544 yes:)
19545 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
19546 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
19547 ac_tool_warned=yes ;;
19548 esac
19549     PROPER_COMPILER_CC=$ac_ct_PROPER_COMPILER_CC
19550   fi
19551 fi
19552 
19553 
19554   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19555 
19556   # First separate the path from the arguments. This will split at the first
19557   # space.
19558   complete="$PROPER_COMPILER_CC"
19559   path="${complete%% *}"
19560   tmp="$complete EOL"
19561   arguments="${tmp#* }"
19562 
19563   # Input might be given as Windows format, start by converting to
19564   # unix format.
19565   new_path=`$CYGPATH -u "$path"`
19566 
19567   # Now try to locate executable using which
19568   new_path=`$WHICH "$new_path" 2> /dev/null`
19569   # bat and cmd files are not always considered executable in cygwin causing which
19570   # to not find them
19571   if test "x$new_path" = x \
19572            && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19573            && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19574     new_path=`$CYGPATH -u "$path"`
19575   fi
19576   if test "x$new_path" = x; then
19577     # Oops. Which didn't find the executable.
19578     # The splitting of arguments from the executable at a space might have been incorrect,
19579     # since paths with space are more likely in Windows. Give it another try with the whole
19580     # argument.
19581     path="$complete"
19582     arguments="EOL"
19583     new_path=`$CYGPATH -u "$path"`
19584     new_path=`$WHICH "$new_path" 2> /dev/null`
19585     # bat and cmd files are not always considered executable in cygwin causing which
19586     # to not find them
19587     if test "x$new_path" = x \
19588              && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19589              && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19590       new_path=`$CYGPATH -u "$path"`
19591     fi
19592     if test "x$new_path" = x; then
19593       # It's still not found. Now this is an unrecoverable error.
19594       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
19595 $as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
19596       has_space=`$ECHO "$complete" | $GREP " "`
19597       if test "x$has_space" != x; then
19598         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19599 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19600       fi
19601       as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
19602     fi
19603   fi
19604 
19605   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19606   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19607   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19608   # "foo.exe" is OK but "foo" is an error.
19609   #
19610   # This test is therefore slightly more accurate than "test -f" to check for file precense.
19611   # It is also a way to make sure we got the proper file name for the real test later on.
19612   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19613   if test "x$test_shortpath" = x; then
19614     # Short path failed, file does not exist as specified.
19615     # Try adding .exe or .cmd
19616     if test -f "${new_path}.exe"; then
19617        input_to_shortpath="${new_path}.exe"
19618     elif test -f "${new_path}.cmd"; then
19619        input_to_shortpath="${new_path}.cmd"
19620     else
19621       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&5
19622 $as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&6;}
19623       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19624 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19625       as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
19626     fi
19627   else
19628     input_to_shortpath="$new_path"
19629   fi
19630 
19631   # Call helper function which possibly converts this using DOS-style short mode.
19632   # If so, the updated path is stored in $new_path.
19633   new_path="$input_to_shortpath"
19634 
19635   input_path="$input_to_shortpath"
19636   # Check if we need to convert this using DOS-style short mode. If the path
19637   # contains just simple characters, use it. Otherwise (spaces, weird characters),
19638   # take no chances and rewrite it.
19639   # Note: m4 eats our [], so we need to use [ and ] instead.
19640   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19641   if test "x$has_forbidden_chars" != x; then
19642     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19643     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19644     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19645     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19646       # Going to short mode and back again did indeed matter. Since short mode is
19647       # case insensitive, let's make it lowercase to improve readability.
19648       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19649       # Now convert it back to Unix-stile (cygpath)
19650       input_path=`$CYGPATH -u "$shortmode_path"`
19651       new_path="$input_path"
19652     fi
19653   fi
19654 
19655   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19656   if test "x$test_cygdrive_prefix" = x; then
19657     # As a simple fix, exclude /usr/bin since it's not a real path.
19658     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19659       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19660       # a path prefixed by /cygdrive for fixpath to work.
19661       new_path="$CYGWIN_ROOT_PATH$input_path"
19662     fi
19663   fi
19664 
19665   # remove trailing .exe if any
19666   new_path="${new_path/%.exe/}"
19667 
19668   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19669 
19670   # First separate the path from the arguments. This will split at the first
19671   # space.
19672   complete="$PROPER_COMPILER_CC"
19673   path="${complete%% *}"
19674   tmp="$complete EOL"
19675   arguments="${tmp#* }"
19676 
19677   # Input might be given as Windows format, start by converting to
19678   # unix format.
19679   new_path="$path"
19680 
19681   windows_path="$new_path"
19682   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19683     unix_path=`$CYGPATH -u "$windows_path"`
19684     new_path="$unix_path"
19685   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19686     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19687     new_path="$unix_path"
19688   fi
19689 
19690 
19691   # Now try to locate executable using which
19692   new_path=`$WHICH "$new_path" 2> /dev/null`
19693 
19694   if test "x$new_path" = x; then
19695     # Oops. Which didn't find the executable.
19696     # The splitting of arguments from the executable at a space might have been incorrect,
19697     # since paths with space are more likely in Windows. Give it another try with the whole
19698     # argument.
19699     path="$complete"
19700     arguments="EOL"
19701     new_path="$path"
19702 
19703   windows_path="$new_path"
19704   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19705     unix_path=`$CYGPATH -u "$windows_path"`
19706     new_path="$unix_path"
19707   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19708     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19709     new_path="$unix_path"
19710   fi
19711 
19712 
19713     new_path=`$WHICH "$new_path" 2> /dev/null`
19714 
19715     if test "x$new_path" = x; then
19716       # It's still not found. Now this is an unrecoverable error.
19717       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
19718 $as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
19719       has_space=`$ECHO "$complete" | $GREP " "`
19720       if test "x$has_space" != x; then
19721         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19722 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19723       fi
19724       as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
19725     fi
19726   fi
19727 
19728   # Now new_path has a complete unix path to the binary
19729   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
19730     # Keep paths in /bin as-is, but remove trailing .exe if any
19731     new_path="${new_path/%.exe/}"
19732     # Do not save /bin paths to all_fixpath_prefixes!
19733   else
19734     # Not in mixed or Windows style, start by that.
19735     new_path=`cmd //c echo $new_path`
19736 
19737   input_path="$new_path"
19738   # Check if we need to convert this using DOS-style short mode. If the path
19739   # contains just simple characters, use it. Otherwise (spaces, weird characters),
19740   # take no chances and rewrite it.
19741   # Note: m4 eats our [], so we need to use [ and ] instead.
19742   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19743   if test "x$has_forbidden_chars" != x; then
19744     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19745     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19746   fi
19747 
19748     # Output is in $new_path
19749 
19750   windows_path="$new_path"
19751   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19752     unix_path=`$CYGPATH -u "$windows_path"`
19753     new_path="$unix_path"
19754   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19755     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19756     new_path="$unix_path"
19757   fi
19758 
19759     # remove trailing .exe if any
19760     new_path="${new_path/%.exe/}"
19761 
19762     # Save the first 10 bytes of this path to the storage, so fixpath can work.
19763     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19764   fi
19765 
19766   else
19767     # We're on a posix platform. Hooray! :)
19768     # First separate the path from the arguments. This will split at the first
19769     # space.
19770     complete="$PROPER_COMPILER_CC"
19771     path="${complete%% *}"
19772     tmp="$complete EOL"
19773     arguments="${tmp#* }"
19774 
19775     # Cannot rely on the command "which" here since it doesn't always work.
19776     is_absolute_path=`$ECHO "$path" | $GREP ^/`
19777     if test -z "$is_absolute_path"; then
19778       # Path to executable is not absolute. Find it.
19779       IFS_save="$IFS"
19780       IFS=:
19781       for p in $PATH; do
19782         if test -f "$p/$path" && test -x "$p/$path"; then
19783           new_path="$p/$path"
19784           break
19785         fi
19786       done
19787       IFS="$IFS_save"
19788     else
19789       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving PROPER_COMPILER_CC (as $path) failed, using $path directly." >&5
19790 $as_echo "$as_me: Resolving PROPER_COMPILER_CC (as $path) failed, using $path directly." >&6;}
19791       new_path="$path"
19792     fi
19793 
19794     if test "x$new_path" = x; then
19795         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
19796 $as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
19797         has_space=`$ECHO "$complete" | $GREP " "`
19798         if test "x$has_space" != x; then
19799           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19800 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19801         fi
19802         as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
19803       fi
19804   fi
19805 
19806       # Now join together the path and the arguments once again
19807       if test "x$arguments" != xEOL; then
19808         new_complete="$new_path ${arguments% *}"
19809       else
19810         new_complete="$new_path"
19811       fi
19812 
19813   if test "x$complete" != "x$new_complete"; then
19814       PROPER_COMPILER_CC="$new_complete"
19815       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&5
19816 $as_echo "$as_me: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&6;}
19817     fi
19818 
19819     PATH="$RETRY_COMPILER_SAVED_PATH"
19820 
19821     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CC" >&5
19822 $as_echo_n "checking for resolved symbolic links for CC... " >&6; }
19823 
19824     if test "x$OPENJDK_BUILD_OS" != xwindows; then
19825         # Follow a chain of symbolic links. Use readlink
19826         # where it exists, else fall back to horribly
19827         # complicated shell code.
19828         if test "x$READLINK_TESTED" != yes; then
19829             # On MacOSX there is a readlink tool with a different
19830             # purpose than the GNU readlink tool. Check the found readlink.
19831             ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
19832             if test "x$ISGNU" = x; then
19833                  # A readlink that we do not know how to use.
19834                  # Are there other non-GNU readlinks out there?
19835                  READLINK_TESTED=yes
19836                  READLINK=
19837             fi
19838         fi
19839 
19840         if test "x$READLINK" != x; then
19841             PROPER_COMPILER_CC=`$READLINK -f $PROPER_COMPILER_CC`
19842         else
19843             # Save the current directory for restoring afterwards
19844             STARTDIR=$PWD
19845             COUNTER=0
19846             sym_link_dir=`$DIRNAME $PROPER_COMPILER_CC`
19847             sym_link_file=`$BASENAME $PROPER_COMPILER_CC`
19848             cd $sym_link_dir
19849             # Use -P flag to resolve symlinks in directories.
19850             cd `$THEPWDCMD -P`
19851             sym_link_dir=`$THEPWDCMD -P`
19852             # Resolve file symlinks
19853             while test $COUNTER -lt 20; do
19854                 ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
19855                 if test "x$ISLINK" == x; then
19856                     # This is not a symbolic link! We are done!
19857                     break
19858                 fi
19859                 # Again resolve directory symlinks since the target of the just found
19860                 # link could be in a different directory
19861                 cd `$DIRNAME $ISLINK`
19862                 sym_link_dir=`$THEPWDCMD -P`
19863                 sym_link_file=`$BASENAME $ISLINK`
19864                 let COUNTER=COUNTER+1
19865             done
19866             cd $STARTDIR
19867             PROPER_COMPILER_CC=$sym_link_dir/$sym_link_file
19868         fi
19869     fi
19870 
19871     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5
19872 $as_echo "$PROPER_COMPILER_CC" >&6; }
19873     CC="$PROPER_COMPILER_CC"
19874   else
19875     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CC" >&5
19876 $as_echo "no, keeping CC" >&6; }
19877     CC="$TEST_COMPILER"
19878   fi
19879 
19880   COMPILER=$CC
19881   COMPILER_NAME=$COMPILER_NAME
19882 
19883   if test "x$OPENJDK_TARGET_OS" = xsolaris; then
19884     # Make sure we use the Sun Studio compiler and not gcc on Solaris, which won't work
19885     COMPILER_VERSION_TEST=`$COMPILER -V 2>&1 | $HEAD -n 1`
19886     $ECHO $COMPILER_VERSION_TEST | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
19887     if test $? -ne 0; then
19888       GCC_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
19889 
19890       { $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
19891 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required Sun Studio compiler." >&6;}
19892       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&5
19893 $as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&6;}
19894       as_fn_error $? "Sun Studio compiler is required. Try setting --with-tools-dir." "$LINENO" 5
19895     else
19896       COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/p"`
19897       COMPILER_VENDOR="Sun Studio"
19898     fi
19899   elif test  "x$OPENJDK_TARGET_OS" = xwindows; then
19900     # First line typically looks something like:
19901     # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.30319.01 for 80x86
19902     COMPILER_VERSION_TEST=`$COMPILER 2>&1 | $HEAD -n 1`
19903     COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*Version \([1-9][0-9.]*\) .*/\1/p"`
19904     COMPILER_VENDOR="Microsoft CL.EXE"
19905     COMPILER_CPU_TEST=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* for \(.*\)$/\1/p"`
19906     if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
19907       if test "x$COMPILER_CPU_TEST" != "x80x86"; then
19908         as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"80x86\"." "$LINENO" 5
19909       fi
19910     elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
19911       if test "x$COMPILER_CPU_TEST" != "xx64"; then
19912         as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." "$LINENO" 5
19913       fi
19914     fi
19915   else
19916     COMPILER_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
19917     # Check that this is likely to be GCC.
19918     $COMPILER --version 2>&1 | $GREP "Free Software Foundation" > /dev/null
19919     if test $? -ne 0; then
19920       { $as_echo "$as_me:${as_lineno-$LINENO}: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&5
19921 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&6;}
19922       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&5
19923 $as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&6;}
19924       as_fn_error $? "GCC compiler is required. Try setting --with-tools-dir." "$LINENO" 5
19925     fi
19926 
19927     # First line typically looks something like:
19928     # gcc (Ubuntu/Linaro 4.5.2-8ubuntu4) 4.5.2
19929     COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* \([1-9][0-9.]*\)/\1/p"`
19930     COMPILER_VENDOR=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^\(.*\) [1-9][0-9.]*/\1/p"`
19931   fi
19932   # This sets CC_VERSION or CXX_VERSION. (This comment is a grep marker)
19933   CC_VERSION="$COMPILER_VERSION"
19934   # This sets CC_VENDOR or CXX_VENDOR. (This comment is a grep marker)
19935   CC_VENDOR="$COMPILER_VENDOR"
19936 
19937   { $as_echo "$as_me:${as_lineno-$LINENO}: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&5
19938 $as_echo "$as_me: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&6;}
19939 
19940 
19941 # Now that we have resolved CC ourself, let autoconf have its go at it
19942 ac_ext=c
19943 ac_cpp='$CPP $CPPFLAGS'
19944 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
19945 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
19946 ac_compiler_gnu=$ac_cv_c_compiler_gnu
19947 if test -n "$ac_tool_prefix"; then
19948   for ac_prog in $CC
19949   do
19950     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
19951 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
19952 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19953 $as_echo_n "checking for $ac_word... " >&6; }
19954 if ${ac_cv_prog_CC+:} false; then :
19955   $as_echo_n "(cached) " >&6
19956 else
19957   if test -n "$CC"; then
19958   ac_cv_prog_CC="$CC" # Let the user override the test.
19959 else
19960 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19961 for as_dir in $PATH
19962 do
19963   IFS=$as_save_IFS
19964   test -z "$as_dir" && as_dir=.
19965     for ac_exec_ext in '' $ac_executable_extensions; do
19966   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
19967     ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
19968     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19969     break 2
19970   fi
19971 done
19972   done
19973 IFS=$as_save_IFS
19974 
19975 fi
19976 fi
19977 CC=$ac_cv_prog_CC
19978 if test -n "$CC"; then
19979   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
19980 $as_echo "$CC" >&6; }
19981 else
19982   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19983 $as_echo "no" >&6; }
19984 fi
19985 
19986 
19987     test -n "$CC" && break
19988   done
19989 fi
19990 if test -z "$CC"; then
19991   ac_ct_CC=$CC
19992   for ac_prog in $CC
19993 do
19994   # Extract the first word of "$ac_prog", so it can be a program name with args.
19995 set dummy $ac_prog; ac_word=$2
19996 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19997 $as_echo_n "checking for $ac_word... " >&6; }
19998 if ${ac_cv_prog_ac_ct_CC+:} false; then :
19999   $as_echo_n "(cached) " >&6
20000 else
20001   if test -n "$ac_ct_CC"; then
20002   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
20003 else
20004 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20005 for as_dir in $PATH
20006 do
20007   IFS=$as_save_IFS
20008   test -z "$as_dir" && as_dir=.
20009     for ac_exec_ext in '' $ac_executable_extensions; do
20010   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
20011     ac_cv_prog_ac_ct_CC="$ac_prog"
20012     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20013     break 2
20014   fi
20015 done
20016   done
20017 IFS=$as_save_IFS
20018 
20019 fi
20020 fi
20021 ac_ct_CC=$ac_cv_prog_ac_ct_CC
20022 if test -n "$ac_ct_CC"; then
20023   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
20024 $as_echo "$ac_ct_CC" >&6; }
20025 else
20026   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20027 $as_echo "no" >&6; }
20028 fi
20029 
20030 
20031   test -n "$ac_ct_CC" && break
20032 done
20033 
20034   if test "x$ac_ct_CC" = x; then
20035     CC=""
20036   else
20037     case $cross_compiling:$ac_tool_warned in
20038 yes:)
20039 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
20040 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
20041 ac_tool_warned=yes ;;
20042 esac
20043     CC=$ac_ct_CC
20044   fi
20045 fi
20046 
20047 
20048 test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
20049 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
20050 as_fn_error $? "no acceptable C compiler found in \$PATH
20051 See \`config.log' for more details" "$LINENO" 5; }
20052 
20053 # Provide some information about the compiler.
20054 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
20055 set X $ac_compile
20056 ac_compiler=$2
20057 for ac_option in --version -v -V -qversion; do
20058   { { ac_try="$ac_compiler $ac_option >&5"
20059 case "(($ac_try" in
20060   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20061   *) ac_try_echo=$ac_try;;
20062 esac
20063 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
20064 $as_echo "$ac_try_echo"; } >&5
20065   (eval "$ac_compiler $ac_option >&5") 2>conftest.err
20066   ac_status=$?
20067   if test -s conftest.err; then
20068     sed '10a\
20069 ... rest of stderr output deleted ...
20070          10q' conftest.err >conftest.er1
20071     cat conftest.er1 >&5
20072   fi
20073   rm -f conftest.er1 conftest.err
20074   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
20075   test $ac_status = 0; }
20076 done
20077 
20078 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20079 /* end confdefs.h.  */
20080 
20081 int
20082 main ()
20083 {
20084 
20085   ;
20086   return 0;
20087 }
20088 _ACEOF
20089 ac_clean_files_save=$ac_clean_files
20090 ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
20091 # Try to create an executable without -o first, disregard a.out.
20092 # It will help us diagnose broken compilers, and finding out an intuition
20093 # of exeext.
20094 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
20095 $as_echo_n "checking whether the C compiler works... " >&6; }
20096 ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
20097 
20098 # The possible output files:
20099 ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
20100 
20101 ac_rmfiles=
20102 for ac_file in $ac_files
20103 do
20104   case $ac_file in
20105     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
20106     * ) ac_rmfiles="$ac_rmfiles $ac_file";;
20107   esac
20108 done
20109 rm -f $ac_rmfiles
20110 
20111 if { { ac_try="$ac_link_default"
20112 case "(($ac_try" in
20113   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20114   *) ac_try_echo=$ac_try;;
20115 esac
20116 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
20117 $as_echo "$ac_try_echo"; } >&5
20118   (eval "$ac_link_default") 2>&5
20119   ac_status=$?
20120   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
20121   test $ac_status = 0; }; then :
20122   # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
20123 # So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
20124 # in a Makefile.  We should not override ac_cv_exeext if it was cached,
20125 # so that the user can short-circuit this test for compilers unknown to
20126 # Autoconf.
20127 for ac_file in $ac_files ''
20128 do
20129   test -f "$ac_file" || continue
20130   case $ac_file in
20131     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
20132         ;;
20133     [ab].out )
20134         # We found the default executable, but exeext='' is most
20135         # certainly right.
20136         break;;
20137     *.* )
20138         if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
20139         then :; else
20140            ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
20141         fi
20142         # We set ac_cv_exeext here because the later test for it is not
20143         # safe: cross compilers may not add the suffix if given an `-o'
20144         # argument, so we may need to know it at that point already.
20145         # Even if this section looks crufty: it has the advantage of
20146         # actually working.
20147         break;;
20148     * )
20149         break;;
20150   esac
20151 done
20152 test "$ac_cv_exeext" = no && ac_cv_exeext=
20153 
20154 else
20155   ac_file=''
20156 fi
20157 if test -z "$ac_file"; then :
20158   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20159 $as_echo "no" >&6; }
20160 $as_echo "$as_me: failed program was:" >&5
20161 sed 's/^/| /' conftest.$ac_ext >&5
20162 
20163 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
20164 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
20165 as_fn_error 77 "C compiler cannot create executables
20166 See \`config.log' for more details" "$LINENO" 5; }
20167 else
20168   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
20169 $as_echo "yes" >&6; }
20170 fi
20171 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
20172 $as_echo_n "checking for C compiler default output file name... " >&6; }
20173 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
20174 $as_echo "$ac_file" >&6; }
20175 ac_exeext=$ac_cv_exeext
20176 
20177 rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
20178 ac_clean_files=$ac_clean_files_save
20179 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
20180 $as_echo_n "checking for suffix of executables... " >&6; }
20181 if { { ac_try="$ac_link"
20182 case "(($ac_try" in
20183   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20184   *) ac_try_echo=$ac_try;;
20185 esac
20186 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
20187 $as_echo "$ac_try_echo"; } >&5
20188   (eval "$ac_link") 2>&5
20189   ac_status=$?
20190   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
20191   test $ac_status = 0; }; then :
20192   # If both `conftest.exe' and `conftest' are `present' (well, observable)
20193 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
20194 # work properly (i.e., refer to `conftest.exe'), while it won't with
20195 # `rm'.
20196 for ac_file in conftest.exe conftest conftest.*; do
20197   test -f "$ac_file" || continue
20198   case $ac_file in
20199     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
20200     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
20201           break;;
20202     * ) break;;
20203   esac
20204 done
20205 else
20206   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
20207 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
20208 as_fn_error $? "cannot compute suffix of executables: cannot compile and link
20209 See \`config.log' for more details" "$LINENO" 5; }
20210 fi
20211 rm -f conftest conftest$ac_cv_exeext
20212 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
20213 $as_echo "$ac_cv_exeext" >&6; }
20214 
20215 rm -f conftest.$ac_ext
20216 EXEEXT=$ac_cv_exeext
20217 ac_exeext=$EXEEXT
20218 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20219 /* end confdefs.h.  */
20220 #include <stdio.h>
20221 int
20222 main ()
20223 {
20224 FILE *f = fopen ("conftest.out", "w");
20225  return ferror (f) || fclose (f) != 0;
20226 
20227   ;
20228   return 0;
20229 }
20230 _ACEOF
20231 ac_clean_files="$ac_clean_files conftest.out"
20232 # Check that the compiler produces executables we can run.  If not, either
20233 # the compiler is broken, or we cross compile.
20234 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
20235 $as_echo_n "checking whether we are cross compiling... " >&6; }
20236 if test "$cross_compiling" != yes; then
20237   { { ac_try="$ac_link"
20238 case "(($ac_try" in
20239   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20240   *) ac_try_echo=$ac_try;;
20241 esac
20242 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
20243 $as_echo "$ac_try_echo"; } >&5
20244   (eval "$ac_link") 2>&5
20245   ac_status=$?
20246   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
20247   test $ac_status = 0; }
20248   if { ac_try='./conftest$ac_cv_exeext'
20249   { { case "(($ac_try" in
20250   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20251   *) ac_try_echo=$ac_try;;
20252 esac
20253 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
20254 $as_echo "$ac_try_echo"; } >&5
20255   (eval "$ac_try") 2>&5
20256   ac_status=$?
20257   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
20258   test $ac_status = 0; }; }; then
20259     cross_compiling=no
20260   else
20261     if test "$cross_compiling" = maybe; then
20262         cross_compiling=yes
20263     else
20264         { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
20265 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
20266 as_fn_error $? "cannot run C compiled programs.
20267 If you meant to cross compile, use \`--host'.
20268 See \`config.log' for more details" "$LINENO" 5; }
20269     fi
20270   fi
20271 fi
20272 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
20273 $as_echo "$cross_compiling" >&6; }
20274 
20275 rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
20276 ac_clean_files=$ac_clean_files_save
20277 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
20278 $as_echo_n "checking for suffix of object files... " >&6; }
20279 if ${ac_cv_objext+:} false; then :
20280   $as_echo_n "(cached) " >&6
20281 else
20282   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20283 /* end confdefs.h.  */
20284 
20285 int
20286 main ()
20287 {
20288 
20289   ;
20290   return 0;
20291 }
20292 _ACEOF
20293 rm -f conftest.o conftest.obj
20294 if { { ac_try="$ac_compile"
20295 case "(($ac_try" in
20296   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20297   *) ac_try_echo=$ac_try;;
20298 esac
20299 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
20300 $as_echo "$ac_try_echo"; } >&5
20301   (eval "$ac_compile") 2>&5
20302   ac_status=$?
20303   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
20304   test $ac_status = 0; }; then :
20305   for ac_file in conftest.o conftest.obj conftest.*; do
20306   test -f "$ac_file" || continue;
20307   case $ac_file in
20308     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
20309     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
20310        break;;
20311   esac
20312 done
20313 else
20314   $as_echo "$as_me: failed program was:" >&5
20315 sed 's/^/| /' conftest.$ac_ext >&5
20316 
20317 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
20318 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
20319 as_fn_error $? "cannot compute suffix of object files: cannot compile
20320 See \`config.log' for more details" "$LINENO" 5; }
20321 fi
20322 rm -f conftest.$ac_cv_objext conftest.$ac_ext
20323 fi
20324 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
20325 $as_echo "$ac_cv_objext" >&6; }
20326 OBJEXT=$ac_cv_objext
20327 ac_objext=$OBJEXT
20328 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
20329 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
20330 if ${ac_cv_c_compiler_gnu+:} false; then :
20331   $as_echo_n "(cached) " >&6
20332 else
20333   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20334 /* end confdefs.h.  */
20335 
20336 int
20337 main ()
20338 {
20339 #ifndef __GNUC__
20340        choke me
20341 #endif
20342 
20343   ;
20344   return 0;
20345 }
20346 _ACEOF
20347 if ac_fn_c_try_compile "$LINENO"; then :
20348   ac_compiler_gnu=yes
20349 else
20350   ac_compiler_gnu=no
20351 fi
20352 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20353 ac_cv_c_compiler_gnu=$ac_compiler_gnu
20354 
20355 fi
20356 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
20357 $as_echo "$ac_cv_c_compiler_gnu" >&6; }
20358 if test $ac_compiler_gnu = yes; then
20359   GCC=yes
20360 else
20361   GCC=
20362 fi
20363 ac_test_CFLAGS=${CFLAGS+set}
20364 ac_save_CFLAGS=$CFLAGS
20365 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
20366 $as_echo_n "checking whether $CC accepts -g... " >&6; }
20367 if ${ac_cv_prog_cc_g+:} false; then :
20368   $as_echo_n "(cached) " >&6
20369 else
20370   ac_save_c_werror_flag=$ac_c_werror_flag
20371    ac_c_werror_flag=yes
20372    ac_cv_prog_cc_g=no
20373    CFLAGS="-g"
20374    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20375 /* end confdefs.h.  */
20376 
20377 int
20378 main ()
20379 {
20380 
20381   ;
20382   return 0;
20383 }
20384 _ACEOF
20385 if ac_fn_c_try_compile "$LINENO"; then :
20386   ac_cv_prog_cc_g=yes
20387 else
20388   CFLAGS=""
20389       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20390 /* end confdefs.h.  */
20391 
20392 int
20393 main ()
20394 {
20395 
20396   ;
20397   return 0;
20398 }
20399 _ACEOF
20400 if ac_fn_c_try_compile "$LINENO"; then :
20401 
20402 else
20403   ac_c_werror_flag=$ac_save_c_werror_flag
20404          CFLAGS="-g"
20405          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20406 /* end confdefs.h.  */
20407 
20408 int
20409 main ()
20410 {
20411 
20412   ;
20413   return 0;
20414 }
20415 _ACEOF
20416 if ac_fn_c_try_compile "$LINENO"; then :
20417   ac_cv_prog_cc_g=yes
20418 fi
20419 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20420 fi
20421 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20422 fi
20423 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20424    ac_c_werror_flag=$ac_save_c_werror_flag
20425 fi
20426 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
20427 $as_echo "$ac_cv_prog_cc_g" >&6; }
20428 if test "$ac_test_CFLAGS" = set; then
20429   CFLAGS=$ac_save_CFLAGS
20430 elif test $ac_cv_prog_cc_g = yes; then
20431   if test "$GCC" = yes; then
20432     CFLAGS="-g -O2"
20433   else
20434     CFLAGS="-g"
20435   fi
20436 else
20437   if test "$GCC" = yes; then
20438     CFLAGS="-O2"
20439   else
20440     CFLAGS=
20441   fi
20442 fi
20443 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
20444 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
20445 if ${ac_cv_prog_cc_c89+:} false; then :
20446   $as_echo_n "(cached) " >&6
20447 else
20448   ac_cv_prog_cc_c89=no
20449 ac_save_CC=$CC
20450 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20451 /* end confdefs.h.  */
20452 #include <stdarg.h>
20453 #include <stdio.h>
20454 #include <sys/types.h>
20455 #include <sys/stat.h>
20456 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
20457 struct buf { int x; };
20458 FILE * (*rcsopen) (struct buf *, struct stat *, int);
20459 static char *e (p, i)
20460      char **p;
20461      int i;
20462 {
20463   return p[i];
20464 }
20465 static char *f (char * (*g) (char **, int), char **p, ...)
20466 {
20467   char *s;
20468   va_list v;
20469   va_start (v,p);
20470   s = g (p, va_arg (v,int));
20471   va_end (v);
20472   return s;
20473 }
20474 
20475 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
20476    function prototypes and stuff, but not '\xHH' hex character constants.
20477    These don't provoke an error unfortunately, instead are silently treated
20478    as 'x'.  The following induces an error, until -std is added to get
20479    proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
20480    array size at least.  It's necessary to write '\x00'==0 to get something
20481    that's true only with -std.  */
20482 int osf4_cc_array ['\x00' == 0 ? 1 : -1];
20483 
20484 /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
20485    inside strings and character constants.  */
20486 #define FOO(x) 'x'
20487 int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
20488 
20489 int test (int i, double x);
20490 struct s1 {int (*f) (int a);};
20491 struct s2 {int (*f) (double a);};
20492 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
20493 int argc;
20494 char **argv;
20495 int
20496 main ()
20497 {
20498 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
20499   ;
20500   return 0;
20501 }
20502 _ACEOF
20503 for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
20504         -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
20505 do
20506   CC="$ac_save_CC $ac_arg"
20507   if ac_fn_c_try_compile "$LINENO"; then :
20508   ac_cv_prog_cc_c89=$ac_arg
20509 fi
20510 rm -f core conftest.err conftest.$ac_objext
20511   test "x$ac_cv_prog_cc_c89" != "xno" && break
20512 done
20513 rm -f conftest.$ac_ext
20514 CC=$ac_save_CC
20515 
20516 fi
20517 # AC_CACHE_VAL
20518 case "x$ac_cv_prog_cc_c89" in
20519   x)
20520     { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
20521 $as_echo "none needed" >&6; } ;;
20522   xno)
20523     { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
20524 $as_echo "unsupported" >&6; } ;;
20525   *)
20526     CC="$CC $ac_cv_prog_cc_c89"
20527     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
20528 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
20529 esac
20530 if test "x$ac_cv_prog_cc_c89" != xno; then :
20531 
20532 fi
20533 
20534 ac_ext=cpp
20535 ac_cpp='$CXXCPP $CPPFLAGS'
20536 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
20537 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
20538 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
20539 
20540 
20541 ### Locate C++ compiler (CXX)
20542 
20543 if test "x$CXX" != x; then
20544   COMPILER_CHECK_LIST="$CXX"
20545 elif test "x$OPENJDK_TARGET_OS" = "xwindows"; then
20546   COMPILER_CHECK_LIST="cl"
20547 elif test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
20548   COMPILER_CHECK_LIST="CC g++"
20549 else
20550   COMPILER_CHECK_LIST="g++ CC"
20551 fi
20552 
20553 
20554   COMPILER_NAME=C++
20555 
20556   CXX=
20557   # If TOOLS_DIR is set, check for all compiler names in there first
20558   # before checking the rest of the PATH.
20559   if test -n "$TOOLS_DIR"; then
20560     PATH_save="$PATH"
20561     PATH="$TOOLS_DIR"
20562     for ac_prog in $COMPILER_CHECK_LIST
20563 do
20564   # Extract the first word of "$ac_prog", so it can be a program name with args.
20565 set dummy $ac_prog; ac_word=$2
20566 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20567 $as_echo_n "checking for $ac_word... " >&6; }
20568 if ${ac_cv_path_TOOLS_DIR_CXX+:} false; then :
20569   $as_echo_n "(cached) " >&6
20570 else
20571   case $TOOLS_DIR_CXX in
20572   [\\/]* | ?:[\\/]*)
20573   ac_cv_path_TOOLS_DIR_CXX="$TOOLS_DIR_CXX" # Let the user override the test with a path.
20574   ;;
20575   *)
20576   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20577 for as_dir in $PATH
20578 do
20579   IFS=$as_save_IFS
20580   test -z "$as_dir" && as_dir=.
20581     for ac_exec_ext in '' $ac_executable_extensions; do
20582   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
20583     ac_cv_path_TOOLS_DIR_CXX="$as_dir/$ac_word$ac_exec_ext"
20584     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20585     break 2
20586   fi
20587 done
20588   done
20589 IFS=$as_save_IFS
20590 
20591   ;;
20592 esac
20593 fi
20594 TOOLS_DIR_CXX=$ac_cv_path_TOOLS_DIR_CXX
20595 if test -n "$TOOLS_DIR_CXX"; then
20596   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLS_DIR_CXX" >&5
20597 $as_echo "$TOOLS_DIR_CXX" >&6; }
20598 else
20599   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20600 $as_echo "no" >&6; }
20601 fi
20602 
20603 
20604   test -n "$TOOLS_DIR_CXX" && break
20605 done
20606 
20607     CXX=$TOOLS_DIR_CXX
20608     PATH="$PATH_save"
20609   fi
20610 
20611   # AC_PATH_PROGS can't be run multiple times with the same variable,
20612   # so create a new name for this run.
20613   if test "x$CXX" = x; then
20614     for ac_prog in $COMPILER_CHECK_LIST
20615 do
20616   # Extract the first word of "$ac_prog", so it can be a program name with args.
20617 set dummy $ac_prog; ac_word=$2
20618 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20619 $as_echo_n "checking for $ac_word... " >&6; }
20620 if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
20621   $as_echo_n "(cached) " >&6
20622 else
20623   case $POTENTIAL_CXX in
20624   [\\/]* | ?:[\\/]*)
20625   ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
20626   ;;
20627   *)
20628   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20629 for as_dir in $PATH
20630 do
20631   IFS=$as_save_IFS
20632   test -z "$as_dir" && as_dir=.
20633     for ac_exec_ext in '' $ac_executable_extensions; do
20634   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
20635     ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
20636     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20637     break 2
20638   fi
20639 done
20640   done
20641 IFS=$as_save_IFS
20642 
20643   ;;
20644 esac
20645 fi
20646 POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
20647 if test -n "$POTENTIAL_CXX"; then
20648   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
20649 $as_echo "$POTENTIAL_CXX" >&6; }
20650 else
20651   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20652 $as_echo "no" >&6; }
20653 fi
20654 
20655 
20656   test -n "$POTENTIAL_CXX" && break
20657 done
20658 
20659     CXX=$POTENTIAL_CXX
20660   fi
20661 
20662   if test "x$CXX" = x; then
20663 
20664     # Print a helpful message on how to acquire the necessary build dependency.
20665     # devkit is the help tag: freetyp2, cups, pulse, alsa etc
20666     MISSING_DEPENDENCY=devkit
20667     PKGHANDLER_COMMAND=
20668 
20669     case $PKGHANDLER in
20670         apt-get)
20671                 apt_help     $MISSING_DEPENDENCY ;;
20672     yum)
20673                 yum_help     $MISSING_DEPENDENCY ;;
20674         port)
20675                 port_help    $MISSING_DEPENDENCY ;;
20676         pkgutil)
20677                 pkgutil_help $MISSING_DEPENDENCY ;;
20678         pkgadd)
20679                 pkgadd_help  $MISSING_DEPENDENCY ;;
20680     * )
20681       break ;;
20682     esac
20683 
20684     if test "x$PKGHANDLER_COMMAND" != x; then
20685         HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
20686     fi
20687 
20688       as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
20689   fi
20690 
20691   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20692 
20693   # First separate the path from the arguments. This will split at the first
20694   # space.
20695   complete="$CXX"
20696   path="${complete%% *}"
20697   tmp="$complete EOL"
20698   arguments="${tmp#* }"
20699 
20700   # Input might be given as Windows format, start by converting to
20701   # unix format.
20702   new_path=`$CYGPATH -u "$path"`
20703 
20704   # Now try to locate executable using which
20705   new_path=`$WHICH "$new_path" 2> /dev/null`
20706   # bat and cmd files are not always considered executable in cygwin causing which
20707   # to not find them
20708   if test "x$new_path" = x \
20709            && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20710            && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20711     new_path=`$CYGPATH -u "$path"`
20712   fi
20713   if test "x$new_path" = x; then
20714     # Oops. Which didn't find the executable.
20715     # The splitting of arguments from the executable at a space might have been incorrect,
20716     # since paths with space are more likely in Windows. Give it another try with the whole
20717     # argument.
20718     path="$complete"
20719     arguments="EOL"
20720     new_path=`$CYGPATH -u "$path"`
20721     new_path=`$WHICH "$new_path" 2> /dev/null`
20722     # bat and cmd files are not always considered executable in cygwin causing which
20723     # to not find them
20724     if test "x$new_path" = x \
20725              && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20726              && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20727       new_path=`$CYGPATH -u "$path"`
20728     fi
20729     if test "x$new_path" = x; then
20730       # It's still not found. Now this is an unrecoverable error.
20731       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
20732 $as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
20733       has_space=`$ECHO "$complete" | $GREP " "`
20734       if test "x$has_space" != x; then
20735         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20736 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20737       fi
20738       as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
20739     fi
20740   fi
20741 
20742   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20743   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20744   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20745   # "foo.exe" is OK but "foo" is an error.
20746   #
20747   # This test is therefore slightly more accurate than "test -f" to check for file precense.
20748   # It is also a way to make sure we got the proper file name for the real test later on.
20749   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20750   if test "x$test_shortpath" = x; then
20751     # Short path failed, file does not exist as specified.
20752     # Try adding .exe or .cmd
20753     if test -f "${new_path}.exe"; then
20754        input_to_shortpath="${new_path}.exe"
20755     elif test -f "${new_path}.cmd"; then
20756        input_to_shortpath="${new_path}.cmd"
20757     else
20758       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$new_path\", is invalid." >&5
20759 $as_echo "$as_me: The path of CXX, which resolves as \"$new_path\", is invalid." >&6;}
20760       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
20761 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
20762       as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
20763     fi
20764   else
20765     input_to_shortpath="$new_path"
20766   fi
20767 
20768   # Call helper function which possibly converts this using DOS-style short mode.
20769   # If so, the updated path is stored in $new_path.
20770   new_path="$input_to_shortpath"
20771 
20772   input_path="$input_to_shortpath"
20773   # Check if we need to convert this using DOS-style short mode. If the path
20774   # contains just simple characters, use it. Otherwise (spaces, weird characters),
20775   # take no chances and rewrite it.
20776   # Note: m4 eats our [], so we need to use [ and ] instead.
20777   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20778   if test "x$has_forbidden_chars" != x; then
20779     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20780     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20781     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20782     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20783       # Going to short mode and back again did indeed matter. Since short mode is
20784       # case insensitive, let's make it lowercase to improve readability.
20785       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20786       # Now convert it back to Unix-stile (cygpath)
20787       input_path=`$CYGPATH -u "$shortmode_path"`
20788       new_path="$input_path"
20789     fi
20790   fi
20791 
20792   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20793   if test "x$test_cygdrive_prefix" = x; then
20794     # As a simple fix, exclude /usr/bin since it's not a real path.
20795     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
20796       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20797       # a path prefixed by /cygdrive for fixpath to work.
20798       new_path="$CYGWIN_ROOT_PATH$input_path"
20799     fi
20800   fi
20801 
20802   # remove trailing .exe if any
20803   new_path="${new_path/%.exe/}"
20804 
20805   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20806 
20807   # First separate the path from the arguments. This will split at the first
20808   # space.
20809   complete="$CXX"
20810   path="${complete%% *}"
20811   tmp="$complete EOL"
20812   arguments="${tmp#* }"
20813 
20814   # Input might be given as Windows format, start by converting to
20815   # unix format.
20816   new_path="$path"
20817 
20818   windows_path="$new_path"
20819   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20820     unix_path=`$CYGPATH -u "$windows_path"`
20821     new_path="$unix_path"
20822   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20823     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20824     new_path="$unix_path"
20825   fi
20826 
20827 
20828   # Now try to locate executable using which
20829   new_path=`$WHICH "$new_path" 2> /dev/null`
20830 
20831   if test "x$new_path" = x; then
20832     # Oops. Which didn't find the executable.
20833     # The splitting of arguments from the executable at a space might have been incorrect,
20834     # since paths with space are more likely in Windows. Give it another try with the whole
20835     # argument.
20836     path="$complete"
20837     arguments="EOL"
20838     new_path="$path"
20839 
20840   windows_path="$new_path"
20841   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20842     unix_path=`$CYGPATH -u "$windows_path"`
20843     new_path="$unix_path"
20844   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20845     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20846     new_path="$unix_path"
20847   fi
20848 
20849 
20850     new_path=`$WHICH "$new_path" 2> /dev/null`
20851 
20852     if test "x$new_path" = x; then
20853       # It's still not found. Now this is an unrecoverable error.
20854       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
20855 $as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
20856       has_space=`$ECHO "$complete" | $GREP " "`
20857       if test "x$has_space" != x; then
20858         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20859 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20860       fi
20861       as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
20862     fi
20863   fi
20864 
20865   # Now new_path has a complete unix path to the binary
20866   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
20867     # Keep paths in /bin as-is, but remove trailing .exe if any
20868     new_path="${new_path/%.exe/}"
20869     # Do not save /bin paths to all_fixpath_prefixes!
20870   else
20871     # Not in mixed or Windows style, start by that.
20872     new_path=`cmd //c echo $new_path`
20873 
20874   input_path="$new_path"
20875   # Check if we need to convert this using DOS-style short mode. If the path
20876   # contains just simple characters, use it. Otherwise (spaces, weird characters),
20877   # take no chances and rewrite it.
20878   # Note: m4 eats our [], so we need to use [ and ] instead.
20879   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20880   if test "x$has_forbidden_chars" != x; then
20881     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20882     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20883   fi
20884 
20885     # Output is in $new_path
20886 
20887   windows_path="$new_path"
20888   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20889     unix_path=`$CYGPATH -u "$windows_path"`
20890     new_path="$unix_path"
20891   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20892     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20893     new_path="$unix_path"
20894   fi
20895 
20896     # remove trailing .exe if any
20897     new_path="${new_path/%.exe/}"
20898 
20899     # Save the first 10 bytes of this path to the storage, so fixpath can work.
20900     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20901   fi
20902 
20903   else
20904     # We're on a posix platform. Hooray! :)
20905     # First separate the path from the arguments. This will split at the first
20906     # space.
20907     complete="$CXX"
20908     path="${complete%% *}"
20909     tmp="$complete EOL"
20910     arguments="${tmp#* }"
20911 
20912     # Cannot rely on the command "which" here since it doesn't always work.
20913     is_absolute_path=`$ECHO "$path" | $GREP ^/`
20914     if test -z "$is_absolute_path"; then
20915       # Path to executable is not absolute. Find it.
20916       IFS_save="$IFS"
20917       IFS=:
20918       for p in $PATH; do
20919         if test -f "$p/$path" && test -x "$p/$path"; then
20920           new_path="$p/$path"
20921           break
20922         fi
20923       done
20924       IFS="$IFS_save"
20925     else
20926       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CXX (as $path) failed, using $path directly." >&5
20927 $as_echo "$as_me: Resolving CXX (as $path) failed, using $path directly." >&6;}
20928       new_path="$path"
20929     fi
20930 
20931     if test "x$new_path" = x; then
20932         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
20933 $as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
20934         has_space=`$ECHO "$complete" | $GREP " "`
20935         if test "x$has_space" != x; then
20936           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
20937 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
20938         fi
20939         as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
20940       fi
20941   fi
20942 
20943       # Now join together the path and the arguments once again
20944       if test "x$arguments" != xEOL; then
20945         new_complete="$new_path ${arguments% *}"
20946       else
20947         new_complete="$new_path"
20948       fi
20949 
20950   if test "x$complete" != "x$new_complete"; then
20951       CXX="$new_complete"
20952       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXX to \"$new_complete\"" >&5
20953 $as_echo "$as_me: Rewriting CXX to \"$new_complete\"" >&6;}
20954     fi
20955 
20956   { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CXX" >&5
20957 $as_echo_n "checking resolved symbolic links for CXX... " >&6; }
20958   TEST_COMPILER="$CXX"
20959 
20960     if test "x$OPENJDK_BUILD_OS" != xwindows; then
20961         # Follow a chain of symbolic links. Use readlink
20962         # where it exists, else fall back to horribly
20963         # complicated shell code.
20964         if test "x$READLINK_TESTED" != yes; then
20965             # On MacOSX there is a readlink tool with a different
20966             # purpose than the GNU readlink tool. Check the found readlink.
20967             ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
20968             if test "x$ISGNU" = x; then
20969                  # A readlink that we do not know how to use.
20970                  # Are there other non-GNU readlinks out there?
20971                  READLINK_TESTED=yes
20972                  READLINK=
20973             fi
20974         fi
20975 
20976         if test "x$READLINK" != x; then
20977             TEST_COMPILER=`$READLINK -f $TEST_COMPILER`
20978         else
20979             # Save the current directory for restoring afterwards
20980             STARTDIR=$PWD
20981             COUNTER=0
20982             sym_link_dir=`$DIRNAME $TEST_COMPILER`
20983             sym_link_file=`$BASENAME $TEST_COMPILER`
20984             cd $sym_link_dir
20985             # Use -P flag to resolve symlinks in directories.
20986             cd `$THEPWDCMD -P`
20987             sym_link_dir=`$THEPWDCMD -P`
20988             # Resolve file symlinks
20989             while test $COUNTER -lt 20; do
20990                 ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
20991                 if test "x$ISLINK" == x; then
20992                     # This is not a symbolic link! We are done!
20993                     break
20994                 fi
20995                 # Again resolve directory symlinks since the target of the just found
20996                 # link could be in a different directory
20997                 cd `$DIRNAME $ISLINK`
20998                 sym_link_dir=`$THEPWDCMD -P`
20999                 sym_link_file=`$BASENAME $ISLINK`
21000                 let COUNTER=COUNTER+1
21001             done
21002             cd $STARTDIR
21003             TEST_COMPILER=$sym_link_dir/$sym_link_file
21004         fi
21005     fi
21006 
21007   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_COMPILER" >&5
21008 $as_echo "$TEST_COMPILER" >&6; }
21009   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CXX is disguised ccache" >&5
21010 $as_echo_n "checking if CXX is disguised ccache... " >&6; }
21011 
21012   COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"`
21013   if test "x$COMPILER_BASENAME" = "xccache"; then
21014     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5
21015 $as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; }
21016     # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache.
21017     # We want to control ccache invocation ourselves, so ignore this cc and try
21018     # searching again.
21019 
21020     # Remove the path to the fake ccache cc from the PATH
21021     RETRY_COMPILER_SAVED_PATH="$PATH"
21022     COMPILER_DIRNAME=`$DIRNAME $CXX`
21023     PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`"
21024 
21025     # Try again looking for our compiler
21026     if test -n "$ac_tool_prefix"; then
21027   for ac_prog in $COMPILER_CHECK_LIST
21028   do
21029     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
21030 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
21031 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21032 $as_echo_n "checking for $ac_word... " >&6; }
21033 if ${ac_cv_prog_PROPER_COMPILER_CXX+:} false; then :
21034   $as_echo_n "(cached) " >&6
21035 else
21036   if test -n "$PROPER_COMPILER_CXX"; then
21037   ac_cv_prog_PROPER_COMPILER_CXX="$PROPER_COMPILER_CXX" # Let the user override the test.
21038 else
21039 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21040 for as_dir in $PATH
21041 do
21042   IFS=$as_save_IFS
21043   test -z "$as_dir" && as_dir=.
21044     for ac_exec_ext in '' $ac_executable_extensions; do
21045   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
21046     ac_cv_prog_PROPER_COMPILER_CXX="$ac_tool_prefix$ac_prog"
21047     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21048     break 2
21049   fi
21050 done
21051   done
21052 IFS=$as_save_IFS
21053 
21054 fi
21055 fi
21056 PROPER_COMPILER_CXX=$ac_cv_prog_PROPER_COMPILER_CXX
21057 if test -n "$PROPER_COMPILER_CXX"; then
21058   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5
21059 $as_echo "$PROPER_COMPILER_CXX" >&6; }
21060 else
21061   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21062 $as_echo "no" >&6; }
21063 fi
21064 
21065 
21066     test -n "$PROPER_COMPILER_CXX" && break
21067   done
21068 fi
21069 if test -z "$PROPER_COMPILER_CXX"; then
21070   ac_ct_PROPER_COMPILER_CXX=$PROPER_COMPILER_CXX
21071   for ac_prog in $COMPILER_CHECK_LIST
21072 do
21073   # Extract the first word of "$ac_prog", so it can be a program name with args.
21074 set dummy $ac_prog; ac_word=$2
21075 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21076 $as_echo_n "checking for $ac_word... " >&6; }
21077 if ${ac_cv_prog_ac_ct_PROPER_COMPILER_CXX+:} false; then :
21078   $as_echo_n "(cached) " >&6
21079 else
21080   if test -n "$ac_ct_PROPER_COMPILER_CXX"; then
21081   ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_ct_PROPER_COMPILER_CXX" # Let the user override the test.
21082 else
21083 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21084 for as_dir in $PATH
21085 do
21086   IFS=$as_save_IFS
21087   test -z "$as_dir" && as_dir=.
21088     for ac_exec_ext in '' $ac_executable_extensions; do
21089   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
21090     ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_prog"
21091     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21092     break 2
21093   fi
21094 done
21095   done
21096 IFS=$as_save_IFS
21097 
21098 fi
21099 fi
21100 ac_ct_PROPER_COMPILER_CXX=$ac_cv_prog_ac_ct_PROPER_COMPILER_CXX
21101 if test -n "$ac_ct_PROPER_COMPILER_CXX"; then
21102   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CXX" >&5
21103 $as_echo "$ac_ct_PROPER_COMPILER_CXX" >&6; }
21104 else
21105   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21106 $as_echo "no" >&6; }
21107 fi
21108 
21109 
21110   test -n "$ac_ct_PROPER_COMPILER_CXX" && break
21111 done
21112 
21113   if test "x$ac_ct_PROPER_COMPILER_CXX" = x; then
21114     PROPER_COMPILER_CXX=""
21115   else
21116     case $cross_compiling:$ac_tool_warned in
21117 yes:)
21118 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
21119 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
21120 ac_tool_warned=yes ;;
21121 esac
21122     PROPER_COMPILER_CXX=$ac_ct_PROPER_COMPILER_CXX
21123   fi
21124 fi
21125 
21126 
21127   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21128 
21129   # First separate the path from the arguments. This will split at the first
21130   # space.
21131   complete="$PROPER_COMPILER_CXX"
21132   path="${complete%% *}"
21133   tmp="$complete EOL"
21134   arguments="${tmp#* }"
21135 
21136   # Input might be given as Windows format, start by converting to
21137   # unix format.
21138   new_path=`$CYGPATH -u "$path"`
21139 
21140   # Now try to locate executable using which
21141   new_path=`$WHICH "$new_path" 2> /dev/null`
21142   # bat and cmd files are not always considered executable in cygwin causing which
21143   # to not find them
21144   if test "x$new_path" = x \
21145            && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21146            && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21147     new_path=`$CYGPATH -u "$path"`
21148   fi
21149   if test "x$new_path" = x; then
21150     # Oops. Which didn't find the executable.
21151     # The splitting of arguments from the executable at a space might have been incorrect,
21152     # since paths with space are more likely in Windows. Give it another try with the whole
21153     # argument.
21154     path="$complete"
21155     arguments="EOL"
21156     new_path=`$CYGPATH -u "$path"`
21157     new_path=`$WHICH "$new_path" 2> /dev/null`
21158     # bat and cmd files are not always considered executable in cygwin causing which
21159     # to not find them
21160     if test "x$new_path" = x \
21161              && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21162              && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21163       new_path=`$CYGPATH -u "$path"`
21164     fi
21165     if test "x$new_path" = x; then
21166       # It's still not found. Now this is an unrecoverable error.
21167       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
21168 $as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
21169       has_space=`$ECHO "$complete" | $GREP " "`
21170       if test "x$has_space" != x; then
21171         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21172 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21173       fi
21174       as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
21175     fi
21176   fi
21177 
21178   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21179   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21180   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21181   # "foo.exe" is OK but "foo" is an error.
21182   #
21183   # This test is therefore slightly more accurate than "test -f" to check for file precense.
21184   # It is also a way to make sure we got the proper file name for the real test later on.
21185   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21186   if test "x$test_shortpath" = x; then
21187     # Short path failed, file does not exist as specified.
21188     # Try adding .exe or .cmd
21189     if test -f "${new_path}.exe"; then
21190        input_to_shortpath="${new_path}.exe"
21191     elif test -f "${new_path}.cmd"; then
21192        input_to_shortpath="${new_path}.cmd"
21193     else
21194       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&5
21195 $as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&6;}
21196       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
21197 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
21198       as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
21199     fi
21200   else
21201     input_to_shortpath="$new_path"
21202   fi
21203 
21204   # Call helper function which possibly converts this using DOS-style short mode.
21205   # If so, the updated path is stored in $new_path.
21206   new_path="$input_to_shortpath"
21207 
21208   input_path="$input_to_shortpath"
21209   # Check if we need to convert this using DOS-style short mode. If the path
21210   # contains just simple characters, use it. Otherwise (spaces, weird characters),
21211   # take no chances and rewrite it.
21212   # Note: m4 eats our [], so we need to use [ and ] instead.
21213   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21214   if test "x$has_forbidden_chars" != x; then
21215     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21216     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21217     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21218     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21219       # Going to short mode and back again did indeed matter. Since short mode is
21220       # case insensitive, let's make it lowercase to improve readability.
21221       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21222       # Now convert it back to Unix-stile (cygpath)
21223       input_path=`$CYGPATH -u "$shortmode_path"`
21224       new_path="$input_path"
21225     fi
21226   fi
21227 
21228   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21229   if test "x$test_cygdrive_prefix" = x; then
21230     # As a simple fix, exclude /usr/bin since it's not a real path.
21231     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
21232       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21233       # a path prefixed by /cygdrive for fixpath to work.
21234       new_path="$CYGWIN_ROOT_PATH$input_path"
21235     fi
21236   fi
21237 
21238   # remove trailing .exe if any
21239   new_path="${new_path/%.exe/}"
21240 
21241   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21242 
21243   # First separate the path from the arguments. This will split at the first
21244   # space.
21245   complete="$PROPER_COMPILER_CXX"
21246   path="${complete%% *}"
21247   tmp="$complete EOL"
21248   arguments="${tmp#* }"
21249 
21250   # Input might be given as Windows format, start by converting to
21251   # unix format.
21252   new_path="$path"
21253 
21254   windows_path="$new_path"
21255   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21256     unix_path=`$CYGPATH -u "$windows_path"`
21257     new_path="$unix_path"
21258   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21259     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21260     new_path="$unix_path"
21261   fi
21262 
21263 
21264   # Now try to locate executable using which
21265   new_path=`$WHICH "$new_path" 2> /dev/null`
21266 
21267   if test "x$new_path" = x; then
21268     # Oops. Which didn't find the executable.
21269     # The splitting of arguments from the executable at a space might have been incorrect,
21270     # since paths with space are more likely in Windows. Give it another try with the whole
21271     # argument.
21272     path="$complete"
21273     arguments="EOL"
21274     new_path="$path"
21275 
21276   windows_path="$new_path"
21277   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21278     unix_path=`$CYGPATH -u "$windows_path"`
21279     new_path="$unix_path"
21280   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21281     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21282     new_path="$unix_path"
21283   fi
21284 
21285 
21286     new_path=`$WHICH "$new_path" 2> /dev/null`
21287 
21288     if test "x$new_path" = x; then
21289       # It's still not found. Now this is an unrecoverable error.
21290       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
21291 $as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
21292       has_space=`$ECHO "$complete" | $GREP " "`
21293       if test "x$has_space" != x; then
21294         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21295 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21296       fi
21297       as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
21298     fi
21299   fi
21300 
21301   # Now new_path has a complete unix path to the binary
21302   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
21303     # Keep paths in /bin as-is, but remove trailing .exe if any
21304     new_path="${new_path/%.exe/}"
21305     # Do not save /bin paths to all_fixpath_prefixes!
21306   else
21307     # Not in mixed or Windows style, start by that.
21308     new_path=`cmd //c echo $new_path`
21309 
21310   input_path="$new_path"
21311   # Check if we need to convert this using DOS-style short mode. If the path
21312   # contains just simple characters, use it. Otherwise (spaces, weird characters),
21313   # take no chances and rewrite it.
21314   # Note: m4 eats our [], so we need to use [ and ] instead.
21315   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21316   if test "x$has_forbidden_chars" != x; then
21317     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21318     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21319   fi
21320 
21321     # Output is in $new_path
21322 
21323   windows_path="$new_path"
21324   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21325     unix_path=`$CYGPATH -u "$windows_path"`
21326     new_path="$unix_path"
21327   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21328     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21329     new_path="$unix_path"
21330   fi
21331 
21332     # remove trailing .exe if any
21333     new_path="${new_path/%.exe/}"
21334 
21335     # Save the first 10 bytes of this path to the storage, so fixpath can work.
21336     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21337   fi
21338 
21339   else
21340     # We're on a posix platform. Hooray! :)
21341     # First separate the path from the arguments. This will split at the first
21342     # space.
21343     complete="$PROPER_COMPILER_CXX"
21344     path="${complete%% *}"
21345     tmp="$complete EOL"
21346     arguments="${tmp#* }"
21347 
21348     # Cannot rely on the command "which" here since it doesn't always work.
21349     is_absolute_path=`$ECHO "$path" | $GREP ^/`
21350     if test -z "$is_absolute_path"; then
21351       # Path to executable is not absolute. Find it.
21352       IFS_save="$IFS"
21353       IFS=:
21354       for p in $PATH; do
21355         if test -f "$p/$path" && test -x "$p/$path"; then
21356           new_path="$p/$path"
21357           break
21358         fi
21359       done
21360       IFS="$IFS_save"
21361     else
21362       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving PROPER_COMPILER_CXX (as $path) failed, using $path directly." >&5
21363 $as_echo "$as_me: Resolving PROPER_COMPILER_CXX (as $path) failed, using $path directly." >&6;}
21364       new_path="$path"
21365     fi
21366 
21367     if test "x$new_path" = x; then
21368         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
21369 $as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
21370         has_space=`$ECHO "$complete" | $GREP " "`
21371         if test "x$has_space" != x; then
21372           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
21373 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
21374         fi
21375         as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
21376       fi
21377   fi
21378 
21379       # Now join together the path and the arguments once again
21380       if test "x$arguments" != xEOL; then
21381         new_complete="$new_path ${arguments% *}"
21382       else
21383         new_complete="$new_path"
21384       fi
21385 
21386   if test "x$complete" != "x$new_complete"; then
21387       PROPER_COMPILER_CXX="$new_complete"
21388       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&5
21389 $as_echo "$as_me: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&6;}
21390     fi
21391 
21392     PATH="$RETRY_COMPILER_SAVED_PATH"
21393 
21394     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CXX" >&5
21395 $as_echo_n "checking for resolved symbolic links for CXX... " >&6; }
21396 
21397     if test "x$OPENJDK_BUILD_OS" != xwindows; then
21398         # Follow a chain of symbolic links. Use readlink
21399         # where it exists, else fall back to horribly
21400         # complicated shell code.
21401         if test "x$READLINK_TESTED" != yes; then
21402             # On MacOSX there is a readlink tool with a different
21403             # purpose than the GNU readlink tool. Check the found readlink.
21404             ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
21405             if test "x$ISGNU" = x; then
21406                  # A readlink that we do not know how to use.
21407                  # Are there other non-GNU readlinks out there?
21408                  READLINK_TESTED=yes
21409                  READLINK=
21410             fi
21411         fi
21412 
21413         if test "x$READLINK" != x; then
21414             PROPER_COMPILER_CXX=`$READLINK -f $PROPER_COMPILER_CXX`
21415         else
21416             # Save the current directory for restoring afterwards
21417             STARTDIR=$PWD
21418             COUNTER=0
21419             sym_link_dir=`$DIRNAME $PROPER_COMPILER_CXX`
21420             sym_link_file=`$BASENAME $PROPER_COMPILER_CXX`
21421             cd $sym_link_dir
21422             # Use -P flag to resolve symlinks in directories.
21423             cd `$THEPWDCMD -P`
21424             sym_link_dir=`$THEPWDCMD -P`
21425             # Resolve file symlinks
21426             while test $COUNTER -lt 20; do
21427                 ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
21428                 if test "x$ISLINK" == x; then
21429                     # This is not a symbolic link! We are done!
21430                     break
21431                 fi
21432                 # Again resolve directory symlinks since the target of the just found
21433                 # link could be in a different directory
21434                 cd `$DIRNAME $ISLINK`
21435                 sym_link_dir=`$THEPWDCMD -P`
21436                 sym_link_file=`$BASENAME $ISLINK`
21437                 let COUNTER=COUNTER+1
21438             done
21439             cd $STARTDIR
21440             PROPER_COMPILER_CXX=$sym_link_dir/$sym_link_file
21441         fi
21442     fi
21443 
21444     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5
21445 $as_echo "$PROPER_COMPILER_CXX" >&6; }
21446     CXX="$PROPER_COMPILER_CXX"
21447   else
21448     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CXX" >&5
21449 $as_echo "no, keeping CXX" >&6; }
21450     CXX="$TEST_COMPILER"
21451   fi
21452 
21453   COMPILER=$CXX
21454   COMPILER_NAME=$COMPILER_NAME
21455 
21456   if test "x$OPENJDK_TARGET_OS" = xsolaris; then
21457     # Make sure we use the Sun Studio compiler and not gcc on Solaris, which won't work
21458     COMPILER_VERSION_TEST=`$COMPILER -V 2>&1 | $HEAD -n 1`
21459     $ECHO $COMPILER_VERSION_TEST | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
21460     if test $? -ne 0; then
21461       GCC_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
21462 
21463       { $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
21464 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required Sun Studio compiler." >&6;}
21465       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&5
21466 $as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&6;}
21467       as_fn_error $? "Sun Studio compiler is required. Try setting --with-tools-dir." "$LINENO" 5
21468     else
21469       COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/p"`
21470       COMPILER_VENDOR="Sun Studio"
21471     fi
21472   elif test  "x$OPENJDK_TARGET_OS" = xwindows; then
21473     # First line typically looks something like:
21474     # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.30319.01 for 80x86
21475     COMPILER_VERSION_TEST=`$COMPILER 2>&1 | $HEAD -n 1`
21476     COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*Version \([1-9][0-9.]*\) .*/\1/p"`
21477     COMPILER_VENDOR="Microsoft CL.EXE"
21478     COMPILER_CPU_TEST=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* for \(.*\)$/\1/p"`
21479     if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
21480       if test "x$COMPILER_CPU_TEST" != "x80x86"; then
21481         as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"80x86\"." "$LINENO" 5
21482       fi
21483     elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
21484       if test "x$COMPILER_CPU_TEST" != "xx64"; then
21485         as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." "$LINENO" 5
21486       fi
21487     fi
21488   else
21489     COMPILER_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
21490     # Check that this is likely to be GCC.
21491     $COMPILER --version 2>&1 | $GREP "Free Software Foundation" > /dev/null
21492     if test $? -ne 0; then
21493       { $as_echo "$as_me:${as_lineno-$LINENO}: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&5
21494 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&6;}
21495       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&5
21496 $as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&6;}
21497       as_fn_error $? "GCC compiler is required. Try setting --with-tools-dir." "$LINENO" 5
21498     fi
21499 
21500     # First line typically looks something like:
21501     # gcc (Ubuntu/Linaro 4.5.2-8ubuntu4) 4.5.2
21502     COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* \([1-9][0-9.]*\)/\1/p"`
21503     COMPILER_VENDOR=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^\(.*\) [1-9][0-9.]*/\1/p"`
21504   fi
21505   # This sets CC_VERSION or CXX_VERSION. (This comment is a grep marker)
21506   CXX_VERSION="$COMPILER_VERSION"
21507   # This sets CC_VENDOR or CXX_VENDOR. (This comment is a grep marker)
21508   CXX_VENDOR="$COMPILER_VENDOR"
21509 
21510   { $as_echo "$as_me:${as_lineno-$LINENO}: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&5
21511 $as_echo "$as_me: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&6;}
21512 
21513 
21514 # Now that we have resolved CXX ourself, let autoconf have its go at it
21515 ac_ext=cpp
21516 ac_cpp='$CXXCPP $CPPFLAGS'
21517 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
21518 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
21519 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
21520 if test -z "$CXX"; then
21521   if test -n "$CCC"; then
21522     CXX=$CCC
21523   else
21524     if test -n "$ac_tool_prefix"; then
21525   for ac_prog in $CXX
21526   do
21527     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
21528 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
21529 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21530 $as_echo_n "checking for $ac_word... " >&6; }
21531 if ${ac_cv_prog_CXX+:} false; then :
21532   $as_echo_n "(cached) " >&6
21533 else
21534   if test -n "$CXX"; then
21535   ac_cv_prog_CXX="$CXX" # Let the user override the test.
21536 else
21537 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21538 for as_dir in $PATH
21539 do
21540   IFS=$as_save_IFS
21541   test -z "$as_dir" && as_dir=.
21542     for ac_exec_ext in '' $ac_executable_extensions; do
21543   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
21544     ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
21545     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21546     break 2
21547   fi
21548 done
21549   done
21550 IFS=$as_save_IFS
21551 
21552 fi
21553 fi
21554 CXX=$ac_cv_prog_CXX
21555 if test -n "$CXX"; then
21556   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
21557 $as_echo "$CXX" >&6; }
21558 else
21559   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21560 $as_echo "no" >&6; }
21561 fi
21562 
21563 
21564     test -n "$CXX" && break
21565   done
21566 fi
21567 if test -z "$CXX"; then
21568   ac_ct_CXX=$CXX
21569   for ac_prog in $CXX
21570 do
21571   # Extract the first word of "$ac_prog", so it can be a program name with args.
21572 set dummy $ac_prog; ac_word=$2
21573 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21574 $as_echo_n "checking for $ac_word... " >&6; }
21575 if ${ac_cv_prog_ac_ct_CXX+:} false; then :
21576   $as_echo_n "(cached) " >&6
21577 else
21578   if test -n "$ac_ct_CXX"; then
21579   ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
21580 else
21581 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21582 for as_dir in $PATH
21583 do
21584   IFS=$as_save_IFS
21585   test -z "$as_dir" && as_dir=.
21586     for ac_exec_ext in '' $ac_executable_extensions; do
21587   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
21588     ac_cv_prog_ac_ct_CXX="$ac_prog"
21589     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21590     break 2
21591   fi
21592 done
21593   done
21594 IFS=$as_save_IFS
21595 
21596 fi
21597 fi
21598 ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
21599 if test -n "$ac_ct_CXX"; then
21600   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
21601 $as_echo "$ac_ct_CXX" >&6; }
21602 else
21603   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21604 $as_echo "no" >&6; }
21605 fi
21606 
21607 
21608   test -n "$ac_ct_CXX" && break
21609 done
21610 
21611   if test "x$ac_ct_CXX" = x; then
21612     CXX="g++"
21613   else
21614     case $cross_compiling:$ac_tool_warned in
21615 yes:)
21616 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
21617 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
21618 ac_tool_warned=yes ;;
21619 esac
21620     CXX=$ac_ct_CXX
21621   fi
21622 fi
21623 
21624   fi
21625 fi
21626 # Provide some information about the compiler.
21627 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
21628 set X $ac_compile
21629 ac_compiler=$2
21630 for ac_option in --version -v -V -qversion; do
21631   { { ac_try="$ac_compiler $ac_option >&5"
21632 case "(($ac_try" in
21633   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21634   *) ac_try_echo=$ac_try;;
21635 esac
21636 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
21637 $as_echo "$ac_try_echo"; } >&5
21638   (eval "$ac_compiler $ac_option >&5") 2>conftest.err
21639   ac_status=$?
21640   if test -s conftest.err; then
21641     sed '10a\
21642 ... rest of stderr output deleted ...
21643          10q' conftest.err >conftest.er1
21644     cat conftest.er1 >&5
21645   fi
21646   rm -f conftest.er1 conftest.err
21647   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
21648   test $ac_status = 0; }
21649 done
21650 
21651 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
21652 $as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
21653 if ${ac_cv_cxx_compiler_gnu+:} false; then :
21654   $as_echo_n "(cached) " >&6
21655 else
21656   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21657 /* end confdefs.h.  */
21658 
21659 int
21660 main ()
21661 {
21662 #ifndef __GNUC__
21663        choke me
21664 #endif
21665 
21666   ;
21667   return 0;
21668 }
21669 _ACEOF
21670 if ac_fn_cxx_try_compile "$LINENO"; then :
21671   ac_compiler_gnu=yes
21672 else
21673   ac_compiler_gnu=no
21674 fi
21675 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21676 ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
21677 
21678 fi
21679 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
21680 $as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
21681 if test $ac_compiler_gnu = yes; then
21682   GXX=yes
21683 else
21684   GXX=
21685 fi
21686 ac_test_CXXFLAGS=${CXXFLAGS+set}
21687 ac_save_CXXFLAGS=$CXXFLAGS
21688 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
21689 $as_echo_n "checking whether $CXX accepts -g... " >&6; }
21690 if ${ac_cv_prog_cxx_g+:} false; then :
21691   $as_echo_n "(cached) " >&6
21692 else
21693   ac_save_cxx_werror_flag=$ac_cxx_werror_flag
21694    ac_cxx_werror_flag=yes
21695    ac_cv_prog_cxx_g=no
21696    CXXFLAGS="-g"
21697    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21698 /* end confdefs.h.  */
21699 
21700 int
21701 main ()
21702 {
21703 
21704   ;
21705   return 0;
21706 }
21707 _ACEOF
21708 if ac_fn_cxx_try_compile "$LINENO"; then :
21709   ac_cv_prog_cxx_g=yes
21710 else
21711   CXXFLAGS=""
21712       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21713 /* end confdefs.h.  */
21714 
21715 int
21716 main ()
21717 {
21718 
21719   ;
21720   return 0;
21721 }
21722 _ACEOF
21723 if ac_fn_cxx_try_compile "$LINENO"; then :
21724 
21725 else
21726   ac_cxx_werror_flag=$ac_save_cxx_werror_flag
21727          CXXFLAGS="-g"
21728          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21729 /* end confdefs.h.  */
21730 
21731 int
21732 main ()
21733 {
21734 
21735   ;
21736   return 0;
21737 }
21738 _ACEOF
21739 if ac_fn_cxx_try_compile "$LINENO"; then :
21740   ac_cv_prog_cxx_g=yes
21741 fi
21742 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21743 fi
21744 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21745 fi
21746 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21747    ac_cxx_werror_flag=$ac_save_cxx_werror_flag
21748 fi
21749 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
21750 $as_echo "$ac_cv_prog_cxx_g" >&6; }
21751 if test "$ac_test_CXXFLAGS" = set; then
21752   CXXFLAGS=$ac_save_CXXFLAGS
21753 elif test $ac_cv_prog_cxx_g = yes; then
21754   if test "$GXX" = yes; then
21755     CXXFLAGS="-g -O2"
21756   else
21757     CXXFLAGS="-g"
21758   fi
21759 else
21760   if test "$GXX" = yes; then
21761     CXXFLAGS="-O2"
21762   else
21763     CXXFLAGS=
21764   fi
21765 fi
21766 ac_ext=cpp
21767 ac_cpp='$CXXCPP $CPPFLAGS'
21768 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
21769 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
21770 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
21771 
21772 
21773 ### Locate other tools
21774 
21775 if test "x$OPENJDK_TARGET_OS" = xmacosx; then
21776     ac_ext=m
21777 ac_cpp='$OBJCPP $CPPFLAGS'
21778 ac_compile='$OBJC -c $OBJCFLAGS $CPPFLAGS conftest.$ac_ext >&5'
21779 ac_link='$OBJC -o conftest$ac_exeext $OBJCFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
21780 ac_compiler_gnu=$ac_cv_objc_compiler_gnu
21781 if test -n "$ac_tool_prefix"; then
21782   for ac_prog in gcc objcc objc cc CC
21783   do
21784     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
21785 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
21786 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21787 $as_echo_n "checking for $ac_word... " >&6; }
21788 if ${ac_cv_prog_OBJC+:} false; then :
21789   $as_echo_n "(cached) " >&6
21790 else
21791   if test -n "$OBJC"; then
21792   ac_cv_prog_OBJC="$OBJC" # Let the user override the test.
21793 else
21794 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21795 for as_dir in $PATH
21796 do
21797   IFS=$as_save_IFS
21798   test -z "$as_dir" && as_dir=.
21799     for ac_exec_ext in '' $ac_executable_extensions; do
21800   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
21801     ac_cv_prog_OBJC="$ac_tool_prefix$ac_prog"
21802     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21803     break 2
21804   fi
21805 done
21806   done
21807 IFS=$as_save_IFS
21808 
21809 fi
21810 fi
21811 OBJC=$ac_cv_prog_OBJC
21812 if test -n "$OBJC"; then
21813   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJC" >&5
21814 $as_echo "$OBJC" >&6; }
21815 else
21816   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21817 $as_echo "no" >&6; }
21818 fi
21819 
21820 
21821     test -n "$OBJC" && break
21822   done
21823 fi
21824 if test -z "$OBJC"; then
21825   ac_ct_OBJC=$OBJC
21826   for ac_prog in gcc objcc objc cc CC
21827 do
21828   # Extract the first word of "$ac_prog", so it can be a program name with args.
21829 set dummy $ac_prog; ac_word=$2
21830 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21831 $as_echo_n "checking for $ac_word... " >&6; }
21832 if ${ac_cv_prog_ac_ct_OBJC+:} false; then :
21833   $as_echo_n "(cached) " >&6
21834 else
21835   if test -n "$ac_ct_OBJC"; then
21836   ac_cv_prog_ac_ct_OBJC="$ac_ct_OBJC" # Let the user override the test.
21837 else
21838 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21839 for as_dir in $PATH
21840 do
21841   IFS=$as_save_IFS
21842   test -z "$as_dir" && as_dir=.
21843     for ac_exec_ext in '' $ac_executable_extensions; do
21844   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
21845     ac_cv_prog_ac_ct_OBJC="$ac_prog"
21846     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21847     break 2
21848   fi
21849 done
21850   done
21851 IFS=$as_save_IFS
21852 
21853 fi
21854 fi
21855 ac_ct_OBJC=$ac_cv_prog_ac_ct_OBJC
21856 if test -n "$ac_ct_OBJC"; then
21857   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJC" >&5
21858 $as_echo "$ac_ct_OBJC" >&6; }
21859 else
21860   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21861 $as_echo "no" >&6; }
21862 fi
21863 
21864 
21865   test -n "$ac_ct_OBJC" && break
21866 done
21867 
21868   if test "x$ac_ct_OBJC" = x; then
21869     OBJC="gcc"
21870   else
21871     case $cross_compiling:$ac_tool_warned in
21872 yes:)
21873 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
21874 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
21875 ac_tool_warned=yes ;;
21876 esac
21877     OBJC=$ac_ct_OBJC
21878   fi
21879 fi
21880 
21881 # Provide some information about the compiler.
21882 $as_echo "$as_me:${as_lineno-$LINENO}: checking for Objective C compiler version" >&5
21883 set X $ac_compile
21884 ac_compiler=$2
21885 for ac_option in --version -v -V -qversion; do
21886   { { ac_try="$ac_compiler $ac_option >&5"
21887 case "(($ac_try" in
21888   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21889   *) ac_try_echo=$ac_try;;
21890 esac
21891 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
21892 $as_echo "$ac_try_echo"; } >&5
21893   (eval "$ac_compiler $ac_option >&5") 2>conftest.err
21894   ac_status=$?
21895   if test -s conftest.err; then
21896     sed '10a\
21897 ... rest of stderr output deleted ...
21898          10q' conftest.err >conftest.er1
21899     cat conftest.er1 >&5
21900   fi
21901   rm -f conftest.er1 conftest.err
21902   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
21903   test $ac_status = 0; }
21904 done
21905 
21906 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU Objective C compiler" >&5
21907 $as_echo_n "checking whether we are using the GNU Objective C compiler... " >&6; }
21908 if ${ac_cv_objc_compiler_gnu+:} false; then :
21909   $as_echo_n "(cached) " >&6
21910 else
21911   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21912 /* end confdefs.h.  */
21913 
21914 int
21915 main ()
21916 {
21917 #ifndef __GNUC__
21918        choke me
21919 #endif
21920 
21921   ;
21922   return 0;
21923 }
21924 _ACEOF
21925 if ac_fn_objc_try_compile "$LINENO"; then :
21926   ac_compiler_gnu=yes
21927 else
21928   ac_compiler_gnu=no
21929 fi
21930 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21931 ac_cv_objc_compiler_gnu=$ac_compiler_gnu
21932 
21933 fi
21934 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objc_compiler_gnu" >&5
21935 $as_echo "$ac_cv_objc_compiler_gnu" >&6; }
21936 if test $ac_compiler_gnu = yes; then
21937   GOBJC=yes
21938 else
21939   GOBJC=
21940 fi
21941 ac_test_OBJCFLAGS=${OBJCFLAGS+set}
21942 ac_save_OBJCFLAGS=$OBJCFLAGS
21943 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $OBJC accepts -g" >&5
21944 $as_echo_n "checking whether $OBJC accepts -g... " >&6; }
21945 if ${ac_cv_prog_objc_g+:} false; then :
21946   $as_echo_n "(cached) " >&6
21947 else
21948   ac_save_objc_werror_flag=$ac_objc_werror_flag
21949    ac_objc_werror_flag=yes
21950    ac_cv_prog_objc_g=no
21951    OBJCFLAGS="-g"
21952    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21953 /* end confdefs.h.  */
21954 
21955 int
21956 main ()
21957 {
21958 
21959   ;
21960   return 0;
21961 }
21962 _ACEOF
21963 if ac_fn_objc_try_compile "$LINENO"; then :
21964   ac_cv_prog_objc_g=yes
21965 else
21966   OBJCFLAGS=""
21967       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21968 /* end confdefs.h.  */
21969 
21970 int
21971 main ()
21972 {
21973 
21974   ;
21975   return 0;
21976 }
21977 _ACEOF
21978 if ac_fn_objc_try_compile "$LINENO"; then :
21979 
21980 else
21981   ac_objc_werror_flag=$ac_save_objc_werror_flag
21982          OBJCFLAGS="-g"
21983          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21984 /* end confdefs.h.  */
21985 
21986 int
21987 main ()
21988 {
21989 
21990   ;
21991   return 0;
21992 }
21993 _ACEOF
21994 if ac_fn_objc_try_compile "$LINENO"; then :
21995   ac_cv_prog_objc_g=yes
21996 fi
21997 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21998 fi
21999 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22000 fi
22001 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22002    ac_objc_werror_flag=$ac_save_objc_werror_flag
22003 fi
22004 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_objc_g" >&5
22005 $as_echo "$ac_cv_prog_objc_g" >&6; }
22006 if test "$ac_test_OBJCFLAGS" = set; then
22007   OBJCFLAGS=$ac_save_OBJCFLAGS
22008 elif test $ac_cv_prog_objc_g = yes; then
22009   if test "$GOBJC" = yes; then
22010     OBJCFLAGS="-g -O2"
22011   else
22012     OBJCFLAGS="-g"
22013   fi
22014 else
22015   if test "$GOBJC" = yes; then
22016     OBJCFLAGS="-O2"
22017   else
22018     OBJCFLAGS=
22019   fi
22020 fi
22021 ac_ext=cpp
22022 ac_cpp='$CXXCPP $CPPFLAGS'
22023 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
22024 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
22025 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
22026 
22027 
22028   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22029 
22030   # First separate the path from the arguments. This will split at the first
22031   # space.
22032   complete="$OBJC"
22033   path="${complete%% *}"
22034   tmp="$complete EOL"
22035   arguments="${tmp#* }"
22036 
22037   # Input might be given as Windows format, start by converting to
22038   # unix format.
22039   new_path=`$CYGPATH -u "$path"`
22040 
22041   # Now try to locate executable using which
22042   new_path=`$WHICH "$new_path" 2> /dev/null`
22043   # bat and cmd files are not always considered executable in cygwin causing which
22044   # to not find them
22045   if test "x$new_path" = x \
22046            && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22047            && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22048     new_path=`$CYGPATH -u "$path"`
22049   fi
22050   if test "x$new_path" = x; then
22051     # Oops. Which didn't find the executable.
22052     # The splitting of arguments from the executable at a space might have been incorrect,
22053     # since paths with space are more likely in Windows. Give it another try with the whole
22054     # argument.
22055     path="$complete"
22056     arguments="EOL"
22057     new_path=`$CYGPATH -u "$path"`
22058     new_path=`$WHICH "$new_path" 2> /dev/null`
22059     # bat and cmd files are not always considered executable in cygwin causing which
22060     # to not find them
22061     if test "x$new_path" = x \
22062              && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22063              && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22064       new_path=`$CYGPATH -u "$path"`
22065     fi
22066     if test "x$new_path" = x; then
22067       # It's still not found. Now this is an unrecoverable error.
22068       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
22069 $as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
22070       has_space=`$ECHO "$complete" | $GREP " "`
22071       if test "x$has_space" != x; then
22072         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22073 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22074       fi
22075       as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
22076     fi
22077   fi
22078 
22079   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22080   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22081   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22082   # "foo.exe" is OK but "foo" is an error.
22083   #
22084   # This test is therefore slightly more accurate than "test -f" to check for file precense.
22085   # It is also a way to make sure we got the proper file name for the real test later on.
22086   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22087   if test "x$test_shortpath" = x; then
22088     # Short path failed, file does not exist as specified.
22089     # Try adding .exe or .cmd
22090     if test -f "${new_path}.exe"; then
22091        input_to_shortpath="${new_path}.exe"
22092     elif test -f "${new_path}.cmd"; then
22093        input_to_shortpath="${new_path}.cmd"
22094     else
22095       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$new_path\", is invalid." >&5
22096 $as_echo "$as_me: The path of OBJC, which resolves as \"$new_path\", is invalid." >&6;}
22097       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
22098 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
22099       as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
22100     fi
22101   else
22102     input_to_shortpath="$new_path"
22103   fi
22104 
22105   # Call helper function which possibly converts this using DOS-style short mode.
22106   # If so, the updated path is stored in $new_path.
22107   new_path="$input_to_shortpath"
22108 
22109   input_path="$input_to_shortpath"
22110   # Check if we need to convert this using DOS-style short mode. If the path
22111   # contains just simple characters, use it. Otherwise (spaces, weird characters),
22112   # take no chances and rewrite it.
22113   # Note: m4 eats our [], so we need to use [ and ] instead.
22114   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22115   if test "x$has_forbidden_chars" != x; then
22116     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22117     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22118     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22119     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22120       # Going to short mode and back again did indeed matter. Since short mode is
22121       # case insensitive, let's make it lowercase to improve readability.
22122       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22123       # Now convert it back to Unix-stile (cygpath)
22124       input_path=`$CYGPATH -u "$shortmode_path"`
22125       new_path="$input_path"
22126     fi
22127   fi
22128 
22129   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22130   if test "x$test_cygdrive_prefix" = x; then
22131     # As a simple fix, exclude /usr/bin since it's not a real path.
22132     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
22133       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22134       # a path prefixed by /cygdrive for fixpath to work.
22135       new_path="$CYGWIN_ROOT_PATH$input_path"
22136     fi
22137   fi
22138 
22139   # remove trailing .exe if any
22140   new_path="${new_path/%.exe/}"
22141 
22142   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22143 
22144   # First separate the path from the arguments. This will split at the first
22145   # space.
22146   complete="$OBJC"
22147   path="${complete%% *}"
22148   tmp="$complete EOL"
22149   arguments="${tmp#* }"
22150 
22151   # Input might be given as Windows format, start by converting to
22152   # unix format.
22153   new_path="$path"
22154 
22155   windows_path="$new_path"
22156   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22157     unix_path=`$CYGPATH -u "$windows_path"`
22158     new_path="$unix_path"
22159   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22160     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22161     new_path="$unix_path"
22162   fi
22163 
22164 
22165   # Now try to locate executable using which
22166   new_path=`$WHICH "$new_path" 2> /dev/null`
22167 
22168   if test "x$new_path" = x; then
22169     # Oops. Which didn't find the executable.
22170     # The splitting of arguments from the executable at a space might have been incorrect,
22171     # since paths with space are more likely in Windows. Give it another try with the whole
22172     # argument.
22173     path="$complete"
22174     arguments="EOL"
22175     new_path="$path"
22176 
22177   windows_path="$new_path"
22178   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22179     unix_path=`$CYGPATH -u "$windows_path"`
22180     new_path="$unix_path"
22181   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22182     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22183     new_path="$unix_path"
22184   fi
22185 
22186 
22187     new_path=`$WHICH "$new_path" 2> /dev/null`
22188 
22189     if test "x$new_path" = x; then
22190       # It's still not found. Now this is an unrecoverable error.
22191       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
22192 $as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
22193       has_space=`$ECHO "$complete" | $GREP " "`
22194       if test "x$has_space" != x; then
22195         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22196 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22197       fi
22198       as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
22199     fi
22200   fi
22201 
22202   # Now new_path has a complete unix path to the binary
22203   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
22204     # Keep paths in /bin as-is, but remove trailing .exe if any
22205     new_path="${new_path/%.exe/}"
22206     # Do not save /bin paths to all_fixpath_prefixes!
22207   else
22208     # Not in mixed or Windows style, start by that.
22209     new_path=`cmd //c echo $new_path`
22210 
22211   input_path="$new_path"
22212   # Check if we need to convert this using DOS-style short mode. If the path
22213   # contains just simple characters, use it. Otherwise (spaces, weird characters),
22214   # take no chances and rewrite it.
22215   # Note: m4 eats our [], so we need to use [ and ] instead.
22216   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22217   if test "x$has_forbidden_chars" != x; then
22218     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22219     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22220   fi
22221 
22222     # Output is in $new_path
22223 
22224   windows_path="$new_path"
22225   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22226     unix_path=`$CYGPATH -u "$windows_path"`
22227     new_path="$unix_path"
22228   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22229     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22230     new_path="$unix_path"
22231   fi
22232 
22233     # remove trailing .exe if any
22234     new_path="${new_path/%.exe/}"
22235 
22236     # Save the first 10 bytes of this path to the storage, so fixpath can work.
22237     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22238   fi
22239 
22240   else
22241     # We're on a posix platform. Hooray! :)
22242     # First separate the path from the arguments. This will split at the first
22243     # space.
22244     complete="$OBJC"
22245     path="${complete%% *}"
22246     tmp="$complete EOL"
22247     arguments="${tmp#* }"
22248 
22249     # Cannot rely on the command "which" here since it doesn't always work.
22250     is_absolute_path=`$ECHO "$path" | $GREP ^/`
22251     if test -z "$is_absolute_path"; then
22252       # Path to executable is not absolute. Find it.
22253       IFS_save="$IFS"
22254       IFS=:
22255       for p in $PATH; do
22256         if test -f "$p/$path" && test -x "$p/$path"; then
22257           new_path="$p/$path"
22258           break
22259         fi
22260       done
22261       IFS="$IFS_save"
22262     else
22263       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving OBJC (as $path) failed, using $path directly." >&5
22264 $as_echo "$as_me: Resolving OBJC (as $path) failed, using $path directly." >&6;}
22265       new_path="$path"
22266     fi
22267 
22268     if test "x$new_path" = x; then
22269         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
22270 $as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
22271         has_space=`$ECHO "$complete" | $GREP " "`
22272         if test "x$has_space" != x; then
22273           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
22274 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
22275         fi
22276         as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
22277       fi
22278   fi
22279 
22280       # Now join together the path and the arguments once again
22281       if test "x$arguments" != xEOL; then
22282         new_complete="$new_path ${arguments% *}"
22283       else
22284         new_complete="$new_path"
22285       fi
22286 
22287   if test "x$complete" != "x$new_complete"; then
22288       OBJC="$new_complete"
22289       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJC to \"$new_complete\"" >&5
22290 $as_echo "$as_me: Rewriting OBJC to \"$new_complete\"" >&6;}
22291     fi
22292 
22293 else
22294     OBJC=
22295 fi
22296 
22297 # Restore the flags to the user specified values.
22298 # This is necessary since AC_PROG_CC defaults CFLAGS to "-g -O2"
22299 CFLAGS="$ORG_CFLAGS"
22300 CXXFLAGS="$ORG_CXXFLAGS"
22301 OBJCFLAGS="$ORG_OBJCFLAGS"
22302 
22303 LD="$CC"
22304 LDEXE="$CC"
22305 LDCXX="$CXX"
22306 LDEXECXX="$CXX"
22307 
22308 # LDEXE is the linker to use, when creating executables.
22309 
22310 # Linking C++ libraries.
22311 
22312 # Linking C++ executables.
22313 
22314 
22315 if test "x$OPENJDK_TARGET_OS" != xwindows; then
22316     if test -n "$ac_tool_prefix"; then
22317   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
22318 set dummy ${ac_tool_prefix}ar; ac_word=$2
22319 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22320 $as_echo_n "checking for $ac_word... " >&6; }
22321 if ${ac_cv_prog_AR+:} false; then :
22322   $as_echo_n "(cached) " >&6
22323 else
22324   if test -n "$AR"; then
22325   ac_cv_prog_AR="$AR" # Let the user override the test.
22326 else
22327 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22328 for as_dir in $PATH
22329 do
22330   IFS=$as_save_IFS
22331   test -z "$as_dir" && as_dir=.
22332     for ac_exec_ext in '' $ac_executable_extensions; do
22333   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
22334     ac_cv_prog_AR="${ac_tool_prefix}ar"
22335     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22336     break 2
22337   fi
22338 done
22339   done
22340 IFS=$as_save_IFS
22341 
22342 fi
22343 fi
22344 AR=$ac_cv_prog_AR
22345 if test -n "$AR"; then
22346   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
22347 $as_echo "$AR" >&6; }
22348 else
22349   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22350 $as_echo "no" >&6; }
22351 fi
22352 
22353 
22354 fi
22355 if test -z "$ac_cv_prog_AR"; then
22356   ac_ct_AR=$AR
22357   # Extract the first word of "ar", so it can be a program name with args.
22358 set dummy ar; ac_word=$2
22359 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22360 $as_echo_n "checking for $ac_word... " >&6; }
22361 if ${ac_cv_prog_ac_ct_AR+:} false; then :
22362   $as_echo_n "(cached) " >&6
22363 else
22364   if test -n "$ac_ct_AR"; then
22365   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
22366 else
22367 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22368 for as_dir in $PATH
22369 do
22370   IFS=$as_save_IFS
22371   test -z "$as_dir" && as_dir=.
22372     for ac_exec_ext in '' $ac_executable_extensions; do
22373   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
22374     ac_cv_prog_ac_ct_AR="ar"
22375     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22376     break 2
22377   fi
22378 done
22379   done
22380 IFS=$as_save_IFS
22381 
22382 fi
22383 fi
22384 ac_ct_AR=$ac_cv_prog_ac_ct_AR
22385 if test -n "$ac_ct_AR"; then
22386   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
22387 $as_echo "$ac_ct_AR" >&6; }
22388 else
22389   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22390 $as_echo "no" >&6; }
22391 fi
22392 
22393   if test "x$ac_ct_AR" = x; then
22394     AR=""
22395   else
22396     case $cross_compiling:$ac_tool_warned in
22397 yes:)
22398 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
22399 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
22400 ac_tool_warned=yes ;;
22401 esac
22402     AR=$ac_ct_AR
22403   fi
22404 else
22405   AR="$ac_cv_prog_AR"
22406 fi
22407 
22408 
22409   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22410 
22411   # First separate the path from the arguments. This will split at the first
22412   # space.
22413   complete="$AR"
22414   path="${complete%% *}"
22415   tmp="$complete EOL"
22416   arguments="${tmp#* }"
22417 
22418   # Input might be given as Windows format, start by converting to
22419   # unix format.
22420   new_path=`$CYGPATH -u "$path"`
22421 
22422   # Now try to locate executable using which
22423   new_path=`$WHICH "$new_path" 2> /dev/null`
22424   # bat and cmd files are not always considered executable in cygwin causing which
22425   # to not find them
22426   if test "x$new_path" = x \
22427            && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22428            && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22429     new_path=`$CYGPATH -u "$path"`
22430   fi
22431   if test "x$new_path" = x; then
22432     # Oops. Which didn't find the executable.
22433     # The splitting of arguments from the executable at a space might have been incorrect,
22434     # since paths with space are more likely in Windows. Give it another try with the whole
22435     # argument.
22436     path="$complete"
22437     arguments="EOL"
22438     new_path=`$CYGPATH -u "$path"`
22439     new_path=`$WHICH "$new_path" 2> /dev/null`
22440     # bat and cmd files are not always considered executable in cygwin causing which
22441     # to not find them
22442     if test "x$new_path" = x \
22443              && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22444              && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22445       new_path=`$CYGPATH -u "$path"`
22446     fi
22447     if test "x$new_path" = x; then
22448       # It's still not found. Now this is an unrecoverable error.
22449       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
22450 $as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
22451       has_space=`$ECHO "$complete" | $GREP " "`
22452       if test "x$has_space" != x; then
22453         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22454 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22455       fi
22456       as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
22457     fi
22458   fi
22459 
22460   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22461   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22462   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22463   # "foo.exe" is OK but "foo" is an error.
22464   #
22465   # This test is therefore slightly more accurate than "test -f" to check for file precense.
22466   # It is also a way to make sure we got the proper file name for the real test later on.
22467   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22468   if test "x$test_shortpath" = x; then
22469     # Short path failed, file does not exist as specified.
22470     # Try adding .exe or .cmd
22471     if test -f "${new_path}.exe"; then
22472        input_to_shortpath="${new_path}.exe"
22473     elif test -f "${new_path}.cmd"; then
22474        input_to_shortpath="${new_path}.cmd"
22475     else
22476       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$new_path\", is invalid." >&5
22477 $as_echo "$as_me: The path of AR, which resolves as \"$new_path\", is invalid." >&6;}
22478       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
22479 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
22480       as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
22481     fi
22482   else
22483     input_to_shortpath="$new_path"
22484   fi
22485 
22486   # Call helper function which possibly converts this using DOS-style short mode.
22487   # If so, the updated path is stored in $new_path.
22488   new_path="$input_to_shortpath"
22489 
22490   input_path="$input_to_shortpath"
22491   # Check if we need to convert this using DOS-style short mode. If the path
22492   # contains just simple characters, use it. Otherwise (spaces, weird characters),
22493   # take no chances and rewrite it.
22494   # Note: m4 eats our [], so we need to use [ and ] instead.
22495   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22496   if test "x$has_forbidden_chars" != x; then
22497     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22498     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22499     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22500     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22501       # Going to short mode and back again did indeed matter. Since short mode is
22502       # case insensitive, let's make it lowercase to improve readability.
22503       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22504       # Now convert it back to Unix-stile (cygpath)
22505       input_path=`$CYGPATH -u "$shortmode_path"`
22506       new_path="$input_path"
22507     fi
22508   fi
22509 
22510   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22511   if test "x$test_cygdrive_prefix" = x; then
22512     # As a simple fix, exclude /usr/bin since it's not a real path.
22513     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
22514       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22515       # a path prefixed by /cygdrive for fixpath to work.
22516       new_path="$CYGWIN_ROOT_PATH$input_path"
22517     fi
22518   fi
22519 
22520   # remove trailing .exe if any
22521   new_path="${new_path/%.exe/}"
22522 
22523   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22524 
22525   # First separate the path from the arguments. This will split at the first
22526   # space.
22527   complete="$AR"
22528   path="${complete%% *}"
22529   tmp="$complete EOL"
22530   arguments="${tmp#* }"
22531 
22532   # Input might be given as Windows format, start by converting to
22533   # unix format.
22534   new_path="$path"
22535 
22536   windows_path="$new_path"
22537   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22538     unix_path=`$CYGPATH -u "$windows_path"`
22539     new_path="$unix_path"
22540   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22541     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22542     new_path="$unix_path"
22543   fi
22544 
22545 
22546   # Now try to locate executable using which
22547   new_path=`$WHICH "$new_path" 2> /dev/null`
22548 
22549   if test "x$new_path" = x; then
22550     # Oops. Which didn't find the executable.
22551     # The splitting of arguments from the executable at a space might have been incorrect,
22552     # since paths with space are more likely in Windows. Give it another try with the whole
22553     # argument.
22554     path="$complete"
22555     arguments="EOL"
22556     new_path="$path"
22557 
22558   windows_path="$new_path"
22559   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22560     unix_path=`$CYGPATH -u "$windows_path"`
22561     new_path="$unix_path"
22562   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22563     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22564     new_path="$unix_path"
22565   fi
22566 
22567 
22568     new_path=`$WHICH "$new_path" 2> /dev/null`
22569 
22570     if test "x$new_path" = x; then
22571       # It's still not found. Now this is an unrecoverable error.
22572       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
22573 $as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
22574       has_space=`$ECHO "$complete" | $GREP " "`
22575       if test "x$has_space" != x; then
22576         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22577 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22578       fi
22579       as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
22580     fi
22581   fi
22582 
22583   # Now new_path has a complete unix path to the binary
22584   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
22585     # Keep paths in /bin as-is, but remove trailing .exe if any
22586     new_path="${new_path/%.exe/}"
22587     # Do not save /bin paths to all_fixpath_prefixes!
22588   else
22589     # Not in mixed or Windows style, start by that.
22590     new_path=`cmd //c echo $new_path`
22591 
22592   input_path="$new_path"
22593   # Check if we need to convert this using DOS-style short mode. If the path
22594   # contains just simple characters, use it. Otherwise (spaces, weird characters),
22595   # take no chances and rewrite it.
22596   # Note: m4 eats our [], so we need to use [ and ] instead.
22597   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22598   if test "x$has_forbidden_chars" != x; then
22599     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22600     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22601   fi
22602 
22603     # Output is in $new_path
22604 
22605   windows_path="$new_path"
22606   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22607     unix_path=`$CYGPATH -u "$windows_path"`
22608     new_path="$unix_path"
22609   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22610     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22611     new_path="$unix_path"
22612   fi
22613 
22614     # remove trailing .exe if any
22615     new_path="${new_path/%.exe/}"
22616 
22617     # Save the first 10 bytes of this path to the storage, so fixpath can work.
22618     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22619   fi
22620 
22621   else
22622     # We're on a posix platform. Hooray! :)
22623     # First separate the path from the arguments. This will split at the first
22624     # space.
22625     complete="$AR"
22626     path="${complete%% *}"
22627     tmp="$complete EOL"
22628     arguments="${tmp#* }"
22629 
22630     # Cannot rely on the command "which" here since it doesn't always work.
22631     is_absolute_path=`$ECHO "$path" | $GREP ^/`
22632     if test -z "$is_absolute_path"; then
22633       # Path to executable is not absolute. Find it.
22634       IFS_save="$IFS"
22635       IFS=:
22636       for p in $PATH; do
22637         if test -f "$p/$path" && test -x "$p/$path"; then
22638           new_path="$p/$path"
22639           break
22640         fi
22641       done
22642       IFS="$IFS_save"
22643     else
22644       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving AR (as $path) failed, using $path directly." >&5
22645 $as_echo "$as_me: Resolving AR (as $path) failed, using $path directly." >&6;}
22646       new_path="$path"
22647     fi
22648 
22649     if test "x$new_path" = x; then
22650         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
22651 $as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
22652         has_space=`$ECHO "$complete" | $GREP " "`
22653         if test "x$has_space" != x; then
22654           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
22655 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
22656         fi
22657         as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
22658       fi
22659   fi
22660 
22661       # Now join together the path and the arguments once again
22662       if test "x$arguments" != xEOL; then
22663         new_complete="$new_path ${arguments% *}"
22664       else
22665         new_complete="$new_path"
22666       fi
22667 
22668   if test "x$complete" != "x$new_complete"; then
22669       AR="$new_complete"
22670       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AR to \"$new_complete\"" >&5
22671 $as_echo "$as_me: Rewriting AR to \"$new_complete\"" >&6;}
22672     fi
22673 
22674 fi
22675 if test "x$OPENJDK_TARGET_OS" = xmacosx; then
22676     ARFLAGS="-r"
22677 else
22678     ARFLAGS=""
22679 fi
22680 
22681 
22682 # For hotspot, we need these in Windows mixed path; other platforms keep them the same
22683 HOTSPOT_CXX="$CXX"
22684 HOTSPOT_LD="$LD"
22685 
22686 
22687 
22688 COMPILER_NAME=gcc
22689 COMPILER_TYPE=CC
22690 if test "x$OPENJDK_TARGET_OS" = xwindows; then :
22691 
22692     # For now, assume that we are always compiling using cl.exe.
22693     CC_OUT_OPTION=-Fo
22694     EXE_OUT_OPTION=-out:
22695     LD_OUT_OPTION=-out:
22696     AR_OUT_OPTION=-out:
22697     # On Windows, reject /usr/bin/link (as determined in CYGWIN_LINK), which is a cygwin
22698     # program for something completely different.
22699     # Extract the first word of "link", so it can be a program name with args.
22700 set dummy link; ac_word=$2
22701 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22702 $as_echo_n "checking for $ac_word... " >&6; }
22703 if ${ac_cv_prog_WINLD+:} false; then :
22704   $as_echo_n "(cached) " >&6
22705 else
22706   if test -n "$WINLD"; then
22707   ac_cv_prog_WINLD="$WINLD" # Let the user override the test.
22708 else
22709   ac_prog_rejected=no
22710 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22711 for as_dir in $PATH
22712 do
22713   IFS=$as_save_IFS
22714   test -z "$as_dir" && as_dir=.
22715     for ac_exec_ext in '' $ac_executable_extensions; do
22716   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
22717     if test "$as_dir/$ac_word$ac_exec_ext" = "$CYGWIN_LINK"; then
22718        ac_prog_rejected=yes
22719        continue
22720      fi
22721     ac_cv_prog_WINLD="link"
22722     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22723     break 2
22724   fi
22725 done
22726   done
22727 IFS=$as_save_IFS
22728 
22729 if test $ac_prog_rejected = yes; then
22730   # We found a bogon in the path, so make sure we never use it.
22731   set dummy $ac_cv_prog_WINLD
22732   shift
22733   if test $# != 0; then
22734     # We chose a different compiler from the bogus one.
22735     # However, it has the same basename, so the bogon will be chosen
22736     # first if we set WINLD to just the basename; use the full file name.
22737     shift
22738     ac_cv_prog_WINLD="$as_dir/$ac_word${1+' '}$@"
22739   fi
22740 fi
22741 fi
22742 fi
22743 WINLD=$ac_cv_prog_WINLD
22744 if test -n "$WINLD"; then
22745   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINLD" >&5
22746 $as_echo "$WINLD" >&6; }
22747 else
22748   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22749 $as_echo "no" >&6; }
22750 fi
22751 
22752 
22753     # Since we must ignore the first found link, WINLD will contain
22754     # the full path to the link.exe program.
22755 
22756   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22757 
22758   # First separate the path from the arguments. This will split at the first
22759   # space.
22760   complete="$WINLD"
22761   path="${complete%% *}"
22762   tmp="$complete EOL"
22763   arguments="${tmp#* }"
22764 
22765   # Input might be given as Windows format, start by converting to
22766   # unix format.
22767   new_path=`$CYGPATH -u "$path"`
22768 
22769   # Now try to locate executable using which
22770   new_path=`$WHICH "$new_path" 2> /dev/null`
22771   # bat and cmd files are not always considered executable in cygwin causing which
22772   # to not find them
22773   if test "x$new_path" = x \
22774            && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22775            && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22776     new_path=`$CYGPATH -u "$path"`
22777   fi
22778   if test "x$new_path" = x; then
22779     # Oops. Which didn't find the executable.
22780     # The splitting of arguments from the executable at a space might have been incorrect,
22781     # since paths with space are more likely in Windows. Give it another try with the whole
22782     # argument.
22783     path="$complete"
22784     arguments="EOL"
22785     new_path=`$CYGPATH -u "$path"`
22786     new_path=`$WHICH "$new_path" 2> /dev/null`
22787     # bat and cmd files are not always considered executable in cygwin causing which
22788     # to not find them
22789     if test "x$new_path" = x \
22790              && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22791              && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22792       new_path=`$CYGPATH -u "$path"`
22793     fi
22794     if test "x$new_path" = x; then
22795       # It's still not found. Now this is an unrecoverable error.
22796       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$complete\", is not found." >&5
22797 $as_echo "$as_me: The path of WINLD, which resolves as \"$complete\", is not found." >&6;}
22798       has_space=`$ECHO "$complete" | $GREP " "`
22799       if test "x$has_space" != x; then
22800         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22801 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22802       fi
22803       as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
22804     fi
22805   fi
22806 
22807   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22808   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22809   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22810   # "foo.exe" is OK but "foo" is an error.
22811   #
22812   # This test is therefore slightly more accurate than "test -f" to check for file precense.
22813   # It is also a way to make sure we got the proper file name for the real test later on.
22814   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22815   if test "x$test_shortpath" = x; then
22816     # Short path failed, file does not exist as specified.
22817     # Try adding .exe or .cmd
22818     if test -f "${new_path}.exe"; then
22819        input_to_shortpath="${new_path}.exe"
22820     elif test -f "${new_path}.cmd"; then
22821        input_to_shortpath="${new_path}.cmd"
22822     else
22823       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$new_path\", is invalid." >&5
22824 $as_echo "$as_me: The path of WINLD, which resolves as \"$new_path\", is invalid." >&6;}
22825       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
22826 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
22827       as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
22828     fi
22829   else
22830     input_to_shortpath="$new_path"
22831   fi
22832 
22833   # Call helper function which possibly converts this using DOS-style short mode.
22834   # If so, the updated path is stored in $new_path.
22835   new_path="$input_to_shortpath"
22836 
22837   input_path="$input_to_shortpath"
22838   # Check if we need to convert this using DOS-style short mode. If the path
22839   # contains just simple characters, use it. Otherwise (spaces, weird characters),
22840   # take no chances and rewrite it.
22841   # Note: m4 eats our [], so we need to use [ and ] instead.
22842   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22843   if test "x$has_forbidden_chars" != x; then
22844     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22845     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22846     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22847     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22848       # Going to short mode and back again did indeed matter. Since short mode is
22849       # case insensitive, let's make it lowercase to improve readability.
22850       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22851       # Now convert it back to Unix-stile (cygpath)
22852       input_path=`$CYGPATH -u "$shortmode_path"`
22853       new_path="$input_path"
22854     fi
22855   fi
22856 
22857   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22858   if test "x$test_cygdrive_prefix" = x; then
22859     # As a simple fix, exclude /usr/bin since it's not a real path.
22860     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
22861       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22862       # a path prefixed by /cygdrive for fixpath to work.
22863       new_path="$CYGWIN_ROOT_PATH$input_path"
22864     fi
22865   fi
22866 
22867   # remove trailing .exe if any
22868   new_path="${new_path/%.exe/}"
22869 
22870   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22871 
22872   # First separate the path from the arguments. This will split at the first
22873   # space.
22874   complete="$WINLD"
22875   path="${complete%% *}"
22876   tmp="$complete EOL"
22877   arguments="${tmp#* }"
22878 
22879   # Input might be given as Windows format, start by converting to
22880   # unix format.
22881   new_path="$path"
22882 
22883   windows_path="$new_path"
22884   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22885     unix_path=`$CYGPATH -u "$windows_path"`
22886     new_path="$unix_path"
22887   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22888     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22889     new_path="$unix_path"
22890   fi
22891 
22892 
22893   # Now try to locate executable using which
22894   new_path=`$WHICH "$new_path" 2> /dev/null`
22895 
22896   if test "x$new_path" = x; then
22897     # Oops. Which didn't find the executable.
22898     # The splitting of arguments from the executable at a space might have been incorrect,
22899     # since paths with space are more likely in Windows. Give it another try with the whole
22900     # argument.
22901     path="$complete"
22902     arguments="EOL"
22903     new_path="$path"
22904 
22905   windows_path="$new_path"
22906   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22907     unix_path=`$CYGPATH -u "$windows_path"`
22908     new_path="$unix_path"
22909   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22910     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22911     new_path="$unix_path"
22912   fi
22913 
22914 
22915     new_path=`$WHICH "$new_path" 2> /dev/null`
22916 
22917     if test "x$new_path" = x; then
22918       # It's still not found. Now this is an unrecoverable error.
22919       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$complete\", is not found." >&5
22920 $as_echo "$as_me: The path of WINLD, which resolves as \"$complete\", is not found." >&6;}
22921       has_space=`$ECHO "$complete" | $GREP " "`
22922       if test "x$has_space" != x; then
22923         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22924 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22925       fi
22926       as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
22927     fi
22928   fi
22929 
22930   # Now new_path has a complete unix path to the binary
22931   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
22932     # Keep paths in /bin as-is, but remove trailing .exe if any
22933     new_path="${new_path/%.exe/}"
22934     # Do not save /bin paths to all_fixpath_prefixes!
22935   else
22936     # Not in mixed or Windows style, start by that.
22937     new_path=`cmd //c echo $new_path`
22938 
22939   input_path="$new_path"
22940   # Check if we need to convert this using DOS-style short mode. If the path
22941   # contains just simple characters, use it. Otherwise (spaces, weird characters),
22942   # take no chances and rewrite it.
22943   # Note: m4 eats our [], so we need to use [ and ] instead.
22944   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22945   if test "x$has_forbidden_chars" != x; then
22946     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22947     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22948   fi
22949 
22950     # Output is in $new_path
22951 
22952   windows_path="$new_path"
22953   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22954     unix_path=`$CYGPATH -u "$windows_path"`
22955     new_path="$unix_path"
22956   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22957     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22958     new_path="$unix_path"
22959   fi
22960 
22961     # remove trailing .exe if any
22962     new_path="${new_path/%.exe/}"
22963 
22964     # Save the first 10 bytes of this path to the storage, so fixpath can work.
22965     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22966   fi
22967 
22968   else
22969     # We're on a posix platform. Hooray! :)
22970     # First separate the path from the arguments. This will split at the first
22971     # space.
22972     complete="$WINLD"
22973     path="${complete%% *}"
22974     tmp="$complete EOL"
22975     arguments="${tmp#* }"
22976 
22977     # Cannot rely on the command "which" here since it doesn't always work.
22978     is_absolute_path=`$ECHO "$path" | $GREP ^/`
22979     if test -z "$is_absolute_path"; then
22980       # Path to executable is not absolute. Find it.
22981       IFS_save="$IFS"
22982       IFS=:
22983       for p in $PATH; do
22984         if test -f "$p/$path" && test -x "$p/$path"; then
22985           new_path="$p/$path"
22986           break
22987         fi
22988       done
22989       IFS="$IFS_save"
22990     else
22991       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving WINLD (as $path) failed, using $path directly." >&5
22992 $as_echo "$as_me: Resolving WINLD (as $path) failed, using $path directly." >&6;}
22993       new_path="$path"
22994     fi
22995 
22996     if test "x$new_path" = x; then
22997         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$complete\", is not found." >&5
22998 $as_echo "$as_me: The path of WINLD, which resolves as \"$complete\", is not found." >&6;}
22999         has_space=`$ECHO "$complete" | $GREP " "`
23000         if test "x$has_space" != x; then
23001           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
23002 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
23003         fi
23004         as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
23005       fi
23006   fi
23007 
23008       # Now join together the path and the arguments once again
23009       if test "x$arguments" != xEOL; then
23010         new_complete="$new_path ${arguments% *}"
23011       else
23012         new_complete="$new_path"
23013       fi
23014 
23015   if test "x$complete" != "x$new_complete"; then
23016       WINLD="$new_complete"
23017       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting WINLD to \"$new_complete\"" >&5
23018 $as_echo "$as_me: Rewriting WINLD to \"$new_complete\"" >&6;}
23019     fi
23020 
23021     printf "Windows linker was found at $WINLD\n"
23022     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the found link.exe is actually the Visual Studio linker" >&5
23023 $as_echo_n "checking if the found link.exe is actually the Visual Studio linker... " >&6; }
23024     "$WINLD" --version > /dev/null
23025     if test $? -eq 0 ; then
23026       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23027 $as_echo "no" >&6; }
23028       as_fn_error $? "This is the Cygwin link tool. Please check your PATH and rerun configure." "$LINENO" 5
23029     else
23030       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
23031 $as_echo "yes" >&6; }
23032     fi
23033     LD="$WINLD"
23034     LDEXE="$WINLD"
23035     LDCXX="$WINLD"
23036     LDEXECXX="$WINLD"
23037 
23038     # Extract the first word of "mt", so it can be a program name with args.
23039 set dummy mt; ac_word=$2
23040 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23041 $as_echo_n "checking for $ac_word... " >&6; }
23042 if ${ac_cv_prog_MT+:} false; then :
23043   $as_echo_n "(cached) " >&6
23044 else
23045   if test -n "$MT"; then
23046   ac_cv_prog_MT="$MT" # Let the user override the test.
23047 else
23048   ac_prog_rejected=no
23049 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23050 for as_dir in $PATH
23051 do
23052   IFS=$as_save_IFS
23053   test -z "$as_dir" && as_dir=.
23054     for ac_exec_ext in '' $ac_executable_extensions; do
23055   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
23056     if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/mt"; then
23057        ac_prog_rejected=yes
23058        continue
23059      fi
23060     ac_cv_prog_MT="mt"
23061     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23062     break 2
23063   fi
23064 done
23065   done
23066 IFS=$as_save_IFS
23067 
23068 if test $ac_prog_rejected = yes; then
23069   # We found a bogon in the path, so make sure we never use it.
23070   set dummy $ac_cv_prog_MT
23071   shift
23072   if test $# != 0; then
23073     # We chose a different compiler from the bogus one.
23074     # However, it has the same basename, so the bogon will be chosen
23075     # first if we set MT to just the basename; use the full file name.
23076     shift
23077     ac_cv_prog_MT="$as_dir/$ac_word${1+' '}$@"
23078   fi
23079 fi
23080 fi
23081 fi
23082 MT=$ac_cv_prog_MT
23083 if test -n "$MT"; then
23084   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MT" >&5
23085 $as_echo "$MT" >&6; }
23086 else
23087   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23088 $as_echo "no" >&6; }
23089 fi
23090 
23091 
23092 
23093   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23094 
23095   # First separate the path from the arguments. This will split at the first
23096   # space.
23097   complete="$MT"
23098   path="${complete%% *}"
23099   tmp="$complete EOL"
23100   arguments="${tmp#* }"
23101 
23102   # Input might be given as Windows format, start by converting to
23103   # unix format.
23104   new_path=`$CYGPATH -u "$path"`
23105 
23106   # Now try to locate executable using which
23107   new_path=`$WHICH "$new_path" 2> /dev/null`
23108   # bat and cmd files are not always considered executable in cygwin causing which
23109   # to not find them
23110   if test "x$new_path" = x \
23111            && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23112            && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23113     new_path=`$CYGPATH -u "$path"`
23114   fi
23115   if test "x$new_path" = x; then
23116     # Oops. Which didn't find the executable.
23117     # The splitting of arguments from the executable at a space might have been incorrect,
23118     # since paths with space are more likely in Windows. Give it another try with the whole
23119     # argument.
23120     path="$complete"
23121     arguments="EOL"
23122     new_path=`$CYGPATH -u "$path"`
23123     new_path=`$WHICH "$new_path" 2> /dev/null`
23124     # bat and cmd files are not always considered executable in cygwin causing which
23125     # to not find them
23126     if test "x$new_path" = x \
23127              && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23128              && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23129       new_path=`$CYGPATH -u "$path"`
23130     fi
23131     if test "x$new_path" = x; then
23132       # It's still not found. Now this is an unrecoverable error.
23133       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
23134 $as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
23135       has_space=`$ECHO "$complete" | $GREP " "`
23136       if test "x$has_space" != x; then
23137         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23138 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23139       fi
23140       as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
23141     fi
23142   fi
23143 
23144   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23145   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23146   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23147   # "foo.exe" is OK but "foo" is an error.
23148   #
23149   # This test is therefore slightly more accurate than "test -f" to check for file precense.
23150   # It is also a way to make sure we got the proper file name for the real test later on.
23151   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23152   if test "x$test_shortpath" = x; then
23153     # Short path failed, file does not exist as specified.
23154     # Try adding .exe or .cmd
23155     if test -f "${new_path}.exe"; then
23156        input_to_shortpath="${new_path}.exe"
23157     elif test -f "${new_path}.cmd"; then
23158        input_to_shortpath="${new_path}.cmd"
23159     else
23160       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$new_path\", is invalid." >&5
23161 $as_echo "$as_me: The path of MT, which resolves as \"$new_path\", is invalid." >&6;}
23162       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
23163 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
23164       as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
23165     fi
23166   else
23167     input_to_shortpath="$new_path"
23168   fi
23169 
23170   # Call helper function which possibly converts this using DOS-style short mode.
23171   # If so, the updated path is stored in $new_path.
23172   new_path="$input_to_shortpath"
23173 
23174   input_path="$input_to_shortpath"
23175   # Check if we need to convert this using DOS-style short mode. If the path
23176   # contains just simple characters, use it. Otherwise (spaces, weird characters),
23177   # take no chances and rewrite it.
23178   # Note: m4 eats our [], so we need to use [ and ] instead.
23179   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23180   if test "x$has_forbidden_chars" != x; then
23181     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23182     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23183     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23184     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23185       # Going to short mode and back again did indeed matter. Since short mode is
23186       # case insensitive, let's make it lowercase to improve readability.
23187       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23188       # Now convert it back to Unix-stile (cygpath)
23189       input_path=`$CYGPATH -u "$shortmode_path"`
23190       new_path="$input_path"
23191     fi
23192   fi
23193 
23194   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23195   if test "x$test_cygdrive_prefix" = x; then
23196     # As a simple fix, exclude /usr/bin since it's not a real path.
23197     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
23198       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23199       # a path prefixed by /cygdrive for fixpath to work.
23200       new_path="$CYGWIN_ROOT_PATH$input_path"
23201     fi
23202   fi
23203 
23204   # remove trailing .exe if any
23205   new_path="${new_path/%.exe/}"
23206 
23207   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23208 
23209   # First separate the path from the arguments. This will split at the first
23210   # space.
23211   complete="$MT"
23212   path="${complete%% *}"
23213   tmp="$complete EOL"
23214   arguments="${tmp#* }"
23215 
23216   # Input might be given as Windows format, start by converting to
23217   # unix format.
23218   new_path="$path"
23219 
23220   windows_path="$new_path"
23221   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23222     unix_path=`$CYGPATH -u "$windows_path"`
23223     new_path="$unix_path"
23224   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23225     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23226     new_path="$unix_path"
23227   fi
23228 
23229 
23230   # Now try to locate executable using which
23231   new_path=`$WHICH "$new_path" 2> /dev/null`
23232 
23233   if test "x$new_path" = x; then
23234     # Oops. Which didn't find the executable.
23235     # The splitting of arguments from the executable at a space might have been incorrect,
23236     # since paths with space are more likely in Windows. Give it another try with the whole
23237     # argument.
23238     path="$complete"
23239     arguments="EOL"
23240     new_path="$path"
23241 
23242   windows_path="$new_path"
23243   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23244     unix_path=`$CYGPATH -u "$windows_path"`
23245     new_path="$unix_path"
23246   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23247     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23248     new_path="$unix_path"
23249   fi
23250 
23251 
23252     new_path=`$WHICH "$new_path" 2> /dev/null`
23253 
23254     if test "x$new_path" = x; then
23255       # It's still not found. Now this is an unrecoverable error.
23256       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
23257 $as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
23258       has_space=`$ECHO "$complete" | $GREP " "`
23259       if test "x$has_space" != x; then
23260         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23261 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23262       fi
23263       as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
23264     fi
23265   fi
23266 
23267   # Now new_path has a complete unix path to the binary
23268   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
23269     # Keep paths in /bin as-is, but remove trailing .exe if any
23270     new_path="${new_path/%.exe/}"
23271     # Do not save /bin paths to all_fixpath_prefixes!
23272   else
23273     # Not in mixed or Windows style, start by that.
23274     new_path=`cmd //c echo $new_path`
23275 
23276   input_path="$new_path"
23277   # Check if we need to convert this using DOS-style short mode. If the path
23278   # contains just simple characters, use it. Otherwise (spaces, weird characters),
23279   # take no chances and rewrite it.
23280   # Note: m4 eats our [], so we need to use [ and ] instead.
23281   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23282   if test "x$has_forbidden_chars" != x; then
23283     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23284     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23285   fi
23286 
23287     # Output is in $new_path
23288 
23289   windows_path="$new_path"
23290   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23291     unix_path=`$CYGPATH -u "$windows_path"`
23292     new_path="$unix_path"
23293   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23294     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23295     new_path="$unix_path"
23296   fi
23297 
23298     # remove trailing .exe if any
23299     new_path="${new_path/%.exe/}"
23300 
23301     # Save the first 10 bytes of this path to the storage, so fixpath can work.
23302     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23303   fi
23304 
23305   else
23306     # We're on a posix platform. Hooray! :)
23307     # First separate the path from the arguments. This will split at the first
23308     # space.
23309     complete="$MT"
23310     path="${complete%% *}"
23311     tmp="$complete EOL"
23312     arguments="${tmp#* }"
23313 
23314     # Cannot rely on the command "which" here since it doesn't always work.
23315     is_absolute_path=`$ECHO "$path" | $GREP ^/`
23316     if test -z "$is_absolute_path"; then
23317       # Path to executable is not absolute. Find it.
23318       IFS_save="$IFS"
23319       IFS=:
23320       for p in $PATH; do
23321         if test -f "$p/$path" && test -x "$p/$path"; then
23322           new_path="$p/$path"
23323           break
23324         fi
23325       done
23326       IFS="$IFS_save"
23327     else
23328       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving MT (as $path) failed, using $path directly." >&5
23329 $as_echo "$as_me: Resolving MT (as $path) failed, using $path directly." >&6;}
23330       new_path="$path"
23331     fi
23332 
23333     if test "x$new_path" = x; then
23334         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
23335 $as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
23336         has_space=`$ECHO "$complete" | $GREP " "`
23337         if test "x$has_space" != x; then
23338           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
23339 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
23340         fi
23341         as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
23342       fi
23343   fi
23344 
23345       # Now join together the path and the arguments once again
23346       if test "x$arguments" != xEOL; then
23347         new_complete="$new_path ${arguments% *}"
23348       else
23349         new_complete="$new_path"
23350       fi
23351 
23352   if test "x$complete" != "x$new_complete"; then
23353       MT="$new_complete"
23354       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MT to \"$new_complete\"" >&5
23355 $as_echo "$as_me: Rewriting MT to \"$new_complete\"" >&6;}
23356     fi
23357 
23358     # The resource compiler
23359     # Extract the first word of "rc", so it can be a program name with args.
23360 set dummy rc; ac_word=$2
23361 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23362 $as_echo_n "checking for $ac_word... " >&6; }
23363 if ${ac_cv_prog_RC+:} false; then :
23364   $as_echo_n "(cached) " >&6
23365 else
23366   if test -n "$RC"; then
23367   ac_cv_prog_RC="$RC" # Let the user override the test.
23368 else
23369   ac_prog_rejected=no
23370 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23371 for as_dir in $PATH
23372 do
23373   IFS=$as_save_IFS
23374   test -z "$as_dir" && as_dir=.
23375     for ac_exec_ext in '' $ac_executable_extensions; do
23376   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
23377     if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/rc"; then
23378        ac_prog_rejected=yes
23379        continue
23380      fi
23381     ac_cv_prog_RC="rc"
23382     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23383     break 2
23384   fi
23385 done
23386   done
23387 IFS=$as_save_IFS
23388 
23389 if test $ac_prog_rejected = yes; then
23390   # We found a bogon in the path, so make sure we never use it.
23391   set dummy $ac_cv_prog_RC
23392   shift
23393   if test $# != 0; then
23394     # We chose a different compiler from the bogus one.
23395     # However, it has the same basename, so the bogon will be chosen
23396     # first if we set RC to just the basename; use the full file name.
23397     shift
23398     ac_cv_prog_RC="$as_dir/$ac_word${1+' '}$@"
23399   fi
23400 fi
23401 fi
23402 fi
23403 RC=$ac_cv_prog_RC
23404 if test -n "$RC"; then
23405   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RC" >&5
23406 $as_echo "$RC" >&6; }
23407 else
23408   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23409 $as_echo "no" >&6; }
23410 fi
23411 
23412 
23413 
23414   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23415 
23416   # First separate the path from the arguments. This will split at the first
23417   # space.
23418   complete="$RC"
23419   path="${complete%% *}"
23420   tmp="$complete EOL"
23421   arguments="${tmp#* }"
23422 
23423   # Input might be given as Windows format, start by converting to
23424   # unix format.
23425   new_path=`$CYGPATH -u "$path"`
23426 
23427   # Now try to locate executable using which
23428   new_path=`$WHICH "$new_path" 2> /dev/null`
23429   # bat and cmd files are not always considered executable in cygwin causing which
23430   # to not find them
23431   if test "x$new_path" = x \
23432            && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23433            && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23434     new_path=`$CYGPATH -u "$path"`
23435   fi
23436   if test "x$new_path" = x; then
23437     # Oops. Which didn't find the executable.
23438     # The splitting of arguments from the executable at a space might have been incorrect,
23439     # since paths with space are more likely in Windows. Give it another try with the whole
23440     # argument.
23441     path="$complete"
23442     arguments="EOL"
23443     new_path=`$CYGPATH -u "$path"`
23444     new_path=`$WHICH "$new_path" 2> /dev/null`
23445     # bat and cmd files are not always considered executable in cygwin causing which
23446     # to not find them
23447     if test "x$new_path" = x \
23448              && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23449              && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23450       new_path=`$CYGPATH -u "$path"`
23451     fi
23452     if test "x$new_path" = x; then
23453       # It's still not found. Now this is an unrecoverable error.
23454       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
23455 $as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
23456       has_space=`$ECHO "$complete" | $GREP " "`
23457       if test "x$has_space" != x; then
23458         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23459 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23460       fi
23461       as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
23462     fi
23463   fi
23464 
23465   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23466   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23467   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23468   # "foo.exe" is OK but "foo" is an error.
23469   #
23470   # This test is therefore slightly more accurate than "test -f" to check for file precense.
23471   # It is also a way to make sure we got the proper file name for the real test later on.
23472   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23473   if test "x$test_shortpath" = x; then
23474     # Short path failed, file does not exist as specified.
23475     # Try adding .exe or .cmd
23476     if test -f "${new_path}.exe"; then
23477        input_to_shortpath="${new_path}.exe"
23478     elif test -f "${new_path}.cmd"; then
23479        input_to_shortpath="${new_path}.cmd"
23480     else
23481       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$new_path\", is invalid." >&5
23482 $as_echo "$as_me: The path of RC, which resolves as \"$new_path\", is invalid." >&6;}
23483       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
23484 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
23485       as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
23486     fi
23487   else
23488     input_to_shortpath="$new_path"
23489   fi
23490 
23491   # Call helper function which possibly converts this using DOS-style short mode.
23492   # If so, the updated path is stored in $new_path.
23493   new_path="$input_to_shortpath"
23494 
23495   input_path="$input_to_shortpath"
23496   # Check if we need to convert this using DOS-style short mode. If the path
23497   # contains just simple characters, use it. Otherwise (spaces, weird characters),
23498   # take no chances and rewrite it.
23499   # Note: m4 eats our [], so we need to use [ and ] instead.
23500   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23501   if test "x$has_forbidden_chars" != x; then
23502     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23503     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23504     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23505     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23506       # Going to short mode and back again did indeed matter. Since short mode is
23507       # case insensitive, let's make it lowercase to improve readability.
23508       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23509       # Now convert it back to Unix-stile (cygpath)
23510       input_path=`$CYGPATH -u "$shortmode_path"`
23511       new_path="$input_path"
23512     fi
23513   fi
23514 
23515   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23516   if test "x$test_cygdrive_prefix" = x; then
23517     # As a simple fix, exclude /usr/bin since it's not a real path.
23518     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
23519       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23520       # a path prefixed by /cygdrive for fixpath to work.
23521       new_path="$CYGWIN_ROOT_PATH$input_path"
23522     fi
23523   fi
23524 
23525   # remove trailing .exe if any
23526   new_path="${new_path/%.exe/}"
23527 
23528   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23529 
23530   # First separate the path from the arguments. This will split at the first
23531   # space.
23532   complete="$RC"
23533   path="${complete%% *}"
23534   tmp="$complete EOL"
23535   arguments="${tmp#* }"
23536 
23537   # Input might be given as Windows format, start by converting to
23538   # unix format.
23539   new_path="$path"
23540 
23541   windows_path="$new_path"
23542   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23543     unix_path=`$CYGPATH -u "$windows_path"`
23544     new_path="$unix_path"
23545   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23546     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23547     new_path="$unix_path"
23548   fi
23549 
23550 
23551   # Now try to locate executable using which
23552   new_path=`$WHICH "$new_path" 2> /dev/null`
23553 
23554   if test "x$new_path" = x; then
23555     # Oops. Which didn't find the executable.
23556     # The splitting of arguments from the executable at a space might have been incorrect,
23557     # since paths with space are more likely in Windows. Give it another try with the whole
23558     # argument.
23559     path="$complete"
23560     arguments="EOL"
23561     new_path="$path"
23562 
23563   windows_path="$new_path"
23564   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23565     unix_path=`$CYGPATH -u "$windows_path"`
23566     new_path="$unix_path"
23567   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23568     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23569     new_path="$unix_path"
23570   fi
23571 
23572 
23573     new_path=`$WHICH "$new_path" 2> /dev/null`
23574 
23575     if test "x$new_path" = x; then
23576       # It's still not found. Now this is an unrecoverable error.
23577       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
23578 $as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
23579       has_space=`$ECHO "$complete" | $GREP " "`
23580       if test "x$has_space" != x; then
23581         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23582 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23583       fi
23584       as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
23585     fi
23586   fi
23587 
23588   # Now new_path has a complete unix path to the binary
23589   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
23590     # Keep paths in /bin as-is, but remove trailing .exe if any
23591     new_path="${new_path/%.exe/}"
23592     # Do not save /bin paths to all_fixpath_prefixes!
23593   else
23594     # Not in mixed or Windows style, start by that.
23595     new_path=`cmd //c echo $new_path`
23596 
23597   input_path="$new_path"
23598   # Check if we need to convert this using DOS-style short mode. If the path
23599   # contains just simple characters, use it. Otherwise (spaces, weird characters),
23600   # take no chances and rewrite it.
23601   # Note: m4 eats our [], so we need to use [ and ] instead.
23602   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23603   if test "x$has_forbidden_chars" != x; then
23604     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23605     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23606   fi
23607 
23608     # Output is in $new_path
23609 
23610   windows_path="$new_path"
23611   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23612     unix_path=`$CYGPATH -u "$windows_path"`
23613     new_path="$unix_path"
23614   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23615     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23616     new_path="$unix_path"
23617   fi
23618 
23619     # remove trailing .exe if any
23620     new_path="${new_path/%.exe/}"
23621 
23622     # Save the first 10 bytes of this path to the storage, so fixpath can work.
23623     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23624   fi
23625 
23626   else
23627     # We're on a posix platform. Hooray! :)
23628     # First separate the path from the arguments. This will split at the first
23629     # space.
23630     complete="$RC"
23631     path="${complete%% *}"
23632     tmp="$complete EOL"
23633     arguments="${tmp#* }"
23634 
23635     # Cannot rely on the command "which" here since it doesn't always work.
23636     is_absolute_path=`$ECHO "$path" | $GREP ^/`
23637     if test -z "$is_absolute_path"; then
23638       # Path to executable is not absolute. Find it.
23639       IFS_save="$IFS"
23640       IFS=:
23641       for p in $PATH; do
23642         if test -f "$p/$path" && test -x "$p/$path"; then
23643           new_path="$p/$path"
23644           break
23645         fi
23646       done
23647       IFS="$IFS_save"
23648     else
23649       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving RC (as $path) failed, using $path directly." >&5
23650 $as_echo "$as_me: Resolving RC (as $path) failed, using $path directly." >&6;}
23651       new_path="$path"
23652     fi
23653 
23654     if test "x$new_path" = x; then
23655         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
23656 $as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
23657         has_space=`$ECHO "$complete" | $GREP " "`
23658         if test "x$has_space" != x; then
23659           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
23660 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
23661         fi
23662         as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
23663       fi
23664   fi
23665 
23666       # Now join together the path and the arguments once again
23667       if test "x$arguments" != xEOL; then
23668         new_complete="$new_path ${arguments% *}"
23669       else
23670         new_complete="$new_path"
23671       fi
23672 
23673   if test "x$complete" != "x$new_complete"; then
23674       RC="$new_complete"
23675       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting RC to \"$new_complete\"" >&5
23676 $as_echo "$as_me: Rewriting RC to \"$new_complete\"" >&6;}
23677     fi
23678 
23679 
23680     # For hotspot, we need these in Windows mixed path,
23681     # so rewrite them all. Need added .exe suffix.
23682     HOTSPOT_CXX="$CXX.exe"
23683     HOTSPOT_LD="$LD.exe"
23684     HOTSPOT_MT="$MT.exe"
23685     HOTSPOT_RC="$RC.exe"
23686 
23687   unix_path="$HOTSPOT_CXX"
23688   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23689     windows_path=`$CYGPATH -m "$unix_path"`
23690     HOTSPOT_CXX="$windows_path"
23691   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23692     windows_path=`cmd //c echo $unix_path`
23693     HOTSPOT_CXX="$windows_path"
23694   fi
23695 
23696 
23697   unix_path="$HOTSPOT_LD"
23698   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23699     windows_path=`$CYGPATH -m "$unix_path"`
23700     HOTSPOT_LD="$windows_path"
23701   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23702     windows_path=`cmd //c echo $unix_path`
23703     HOTSPOT_LD="$windows_path"
23704   fi
23705 
23706 
23707   unix_path="$HOTSPOT_MT"
23708   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23709     windows_path=`$CYGPATH -m "$unix_path"`
23710     HOTSPOT_MT="$windows_path"
23711   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23712     windows_path=`cmd //c echo $unix_path`
23713     HOTSPOT_MT="$windows_path"
23714   fi
23715 
23716 
23717   unix_path="$HOTSPOT_RC"
23718   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23719     windows_path=`$CYGPATH -m "$unix_path"`
23720     HOTSPOT_RC="$windows_path"
23721   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23722     windows_path=`cmd //c echo $unix_path`
23723     HOTSPOT_RC="$windows_path"
23724   fi
23725 
23726 
23727 
23728 
23729     RC_FLAGS="-nologo -l 0x409 -r"
23730     if test "x$VARIANT" = xOPT; then :
23731 
23732         RC_FLAGS="$RC_FLAGS -d NDEBUG"
23733 
23734 fi
23735     JDK_UPDATE_VERSION_NOTNULL=$JDK_UPDATE_VERSION
23736     if test "x$JDK_UPDATE_VERSION" = x; then :
23737 
23738         JDK_UPDATE_VERSION_NOTNULL=0
23739 
23740 fi
23741     RC_FLAGS="$RC_FLAGS -d \"JDK_BUILD_ID=$FULL_VERSION\""
23742     RC_FLAGS="$RC_FLAGS -d \"JDK_COMPANY=$COMPANY_NAME\""
23743     RC_FLAGS="$RC_FLAGS -d \"JDK_COMPONENT=$PRODUCT_NAME $JDK_RC_PLATFORM_NAME binary\""
23744     RC_FLAGS="$RC_FLAGS -d \"JDK_VER=$JDK_MINOR_VERSION.$JDK_MICRO_VERSION.$JDK_UPDATE_VERSION_NOTNULL.$COOKED_BUILD_NUMBER\""
23745     RC_FLAGS="$RC_FLAGS -d \"JDK_COPYRIGHT=Copyright \xA9 $COPYRIGHT_YEAR\""
23746     RC_FLAGS="$RC_FLAGS -d \"JDK_NAME=$PRODUCT_NAME $JDK_RC_PLATFORM_NAME $JDK_MINOR_VERSION $JDK_UPDATE_META_TAG\""
23747     RC_FLAGS="$RC_FLAGS -d \"JDK_FVER=$JDK_MINOR_VERSION,$JDK_MICRO_VERSION,$JDK_UPDATE_VERSION_NOTNULL,$COOKED_BUILD_NUMBER\""
23748 
23749     # lib.exe is used to create static libraries.
23750     # Extract the first word of "lib", so it can be a program name with args.
23751 set dummy lib; ac_word=$2
23752 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23753 $as_echo_n "checking for $ac_word... " >&6; }
23754 if ${ac_cv_prog_WINAR+:} false; then :
23755   $as_echo_n "(cached) " >&6
23756 else
23757   if test -n "$WINAR"; then
23758   ac_cv_prog_WINAR="$WINAR" # Let the user override the test.
23759 else
23760 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23761 for as_dir in $PATH
23762 do
23763   IFS=$as_save_IFS
23764   test -z "$as_dir" && as_dir=.
23765     for ac_exec_ext in '' $ac_executable_extensions; do
23766   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
23767     ac_cv_prog_WINAR="lib"
23768     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23769     break 2
23770   fi
23771 done
23772   done
23773 IFS=$as_save_IFS
23774 
23775 fi
23776 fi
23777 WINAR=$ac_cv_prog_WINAR
23778 if test -n "$WINAR"; then
23779   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINAR" >&5
23780 $as_echo "$WINAR" >&6; }
23781 else
23782   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23783 $as_echo "no" >&6; }
23784 fi
23785 
23786 
23787 
23788   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23789 
23790   # First separate the path from the arguments. This will split at the first
23791   # space.
23792   complete="$WINAR"
23793   path="${complete%% *}"
23794   tmp="$complete EOL"
23795   arguments="${tmp#* }"
23796 
23797   # Input might be given as Windows format, start by converting to
23798   # unix format.
23799   new_path=`$CYGPATH -u "$path"`
23800 
23801   # Now try to locate executable using which
23802   new_path=`$WHICH "$new_path" 2> /dev/null`
23803   # bat and cmd files are not always considered executable in cygwin causing which
23804   # to not find them
23805   if test "x$new_path" = x \
23806            && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23807            && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23808     new_path=`$CYGPATH -u "$path"`
23809   fi
23810   if test "x$new_path" = x; then
23811     # Oops. Which didn't find the executable.
23812     # The splitting of arguments from the executable at a space might have been incorrect,
23813     # since paths with space are more likely in Windows. Give it another try with the whole
23814     # argument.
23815     path="$complete"
23816     arguments="EOL"
23817     new_path=`$CYGPATH -u "$path"`
23818     new_path=`$WHICH "$new_path" 2> /dev/null`
23819     # bat and cmd files are not always considered executable in cygwin causing which
23820     # to not find them
23821     if test "x$new_path" = x \
23822              && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23823              && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23824       new_path=`$CYGPATH -u "$path"`
23825     fi
23826     if test "x$new_path" = x; then
23827       # It's still not found. Now this is an unrecoverable error.
23828       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$complete\", is not found." >&5
23829 $as_echo "$as_me: The path of WINAR, which resolves as \"$complete\", is not found." >&6;}
23830       has_space=`$ECHO "$complete" | $GREP " "`
23831       if test "x$has_space" != x; then
23832         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23833 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23834       fi
23835       as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5
23836     fi
23837   fi
23838 
23839   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23840   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23841   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23842   # "foo.exe" is OK but "foo" is an error.
23843   #
23844   # This test is therefore slightly more accurate than "test -f" to check for file precense.
23845   # It is also a way to make sure we got the proper file name for the real test later on.
23846   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23847   if test "x$test_shortpath" = x; then
23848     # Short path failed, file does not exist as specified.
23849     # Try adding .exe or .cmd
23850     if test -f "${new_path}.exe"; then
23851        input_to_shortpath="${new_path}.exe"
23852     elif test -f "${new_path}.cmd"; then
23853        input_to_shortpath="${new_path}.cmd"
23854     else
23855       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$new_path\", is invalid." >&5
23856 $as_echo "$as_me: The path of WINAR, which resolves as \"$new_path\", is invalid." >&6;}
23857       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
23858 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
23859       as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5
23860     fi
23861   else
23862     input_to_shortpath="$new_path"
23863   fi
23864 
23865   # Call helper function which possibly converts this using DOS-style short mode.
23866   # If so, the updated path is stored in $new_path.
23867   new_path="$input_to_shortpath"
23868 
23869   input_path="$input_to_shortpath"
23870   # Check if we need to convert this using DOS-style short mode. If the path
23871   # contains just simple characters, use it. Otherwise (spaces, weird characters),
23872   # take no chances and rewrite it.
23873   # Note: m4 eats our [], so we need to use [ and ] instead.
23874   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23875   if test "x$has_forbidden_chars" != x; then
23876     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23877     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23878     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23879     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23880       # Going to short mode and back again did indeed matter. Since short mode is
23881       # case insensitive, let's make it lowercase to improve readability.
23882       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23883       # Now convert it back to Unix-stile (cygpath)
23884       input_path=`$CYGPATH -u "$shortmode_path"`
23885       new_path="$input_path"
23886     fi
23887   fi
23888 
23889   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23890   if test "x$test_cygdrive_prefix" = x; then
23891     # As a simple fix, exclude /usr/bin since it's not a real path.
23892     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
23893       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23894       # a path prefixed by /cygdrive for fixpath to work.
23895       new_path="$CYGWIN_ROOT_PATH$input_path"
23896     fi
23897   fi
23898 
23899   # remove trailing .exe if any
23900   new_path="${new_path/%.exe/}"
23901 
23902   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23903 
23904   # First separate the path from the arguments. This will split at the first
23905   # space.
23906   complete="$WINAR"
23907   path="${complete%% *}"
23908   tmp="$complete EOL"
23909   arguments="${tmp#* }"
23910 
23911   # Input might be given as Windows format, start by converting to
23912   # unix format.
23913   new_path="$path"
23914 
23915   windows_path="$new_path"
23916   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23917     unix_path=`$CYGPATH -u "$windows_path"`
23918     new_path="$unix_path"
23919   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23920     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23921     new_path="$unix_path"
23922   fi
23923 
23924 
23925   # Now try to locate executable using which
23926   new_path=`$WHICH "$new_path" 2> /dev/null`
23927 
23928   if test "x$new_path" = x; then
23929     # Oops. Which didn't find the executable.
23930     # The splitting of arguments from the executable