1 #! /bin/sh
   2 # Guess values for system-dependent variables and create Makefiles.
   3 # Generated by GNU Autoconf 2.67 for OpenJDK jdk8.
   4 #
   5 # Report bugs to <build-dev@openjdk.java.net>.
   6 #
   7 #
   8 # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
   9 # 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software
  10 # Foundation, Inc.
  11 #
  12 #
  13 # This configure script is free software; the Free Software Foundation
  14 # gives unlimited permission to copy, distribute and modify it.
  15 ## -------------------- ##
  16 ## M4sh Initialization. ##
  17 ## -------------------- ##
  18 
  19 # Be more Bourne compatible
  20 DUALCASE=1; export DUALCASE # for MKS sh
  21 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
  22   emulate sh
  23   NULLCMD=:
  24   # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
  25   # is contrary to our usage.  Disable this feature.
  26   alias -g '${1+"$@"}'='"$@"'
  27   setopt NO_GLOB_SUBST
  28 else
  29   case `(set -o) 2>/dev/null` in #(
  30   *posix*) :
  31     set -o posix ;; #(
  32   *) :
  33      ;;
  34 esac
  35 fi
  36 
  37 
  38 as_nl='
  39 '
  40 export as_nl
  41 # Printing a long string crashes Solaris 7 /usr/bin/printf.
  42 as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
  43 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
  44 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
  45 # Prefer a ksh shell builtin over an external printf program on Solaris,
  46 # but without wasting forks for bash or zsh.
  47 if test -z "$BASH_VERSION$ZSH_VERSION" \
  48     && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
  49   as_echo='print -r --'
  50   as_echo_n='print -rn --'
  51 elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
  52   as_echo='printf %s\n'
  53   as_echo_n='printf %s'
  54 else
  55   if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
  56     as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
  57     as_echo_n='/usr/ucb/echo -n'
  58   else
  59     as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
  60     as_echo_n_body='eval
  61       arg=$1;
  62       case $arg in #(
  63       *"$as_nl"*)
  64         expr "X$arg" : "X\\(.*\\)$as_nl";
  65         arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
  66       esac;
  67       expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
  68     '
  69     export as_echo_n_body
  70     as_echo_n='sh -c $as_echo_n_body as_echo'
  71   fi
  72   export as_echo_body
  73   as_echo='sh -c $as_echo_body as_echo'
  74 fi
  75 
  76 # The user is always right.
  77 if test "${PATH_SEPARATOR+set}" != set; then
  78   PATH_SEPARATOR=:
  79   (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
  80     (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
  81       PATH_SEPARATOR=';'
  82   }
  83 fi
  84 
  85 
  86 # IFS
  87 # We need space, tab and new line, in precisely that order.  Quoting is
  88 # there to prevent editors from complaining about space-tab.
  89 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
  90 # splitting by setting IFS to empty value.)
  91 IFS=" ""        $as_nl"
  92 
  93 # Find who we are.  Look in the path if we contain no directory separator.
  94 case $0 in #((
  95   *[\\/]* ) as_myself=$0 ;;
  96   *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
  97 for as_dir in $PATH
  98 do
  99   IFS=$as_save_IFS
 100   test -z "$as_dir" && as_dir=.
 101     test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
 102   done
 103 IFS=$as_save_IFS
 104 
 105      ;;
 106 esac
 107 # We did not find ourselves, most probably we were run as `sh COMMAND'
 108 # in which case we are not to be found in the path.
 109 if test "x$as_myself" = x; then
 110   as_myself=$0
 111 fi
 112 if test ! -f "$as_myself"; then
 113   $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
 114   exit 1
 115 fi
 116 
 117 # Unset variables that we do not need and which cause bugs (e.g. in
 118 # pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
 119 # suppresses any "Segmentation fault" message there.  '((' could
 120 # trigger a bug in pdksh 5.2.14.
 121 for as_var in BASH_ENV ENV MAIL MAILPATH
 122 do eval test x\${$as_var+set} = xset \
 123   && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
 124 done
 125 PS1='$ '
 126 PS2='> '
 127 PS4='+ '
 128 
 129 # NLS nuisances.
 130 LC_ALL=C
 131 export LC_ALL
 132 LANGUAGE=C
 133 export LANGUAGE
 134 
 135 # CDPATH.
 136 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
 137 
 138 if test "x$CONFIG_SHELL" = x; then
 139   as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
 140   emulate sh
 141   NULLCMD=:
 142   # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
 143   # is contrary to our usage.  Disable this feature.
 144   alias -g '\${1+\"\$@\"}'='\"\$@\"'
 145   setopt NO_GLOB_SUBST
 146 else
 147   case \`(set -o) 2>/dev/null\` in #(
 148   *posix*) :
 149     set -o posix ;; #(
 150   *) :
 151      ;;
 152 esac
 153 fi
 154 "
 155   as_required="as_fn_return () { (exit \$1); }
 156 as_fn_success () { as_fn_return 0; }
 157 as_fn_failure () { as_fn_return 1; }
 158 as_fn_ret_success () { return 0; }
 159 as_fn_ret_failure () { return 1; }
 160 
 161 exitcode=0
 162 as_fn_success || { exitcode=1; echo as_fn_success failed.; }
 163 as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
 164 as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
 165 as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
 166 if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
 167 
 168 else
 169   exitcode=1; echo positional parameters were not saved.
 170 fi
 171 test x\$exitcode = x0 || exit 1"
 172   as_suggested="  as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
 173   as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
 174   eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
 175   test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
 176 test \$(( 1 + 1 )) = 2 || exit 1"
 177   if (eval "$as_required") 2>/dev/null; then :
 178   as_have_required=yes
 179 else
 180   as_have_required=no
 181 fi
 182   if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
 183 
 184 else
 185   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
 186 as_found=false
 187 for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
 188 do
 189   IFS=$as_save_IFS
 190   test -z "$as_dir" && as_dir=.
 191   as_found=:
 192   case $as_dir in #(
 193          /*)
 194            for as_base in sh bash ksh sh5; do
 195              # Try only shells that exist, to save several forks.
 196              as_shell=$as_dir/$as_base
 197              if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
 198                     { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
 199   CONFIG_SHELL=$as_shell as_have_required=yes
 200                    if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
 201   break 2
 202 fi
 203 fi
 204            done;;
 205        esac
 206   as_found=false
 207 done
 208 $as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
 209               { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
 210   CONFIG_SHELL=$SHELL as_have_required=yes
 211 fi; }
 212 IFS=$as_save_IFS
 213 
 214 
 215       if test "x$CONFIG_SHELL" != x; then :
 216   # We cannot yet assume a decent shell, so we have to provide a
 217         # neutralization value for shells without unset; and this also
 218         # works around shells that cannot unset nonexistent variables.
 219         BASH_ENV=/dev/null
 220         ENV=/dev/null
 221         (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
 222         export CONFIG_SHELL
 223         exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"}
 224 fi
 225 
 226     if test x$as_have_required = xno; then :
 227   $as_echo "$0: This script requires a shell more modern than all"
 228   $as_echo "$0: the shells that I found on your system."
 229   if test x${ZSH_VERSION+set} = xset ; then
 230     $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
 231     $as_echo "$0: be upgraded to zsh 4.3.4 or later."
 232   else
 233     $as_echo "$0: Please tell bug-autoconf@gnu.org and
 234 $0: build-dev@openjdk.java.net about your system, including
 235 $0: any error possibly output before this message. Then
 236 $0: install a modern shell, or manually run the script
 237 $0: under such a shell if you do have one."
 238   fi
 239   exit 1
 240 fi
 241 fi
 242 fi
 243 SHELL=${CONFIG_SHELL-/bin/sh}
 244 export SHELL
 245 # Unset more variables known to interfere with behavior of common tools.
 246 CLICOLOR_FORCE= GREP_OPTIONS=
 247 unset CLICOLOR_FORCE GREP_OPTIONS
 248 
 249 ## --------------------- ##
 250 ## M4sh Shell Functions. ##
 251 ## --------------------- ##
 252 # as_fn_unset VAR
 253 # ---------------
 254 # Portably unset VAR.
 255 as_fn_unset ()
 256 {
 257   { eval $1=; unset $1;}
 258 }
 259 as_unset=as_fn_unset
 260 
 261 # as_fn_set_status STATUS
 262 # -----------------------
 263 # Set $? to STATUS, without forking.
 264 as_fn_set_status ()
 265 {
 266   return $1
 267 } # as_fn_set_status
 268 
 269 # as_fn_exit STATUS
 270 # -----------------
 271 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
 272 as_fn_exit ()
 273 {
 274   set +e
 275   as_fn_set_status $1
 276   exit $1
 277 } # as_fn_exit
 278 
 279 # as_fn_mkdir_p
 280 # -------------
 281 # Create "$as_dir" as a directory, including parents if necessary.
 282 as_fn_mkdir_p ()
 283 {
 284 
 285   case $as_dir in #(
 286   -*) as_dir=./$as_dir;;
 287   esac
 288   test -d "$as_dir" || eval $as_mkdir_p || {
 289     as_dirs=
 290     while :; do
 291       case $as_dir in #(
 292       *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
 293       *) as_qdir=$as_dir;;
 294       esac
 295       as_dirs="'$as_qdir' $as_dirs"
 296       as_dir=`$as_dirname -- "$as_dir" ||
 297 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
 298          X"$as_dir" : 'X\(//\)[^/]' \| \
 299          X"$as_dir" : 'X\(//\)$' \| \
 300          X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
 301 $as_echo X"$as_dir" |
 302     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
 303             s//\1/
 304             q
 305           }
 306           /^X\(\/\/\)[^/].*/{
 307             s//\1/
 308             q
 309           }
 310           /^X\(\/\/\)$/{
 311             s//\1/
 312             q
 313           }
 314           /^X\(\/\).*/{
 315             s//\1/
 316             q
 317           }
 318           s/.*/./; q'`
 319       test -d "$as_dir" && break
 320     done
 321     test -z "$as_dirs" || eval "mkdir $as_dirs"
 322   } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
 323 
 324 
 325 } # as_fn_mkdir_p
 326 # as_fn_append VAR VALUE
 327 # ----------------------
 328 # Append the text in VALUE to the end of the definition contained in VAR. Take
 329 # advantage of any shell optimizations that allow amortized linear growth over
 330 # repeated appends, instead of the typical quadratic growth present in naive
 331 # implementations.
 332 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
 333   eval 'as_fn_append ()
 334   {
 335     eval $1+=\$2
 336   }'
 337 else
 338   as_fn_append ()
 339   {
 340     eval $1=\$$1\$2
 341   }
 342 fi # as_fn_append
 343 
 344 # as_fn_arith ARG...
 345 # ------------------
 346 # Perform arithmetic evaluation on the ARGs, and store the result in the
 347 # global $as_val. Take advantage of shells that can avoid forks. The arguments
 348 # must be portable across $(()) and expr.
 349 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
 350   eval 'as_fn_arith ()
 351   {
 352     as_val=$(( $* ))
 353   }'
 354 else
 355   as_fn_arith ()
 356   {
 357     as_val=`expr "$@" || test $? -eq 1`
 358   }
 359 fi # as_fn_arith
 360 
 361 
 362 # as_fn_error STATUS ERROR [LINENO LOG_FD]
 363 # ----------------------------------------
 364 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
 365 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
 366 # script with STATUS, using 1 if that was 0.
 367 as_fn_error ()
 368 {
 369   as_status=$1; test $as_status -eq 0 && as_status=1
 370   if test "$4"; then
 371     as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
 372     $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
 373   fi
 374   $as_echo "$as_me: error: $2" >&2
 375   as_fn_exit $as_status
 376 } # as_fn_error
 377 
 378 if expr a : '\(a\)' >/dev/null 2>&1 &&
 379    test "X`expr 00001 : '.*\(...\)'`" = X001; then
 380   as_expr=expr
 381 else
 382   as_expr=false
 383 fi
 384 
 385 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
 386   as_basename=basename
 387 else
 388   as_basename=false
 389 fi
 390 
 391 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
 392   as_dirname=dirname
 393 else
 394   as_dirname=false
 395 fi
 396 
 397 as_me=`$as_basename -- "$0" ||
 398 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
 399          X"$0" : 'X\(//\)$' \| \
 400          X"$0" : 'X\(/\)' \| . 2>/dev/null ||
 401 $as_echo X/"$0" |
 402     sed '/^.*\/\([^/][^/]*\)\/*$/{
 403             s//\1/
 404             q
 405           }
 406           /^X\/\(\/\/\)$/{
 407             s//\1/
 408             q
 409           }
 410           /^X\/\(\/\).*/{
 411             s//\1/
 412             q
 413           }
 414           s/.*/./; q'`
 415 
 416 # Avoid depending upon Character Ranges.
 417 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
 418 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
 419 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
 420 as_cr_digits='0123456789'
 421 as_cr_alnum=$as_cr_Letters$as_cr_digits
 422 
 423 
 424   as_lineno_1=$LINENO as_lineno_1a=$LINENO
 425   as_lineno_2=$LINENO as_lineno_2a=$LINENO
 426   eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
 427   test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
 428   # Blame Lee E. McMahon (1931-1989) for sed's syntax.  :-)
 429   sed -n '
 430     p
 431     /[$]LINENO/=
 432   ' <$as_myself |
 433     sed '
 434       s/[$]LINENO.*/&-/
 435       t lineno
 436       b
 437       :lineno
 438       N
 439       :loop
 440       s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
 441       t loop
 442       s/-\n.*//
 443     ' >$as_me.lineno &&
 444   chmod +x "$as_me.lineno" ||
 445     { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
 446 
 447   # Don't try to exec as it changes $[0], causing all sort of problems
 448   # (the dirname of $[0] is not the place where we might find the
 449   # original and so on.  Autoconf is especially sensitive to this).
 450   . "./$as_me.lineno"
 451   # Exit status is that of the last command.
 452   exit
 453 }
 454 
 455 ECHO_C= ECHO_N= ECHO_T=
 456 case `echo -n x` in #(((((
 457 -n*)
 458   case `echo 'xy\c'` in
 459   *c*) ECHO_T=' ';;     # ECHO_T is single tab character.
 460   xy)  ECHO_C='\c';;
 461   *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
 462        ECHO_T=' ';;
 463   esac;;
 464 *)
 465   ECHO_N='-n';;
 466 esac
 467 
 468 rm -f conf$$ conf$$.exe conf$$.file
 469 if test -d conf$$.dir; then
 470   rm -f conf$$.dir/conf$$.file
 471 else
 472   rm -f conf$$.dir
 473   mkdir conf$$.dir 2>/dev/null
 474 fi
 475 if (echo >conf$$.file) 2>/dev/null; then
 476   if ln -s conf$$.file conf$$ 2>/dev/null; then
 477     as_ln_s='ln -s'
 478     # ... but there are two gotchas:
 479     # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
 480     # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
 481     # In both cases, we have to default to `cp -p'.
 482     ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
 483       as_ln_s='cp -p'
 484   elif ln conf$$.file conf$$ 2>/dev/null; then
 485     as_ln_s=ln
 486   else
 487     as_ln_s='cp -p'
 488   fi
 489 else
 490   as_ln_s='cp -p'
 491 fi
 492 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
 493 rmdir conf$$.dir 2>/dev/null
 494 
 495 if mkdir -p . 2>/dev/null; then
 496   as_mkdir_p='mkdir -p "$as_dir"'
 497 else
 498   test -d ./-p && rmdir ./-p
 499   as_mkdir_p=false
 500 fi
 501 
 502 if test -x / >/dev/null 2>&1; then
 503   as_test_x='test -x'
 504 else
 505   if ls -dL / >/dev/null 2>&1; then
 506     as_ls_L_option=L
 507   else
 508     as_ls_L_option=
 509   fi
 510   as_test_x='
 511     eval sh -c '\''
 512       if test -d "$1"; then
 513         test -d "$1/.";
 514       else
 515         case $1 in #(
 516         -*)set "./$1";;
 517         esac;
 518         case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
 519         ???[sx]*):;;*)false;;esac;fi
 520     '\'' sh
 521   '
 522 fi
 523 as_executable_p=$as_test_x
 524 
 525 # Sed expression to map a string onto a valid CPP name.
 526 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
 527 
 528 # Sed expression to map a string onto a valid variable name.
 529 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
 530 
 531 
 532 test -n "$DJDIR" || exec 7<&0 </dev/null
 533 exec 6>&1
 534 
 535 # Name of the host.
 536 # hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
 537 # so uname gets run too.
 538 ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
 539 
 540 #
 541 # Initializations.
 542 #
 543 ac_default_prefix=/usr/local
 544 ac_clean_files=
 545 ac_config_libobj_dir=.
 546 LIBOBJS=
 547 cross_compiling=no
 548 subdirs=
 549 MFLAGS=
 550 MAKEFLAGS=
 551 
 552 # Identity of this package.
 553 PACKAGE_NAME='OpenJDK'
 554 PACKAGE_TARNAME='openjdk'
 555 PACKAGE_VERSION='jdk8'
 556 PACKAGE_STRING='OpenJDK jdk8'
 557 PACKAGE_BUGREPORT='build-dev@openjdk.java.net'
 558 PACKAGE_URL='http://openjdk.java.net'
 559 
 560 # Factoring default headers for most tests.
 561 ac_includes_default="\
 562 #include <stdio.h>
 563 #ifdef HAVE_SYS_TYPES_H
 564 # include <sys/types.h>
 565 #endif
 566 #ifdef HAVE_SYS_STAT_H
 567 # include <sys/stat.h>
 568 #endif
 569 #ifdef STDC_HEADERS
 570 # include <stdlib.h>
 571 # include <stddef.h>
 572 #else
 573 # ifdef HAVE_STDLIB_H
 574 #  include <stdlib.h>
 575 # endif
 576 #endif
 577 #ifdef HAVE_STRING_H
 578 # if !defined STDC_HEADERS && defined HAVE_MEMORY_H
 579 #  include <memory.h>
 580 # endif
 581 # include <string.h>
 582 #endif
 583 #ifdef HAVE_STRINGS_H
 584 # include <strings.h>
 585 #endif
 586 #ifdef HAVE_INTTYPES_H
 587 # include <inttypes.h>
 588 #endif
 589 #ifdef HAVE_STDINT_H
 590 # include <stdint.h>
 591 #endif
 592 #ifdef HAVE_UNISTD_H
 593 # include <unistd.h>
 594 #endif"
 595 
 596 ac_subst_vars='LTLIBOBJS
 597 LIBOBJS
 598 CCACHE
 599 USE_PRECOMPILED_HEADER
 600 SJAVAC_SERVER_DIR
 601 ENABLE_SJAVAC
 602 SJAVAC_SERVER_CORES
 603 SJAVAC_SERVER_JAVA
 604 JOBS
 605 MEMORY_SIZE
 606 NUM_CORES
 607 ENABLE_INTREE_EC
 608 SALIB_NAME
 609 HOTSPOT_MAKE_ARGS
 610 FIXPATH
 611 LIBCXX
 612 LLVM_LIBS
 613 LLVM_LDFLAGS
 614 LLVM_CFLAGS
 615 LLVM_CONFIG
 616 LIBFFI_LIBS
 617 LIBFFI_CFLAGS
 618 STATIC_CXX_SETTING
 619 LIBDL
 620 LIBM
 621 LIBZIP_CAN_USE_MMAP
 622 USE_EXTERNAL_LIBZ
 623 USE_EXTERNAL_LIBGIF
 624 USE_EXTERNAL_LIBJPEG
 625 ALSA_LIBS
 626 ALSA_CFLAGS
 627 FREETYPE2_LIB_PATH
 628 USING_SYSTEM_FT_LIB
 629 FREETYPE2_LIBS
 630 FREETYPE2_CFLAGS
 631 CUPS_CFLAGS
 632 OPENWIN_HOME
 633 X_EXTRA_LIBS
 634 X_LIBS
 635 X_PRE_LIBS
 636 X_CFLAGS
 637 XMKMF
 638 CXXFLAGS_DEBUG_SYMBOLS
 639 CFLAGS_DEBUG_SYMBOLS
 640 ZIP_DEBUGINFO_FILES
 641 ENABLE_DEBUG_SYMBOLS
 642 COMPILER_SUPPORTS_TARGET_BITS_FLAG
 643 ZERO_ARCHFLAG
 644 LDFLAGS_CXX_JDK
 645 LDFLAGS_JDKEXE_SUFFIX
 646 LDFLAGS_JDKLIB_SUFFIX
 647 LDFLAGS_JDKEXE
 648 LDFLAGS_JDKLIB
 649 CXXFLAGS_JDKEXE
 650 CXXFLAGS_JDKLIB
 651 CFLAGS_JDKEXE
 652 CFLAGS_JDKLIB
 653 MACOSX_VERSION_MIN
 654 PACKAGE_PATH
 655 LEGACY_EXTRA_LDFLAGS
 656 LEGACY_EXTRA_CXXFLAGS
 657 LEGACY_EXTRA_CFLAGS
 658 CXX_FLAG_DEPS
 659 C_FLAG_DEPS
 660 CXX_O_FLAG_NONE
 661 CXX_O_FLAG_NORM
 662 CXX_O_FLAG_HI
 663 CXX_O_FLAG_HIGHEST
 664 C_O_FLAG_NONE
 665 C_O_FLAG_NORM
 666 C_O_FLAG_HI
 667 C_O_FLAG_HIGHEST
 668 POST_MCS_CMD
 669 POST_STRIP_CMD
 670 SET_EXECUTABLE_ORIGIN
 671 SET_SHARED_LIBRARY_ORIGIN
 672 CXX_FLAG_REORDER
 673 C_FLAG_REORDER
 674 SET_SHARED_LIBRARY_MAPFILE
 675 SET_SHARED_LIBRARY_NAME
 676 SHARED_LIBRARY_FLAGS
 677 EXE_SUFFIX
 678 STATIC_LIBRARY_SUFFIX
 679 SHARED_LIBRARY_SUFFIX
 680 LIBRARY_PREFIX
 681 STATIC_LIBRARY
 682 SHARED_LIBRARY
 683 OBJ_SUFFIX
 684 COMPILER_NAME
 685 LIPO
 686 ac_ct_OBJDUMP
 687 OBJDUMP
 688 ac_ct_OBJCOPY
 689 OBJCOPY
 690 MCS
 691 STRIP
 692 GNM
 693 NM
 694 AS
 695 CXXCPP
 696 CPP
 697 COMPILER_TYPE
 698 RC_FLAGS
 699 DUMPBIN
 700 WINAR
 701 HOTSPOT_RC
 702 HOTSPOT_MT
 703 RC
 704 MT
 705 WINLD
 706 HOTSPOT_LD
 707 HOTSPOT_CXX
 708 ARFLAGS
 709 AR
 710 LDEXECXX
 711 LDCXX
 712 LDEXE
 713 LD
 714 ac_ct_OBJC
 715 OBJCFLAGS
 716 OBJC
 717 ac_ct_CXX
 718 CXXFLAGS
 719 CXX
 720 ac_ct_PROPER_COMPILER_CXX
 721 PROPER_COMPILER_CXX
 722 POTENTIAL_CXX
 723 TOOLS_DIR_CXX
 724 OBJEXT
 725 EXEEXT
 726 ac_ct_CC
 727 CPPFLAGS
 728 LDFLAGS
 729 CFLAGS
 730 CC
 731 ac_ct_PROPER_COMPILER_CC
 732 PROPER_COMPILER_CC
 733 POTENTIAL_CC
 734 TOOLS_DIR_CC
 735 BUILD_LD
 736 BUILD_CXX
 737 BUILD_CC
 738 MSVCR_DLL
 739 DXSDK_INCLUDE_PATH
 740 DXSDK_LIB_PATH
 741 VS_PATH
 742 VS_LIB
 743 VS_INCLUDE
 744 CYGWIN_LINK
 745 AR_OUT_OPTION
 746 LD_OUT_OPTION
 747 EXE_OUT_OPTION
 748 CC_OUT_OPTION
 749 BUILD_HOTSPOT
 750 HOTSPOT_DIST
 751 BUILD_OUTPUT
 752 OVERRIDE_SRC_ROOT
 753 ADD_SRC_ROOT
 754 JDK_TOPDIR
 755 NASHORN_TOPDIR
 756 HOTSPOT_TOPDIR
 757 JAXWS_TOPDIR
 758 JAXP_TOPDIR
 759 CORBA_TOPDIR
 760 LANGTOOLS_TOPDIR
 761 BOOT_JDK_JVMARGS
 762 JAVAC_FLAGS
 763 BOOT_JDK_SOURCETARGET
 764 BOOT_JDK
 765 BOOT_TOOLSJAR
 766 BOOT_RTJAR
 767 JAVA_CHECK
 768 JAVAC_CHECK
 769 COOKED_BUILD_NUMBER
 770 JDK_VERSION
 771 COPYRIGHT_YEAR
 772 MACOSX_BUNDLE_ID_BASE
 773 MACOSX_BUNDLE_NAME_BASE
 774 COMPANY_NAME
 775 JDK_RC_PLATFORM_NAME
 776 PRODUCT_SUFFIX
 777 PRODUCT_NAME
 778 LAUNCHER_NAME
 779 MILESTONE
 780 JDK_BUILD_NUMBER
 781 JDK_UPDATE_VERSION
 782 JDK_MICRO_VERSION
 783 JDK_MINOR_VERSION
 784 JDK_MAJOR_VERSION
 785 USER_RELEASE_SUFFIX
 786 COMPRESS_JARS
 787 UNLIMITED_CRYPTO
 788 CACERTS_FILE
 789 TEST_IN_BUILD
 790 BUILD_HEADLESS
 791 SUPPORT_HEADFUL
 792 SUPPORT_HEADLESS
 793 BDEPS_FTP
 794 BDEPS_UNZIP
 795 OS_VERSION_MICRO
 796 OS_VERSION_MINOR
 797 OS_VERSION_MAJOR
 798 PKG_CONFIG
 799 XATTR
 800 TIME
 801 STAT
 802 HG
 803 READELF
 804 OTOOL
 805 LDD
 806 ZIP
 807 UNZIP
 808 FIND_DELETE
 809 MAKE
 810 CHECK_TOOLSDIR_MAKE
 811 CHECK_TOOLSDIR_GMAKE
 812 CHECK_MAKE
 813 CHECK_GMAKE
 814 PKGHANDLER
 815 OUTPUT_ROOT
 816 CONF_NAME
 817 SPEC
 818 BUILD_VARIANT_RELEASE
 819 DEBUG_CLASSFILES
 820 FASTDEBUG
 821 VARIANT
 822 DEBUG_LEVEL
 823 MACOSX_UNIVERSAL
 824 INCLUDE_SA
 825 JVM_VARIANT_ZEROSHARK
 826 JVM_VARIANT_ZERO
 827 JVM_VARIANT_KERNEL
 828 JVM_VARIANT_MINIMAL1
 829 JVM_VARIANT_CLIENT
 830 JVM_VARIANT_SERVER
 831 JVM_VARIANTS
 832 JDK_VARIANT
 833 SET_OPENJDK
 834 BUILD_LOG_WRAPPER
 835 BUILD_LOG_PREVIOUS
 836 BUILD_LOG
 837 SYS_ROOT
 838 PATH_SEP
 839 SRC_ROOT
 840 ZERO_ARCHDEF
 841 DEFINE_CROSS_COMPILE_ARCH
 842 LP64
 843 OPENJDK_TARGET_OS_API_DIR
 844 OPENJDK_TARGET_CPU_JLI_CFLAGS
 845 OPENJDK_TARGET_CPU_OSARCH
 846 OPENJDK_TARGET_CPU_ISADIR
 847 OPENJDK_TARGET_CPU_LIBDIR
 848 OPENJDK_TARGET_CPU_LEGACY_LIB
 849 OPENJDK_TARGET_CPU_LEGACY
 850 REQUIRED_OS_VERSION
 851 REQUIRED_OS_NAME
 852 COMPILE_TYPE
 853 OPENJDK_TARGET_CPU_ENDIAN
 854 OPENJDK_TARGET_CPU_BITS
 855 OPENJDK_TARGET_CPU_ARCH
 856 OPENJDK_TARGET_CPU
 857 OPENJDK_TARGET_OS_API
 858 OPENJDK_TARGET_OS
 859 OPENJDK_BUILD_CPU_ENDIAN
 860 OPENJDK_BUILD_CPU_BITS
 861 OPENJDK_BUILD_CPU_ARCH
 862 OPENJDK_BUILD_CPU
 863 OPENJDK_BUILD_OS_API
 864 OPENJDK_BUILD_OS
 865 OPENJDK_BUILD_AUTOCONF_NAME
 866 OPENJDK_TARGET_AUTOCONF_NAME
 867 target_os
 868 target_vendor
 869 target_cpu
 870 target
 871 host_os
 872 host_vendor
 873 host_cpu
 874 host
 875 build_os
 876 build_vendor
 877 build_cpu
 878 build
 879 SETFILE
 880 DF
 881 READLINK
 882 CYGPATH
 883 NAWK
 884 SED
 885 FGREP
 886 EGREP
 887 GREP
 888 AWK
 889 XARGS
 890 WHICH
 891 WC
 892 UNIQ
 893 UNAME
 894 TR
 895 TOUCH
 896 TEE
 897 TAR
 898 TAIL
 899 SORT
 900 SH
 901 RM
 902 THEPWDCMD
 903 PRINTF
 904 MV
 905 MKTEMP
 906 MKDIR
 907 LS
 908 LN
 909 HEAD
 910 FIND
 911 FILE
 912 EXPR
 913 ECHO
 914 DIRNAME
 915 DIFF
 916 DATE
 917 CUT
 918 CPIO
 919 CP
 920 COMM
 921 CMP
 922 CHMOD
 923 CAT
 924 BASH
 925 BASENAME
 926 DATE_WHEN_CONFIGURED
 927 CONFIGURE_COMMAND_LINE
 928 CUSTOM_MAKE_DIR
 929 target_alias
 930 host_alias
 931 build_alias
 932 LIBS
 933 ECHO_T
 934 ECHO_N
 935 ECHO_C
 936 DEFS
 937 mandir
 938 localedir
 939 libdir
 940 psdir
 941 pdfdir
 942 dvidir
 943 htmldir
 944 infodir
 945 docdir
 946 oldincludedir
 947 includedir
 948 localstatedir
 949 sharedstatedir
 950 sysconfdir
 951 datadir
 952 datarootdir
 953 libexecdir
 954 sbindir
 955 bindir
 956 program_transform_name
 957 prefix
 958 exec_prefix
 959 PACKAGE_URL
 960 PACKAGE_BUGREPORT
 961 PACKAGE_STRING
 962 PACKAGE_VERSION
 963 PACKAGE_TARNAME
 964 PACKAGE_NAME
 965 PATH_SEPARATOR
 966 SHELL'
 967 ac_subst_files=''
 968 ac_user_opts='
 969 enable_option_checking
 970 with_custom_make_dir
 971 with_target_bits
 972 with_sys_root
 973 with_tools_dir
 974 with_devkit
 975 enable_openjdk_only
 976 with_jdk_variant
 977 with_jvm_variants
 978 enable_debug
 979 with_debug_level
 980 with_conf_name
 981 with_builddeps_conf
 982 with_builddeps_server
 983 with_builddeps_dir
 984 with_builddeps_group
 985 enable_headful
 986 enable_hotspot_test_in_build
 987 with_cacerts_file
 988 enable_unlimited_crypto
 989 with_milestone
 990 with_build_number
 991 with_user_release_suffix
 992 with_boot_jdk
 993 with_boot_jdk_jvmargs
 994 with_add_source_root
 995 with_override_source_root
 996 with_adds_and_overrides
 997 with_override_langtools
 998 with_override_corba
 999 with_override_jaxp
1000 with_override_jaxws
1001 with_override_hotspot
1002 with_override_jdk
1003 with_import_hotspot
1004 with_msvcr_dll
1005 with_dxsdk
1006 with_dxsdk_lib
1007 with_dxsdk_include
1008 with_extra_cflags
1009 with_extra_cxxflags
1010 with_extra_ldflags
1011 enable_debug_symbols
1012 enable_zip_debug_info
1013 enable_macosx_runtime_support
1014 with_x
1015 with_cups
1016 with_cups_include
1017 with_freetype
1018 with_alsa
1019 with_alsa_include
1020 with_alsa_lib
1021 with_giflib
1022 with_zlib
1023 with_stdc__lib
1024 with_num_cores
1025 with_memory_size
1026 with_jobs
1027 with_sjavac_server_java
1028 with_sjavac_server_cores
1029 enable_sjavac
1030 enable_precompiled_headers
1031 enable_ccache
1032 with_ccache_dir
1033 '
1034       ac_precious_vars='build_alias
1035 host_alias
1036 target_alias
1037 PKG_CONFIG
1038 CC
1039 CFLAGS
1040 LDFLAGS
1041 LIBS
1042 CPPFLAGS
1043 CXX
1044 CXXFLAGS
1045 CCC
1046 OBJC
1047 OBJCFLAGS
1048 CPP
1049 CXXCPP
1050 XMKMF
1051 FREETYPE2_CFLAGS
1052 FREETYPE2_LIBS
1053 ALSA_CFLAGS
1054 ALSA_LIBS
1055 LIBFFI_CFLAGS
1056 LIBFFI_LIBS'
1057 
1058 
1059 # Initialize some variables set by options.
1060 ac_init_help=
1061 ac_init_version=false
1062 ac_unrecognized_opts=
1063 ac_unrecognized_sep=
1064 # The variables have the same names as the options, with
1065 # dashes changed to underlines.
1066 cache_file=/dev/null
1067 exec_prefix=NONE
1068 no_create=
1069 no_recursion=
1070 prefix=NONE
1071 program_prefix=NONE
1072 program_suffix=NONE
1073 program_transform_name=s,x,x,
1074 silent=
1075 site=
1076 srcdir=
1077 verbose=
1078 x_includes=NONE
1079 x_libraries=NONE
1080 
1081 # Installation directory options.
1082 # These are left unexpanded so users can "make install exec_prefix=/foo"
1083 # and all the variables that are supposed to be based on exec_prefix
1084 # by default will actually change.
1085 # Use braces instead of parens because sh, perl, etc. also accept them.
1086 # (The list follows the same order as the GNU Coding Standards.)
1087 bindir='${exec_prefix}/bin'
1088 sbindir='${exec_prefix}/sbin'
1089 libexecdir='${exec_prefix}/libexec'
1090 datarootdir='${prefix}/share'
1091 datadir='${datarootdir}'
1092 sysconfdir='${prefix}/etc'
1093 sharedstatedir='${prefix}/com'
1094 localstatedir='${prefix}/var'
1095 includedir='${prefix}/include'
1096 oldincludedir='/usr/include'
1097 docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
1098 infodir='${datarootdir}/info'
1099 htmldir='${docdir}'
1100 dvidir='${docdir}'
1101 pdfdir='${docdir}'
1102 psdir='${docdir}'
1103 libdir='${exec_prefix}/lib'
1104 localedir='${datarootdir}/locale'
1105 mandir='${datarootdir}/man'
1106 
1107 ac_prev=
1108 ac_dashdash=
1109 for ac_option
1110 do
1111   # If the previous option needs an argument, assign it.
1112   if test -n "$ac_prev"; then
1113     eval $ac_prev=\$ac_option
1114     ac_prev=
1115     continue
1116   fi
1117 
1118   case $ac_option in
1119   *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
1120   *=)   ac_optarg= ;;
1121   *)    ac_optarg=yes ;;
1122   esac
1123 
1124   # Accept the important Cygnus configure options, so we can diagnose typos.
1125 
1126   case $ac_dashdash$ac_option in
1127   --)
1128     ac_dashdash=yes ;;
1129 
1130   -bindir | --bindir | --bindi | --bind | --bin | --bi)
1131     ac_prev=bindir ;;
1132   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
1133     bindir=$ac_optarg ;;
1134 
1135   -build | --build | --buil | --bui | --bu)
1136     ac_prev=build_alias ;;
1137   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
1138     build_alias=$ac_optarg ;;
1139 
1140   -cache-file | --cache-file | --cache-fil | --cache-fi \
1141   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1142     ac_prev=cache_file ;;
1143   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1144   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
1145     cache_file=$ac_optarg ;;
1146 
1147   --config-cache | -C)
1148     cache_file=config.cache ;;
1149 
1150   -datadir | --datadir | --datadi | --datad)
1151     ac_prev=datadir ;;
1152   -datadir=* | --datadir=* | --datadi=* | --datad=*)
1153     datadir=$ac_optarg ;;
1154 
1155   -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1156   | --dataroo | --dataro | --datar)
1157     ac_prev=datarootdir ;;
1158   -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1159   | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1160     datarootdir=$ac_optarg ;;
1161 
1162   -disable-* | --disable-*)
1163     ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1164     # Reject names that are not valid shell variable names.
1165     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1166       as_fn_error $? "invalid feature name: $ac_useropt"
1167     ac_useropt_orig=$ac_useropt
1168     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1169     case $ac_user_opts in
1170       *"
1171 "enable_$ac_useropt"
1172 "*) ;;
1173       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1174          ac_unrecognized_sep=', ';;
1175     esac
1176     eval enable_$ac_useropt=no ;;
1177 
1178   -docdir | --docdir | --docdi | --doc | --do)
1179     ac_prev=docdir ;;
1180   -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1181     docdir=$ac_optarg ;;
1182 
1183   -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1184     ac_prev=dvidir ;;
1185   -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1186     dvidir=$ac_optarg ;;
1187 
1188   -enable-* | --enable-*)
1189     ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1190     # Reject names that are not valid shell variable names.
1191     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1192       as_fn_error $? "invalid feature name: $ac_useropt"
1193     ac_useropt_orig=$ac_useropt
1194     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1195     case $ac_user_opts in
1196       *"
1197 "enable_$ac_useropt"
1198 "*) ;;
1199       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1200          ac_unrecognized_sep=', ';;
1201     esac
1202     eval enable_$ac_useropt=\$ac_optarg ;;
1203 
1204   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1205   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1206   | --exec | --exe | --ex)
1207     ac_prev=exec_prefix ;;
1208   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1209   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1210   | --exec=* | --exe=* | --ex=*)
1211     exec_prefix=$ac_optarg ;;
1212 
1213   -gas | --gas | --ga | --g)
1214     # Obsolete; use --with-gas.
1215     with_gas=yes ;;
1216 
1217   -help | --help | --hel | --he | -h)
1218     ac_init_help=long ;;
1219   -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1220     ac_init_help=recursive ;;
1221   -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1222     ac_init_help=short ;;
1223 
1224   -host | --host | --hos | --ho)
1225     ac_prev=host_alias ;;
1226   -host=* | --host=* | --hos=* | --ho=*)
1227     host_alias=$ac_optarg ;;
1228 
1229   -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1230     ac_prev=htmldir ;;
1231   -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1232   | --ht=*)
1233     htmldir=$ac_optarg ;;
1234 
1235   -includedir | --includedir | --includedi | --included | --include \
1236   | --includ | --inclu | --incl | --inc)
1237     ac_prev=includedir ;;
1238   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1239   | --includ=* | --inclu=* | --incl=* | --inc=*)
1240     includedir=$ac_optarg ;;
1241 
1242   -infodir | --infodir | --infodi | --infod | --info | --inf)
1243     ac_prev=infodir ;;
1244   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1245     infodir=$ac_optarg ;;
1246 
1247   -libdir | --libdir | --libdi | --libd)
1248     ac_prev=libdir ;;
1249   -libdir=* | --libdir=* | --libdi=* | --libd=*)
1250     libdir=$ac_optarg ;;
1251 
1252   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1253   | --libexe | --libex | --libe)
1254     ac_prev=libexecdir ;;
1255   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1256   | --libexe=* | --libex=* | --libe=*)
1257     libexecdir=$ac_optarg ;;
1258 
1259   -localedir | --localedir | --localedi | --localed | --locale)
1260     ac_prev=localedir ;;
1261   -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1262     localedir=$ac_optarg ;;
1263 
1264   -localstatedir | --localstatedir | --localstatedi | --localstated \
1265   | --localstate | --localstat | --localsta | --localst | --locals)
1266     ac_prev=localstatedir ;;
1267   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1268   | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1269     localstatedir=$ac_optarg ;;
1270 
1271   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1272     ac_prev=mandir ;;
1273   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1274     mandir=$ac_optarg ;;
1275 
1276   -nfp | --nfp | --nf)
1277     # Obsolete; use --without-fp.
1278     with_fp=no ;;
1279 
1280   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1281   | --no-cr | --no-c | -n)
1282     no_create=yes ;;
1283 
1284   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1285   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1286     no_recursion=yes ;;
1287 
1288   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1289   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1290   | --oldin | --oldi | --old | --ol | --o)
1291     ac_prev=oldincludedir ;;
1292   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1293   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1294   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1295     oldincludedir=$ac_optarg ;;
1296 
1297   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1298     ac_prev=prefix ;;
1299   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1300     prefix=$ac_optarg ;;
1301 
1302   -program-prefix | --program-prefix | --program-prefi | --program-pref \
1303   | --program-pre | --program-pr | --program-p)
1304     ac_prev=program_prefix ;;
1305   -program-prefix=* | --program-prefix=* | --program-prefi=* \
1306   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1307     program_prefix=$ac_optarg ;;
1308 
1309   -program-suffix | --program-suffix | --program-suffi | --program-suff \
1310   | --program-suf | --program-su | --program-s)
1311     ac_prev=program_suffix ;;
1312   -program-suffix=* | --program-suffix=* | --program-suffi=* \
1313   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1314     program_suffix=$ac_optarg ;;
1315 
1316   -program-transform-name | --program-transform-name \
1317   | --program-transform-nam | --program-transform-na \
1318   | --program-transform-n | --program-transform- \
1319   | --program-transform | --program-transfor \
1320   | --program-transfo | --program-transf \
1321   | --program-trans | --program-tran \
1322   | --progr-tra | --program-tr | --program-t)
1323     ac_prev=program_transform_name ;;
1324   -program-transform-name=* | --program-transform-name=* \
1325   | --program-transform-nam=* | --program-transform-na=* \
1326   | --program-transform-n=* | --program-transform-=* \
1327   | --program-transform=* | --program-transfor=* \
1328   | --program-transfo=* | --program-transf=* \
1329   | --program-trans=* | --program-tran=* \
1330   | --progr-tra=* | --program-tr=* | --program-t=*)
1331     program_transform_name=$ac_optarg ;;
1332 
1333   -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1334     ac_prev=pdfdir ;;
1335   -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1336     pdfdir=$ac_optarg ;;
1337 
1338   -psdir | --psdir | --psdi | --psd | --ps)
1339     ac_prev=psdir ;;
1340   -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1341     psdir=$ac_optarg ;;
1342 
1343   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1344   | -silent | --silent | --silen | --sile | --sil)
1345     silent=yes ;;
1346 
1347   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1348     ac_prev=sbindir ;;
1349   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1350   | --sbi=* | --sb=*)
1351     sbindir=$ac_optarg ;;
1352 
1353   -sharedstatedir | --sharedstatedir | --sharedstatedi \
1354   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1355   | --sharedst | --shareds | --shared | --share | --shar \
1356   | --sha | --sh)
1357     ac_prev=sharedstatedir ;;
1358   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1359   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1360   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1361   | --sha=* | --sh=*)
1362     sharedstatedir=$ac_optarg ;;
1363 
1364   -site | --site | --sit)
1365     ac_prev=site ;;
1366   -site=* | --site=* | --sit=*)
1367     site=$ac_optarg ;;
1368 
1369   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1370     ac_prev=srcdir ;;
1371   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1372     srcdir=$ac_optarg ;;
1373 
1374   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1375   | --syscon | --sysco | --sysc | --sys | --sy)
1376     ac_prev=sysconfdir ;;
1377   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1378   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1379     sysconfdir=$ac_optarg ;;
1380 
1381   -target | --target | --targe | --targ | --tar | --ta | --t)
1382     ac_prev=target_alias ;;
1383   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1384     target_alias=$ac_optarg ;;
1385 
1386   -v | -verbose | --verbose | --verbos | --verbo | --verb)
1387     verbose=yes ;;
1388 
1389   -version | --version | --versio | --versi | --vers | -V)
1390     ac_init_version=: ;;
1391 
1392   -with-* | --with-*)
1393     ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1394     # Reject names that are not valid shell variable names.
1395     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1396       as_fn_error $? "invalid package name: $ac_useropt"
1397     ac_useropt_orig=$ac_useropt
1398     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1399     case $ac_user_opts in
1400       *"
1401 "with_$ac_useropt"
1402 "*) ;;
1403       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1404          ac_unrecognized_sep=', ';;
1405     esac
1406     eval with_$ac_useropt=\$ac_optarg ;;
1407 
1408   -without-* | --without-*)
1409     ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
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--without-$ac_useropt_orig"
1420          ac_unrecognized_sep=', ';;
1421     esac
1422     eval with_$ac_useropt=no ;;
1423 
1424   --x)
1425     # Obsolete; use --with-x.
1426     with_x=yes ;;
1427 
1428   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1429   | --x-incl | --x-inc | --x-in | --x-i)
1430     ac_prev=x_includes ;;
1431   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1432   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1433     x_includes=$ac_optarg ;;
1434 
1435   -x-libraries | --x-libraries | --x-librarie | --x-librari \
1436   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1437     ac_prev=x_libraries ;;
1438   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1439   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1440     x_libraries=$ac_optarg ;;
1441 
1442   -*) as_fn_error $? "unrecognized option: \`$ac_option'
1443 Try \`$0 --help' for more information"
1444     ;;
1445 
1446   *=*)
1447     ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1448     # Reject names that are not valid shell variable names.
1449     case $ac_envvar in #(
1450       '' | [0-9]* | *[!_$as_cr_alnum]* )
1451       as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1452     esac
1453     eval $ac_envvar=\$ac_optarg
1454     export $ac_envvar ;;
1455 
1456   *)
1457     # FIXME: should be removed in autoconf 3.0.
1458     $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1459     expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1460       $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1461     : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
1462     ;;
1463 
1464   esac
1465 done
1466 
1467 if test -n "$ac_prev"; then
1468   ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1469   as_fn_error $? "missing argument to $ac_option"
1470 fi
1471 
1472 if test -n "$ac_unrecognized_opts"; then
1473   case $enable_option_checking in
1474     no) ;;
1475     fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1476     *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1477   esac
1478 fi
1479 
1480 # Check all directory arguments for consistency.
1481 for ac_var in   exec_prefix prefix bindir sbindir libexecdir datarootdir \
1482                 datadir sysconfdir sharedstatedir localstatedir includedir \
1483                 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1484                 libdir localedir mandir
1485 do
1486   eval ac_val=\$$ac_var
1487   # Remove trailing slashes.
1488   case $ac_val in
1489     */ )
1490       ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1491       eval $ac_var=\$ac_val;;
1492   esac
1493   # Be sure to have absolute directory names.
1494   case $ac_val in
1495     [\\/$]* | ?:[\\/]* )  continue;;
1496     NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1497   esac
1498   as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1499 done
1500 
1501 # There might be people who depend on the old broken behavior: `$host'
1502 # used to hold the argument of --host etc.
1503 # FIXME: To remove some day.
1504 build=$build_alias
1505 host=$host_alias
1506 target=$target_alias
1507 
1508 # FIXME: To remove some day.
1509 if test "x$host_alias" != x; then
1510   if test "x$build_alias" = x; then
1511     cross_compiling=maybe
1512     $as_echo "$as_me: WARNING: if you wanted to set the --build type, don't use --host.
1513     If a cross compiler is detected then cross compile mode will be used" >&2
1514   elif test "x$build_alias" != "x$host_alias"; then
1515     cross_compiling=yes
1516   fi
1517 fi
1518 
1519 ac_tool_prefix=
1520 test -n "$host_alias" && ac_tool_prefix=$host_alias-
1521 
1522 test "$silent" = yes && exec 6>/dev/null
1523 
1524 
1525 ac_pwd=`pwd` && test -n "$ac_pwd" &&
1526 ac_ls_di=`ls -di .` &&
1527 ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1528   as_fn_error $? "working directory cannot be determined"
1529 test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1530   as_fn_error $? "pwd does not report name of working directory"
1531 
1532 
1533 # Find the source files, if location was not specified.
1534 if test -z "$srcdir"; then
1535   ac_srcdir_defaulted=yes
1536   # Try the directory containing this script, then the parent directory.
1537   ac_confdir=`$as_dirname -- "$as_myself" ||
1538 $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1539          X"$as_myself" : 'X\(//\)[^/]' \| \
1540          X"$as_myself" : 'X\(//\)$' \| \
1541          X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1542 $as_echo X"$as_myself" |
1543     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1544             s//\1/
1545             q
1546           }
1547           /^X\(\/\/\)[^/].*/{
1548             s//\1/
1549             q
1550           }
1551           /^X\(\/\/\)$/{
1552             s//\1/
1553             q
1554           }
1555           /^X\(\/\).*/{
1556             s//\1/
1557             q
1558           }
1559           s/.*/./; q'`
1560   srcdir=$ac_confdir
1561   if test ! -r "$srcdir/$ac_unique_file"; then
1562     srcdir=..
1563   fi
1564 else
1565   ac_srcdir_defaulted=no
1566 fi
1567 if test ! -r "$srcdir/$ac_unique_file"; then
1568   test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1569   as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1570 fi
1571 ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1572 ac_abs_confdir=`(
1573         cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1574         pwd)`
1575 # When building in place, set srcdir=.
1576 if test "$ac_abs_confdir" = "$ac_pwd"; then
1577   srcdir=.
1578 fi
1579 # Remove unnecessary trailing slashes from srcdir.
1580 # Double slashes in file names in object file debugging info
1581 # mess up M-x gdb in Emacs.
1582 case $srcdir in
1583 */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1584 esac
1585 for ac_var in $ac_precious_vars; do
1586   eval ac_env_${ac_var}_set=\${${ac_var}+set}
1587   eval ac_env_${ac_var}_value=\$${ac_var}
1588   eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1589   eval ac_cv_env_${ac_var}_value=\$${ac_var}
1590 done
1591 
1592 #
1593 # Report the --help message.
1594 #
1595 if test "$ac_init_help" = "long"; then
1596   # Omit some internal or obsolete options to make the list less imposing.
1597   # This message is too long to be a string in the A/UX 3.1 sh.
1598   cat <<_ACEOF
1599 \`configure' configures OpenJDK jdk8 to adapt to many kinds of systems.
1600 
1601 Usage: $0 [OPTION]... [VAR=VALUE]...
1602 
1603 To assign environment variables (e.g., CC, CFLAGS...), specify them as
1604 VAR=VALUE.  See below for descriptions of some of the useful variables.
1605 
1606 Defaults for the options are specified in brackets.
1607 
1608 Configuration:
1609   -h, --help              display this help and exit
1610       --help=short        display options specific to this package
1611       --help=recursive    display the short help of all the included packages
1612   -V, --version           display version information and exit
1613   -q, --quiet, --silent   do not print \`checking ...' messages
1614       --cache-file=FILE   cache test results in FILE [disabled]
1615   -C, --config-cache      alias for \`--cache-file=config.cache'
1616   -n, --no-create         do not create output files
1617       --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1618 
1619 Installation directories:
1620   --prefix=PREFIX         install architecture-independent files in PREFIX
1621                           [$ac_default_prefix]
1622   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1623                           [PREFIX]
1624 
1625 By default, \`make install' will install all the files in
1626 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1627 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1628 for instance \`--prefix=\$HOME'.
1629 
1630 For better control, use the options below.
1631 
1632 Fine tuning of the installation directories:
1633   --bindir=DIR            user executables [EPREFIX/bin]
1634   --sbindir=DIR           system admin executables [EPREFIX/sbin]
1635   --libexecdir=DIR        program executables [EPREFIX/libexec]
1636   --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
1637   --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
1638   --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
1639   --libdir=DIR            object code libraries [EPREFIX/lib]
1640   --includedir=DIR        C header files [PREFIX/include]
1641   --oldincludedir=DIR     C header files for non-gcc [/usr/include]
1642   --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
1643   --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
1644   --infodir=DIR           info documentation [DATAROOTDIR/info]
1645   --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
1646   --mandir=DIR            man documentation [DATAROOTDIR/man]
1647   --docdir=DIR            documentation root [DATAROOTDIR/doc/openjdk]
1648   --htmldir=DIR           html documentation [DOCDIR]
1649   --dvidir=DIR            dvi documentation [DOCDIR]
1650   --pdfdir=DIR            pdf documentation [DOCDIR]
1651   --psdir=DIR             ps documentation [DOCDIR]
1652 _ACEOF
1653 
1654   cat <<\_ACEOF
1655 
1656 X features:
1657   --x-includes=DIR    X include files are in DIR
1658   --x-libraries=DIR   X library files are in DIR
1659 
1660 System types:
1661   --build=BUILD     configure for building on BUILD [guessed]
1662   --host=HOST       cross-compile to build programs to run on HOST [BUILD]
1663   --target=TARGET   configure for building compilers for TARGET [HOST]
1664 _ACEOF
1665 fi
1666 
1667 if test -n "$ac_init_help"; then
1668   case $ac_init_help in
1669      short | recursive ) echo "Configuration of OpenJDK jdk8:";;
1670    esac
1671   cat <<\_ACEOF
1672 
1673 Optional Features:
1674   --disable-option-checking  ignore unrecognized --enable/--with options
1675   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1676   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1677   --enable-openjdk-only   suppress building custom source even if present
1678                           [disabled]
1679   --enable-debug          set the debug level to fastdebug (shorthand for
1680                           --with-debug-level=fastdebug) [disabled]
1681   --disable-headful       disable building headful support (graphical UI
1682                           support) [enabled]
1683   --enable-hotspot-test-in-build
1684                           run the Queens test after Hotspot build [disabled]
1685   --enable-unlimited-crypto
1686                           Enable unlimited crypto policy [disabled]
1687   --disable-debug-symbols disable generation of debug symbols [enabled]
1688   --disable-zip-debug-info
1689                           disable zipping of debug-info files [enabled]
1690   --disable-macosx-runtime-support
1691                           disable the use of MacOSX Java runtime support
1692                           framework [enabled]
1693   --enable-sjavac         use sjavac to do fast incremental compiles
1694                           [disabled]
1695   --disable-precompiled-headers
1696                           disable using precompiled headers when compiling C++
1697                           [enabled]
1698   --disable-ccache        disable using ccache to speed up recompilations
1699                           [enabled]
1700 
1701 Optional Packages:
1702   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
1703   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
1704   --with-custom-make-dir  use this directory for custom build/make files
1705   --with-target-bits      build 32-bit or 64-bit binaries (for platforms that
1706                           support it), e.g. --with-target-bits=32 [guessed]
1707   --with-sys-root         pass this sys-root to the compilers and tools (for
1708                           cross-compiling)
1709   --with-tools-dir        search this directory for compilers and tools (for
1710                           cross-compiling)
1711   --with-devkit           use this directory as base for tools-dir and
1712                           sys-root (for cross-compiling)
1713   --with-jdk-variant      JDK variant to build (normal) [normal]
1714   --with-jvm-variants     JVM variants (separated by commas) to build (server,
1715                           client, minimal1, kernel, zero, zeroshark) [server]
1716   --with-debug-level      set the debug level (release, fastdebug, slowdebug)
1717                           [release]
1718   --with-conf-name        use this as the name of the configuration [generated
1719                           from important configuration options]
1720   --with-builddeps-conf   use this configuration file for the builddeps
1721   --with-builddeps-server download and use build dependencies from this server
1722                           url
1723   --with-builddeps-dir    store downloaded build dependencies here
1724                           [/localhome/builddeps]
1725   --with-builddeps-group  chgrp the downloaded build dependencies to this
1726                           group
1727   --with-cacerts-file     specify alternative cacerts file
1728   --with-milestone        Set milestone value for build [internal]
1729   --with-build-number     Set build number value for build [b00]
1730   --with-user-release-suffix
1731                           Add a custom string to the version string if build
1732                           number isn't set.[username_builddateb00]
1733   --with-boot-jdk         path to Boot JDK (used to bootstrap build) [probed]
1734   --with-boot-jdk-jvmargs specify JVM arguments to be passed to all
1735                           invocations of the Boot JDK, overriding the default
1736                           values, e.g --with-boot-jdk-jvmargs="-Xmx8G
1737                           -enableassertions"
1738   --with-add-source-root  for each and every source directory, look in this
1739                           additional source root for the same directory; if it
1740                           exists and have files in it, include it in the build
1741   --with-override-source-root
1742                           for each and every source directory, look in this
1743                           override source root for the same directory; if it
1744                           exists, use that directory instead and ignore the
1745                           directory in the original source root
1746   --with-adds-and-overrides
1747                           use the subdirs 'adds' and 'overrides' in the
1748                           specified directory as add-source-root and
1749                           override-source-root
1750   --with-override-langtools
1751                           use this langtools dir for the build
1752   --with-override-corba   use this corba dir for the build
1753   --with-override-jaxp    use this jaxp dir for the build
1754   --with-override-jaxws   use this jaxws dir for the build
1755   --with-override-hotspot use this hotspot dir for the build
1756   --with-override-jdk     use this jdk dir for the build
1757   --with-import-hotspot   import hotspot binaries from this jdk image or
1758                           hotspot build dist dir instead of building from
1759                           source
1760   --with-msvcr-dll        copy this msvcr100.dll into the built JDK (Windows
1761                           only) [probed]
1762   --with-dxsdk            the DirectX SDK (Windows only) [probed]
1763   --with-dxsdk-lib        the DirectX SDK lib directory (Windows only)
1764                           [probed]
1765   --with-dxsdk-include    the DirectX SDK include directory (Windows only)
1766                           [probed]
1767   --with-extra-cflags     extra flags to be used when compiling jdk c-files
1768   --with-extra-cxxflags   extra flags to be used when compiling jdk c++-files
1769   --with-extra-ldflags    extra flags to be used when linking jdk
1770   --with-x                use the X Window System
1771   --with-cups             specify prefix directory for the cups package
1772                           (expecting the headers under PATH/include)
1773   --with-cups-include     specify directory for the cups include files
1774   --with-freetype         specify prefix directory for the freetype2 package
1775                           (expecting the libraries under PATH/lib and the
1776                           headers under PATH/include)
1777   --with-alsa             specify prefix directory for the alsa package
1778                           (expecting the libraries under PATH/lib and the
1779                           headers under PATH/include)
1780   --with-alsa-include     specify directory for the alsa include files
1781   --with-alsa-lib         specify directory for the alsa library
1782   --with-giflib           use giflib from build system or OpenJDK source
1783                           (system, bundled) [bundled]
1784   --with-zlib             use zlib from build system or OpenJDK source
1785                           (system, bundled) [bundled]
1786   --with-stdc++lib=<static>,<dynamic>,<default>
1787                           force linking of the C++ runtime on Linux to either
1788                           static or dynamic, default is static with dynamic as
1789                           fallback
1790   --with-num-cores        number of cores in the build system, e.g.
1791                           --with-num-cores=8 [probed]
1792   --with-memory-size      memory (in MB) available in the build system, e.g.
1793                           --with-memory-size=1024 [probed]
1794   --with-jobs             number of parallel jobs to let make run [calculated
1795                           based on cores and memory]
1796   --with-sjavac-server-java
1797                           use this java binary for running the sjavac
1798                           background server [Boot JDK java]
1799   --with-sjavac-server-cores
1800                           use at most this number of concurrent threads on the
1801                           sjavac server [probed]
1802   --with-ccache-dir       where to store ccache files [~/.ccache]
1803 
1804 Some influential environment variables:
1805   PKG_CONFIG  path to pkg-config utility
1806   CC          C compiler command
1807   CFLAGS      C compiler flags
1808   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
1809               nonstandard directory <lib dir>
1810   LIBS        libraries to pass to the linker, e.g. -l<library>
1811   CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
1812               you have headers in a nonstandard directory <include dir>
1813   CXX         C++ compiler command
1814   CXXFLAGS    C++ compiler flags
1815   OBJC        Objective C compiler command
1816   OBJCFLAGS   Objective C compiler flags
1817   CPP         C preprocessor
1818   CXXCPP      C++ preprocessor
1819   XMKMF       Path to xmkmf, Makefile generator for X Window System
1820   FREETYPE2_CFLAGS
1821               C compiler flags for FREETYPE2, overriding pkg-config
1822   FREETYPE2_LIBS
1823               linker flags for FREETYPE2, overriding pkg-config
1824   ALSA_CFLAGS C compiler flags for ALSA, overriding pkg-config
1825   ALSA_LIBS   linker flags for ALSA, overriding pkg-config
1826   LIBFFI_CFLAGS
1827               C compiler flags for LIBFFI, overriding pkg-config
1828   LIBFFI_LIBS linker flags for LIBFFI, overriding pkg-config
1829 
1830 Use these variables to override the choices made by `configure' or to help
1831 it to find libraries and programs with nonstandard names/locations.
1832 
1833 Report bugs to <build-dev@openjdk.java.net>.
1834 OpenJDK home page: <http://openjdk.java.net>.
1835 _ACEOF
1836 ac_status=$?
1837 fi
1838 
1839 if test "$ac_init_help" = "recursive"; then
1840   # If there are subdirs, report their specific --help.
1841   for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
1842     test -d "$ac_dir" ||
1843       { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1844       continue
1845     ac_builddir=.
1846 
1847 case "$ac_dir" in
1848 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1849 *)
1850   ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
1851   # A ".." for each directory in $ac_dir_suffix.
1852   ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
1853   case $ac_top_builddir_sub in
1854   "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1855   *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1856   esac ;;
1857 esac
1858 ac_abs_top_builddir=$ac_pwd
1859 ac_abs_builddir=$ac_pwd$ac_dir_suffix
1860 # for backward compatibility:
1861 ac_top_builddir=$ac_top_build_prefix
1862 
1863 case $srcdir in
1864   .)  # We are building in place.
1865     ac_srcdir=.
1866     ac_top_srcdir=$ac_top_builddir_sub
1867     ac_abs_top_srcdir=$ac_pwd ;;
1868   [\\/]* | ?:[\\/]* )  # Absolute name.
1869     ac_srcdir=$srcdir$ac_dir_suffix;
1870     ac_top_srcdir=$srcdir
1871     ac_abs_top_srcdir=$srcdir ;;
1872   *) # Relative name.
1873     ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1874     ac_top_srcdir=$ac_top_build_prefix$srcdir
1875     ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
1876 esac
1877 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
1878 
1879     cd "$ac_dir" || { ac_status=$?; continue; }
1880     # Check for guested configure.
1881     if test -f "$ac_srcdir/configure.gnu"; then
1882       echo &&
1883       $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1884     elif test -f "$ac_srcdir/configure"; then
1885       echo &&
1886       $SHELL "$ac_srcdir/configure" --help=recursive
1887     else
1888       $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1889     fi || ac_status=$?
1890     cd "$ac_pwd" || { ac_status=$?; break; }
1891   done
1892 fi
1893 
1894 test -n "$ac_init_help" && exit $ac_status
1895 if $ac_init_version; then
1896   cat <<\_ACEOF
1897 OpenJDK configure jdk8
1898 generated by GNU Autoconf 2.67
1899 
1900 Copyright (C) 2010 Free Software Foundation, Inc.
1901 This configure script is free software; the Free Software Foundation
1902 gives unlimited permission to copy, distribute and modify it.
1903 _ACEOF
1904   exit
1905 fi
1906 
1907 ## ------------------------ ##
1908 ## Autoconf initialization. ##
1909 ## ------------------------ ##
1910 
1911 # ac_fn_c_try_compile LINENO
1912 # --------------------------
1913 # Try to compile conftest.$ac_ext, and return whether this succeeded.
1914 ac_fn_c_try_compile ()
1915 {
1916   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1917   rm -f conftest.$ac_objext
1918   if { { ac_try="$ac_compile"
1919 case "(($ac_try" in
1920   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1921   *) ac_try_echo=$ac_try;;
1922 esac
1923 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1924 $as_echo "$ac_try_echo"; } >&5
1925   (eval "$ac_compile") 2>conftest.err
1926   ac_status=$?
1927   if test -s conftest.err; then
1928     grep -v '^ *+' conftest.err >conftest.er1
1929     cat conftest.er1 >&5
1930     mv -f conftest.er1 conftest.err
1931   fi
1932   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1933   test $ac_status = 0; } && {
1934          test -z "$ac_c_werror_flag" ||
1935          test ! -s conftest.err
1936        } && test -s conftest.$ac_objext; then :
1937   ac_retval=0
1938 else
1939   $as_echo "$as_me: failed program was:" >&5
1940 sed 's/^/| /' conftest.$ac_ext >&5
1941 
1942         ac_retval=1
1943 fi
1944   eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1945   as_fn_set_status $ac_retval
1946 
1947 } # ac_fn_c_try_compile
1948 
1949 # ac_fn_cxx_try_compile LINENO
1950 # ----------------------------
1951 # Try to compile conftest.$ac_ext, and return whether this succeeded.
1952 ac_fn_cxx_try_compile ()
1953 {
1954   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1955   rm -f conftest.$ac_objext
1956   if { { ac_try="$ac_compile"
1957 case "(($ac_try" in
1958   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1959   *) ac_try_echo=$ac_try;;
1960 esac
1961 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1962 $as_echo "$ac_try_echo"; } >&5
1963   (eval "$ac_compile") 2>conftest.err
1964   ac_status=$?
1965   if test -s conftest.err; then
1966     grep -v '^ *+' conftest.err >conftest.er1
1967     cat conftest.er1 >&5
1968     mv -f conftest.er1 conftest.err
1969   fi
1970   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1971   test $ac_status = 0; } && {
1972          test -z "$ac_cxx_werror_flag" ||
1973          test ! -s conftest.err
1974        } && test -s conftest.$ac_objext; then :
1975   ac_retval=0
1976 else
1977   $as_echo "$as_me: failed program was:" >&5
1978 sed 's/^/| /' conftest.$ac_ext >&5
1979 
1980         ac_retval=1
1981 fi
1982   eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1983   as_fn_set_status $ac_retval
1984 
1985 } # ac_fn_cxx_try_compile
1986 
1987 # ac_fn_objc_try_compile LINENO
1988 # -----------------------------
1989 # Try to compile conftest.$ac_ext, and return whether this succeeded.
1990 ac_fn_objc_try_compile ()
1991 {
1992   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1993   rm -f conftest.$ac_objext
1994   if { { ac_try="$ac_compile"
1995 case "(($ac_try" in
1996   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1997   *) ac_try_echo=$ac_try;;
1998 esac
1999 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2000 $as_echo "$ac_try_echo"; } >&5
2001   (eval "$ac_compile") 2>conftest.err
2002   ac_status=$?
2003   if test -s conftest.err; then
2004     grep -v '^ *+' conftest.err >conftest.er1
2005     cat conftest.er1 >&5
2006     mv -f conftest.er1 conftest.err
2007   fi
2008   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2009   test $ac_status = 0; } && {
2010          test -z "$ac_objc_werror_flag" ||
2011          test ! -s conftest.err
2012        } && test -s conftest.$ac_objext; then :
2013   ac_retval=0
2014 else
2015   $as_echo "$as_me: failed program was:" >&5
2016 sed 's/^/| /' conftest.$ac_ext >&5
2017 
2018         ac_retval=1
2019 fi
2020   eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2021   as_fn_set_status $ac_retval
2022 
2023 } # ac_fn_objc_try_compile
2024 
2025 # ac_fn_c_try_cpp LINENO
2026 # ----------------------
2027 # Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2028 ac_fn_c_try_cpp ()
2029 {
2030   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2031   if { { ac_try="$ac_cpp conftest.$ac_ext"
2032 case "(($ac_try" in
2033   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2034   *) ac_try_echo=$ac_try;;
2035 esac
2036 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2037 $as_echo "$ac_try_echo"; } >&5
2038   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2039   ac_status=$?
2040   if test -s conftest.err; then
2041     grep -v '^ *+' conftest.err >conftest.er1
2042     cat conftest.er1 >&5
2043     mv -f conftest.er1 conftest.err
2044   fi
2045   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2046   test $ac_status = 0; } > conftest.i && {
2047          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
2048          test ! -s conftest.err
2049        }; then :
2050   ac_retval=0
2051 else
2052   $as_echo "$as_me: failed program was:" >&5
2053 sed 's/^/| /' conftest.$ac_ext >&5
2054 
2055     ac_retval=1
2056 fi
2057   eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2058   as_fn_set_status $ac_retval
2059 
2060 } # ac_fn_c_try_cpp
2061 
2062 # ac_fn_cxx_try_cpp LINENO
2063 # ------------------------
2064 # Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2065 ac_fn_cxx_try_cpp ()
2066 {
2067   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2068   if { { ac_try="$ac_cpp conftest.$ac_ext"
2069 case "(($ac_try" in
2070   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2071   *) ac_try_echo=$ac_try;;
2072 esac
2073 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2074 $as_echo "$ac_try_echo"; } >&5
2075   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2076   ac_status=$?
2077   if test -s conftest.err; then
2078     grep -v '^ *+' conftest.err >conftest.er1
2079     cat conftest.er1 >&5
2080     mv -f conftest.er1 conftest.err
2081   fi
2082   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2083   test $ac_status = 0; } > conftest.i && {
2084          test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
2085          test ! -s conftest.err
2086        }; then :
2087   ac_retval=0
2088 else
2089   $as_echo "$as_me: failed program was:" >&5
2090 sed 's/^/| /' conftest.$ac_ext >&5
2091 
2092     ac_retval=1
2093 fi
2094   eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2095   as_fn_set_status $ac_retval
2096 
2097 } # ac_fn_cxx_try_cpp
2098 
2099 # ac_fn_cxx_check_header_mongrel LINENO HEADER VAR INCLUDES
2100 # ---------------------------------------------------------
2101 # Tests whether HEADER exists, giving a warning if it cannot be compiled using
2102 # the include files in INCLUDES and setting the cache variable VAR
2103 # accordingly.
2104 ac_fn_cxx_check_header_mongrel ()
2105 {
2106   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2107   if eval "test \"\${$3+set}\"" = set; then :
2108   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2109 $as_echo_n "checking for $2... " >&6; }
2110 if eval "test \"\${$3+set}\"" = set; then :
2111   $as_echo_n "(cached) " >&6
2112 fi
2113 eval ac_res=\$$3
2114                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2115 $as_echo "$ac_res" >&6; }
2116 else
2117   # Is the header compilable?
2118 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
2119 $as_echo_n "checking $2 usability... " >&6; }
2120 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2121 /* end confdefs.h.  */
2122 $4
2123 #include <$2>
2124 _ACEOF
2125 if ac_fn_cxx_try_compile "$LINENO"; then :
2126   ac_header_compiler=yes
2127 else
2128   ac_header_compiler=no
2129 fi
2130 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2131 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
2132 $as_echo "$ac_header_compiler" >&6; }
2133 
2134 # Is the header present?
2135 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
2136 $as_echo_n "checking $2 presence... " >&6; }
2137 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2138 /* end confdefs.h.  */
2139 #include <$2>
2140 _ACEOF
2141 if ac_fn_cxx_try_cpp "$LINENO"; then :
2142   ac_header_preproc=yes
2143 else
2144   ac_header_preproc=no
2145 fi
2146 rm -f conftest.err conftest.i conftest.$ac_ext
2147 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
2148 $as_echo "$ac_header_preproc" >&6; }
2149 
2150 # So?  What about this header?
2151 case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in #((
2152   yes:no: )
2153     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
2154 $as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
2155     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2156 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2157     ;;
2158   no:yes:* )
2159     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
2160 $as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
2161     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
2162 $as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
2163     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
2164 $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
2165     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
2166 $as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
2167     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2168 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2169 ( $as_echo "## ----------------------------------------- ##
2170 ## Report this to build-dev@openjdk.java.net ##
2171 ## ----------------------------------------- ##"
2172      ) | sed "s/^/$as_me: WARNING:     /" >&2
2173     ;;
2174 esac
2175   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2176 $as_echo_n "checking for $2... " >&6; }
2177 if eval "test \"\${$3+set}\"" = set; then :
2178   $as_echo_n "(cached) " >&6
2179 else
2180   eval "$3=\$ac_header_compiler"
2181 fi
2182 eval ac_res=\$$3
2183                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2184 $as_echo "$ac_res" >&6; }
2185 fi
2186   eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2187 
2188 } # ac_fn_cxx_check_header_mongrel
2189 
2190 # ac_fn_cxx_try_run LINENO
2191 # ------------------------
2192 # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
2193 # that executables *can* be run.
2194 ac_fn_cxx_try_run ()
2195 {
2196   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2197   if { { ac_try="$ac_link"
2198 case "(($ac_try" in
2199   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2200   *) ac_try_echo=$ac_try;;
2201 esac
2202 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2203 $as_echo "$ac_try_echo"; } >&5
2204   (eval "$ac_link") 2>&5
2205   ac_status=$?
2206   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2207   test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
2208   { { case "(($ac_try" in
2209   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2210   *) ac_try_echo=$ac_try;;
2211 esac
2212 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2213 $as_echo "$ac_try_echo"; } >&5
2214   (eval "$ac_try") 2>&5
2215   ac_status=$?
2216   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2217   test $ac_status = 0; }; }; then :
2218   ac_retval=0
2219 else
2220   $as_echo "$as_me: program exited with status $ac_status" >&5
2221        $as_echo "$as_me: failed program was:" >&5
2222 sed 's/^/| /' conftest.$ac_ext >&5
2223 
2224        ac_retval=$ac_status
2225 fi
2226   rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2227   eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2228   as_fn_set_status $ac_retval
2229 
2230 } # ac_fn_cxx_try_run
2231 
2232 # ac_fn_cxx_check_header_compile LINENO HEADER VAR INCLUDES
2233 # ---------------------------------------------------------
2234 # Tests whether HEADER exists and can be compiled using the include files in
2235 # INCLUDES, setting the cache variable VAR accordingly.
2236 ac_fn_cxx_check_header_compile ()
2237 {
2238   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2239   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2240 $as_echo_n "checking for $2... " >&6; }
2241 if eval "test \"\${$3+set}\"" = set; then :
2242   $as_echo_n "(cached) " >&6
2243 else
2244   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2245 /* end confdefs.h.  */
2246 $4
2247 #include <$2>
2248 _ACEOF
2249 if ac_fn_cxx_try_compile "$LINENO"; then :
2250   eval "$3=yes"
2251 else
2252   eval "$3=no"
2253 fi
2254 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2255 fi
2256 eval ac_res=\$$3
2257                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2258 $as_echo "$ac_res" >&6; }
2259   eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2260 
2261 } # ac_fn_cxx_check_header_compile
2262 
2263 # ac_fn_cxx_compute_int LINENO EXPR VAR INCLUDES
2264 # ----------------------------------------------
2265 # Tries to find the compile-time value of EXPR in a program that includes
2266 # INCLUDES, setting VAR accordingly. Returns whether the value could be
2267 # computed
2268 ac_fn_cxx_compute_int ()
2269 {
2270   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2271   if test "$cross_compiling" = yes; then
2272     # Depending upon the size, compute the lo and hi bounds.
2273 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2274 /* end confdefs.h.  */
2275 $4
2276 int
2277 main ()
2278 {
2279 static int test_array [1 - 2 * !(($2) >= 0)];
2280 test_array [0] = 0
2281 
2282   ;
2283   return 0;
2284 }
2285 _ACEOF
2286 if ac_fn_cxx_try_compile "$LINENO"; then :
2287   ac_lo=0 ac_mid=0
2288   while :; do
2289     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2290 /* end confdefs.h.  */
2291 $4
2292 int
2293 main ()
2294 {
2295 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2296 test_array [0] = 0
2297 
2298   ;
2299   return 0;
2300 }
2301 _ACEOF
2302 if ac_fn_cxx_try_compile "$LINENO"; then :
2303   ac_hi=$ac_mid; break
2304 else
2305   as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2306                         if test $ac_lo -le $ac_mid; then
2307                           ac_lo= ac_hi=
2308                           break
2309                         fi
2310                         as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2311 fi
2312 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2313   done
2314 else
2315   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2316 /* end confdefs.h.  */
2317 $4
2318 int
2319 main ()
2320 {
2321 static int test_array [1 - 2 * !(($2) < 0)];
2322 test_array [0] = 0
2323 
2324   ;
2325   return 0;
2326 }
2327 _ACEOF
2328 if ac_fn_cxx_try_compile "$LINENO"; then :
2329   ac_hi=-1 ac_mid=-1
2330   while :; do
2331     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2332 /* end confdefs.h.  */
2333 $4
2334 int
2335 main ()
2336 {
2337 static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2338 test_array [0] = 0
2339 
2340   ;
2341   return 0;
2342 }
2343 _ACEOF
2344 if ac_fn_cxx_try_compile "$LINENO"; then :
2345   ac_lo=$ac_mid; break
2346 else
2347   as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2348                         if test $ac_mid -le $ac_hi; then
2349                           ac_lo= ac_hi=
2350                           break
2351                         fi
2352                         as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2353 fi
2354 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2355   done
2356 else
2357   ac_lo= ac_hi=
2358 fi
2359 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2360 fi
2361 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2362 # Binary search between lo and hi bounds.
2363 while test "x$ac_lo" != "x$ac_hi"; do
2364   as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2365   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2366 /* end confdefs.h.  */
2367 $4
2368 int
2369 main ()
2370 {
2371 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2372 test_array [0] = 0
2373 
2374   ;
2375   return 0;
2376 }
2377 _ACEOF
2378 if ac_fn_cxx_try_compile "$LINENO"; then :
2379   ac_hi=$ac_mid
2380 else
2381   as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2382 fi
2383 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2384 done
2385 case $ac_lo in #((
2386 ?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2387 '') ac_retval=1 ;;
2388 esac
2389   else
2390     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2391 /* end confdefs.h.  */
2392 $4
2393 static long int longval () { return $2; }
2394 static unsigned long int ulongval () { return $2; }
2395 #include <stdio.h>
2396 #include <stdlib.h>
2397 int
2398 main ()
2399 {
2400 
2401   FILE *f = fopen ("conftest.val", "w");
2402   if (! f)
2403     return 1;
2404   if (($2) < 0)
2405     {
2406       long int i = longval ();
2407       if (i != ($2))
2408         return 1;
2409       fprintf (f, "%ld", i);
2410     }
2411   else
2412     {
2413       unsigned long int i = ulongval ();
2414       if (i != ($2))
2415         return 1;
2416       fprintf (f, "%lu", i);
2417     }
2418   /* Do not output a trailing newline, as this causes \r\n confusion
2419      on some platforms.  */
2420   return ferror (f) || fclose (f) != 0;
2421 
2422   ;
2423   return 0;
2424 }
2425 _ACEOF
2426 if ac_fn_cxx_try_run "$LINENO"; then :
2427   echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2428 else
2429   ac_retval=1
2430 fi
2431 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2432   conftest.$ac_objext conftest.beam conftest.$ac_ext
2433 rm -f conftest.val
2434 
2435   fi
2436   eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2437   as_fn_set_status $ac_retval
2438 
2439 } # ac_fn_cxx_compute_int
2440 
2441 # ac_fn_cxx_try_link LINENO
2442 # -------------------------
2443 # Try to link conftest.$ac_ext, and return whether this succeeded.
2444 ac_fn_cxx_try_link ()
2445 {
2446   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2447   rm -f conftest.$ac_objext conftest$ac_exeext
2448   if { { ac_try="$ac_link"
2449 case "(($ac_try" in
2450   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2451   *) ac_try_echo=$ac_try;;
2452 esac
2453 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2454 $as_echo "$ac_try_echo"; } >&5
2455   (eval "$ac_link") 2>conftest.err
2456   ac_status=$?
2457   if test -s conftest.err; then
2458     grep -v '^ *+' conftest.err >conftest.er1
2459     cat conftest.er1 >&5
2460     mv -f conftest.er1 conftest.err
2461   fi
2462   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2463   test $ac_status = 0; } && {
2464          test -z "$ac_cxx_werror_flag" ||
2465          test ! -s conftest.err
2466        } && test -s conftest$ac_exeext && {
2467          test "$cross_compiling" = yes ||
2468          $as_test_x conftest$ac_exeext
2469        }; then :
2470   ac_retval=0
2471 else
2472   $as_echo "$as_me: failed program was:" >&5
2473 sed 's/^/| /' conftest.$ac_ext >&5
2474 
2475         ac_retval=1
2476 fi
2477   # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2478   # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2479   # interfere with the next link command; also delete a directory that is
2480   # left behind by Apple's compiler.  We do this before executing the actions.
2481   rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2482   eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2483   as_fn_set_status $ac_retval
2484 
2485 } # ac_fn_cxx_try_link
2486 
2487 # ac_fn_cxx_check_func LINENO FUNC VAR
2488 # ------------------------------------
2489 # Tests whether FUNC exists, setting the cache variable VAR accordingly
2490 ac_fn_cxx_check_func ()
2491 {
2492   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2493   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2494 $as_echo_n "checking for $2... " >&6; }
2495 if eval "test \"\${$3+set}\"" = set; then :
2496   $as_echo_n "(cached) " >&6
2497 else
2498   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2499 /* end confdefs.h.  */
2500 /* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2501    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
2502 #define $2 innocuous_$2
2503 
2504 /* System header to define __stub macros and hopefully few prototypes,
2505     which can conflict with char $2 (); below.
2506     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2507     <limits.h> exists even on freestanding compilers.  */
2508 
2509 #ifdef __STDC__
2510 # include <limits.h>
2511 #else
2512 # include <assert.h>
2513 #endif
2514 
2515 #undef $2
2516 
2517 /* Override any GCC internal prototype to avoid an error.
2518    Use char because int might match the return type of a GCC
2519    builtin and then its argument prototype would still apply.  */
2520 #ifdef __cplusplus
2521 extern "C"
2522 #endif
2523 char $2 ();
2524 /* The GNU C library defines this for functions which it implements
2525     to always fail with ENOSYS.  Some functions are actually named
2526     something starting with __ and the normal name is an alias.  */
2527 #if defined __stub_$2 || defined __stub___$2
2528 choke me
2529 #endif
2530 
2531 int
2532 main ()
2533 {
2534 return $2 ();
2535   ;
2536   return 0;
2537 }
2538 _ACEOF
2539 if ac_fn_cxx_try_link "$LINENO"; then :
2540   eval "$3=yes"
2541 else
2542   eval "$3=no"
2543 fi
2544 rm -f core conftest.err conftest.$ac_objext \
2545     conftest$ac_exeext conftest.$ac_ext
2546 fi
2547 eval ac_res=\$$3
2548                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2549 $as_echo "$ac_res" >&6; }
2550   eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2551 
2552 } # ac_fn_cxx_check_func
2553 
2554 # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
2555 # -------------------------------------------------------
2556 # Tests whether HEADER exists and can be compiled using the include files in
2557 # INCLUDES, setting the cache variable VAR accordingly.
2558 ac_fn_c_check_header_compile ()
2559 {
2560   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2561   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2562 $as_echo_n "checking for $2... " >&6; }
2563 if eval "test \"\${$3+set}\"" = set; then :
2564   $as_echo_n "(cached) " >&6
2565 else
2566   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2567 /* end confdefs.h.  */
2568 $4
2569 #include <$2>
2570 _ACEOF
2571 if ac_fn_c_try_compile "$LINENO"; then :
2572   eval "$3=yes"
2573 else
2574   eval "$3=no"
2575 fi
2576 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2577 fi
2578 eval ac_res=\$$3
2579                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2580 $as_echo "$ac_res" >&6; }
2581   eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2582 
2583 } # ac_fn_c_check_header_compile
2584 cat >config.log <<_ACEOF
2585 This file contains any messages produced by compilers while
2586 running configure, to aid debugging if configure makes a mistake.
2587 
2588 It was created by OpenJDK $as_me jdk8, which was
2589 generated by GNU Autoconf 2.67.  Invocation command line was
2590 
2591   $ $0 $@
2592 
2593 _ACEOF
2594 exec 5>>config.log
2595 {
2596 cat <<_ASUNAME
2597 ## --------- ##
2598 ## Platform. ##
2599 ## --------- ##
2600 
2601 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2602 uname -m = `(uname -m) 2>/dev/null || echo unknown`
2603 uname -r = `(uname -r) 2>/dev/null || echo unknown`
2604 uname -s = `(uname -s) 2>/dev/null || echo unknown`
2605 uname -v = `(uname -v) 2>/dev/null || echo unknown`
2606 
2607 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2608 /bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
2609 
2610 /bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
2611 /usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
2612 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2613 /usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
2614 /bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
2615 /usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
2616 /bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
2617 
2618 _ASUNAME
2619 
2620 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2621 for as_dir in $PATH
2622 do
2623   IFS=$as_save_IFS
2624   test -z "$as_dir" && as_dir=.
2625     $as_echo "PATH: $as_dir"
2626   done
2627 IFS=$as_save_IFS
2628 
2629 } >&5
2630 
2631 cat >&5 <<_ACEOF
2632 
2633 
2634 ## ----------- ##
2635 ## Core tests. ##
2636 ## ----------- ##
2637 
2638 _ACEOF
2639 
2640 
2641 # Keep a trace of the command line.
2642 # Strip out --no-create and --no-recursion so they do not pile up.
2643 # Strip out --silent because we don't want to record it for future runs.
2644 # Also quote any args containing shell meta-characters.
2645 # Make two passes to allow for proper duplicate-argument suppression.
2646 ac_configure_args=
2647 ac_configure_args0=
2648 ac_configure_args1=
2649 ac_must_keep_next=false
2650 for ac_pass in 1 2
2651 do
2652   for ac_arg
2653   do
2654     case $ac_arg in
2655     -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2656     -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2657     | -silent | --silent | --silen | --sile | --sil)
2658       continue ;;
2659     *\'*)
2660       ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2661     esac
2662     case $ac_pass in
2663     1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2664     2)
2665       as_fn_append ac_configure_args1 " '$ac_arg'"
2666       if test $ac_must_keep_next = true; then
2667         ac_must_keep_next=false # Got value, back to normal.
2668       else
2669         case $ac_arg in
2670           *=* | --config-cache | -C | -disable-* | --disable-* \
2671           | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2672           | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2673           | -with-* | --with-* | -without-* | --without-* | --x)
2674             case "$ac_configure_args0 " in
2675               "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2676             esac
2677             ;;
2678           -* ) ac_must_keep_next=true ;;
2679         esac
2680       fi
2681       as_fn_append ac_configure_args " '$ac_arg'"
2682       ;;
2683     esac
2684   done
2685 done
2686 { ac_configure_args0=; unset ac_configure_args0;}
2687 { ac_configure_args1=; unset ac_configure_args1;}
2688 
2689 # When interrupted or exit'd, cleanup temporary files, and complete
2690 # config.log.  We remove comments because anyway the quotes in there
2691 # would cause problems or look ugly.
2692 # WARNING: Use '\'' to represent an apostrophe within the trap.
2693 # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2694 trap 'exit_status=$?
2695   # Save into config.log some information that might help in debugging.
2696   {
2697     echo
2698 
2699     $as_echo "## ---------------- ##
2700 ## Cache variables. ##
2701 ## ---------------- ##"
2702     echo
2703     # The following way of writing the cache mishandles newlines in values,
2704 (
2705   for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2706     eval ac_val=\$$ac_var
2707     case $ac_val in #(
2708     *${as_nl}*)
2709       case $ac_var in #(
2710       *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2711 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
2712       esac
2713       case $ac_var in #(
2714       _ | IFS | as_nl) ;; #(
2715       BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2716       *) { eval $ac_var=; unset $ac_var;} ;;
2717       esac ;;
2718     esac
2719   done
2720   (set) 2>&1 |
2721     case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2722     *${as_nl}ac_space=\ *)
2723       sed -n \
2724         "s/'\''/'\''\\\\'\'''\''/g;
2725           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2726       ;; #(
2727     *)
2728       sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
2729       ;;
2730     esac |
2731     sort
2732 )
2733     echo
2734 
2735     $as_echo "## ----------------- ##
2736 ## Output variables. ##
2737 ## ----------------- ##"
2738     echo
2739     for ac_var in $ac_subst_vars
2740     do
2741       eval ac_val=\$$ac_var
2742       case $ac_val in
2743       *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2744       esac
2745       $as_echo "$ac_var='\''$ac_val'\''"
2746     done | sort
2747     echo
2748 
2749     if test -n "$ac_subst_files"; then
2750       $as_echo "## ------------------- ##
2751 ## File substitutions. ##
2752 ## ------------------- ##"
2753       echo
2754       for ac_var in $ac_subst_files
2755       do
2756         eval ac_val=\$$ac_var
2757         case $ac_val in
2758         *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2759         esac
2760         $as_echo "$ac_var='\''$ac_val'\''"
2761       done | sort
2762       echo
2763     fi
2764 
2765     if test -s confdefs.h; then
2766       $as_echo "## ----------- ##
2767 ## confdefs.h. ##
2768 ## ----------- ##"
2769       echo
2770       cat confdefs.h
2771       echo
2772     fi
2773     test "$ac_signal" != 0 &&
2774       $as_echo "$as_me: caught signal $ac_signal"
2775     $as_echo "$as_me: exit $exit_status"
2776   } >&5
2777   rm -f core *.core core.conftest.* &&
2778     rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
2779     exit $exit_status
2780 ' 0
2781 for ac_signal in 1 2 13 15; do
2782   trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
2783 done
2784 ac_signal=0
2785 
2786 # confdefs.h avoids OS command line length limits that DEFS can exceed.
2787 rm -f -r conftest* confdefs.h
2788 
2789 $as_echo "/* confdefs.h */" > confdefs.h
2790 
2791 # Predefined preprocessor variables.
2792 
2793 cat >>confdefs.h <<_ACEOF
2794 #define PACKAGE_NAME "$PACKAGE_NAME"
2795 _ACEOF
2796 
2797 cat >>confdefs.h <<_ACEOF
2798 #define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2799 _ACEOF
2800 
2801 cat >>confdefs.h <<_ACEOF
2802 #define PACKAGE_VERSION "$PACKAGE_VERSION"
2803 _ACEOF
2804 
2805 cat >>confdefs.h <<_ACEOF
2806 #define PACKAGE_STRING "$PACKAGE_STRING"
2807 _ACEOF
2808 
2809 cat >>confdefs.h <<_ACEOF
2810 #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2811 _ACEOF
2812 
2813 cat >>confdefs.h <<_ACEOF
2814 #define PACKAGE_URL "$PACKAGE_URL"
2815 _ACEOF
2816 
2817 
2818 # Let the site file select an alternate cache file if it wants to.
2819 # Prefer an explicitly selected file to automatically selected ones.
2820 ac_site_file1=NONE
2821 ac_site_file2=NONE
2822 if test -n "$CONFIG_SITE"; then
2823   # We do not want a PATH search for config.site.
2824   case $CONFIG_SITE in #((
2825     -*)  ac_site_file1=./$CONFIG_SITE;;
2826     */*) ac_site_file1=$CONFIG_SITE;;
2827     *)   ac_site_file1=./$CONFIG_SITE;;
2828   esac
2829 elif test "x$prefix" != xNONE; then
2830   ac_site_file1=$prefix/share/config.site
2831   ac_site_file2=$prefix/etc/config.site
2832 else
2833   ac_site_file1=$ac_default_prefix/share/config.site
2834   ac_site_file2=$ac_default_prefix/etc/config.site
2835 fi
2836 for ac_site_file in "$ac_site_file1" "$ac_site_file2"
2837 do
2838   test "x$ac_site_file" = xNONE && continue
2839   if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2840     { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2841 $as_echo "$as_me: loading site script $ac_site_file" >&6;}
2842     sed 's/^/| /' "$ac_site_file" >&5
2843     . "$ac_site_file" \
2844       || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2845 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2846 as_fn_error $? "failed to load site script $ac_site_file
2847 See \`config.log' for more details" "$LINENO" 5 ; }
2848   fi
2849 done
2850 
2851 if test -r "$cache_file"; then
2852   # Some versions of bash will fail to source /dev/null (special files
2853   # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
2854   if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2855     { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2856 $as_echo "$as_me: loading cache $cache_file" >&6;}
2857     case $cache_file in
2858       [\\/]* | ?:[\\/]* ) . "$cache_file";;
2859       *)                      . "./$cache_file";;
2860     esac
2861   fi
2862 else
2863   { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2864 $as_echo "$as_me: creating cache $cache_file" >&6;}
2865   >$cache_file
2866 fi
2867 
2868 # Check that the precious variables saved in the cache have kept the same
2869 # value.
2870 ac_cache_corrupted=false
2871 for ac_var in $ac_precious_vars; do
2872   eval ac_old_set=\$ac_cv_env_${ac_var}_set
2873   eval ac_new_set=\$ac_env_${ac_var}_set
2874   eval ac_old_val=\$ac_cv_env_${ac_var}_value
2875   eval ac_new_val=\$ac_env_${ac_var}_value
2876   case $ac_old_set,$ac_new_set in
2877     set,)
2878       { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2879 $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
2880       ac_cache_corrupted=: ;;
2881     ,set)
2882       { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2883 $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
2884       ac_cache_corrupted=: ;;
2885     ,);;
2886     *)
2887       if test "x$ac_old_val" != "x$ac_new_val"; then
2888         # differences in whitespace do not lead to failure.
2889         ac_old_val_w=`echo x $ac_old_val`
2890         ac_new_val_w=`echo x $ac_new_val`
2891         if test "$ac_old_val_w" != "$ac_new_val_w"; then
2892           { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2893 $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2894           ac_cache_corrupted=:
2895         else
2896           { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2897 $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2898           eval $ac_var=\$ac_old_val
2899         fi
2900         { $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
2901 $as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
2902         { $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
2903 $as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
2904       fi;;
2905   esac
2906   # Pass precious variables to config.status.
2907   if test "$ac_new_set" = set; then
2908     case $ac_new_val in
2909     *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
2910     *) ac_arg=$ac_var=$ac_new_val ;;
2911     esac
2912     case " $ac_configure_args " in
2913       *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
2914       *) as_fn_append ac_configure_args " '$ac_arg'" ;;
2915     esac
2916   fi
2917 done
2918 if $ac_cache_corrupted; then
2919   { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2920 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2921   { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2922 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
2923   as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
2924 fi
2925 ## -------------------- ##
2926 ## Main body of script. ##
2927 ## -------------------- ##
2928 
2929 ac_ext=c
2930 ac_cpp='$CPP $CPPFLAGS'
2931 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2932 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2933 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2934 
2935 
2936 
2937 ac_aux_dir=
2938 for ac_dir in build-aux "$srcdir"/build-aux; do
2939   if test -f "$ac_dir/install-sh"; then
2940     ac_aux_dir=$ac_dir
2941     ac_install_sh="$ac_aux_dir/install-sh -c"
2942     break
2943   elif test -f "$ac_dir/install.sh"; then
2944     ac_aux_dir=$ac_dir
2945     ac_install_sh="$ac_aux_dir/install.sh -c"
2946     break
2947   elif test -f "$ac_dir/shtool"; then
2948     ac_aux_dir=$ac_dir
2949     ac_install_sh="$ac_aux_dir/shtool install -c"
2950     break
2951   fi
2952 done
2953 if test -z "$ac_aux_dir"; then
2954   as_fn_error $? "cannot find install-sh, install.sh, or shtool in build-aux \"$srcdir\"/build-aux" "$LINENO" 5
2955 fi
2956 
2957 # These three variables are undocumented and unsupported,
2958 # and are intended to be withdrawn in a future Autoconf release.
2959 # They can cause serious problems if a builder's source tree is in a directory
2960 # whose full name contains unusual characters.
2961 ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
2962 ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
2963 ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
2964 
2965 
2966 # pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
2967 
2968 #
2969 # Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
2970 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
2971 #
2972 # This code is free software; you can redistribute it and/or modify it
2973 # under the terms of the GNU General Public License version 2 only, as
2974 # published by the Free Software Foundation.  Oracle designates this
2975 # particular file as subject to the "Classpath" exception as provided
2976 # by Oracle in the LICENSE file that accompanied this code.
2977 #
2978 # This code is distributed in the hope that it will be useful, but WITHOUT
2979 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
2980 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
2981 # version 2 for more details (a copy is included in the LICENSE file that
2982 # accompanied this code).
2983 #
2984 # You should have received a copy of the GNU General Public License version
2985 # 2 along with this work; if not, write to the Free Software Foundation,
2986 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
2987 #
2988 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
2989 # or visit www.oracle.com if you need additional information or have any
2990 # questions.
2991 #
2992 
2993 #
2994 # Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
2995 #
2996 # This program is free software; you can redistribute it and/or modify
2997 # it under the terms of the GNU General Public License as published by
2998 # the Free Software Foundation; either version 2 of the License, or
2999 # (at your option) any later version.
3000 #
3001 # This program is distributed in the hope that it will be useful, but
3002 # WITHOUT ANY WARRANTY; without even the implied warranty of
3003 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
3004 # General Public License for more details.
3005 #
3006 # You should have received a copy of the GNU General Public License
3007 # along with this program; if not, write to the Free Software
3008 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
3009 #
3010 # As a special exception to the GNU General Public License, if you
3011 # distribute this file as part of a program that contains a
3012 # configuration script generated by Autoconf, you may include it under
3013 # the same distribution terms that you use for the rest of that program.
3014 
3015 # PKG_PROG_PKG_CONFIG([MIN-VERSION])
3016 # ----------------------------------
3017 # PKG_PROG_PKG_CONFIG
3018 
3019 # PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
3020 #
3021 # Check to see whether a particular set of modules exists.  Similar
3022 # to PKG_CHECK_MODULES(), but does not set variables or print errors.
3023 #
3024 #
3025 # Similar to PKG_CHECK_MODULES, make sure that the first instance of
3026 # this or PKG_CHECK_MODULES is called, or make sure to call
3027 # PKG_CHECK_EXISTS manually
3028 # --------------------------------------------------------------
3029 
3030 
3031 
3032 # _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
3033 # ---------------------------------------------
3034 # _PKG_CONFIG
3035 
3036 # _PKG_SHORT_ERRORS_SUPPORTED
3037 # -----------------------------
3038 # _PKG_SHORT_ERRORS_SUPPORTED
3039 
3040 
3041 # PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
3042 # [ACTION-IF-NOT-FOUND])
3043 #
3044 #
3045 # Note that if there is a possibility the first call to
3046 # PKG_CHECK_MODULES might not happen, you should be sure to include an
3047 # explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
3048 #
3049 #
3050 # --------------------------------------------------------------
3051 # PKG_CHECK_MODULES
3052 
3053 
3054 # Include these first...
3055 #
3056 # Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
3057 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3058 #
3059 # This code is free software; you can redistribute it and/or modify it
3060 # under the terms of the GNU General Public License version 2 only, as
3061 # published by the Free Software Foundation.  Oracle designates this
3062 # particular file as subject to the "Classpath" exception as provided
3063 # by Oracle in the LICENSE file that accompanied this code.
3064 #
3065 # This code is distributed in the hope that it will be useful, but WITHOUT
3066 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3067 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3068 # version 2 for more details (a copy is included in the LICENSE file that
3069 # accompanied this code).
3070 #
3071 # You should have received a copy of the GNU General Public License version
3072 # 2 along with this work; if not, write to the Free Software Foundation,
3073 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3074 #
3075 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3076 # or visit www.oracle.com if you need additional information or have any
3077 # questions.
3078 #
3079 
3080 
3081 
3082 # This will make sure the given variable points to a full and proper
3083 # path. This means:
3084 # 1) There will be no spaces in the path. On posix platforms,
3085 #    spaces in the path will result in an error. On Windows,
3086 #    the path will be rewritten using short-style to be space-free.
3087 # 2) The path will be absolute, and it will be in unix-style (on
3088 #     cygwin).
3089 # $1: The name of the variable to fix
3090 
3091 
3092 # This will make sure the given variable points to a executable
3093 # with a full and proper path. This means:
3094 # 1) There will be no spaces in the path. On posix platforms,
3095 #    spaces in the path will result in an error. On Windows,
3096 #    the path will be rewritten using short-style to be space-free.
3097 # 2) The path will be absolute, and it will be in unix-style (on
3098 #     cygwin).
3099 # Any arguments given to the executable is preserved.
3100 # If the input variable does not have a directory specification, then
3101 # it need to be in the PATH.
3102 # $1: The name of the variable to fix
3103 
3104 
3105 
3106 
3107 
3108 
3109 # Test that variable $1 denoting a program is not empty. If empty, exit with an error.
3110 # $1: variable to check
3111 # $2: executable name to print in warning (optional)
3112 
3113 
3114 # Does AC_PATH_PROG followed by BASIC_CHECK_NONEMPTY.
3115 # Arguments as AC_PATH_PROG:
3116 # $1: variable to set
3117 # $2: executable name to look for
3118 
3119 
3120 # Setup the most fundamental tools that relies on not much else to set up,
3121 # but is used by much of the early bootstrap code.
3122 
3123 
3124 # Setup basic configuration paths, and platform-specific stuff related to PATHs.
3125 
3126 
3127 
3128 
3129 
3130 
3131 
3132 #%%% Simple tools %%%
3133 
3134 # Check if we have found a usable version of make
3135 # $1: the path to a potential make binary (or empty)
3136 # $2: the description on how we found this
3137 
3138 
3139 # Goes looking for a usable version of GNU make.
3140 
3141 
3142 
3143 
3144 
3145 
3146 # Check if build directory is on local disk. If not possible to determine,
3147 # we prefer to claim it's local.
3148 # Argument 1: directory to test
3149 # Argument 2: what to do if it is on local disk
3150 # Argument 3: what to do otherwise (remote disk or failure)
3151 
3152 
3153 # Check that source files have basic read permissions set. This might
3154 # not be the case in cygwin in certain conditions.
3155 
3156 
3157 
3158 
3159 #
3160 # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3161 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3162 #
3163 # This code is free software; you can redistribute it and/or modify it
3164 # under the terms of the GNU General Public License version 2 only, as
3165 # published by the Free Software Foundation.  Oracle designates this
3166 # particular file as subject to the "Classpath" exception as provided
3167 # by Oracle in the LICENSE file that accompanied this code.
3168 #
3169 # This code is distributed in the hope that it will be useful, but WITHOUT
3170 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3171 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3172 # version 2 for more details (a copy is included in the LICENSE file that
3173 # accompanied this code).
3174 #
3175 # You should have received a copy of the GNU General Public License version
3176 # 2 along with this work; if not, write to the Free Software Foundation,
3177 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3178 #
3179 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3180 # or visit www.oracle.com if you need additional information or have any
3181 # questions.
3182 #
3183 
3184 
3185 
3186 
3187 
3188 # Helper function which possibly converts a path using DOS-style short mode.
3189 # If so, the updated path is stored in $new_path.
3190 # $1: The path to check
3191 
3192 
3193 # Helper function which possibly converts a path using DOS-style short mode.
3194 # If so, the updated path is stored in $new_path.
3195 # $1: The path to check
3196 
3197 
3198 # FIXME: The BASIC_FIXUP_*_CYGWIN/MSYS is most likely too convoluted
3199 # and could probably be heavily simplified. However, all changes in this
3200 # area tend to need lot of testing in different scenarios, and in lack of
3201 # proper unit testing, cleaning this up has not been deemed worth the effort
3202 # at the moment.
3203 
3204 
3205 
3206 
3207 
3208 
3209 
3210 
3211 
3212 # Setup basic configuration paths, and platform-specific stuff related to PATHs.
3213 
3214 
3215 
3216 
3217 #
3218 # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3219 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3220 #
3221 # This code is free software; you can redistribute it and/or modify it
3222 # under the terms of the GNU General Public License version 2 only, as
3223 # published by the Free Software Foundation.  Oracle designates this
3224 # particular file as subject to the "Classpath" exception as provided
3225 # by Oracle in the LICENSE file that accompanied this code.
3226 #
3227 # This code is distributed in the hope that it will be useful, but WITHOUT
3228 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3229 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3230 # version 2 for more details (a copy is included in the LICENSE file that
3231 # accompanied this code).
3232 #
3233 # You should have received a copy of the GNU General Public License version
3234 # 2 along with this work; if not, write to the Free Software Foundation,
3235 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3236 #
3237 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3238 # or visit www.oracle.com if you need additional information or have any
3239 # questions.
3240 #
3241 
3242 
3243 
3244 
3245 
3246 
3247 
3248 
3249 
3250 
3251 
3252 # ... then the rest
3253 #
3254 # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3255 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3256 #
3257 # This code is free software; you can redistribute it and/or modify it
3258 # under the terms of the GNU General Public License version 2 only, as
3259 # published by the Free Software Foundation.  Oracle designates this
3260 # particular file as subject to the "Classpath" exception as provided
3261 # by Oracle in the LICENSE file that accompanied this code.
3262 #
3263 # This code is distributed in the hope that it will be useful, but WITHOUT
3264 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3265 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3266 # version 2 for more details (a copy is included in the LICENSE file that
3267 # accompanied this code).
3268 #
3269 # You should have received a copy of the GNU General Public License version
3270 # 2 along with this work; if not, write to the Free Software Foundation,
3271 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3272 #
3273 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3274 # or visit www.oracle.com if you need additional information or have any
3275 # questions.
3276 #
3277 
3278 # Execute the check given as argument, and verify the result
3279 # If the Boot JDK was previously found, do nothing
3280 # $1 A command line (typically autoconf macro) to execute
3281 
3282 
3283 # Test: Is bootjdk explicitely set by command line arguments?
3284 
3285 
3286 # Test: Is bootjdk available from builddeps?
3287 
3288 
3289 # Test: Is $JAVA_HOME set?
3290 
3291 
3292 # Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
3293 
3294 
3295 # Test: Is there a /usr/libexec/java_home? (Typically on MacOSX)
3296 
3297 
3298 # Look for a jdk in the given path. If there are multiple, try to select the newest.
3299 # If found, set BOOT_JDK and BOOT_JDK_FOUND.
3300 # $1 = Path to directory containing jdk installations.
3301 # $2 = String to append to the found JDK directory to get the proper JDK home
3302 
3303 
3304 # Call BOOTJDK_FIND_BEST_JDK_IN_DIRECTORY, but use the given
3305 # environmental variable as base for where to look.
3306 # $1 Name of an environmal variable, assumed to point to the Program Files directory.
3307 
3308 
3309 # Test: Is there a JDK installed in default, well-known locations?
3310 
3311 
3312 # Check that a command-line tool in the Boot JDK is correct
3313 # $1 = name of variable to assign
3314 # $2 = name of binary
3315 
3316 
3317 ###############################################################################
3318 #
3319 # We need a Boot JDK to bootstrap the build.
3320 #
3321 
3322 
3323 
3324 
3325 
3326 #
3327 # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3328 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3329 #
3330 # This code is free software; you can redistribute it and/or modify it
3331 # under the terms of the GNU General Public License version 2 only, as
3332 # published by the Free Software Foundation.  Oracle designates this
3333 # particular file as subject to the "Classpath" exception as provided
3334 # by Oracle in the LICENSE file that accompanied this code.
3335 #
3336 # This code is distributed in the hope that it will be useful, but WITHOUT
3337 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3338 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3339 # version 2 for more details (a copy is included in the LICENSE file that
3340 # accompanied this code).
3341 #
3342 # You should have received a copy of the GNU General Public License version
3343 # 2 along with this work; if not, write to the Free Software Foundation,
3344 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3345 #
3346 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3347 # or visit www.oracle.com if you need additional information or have any
3348 # questions.
3349 #
3350 
3351 
3352 
3353 
3354 
3355 
3356 
3357 
3358 
3359 
3360 
3361 
3362 
3363 
3364 
3365 
3366 
3367 
3368 
3369 
3370 #
3371 # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3372 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3373 #
3374 # This code is free software; you can redistribute it and/or modify it
3375 # under the terms of the GNU General Public License version 2 only, as
3376 # published by the Free Software Foundation.  Oracle designates this
3377 # particular file as subject to the "Classpath" exception as provided
3378 # by Oracle in the LICENSE file that accompanied this code.
3379 #
3380 # This code is distributed in the hope that it will be useful, but WITHOUT
3381 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3382 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3383 # version 2 for more details (a copy is included in the LICENSE file that
3384 # accompanied this code).
3385 #
3386 # You should have received a copy of the GNU General Public License version
3387 # 2 along with this work; if not, write to the Free Software Foundation,
3388 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3389 #
3390 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3391 # or visit www.oracle.com if you need additional information or have any
3392 # questions.
3393 #
3394 
3395 
3396 
3397 
3398 
3399 cygwin_help() {
3400     case $1 in
3401     unzip)
3402         PKGHANDLER_COMMAND="cd <location of cygwin setup.exe> && cmd /c setup -q -P unzip" ;;
3403     zip)
3404         PKGHANDLER_COMMAND="cd <location of cygwin setup.exe> && cmd /c setup -q -P zip" ;;
3405     make)
3406         PKGHANDLER_COMMAND="cd <location of cygwin setup.exe> && cmd /c setup -q -P make" ;;
3407     * )
3408        break ;;
3409     esac
3410 }
3411 
3412 apt_help() {
3413     case $1 in
3414     devkit)
3415         PKGHANDLER_COMMAND="sudo apt-get install build-essential" ;;
3416     openjdk)
3417         PKGHANDLER_COMMAND="sudo apt-get install openjdk-7-jdk" ;;
3418     alsa)
3419         PKGHANDLER_COMMAND="sudo apt-get install libasound2-dev" ;;
3420     cups)
3421         PKGHANDLER_COMMAND="sudo apt-get install libcups2-dev" ;;
3422     freetype2)
3423         PKGHANDLER_COMMAND="sudo apt-get install libfreetype6-dev" ;;
3424     pulse)
3425         PKGHANDLER_COMMAND="sudo apt-get install libpulse-dev" ;;
3426     x11)
3427         PKGHANDLER_COMMAND="sudo apt-get install libX11-dev libxext-dev libxrender-dev libxtst-dev" ;;
3428     ccache)
3429         PKGHANDLER_COMMAND="sudo apt-get install ccache" ;;
3430     * )
3431        break ;;
3432     esac
3433 }
3434 
3435 yum_help() {
3436     case $1 in
3437     devkit)
3438         PKGHANDLER_COMMAND="sudo yum groupinstall \"Development Tools\"" ;;
3439     openjdk)
3440         PKGHANDLER_COMMAND="sudo yum install java-1.7.0-openjdk" ;;
3441     alsa)
3442         PKGHANDLER_COMMAND="sudo yum install alsa-lib-devel" ;;
3443     cups)
3444         PKGHANDLER_COMMAND="sudo yum install cups-devel" ;;
3445     freetype2)
3446         PKGHANDLER_COMMAND="sudo yum install freetype2-devel" ;;
3447     pulse)
3448         PKGHANDLER_COMMAND="sudo yum install pulseaudio-libs-devel" ;;
3449     x11)
3450         PKGHANDLER_COMMAND="sudo yum install libXtst-devel" ;;
3451     ccache)
3452         PKGHANDLER_COMMAND="sudo yum install ccache" ;;
3453     * )
3454        break ;;
3455     esac
3456 }
3457 
3458 port_help() {
3459     PKGHANDLER_COMMAND=""
3460 }
3461 
3462 pkgutil_help() {
3463     PKGHANDLER_COMMAND=""
3464 }
3465 
3466 pkgadd_help() {
3467     PKGHANDLER_COMMAND=""
3468 }
3469 
3470 
3471 
3472 #
3473 # Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
3474 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3475 #
3476 # This code is free software; you can redistribute it and/or modify it
3477 # under the terms of the GNU General Public License version 2 only, as
3478 # published by the Free Software Foundation.  Oracle designates this
3479 # particular file as subject to the "Classpath" exception as provided
3480 # by Oracle in the LICENSE file that accompanied this code.
3481 #
3482 # This code is distributed in the hope that it will be useful, but WITHOUT
3483 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3484 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3485 # version 2 for more details (a copy is included in the LICENSE file that
3486 # accompanied this code).
3487 #
3488 # You should have received a copy of the GNU General Public License version
3489 # 2 along with this work; if not, write to the Free Software Foundation,
3490 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3491 #
3492 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3493 # or visit www.oracle.com if you need additional information or have any
3494 # questions.
3495 #
3496 
3497 
3498 
3499 
3500 
3501 
3502 
3503 
3504 ###############################################################################
3505 #
3506 # Should we build only OpenJDK even if closed sources are present?
3507 #
3508 
3509 
3510 
3511 
3512 ###############################################################################
3513 #
3514 # Setup version numbers
3515 #
3516 
3517 
3518 
3519 
3520 
3521 
3522 # Support for customization of the build process. Some build files
3523 # will include counterparts from this location, if they exist. This allows
3524 # for a degree of customization of the build targets and the rules/recipes
3525 # to create them
3526 
3527 # Check whether --with-custom-make-dir was given.
3528 if test "${with_custom_make_dir+set}" = set; then :
3529   withval=$with_custom_make_dir; CUSTOM_MAKE_DIR=$with_custom_make_dir
3530 fi
3531 
3532 
3533 
3534 #
3535 # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3536 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3537 #
3538 # This code is free software; you can redistribute it and/or modify it
3539 # under the terms of the GNU General Public License version 2 only, as
3540 # published by the Free Software Foundation.  Oracle designates this
3541 # particular file as subject to the "Classpath" exception as provided
3542 # by Oracle in the LICENSE file that accompanied this code.
3543 #
3544 # This code is distributed in the hope that it will be useful, but WITHOUT
3545 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3546 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3547 # version 2 for more details (a copy is included in the LICENSE file that
3548 # accompanied this code).
3549 #
3550 # You should have received a copy of the GNU General Public License version
3551 # 2 along with this work; if not, write to the Free Software Foundation,
3552 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3553 #
3554 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3555 # or visit www.oracle.com if you need additional information or have any
3556 # questions.
3557 #
3558 
3559 
3560 
3561 
3562 
3563 
3564 
3565 
3566 
3567 
3568 
3569 
3570 
3571 
3572 
3573 #
3574 # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3575 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3576 #
3577 # This code is free software; you can redistribute it and/or modify it
3578 # under the terms of the GNU General Public License version 2 only, as
3579 # published by the Free Software Foundation.  Oracle designates this
3580 # particular file as subject to the "Classpath" exception as provided
3581 # by Oracle in the LICENSE file that accompanied this code.
3582 #
3583 # This code is distributed in the hope that it will be useful, but WITHOUT
3584 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3585 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3586 # version 2 for more details (a copy is included in the LICENSE file that
3587 # accompanied this code).
3588 #
3589 # You should have received a copy of the GNU General Public License version
3590 # 2 along with this work; if not, write to the Free Software Foundation,
3591 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3592 #
3593 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3594 # or visit www.oracle.com if you need additional information or have any
3595 # questions.
3596 #
3597 
3598 # Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
3599 # Converts autoconf style CPU name to OpenJDK style, into
3600 # VAR_CPU, VAR_CPU_ARCH, VAR_CPU_BITS and VAR_CPU_ENDIAN.
3601 
3602 
3603 # Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
3604 # Converts autoconf style OS name to OpenJDK style, into
3605 # VAR_OS and VAR_OS_API.
3606 
3607 
3608 # Expects $host_os $host_cpu $build_os and $build_cpu
3609 # and $with_target_bits to have been setup!
3610 #
3611 # Translate the standard triplet(quadruplet) definition
3612 # of the target/build system into OPENJDK_TARGET_OS, OPENJDK_TARGET_CPU,
3613 # OPENJDK_BUILD_OS, etc.
3614 
3615 
3616 # Check if a reduced build (32-bit on 64-bit platforms) is requested, and modify behaviour
3617 # accordingly. Must be done after setting up build and target system, but before
3618 # doing anything else with these values.
3619 
3620 
3621     # Setup the legacy variables, for controlling the old makefiles.
3622     #
3623 
3624 
3625 
3626 
3627 #%%% Build and target systems %%%
3628 
3629 
3630 
3631 
3632 # Support macro for PLATFORM_SETUP_OPENJDK_TARGET_BITS.
3633 # Add -mX to various FLAGS variables.
3634 
3635 
3636 
3637 
3638 
3639 
3640 #
3641 # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3642 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3643 #
3644 # This code is free software; you can redistribute it and/or modify it
3645 # under the terms of the GNU General Public License version 2 only, as
3646 # published by the Free Software Foundation.  Oracle designates this
3647 # particular file as subject to the "Classpath" exception as provided
3648 # by Oracle in the LICENSE file that accompanied this code.
3649 #
3650 # This code is distributed in the hope that it will be useful, but WITHOUT
3651 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3652 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3653 # version 2 for more details (a copy is included in the LICENSE file that
3654 # accompanied this code).
3655 #
3656 # You should have received a copy of the GNU General Public License version
3657 # 2 along with this work; if not, write to the Free Software Foundation,
3658 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3659 #
3660 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3661 # or visit www.oracle.com if you need additional information or have any
3662 # questions.
3663 #
3664 
3665 
3666 
3667 
3668 
3669 
3670 
3671 
3672 #
3673 # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3674 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3675 #
3676 # This code is free software; you can redistribute it and/or modify it
3677 # under the terms of the GNU General Public License version 2 only, as
3678 # published by the Free Software Foundation.  Oracle designates this
3679 # particular file as subject to the "Classpath" exception as provided
3680 # by Oracle in the LICENSE file that accompanied this code.
3681 #
3682 # This code is distributed in the hope that it will be useful, but WITHOUT
3683 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3684 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3685 # version 2 for more details (a copy is included in the LICENSE file that
3686 # accompanied this code).
3687 #
3688 # You should have received a copy of the GNU General Public License version
3689 # 2 along with this work; if not, write to the Free Software Foundation,
3690 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3691 #
3692 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3693 # or visit www.oracle.com if you need additional information or have any
3694 # questions.
3695 #
3696 
3697 # $1 = compiler to test (CC or CXX)
3698 # $2 = human readable name of compiler (C or C++)
3699 
3700 
3701 
3702 
3703 
3704 # $1 = compiler to test (CC or CXX)
3705 # $2 = human readable name of compiler (C or C++)
3706 # $3 = list of compiler names to search for
3707 
3708 
3709 
3710 
3711 
3712 
3713 
3714 
3715 
3716 
3717 
3718 
3719 
3720 # TOOLCHAIN_COMPILER_CHECK_ARGUMENTS([ARGUMENT], [RUN-IF-TRUE],
3721 #                                   [RUN-IF-FALSE])
3722 # ------------------------------------------------------------
3723 # Check that the c and c++ compilers support an argument
3724 
3725 
3726 
3727 
3728 #
3729 # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3730 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3731 #
3732 # This code is free software; you can redistribute it and/or modify it
3733 # under the terms of the GNU General Public License version 2 only, as
3734 # published by the Free Software Foundation.  Oracle designates this
3735 # particular file as subject to the "Classpath" exception as provided
3736 # by Oracle in the LICENSE file that accompanied this code.
3737 #
3738 # This code is distributed in the hope that it will be useful, but WITHOUT
3739 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3740 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3741 # version 2 for more details (a copy is included in the LICENSE file that
3742 # accompanied this code).
3743 #
3744 # You should have received a copy of the GNU General Public License version
3745 # 2 along with this work; if not, write to the Free Software Foundation,
3746 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3747 #
3748 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3749 # or visit www.oracle.com if you need additional information or have any
3750 # questions.
3751 #
3752 
3753 
3754 
3755 
3756 
3757 
3758 
3759 # Check if the VS env variables were setup prior to running configure.
3760 # If not, then find vcvarsall.bat and run it automatically, and integrate
3761 # the set env variables into the spec file.
3762 
3763 
3764 
3765 # Setup the DXSDK paths
3766 
3767 
3768 
3769 
3770 
3771 
3772 # This line needs to be here, verbatim, after all includes and the dummy hook
3773 # definitions. It is replaced with custom functionality when building
3774 # custom sources.
3775 #CUSTOM_AUTOCONF_INCLUDE
3776 
3777 # Do not change or remove the following line, it is needed for consistency checks:
3778 DATE_WHEN_GENERATED=1367502949
3779 
3780 ###############################################################################
3781 #
3782 # Initialization / Boot-strapping
3783 #
3784 # The bootstrapping process needs to solve the "chicken or the egg" problem,
3785 # thus it jumps back and forth, each time gaining something needed later on.
3786 #
3787 ###############################################################################
3788 
3789 # Basic initialization that must happen first of all
3790 
3791 # Save the original command line. This is passed to us by the wrapper configure script.
3792 
3793 DATE_WHEN_CONFIGURED=`LANG=C date`
3794 
3795 { $as_echo "$as_me:${as_lineno-$LINENO}: Configuration created at $DATE_WHEN_CONFIGURED." >&5
3796 $as_echo "$as_me: Configuration created at $DATE_WHEN_CONFIGURED." >&6;}
3797 { $as_echo "$as_me:${as_lineno-$LINENO}: configure script generated at timestamp $DATE_WHEN_GENERATED." >&5
3798 $as_echo "$as_me: configure script generated at timestamp $DATE_WHEN_GENERATED." >&6;}
3799 
3800 
3801 
3802 # Start with tools that do not need have cross compilation support
3803 # and can be expected to be found in the default PATH. These tools are
3804 # used by configure. Nor are these tools expected to be found in the
3805 # devkit from the builddeps server either, since they are
3806 # needed to download the devkit.
3807 
3808 # First are all the simple required tools.
3809 
3810     for ac_prog in basename
3811 do
3812   # Extract the first word of "$ac_prog", so it can be a program name with args.
3813 set dummy $ac_prog; ac_word=$2
3814 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3815 $as_echo_n "checking for $ac_word... " >&6; }
3816 if test "${ac_cv_path_BASENAME+set}" = set; then :
3817   $as_echo_n "(cached) " >&6
3818 else
3819   case $BASENAME in
3820   [\\/]* | ?:[\\/]*)
3821   ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
3822   ;;
3823   *)
3824   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3825 for as_dir in $PATH
3826 do
3827   IFS=$as_save_IFS
3828   test -z "$as_dir" && as_dir=.
3829     for ac_exec_ext in '' $ac_executable_extensions; do
3830   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3831     ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
3832     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3833     break 2
3834   fi
3835 done
3836   done
3837 IFS=$as_save_IFS
3838 
3839   ;;
3840 esac
3841 fi
3842 BASENAME=$ac_cv_path_BASENAME
3843 if test -n "$BASENAME"; then
3844   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
3845 $as_echo "$BASENAME" >&6; }
3846 else
3847   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3848 $as_echo "no" >&6; }
3849 fi
3850 
3851 
3852   test -n "$BASENAME" && break
3853 done
3854 
3855 
3856     if test "x$BASENAME" = x; then
3857         if test "xbasename" = x; then
3858           PROG_NAME=basename
3859         else
3860           PROG_NAME=basename
3861         fi
3862         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
3863 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
3864         as_fn_error $? "Cannot continue" "$LINENO" 5
3865     fi
3866 
3867 
3868 
3869     for ac_prog in bash
3870 do
3871   # Extract the first word of "$ac_prog", so it can be a program name with args.
3872 set dummy $ac_prog; ac_word=$2
3873 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3874 $as_echo_n "checking for $ac_word... " >&6; }
3875 if test "${ac_cv_path_BASH+set}" = set; then :
3876   $as_echo_n "(cached) " >&6
3877 else
3878   case $BASH in
3879   [\\/]* | ?:[\\/]*)
3880   ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
3881   ;;
3882   *)
3883   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3884 for as_dir in $PATH
3885 do
3886   IFS=$as_save_IFS
3887   test -z "$as_dir" && as_dir=.
3888     for ac_exec_ext in '' $ac_executable_extensions; do
3889   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3890     ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
3891     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3892     break 2
3893   fi
3894 done
3895   done
3896 IFS=$as_save_IFS
3897 
3898   ;;
3899 esac
3900 fi
3901 BASH=$ac_cv_path_BASH
3902 if test -n "$BASH"; then
3903   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
3904 $as_echo "$BASH" >&6; }
3905 else
3906   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3907 $as_echo "no" >&6; }
3908 fi
3909 
3910 
3911   test -n "$BASH" && break
3912 done
3913 
3914 
3915     if test "x$BASH" = x; then
3916         if test "xbash" = x; then
3917           PROG_NAME=bash
3918         else
3919           PROG_NAME=bash
3920         fi
3921         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
3922 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
3923         as_fn_error $? "Cannot continue" "$LINENO" 5
3924     fi
3925 
3926 
3927 
3928     for ac_prog in cat
3929 do
3930   # Extract the first word of "$ac_prog", so it can be a program name with args.
3931 set dummy $ac_prog; ac_word=$2
3932 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3933 $as_echo_n "checking for $ac_word... " >&6; }
3934 if test "${ac_cv_path_CAT+set}" = set; then :
3935   $as_echo_n "(cached) " >&6
3936 else
3937   case $CAT in
3938   [\\/]* | ?:[\\/]*)
3939   ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
3940   ;;
3941   *)
3942   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3943 for as_dir in $PATH
3944 do
3945   IFS=$as_save_IFS
3946   test -z "$as_dir" && as_dir=.
3947     for ac_exec_ext in '' $ac_executable_extensions; do
3948   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3949     ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
3950     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3951     break 2
3952   fi
3953 done
3954   done
3955 IFS=$as_save_IFS
3956 
3957   ;;
3958 esac
3959 fi
3960 CAT=$ac_cv_path_CAT
3961 if test -n "$CAT"; then
3962   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
3963 $as_echo "$CAT" >&6; }
3964 else
3965   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3966 $as_echo "no" >&6; }
3967 fi
3968 
3969 
3970   test -n "$CAT" && break
3971 done
3972 
3973 
3974     if test "x$CAT" = x; then
3975         if test "xcat" = x; then
3976           PROG_NAME=cat
3977         else
3978           PROG_NAME=cat
3979         fi
3980         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
3981 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
3982         as_fn_error $? "Cannot continue" "$LINENO" 5
3983     fi
3984 
3985 
3986 
3987     for ac_prog in chmod
3988 do
3989   # Extract the first word of "$ac_prog", so it can be a program name with args.
3990 set dummy $ac_prog; ac_word=$2
3991 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3992 $as_echo_n "checking for $ac_word... " >&6; }
3993 if test "${ac_cv_path_CHMOD+set}" = set; then :
3994   $as_echo_n "(cached) " >&6
3995 else
3996   case $CHMOD in
3997   [\\/]* | ?:[\\/]*)
3998   ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
3999   ;;
4000   *)
4001   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4002 for as_dir in $PATH
4003 do
4004   IFS=$as_save_IFS
4005   test -z "$as_dir" && as_dir=.
4006     for ac_exec_ext in '' $ac_executable_extensions; do
4007   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4008     ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
4009     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4010     break 2
4011   fi
4012 done
4013   done
4014 IFS=$as_save_IFS
4015 
4016   ;;
4017 esac
4018 fi
4019 CHMOD=$ac_cv_path_CHMOD
4020 if test -n "$CHMOD"; then
4021   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
4022 $as_echo "$CHMOD" >&6; }
4023 else
4024   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4025 $as_echo "no" >&6; }
4026 fi
4027 
4028 
4029   test -n "$CHMOD" && break
4030 done
4031 
4032 
4033     if test "x$CHMOD" = x; then
4034         if test "xchmod" = x; then
4035           PROG_NAME=chmod
4036         else
4037           PROG_NAME=chmod
4038         fi
4039         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4040 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4041         as_fn_error $? "Cannot continue" "$LINENO" 5
4042     fi
4043 
4044 
4045 
4046     for ac_prog in cmp
4047 do
4048   # Extract the first word of "$ac_prog", so it can be a program name with args.
4049 set dummy $ac_prog; ac_word=$2
4050 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4051 $as_echo_n "checking for $ac_word... " >&6; }
4052 if test "${ac_cv_path_CMP+set}" = set; then :
4053   $as_echo_n "(cached) " >&6
4054 else
4055   case $CMP in
4056   [\\/]* | ?:[\\/]*)
4057   ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
4058   ;;
4059   *)
4060   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4061 for as_dir in $PATH
4062 do
4063   IFS=$as_save_IFS
4064   test -z "$as_dir" && as_dir=.
4065     for ac_exec_ext in '' $ac_executable_extensions; do
4066   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4067     ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
4068     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4069     break 2
4070   fi
4071 done
4072   done
4073 IFS=$as_save_IFS
4074 
4075   ;;
4076 esac
4077 fi
4078 CMP=$ac_cv_path_CMP
4079 if test -n "$CMP"; then
4080   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
4081 $as_echo "$CMP" >&6; }
4082 else
4083   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4084 $as_echo "no" >&6; }
4085 fi
4086 
4087 
4088   test -n "$CMP" && break
4089 done
4090 
4091 
4092     if test "x$CMP" = x; then
4093         if test "xcmp" = x; then
4094           PROG_NAME=cmp
4095         else
4096           PROG_NAME=cmp
4097         fi
4098         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4099 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4100         as_fn_error $? "Cannot continue" "$LINENO" 5
4101     fi
4102 
4103 
4104 
4105     for ac_prog in comm
4106 do
4107   # Extract the first word of "$ac_prog", so it can be a program name with args.
4108 set dummy $ac_prog; ac_word=$2
4109 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4110 $as_echo_n "checking for $ac_word... " >&6; }
4111 if test "${ac_cv_path_COMM+set}" = set; then :
4112   $as_echo_n "(cached) " >&6
4113 else
4114   case $COMM in
4115   [\\/]* | ?:[\\/]*)
4116   ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
4117   ;;
4118   *)
4119   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4120 for as_dir in $PATH
4121 do
4122   IFS=$as_save_IFS
4123   test -z "$as_dir" && as_dir=.
4124     for ac_exec_ext in '' $ac_executable_extensions; do
4125   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4126     ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
4127     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4128     break 2
4129   fi
4130 done
4131   done
4132 IFS=$as_save_IFS
4133 
4134   ;;
4135 esac
4136 fi
4137 COMM=$ac_cv_path_COMM
4138 if test -n "$COMM"; then
4139   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
4140 $as_echo "$COMM" >&6; }
4141 else
4142   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4143 $as_echo "no" >&6; }
4144 fi
4145 
4146 
4147   test -n "$COMM" && break
4148 done
4149 
4150 
4151     if test "x$COMM" = x; then
4152         if test "xcomm" = x; then
4153           PROG_NAME=comm
4154         else
4155           PROG_NAME=comm
4156         fi
4157         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4158 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4159         as_fn_error $? "Cannot continue" "$LINENO" 5
4160     fi
4161 
4162 
4163 
4164     for ac_prog in cp
4165 do
4166   # Extract the first word of "$ac_prog", so it can be a program name with args.
4167 set dummy $ac_prog; ac_word=$2
4168 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4169 $as_echo_n "checking for $ac_word... " >&6; }
4170 if test "${ac_cv_path_CP+set}" = set; then :
4171   $as_echo_n "(cached) " >&6
4172 else
4173   case $CP in
4174   [\\/]* | ?:[\\/]*)
4175   ac_cv_path_CP="$CP" # Let the user override the test with a path.
4176   ;;
4177   *)
4178   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4179 for as_dir in $PATH
4180 do
4181   IFS=$as_save_IFS
4182   test -z "$as_dir" && as_dir=.
4183     for ac_exec_ext in '' $ac_executable_extensions; do
4184   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4185     ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
4186     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4187     break 2
4188   fi
4189 done
4190   done
4191 IFS=$as_save_IFS
4192 
4193   ;;
4194 esac
4195 fi
4196 CP=$ac_cv_path_CP
4197 if test -n "$CP"; then
4198   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
4199 $as_echo "$CP" >&6; }
4200 else
4201   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4202 $as_echo "no" >&6; }
4203 fi
4204 
4205 
4206   test -n "$CP" && break
4207 done
4208 
4209 
4210     if test "x$CP" = x; then
4211         if test "xcp" = x; then
4212           PROG_NAME=cp
4213         else
4214           PROG_NAME=cp
4215         fi
4216         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4217 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4218         as_fn_error $? "Cannot continue" "$LINENO" 5
4219     fi
4220 
4221 
4222 
4223     for ac_prog in cpio
4224 do
4225   # Extract the first word of "$ac_prog", so it can be a program name with args.
4226 set dummy $ac_prog; ac_word=$2
4227 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4228 $as_echo_n "checking for $ac_word... " >&6; }
4229 if test "${ac_cv_path_CPIO+set}" = set; then :
4230   $as_echo_n "(cached) " >&6
4231 else
4232   case $CPIO in
4233   [\\/]* | ?:[\\/]*)
4234   ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
4235   ;;
4236   *)
4237   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4238 for as_dir in $PATH
4239 do
4240   IFS=$as_save_IFS
4241   test -z "$as_dir" && as_dir=.
4242     for ac_exec_ext in '' $ac_executable_extensions; do
4243   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4244     ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
4245     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4246     break 2
4247   fi
4248 done
4249   done
4250 IFS=$as_save_IFS
4251 
4252   ;;
4253 esac
4254 fi
4255 CPIO=$ac_cv_path_CPIO
4256 if test -n "$CPIO"; then
4257   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
4258 $as_echo "$CPIO" >&6; }
4259 else
4260   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4261 $as_echo "no" >&6; }
4262 fi
4263 
4264 
4265   test -n "$CPIO" && break
4266 done
4267 
4268 
4269     if test "x$CPIO" = x; then
4270         if test "xcpio" = x; then
4271           PROG_NAME=cpio
4272         else
4273           PROG_NAME=cpio
4274         fi
4275         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4276 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4277         as_fn_error $? "Cannot continue" "$LINENO" 5
4278     fi
4279 
4280 
4281 
4282     for ac_prog in cut
4283 do
4284   # Extract the first word of "$ac_prog", so it can be a program name with args.
4285 set dummy $ac_prog; ac_word=$2
4286 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4287 $as_echo_n "checking for $ac_word... " >&6; }
4288 if test "${ac_cv_path_CUT+set}" = set; then :
4289   $as_echo_n "(cached) " >&6
4290 else
4291   case $CUT in
4292   [\\/]* | ?:[\\/]*)
4293   ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
4294   ;;
4295   *)
4296   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4297 for as_dir in $PATH
4298 do
4299   IFS=$as_save_IFS
4300   test -z "$as_dir" && as_dir=.
4301     for ac_exec_ext in '' $ac_executable_extensions; do
4302   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4303     ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
4304     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4305     break 2
4306   fi
4307 done
4308   done
4309 IFS=$as_save_IFS
4310 
4311   ;;
4312 esac
4313 fi
4314 CUT=$ac_cv_path_CUT
4315 if test -n "$CUT"; then
4316   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
4317 $as_echo "$CUT" >&6; }
4318 else
4319   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4320 $as_echo "no" >&6; }
4321 fi
4322 
4323 
4324   test -n "$CUT" && break
4325 done
4326 
4327 
4328     if test "x$CUT" = x; then
4329         if test "xcut" = x; then
4330           PROG_NAME=cut
4331         else
4332           PROG_NAME=cut
4333         fi
4334         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4335 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4336         as_fn_error $? "Cannot continue" "$LINENO" 5
4337     fi
4338 
4339 
4340 
4341     for ac_prog in date
4342 do
4343   # Extract the first word of "$ac_prog", so it can be a program name with args.
4344 set dummy $ac_prog; ac_word=$2
4345 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4346 $as_echo_n "checking for $ac_word... " >&6; }
4347 if test "${ac_cv_path_DATE+set}" = set; then :
4348   $as_echo_n "(cached) " >&6
4349 else
4350   case $DATE in
4351   [\\/]* | ?:[\\/]*)
4352   ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
4353   ;;
4354   *)
4355   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4356 for as_dir in $PATH
4357 do
4358   IFS=$as_save_IFS
4359   test -z "$as_dir" && as_dir=.
4360     for ac_exec_ext in '' $ac_executable_extensions; do
4361   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4362     ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
4363     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4364     break 2
4365   fi
4366 done
4367   done
4368 IFS=$as_save_IFS
4369 
4370   ;;
4371 esac
4372 fi
4373 DATE=$ac_cv_path_DATE
4374 if test -n "$DATE"; then
4375   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
4376 $as_echo "$DATE" >&6; }
4377 else
4378   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4379 $as_echo "no" >&6; }
4380 fi
4381 
4382 
4383   test -n "$DATE" && break
4384 done
4385 
4386 
4387     if test "x$DATE" = x; then
4388         if test "xdate" = x; then
4389           PROG_NAME=date
4390         else
4391           PROG_NAME=date
4392         fi
4393         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4394 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4395         as_fn_error $? "Cannot continue" "$LINENO" 5
4396     fi
4397 
4398 
4399 
4400     for ac_prog in gdiff diff
4401 do
4402   # Extract the first word of "$ac_prog", so it can be a program name with args.
4403 set dummy $ac_prog; ac_word=$2
4404 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4405 $as_echo_n "checking for $ac_word... " >&6; }
4406 if test "${ac_cv_path_DIFF+set}" = set; then :
4407   $as_echo_n "(cached) " >&6
4408 else
4409   case $DIFF in
4410   [\\/]* | ?:[\\/]*)
4411   ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
4412   ;;
4413   *)
4414   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4415 for as_dir in $PATH
4416 do
4417   IFS=$as_save_IFS
4418   test -z "$as_dir" && as_dir=.
4419     for ac_exec_ext in '' $ac_executable_extensions; do
4420   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4421     ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
4422     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4423     break 2
4424   fi
4425 done
4426   done
4427 IFS=$as_save_IFS
4428 
4429   ;;
4430 esac
4431 fi
4432 DIFF=$ac_cv_path_DIFF
4433 if test -n "$DIFF"; then
4434   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
4435 $as_echo "$DIFF" >&6; }
4436 else
4437   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4438 $as_echo "no" >&6; }
4439 fi
4440 
4441 
4442   test -n "$DIFF" && break
4443 done
4444 
4445 
4446     if test "x$DIFF" = x; then
4447         if test "xgdiff diff" = x; then
4448           PROG_NAME=diff
4449         else
4450           PROG_NAME=gdiff diff
4451         fi
4452         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4453 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4454         as_fn_error $? "Cannot continue" "$LINENO" 5
4455     fi
4456 
4457 
4458 
4459     for ac_prog in dirname
4460 do
4461   # Extract the first word of "$ac_prog", so it can be a program name with args.
4462 set dummy $ac_prog; ac_word=$2
4463 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4464 $as_echo_n "checking for $ac_word... " >&6; }
4465 if test "${ac_cv_path_DIRNAME+set}" = set; then :
4466   $as_echo_n "(cached) " >&6
4467 else
4468   case $DIRNAME in
4469   [\\/]* | ?:[\\/]*)
4470   ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
4471   ;;
4472   *)
4473   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4474 for as_dir in $PATH
4475 do
4476   IFS=$as_save_IFS
4477   test -z "$as_dir" && as_dir=.
4478     for ac_exec_ext in '' $ac_executable_extensions; do
4479   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4480     ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
4481     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4482     break 2
4483   fi
4484 done
4485   done
4486 IFS=$as_save_IFS
4487 
4488   ;;
4489 esac
4490 fi
4491 DIRNAME=$ac_cv_path_DIRNAME
4492 if test -n "$DIRNAME"; then
4493   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
4494 $as_echo "$DIRNAME" >&6; }
4495 else
4496   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4497 $as_echo "no" >&6; }
4498 fi
4499 
4500 
4501   test -n "$DIRNAME" && break
4502 done
4503 
4504 
4505     if test "x$DIRNAME" = x; then
4506         if test "xdirname" = x; then
4507           PROG_NAME=dirname
4508         else
4509           PROG_NAME=dirname
4510         fi
4511         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4512 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4513         as_fn_error $? "Cannot continue" "$LINENO" 5
4514     fi
4515 
4516 
4517 
4518     for ac_prog in echo
4519 do
4520   # Extract the first word of "$ac_prog", so it can be a program name with args.
4521 set dummy $ac_prog; ac_word=$2
4522 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4523 $as_echo_n "checking for $ac_word... " >&6; }
4524 if test "${ac_cv_path_ECHO+set}" = set; then :
4525   $as_echo_n "(cached) " >&6
4526 else
4527   case $ECHO in
4528   [\\/]* | ?:[\\/]*)
4529   ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
4530   ;;
4531   *)
4532   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4533 for as_dir in $PATH
4534 do
4535   IFS=$as_save_IFS
4536   test -z "$as_dir" && as_dir=.
4537     for ac_exec_ext in '' $ac_executable_extensions; do
4538   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4539     ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
4540     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4541     break 2
4542   fi
4543 done
4544   done
4545 IFS=$as_save_IFS
4546 
4547   ;;
4548 esac
4549 fi
4550 ECHO=$ac_cv_path_ECHO
4551 if test -n "$ECHO"; then
4552   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
4553 $as_echo "$ECHO" >&6; }
4554 else
4555   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4556 $as_echo "no" >&6; }
4557 fi
4558 
4559 
4560   test -n "$ECHO" && break
4561 done
4562 
4563 
4564     if test "x$ECHO" = x; then
4565         if test "xecho" = x; then
4566           PROG_NAME=echo
4567         else
4568           PROG_NAME=echo
4569         fi
4570         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4571 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4572         as_fn_error $? "Cannot continue" "$LINENO" 5
4573     fi
4574 
4575 
4576 
4577     for ac_prog in expr
4578 do
4579   # Extract the first word of "$ac_prog", so it can be a program name with args.
4580 set dummy $ac_prog; ac_word=$2
4581 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4582 $as_echo_n "checking for $ac_word... " >&6; }
4583 if test "${ac_cv_path_EXPR+set}" = set; then :
4584   $as_echo_n "(cached) " >&6
4585 else
4586   case $EXPR in
4587   [\\/]* | ?:[\\/]*)
4588   ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
4589   ;;
4590   *)
4591   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4592 for as_dir in $PATH
4593 do
4594   IFS=$as_save_IFS
4595   test -z "$as_dir" && as_dir=.
4596     for ac_exec_ext in '' $ac_executable_extensions; do
4597   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4598     ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
4599     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4600     break 2
4601   fi
4602 done
4603   done
4604 IFS=$as_save_IFS
4605 
4606   ;;
4607 esac
4608 fi
4609 EXPR=$ac_cv_path_EXPR
4610 if test -n "$EXPR"; then
4611   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
4612 $as_echo "$EXPR" >&6; }
4613 else
4614   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4615 $as_echo "no" >&6; }
4616 fi
4617 
4618 
4619   test -n "$EXPR" && break
4620 done
4621 
4622 
4623     if test "x$EXPR" = x; then
4624         if test "xexpr" = x; then
4625           PROG_NAME=expr
4626         else
4627           PROG_NAME=expr
4628         fi
4629         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4630 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4631         as_fn_error $? "Cannot continue" "$LINENO" 5
4632     fi
4633 
4634 
4635 
4636     for ac_prog in file
4637 do
4638   # Extract the first word of "$ac_prog", so it can be a program name with args.
4639 set dummy $ac_prog; ac_word=$2
4640 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4641 $as_echo_n "checking for $ac_word... " >&6; }
4642 if test "${ac_cv_path_FILE+set}" = set; then :
4643   $as_echo_n "(cached) " >&6
4644 else
4645   case $FILE in
4646   [\\/]* | ?:[\\/]*)
4647   ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
4648   ;;
4649   *)
4650   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4651 for as_dir in $PATH
4652 do
4653   IFS=$as_save_IFS
4654   test -z "$as_dir" && as_dir=.
4655     for ac_exec_ext in '' $ac_executable_extensions; do
4656   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4657     ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
4658     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4659     break 2
4660   fi
4661 done
4662   done
4663 IFS=$as_save_IFS
4664 
4665   ;;
4666 esac
4667 fi
4668 FILE=$ac_cv_path_FILE
4669 if test -n "$FILE"; then
4670   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
4671 $as_echo "$FILE" >&6; }
4672 else
4673   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4674 $as_echo "no" >&6; }
4675 fi
4676 
4677 
4678   test -n "$FILE" && break
4679 done
4680 
4681 
4682     if test "x$FILE" = x; then
4683         if test "xfile" = x; then
4684           PROG_NAME=file
4685         else
4686           PROG_NAME=file
4687         fi
4688         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4689 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4690         as_fn_error $? "Cannot continue" "$LINENO" 5
4691     fi
4692 
4693 
4694 
4695     for ac_prog in find
4696 do
4697   # Extract the first word of "$ac_prog", so it can be a program name with args.
4698 set dummy $ac_prog; ac_word=$2
4699 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4700 $as_echo_n "checking for $ac_word... " >&6; }
4701 if test "${ac_cv_path_FIND+set}" = set; then :
4702   $as_echo_n "(cached) " >&6
4703 else
4704   case $FIND in
4705   [\\/]* | ?:[\\/]*)
4706   ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
4707   ;;
4708   *)
4709   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4710 for as_dir in $PATH
4711 do
4712   IFS=$as_save_IFS
4713   test -z "$as_dir" && as_dir=.
4714     for ac_exec_ext in '' $ac_executable_extensions; do
4715   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4716     ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
4717     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4718     break 2
4719   fi
4720 done
4721   done
4722 IFS=$as_save_IFS
4723 
4724   ;;
4725 esac
4726 fi
4727 FIND=$ac_cv_path_FIND
4728 if test -n "$FIND"; then
4729   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
4730 $as_echo "$FIND" >&6; }
4731 else
4732   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4733 $as_echo "no" >&6; }
4734 fi
4735 
4736 
4737   test -n "$FIND" && break
4738 done
4739 
4740 
4741     if test "x$FIND" = x; then
4742         if test "xfind" = x; then
4743           PROG_NAME=find
4744         else
4745           PROG_NAME=find
4746         fi
4747         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4748 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4749         as_fn_error $? "Cannot continue" "$LINENO" 5
4750     fi
4751 
4752 
4753 
4754     for ac_prog in head
4755 do
4756   # Extract the first word of "$ac_prog", so it can be a program name with args.
4757 set dummy $ac_prog; ac_word=$2
4758 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4759 $as_echo_n "checking for $ac_word... " >&6; }
4760 if test "${ac_cv_path_HEAD+set}" = set; then :
4761   $as_echo_n "(cached) " >&6
4762 else
4763   case $HEAD in
4764   [\\/]* | ?:[\\/]*)
4765   ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
4766   ;;
4767   *)
4768   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4769 for as_dir in $PATH
4770 do
4771   IFS=$as_save_IFS
4772   test -z "$as_dir" && as_dir=.
4773     for ac_exec_ext in '' $ac_executable_extensions; do
4774   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4775     ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
4776     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4777     break 2
4778   fi
4779 done
4780   done
4781 IFS=$as_save_IFS
4782 
4783   ;;
4784 esac
4785 fi
4786 HEAD=$ac_cv_path_HEAD
4787 if test -n "$HEAD"; then
4788   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
4789 $as_echo "$HEAD" >&6; }
4790 else
4791   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4792 $as_echo "no" >&6; }
4793 fi
4794 
4795 
4796   test -n "$HEAD" && break
4797 done
4798 
4799 
4800     if test "x$HEAD" = x; then
4801         if test "xhead" = x; then
4802           PROG_NAME=head
4803         else
4804           PROG_NAME=head
4805         fi
4806         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4807 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4808         as_fn_error $? "Cannot continue" "$LINENO" 5
4809     fi
4810 
4811 
4812 
4813     for ac_prog in ln
4814 do
4815   # Extract the first word of "$ac_prog", so it can be a program name with args.
4816 set dummy $ac_prog; ac_word=$2
4817 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4818 $as_echo_n "checking for $ac_word... " >&6; }
4819 if test "${ac_cv_path_LN+set}" = set; then :
4820   $as_echo_n "(cached) " >&6
4821 else
4822   case $LN in
4823   [\\/]* | ?:[\\/]*)
4824   ac_cv_path_LN="$LN" # Let the user override the test with a path.
4825   ;;
4826   *)
4827   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4828 for as_dir in $PATH
4829 do
4830   IFS=$as_save_IFS
4831   test -z "$as_dir" && as_dir=.
4832     for ac_exec_ext in '' $ac_executable_extensions; do
4833   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4834     ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
4835     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4836     break 2
4837   fi
4838 done
4839   done
4840 IFS=$as_save_IFS
4841 
4842   ;;
4843 esac
4844 fi
4845 LN=$ac_cv_path_LN
4846 if test -n "$LN"; then
4847   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
4848 $as_echo "$LN" >&6; }
4849 else
4850   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4851 $as_echo "no" >&6; }
4852 fi
4853 
4854 
4855   test -n "$LN" && break
4856 done
4857 
4858 
4859     if test "x$LN" = x; then
4860         if test "xln" = x; then
4861           PROG_NAME=ln
4862         else
4863           PROG_NAME=ln
4864         fi
4865         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4866 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4867         as_fn_error $? "Cannot continue" "$LINENO" 5
4868     fi
4869 
4870 
4871 
4872     for ac_prog in ls
4873 do
4874   # Extract the first word of "$ac_prog", so it can be a program name with args.
4875 set dummy $ac_prog; ac_word=$2
4876 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4877 $as_echo_n "checking for $ac_word... " >&6; }
4878 if test "${ac_cv_path_LS+set}" = set; then :
4879   $as_echo_n "(cached) " >&6
4880 else
4881   case $LS in
4882   [\\/]* | ?:[\\/]*)
4883   ac_cv_path_LS="$LS" # Let the user override the test with a path.
4884   ;;
4885   *)
4886   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4887 for as_dir in $PATH
4888 do
4889   IFS=$as_save_IFS
4890   test -z "$as_dir" && as_dir=.
4891     for ac_exec_ext in '' $ac_executable_extensions; do
4892   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4893     ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
4894     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4895     break 2
4896   fi
4897 done
4898   done
4899 IFS=$as_save_IFS
4900 
4901   ;;
4902 esac
4903 fi
4904 LS=$ac_cv_path_LS
4905 if test -n "$LS"; then
4906   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
4907 $as_echo "$LS" >&6; }
4908 else
4909   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4910 $as_echo "no" >&6; }
4911 fi
4912 
4913 
4914   test -n "$LS" && break
4915 done
4916 
4917 
4918     if test "x$LS" = x; then
4919         if test "xls" = x; then
4920           PROG_NAME=ls
4921         else
4922           PROG_NAME=ls
4923         fi
4924         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4925 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4926         as_fn_error $? "Cannot continue" "$LINENO" 5
4927     fi
4928 
4929 
4930 
4931     for ac_prog in mkdir
4932 do
4933   # Extract the first word of "$ac_prog", so it can be a program name with args.
4934 set dummy $ac_prog; ac_word=$2
4935 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4936 $as_echo_n "checking for $ac_word... " >&6; }
4937 if test "${ac_cv_path_MKDIR+set}" = set; then :
4938   $as_echo_n "(cached) " >&6
4939 else
4940   case $MKDIR in
4941   [\\/]* | ?:[\\/]*)
4942   ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
4943   ;;
4944   *)
4945   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4946 for as_dir in $PATH
4947 do
4948   IFS=$as_save_IFS
4949   test -z "$as_dir" && as_dir=.
4950     for ac_exec_ext in '' $ac_executable_extensions; do
4951   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4952     ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
4953     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4954     break 2
4955   fi
4956 done
4957   done
4958 IFS=$as_save_IFS
4959 
4960   ;;
4961 esac
4962 fi
4963 MKDIR=$ac_cv_path_MKDIR
4964 if test -n "$MKDIR"; then
4965   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
4966 $as_echo "$MKDIR" >&6; }
4967 else
4968   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4969 $as_echo "no" >&6; }
4970 fi
4971 
4972 
4973   test -n "$MKDIR" && break
4974 done
4975 
4976 
4977     if test "x$MKDIR" = x; then
4978         if test "xmkdir" = x; then
4979           PROG_NAME=mkdir
4980         else
4981           PROG_NAME=mkdir
4982         fi
4983         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4984 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4985         as_fn_error $? "Cannot continue" "$LINENO" 5
4986     fi
4987 
4988 
4989 
4990     for ac_prog in mktemp
4991 do
4992   # Extract the first word of "$ac_prog", so it can be a program name with args.
4993 set dummy $ac_prog; ac_word=$2
4994 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4995 $as_echo_n "checking for $ac_word... " >&6; }
4996 if test "${ac_cv_path_MKTEMP+set}" = set; then :
4997   $as_echo_n "(cached) " >&6
4998 else
4999   case $MKTEMP in
5000   [\\/]* | ?:[\\/]*)
5001   ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
5002   ;;
5003   *)
5004   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5005 for as_dir in $PATH
5006 do
5007   IFS=$as_save_IFS
5008   test -z "$as_dir" && as_dir=.
5009     for ac_exec_ext in '' $ac_executable_extensions; do
5010   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5011     ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
5012     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5013     break 2
5014   fi
5015 done
5016   done
5017 IFS=$as_save_IFS
5018 
5019   ;;
5020 esac
5021 fi
5022 MKTEMP=$ac_cv_path_MKTEMP
5023 if test -n "$MKTEMP"; then
5024   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
5025 $as_echo "$MKTEMP" >&6; }
5026 else
5027   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5028 $as_echo "no" >&6; }
5029 fi
5030 
5031 
5032   test -n "$MKTEMP" && break
5033 done
5034 
5035 
5036     if test "x$MKTEMP" = x; then
5037         if test "xmktemp" = x; then
5038           PROG_NAME=mktemp
5039         else
5040           PROG_NAME=mktemp
5041         fi
5042         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5043 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5044         as_fn_error $? "Cannot continue" "$LINENO" 5
5045     fi
5046 
5047 
5048 
5049     for ac_prog in mv
5050 do
5051   # Extract the first word of "$ac_prog", so it can be a program name with args.
5052 set dummy $ac_prog; ac_word=$2
5053 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5054 $as_echo_n "checking for $ac_word... " >&6; }
5055 if test "${ac_cv_path_MV+set}" = set; then :
5056   $as_echo_n "(cached) " >&6
5057 else
5058   case $MV in
5059   [\\/]* | ?:[\\/]*)
5060   ac_cv_path_MV="$MV" # Let the user override the test with a path.
5061   ;;
5062   *)
5063   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5064 for as_dir in $PATH
5065 do
5066   IFS=$as_save_IFS
5067   test -z "$as_dir" && as_dir=.
5068     for ac_exec_ext in '' $ac_executable_extensions; do
5069   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5070     ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
5071     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5072     break 2
5073   fi
5074 done
5075   done
5076 IFS=$as_save_IFS
5077 
5078   ;;
5079 esac
5080 fi
5081 MV=$ac_cv_path_MV
5082 if test -n "$MV"; then
5083   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
5084 $as_echo "$MV" >&6; }
5085 else
5086   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5087 $as_echo "no" >&6; }
5088 fi
5089 
5090 
5091   test -n "$MV" && break
5092 done
5093 
5094 
5095     if test "x$MV" = x; then
5096         if test "xmv" = x; then
5097           PROG_NAME=mv
5098         else
5099           PROG_NAME=mv
5100         fi
5101         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5102 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5103         as_fn_error $? "Cannot continue" "$LINENO" 5
5104     fi
5105 
5106 
5107 
5108     for ac_prog in printf
5109 do
5110   # Extract the first word of "$ac_prog", so it can be a program name with args.
5111 set dummy $ac_prog; ac_word=$2
5112 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5113 $as_echo_n "checking for $ac_word... " >&6; }
5114 if test "${ac_cv_path_PRINTF+set}" = set; then :
5115   $as_echo_n "(cached) " >&6
5116 else
5117   case $PRINTF in
5118   [\\/]* | ?:[\\/]*)
5119   ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
5120   ;;
5121   *)
5122   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5123 for as_dir in $PATH
5124 do
5125   IFS=$as_save_IFS
5126   test -z "$as_dir" && as_dir=.
5127     for ac_exec_ext in '' $ac_executable_extensions; do
5128   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5129     ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
5130     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5131     break 2
5132   fi
5133 done
5134   done
5135 IFS=$as_save_IFS
5136 
5137   ;;
5138 esac
5139 fi
5140 PRINTF=$ac_cv_path_PRINTF
5141 if test -n "$PRINTF"; then
5142   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
5143 $as_echo "$PRINTF" >&6; }
5144 else
5145   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5146 $as_echo "no" >&6; }
5147 fi
5148 
5149 
5150   test -n "$PRINTF" && break
5151 done
5152 
5153 
5154     if test "x$PRINTF" = x; then
5155         if test "xprintf" = x; then
5156           PROG_NAME=printf
5157         else
5158           PROG_NAME=printf
5159         fi
5160         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5161 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5162         as_fn_error $? "Cannot continue" "$LINENO" 5
5163     fi
5164 
5165 
5166 
5167     for ac_prog in pwd
5168 do
5169   # Extract the first word of "$ac_prog", so it can be a program name with args.
5170 set dummy $ac_prog; ac_word=$2
5171 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5172 $as_echo_n "checking for $ac_word... " >&6; }
5173 if test "${ac_cv_path_THEPWDCMD+set}" = set; then :
5174   $as_echo_n "(cached) " >&6
5175 else
5176   case $THEPWDCMD in
5177   [\\/]* | ?:[\\/]*)
5178   ac_cv_path_THEPWDCMD="$THEPWDCMD" # Let the user override the test with a path.
5179   ;;
5180   *)
5181   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5182 for as_dir in $PATH
5183 do
5184   IFS=$as_save_IFS
5185   test -z "$as_dir" && as_dir=.
5186     for ac_exec_ext in '' $ac_executable_extensions; do
5187   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5188     ac_cv_path_THEPWDCMD="$as_dir/$ac_word$ac_exec_ext"
5189     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5190     break 2
5191   fi
5192 done
5193   done
5194 IFS=$as_save_IFS
5195 
5196   ;;
5197 esac
5198 fi
5199 THEPWDCMD=$ac_cv_path_THEPWDCMD
5200 if test -n "$THEPWDCMD"; then
5201   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $THEPWDCMD" >&5
5202 $as_echo "$THEPWDCMD" >&6; }
5203 else
5204   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5205 $as_echo "no" >&6; }
5206 fi
5207 
5208 
5209   test -n "$THEPWDCMD" && break
5210 done
5211 
5212 
5213     if test "x$THEPWDCMD" = x; then
5214         if test "xpwd" = x; then
5215           PROG_NAME=thepwdcmd
5216         else
5217           PROG_NAME=pwd
5218         fi
5219         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5220 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5221         as_fn_error $? "Cannot continue" "$LINENO" 5
5222     fi
5223 
5224 
5225 
5226     for ac_prog in rm
5227 do
5228   # Extract the first word of "$ac_prog", so it can be a program name with args.
5229 set dummy $ac_prog; ac_word=$2
5230 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5231 $as_echo_n "checking for $ac_word... " >&6; }
5232 if test "${ac_cv_path_RM+set}" = set; then :
5233   $as_echo_n "(cached) " >&6
5234 else
5235   case $RM in
5236   [\\/]* | ?:[\\/]*)
5237   ac_cv_path_RM="$RM" # Let the user override the test with a path.
5238   ;;
5239   *)
5240   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5241 for as_dir in $PATH
5242 do
5243   IFS=$as_save_IFS
5244   test -z "$as_dir" && as_dir=.
5245     for ac_exec_ext in '' $ac_executable_extensions; do
5246   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5247     ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
5248     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5249     break 2
5250   fi
5251 done
5252   done
5253 IFS=$as_save_IFS
5254 
5255   ;;
5256 esac
5257 fi
5258 RM=$ac_cv_path_RM
5259 if test -n "$RM"; then
5260   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
5261 $as_echo "$RM" >&6; }
5262 else
5263   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5264 $as_echo "no" >&6; }
5265 fi
5266 
5267 
5268   test -n "$RM" && break
5269 done
5270 
5271 
5272     if test "x$RM" = x; then
5273         if test "xrm" = x; then
5274           PROG_NAME=rm
5275         else
5276           PROG_NAME=rm
5277         fi
5278         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5279 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5280         as_fn_error $? "Cannot continue" "$LINENO" 5
5281     fi
5282 
5283 
5284 
5285     for ac_prog in sh
5286 do
5287   # Extract the first word of "$ac_prog", so it can be a program name with args.
5288 set dummy $ac_prog; ac_word=$2
5289 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5290 $as_echo_n "checking for $ac_word... " >&6; }
5291 if test "${ac_cv_path_SH+set}" = set; then :
5292   $as_echo_n "(cached) " >&6
5293 else
5294   case $SH in
5295   [\\/]* | ?:[\\/]*)
5296   ac_cv_path_SH="$SH" # Let the user override the test with a path.
5297   ;;
5298   *)
5299   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5300 for as_dir in $PATH
5301 do
5302   IFS=$as_save_IFS
5303   test -z "$as_dir" && as_dir=.
5304     for ac_exec_ext in '' $ac_executable_extensions; do
5305   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5306     ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
5307     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5308     break 2
5309   fi
5310 done
5311   done
5312 IFS=$as_save_IFS
5313 
5314   ;;
5315 esac
5316 fi
5317 SH=$ac_cv_path_SH
5318 if test -n "$SH"; then
5319   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
5320 $as_echo "$SH" >&6; }
5321 else
5322   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5323 $as_echo "no" >&6; }
5324 fi
5325 
5326 
5327   test -n "$SH" && break
5328 done
5329 
5330 
5331     if test "x$SH" = x; then
5332         if test "xsh" = x; then
5333           PROG_NAME=sh
5334         else
5335           PROG_NAME=sh
5336         fi
5337         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5338 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5339         as_fn_error $? "Cannot continue" "$LINENO" 5
5340     fi
5341 
5342 
5343 
5344     for ac_prog in sort
5345 do
5346   # Extract the first word of "$ac_prog", so it can be a program name with args.
5347 set dummy $ac_prog; ac_word=$2
5348 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5349 $as_echo_n "checking for $ac_word... " >&6; }
5350 if test "${ac_cv_path_SORT+set}" = set; then :
5351   $as_echo_n "(cached) " >&6
5352 else
5353   case $SORT in
5354   [\\/]* | ?:[\\/]*)
5355   ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
5356   ;;
5357   *)
5358   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5359 for as_dir in $PATH
5360 do
5361   IFS=$as_save_IFS
5362   test -z "$as_dir" && as_dir=.
5363     for ac_exec_ext in '' $ac_executable_extensions; do
5364   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5365     ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
5366     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5367     break 2
5368   fi
5369 done
5370   done
5371 IFS=$as_save_IFS
5372 
5373   ;;
5374 esac
5375 fi
5376 SORT=$ac_cv_path_SORT
5377 if test -n "$SORT"; then
5378   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
5379 $as_echo "$SORT" >&6; }
5380 else
5381   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5382 $as_echo "no" >&6; }
5383 fi
5384 
5385 
5386   test -n "$SORT" && break
5387 done
5388 
5389 
5390     if test "x$SORT" = x; then
5391         if test "xsort" = x; then
5392           PROG_NAME=sort
5393         else
5394           PROG_NAME=sort
5395         fi
5396         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5397 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5398         as_fn_error $? "Cannot continue" "$LINENO" 5
5399     fi
5400 
5401 
5402 
5403     for ac_prog in tail
5404 do
5405   # Extract the first word of "$ac_prog", so it can be a program name with args.
5406 set dummy $ac_prog; ac_word=$2
5407 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5408 $as_echo_n "checking for $ac_word... " >&6; }
5409 if test "${ac_cv_path_TAIL+set}" = set; then :
5410   $as_echo_n "(cached) " >&6
5411 else
5412   case $TAIL in
5413   [\\/]* | ?:[\\/]*)
5414   ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
5415   ;;
5416   *)
5417   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5418 for as_dir in $PATH
5419 do
5420   IFS=$as_save_IFS
5421   test -z "$as_dir" && as_dir=.
5422     for ac_exec_ext in '' $ac_executable_extensions; do
5423   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5424     ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
5425     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5426     break 2
5427   fi
5428 done
5429   done
5430 IFS=$as_save_IFS
5431 
5432   ;;
5433 esac
5434 fi
5435 TAIL=$ac_cv_path_TAIL
5436 if test -n "$TAIL"; then
5437   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
5438 $as_echo "$TAIL" >&6; }
5439 else
5440   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5441 $as_echo "no" >&6; }
5442 fi
5443 
5444 
5445   test -n "$TAIL" && break
5446 done
5447 
5448 
5449     if test "x$TAIL" = x; then
5450         if test "xtail" = x; then
5451           PROG_NAME=tail
5452         else
5453           PROG_NAME=tail
5454         fi
5455         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5456 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5457         as_fn_error $? "Cannot continue" "$LINENO" 5
5458     fi
5459 
5460 
5461 
5462     for ac_prog in tar
5463 do
5464   # Extract the first word of "$ac_prog", so it can be a program name with args.
5465 set dummy $ac_prog; ac_word=$2
5466 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5467 $as_echo_n "checking for $ac_word... " >&6; }
5468 if test "${ac_cv_path_TAR+set}" = set; then :
5469   $as_echo_n "(cached) " >&6
5470 else
5471   case $TAR in
5472   [\\/]* | ?:[\\/]*)
5473   ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
5474   ;;
5475   *)
5476   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5477 for as_dir in $PATH
5478 do
5479   IFS=$as_save_IFS
5480   test -z "$as_dir" && as_dir=.
5481     for ac_exec_ext in '' $ac_executable_extensions; do
5482   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5483     ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
5484     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5485     break 2
5486   fi
5487 done
5488   done
5489 IFS=$as_save_IFS
5490 
5491   ;;
5492 esac
5493 fi
5494 TAR=$ac_cv_path_TAR
5495 if test -n "$TAR"; then
5496   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
5497 $as_echo "$TAR" >&6; }
5498 else
5499   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5500 $as_echo "no" >&6; }
5501 fi
5502 
5503 
5504   test -n "$TAR" && break
5505 done
5506 
5507 
5508     if test "x$TAR" = x; then
5509         if test "xtar" = x; then
5510           PROG_NAME=tar
5511         else
5512           PROG_NAME=tar
5513         fi
5514         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5515 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5516         as_fn_error $? "Cannot continue" "$LINENO" 5
5517     fi
5518 
5519 
5520 
5521     for ac_prog in tee
5522 do
5523   # Extract the first word of "$ac_prog", so it can be a program name with args.
5524 set dummy $ac_prog; ac_word=$2
5525 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5526 $as_echo_n "checking for $ac_word... " >&6; }
5527 if test "${ac_cv_path_TEE+set}" = set; then :
5528   $as_echo_n "(cached) " >&6
5529 else
5530   case $TEE in
5531   [\\/]* | ?:[\\/]*)
5532   ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
5533   ;;
5534   *)
5535   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5536 for as_dir in $PATH
5537 do
5538   IFS=$as_save_IFS
5539   test -z "$as_dir" && as_dir=.
5540     for ac_exec_ext in '' $ac_executable_extensions; do
5541   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5542     ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
5543     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5544     break 2
5545   fi
5546 done
5547   done
5548 IFS=$as_save_IFS
5549 
5550   ;;
5551 esac
5552 fi
5553 TEE=$ac_cv_path_TEE
5554 if test -n "$TEE"; then
5555   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
5556 $as_echo "$TEE" >&6; }
5557 else
5558   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5559 $as_echo "no" >&6; }
5560 fi
5561 
5562 
5563   test -n "$TEE" && break
5564 done
5565 
5566 
5567     if test "x$TEE" = x; then
5568         if test "xtee" = x; then
5569           PROG_NAME=tee
5570         else
5571           PROG_NAME=tee
5572         fi
5573         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5574 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5575         as_fn_error $? "Cannot continue" "$LINENO" 5
5576     fi
5577 
5578 
5579 
5580     for ac_prog in touch
5581 do
5582   # Extract the first word of "$ac_prog", so it can be a program name with args.
5583 set dummy $ac_prog; ac_word=$2
5584 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5585 $as_echo_n "checking for $ac_word... " >&6; }
5586 if test "${ac_cv_path_TOUCH+set}" = set; then :
5587   $as_echo_n "(cached) " >&6
5588 else
5589   case $TOUCH in
5590   [\\/]* | ?:[\\/]*)
5591   ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
5592   ;;
5593   *)
5594   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5595 for as_dir in $PATH
5596 do
5597   IFS=$as_save_IFS
5598   test -z "$as_dir" && as_dir=.
5599     for ac_exec_ext in '' $ac_executable_extensions; do
5600   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5601     ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
5602     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5603     break 2
5604   fi
5605 done
5606   done
5607 IFS=$as_save_IFS
5608 
5609   ;;
5610 esac
5611 fi
5612 TOUCH=$ac_cv_path_TOUCH
5613 if test -n "$TOUCH"; then
5614   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
5615 $as_echo "$TOUCH" >&6; }
5616 else
5617   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5618 $as_echo "no" >&6; }
5619 fi
5620 
5621 
5622   test -n "$TOUCH" && break
5623 done
5624 
5625 
5626     if test "x$TOUCH" = x; then
5627         if test "xtouch" = x; then
5628           PROG_NAME=touch
5629         else
5630           PROG_NAME=touch
5631         fi
5632         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5633 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5634         as_fn_error $? "Cannot continue" "$LINENO" 5
5635     fi
5636 
5637 
5638 
5639     for ac_prog in tr
5640 do
5641   # Extract the first word of "$ac_prog", so it can be a program name with args.
5642 set dummy $ac_prog; ac_word=$2
5643 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5644 $as_echo_n "checking for $ac_word... " >&6; }
5645 if test "${ac_cv_path_TR+set}" = set; then :
5646   $as_echo_n "(cached) " >&6
5647 else
5648   case $TR in
5649   [\\/]* | ?:[\\/]*)
5650   ac_cv_path_TR="$TR" # Let the user override the test with a path.
5651   ;;
5652   *)
5653   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5654 for as_dir in $PATH
5655 do
5656   IFS=$as_save_IFS
5657   test -z "$as_dir" && as_dir=.
5658     for ac_exec_ext in '' $ac_executable_extensions; do
5659   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5660     ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
5661     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5662     break 2
5663   fi
5664 done
5665   done
5666 IFS=$as_save_IFS
5667 
5668   ;;
5669 esac
5670 fi
5671 TR=$ac_cv_path_TR
5672 if test -n "$TR"; then
5673   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
5674 $as_echo "$TR" >&6; }
5675 else
5676   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5677 $as_echo "no" >&6; }
5678 fi
5679 
5680 
5681   test -n "$TR" && break
5682 done
5683 
5684 
5685     if test "x$TR" = x; then
5686         if test "xtr" = x; then
5687           PROG_NAME=tr
5688         else
5689           PROG_NAME=tr
5690         fi
5691         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5692 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5693         as_fn_error $? "Cannot continue" "$LINENO" 5
5694     fi
5695 
5696 
5697 
5698     for ac_prog in uname
5699 do
5700   # Extract the first word of "$ac_prog", so it can be a program name with args.
5701 set dummy $ac_prog; ac_word=$2
5702 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5703 $as_echo_n "checking for $ac_word... " >&6; }
5704 if test "${ac_cv_path_UNAME+set}" = set; then :
5705   $as_echo_n "(cached) " >&6
5706 else
5707   case $UNAME in
5708   [\\/]* | ?:[\\/]*)
5709   ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
5710   ;;
5711   *)
5712   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5713 for as_dir in $PATH
5714 do
5715   IFS=$as_save_IFS
5716   test -z "$as_dir" && as_dir=.
5717     for ac_exec_ext in '' $ac_executable_extensions; do
5718   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5719     ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
5720     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5721     break 2
5722   fi
5723 done
5724   done
5725 IFS=$as_save_IFS
5726 
5727   ;;
5728 esac
5729 fi
5730 UNAME=$ac_cv_path_UNAME
5731 if test -n "$UNAME"; then
5732   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
5733 $as_echo "$UNAME" >&6; }
5734 else
5735   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5736 $as_echo "no" >&6; }
5737 fi
5738 
5739 
5740   test -n "$UNAME" && break
5741 done
5742 
5743 
5744     if test "x$UNAME" = x; then
5745         if test "xuname" = x; then
5746           PROG_NAME=uname
5747         else
5748           PROG_NAME=uname
5749         fi
5750         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5751 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5752         as_fn_error $? "Cannot continue" "$LINENO" 5
5753     fi
5754 
5755 
5756 
5757     for ac_prog in uniq
5758 do
5759   # Extract the first word of "$ac_prog", so it can be a program name with args.
5760 set dummy $ac_prog; ac_word=$2
5761 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5762 $as_echo_n "checking for $ac_word... " >&6; }
5763 if test "${ac_cv_path_UNIQ+set}" = set; then :
5764   $as_echo_n "(cached) " >&6
5765 else
5766   case $UNIQ in
5767   [\\/]* | ?:[\\/]*)
5768   ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
5769   ;;
5770   *)
5771   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5772 for as_dir in $PATH
5773 do
5774   IFS=$as_save_IFS
5775   test -z "$as_dir" && as_dir=.
5776     for ac_exec_ext in '' $ac_executable_extensions; do
5777   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5778     ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
5779     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5780     break 2
5781   fi
5782 done
5783   done
5784 IFS=$as_save_IFS
5785 
5786   ;;
5787 esac
5788 fi
5789 UNIQ=$ac_cv_path_UNIQ
5790 if test -n "$UNIQ"; then
5791   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
5792 $as_echo "$UNIQ" >&6; }
5793 else
5794   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5795 $as_echo "no" >&6; }
5796 fi
5797 
5798 
5799   test -n "$UNIQ" && break
5800 done
5801 
5802 
5803     if test "x$UNIQ" = x; then
5804         if test "xuniq" = x; then
5805           PROG_NAME=uniq
5806         else
5807           PROG_NAME=uniq
5808         fi
5809         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5810 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5811         as_fn_error $? "Cannot continue" "$LINENO" 5
5812     fi
5813 
5814 
5815 
5816     for ac_prog in wc
5817 do
5818   # Extract the first word of "$ac_prog", so it can be a program name with args.
5819 set dummy $ac_prog; ac_word=$2
5820 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5821 $as_echo_n "checking for $ac_word... " >&6; }
5822 if test "${ac_cv_path_WC+set}" = set; then :
5823   $as_echo_n "(cached) " >&6
5824 else
5825   case $WC in
5826   [\\/]* | ?:[\\/]*)
5827   ac_cv_path_WC="$WC" # Let the user override the test with a path.
5828   ;;
5829   *)
5830   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5831 for as_dir in $PATH
5832 do
5833   IFS=$as_save_IFS
5834   test -z "$as_dir" && as_dir=.
5835     for ac_exec_ext in '' $ac_executable_extensions; do
5836   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5837     ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
5838     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5839     break 2
5840   fi
5841 done
5842   done
5843 IFS=$as_save_IFS
5844 
5845   ;;
5846 esac
5847 fi
5848 WC=$ac_cv_path_WC
5849 if test -n "$WC"; then
5850   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
5851 $as_echo "$WC" >&6; }
5852 else
5853   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5854 $as_echo "no" >&6; }
5855 fi
5856 
5857 
5858   test -n "$WC" && break
5859 done
5860 
5861 
5862     if test "x$WC" = x; then
5863         if test "xwc" = x; then
5864           PROG_NAME=wc
5865         else
5866           PROG_NAME=wc
5867         fi
5868         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5869 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5870         as_fn_error $? "Cannot continue" "$LINENO" 5
5871     fi
5872 
5873 
5874 
5875     for ac_prog in which
5876 do
5877   # Extract the first word of "$ac_prog", so it can be a program name with args.
5878 set dummy $ac_prog; ac_word=$2
5879 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5880 $as_echo_n "checking for $ac_word... " >&6; }
5881 if test "${ac_cv_path_WHICH+set}" = set; then :
5882   $as_echo_n "(cached) " >&6
5883 else
5884   case $WHICH in
5885   [\\/]* | ?:[\\/]*)
5886   ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
5887   ;;
5888   *)
5889   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5890 for as_dir in $PATH
5891 do
5892   IFS=$as_save_IFS
5893   test -z "$as_dir" && as_dir=.
5894     for ac_exec_ext in '' $ac_executable_extensions; do
5895   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5896     ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
5897     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5898     break 2
5899   fi
5900 done
5901   done
5902 IFS=$as_save_IFS
5903 
5904   ;;
5905 esac
5906 fi
5907 WHICH=$ac_cv_path_WHICH
5908 if test -n "$WHICH"; then
5909   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
5910 $as_echo "$WHICH" >&6; }
5911 else
5912   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5913 $as_echo "no" >&6; }
5914 fi
5915 
5916 
5917   test -n "$WHICH" && break
5918 done
5919 
5920 
5921     if test "x$WHICH" = x; then
5922         if test "xwhich" = x; then
5923           PROG_NAME=which
5924         else
5925           PROG_NAME=which
5926         fi
5927         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5928 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5929         as_fn_error $? "Cannot continue" "$LINENO" 5
5930     fi
5931 
5932 
5933 
5934     for ac_prog in xargs
5935 do
5936   # Extract the first word of "$ac_prog", so it can be a program name with args.
5937 set dummy $ac_prog; ac_word=$2
5938 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5939 $as_echo_n "checking for $ac_word... " >&6; }
5940 if test "${ac_cv_path_XARGS+set}" = set; then :
5941   $as_echo_n "(cached) " >&6
5942 else
5943   case $XARGS in
5944   [\\/]* | ?:[\\/]*)
5945   ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
5946   ;;
5947   *)
5948   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5949 for as_dir in $PATH
5950 do
5951   IFS=$as_save_IFS
5952   test -z "$as_dir" && as_dir=.
5953     for ac_exec_ext in '' $ac_executable_extensions; do
5954   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5955     ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
5956     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5957     break 2
5958   fi
5959 done
5960   done
5961 IFS=$as_save_IFS
5962 
5963   ;;
5964 esac
5965 fi
5966 XARGS=$ac_cv_path_XARGS
5967 if test -n "$XARGS"; then
5968   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
5969 $as_echo "$XARGS" >&6; }
5970 else
5971   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5972 $as_echo "no" >&6; }
5973 fi
5974 
5975 
5976   test -n "$XARGS" && break
5977 done
5978 
5979 
5980     if test "x$XARGS" = x; then
5981         if test "xxargs" = x; then
5982           PROG_NAME=xargs
5983         else
5984           PROG_NAME=xargs
5985         fi
5986         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5987 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5988         as_fn_error $? "Cannot continue" "$LINENO" 5
5989     fi
5990 
5991 
5992 
5993 # Then required tools that require some special treatment.
5994 for ac_prog in gawk mawk nawk awk
5995 do
5996   # Extract the first word of "$ac_prog", so it can be a program name with args.
5997 set dummy $ac_prog; ac_word=$2
5998 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5999 $as_echo_n "checking for $ac_word... " >&6; }
6000 if test "${ac_cv_prog_AWK+set}" = set; then :
6001   $as_echo_n "(cached) " >&6
6002 else
6003   if test -n "$AWK"; then
6004   ac_cv_prog_AWK="$AWK" # Let the user override the test.
6005 else
6006 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6007 for as_dir in $PATH
6008 do
6009   IFS=$as_save_IFS
6010   test -z "$as_dir" && as_dir=.
6011     for ac_exec_ext in '' $ac_executable_extensions; do
6012   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6013     ac_cv_prog_AWK="$ac_prog"
6014     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6015     break 2
6016   fi
6017 done
6018   done
6019 IFS=$as_save_IFS
6020 
6021 fi
6022 fi
6023 AWK=$ac_cv_prog_AWK
6024 if test -n "$AWK"; then
6025   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
6026 $as_echo "$AWK" >&6; }
6027 else
6028   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6029 $as_echo "no" >&6; }
6030 fi
6031 
6032 
6033   test -n "$AWK" && break
6034 done
6035 
6036 
6037     if test "x$AWK" = x; then
6038         if test "x" = x; then
6039           PROG_NAME=awk
6040         else
6041           PROG_NAME=
6042         fi
6043         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6044 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6045         as_fn_error $? "Cannot continue" "$LINENO" 5
6046     fi
6047 
6048 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
6049 $as_echo_n "checking for grep that handles long lines and -e... " >&6; }
6050 if test "${ac_cv_path_GREP+set}" = set; then :
6051   $as_echo_n "(cached) " >&6
6052 else
6053   if test -z "$GREP"; then
6054   ac_path_GREP_found=false
6055   # Loop through the user's path and test for each of PROGNAME-LIST
6056   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6057 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
6058 do
6059   IFS=$as_save_IFS
6060   test -z "$as_dir" && as_dir=.
6061     for ac_prog in grep ggrep; do
6062     for ac_exec_ext in '' $ac_executable_extensions; do
6063       ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
6064       { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
6065 # Check for GNU ac_path_GREP and select it if it is found.
6066   # Check for GNU $ac_path_GREP
6067 case `"$ac_path_GREP" --version 2>&1` in
6068 *GNU*)
6069   ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
6070 *)
6071   ac_count=0
6072   $as_echo_n 0123456789 >"conftest.in"
6073   while :
6074   do
6075     cat "conftest.in" "conftest.in" >"conftest.tmp"
6076     mv "conftest.tmp" "conftest.in"
6077     cp "conftest.in" "conftest.nl"
6078     $as_echo 'GREP' >> "conftest.nl"
6079     "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
6080     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6081     as_fn_arith $ac_count + 1 && ac_count=$as_val
6082     if test $ac_count -gt ${ac_path_GREP_max-0}; then
6083       # Best one so far, save it but keep looking for a better one
6084       ac_cv_path_GREP="$ac_path_GREP"
6085       ac_path_GREP_max=$ac_count
6086     fi
6087     # 10*(2^10) chars as input seems more than enough
6088     test $ac_count -gt 10 && break
6089   done
6090   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6091 esac
6092 
6093       $ac_path_GREP_found && break 3
6094     done
6095   done
6096   done
6097 IFS=$as_save_IFS
6098   if test -z "$ac_cv_path_GREP"; then
6099     as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
6100   fi
6101 else
6102   ac_cv_path_GREP=$GREP
6103 fi
6104 
6105 fi
6106 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
6107 $as_echo "$ac_cv_path_GREP" >&6; }
6108  GREP="$ac_cv_path_GREP"
6109 
6110 
6111 
6112     if test "x$GREP" = x; then
6113         if test "x" = x; then
6114           PROG_NAME=grep
6115         else
6116           PROG_NAME=
6117         fi
6118         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6119 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6120         as_fn_error $? "Cannot continue" "$LINENO" 5
6121     fi
6122 
6123 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
6124 $as_echo_n "checking for egrep... " >&6; }
6125 if test "${ac_cv_path_EGREP+set}" = set; then :
6126   $as_echo_n "(cached) " >&6
6127 else
6128   if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
6129    then ac_cv_path_EGREP="$GREP -E"
6130    else
6131      if test -z "$EGREP"; then
6132   ac_path_EGREP_found=false
6133   # Loop through the user's path and test for each of PROGNAME-LIST
6134   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6135 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
6136 do
6137   IFS=$as_save_IFS
6138   test -z "$as_dir" && as_dir=.
6139     for ac_prog in egrep; do
6140     for ac_exec_ext in '' $ac_executable_extensions; do
6141       ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
6142       { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
6143 # Check for GNU ac_path_EGREP and select it if it is found.
6144   # Check for GNU $ac_path_EGREP
6145 case `"$ac_path_EGREP" --version 2>&1` in
6146 *GNU*)
6147   ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
6148 *)
6149   ac_count=0
6150   $as_echo_n 0123456789 >"conftest.in"
6151   while :
6152   do
6153     cat "conftest.in" "conftest.in" >"conftest.tmp"
6154     mv "conftest.tmp" "conftest.in"
6155     cp "conftest.in" "conftest.nl"
6156     $as_echo 'EGREP' >> "conftest.nl"
6157     "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
6158     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6159     as_fn_arith $ac_count + 1 && ac_count=$as_val
6160     if test $ac_count -gt ${ac_path_EGREP_max-0}; then
6161       # Best one so far, save it but keep looking for a better one
6162       ac_cv_path_EGREP="$ac_path_EGREP"
6163       ac_path_EGREP_max=$ac_count
6164     fi
6165     # 10*(2^10) chars as input seems more than enough
6166     test $ac_count -gt 10 && break
6167   done
6168   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6169 esac
6170 
6171       $ac_path_EGREP_found && break 3
6172     done
6173   done
6174   done
6175 IFS=$as_save_IFS
6176   if test -z "$ac_cv_path_EGREP"; then
6177     as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
6178   fi
6179 else
6180   ac_cv_path_EGREP=$EGREP
6181 fi
6182 
6183    fi
6184 fi
6185 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
6186 $as_echo "$ac_cv_path_EGREP" >&6; }
6187  EGREP="$ac_cv_path_EGREP"
6188 
6189 
6190 
6191     if test "x$EGREP" = x; then
6192         if test "x" = x; then
6193           PROG_NAME=egrep
6194         else
6195           PROG_NAME=
6196         fi
6197         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6198 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6199         as_fn_error $? "Cannot continue" "$LINENO" 5
6200     fi
6201 
6202 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
6203 $as_echo_n "checking for fgrep... " >&6; }
6204 if test "${ac_cv_path_FGREP+set}" = set; then :
6205   $as_echo_n "(cached) " >&6
6206 else
6207   if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
6208    then ac_cv_path_FGREP="$GREP -F"
6209    else
6210      if test -z "$FGREP"; then
6211   ac_path_FGREP_found=false
6212   # Loop through the user's path and test for each of PROGNAME-LIST
6213   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6214 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
6215 do
6216   IFS=$as_save_IFS
6217   test -z "$as_dir" && as_dir=.
6218     for ac_prog in fgrep; do
6219     for ac_exec_ext in '' $ac_executable_extensions; do
6220       ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
6221       { test -f "$ac_path_FGREP" && $as_test_x "$ac_path_FGREP"; } || continue
6222 # Check for GNU ac_path_FGREP and select it if it is found.
6223   # Check for GNU $ac_path_FGREP
6224 case `"$ac_path_FGREP" --version 2>&1` in
6225 *GNU*)
6226   ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
6227 *)
6228   ac_count=0
6229   $as_echo_n 0123456789 >"conftest.in"
6230   while :
6231   do
6232     cat "conftest.in" "conftest.in" >"conftest.tmp"
6233     mv "conftest.tmp" "conftest.in"
6234     cp "conftest.in" "conftest.nl"
6235     $as_echo 'FGREP' >> "conftest.nl"
6236     "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
6237     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6238     as_fn_arith $ac_count + 1 && ac_count=$as_val
6239     if test $ac_count -gt ${ac_path_FGREP_max-0}; then
6240       # Best one so far, save it but keep looking for a better one
6241       ac_cv_path_FGREP="$ac_path_FGREP"
6242       ac_path_FGREP_max=$ac_count
6243     fi
6244     # 10*(2^10) chars as input seems more than enough
6245     test $ac_count -gt 10 && break
6246   done
6247   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6248 esac
6249 
6250       $ac_path_FGREP_found && break 3
6251     done
6252   done
6253   done
6254 IFS=$as_save_IFS
6255   if test -z "$ac_cv_path_FGREP"; then
6256     as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
6257   fi
6258 else
6259   ac_cv_path_FGREP=$FGREP
6260 fi
6261 
6262    fi
6263 fi
6264 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
6265 $as_echo "$ac_cv_path_FGREP" >&6; }
6266  FGREP="$ac_cv_path_FGREP"
6267 
6268 
6269 
6270     if test "x$FGREP" = x; then
6271         if test "x" = x; then
6272           PROG_NAME=fgrep
6273         else
6274           PROG_NAME=
6275         fi
6276         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6277 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6278         as_fn_error $? "Cannot continue" "$LINENO" 5
6279     fi
6280 
6281 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
6282 $as_echo_n "checking for a sed that does not truncate output... " >&6; }
6283 if test "${ac_cv_path_SED+set}" = set; then :
6284   $as_echo_n "(cached) " >&6
6285 else
6286             ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
6287      for ac_i in 1 2 3 4 5 6 7; do
6288        ac_script="$ac_script$as_nl$ac_script"
6289      done
6290      echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
6291      { ac_script=; unset ac_script;}
6292      if test -z "$SED"; then
6293   ac_path_SED_found=false
6294   # Loop through the user's path and test for each of PROGNAME-LIST
6295   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6296 for as_dir in $PATH
6297 do
6298   IFS=$as_save_IFS
6299   test -z "$as_dir" && as_dir=.
6300     for ac_prog in sed gsed; do
6301     for ac_exec_ext in '' $ac_executable_extensions; do
6302       ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
6303       { test -f "$ac_path_SED" && $as_test_x "$ac_path_SED"; } || continue
6304 # Check for GNU ac_path_SED and select it if it is found.
6305   # Check for GNU $ac_path_SED
6306 case `"$ac_path_SED" --version 2>&1` in
6307 *GNU*)
6308   ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
6309 *)
6310   ac_count=0
6311   $as_echo_n 0123456789 >"conftest.in"
6312   while :
6313   do
6314     cat "conftest.in" "conftest.in" >"conftest.tmp"
6315     mv "conftest.tmp" "conftest.in"
6316     cp "conftest.in" "conftest.nl"
6317     $as_echo '' >> "conftest.nl"
6318     "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
6319     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6320     as_fn_arith $ac_count + 1 && ac_count=$as_val
6321     if test $ac_count -gt ${ac_path_SED_max-0}; then
6322       # Best one so far, save it but keep looking for a better one
6323       ac_cv_path_SED="$ac_path_SED"
6324       ac_path_SED_max=$ac_count
6325     fi
6326     # 10*(2^10) chars as input seems more than enough
6327     test $ac_count -gt 10 && break
6328   done
6329   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6330 esac
6331 
6332       $ac_path_SED_found && break 3
6333     done
6334   done
6335   done
6336 IFS=$as_save_IFS
6337   if test -z "$ac_cv_path_SED"; then
6338     as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
6339   fi
6340 else
6341   ac_cv_path_SED=$SED
6342 fi
6343 
6344 fi
6345 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
6346 $as_echo "$ac_cv_path_SED" >&6; }
6347  SED="$ac_cv_path_SED"
6348   rm -f conftest.sed
6349 
6350 
6351     if test "x$SED" = x; then
6352         if test "x" = x; then
6353           PROG_NAME=sed
6354         else
6355           PROG_NAME=
6356         fi
6357         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6358 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6359         as_fn_error $? "Cannot continue" "$LINENO" 5
6360     fi
6361 
6362 
6363 for ac_prog in nawk gawk awk
6364 do
6365   # Extract the first word of "$ac_prog", so it can be a program name with args.
6366 set dummy $ac_prog; ac_word=$2
6367 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6368 $as_echo_n "checking for $ac_word... " >&6; }
6369 if test "${ac_cv_path_NAWK+set}" = set; then :
6370   $as_echo_n "(cached) " >&6
6371 else
6372   case $NAWK in
6373   [\\/]* | ?:[\\/]*)
6374   ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
6375   ;;
6376   *)
6377   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6378 for as_dir in $PATH
6379 do
6380   IFS=$as_save_IFS
6381   test -z "$as_dir" && as_dir=.
6382     for ac_exec_ext in '' $ac_executable_extensions; do
6383   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6384     ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
6385     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6386     break 2
6387   fi
6388 done
6389   done
6390 IFS=$as_save_IFS
6391 
6392   ;;
6393 esac
6394 fi
6395 NAWK=$ac_cv_path_NAWK
6396 if test -n "$NAWK"; then
6397   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
6398 $as_echo "$NAWK" >&6; }
6399 else
6400   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6401 $as_echo "no" >&6; }
6402 fi
6403 
6404 
6405   test -n "$NAWK" && break
6406 done
6407 
6408 
6409     if test "x$NAWK" = x; then
6410         if test "x" = x; then
6411           PROG_NAME=nawk
6412         else
6413           PROG_NAME=
6414         fi
6415         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6416 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6417         as_fn_error $? "Cannot continue" "$LINENO" 5
6418     fi
6419 
6420 
6421 # Always force rm.
6422 RM="$RM -f"
6423 
6424 # These are not required on all platforms
6425 # Extract the first word of "cygpath", so it can be a program name with args.
6426 set dummy cygpath; ac_word=$2
6427 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6428 $as_echo_n "checking for $ac_word... " >&6; }
6429 if test "${ac_cv_path_CYGPATH+set}" = set; then :
6430   $as_echo_n "(cached) " >&6
6431 else
6432   case $CYGPATH in
6433   [\\/]* | ?:[\\/]*)
6434   ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
6435   ;;
6436   *)
6437   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6438 for as_dir in $PATH
6439 do
6440   IFS=$as_save_IFS
6441   test -z "$as_dir" && as_dir=.
6442     for ac_exec_ext in '' $ac_executable_extensions; do
6443   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6444     ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
6445     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6446     break 2
6447   fi
6448 done
6449   done
6450 IFS=$as_save_IFS
6451 
6452   ;;
6453 esac
6454 fi
6455 CYGPATH=$ac_cv_path_CYGPATH
6456 if test -n "$CYGPATH"; then
6457   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
6458 $as_echo "$CYGPATH" >&6; }
6459 else
6460   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6461 $as_echo "no" >&6; }
6462 fi
6463 
6464 
6465 # Extract the first word of "readlink", so it can be a program name with args.
6466 set dummy readlink; ac_word=$2
6467 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6468 $as_echo_n "checking for $ac_word... " >&6; }
6469 if test "${ac_cv_path_READLINK+set}" = set; then :
6470   $as_echo_n "(cached) " >&6
6471 else
6472   case $READLINK in
6473   [\\/]* | ?:[\\/]*)
6474   ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
6475   ;;
6476   *)
6477   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6478 for as_dir in $PATH
6479 do
6480   IFS=$as_save_IFS
6481   test -z "$as_dir" && as_dir=.
6482     for ac_exec_ext in '' $ac_executable_extensions; do
6483   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6484     ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
6485     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6486     break 2
6487   fi
6488 done
6489   done
6490 IFS=$as_save_IFS
6491 
6492   ;;
6493 esac
6494 fi
6495 READLINK=$ac_cv_path_READLINK
6496 if test -n "$READLINK"; then
6497   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
6498 $as_echo "$READLINK" >&6; }
6499 else
6500   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6501 $as_echo "no" >&6; }
6502 fi
6503 
6504 
6505 # Extract the first word of "df", so it can be a program name with args.
6506 set dummy df; ac_word=$2
6507 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6508 $as_echo_n "checking for $ac_word... " >&6; }
6509 if test "${ac_cv_path_DF+set}" = set; then :
6510   $as_echo_n "(cached) " >&6
6511 else
6512   case $DF in
6513   [\\/]* | ?:[\\/]*)
6514   ac_cv_path_DF="$DF" # Let the user override the test with a path.
6515   ;;
6516   *)
6517   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6518 for as_dir in $PATH
6519 do
6520   IFS=$as_save_IFS
6521   test -z "$as_dir" && as_dir=.
6522     for ac_exec_ext in '' $ac_executable_extensions; do
6523   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6524     ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
6525     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6526     break 2
6527   fi
6528 done
6529   done
6530 IFS=$as_save_IFS
6531 
6532   ;;
6533 esac
6534 fi
6535 DF=$ac_cv_path_DF
6536 if test -n "$DF"; then
6537   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
6538 $as_echo "$DF" >&6; }
6539 else
6540   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6541 $as_echo "no" >&6; }
6542 fi
6543 
6544 
6545 # Extract the first word of "SetFile", so it can be a program name with args.
6546 set dummy SetFile; ac_word=$2
6547 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6548 $as_echo_n "checking for $ac_word... " >&6; }
6549 if test "${ac_cv_path_SETFILE+set}" = set; then :
6550   $as_echo_n "(cached) " >&6
6551 else
6552   case $SETFILE in
6553   [\\/]* | ?:[\\/]*)
6554   ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
6555   ;;
6556   *)
6557   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6558 for as_dir in $PATH
6559 do
6560   IFS=$as_save_IFS
6561   test -z "$as_dir" && as_dir=.
6562     for ac_exec_ext in '' $ac_executable_extensions; do
6563   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6564     ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
6565     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6566     break 2
6567   fi
6568 done
6569   done
6570 IFS=$as_save_IFS
6571 
6572   ;;
6573 esac
6574 fi
6575 SETFILE=$ac_cv_path_SETFILE
6576 if test -n "$SETFILE"; then
6577   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
6578 $as_echo "$SETFILE" >&6; }
6579 else
6580   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6581 $as_echo "no" >&6; }
6582 fi
6583 
6584 
6585 
6586 
6587 # Now we can determine OpenJDK build and target platforms. This is required to
6588 # have early on.
6589 # Make sure we can run config.sub.
6590 $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
6591   as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
6592 
6593 { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
6594 $as_echo_n "checking build system type... " >&6; }
6595 if test "${ac_cv_build+set}" = set; then :
6596   $as_echo_n "(cached) " >&6
6597 else
6598   ac_build_alias=$build_alias
6599 test "x$ac_build_alias" = x &&
6600   ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
6601 test "x$ac_build_alias" = x &&
6602   as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
6603 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
6604   as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
6605 
6606 fi
6607 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
6608 $as_echo "$ac_cv_build" >&6; }
6609 case $ac_cv_build in
6610 *-*-*) ;;
6611 *) as_fn_error $? "invalid value of canonical build" "$LINENO" 5 ;;
6612 esac
6613 build=$ac_cv_build
6614 ac_save_IFS=$IFS; IFS='-'
6615 set x $ac_cv_build
6616 shift
6617 build_cpu=$1
6618 build_vendor=$2
6619 shift; shift
6620 # Remember, the first character of IFS is used to create $*,
6621 # except with old shells:
6622 build_os=$*
6623 IFS=$ac_save_IFS
6624 case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
6625 
6626 
6627 { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
6628 $as_echo_n "checking host system type... " >&6; }
6629 if test "${ac_cv_host+set}" = set; then :
6630   $as_echo_n "(cached) " >&6
6631 else
6632   if test "x$host_alias" = x; then
6633   ac_cv_host=$ac_cv_build
6634 else
6635   ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
6636     as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
6637 fi
6638 
6639 fi
6640 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
6641 $as_echo "$ac_cv_host" >&6; }
6642 case $ac_cv_host in
6643 *-*-*) ;;
6644 *) as_fn_error $? "invalid value of canonical host" "$LINENO" 5 ;;
6645 esac
6646 host=$ac_cv_host
6647 ac_save_IFS=$IFS; IFS='-'
6648 set x $ac_cv_host
6649 shift
6650 host_cpu=$1
6651 host_vendor=$2
6652 shift; shift
6653 # Remember, the first character of IFS is used to create $*,
6654 # except with old shells:
6655 host_os=$*
6656 IFS=$ac_save_IFS
6657 case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
6658 
6659 
6660 { $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
6661 $as_echo_n "checking target system type... " >&6; }
6662 if test "${ac_cv_target+set}" = set; then :
6663   $as_echo_n "(cached) " >&6
6664 else
6665   if test "x$target_alias" = x; then
6666   ac_cv_target=$ac_cv_host
6667 else
6668   ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
6669     as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
6670 fi
6671 
6672 fi
6673 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
6674 $as_echo "$ac_cv_target" >&6; }
6675 case $ac_cv_target in
6676 *-*-*) ;;
6677 *) as_fn_error $? "invalid value of canonical target" "$LINENO" 5 ;;
6678 esac
6679 target=$ac_cv_target
6680 ac_save_IFS=$IFS; IFS='-'
6681 set x $ac_cv_target
6682 shift
6683 target_cpu=$1
6684 target_vendor=$2
6685 shift; shift
6686 # Remember, the first character of IFS is used to create $*,
6687 # except with old shells:
6688 target_os=$*
6689 IFS=$ac_save_IFS
6690 case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
6691 
6692 
6693 # The aliases save the names the user supplied, while $host etc.
6694 # will get canonicalized.
6695 test -n "$target_alias" &&
6696   test "$program_prefix$program_suffix$program_transform_name" = \
6697     NONENONEs,x,x, &&
6698   program_prefix=${target_alias}-
6699 
6700 # Figure out the build and target systems. # Note that in autoconf terminology, "build" is obvious, but "target"
6701 # is confusing; it assumes you are cross-compiling a cross-compiler (!)  and "target" is thus the target of the
6702 # product you're building. The target of this build is called "host". Since this is confusing to most people, we
6703 # have not adopted that system, but use "target" as the platform we are building for. In some places though we need
6704 # to use the configure naming style.
6705 
6706 
6707 
6708 
6709 
6710     # Copy the autoconf trip/quadruplet verbatim to OPENJDK_TARGET_AUTOCONF_NAME
6711     # (from the autoconf "host") and OPENJDK_BUILD_AUTOCONF_NAME
6712     # Note that we might later on rewrite e.g. OPENJDK_TARGET_CPU due to reduced build,
6713     # but this will not change the value of OPENJDK_TARGET_AUTOCONF_NAME.
6714     OPENJDK_TARGET_AUTOCONF_NAME="$host"
6715     OPENJDK_BUILD_AUTOCONF_NAME="$build"
6716 
6717 
6718 
6719     # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
6720 
6721   case "$build_os" in
6722     *linux*)
6723       VAR_OS=linux
6724       VAR_OS_API=posix
6725       VAR_OS_ENV=linux
6726       ;;
6727     *solaris*)
6728       VAR_OS=solaris
6729       VAR_OS_API=posix
6730       VAR_OS_ENV=solaris
6731       ;;
6732     *darwin*)
6733       VAR_OS=macosx
6734       VAR_OS_API=posix
6735       VAR_OS_ENV=macosx
6736       ;;
6737     *bsd*)
6738       VAR_OS=bsd
6739       VAR_OS_API=posix
6740       VAR_OS_ENV=bsd
6741       ;;
6742     *cygwin*)
6743       VAR_OS=windows
6744       VAR_OS_API=winapi
6745       VAR_OS_ENV=windows.cygwin
6746       ;;
6747     *mingw*)
6748       VAR_OS=windows
6749       VAR_OS_API=winapi
6750       VAR_OS_ENV=windows.msys
6751       ;;
6752     *)
6753       as_fn_error $? "unsupported operating system $build_os" "$LINENO" 5
6754       ;;
6755   esac
6756 
6757 
6758   # First argument is the cpu name from the trip/quad
6759   case "$build_cpu" in
6760     x86_64)
6761       VAR_CPU=x86_64
6762       VAR_CPU_ARCH=x86
6763       VAR_CPU_BITS=64
6764       VAR_CPU_ENDIAN=little
6765       ;;
6766     i?86)
6767       VAR_CPU=x86
6768       VAR_CPU_ARCH=x86
6769       VAR_CPU_BITS=32
6770       VAR_CPU_ENDIAN=little
6771       ;;
6772     arm*)
6773       VAR_CPU=arm
6774       VAR_CPU_ARCH=arm
6775       VAR_CPU_BITS=32
6776       VAR_CPU_ENDIAN=little
6777       ;;
6778     powerpc)
6779       VAR_CPU=ppc
6780       VAR_CPU_ARCH=ppc
6781       VAR_CPU_BITS=32
6782       VAR_CPU_ENDIAN=big
6783        ;;
6784     powerpc64)
6785       VAR_CPU=ppc64
6786       VAR_CPU_ARCH=ppc
6787       VAR_CPU_BITS=64
6788       VAR_CPU_ENDIAN=big
6789        ;;
6790     sparc)
6791       VAR_CPU=sparc
6792       VAR_CPU_ARCH=sparc
6793       VAR_CPU_BITS=32
6794       VAR_CPU_ENDIAN=big
6795        ;;
6796     sparcv9)
6797       VAR_CPU=sparcv9
6798       VAR_CPU_ARCH=sparc
6799       VAR_CPU_BITS=64
6800       VAR_CPU_ENDIAN=big
6801        ;;
6802     *)
6803       as_fn_error $? "unsupported cpu $build_cpu" "$LINENO" 5
6804       ;;
6805   esac
6806 
6807     # ..and setup our own variables. (Do this explicitely to facilitate searching)
6808     OPENJDK_BUILD_OS="$VAR_OS"
6809     OPENJDK_BUILD_OS_API="$VAR_OS_API"
6810     OPENJDK_BUILD_OS_ENV="$VAR_OS_ENV"
6811     OPENJDK_BUILD_CPU="$VAR_CPU"
6812     OPENJDK_BUILD_CPU_ARCH="$VAR_CPU_ARCH"
6813     OPENJDK_BUILD_CPU_BITS="$VAR_CPU_BITS"
6814     OPENJDK_BUILD_CPU_ENDIAN="$VAR_CPU_ENDIAN"
6815 
6816 
6817 
6818 
6819 
6820 
6821 
6822     { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-build os-cpu" >&5
6823 $as_echo_n "checking openjdk-build os-cpu... " >&6; }
6824     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&5
6825 $as_echo "$OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&6; }
6826 
6827     # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
6828 
6829   case "$host_os" in
6830     *linux*)
6831       VAR_OS=linux
6832       VAR_OS_API=posix
6833       VAR_OS_ENV=linux
6834       ;;
6835     *solaris*)
6836       VAR_OS=solaris
6837       VAR_OS_API=posix
6838       VAR_OS_ENV=solaris
6839       ;;
6840     *darwin*)
6841       VAR_OS=macosx
6842       VAR_OS_API=posix
6843       VAR_OS_ENV=macosx
6844       ;;
6845     *bsd*)
6846       VAR_OS=bsd
6847       VAR_OS_API=posix
6848       VAR_OS_ENV=bsd
6849       ;;
6850     *cygwin*)
6851       VAR_OS=windows
6852       VAR_OS_API=winapi
6853       VAR_OS_ENV=windows.cygwin
6854       ;;
6855     *mingw*)
6856       VAR_OS=windows
6857       VAR_OS_API=winapi
6858       VAR_OS_ENV=windows.msys
6859       ;;
6860     *)
6861       as_fn_error $? "unsupported operating system $host_os" "$LINENO" 5
6862       ;;
6863   esac
6864 
6865 
6866   # First argument is the cpu name from the trip/quad
6867   case "$host_cpu" in
6868     x86_64)
6869       VAR_CPU=x86_64
6870       VAR_CPU_ARCH=x86
6871       VAR_CPU_BITS=64
6872       VAR_CPU_ENDIAN=little
6873       ;;
6874     i?86)
6875       VAR_CPU=x86
6876       VAR_CPU_ARCH=x86
6877       VAR_CPU_BITS=32
6878       VAR_CPU_ENDIAN=little
6879       ;;
6880     arm*)
6881       VAR_CPU=arm
6882       VAR_CPU_ARCH=arm
6883       VAR_CPU_BITS=32
6884       VAR_CPU_ENDIAN=little
6885       ;;
6886     powerpc)
6887       VAR_CPU=ppc
6888       VAR_CPU_ARCH=ppc
6889       VAR_CPU_BITS=32
6890       VAR_CPU_ENDIAN=big
6891        ;;
6892     powerpc64)
6893       VAR_CPU=ppc64
6894       VAR_CPU_ARCH=ppc
6895       VAR_CPU_BITS=64
6896       VAR_CPU_ENDIAN=big
6897        ;;
6898     sparc)
6899       VAR_CPU=sparc
6900       VAR_CPU_ARCH=sparc
6901       VAR_CPU_BITS=32
6902       VAR_CPU_ENDIAN=big
6903        ;;
6904     sparcv9)
6905       VAR_CPU=sparcv9
6906       VAR_CPU_ARCH=sparc
6907       VAR_CPU_BITS=64
6908       VAR_CPU_ENDIAN=big
6909        ;;
6910     *)
6911       as_fn_error $? "unsupported cpu $host_cpu" "$LINENO" 5
6912       ;;
6913   esac
6914 
6915     # ... and setup our own variables. (Do this explicitely to facilitate searching)
6916     OPENJDK_TARGET_OS="$VAR_OS"
6917     OPENJDK_TARGET_OS_API="$VAR_OS_API"
6918     OPENJDK_TARGET_OS_ENV="$VAR_OS_ENV"
6919     OPENJDK_TARGET_CPU="$VAR_CPU"
6920     OPENJDK_TARGET_CPU_ARCH="$VAR_CPU_ARCH"
6921     OPENJDK_TARGET_CPU_BITS="$VAR_CPU_BITS"
6922     OPENJDK_TARGET_CPU_ENDIAN="$VAR_CPU_ENDIAN"
6923 
6924 
6925 
6926 
6927 
6928 
6929 
6930     { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-target os-cpu" >&5
6931 $as_echo_n "checking openjdk-target os-cpu... " >&6; }
6932     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&5
6933 $as_echo "$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&6; }
6934 
6935 
6936 
6937 # Check whether --with-target-bits was given.
6938 if test "${with_target_bits+set}" = set; then :
6939   withval=$with_target_bits;
6940 fi
6941 
6942 
6943   # We have three types of compiles:
6944   # native  == normal compilation, target system == build system
6945   # cross   == traditional cross compilation, target system != build system; special toolchain needed
6946   # reduced == using native compilers, but with special flags (e.g. -m32) to produce 32-bit builds on 64-bit machines
6947   #
6948   if test "x$OPENJDK_BUILD_AUTOCONF_NAME" != "x$OPENJDK_TARGET_AUTOCONF_NAME"; then
6949     # We're doing a proper cross-compilation
6950     COMPILE_TYPE="cross"
6951   else
6952     COMPILE_TYPE="native"
6953   fi
6954 
6955   if test "x$with_target_bits" != x; then
6956     if test "x$COMPILE_TYPE" = "xcross"; then
6957       as_fn_error $? "It is not possible to combine --with-target-bits=X and proper cross-compilation. Choose either." "$LINENO" 5
6958     fi
6959 
6960     if test "x$with_target_bits" = x32 && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
6961       # A reduced build is requested
6962       COMPILE_TYPE="reduced"
6963       OPENJDK_TARGET_CPU_BITS=32
6964       if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
6965         OPENJDK_TARGET_CPU=x86
6966       elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
6967         OPENJDK_TARGET_CPU=sparc
6968       else
6969         as_fn_error $? "Reduced build (--with-target-bits=32) is only supported on x86_64 and sparcv9" "$LINENO" 5
6970       fi
6971     elif test "x$with_target_bits" = x64 && test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
6972       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
6973     elif test "x$with_target_bits" = "x$OPENJDK_TARGET_CPU_BITS"; then
6974       { $as_echo "$as_me:${as_lineno-$LINENO}: --with-target-bits are set to build platform address size; argument has no meaning" >&5
6975 $as_echo "$as_me: --with-target-bits are set to build platform address size; argument has no meaning" >&6;}
6976     else
6977       as_fn_error $? "--with-target-bits can only be 32 or 64, you specified $with_target_bits!" "$LINENO" 5
6978     fi
6979   fi
6980 
6981 
6982 { $as_echo "$as_me:${as_lineno-$LINENO}: checking compilation type" >&5
6983 $as_echo_n "checking compilation type... " >&6; }
6984 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMPILE_TYPE" >&5
6985 $as_echo "$COMPILE_TYPE" >&6; }
6986 
6987 
6988     if test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
6989        REQUIRED_OS_NAME=SunOS
6990        REQUIRED_OS_VERSION=5.10
6991     fi
6992     if test "x$OPENJDK_TARGET_OS" = "xlinux"; then
6993        REQUIRED_OS_NAME=Linux
6994        REQUIRED_OS_VERSION=2.6
6995     fi
6996     if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
6997         REQUIRED_OS_NAME=Windows
6998         if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
6999             REQUIRED_OS_VERSION=5.2
7000         else
7001             REQUIRED_OS_VERSION=5.1
7002         fi
7003     fi
7004     if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
7005         REQUIRED_OS_NAME=Darwin
7006         REQUIRED_OS_VERSION=11.2
7007     fi
7008 
7009 
7010 
7011 
7012 
7013     # Also store the legacy naming of the cpu.
7014     # Ie i586 and amd64 instead of x86 and x86_64
7015     OPENJDK_TARGET_CPU_LEGACY="$OPENJDK_TARGET_CPU"
7016     if test "x$OPENJDK_TARGET_CPU" = xx86; then
7017       OPENJDK_TARGET_CPU_LEGACY="i586"
7018     elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
7019       # On all platforms except MacOSX replace x86_64 with amd64.
7020       OPENJDK_TARGET_CPU_LEGACY="amd64"
7021     fi
7022 
7023 
7024     # And the second legacy naming of the cpu.
7025     # Ie i386 and amd64 instead of x86 and x86_64.
7026     OPENJDK_TARGET_CPU_LEGACY_LIB="$OPENJDK_TARGET_CPU"
7027     if test "x$OPENJDK_TARGET_CPU" = xx86; then
7028       OPENJDK_TARGET_CPU_LEGACY_LIB="i386"
7029     elif test "x$OPENJDK_TARGET_CPU" = xx86_64; then
7030       OPENJDK_TARGET_CPU_LEGACY_LIB="amd64"
7031     fi
7032 
7033 
7034     # This is the name of the cpu (but using i386 and amd64 instead of
7035     # x86 and x86_64, respectively), preceeded by a /, to be used when
7036     # locating libraries. On macosx, it's empty, though.
7037     OPENJDK_TARGET_CPU_LIBDIR="/$OPENJDK_TARGET_CPU_LEGACY_LIB"
7038     if test "x$OPENJDK_TARGET_OS" = xmacosx; then
7039         OPENJDK_TARGET_CPU_LIBDIR=""
7040     fi
7041 
7042 
7043     # OPENJDK_TARGET_CPU_ISADIR is normally empty. On 64-bit Solaris systems, it is set to
7044     # /amd64 or /sparcv9. This string is appended to some library paths, like this:
7045     # /usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libexample.so
7046     OPENJDK_TARGET_CPU_ISADIR=""
7047     if test "x$OPENJDK_TARGET_OS" = xsolaris; then
7048       if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
7049           OPENJDK_TARGET_CPU_ISADIR="/amd64"
7050       elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
7051           OPENJDK_TARGET_CPU_ISADIR="/sparcv9"
7052       fi
7053     fi
7054 
7055 
7056     # Setup OPENJDK_TARGET_CPU_OSARCH, which is used to set the os.arch Java system property
7057     OPENJDK_TARGET_CPU_OSARCH="$OPENJDK_TARGET_CPU"
7058     if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$OPENJDK_TARGET_CPU" = xx86; then
7059       # On linux only, we replace x86 with i386.
7060       OPENJDK_TARGET_CPU_OSARCH="i386"
7061     elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
7062       # On all platforms except macosx, we replace x86_64 with amd64.
7063       OPENJDK_TARGET_CPU_OSARCH="amd64"
7064     fi
7065 
7066 
7067     OPENJDK_TARGET_CPU_JLI="$OPENJDK_TARGET_CPU"
7068     if test "x$OPENJDK_TARGET_CPU" = xx86; then
7069       OPENJDK_TARGET_CPU_JLI="i386"
7070     elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
7071       # On all platforms except macosx, we replace x86_64 with amd64.
7072       OPENJDK_TARGET_CPU_JLI="amd64"
7073     fi
7074     # Now setup the -D flags for building libjli.
7075     OPENJDK_TARGET_CPU_JLI_CFLAGS="-DLIBARCHNAME='\"$OPENJDK_TARGET_CPU_JLI\"'"
7076     if test "x$OPENJDK_TARGET_OS" = xsolaris; then
7077       if test "x$OPENJDK_TARGET_CPU_ARCH" = xsparc; then
7078         OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"sparc\"' -DLIBARCH64NAME='\"sparcv9\"'"
7079       elif test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
7080         OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"i386\"' -DLIBARCH64NAME='\"amd64\"'"
7081       fi
7082     fi
7083 
7084 
7085     # Setup OPENJDK_TARGET_OS_API_DIR, used in source paths.
7086     if test "x$OPENJDK_TARGET_OS_API" = xposix; then
7087         OPENJDK_TARGET_OS_API_DIR="solaris"
7088     fi
7089     if test "x$OPENJDK_TARGET_OS_API" = xwinapi; then
7090         OPENJDK_TARGET_OS_API_DIR="windows"
7091     fi
7092 
7093 
7094     if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
7095         A_LP64="LP64:="
7096         # -D_LP64=1 is only set on linux and mac. Setting on windows causes diff in
7097         # unpack200.exe
7098         if test "x$OPENJDK_TARGET_OS" = xlinux || test "x$OPENJDK_TARGET_OS" = xmacosx; then
7099             ADD_LP64="-D_LP64=1"
7100         fi
7101     fi
7102     LP64=$A_LP64
7103 
7104 
7105     if test "x$COMPILE_TYPE" = "xcross"; then
7106       # FIXME: ... or should this include reduced builds..?
7107       DEFINE_CROSS_COMPILE_ARCH="CROSS_COMPILE_ARCH:=$OPENJDK_TARGET_CPU_LEGACY"
7108     else
7109       DEFINE_CROSS_COMPILE_ARCH=""
7110     fi
7111 
7112 
7113     # ZERO_ARCHDEF is used to enable architecture-specific code
7114     case "${OPENJDK_TARGET_CPU}" in
7115       ppc*)    ZERO_ARCHDEF=PPC   ;;
7116       s390*)   ZERO_ARCHDEF=S390  ;;
7117       sparc*)  ZERO_ARCHDEF=SPARC ;;
7118       x86_64*) ZERO_ARCHDEF=AMD64 ;;
7119       x86)     ZERO_ARCHDEF=IA32  ;;
7120       *)      ZERO_ARCHDEF=$(echo "${OPENJDK_TARGET_CPU_LEGACY_LIB}" | tr a-z A-Z)
7121     esac
7122 
7123 
7124 
7125 
7126 
7127 # Continue setting up basic stuff. Most remaining code require fundamental tools.
7128 
7129 # Locate the directory of this script.
7130 SCRIPT="$0"
7131 
7132     if test "x$OPENJDK_BUILD_OS" != xwindows; then
7133         # Follow a chain of symbolic links. Use readlink
7134         # where it exists, else fall back to horribly
7135         # complicated shell code.
7136         if test "x$READLINK_TESTED" != yes; then
7137             # On MacOSX there is a readlink tool with a different
7138             # purpose than the GNU readlink tool. Check the found readlink.
7139             ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
7140             if test "x$ISGNU" = x; then
7141                  # A readlink that we do not know how to use.
7142                  # Are there other non-GNU readlinks out there?
7143                  READLINK_TESTED=yes
7144                  READLINK=
7145             fi
7146         fi
7147 
7148         if test "x$READLINK" != x; then
7149             SCRIPT=`$READLINK -f $SCRIPT`
7150         else
7151             # Save the current directory for restoring afterwards
7152             STARTDIR=$PWD
7153             COUNTER=0
7154             sym_link_dir=`$DIRNAME $SCRIPT`
7155             sym_link_file=`$BASENAME $SCRIPT`
7156             # Use the system pwd and not the shell builtin to resolve directory symlinks
7157             cd $sym_link_dir
7158             cd `$THEPWDCMD`
7159             sym_link_dir=`$THEPWDCMD`
7160             # Resolve file symlinks
7161             while test $COUNTER -lt 20; do
7162                 ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
7163                 if test "x$ISLINK" == x; then
7164                     # This is not a symbolic link! We are done!
7165                     break
7166                 fi
7167                 # Again resolve directory symlinks since the target of the just found
7168                 # link could be in a different directory
7169                 cd `$DIRNAME $ISLINK`
7170                 sym_link_dir=`$THEPWDCMD`
7171                 sym_link_file=`$BASENAME $ISLINK`
7172                 let COUNTER=COUNTER+1
7173             done
7174             cd $STARTDIR
7175             SCRIPT=$sym_link_dir/$sym_link_file
7176         fi
7177     fi
7178 
7179 AUTOCONF_DIR=`cd \`$DIRNAME $SCRIPT\`; $THEPWDCMD`
7180 
7181 # Where is the source? It is located two levels above the configure script.
7182 CURDIR="$PWD"
7183 cd "$AUTOCONF_DIR/../.."
7184 SRC_ROOT="`$THEPWDCMD`"
7185 
7186 if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
7187   PATH_SEP=";"
7188 
7189   SRC_ROOT_LENGTH=`$THEPWDCMD|$WC -m`
7190   if test $SRC_ROOT_LENGTH -gt 100; then
7191       as_fn_error $? "Your base path is too long. It is $SRC_ROOT_LENGTH characters long, but only 100 is supported" "$LINENO" 5
7192   fi
7193 
7194   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7195     { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin release" >&5
7196 $as_echo_n "checking cygwin release... " >&6; }
7197     CYGWIN_VERSION=`$UNAME -r`
7198     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_VERSION" >&5
7199 $as_echo "$CYGWIN_VERSION" >&6; }
7200     WINDOWS_ENV_VENDOR='cygwin'
7201     WINDOWS_ENV_VERSION="$CYGWIN_VERSION"
7202 
7203     CYGWIN_VERSION_OK=`$ECHO $CYGWIN_VERSION | $GREP ^1.7.`
7204     if test "x$CYGWIN_VERSION_OK" = x; then
7205       { $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
7206 $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;}
7207       as_fn_error $? "Cannot continue" "$LINENO" 5
7208     fi
7209     if test "x$CYGPATH" = x; then
7210         as_fn_error $? "Something is wrong with your cygwin installation since I cannot find cygpath.exe in your path" "$LINENO" 5
7211     fi
7212     { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin root directory as unix-style path" >&5
7213 $as_echo_n "checking cygwin root directory as unix-style path... " >&6; }
7214     # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
7215     cygwin_winpath_root=`cd / ; cmd /c cd | grep ".*"`
7216     # Force cygpath to report the proper root by including a trailing space, and then stripping it off again.
7217     CYGWIN_ROOT_PATH=`$CYGPATH -u "$cygwin_winpath_root " | $CUT -f 1 -d " "`
7218     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_ROOT_PATH" >&5
7219 $as_echo "$CYGWIN_ROOT_PATH" >&6; }
7220     WINDOWS_ENV_ROOT_PATH="$CYGWIN_ROOT_PATH"
7221     test_cygdrive_prefix=`$ECHO $CYGWIN_ROOT_PATH | $GREP ^/cygdrive/`
7222     if test "x$test_cygdrive_prefix" = x; then
7223         as_fn_error $? "Your cygdrive prefix is not /cygdrive. This is currently not supported. Change with mount -c." "$LINENO" 5
7224     fi
7225   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7226     { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys release" >&5
7227 $as_echo_n "checking msys release... " >&6; }
7228     MSYS_VERSION=`$UNAME -r`
7229     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_VERSION" >&5
7230 $as_echo "$MSYS_VERSION" >&6; }
7231 
7232     WINDOWS_ENV_VENDOR='msys'
7233     WINDOWS_ENV_VERSION="$MSYS_VERSION"
7234 
7235     { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys root directory as unix-style path" >&5
7236 $as_echo_n "checking msys root directory as unix-style path... " >&6; }
7237     # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
7238     MSYS_ROOT_PATH=`cd / ; cmd /c cd | grep ".*"`
7239 
7240   windows_path="$MSYS_ROOT_PATH"
7241   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7242     unix_path=`$CYGPATH -u "$windows_path"`
7243     MSYS_ROOT_PATH="$unix_path"
7244   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7245     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
7246     MSYS_ROOT_PATH="$unix_path"
7247   fi
7248 
7249     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_ROOT_PATH" >&5
7250 $as_echo "$MSYS_ROOT_PATH" >&6; }
7251     WINDOWS_ENV_ROOT_PATH="$MSYS_ROOT_PATH"
7252   else
7253     as_fn_error $? "Unknown Windows environment. Neither cygwin nor msys was detected." "$LINENO" 5
7254   fi
7255 
7256   # Test if windows or unix (cygwin/msys) find is first in path.
7257   { $as_echo "$as_me:${as_lineno-$LINENO}: checking what kind of 'find' is first on the PATH" >&5
7258 $as_echo_n "checking what kind of 'find' is first on the PATH... " >&6; }
7259   FIND_BINARY_OUTPUT=`find --version 2>&1`
7260   if test "x`echo $FIND_BINARY_OUTPUT | $GREP GNU`" != x; then
7261     { $as_echo "$as_me:${as_lineno-$LINENO}: result: unix style" >&5
7262 $as_echo "unix style" >&6; }
7263   elif test "x`echo $FIND_BINARY_OUTPUT | $GREP FIND`" != x; then
7264     { $as_echo "$as_me:${as_lineno-$LINENO}: result: Windows" >&5
7265 $as_echo "Windows" >&6; }
7266     { $as_echo "$as_me:${as_lineno-$LINENO}: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&5
7267 $as_echo "$as_me: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&6;}
7268     { $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
7269 $as_echo "$as_me: This will not work. Please correct and make sure /usr/bin (or similar) is first in path." >&6;}
7270     as_fn_error $? "Cannot continue" "$LINENO" 5
7271   else
7272     { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
7273 $as_echo "unknown" >&6; }
7274     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: It seems that your find utility is non-standard." >&5
7275 $as_echo "$as_me: WARNING: It seems that your find utility is non-standard." >&2;}
7276   fi
7277 
7278 else
7279   PATH_SEP=":"
7280 fi
7281 
7282 
7283 
7284 cd "$CURDIR"
7285 
7286 
7287   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7288 
7289   # Input might be given as Windows format, start by converting to
7290   # unix format.
7291   path="$SRC_ROOT"
7292   new_path=`$CYGPATH -u "$path"`
7293 
7294   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
7295   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
7296   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
7297   # "foo.exe" is OK but "foo" is an error.
7298   #
7299   # This test is therefore slightly more accurate than "test -f" to check for file precense.
7300   # It is also a way to make sure we got the proper file name for the real test later on.
7301   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
7302   if test "x$test_shortpath" = x; then
7303     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&5
7304 $as_echo "$as_me: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&6;}
7305     as_fn_error $? "Cannot locate the the path of SRC_ROOT" "$LINENO" 5
7306   fi
7307 
7308   # Call helper function which possibly converts this using DOS-style short mode.
7309   # If so, the updated path is stored in $new_path.
7310 
7311   input_path="$new_path"
7312   # Check if we need to convert this using DOS-style short mode. If the path
7313   # contains just simple characters, use it. Otherwise (spaces, weird characters),
7314   # take no chances and rewrite it.
7315   # Note: m4 eats our [], so we need to use [ and ] instead.
7316   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
7317   if test "x$has_forbidden_chars" != x; then
7318     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7319     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
7320     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
7321     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
7322       # Going to short mode and back again did indeed matter. Since short mode is
7323       # case insensitive, let's make it lowercase to improve readability.
7324       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7325       # Now convert it back to Unix-stile (cygpath)
7326       input_path=`$CYGPATH -u "$shortmode_path"`
7327       new_path="$input_path"
7328     fi
7329   fi
7330 
7331   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
7332   if test "x$test_cygdrive_prefix" = x; then
7333     # As a simple fix, exclude /usr/bin since it's not a real path.
7334     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
7335       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
7336       # a path prefixed by /cygdrive for fixpath to work.
7337       new_path="$CYGWIN_ROOT_PATH$input_path"
7338     fi
7339   fi
7340 
7341 
7342   if test "x$path" != "x$new_path"; then
7343     SRC_ROOT="$new_path"
7344     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting SRC_ROOT to \"$new_path\"" >&5
7345 $as_echo "$as_me: Rewriting SRC_ROOT to \"$new_path\"" >&6;}
7346   fi
7347 
7348   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7349 
7350   path="$SRC_ROOT"
7351   has_colon=`$ECHO $path | $GREP ^.:`
7352   new_path="$path"
7353   if test "x$has_colon" = x; then
7354     # Not in mixed or Windows style, start by that.
7355     new_path=`cmd //c echo $path`
7356   fi
7357 
7358 
7359   input_path="$new_path"
7360   # Check if we need to convert this using DOS-style short mode. If the path
7361   # contains just simple characters, use it. Otherwise (spaces, weird characters),
7362   # take no chances and rewrite it.
7363   # Note: m4 eats our [], so we need to use [ and ] instead.
7364   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
7365   if test "x$has_forbidden_chars" != x; then
7366     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7367     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7368   fi
7369 
7370 
7371   windows_path="$new_path"
7372   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7373     unix_path=`$CYGPATH -u "$windows_path"`
7374     new_path="$unix_path"
7375   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7376     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
7377     new_path="$unix_path"
7378   fi
7379 
7380   if test "x$path" != "x$new_path"; then
7381     SRC_ROOT="$new_path"
7382     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting SRC_ROOT to \"$new_path\"" >&5
7383 $as_echo "$as_me: Rewriting SRC_ROOT to \"$new_path\"" >&6;}
7384   fi
7385 
7386   # Save the first 10 bytes of this path to the storage, so fixpath can work.
7387   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
7388 
7389   else
7390     # We're on a posix platform. Hooray! :)
7391     path="$SRC_ROOT"
7392 
7393     if test ! -f "$path" && test ! -d "$path"; then
7394       as_fn_error $? "The path of SRC_ROOT, which resolves as \"$path\", is not found." "$LINENO" 5
7395     fi
7396 
7397     has_space=`$ECHO "$path" | $GREP " "`
7398     if test "x$has_space" != x; then
7399       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&5
7400 $as_echo "$as_me: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&6;}
7401       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
7402     fi
7403   fi
7404 
7405 
7406   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7407 
7408   # Input might be given as Windows format, start by converting to
7409   # unix format.
7410   path="$CURDIR"
7411   new_path=`$CYGPATH -u "$path"`
7412 
7413   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
7414   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
7415   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
7416   # "foo.exe" is OK but "foo" is an error.
7417   #
7418   # This test is therefore slightly more accurate than "test -f" to check for file precense.
7419   # It is also a way to make sure we got the proper file name for the real test later on.
7420   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
7421   if test "x$test_shortpath" = x; then
7422     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
7423 $as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
7424     as_fn_error $? "Cannot locate the the path of CURDIR" "$LINENO" 5
7425   fi
7426 
7427   # Call helper function which possibly converts this using DOS-style short mode.
7428   # If so, the updated path is stored in $new_path.
7429 
7430   input_path="$new_path"
7431   # Check if we need to convert this using DOS-style short mode. If the path
7432   # contains just simple characters, use it. Otherwise (spaces, weird characters),
7433   # take no chances and rewrite it.
7434   # Note: m4 eats our [], so we need to use [ and ] instead.
7435   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
7436   if test "x$has_forbidden_chars" != x; then
7437     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7438     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
7439     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
7440     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
7441       # Going to short mode and back again did indeed matter. Since short mode is
7442       # case insensitive, let's make it lowercase to improve readability.
7443       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7444       # Now convert it back to Unix-stile (cygpath)
7445       input_path=`$CYGPATH -u "$shortmode_path"`
7446       new_path="$input_path"
7447     fi
7448   fi
7449 
7450   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
7451   if test "x$test_cygdrive_prefix" = x; then
7452     # As a simple fix, exclude /usr/bin since it's not a real path.
7453     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
7454       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
7455       # a path prefixed by /cygdrive for fixpath to work.
7456       new_path="$CYGWIN_ROOT_PATH$input_path"
7457     fi
7458   fi
7459 
7460 
7461   if test "x$path" != "x$new_path"; then
7462     CURDIR="$new_path"
7463     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
7464 $as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
7465   fi
7466 
7467   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7468 
7469   path="$CURDIR"
7470   has_colon=`$ECHO $path | $GREP ^.:`
7471   new_path="$path"
7472   if test "x$has_colon" = x; then
7473     # Not in mixed or Windows style, start by that.
7474     new_path=`cmd //c echo $path`
7475   fi
7476 
7477 
7478   input_path="$new_path"
7479   # Check if we need to convert this using DOS-style short mode. If the path
7480   # contains just simple characters, use it. Otherwise (spaces, weird characters),
7481   # take no chances and rewrite it.
7482   # Note: m4 eats our [], so we need to use [ and ] instead.
7483   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
7484   if test "x$has_forbidden_chars" != x; then
7485     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7486     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7487   fi
7488 
7489 
7490   windows_path="$new_path"
7491   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7492     unix_path=`$CYGPATH -u "$windows_path"`
7493     new_path="$unix_path"
7494   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7495     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
7496     new_path="$unix_path"
7497   fi
7498 
7499   if test "x$path" != "x$new_path"; then
7500     CURDIR="$new_path"
7501     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
7502 $as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
7503   fi
7504 
7505   # Save the first 10 bytes of this path to the storage, so fixpath can work.
7506   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
7507 
7508   else
7509     # We're on a posix platform. Hooray! :)
7510     path="$CURDIR"
7511 
7512     if test ! -f "$path" && test ! -d "$path"; then
7513       as_fn_error $? "The path of CURDIR, which resolves as \"$path\", is not found." "$LINENO" 5
7514     fi
7515 
7516     has_space=`$ECHO "$path" | $GREP " "`
7517     if test "x$has_space" != x; then
7518       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
7519 $as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
7520       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
7521     fi
7522   fi
7523 
7524 
7525 if test "x$OPENJDK_BUILD_OS" = "xsolaris"; then
7526     # Add extra search paths on solaris for utilities like ar and as etc...
7527     PATH="$PATH:/usr/ccs/bin:/usr/sfw/bin:/opt/csw/bin"
7528 fi
7529 
7530 # You can force the sys-root if the sys-root encoded into the cross compiler tools
7531 # is not correct.
7532 
7533 # Check whether --with-sys-root was given.
7534 if test "${with_sys_root+set}" = set; then :
7535   withval=$with_sys_root;
7536 fi
7537 
7538 
7539 if test "x$with_sys_root" != x; then
7540   SYS_ROOT=$with_sys_root
7541 else
7542   SYS_ROOT=/
7543 fi
7544 
7545 
7546 
7547 # Check whether --with-tools-dir was given.
7548 if test "${with_tools_dir+set}" = set; then :
7549   withval=$with_tools_dir; TOOLS_DIR=$with_tools_dir
7550 fi
7551 
7552 
7553 
7554 # Check whether --with-devkit was given.
7555 if test "${with_devkit+set}" = set; then :
7556   withval=$with_devkit;
7557     if test "x$with_sys_root" != x; then
7558       as_fn_error $? "Cannot specify both --with-devkit and --with-sys-root at the same time" "$LINENO" 5
7559     fi
7560     if test "x$with_tools_dir" != x; then
7561       as_fn_error $? "Cannot specify both --with-devkit and --with-tools-dir at the same time" "$LINENO" 5
7562     fi
7563     TOOLS_DIR=$with_devkit/bin
7564     SYS_ROOT=$with_devkit/$host_alias/libc
7565 
7566 fi
7567 
7568 
7569 
7570 
7571 # Setup default logging of stdout and stderr to build.log in the output root.
7572 BUILD_LOG='$(OUTPUT_ROOT)/build.log'
7573 BUILD_LOG_PREVIOUS='$(OUTPUT_ROOT)/build.log.old'
7574 BUILD_LOG_WRAPPER='$(BASH) $(SRC_ROOT)/common/bin/logger.sh $(BUILD_LOG)'
7575 
7576 
7577 
7578 
7579 
7580 # Check if it's a pure open build or if custom sources are to be used.
7581 
7582   # Check whether --enable-openjdk-only was given.
7583 if test "${enable_openjdk_only+set}" = set; then :
7584   enableval=$enable_openjdk_only;
7585 else
7586   enable_openjdk_only="no"
7587 fi
7588 
7589 
7590   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for presence of closed sources" >&5
7591 $as_echo_n "checking for presence of closed sources... " >&6; }
7592   if test -d "$SRC_ROOT/jdk/src/closed"; then
7593     CLOSED_SOURCE_PRESENT=yes
7594   else
7595     CLOSED_SOURCE_PRESENT=no
7596   fi
7597   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CLOSED_SOURCE_PRESENT" >&5
7598 $as_echo "$CLOSED_SOURCE_PRESENT" >&6; }
7599 
7600   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if closed source is suppressed (openjdk-only)" >&5
7601 $as_echo_n "checking if closed source is suppressed (openjdk-only)... " >&6; }
7602   SUPPRESS_CLOSED_SOURCE="$enable_openjdk_only"
7603   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SUPPRESS_CLOSED_SOURCE" >&5
7604 $as_echo "$SUPPRESS_CLOSED_SOURCE" >&6; }
7605 
7606   if test "x$CLOSED_SOURCE_PRESENT" = xno; then
7607     OPENJDK=true
7608     if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then
7609       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&5
7610 $as_echo "$as_me: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&2;}
7611     fi
7612   else
7613     if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then
7614       OPENJDK=true
7615     else
7616       OPENJDK=false
7617     fi
7618   fi
7619 
7620   if test "x$OPENJDK" = "xtrue"; then
7621     SET_OPENJDK="OPENJDK=true"
7622   fi
7623 
7624 
7625 
7626 
7627 # These are needed to be able to create a configuration name (and thus the output directory)
7628 
7629 ###############################################################################
7630 #
7631 # Check which variant of the JDK that we want to build.
7632 # Currently we have:
7633 #    normal:   standard edition
7634 # but the custom make system may add other variants
7635 #
7636 # Effectively the JDK variant gives a name to a specific set of
7637 # modules to compile into the JDK. In the future, these modules
7638 # might even be Jigsaw modules.
7639 #
7640 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variant of the JDK to build" >&5
7641 $as_echo_n "checking which variant of the JDK to build... " >&6; }
7642 
7643 # Check whether --with-jdk-variant was given.
7644 if test "${with_jdk_variant+set}" = set; then :
7645   withval=$with_jdk_variant;
7646 fi
7647 
7648 
7649 if test "x$with_jdk_variant" = xnormal || test "x$with_jdk_variant" = x; then
7650     JDK_VARIANT="normal"
7651 else
7652     as_fn_error $? "The available JDK variants are: normal" "$LINENO" 5
7653 fi
7654 
7655 
7656 
7657 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JDK_VARIANT" >&5
7658 $as_echo "$JDK_VARIANT" >&6; }
7659 
7660 
7661 
7662 ###############################################################################
7663 #
7664 # Check which variants of the JVM that we want to build.
7665 # Currently we have:
7666 #    server: normal interpreter and a tiered C1/C2 compiler
7667 #    client: normal interpreter and C1 (no C2 compiler) (only 32-bit platforms)
7668 #    minimal1: reduced form of client with optional VM services and features stripped out
7669 #    kernel: kernel footprint JVM that passes the TCK without major performance problems,
7670 #             ie normal interpreter and C1, only the serial GC, kernel jvmti etc
7671 #    zero: no machine code interpreter, no compiler
7672 #    zeroshark: zero interpreter and shark/llvm compiler backend
7673 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variants of the JVM to build" >&5
7674 $as_echo_n "checking which variants of the JVM to build... " >&6; }
7675 
7676 # Check whether --with-jvm-variants was given.
7677 if test "${with_jvm_variants+set}" = set; then :
7678   withval=$with_jvm_variants;
7679 fi
7680 
7681 
7682 if test "x$with_jvm_variants" = x; then
7683      with_jvm_variants="server"
7684 fi
7685 
7686 JVM_VARIANTS=",$with_jvm_variants,"
7687 TEST_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/server,//' -e 's/client,//'  -e 's/minimal1,//' -e 's/kernel,//' -e 's/zero,//' -e 's/zeroshark,//'`
7688 
7689 if test "x$TEST_VARIANTS" != "x,"; then
7690    as_fn_error $? "The available JVM variants are: server, client, minimal1, kernel, zero, zeroshark" "$LINENO" 5
7691 fi
7692 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_jvm_variants" >&5
7693 $as_echo "$with_jvm_variants" >&6; }
7694 
7695 JVM_VARIANT_SERVER=`$ECHO "$JVM_VARIANTS" | $SED -e '/,server,/!s/.*/false/g' -e '/,server,/s/.*/true/g'`
7696 JVM_VARIANT_CLIENT=`$ECHO "$JVM_VARIANTS" | $SED -e '/,client,/!s/.*/false/g' -e '/,client,/s/.*/true/g'`
7697 JVM_VARIANT_MINIMAL1=`$ECHO "$JVM_VARIANTS" | $SED -e '/,minimal1,/!s/.*/false/g' -e '/,minimal1,/s/.*/true/g'`
7698 JVM_VARIANT_KERNEL=`$ECHO "$JVM_VARIANTS" | $SED -e '/,kernel,/!s/.*/false/g' -e '/,kernel,/s/.*/true/g'`
7699 JVM_VARIANT_ZERO=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zero,/!s/.*/false/g' -e '/,zero,/s/.*/true/g'`
7700 JVM_VARIANT_ZEROSHARK=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zeroshark,/!s/.*/false/g' -e '/,zeroshark,/s/.*/true/g'`
7701 
7702 if test "x$JVM_VARIANT_CLIENT" = xtrue; then
7703     if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
7704         as_fn_error $? "You cannot build a client JVM for a 64-bit machine." "$LINENO" 5
7705     fi
7706 fi
7707 if test "x$JVM_VARIANT_KERNEL" = xtrue; then
7708     if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
7709         as_fn_error $? "You cannot build a kernel JVM for a 64-bit machine." "$LINENO" 5
7710     fi
7711 fi
7712 if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
7713     if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
7714         as_fn_error $? "You cannot build a minimal JVM for a 64-bit machine." "$LINENO" 5
7715     fi
7716 fi
7717 
7718 # Replace the commas with AND for use in the build directory name.
7719 ANDED_JVM_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/^,//' -e 's/,$//' -e 's/,/AND/'`
7720 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/'`
7721 if test "x$COUNT_VARIANTS" != "x,1"; then
7722     BUILDING_MULTIPLE_JVM_VARIANTS=yes
7723 else
7724     BUILDING_MULTIPLE_JVM_VARIANTS=no
7725 fi
7726 
7727 
7728 
7729 
7730 
7731 
7732 
7733 
7734 
7735 INCLUDE_SA=true
7736 if test "x$JVM_VARIANT_ZERO" = xtrue ; then
7737     INCLUDE_SA=false
7738 fi
7739 if test "x$JVM_VARIANT_ZEROSHARK" = xtrue ; then
7740     INCLUDE_SA=false
7741 fi
7742 
7743 
7744 if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
7745    MACOSX_UNIVERSAL="true"
7746 fi
7747 
7748 
7749 
7750 
7751 
7752 ###############################################################################
7753 #
7754 # Set the debug level
7755 #    release: no debug information, all optimizations, no asserts.
7756 #    fastdebug: debug information (-g), all optimizations, all asserts
7757 #    slowdebug: debug information (-g), no optimizations, all asserts
7758 #
7759 DEBUG_LEVEL="release"
7760 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which debug level to use" >&5
7761 $as_echo_n "checking which debug level to use... " >&6; }
7762 # Check whether --enable-debug was given.
7763 if test "${enable_debug+set}" = set; then :
7764   enableval=$enable_debug;
7765         ENABLE_DEBUG="${enableval}"
7766         DEBUG_LEVEL="fastdebug"
7767 
7768 else
7769   ENABLE_DEBUG="no"
7770 fi
7771 
7772 
7773 
7774 # Check whether --with-debug-level was given.
7775 if test "${with_debug_level+set}" = set; then :
7776   withval=$with_debug_level;
7777         DEBUG_LEVEL="${withval}"
7778         if test "x$ENABLE_DEBUG" = xyes; then
7779                         as_fn_error $? "You cannot use both --enable-debug and --with-debug-level at the same time." "$LINENO" 5
7780         fi
7781 
7782 fi
7783 
7784 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEBUG_LEVEL" >&5
7785 $as_echo "$DEBUG_LEVEL" >&6; }
7786 
7787 if test "x$DEBUG_LEVEL" != xrelease && \
7788    test "x$DEBUG_LEVEL" != xfastdebug && \
7789    test "x$DEBUG_LEVEL" != xslowdebug; then
7790    as_fn_error $? "Allowed debug levels are: release, fastdebug and slowdebug" "$LINENO" 5
7791 fi
7792 
7793 
7794 ###############################################################################
7795 #
7796 # Setup legacy vars/targets and new vars to deal with different debug levels.
7797 #
7798 
7799 case $DEBUG_LEVEL in
7800       release )
7801           VARIANT="OPT"
7802           FASTDEBUG="false"
7803           DEBUG_CLASSFILES="false"
7804           BUILD_VARIANT_RELEASE=""
7805           HOTSPOT_DEBUG_LEVEL="product"
7806           HOTSPOT_EXPORT="product"
7807            ;;
7808       fastdebug )
7809           VARIANT="DBG"
7810           FASTDEBUG="true"
7811           DEBUG_CLASSFILES="true"
7812           BUILD_VARIANT_RELEASE="-fastdebug"
7813           HOTSPOT_DEBUG_LEVEL="fastdebug"
7814           HOTSPOT_EXPORT="fastdebug"
7815            ;;
7816       slowdebug )
7817           VARIANT="DBG"
7818           FASTDEBUG="false"
7819           DEBUG_CLASSFILES="true"
7820           BUILD_VARIANT_RELEASE="-debug"
7821           HOTSPOT_DEBUG_LEVEL="jvmg"
7822           HOTSPOT_EXPORT="debug"
7823            ;;
7824 esac
7825 
7826 #####
7827 # Generate the legacy makefile targets for hotspot.
7828 # The hotspot api for selecting the build artifacts, really, needs to be improved.
7829 # JDK-7195896 will fix this on the hotspot side by using the JVM_VARIANT_* variables to
7830 # determine what needs to be built. All we will need to set here is all_product, all_fastdebug etc
7831 # But until then ...
7832 HOTSPOT_TARGET=""
7833 
7834 if test "x$JVM_VARIANT_SERVER" = xtrue; then
7835     HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL} "
7836 fi
7837 
7838 if test "x$JVM_VARIANT_CLIENT" = xtrue; then
7839     HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}1 "
7840 fi
7841 
7842 if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
7843     HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}minimal1 "
7844 fi
7845 
7846 if test "x$JVM_VARIANT_KERNEL" = xtrue; then
7847     HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}kernel "
7848 fi
7849 
7850 if test "x$JVM_VARIANT_ZERO" = xtrue; then
7851     HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}zero "
7852 fi
7853 
7854 if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
7855     HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}shark "
7856 fi
7857 
7858 HOTSPOT_TARGET="$HOTSPOT_TARGET docs export_$HOTSPOT_EXPORT"
7859 
7860 # On Macosx universal binaries are produced, but they only contain
7861 # 64 bit intel. This invalidates control of which jvms are built
7862 # from configure, but only server is valid anyway. Fix this
7863 # when hotspot makefiles are rewritten.
7864 if test "x$MACOSX_UNIVERSAL" = xtrue; then
7865     HOTSPOT_TARGET=universal_${HOTSPOT_EXPORT}
7866 fi
7867 
7868 #####
7869 
7870 
7871 
7872 
7873 
7874 
7875 
7876 
7877 # With basic setup done, call the custom early hook.
7878 
7879 
7880 # To properly create a configuration name, we need to have the OpenJDK target
7881 # and options (variants and debug level) parsed.
7882 
7883 
7884 
7885 # Check whether --with-conf-name was given.
7886 if test "${with_conf_name+set}" = set; then :
7887   withval=$with_conf_name;  CONF_NAME=${with_conf_name}
7888 fi
7889 
7890 
7891 # Test from where we are running configure, in or outside of src root.
7892 # To enable comparison of directories, CURDIR needs to be symlink free
7893 # just like SRC_ROOT already is
7894 NOSYM_CURDIR="$CURDIR"
7895 
7896     if test "x$OPENJDK_BUILD_OS" != xwindows; then
7897         # Follow a chain of symbolic links. Use readlink
7898         # where it exists, else fall back to horribly
7899         # complicated shell code.
7900         if test "x$READLINK_TESTED" != yes; then
7901             # On MacOSX there is a readlink tool with a different
7902             # purpose than the GNU readlink tool. Check the found readlink.
7903             ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
7904             if test "x$ISGNU" = x; then
7905                  # A readlink that we do not know how to use.
7906                  # Are there other non-GNU readlinks out there?
7907                  READLINK_TESTED=yes
7908                  READLINK=
7909             fi
7910         fi
7911 
7912         if test "x$READLINK" != x; then
7913             NOSYM_CURDIR=`$READLINK -f $NOSYM_CURDIR`
7914         else
7915             # Save the current directory for restoring afterwards
7916             STARTDIR=$PWD
7917             COUNTER=0
7918             sym_link_dir=`$DIRNAME $NOSYM_CURDIR`
7919             sym_link_file=`$BASENAME $NOSYM_CURDIR`
7920             # Use the system pwd and not the shell builtin to resolve directory symlinks
7921             cd $sym_link_dir
7922             cd `$THEPWDCMD`
7923             sym_link_dir=`$THEPWDCMD`
7924             # Resolve file symlinks
7925             while test $COUNTER -lt 20; do
7926                 ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
7927                 if test "x$ISLINK" == x; then
7928                     # This is not a symbolic link! We are done!
7929                     break
7930                 fi
7931                 # Again resolve directory symlinks since the target of the just found
7932                 # link could be in a different directory
7933                 cd `$DIRNAME $ISLINK`
7934                 sym_link_dir=`$THEPWDCMD`
7935                 sym_link_file=`$BASENAME $ISLINK`
7936                 let COUNTER=COUNTER+1
7937             done
7938             cd $STARTDIR
7939             NOSYM_CURDIR=$sym_link_dir/$sym_link_file
7940         fi
7941     fi
7942 
7943 if test "x$NOSYM_CURDIR" = "x$SRC_ROOT" || test "x$NOSYM_CURDIR" = "x$SRC_ROOT/common" \
7944         || test "x$NOSYM_CURDIR" = "x$SRC_ROOT/common/autoconf" \
7945         || test "x$NOSYM_CURDIR" = "x$SRC_ROOT/common/makefiles" ; then
7946     # We are running configure from the src root.
7947     # Create a default ./build/target-variant-debuglevel output root.
7948     if test "x${CONF_NAME}" = x; then
7949         CONF_NAME="${OPENJDK_TARGET_OS}-${OPENJDK_TARGET_CPU}-${JDK_VARIANT}-${ANDED_JVM_VARIANTS}-${DEBUG_LEVEL}"
7950     fi
7951     OUTPUT_ROOT="$SRC_ROOT/build/${CONF_NAME}"
7952     $MKDIR -p "$OUTPUT_ROOT"
7953     if test ! -d "$OUTPUT_ROOT"; then
7954         as_fn_error $? "Could not create build directory $OUTPUT_ROOT" "$LINENO" 5
7955     fi
7956 else
7957     # We are running configure from outside of the src dir.
7958     # Then use the current directory as output dir!
7959     # If configuration is situated in normal build directory, just use the build
7960     # directory name as configuration name, otherwise use the complete path.
7961     if test "x${CONF_NAME}" = x; then
7962         CONF_NAME=`$ECHO $CURDIR | $SED -e "s!^${SRC_ROOT}/build/!!"`
7963     fi
7964     OUTPUT_ROOT="$CURDIR"
7965 
7966     # WARNING: This might be a bad thing to do. You need to be sure you want to
7967     # have a configuration in this directory. Do some sanity checks!
7968 
7969     if test ! -e "$OUTPUT_ROOT/spec.gmk"; then
7970       # If we have a spec.gmk, we have run here before and we are OK. Otherwise, check for
7971       # other files
7972       files_present=`$LS $OUTPUT_ROOT`
7973       # Configure has already touched config.log and confdefs.h in the current dir when this check
7974       # is performed.
7975       filtered_files=`$ECHO "$files_present" | $SED -e 's/config.log//g' -e 's/confdefs.h//g' -e 's/ //g' \
7976                                              | $TR -d '\n'`
7977       if test "x$filtered_files" != x; then
7978         { $as_echo "$as_me:${as_lineno-$LINENO}: Current directory is $CURDIR." >&5
7979 $as_echo "$as_me: Current directory is $CURDIR." >&6;}
7980         { $as_echo "$as_me:${as_lineno-$LINENO}: Since this is not the source root, configure will output the configuration here" >&5
7981 $as_echo "$as_me: Since this is not the source root, configure will output the configuration here" >&6;}
7982         { $as_echo "$as_me:${as_lineno-$LINENO}: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&5
7983 $as_echo "$as_me: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&6;}
7984         { $as_echo "$as_me:${as_lineno-$LINENO}: However, this directory is not empty. This is not allowed, since it could" >&5
7985 $as_echo "$as_me: However, this directory is not empty. This is not allowed, since it could" >&6;}
7986         { $as_echo "$as_me:${as_lineno-$LINENO}: seriously mess up just about everything." >&5
7987 $as_echo "$as_me: seriously mess up just about everything." >&6;}
7988         { $as_echo "$as_me:${as_lineno-$LINENO}: Try 'cd $SRC_ROOT' and restart configure" >&5
7989 $as_echo "$as_me: Try 'cd $SRC_ROOT' and restart configure" >&6;}
7990         { $as_echo "$as_me:${as_lineno-$LINENO}: (or create a new empty directory and cd to it)." >&5
7991 $as_echo "$as_me: (or create a new empty directory and cd to it)." >&6;}
7992         as_fn_error $? "Will not continue creating configuration in $CURDIR" "$LINENO" 5
7993       fi
7994     fi
7995 fi
7996 { $as_echo "$as_me:${as_lineno-$LINENO}: checking what configuration name to use" >&5
7997 $as_echo_n "checking what configuration name to use... " >&6; }
7998 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CONF_NAME" >&5
7999 $as_echo "$CONF_NAME" >&6; }
8000 
8001 
8002   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8003 
8004   # Input might be given as Windows format, start by converting to
8005   # unix format.
8006   path="$OUTPUT_ROOT"
8007   new_path=`$CYGPATH -u "$path"`
8008 
8009   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
8010   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
8011   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
8012   # "foo.exe" is OK but "foo" is an error.
8013   #
8014   # This test is therefore slightly more accurate than "test -f" to check for file precense.
8015   # It is also a way to make sure we got the proper file name for the real test later on.
8016   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
8017   if test "x$test_shortpath" = x; then
8018     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
8019 $as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
8020     as_fn_error $? "Cannot locate the the path of OUTPUT_ROOT" "$LINENO" 5
8021   fi
8022 
8023   # Call helper function which possibly converts this using DOS-style short mode.
8024   # If so, the updated path is stored in $new_path.
8025 
8026   input_path="$new_path"
8027   # Check if we need to convert this using DOS-style short mode. If the path
8028   # contains just simple characters, use it. Otherwise (spaces, weird characters),
8029   # take no chances and rewrite it.
8030   # Note: m4 eats our [], so we need to use [ and ] instead.
8031   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
8032   if test "x$has_forbidden_chars" != x; then
8033     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8034     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
8035     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
8036     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
8037       # Going to short mode and back again did indeed matter. Since short mode is
8038       # case insensitive, let's make it lowercase to improve readability.
8039       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8040       # Now convert it back to Unix-stile (cygpath)
8041       input_path=`$CYGPATH -u "$shortmode_path"`
8042       new_path="$input_path"
8043     fi
8044   fi
8045 
8046   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
8047   if test "x$test_cygdrive_prefix" = x; then
8048     # As a simple fix, exclude /usr/bin since it's not a real path.
8049     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
8050       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
8051       # a path prefixed by /cygdrive for fixpath to work.
8052       new_path="$CYGWIN_ROOT_PATH$input_path"
8053     fi
8054   fi
8055 
8056 
8057   if test "x$path" != "x$new_path"; then
8058     OUTPUT_ROOT="$new_path"
8059     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
8060 $as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
8061   fi
8062 
8063   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8064 
8065   path="$OUTPUT_ROOT"
8066   has_colon=`$ECHO $path | $GREP ^.:`
8067   new_path="$path"
8068   if test "x$has_colon" = x; then
8069     # Not in mixed or Windows style, start by that.
8070     new_path=`cmd //c echo $path`
8071   fi
8072 
8073 
8074   input_path="$new_path"
8075   # Check if we need to convert this using DOS-style short mode. If the path
8076   # contains just simple characters, use it. Otherwise (spaces, weird characters),
8077   # take no chances and rewrite it.
8078   # Note: m4 eats our [], so we need to use [ and ] instead.
8079   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
8080   if test "x$has_forbidden_chars" != x; then
8081     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8082     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8083   fi
8084 
8085 
8086   windows_path="$new_path"
8087   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8088     unix_path=`$CYGPATH -u "$windows_path"`
8089     new_path="$unix_path"
8090   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8091     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8092     new_path="$unix_path"
8093   fi
8094 
8095   if test "x$path" != "x$new_path"; then
8096     OUTPUT_ROOT="$new_path"
8097     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
8098 $as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
8099   fi
8100 
8101   # Save the first 10 bytes of this path to the storage, so fixpath can work.
8102   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
8103 
8104   else
8105     # We're on a posix platform. Hooray! :)
8106     path="$OUTPUT_ROOT"
8107 
8108     if test ! -f "$path" && test ! -d "$path"; then
8109       as_fn_error $? "The path of OUTPUT_ROOT, which resolves as \"$path\", is not found." "$LINENO" 5
8110     fi
8111 
8112     has_space=`$ECHO "$path" | $GREP " "`
8113     if test "x$has_space" != x; then
8114       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
8115 $as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
8116       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
8117     fi
8118   fi
8119 
8120 
8121 SPEC=$OUTPUT_ROOT/spec.gmk
8122 
8123 CONF_NAME=$CONF_NAME
8124 
8125 OUTPUT_ROOT=$OUTPUT_ROOT
8126 
8127 
8128 # Most of the probed defines are put into config.h
8129 ac_config_headers="$ac_config_headers $OUTPUT_ROOT/config.h:$AUTOCONF_DIR/config.h.in"
8130 
8131 # The spec.gmk file contains all variables for the make system.
8132 ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in"
8133 
8134 # The hotspot-spec.gmk file contains legacy variables for the hotspot make system.
8135 ac_config_files="$ac_config_files $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in"
8136 
8137 # The bootcycle-spec.gmk file contains support for boot cycle builds.
8138 ac_config_files="$ac_config_files $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in"
8139 
8140 # The compare.sh is used to compare the build output to other builds.
8141 ac_config_files="$ac_config_files $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in"
8142 
8143 # Spec.sh is currently used by compare-objects.sh
8144 ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.sh:$AUTOCONF_DIR/spec.sh.in"
8145 
8146 # The generated Makefile knows where the spec.gmk is and where the source is.
8147 # You can run make from the OUTPUT_ROOT, or from the top-level Makefile
8148 # which will look for generated configurations
8149 ac_config_files="$ac_config_files $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in"
8150 
8151 
8152 # Save the arguments given to us
8153 echo "$CONFIGURE_COMMAND_LINE" > $OUTPUT_ROOT/configure-arguments
8154 
8155 
8156 # Must be done before we can call HELP_MSG_MISSING_DEPENDENCY.
8157 
8158     for ac_prog in apt-get yum port pkgutil pkgadd
8159 do
8160   # Extract the first word of "$ac_prog", so it can be a program name with args.
8161 set dummy $ac_prog; ac_word=$2
8162 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8163 $as_echo_n "checking for $ac_word... " >&6; }
8164 if test "${ac_cv_prog_PKGHANDLER+set}" = set; then :
8165   $as_echo_n "(cached) " >&6
8166 else
8167   if test -n "$PKGHANDLER"; then
8168   ac_cv_prog_PKGHANDLER="$PKGHANDLER" # Let the user override the test.
8169 else
8170 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8171 for as_dir in $PATH
8172 do
8173   IFS=$as_save_IFS
8174   test -z "$as_dir" && as_dir=.
8175     for ac_exec_ext in '' $ac_executable_extensions; do
8176   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8177     ac_cv_prog_PKGHANDLER="$ac_prog"
8178     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8179     break 2
8180   fi
8181 done
8182   done
8183 IFS=$as_save_IFS
8184 
8185 fi
8186 fi
8187 PKGHANDLER=$ac_cv_prog_PKGHANDLER
8188 if test -n "$PKGHANDLER"; then
8189   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKGHANDLER" >&5
8190 $as_echo "$PKGHANDLER" >&6; }
8191 else
8192   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8193 $as_echo "no" >&6; }
8194 fi
8195 
8196 
8197   test -n "$PKGHANDLER" && break
8198 done
8199 
8200 
8201 
8202 # Setup tools that requires more complex handling, or that is not needed by the configure script.
8203 
8204 
8205   # We need to find a recent version of GNU make. Especially on Solaris, this can be tricky.
8206   if test "x$MAKE" != x; then
8207     # User has supplied a make, test it.
8208     if test ! -f "$MAKE"; then
8209       as_fn_error $? "The specified make (by MAKE=$MAKE) is not found." "$LINENO" 5
8210     fi
8211 
8212   MAKE_CANDIDATE=""$MAKE""
8213   DESCRIPTION="user supplied MAKE=$MAKE"
8214   if test "x$MAKE_CANDIDATE" != x; then
8215     { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
8216 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
8217     MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
8218     IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
8219     if test "x$IS_GNU_MAKE" = x; then
8220       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
8221 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
8222     else
8223       IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'`
8224       if test "x$IS_MODERN_MAKE" = x; then
8225         { $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
8226 $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;}
8227       else
8228         if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
8229           if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8230             MAKE_EXPECTED_ENV='cygwin'
8231           elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8232             MAKE_EXPECTED_ENV='msys'
8233           else
8234             as_fn_error $? "Unknown Windows environment" "$LINENO" 5
8235           fi
8236           MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
8237           IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
8238         else
8239           # Not relevant for non-Windows
8240           IS_MAKE_CORRECT_ENV=true
8241         fi
8242         if test "x$IS_MAKE_CORRECT_ENV" = x; then
8243           { $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
8244 $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;}
8245         else
8246           FOUND_MAKE=$MAKE_CANDIDATE
8247 
8248   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8249 
8250   # First separate the path from the arguments. This will split at the first
8251   # space.
8252   complete="$FOUND_MAKE"
8253   path="${complete%% *}"
8254   tmp="$complete EOL"
8255   arguments="${tmp#* }"
8256 
8257   # Input might be given as Windows format, start by converting to
8258   # unix format.
8259   new_path=`$CYGPATH -u "$path"`
8260 
8261   # Now try to locate executable using which
8262   new_path=`$WHICH "$new_path" 2> /dev/null`
8263   # bat and cmd files are not always considered executable in cygwin causing which
8264   # to not find them
8265   if test "x$new_path" = x \
8266            && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8267            && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8268     new_path=`$CYGPATH -u "$path"`
8269   fi
8270   if test "x$new_path" = x; then
8271     # Oops. Which didn't find the executable.
8272     # The splitting of arguments from the executable at a space might have been incorrect,
8273     # since paths with space are more likely in Windows. Give it another try with the whole
8274     # argument.
8275     path="$complete"
8276     arguments="EOL"
8277     new_path=`$CYGPATH -u "$path"`
8278     new_path=`$WHICH "$new_path" 2> /dev/null`
8279     # bat and cmd files are not always considered executable in cygwin causing which
8280     # to not find them
8281     if test "x$new_path" = x \
8282              && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8283              && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8284       new_path=`$CYGPATH -u "$path"`
8285     fi
8286     if test "x$new_path" = x; then
8287       # It's still not found. Now this is an unrecoverable error.
8288       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8289 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8290       has_space=`$ECHO "$complete" | $GREP " "`
8291       if test "x$has_space" != x; then
8292         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8293 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8294       fi
8295       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8296     fi
8297   fi
8298 
8299   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
8300   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
8301   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
8302   # "foo.exe" is OK but "foo" is an error.
8303   #
8304   # This test is therefore slightly more accurate than "test -f" to check for file precense.
8305   # It is also a way to make sure we got the proper file name for the real test later on.
8306   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
8307   if test "x$test_shortpath" = x; then
8308     # Short path failed, file does not exist as specified.
8309     # Try adding .exe or .cmd
8310     if test -f "${new_path}.exe"; then
8311        input_to_shortpath="${new_path}.exe"
8312     elif test -f "${new_path}.cmd"; then
8313        input_to_shortpath="${new_path}.cmd"
8314     else
8315       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
8316 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
8317       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
8318 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
8319       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8320     fi
8321   else
8322     input_to_shortpath="$new_path"
8323   fi
8324 
8325   # Call helper function which possibly converts this using DOS-style short mode.
8326   # If so, the updated path is stored in $new_path.
8327   new_path="$input_to_shortpath"
8328 
8329   input_path="$input_to_shortpath"
8330   # Check if we need to convert this using DOS-style short mode. If the path
8331   # contains just simple characters, use it. Otherwise (spaces, weird characters),
8332   # take no chances and rewrite it.
8333   # Note: m4 eats our [], so we need to use [ and ] instead.
8334   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
8335   if test "x$has_forbidden_chars" != x; then
8336     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8337     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
8338     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
8339     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
8340       # Going to short mode and back again did indeed matter. Since short mode is
8341       # case insensitive, let's make it lowercase to improve readability.
8342       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8343       # Now convert it back to Unix-stile (cygpath)
8344       input_path=`$CYGPATH -u "$shortmode_path"`
8345       new_path="$input_path"
8346     fi
8347   fi
8348 
8349   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
8350   if test "x$test_cygdrive_prefix" = x; then
8351     # As a simple fix, exclude /usr/bin since it's not a real path.
8352     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
8353       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
8354       # a path prefixed by /cygdrive for fixpath to work.
8355       new_path="$CYGWIN_ROOT_PATH$input_path"
8356     fi
8357   fi
8358 
8359   # remove trailing .exe if any
8360   new_path="${new_path/%.exe/}"
8361 
8362   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8363 
8364   # First separate the path from the arguments. This will split at the first
8365   # space.
8366   complete="$FOUND_MAKE"
8367   path="${complete%% *}"
8368   tmp="$complete EOL"
8369   arguments="${tmp#* }"
8370 
8371   # Input might be given as Windows format, start by converting to
8372   # unix format.
8373   new_path="$path"
8374 
8375   windows_path="$new_path"
8376   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8377     unix_path=`$CYGPATH -u "$windows_path"`
8378     new_path="$unix_path"
8379   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8380     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8381     new_path="$unix_path"
8382   fi
8383 
8384 
8385   # Now try to locate executable using which
8386   new_path=`$WHICH "$new_path" 2> /dev/null`
8387 
8388   if test "x$new_path" = x; then
8389     # Oops. Which didn't find the executable.
8390     # The splitting of arguments from the executable at a space might have been incorrect,
8391     # since paths with space are more likely in Windows. Give it another try with the whole
8392     # argument.
8393     path="$complete"
8394     arguments="EOL"
8395     new_path="$path"
8396 
8397   windows_path="$new_path"
8398   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8399     unix_path=`$CYGPATH -u "$windows_path"`
8400     new_path="$unix_path"
8401   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8402     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8403     new_path="$unix_path"
8404   fi
8405 
8406 
8407     new_path=`$WHICH "$new_path" 2> /dev/null`
8408 
8409     if test "x$new_path" = x; then
8410       # It's still not found. Now this is an unrecoverable error.
8411       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8412 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8413       has_space=`$ECHO "$complete" | $GREP " "`
8414       if test "x$has_space" != x; then
8415         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8416 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8417       fi
8418       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8419     fi
8420   fi
8421 
8422   # Now new_path has a complete unix path to the binary
8423   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
8424     # Keep paths in /bin as-is, but remove trailing .exe if any
8425     new_path="${new_path/%.exe/}"
8426     # Do not save /bin paths to all_fixpath_prefixes!
8427   else
8428     # Not in mixed or Windows style, start by that.
8429     new_path=`cmd //c echo $new_path`
8430 
8431   input_path="$new_path"
8432   # Check if we need to convert this using DOS-style short mode. If the path
8433   # contains just simple characters, use it. Otherwise (spaces, weird characters),
8434   # take no chances and rewrite it.
8435   # Note: m4 eats our [], so we need to use [ and ] instead.
8436   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
8437   if test "x$has_forbidden_chars" != x; then
8438     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8439     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8440   fi
8441 
8442     # Output is in $new_path
8443 
8444   windows_path="$new_path"
8445   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8446     unix_path=`$CYGPATH -u "$windows_path"`
8447     new_path="$unix_path"
8448   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8449     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8450     new_path="$unix_path"
8451   fi
8452 
8453     # remove trailing .exe if any
8454     new_path="${new_path/%.exe/}"
8455 
8456     # Save the first 10 bytes of this path to the storage, so fixpath can work.
8457     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
8458   fi
8459 
8460   else
8461     # We're on a posix platform. Hooray! :)
8462     # First separate the path from the arguments. This will split at the first
8463     # space.
8464     complete="$FOUND_MAKE"
8465     path="${complete%% *}"
8466     tmp="$complete EOL"
8467     arguments="${tmp#* }"
8468 
8469     # Cannot rely on the command "which" here since it doesn't always work.
8470     is_absolute_path=`$ECHO "$path" | $GREP ^/`
8471     if test -z "$is_absolute_path"; then
8472       # Path to executable is not absolute. Find it.
8473       IFS_save="$IFS"
8474       IFS=:
8475       for p in $PATH; do
8476         if test -f "$p/$path" && test -x "$p/$path"; then
8477           new_path="$p/$path"
8478           break
8479         fi
8480       done
8481       IFS="$IFS_save"
8482     else
8483       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
8484 $as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
8485       new_path="$path"
8486     fi
8487 
8488     if test "x$new_path" = x; then
8489         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8490 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8491         has_space=`$ECHO "$complete" | $GREP " "`
8492         if test "x$has_space" != x; then
8493           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
8494 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
8495         fi
8496         as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8497       fi
8498   fi
8499 
8500       # Now join together the path and the arguments once again
8501       if test "x$arguments" != xEOL; then
8502         new_complete="$new_path ${arguments% *}"
8503       else
8504         new_complete="$new_path"
8505       fi
8506 
8507   if test "x$complete" != "x$new_complete"; then
8508       FOUND_MAKE="$new_complete"
8509       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
8510 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
8511     fi
8512 
8513         fi
8514       fi
8515     fi
8516   fi
8517 
8518     if test "x$FOUND_MAKE" = x; then
8519       as_fn_error $? "The specified make (by MAKE=$MAKE) is not GNU make 3.81 or newer." "$LINENO" 5
8520     fi
8521   else
8522     # Try our hardest to locate a correct version of GNU make
8523     for ac_prog in gmake
8524 do
8525   # Extract the first word of "$ac_prog", so it can be a program name with args.
8526 set dummy $ac_prog; ac_word=$2
8527 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8528 $as_echo_n "checking for $ac_word... " >&6; }
8529 if test "${ac_cv_path_CHECK_GMAKE+set}" = set; then :
8530   $as_echo_n "(cached) " >&6
8531 else
8532   case $CHECK_GMAKE in
8533   [\\/]* | ?:[\\/]*)
8534   ac_cv_path_CHECK_GMAKE="$CHECK_GMAKE" # Let the user override the test with a path.
8535   ;;
8536   *)
8537   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8538 for as_dir in $PATH
8539 do
8540   IFS=$as_save_IFS
8541   test -z "$as_dir" && as_dir=.
8542     for ac_exec_ext in '' $ac_executable_extensions; do
8543   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8544     ac_cv_path_CHECK_GMAKE="$as_dir/$ac_word$ac_exec_ext"
8545     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8546     break 2
8547   fi
8548 done
8549   done
8550 IFS=$as_save_IFS
8551 
8552   ;;
8553 esac
8554 fi
8555 CHECK_GMAKE=$ac_cv_path_CHECK_GMAKE
8556 if test -n "$CHECK_GMAKE"; then
8557   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_GMAKE" >&5
8558 $as_echo "$CHECK_GMAKE" >&6; }
8559 else
8560   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8561 $as_echo "no" >&6; }
8562 fi
8563 
8564 
8565   test -n "$CHECK_GMAKE" && break
8566 done
8567 
8568 
8569   MAKE_CANDIDATE=""$CHECK_GMAKE""
8570   DESCRIPTION="gmake in PATH"
8571   if test "x$MAKE_CANDIDATE" != x; then
8572     { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
8573 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
8574     MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
8575     IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
8576     if test "x$IS_GNU_MAKE" = x; then
8577       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
8578 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
8579     else
8580       IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'`
8581       if test "x$IS_MODERN_MAKE" = x; then
8582         { $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
8583 $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;}
8584       else
8585         if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
8586           if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8587             MAKE_EXPECTED_ENV='cygwin'
8588           elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8589             MAKE_EXPECTED_ENV='msys'
8590           else
8591             as_fn_error $? "Unknown Windows environment" "$LINENO" 5
8592           fi
8593           MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
8594           IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
8595         else
8596           # Not relevant for non-Windows
8597           IS_MAKE_CORRECT_ENV=true
8598         fi
8599         if test "x$IS_MAKE_CORRECT_ENV" = x; then
8600           { $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
8601 $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;}
8602         else
8603           FOUND_MAKE=$MAKE_CANDIDATE
8604 
8605   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8606 
8607   # First separate the path from the arguments. This will split at the first
8608   # space.
8609   complete="$FOUND_MAKE"
8610   path="${complete%% *}"
8611   tmp="$complete EOL"
8612   arguments="${tmp#* }"
8613 
8614   # Input might be given as Windows format, start by converting to
8615   # unix format.
8616   new_path=`$CYGPATH -u "$path"`
8617 
8618   # Now try to locate executable using which
8619   new_path=`$WHICH "$new_path" 2> /dev/null`
8620   # bat and cmd files are not always considered executable in cygwin causing which
8621   # to not find them
8622   if test "x$new_path" = x \
8623            && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8624            && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8625     new_path=`$CYGPATH -u "$path"`
8626   fi
8627   if test "x$new_path" = x; then
8628     # Oops. Which didn't find the executable.
8629     # The splitting of arguments from the executable at a space might have been incorrect,
8630     # since paths with space are more likely in Windows. Give it another try with the whole
8631     # argument.
8632     path="$complete"
8633     arguments="EOL"
8634     new_path=`$CYGPATH -u "$path"`
8635     new_path=`$WHICH "$new_path" 2> /dev/null`
8636     # bat and cmd files are not always considered executable in cygwin causing which
8637     # to not find them
8638     if test "x$new_path" = x \
8639              && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8640              && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8641       new_path=`$CYGPATH -u "$path"`
8642     fi
8643     if test "x$new_path" = x; then
8644       # It's still not found. Now this is an unrecoverable error.
8645       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8646 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8647       has_space=`$ECHO "$complete" | $GREP " "`
8648       if test "x$has_space" != x; then
8649         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8650 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8651       fi
8652       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8653     fi
8654   fi
8655 
8656   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
8657   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
8658   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
8659   # "foo.exe" is OK but "foo" is an error.
8660   #
8661   # This test is therefore slightly more accurate than "test -f" to check for file precense.
8662   # It is also a way to make sure we got the proper file name for the real test later on.
8663   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
8664   if test "x$test_shortpath" = x; then
8665     # Short path failed, file does not exist as specified.
8666     # Try adding .exe or .cmd
8667     if test -f "${new_path}.exe"; then
8668        input_to_shortpath="${new_path}.exe"
8669     elif test -f "${new_path}.cmd"; then
8670        input_to_shortpath="${new_path}.cmd"
8671     else
8672       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
8673 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
8674       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
8675 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
8676       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8677     fi
8678   else
8679     input_to_shortpath="$new_path"
8680   fi
8681 
8682   # Call helper function which possibly converts this using DOS-style short mode.
8683   # If so, the updated path is stored in $new_path.
8684   new_path="$input_to_shortpath"
8685 
8686   input_path="$input_to_shortpath"
8687   # Check if we need to convert this using DOS-style short mode. If the path
8688   # contains just simple characters, use it. Otherwise (spaces, weird characters),
8689   # take no chances and rewrite it.
8690   # Note: m4 eats our [], so we need to use [ and ] instead.
8691   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
8692   if test "x$has_forbidden_chars" != x; then
8693     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8694     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
8695     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
8696     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
8697       # Going to short mode and back again did indeed matter. Since short mode is
8698       # case insensitive, let's make it lowercase to improve readability.
8699       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8700       # Now convert it back to Unix-stile (cygpath)
8701       input_path=`$CYGPATH -u "$shortmode_path"`
8702       new_path="$input_path"
8703     fi
8704   fi
8705 
8706   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
8707   if test "x$test_cygdrive_prefix" = x; then
8708     # As a simple fix, exclude /usr/bin since it's not a real path.
8709     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
8710       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
8711       # a path prefixed by /cygdrive for fixpath to work.
8712       new_path="$CYGWIN_ROOT_PATH$input_path"
8713     fi
8714   fi
8715 
8716   # remove trailing .exe if any
8717   new_path="${new_path/%.exe/}"
8718 
8719   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8720 
8721   # First separate the path from the arguments. This will split at the first
8722   # space.
8723   complete="$FOUND_MAKE"
8724   path="${complete%% *}"
8725   tmp="$complete EOL"
8726   arguments="${tmp#* }"
8727 
8728   # Input might be given as Windows format, start by converting to
8729   # unix format.
8730   new_path="$path"
8731 
8732   windows_path="$new_path"
8733   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8734     unix_path=`$CYGPATH -u "$windows_path"`
8735     new_path="$unix_path"
8736   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8737     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8738     new_path="$unix_path"
8739   fi
8740 
8741 
8742   # Now try to locate executable using which
8743   new_path=`$WHICH "$new_path" 2> /dev/null`
8744 
8745   if test "x$new_path" = x; then
8746     # Oops. Which didn't find the executable.
8747     # The splitting of arguments from the executable at a space might have been incorrect,
8748     # since paths with space are more likely in Windows. Give it another try with the whole
8749     # argument.
8750     path="$complete"
8751     arguments="EOL"
8752     new_path="$path"
8753 
8754   windows_path="$new_path"
8755   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8756     unix_path=`$CYGPATH -u "$windows_path"`
8757     new_path="$unix_path"
8758   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8759     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8760     new_path="$unix_path"
8761   fi
8762 
8763 
8764     new_path=`$WHICH "$new_path" 2> /dev/null`
8765 
8766     if test "x$new_path" = x; then
8767       # It's still not found. Now this is an unrecoverable error.
8768       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8769 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8770       has_space=`$ECHO "$complete" | $GREP " "`
8771       if test "x$has_space" != x; then
8772         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8773 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8774       fi
8775       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8776     fi
8777   fi
8778 
8779   # Now new_path has a complete unix path to the binary
8780   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
8781     # Keep paths in /bin as-is, but remove trailing .exe if any
8782     new_path="${new_path/%.exe/}"
8783     # Do not save /bin paths to all_fixpath_prefixes!
8784   else
8785     # Not in mixed or Windows style, start by that.
8786     new_path=`cmd //c echo $new_path`
8787 
8788   input_path="$new_path"
8789   # Check if we need to convert this using DOS-style short mode. If the path
8790   # contains just simple characters, use it. Otherwise (spaces, weird characters),
8791   # take no chances and rewrite it.
8792   # Note: m4 eats our [], so we need to use [ and ] instead.
8793   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
8794   if test "x$has_forbidden_chars" != x; then
8795     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8796     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8797   fi
8798 
8799     # Output is in $new_path
8800 
8801   windows_path="$new_path"
8802   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8803     unix_path=`$CYGPATH -u "$windows_path"`
8804     new_path="$unix_path"
8805   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8806     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8807     new_path="$unix_path"
8808   fi
8809 
8810     # remove trailing .exe if any
8811     new_path="${new_path/%.exe/}"
8812 
8813     # Save the first 10 bytes of this path to the storage, so fixpath can work.
8814     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
8815   fi
8816 
8817   else
8818     # We're on a posix platform. Hooray! :)
8819     # First separate the path from the arguments. This will split at the first
8820     # space.
8821     complete="$FOUND_MAKE"
8822     path="${complete%% *}"
8823     tmp="$complete EOL"
8824     arguments="${tmp#* }"
8825 
8826     # Cannot rely on the command "which" here since it doesn't always work.
8827     is_absolute_path=`$ECHO "$path" | $GREP ^/`
8828     if test -z "$is_absolute_path"; then
8829       # Path to executable is not absolute. Find it.
8830       IFS_save="$IFS"
8831       IFS=:
8832       for p in $PATH; do
8833         if test -f "$p/$path" && test -x "$p/$path"; then
8834           new_path="$p/$path"
8835           break
8836         fi
8837       done
8838       IFS="$IFS_save"
8839     else
8840       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
8841 $as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
8842       new_path="$path"
8843     fi
8844 
8845     if test "x$new_path" = x; then
8846         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8847 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8848         has_space=`$ECHO "$complete" | $GREP " "`
8849         if test "x$has_space" != x; then
8850           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
8851 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
8852         fi
8853         as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8854       fi
8855   fi
8856 
8857       # Now join together the path and the arguments once again
8858       if test "x$arguments" != xEOL; then
8859         new_complete="$new_path ${arguments% *}"
8860       else
8861         new_complete="$new_path"
8862       fi
8863 
8864   if test "x$complete" != "x$new_complete"; then
8865       FOUND_MAKE="$new_complete"
8866       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
8867 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
8868     fi
8869 
8870         fi
8871       fi
8872     fi
8873   fi
8874 
8875 
8876     if test "x$FOUND_MAKE" = x; then
8877       for ac_prog in make
8878 do
8879   # Extract the first word of "$ac_prog", so it can be a program name with args.
8880 set dummy $ac_prog; ac_word=$2
8881 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8882 $as_echo_n "checking for $ac_word... " >&6; }
8883 if test "${ac_cv_path_CHECK_MAKE+set}" = set; then :
8884   $as_echo_n "(cached) " >&6
8885 else
8886   case $CHECK_MAKE in
8887   [\\/]* | ?:[\\/]*)
8888   ac_cv_path_CHECK_MAKE="$CHECK_MAKE" # Let the user override the test with a path.
8889   ;;
8890   *)
8891   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8892 for as_dir in $PATH
8893 do
8894   IFS=$as_save_IFS
8895   test -z "$as_dir" && as_dir=.
8896     for ac_exec_ext in '' $ac_executable_extensions; do
8897   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8898     ac_cv_path_CHECK_MAKE="$as_dir/$ac_word$ac_exec_ext"
8899     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8900     break 2
8901   fi
8902 done
8903   done
8904 IFS=$as_save_IFS
8905 
8906   ;;
8907 esac
8908 fi
8909 CHECK_MAKE=$ac_cv_path_CHECK_MAKE
8910 if test -n "$CHECK_MAKE"; then
8911   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_MAKE" >&5
8912 $as_echo "$CHECK_MAKE" >&6; }
8913 else
8914   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8915 $as_echo "no" >&6; }
8916 fi
8917 
8918 
8919   test -n "$CHECK_MAKE" && break
8920 done
8921 
8922 
8923   MAKE_CANDIDATE=""$CHECK_MAKE""
8924   DESCRIPTION="make in PATH"
8925   if test "x$MAKE_CANDIDATE" != x; then
8926     { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
8927 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
8928     MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
8929     IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
8930     if test "x$IS_GNU_MAKE" = x; then
8931       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
8932 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
8933     else
8934       IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'`
8935       if test "x$IS_MODERN_MAKE" = x; then
8936         { $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
8937 $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;}
8938       else
8939         if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
8940           if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8941             MAKE_EXPECTED_ENV='cygwin'
8942           elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8943             MAKE_EXPECTED_ENV='msys'
8944           else
8945             as_fn_error $? "Unknown Windows environment" "$LINENO" 5
8946           fi
8947           MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
8948           IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
8949         else
8950           # Not relevant for non-Windows
8951           IS_MAKE_CORRECT_ENV=true
8952         fi
8953         if test "x$IS_MAKE_CORRECT_ENV" = x; then
8954           { $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
8955 $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;}
8956         else
8957           FOUND_MAKE=$MAKE_CANDIDATE
8958 
8959   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8960 
8961   # First separate the path from the arguments. This will split at the first
8962   # space.
8963   complete="$FOUND_MAKE"
8964   path="${complete%% *}"
8965   tmp="$complete EOL"
8966   arguments="${tmp#* }"
8967 
8968   # Input might be given as Windows format, start by converting to
8969   # unix format.
8970   new_path=`$CYGPATH -u "$path"`
8971 
8972   # Now try to locate executable using which
8973   new_path=`$WHICH "$new_path" 2> /dev/null`
8974   # bat and cmd files are not always considered executable in cygwin causing which
8975   # to not find them
8976   if test "x$new_path" = x \
8977            && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8978            && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8979     new_path=`$CYGPATH -u "$path"`
8980   fi
8981   if test "x$new_path" = x; then
8982     # Oops. Which didn't find the executable.
8983     # The splitting of arguments from the executable at a space might have been incorrect,
8984     # since paths with space are more likely in Windows. Give it another try with the whole
8985     # argument.
8986     path="$complete"
8987     arguments="EOL"
8988     new_path=`$CYGPATH -u "$path"`
8989     new_path=`$WHICH "$new_path" 2> /dev/null`
8990     # bat and cmd files are not always considered executable in cygwin causing which
8991     # to not find them
8992     if test "x$new_path" = x \
8993              && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8994              && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8995       new_path=`$CYGPATH -u "$path"`
8996     fi
8997     if test "x$new_path" = x; then
8998       # It's still not found. Now this is an unrecoverable error.
8999       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9000 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9001       has_space=`$ECHO "$complete" | $GREP " "`
9002       if test "x$has_space" != x; then
9003         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9004 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9005       fi
9006       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9007     fi
9008   fi
9009 
9010   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
9011   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
9012   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
9013   # "foo.exe" is OK but "foo" is an error.
9014   #
9015   # This test is therefore slightly more accurate than "test -f" to check for file precense.
9016   # It is also a way to make sure we got the proper file name for the real test later on.
9017   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
9018   if test "x$test_shortpath" = x; then
9019     # Short path failed, file does not exist as specified.
9020     # Try adding .exe or .cmd
9021     if test -f "${new_path}.exe"; then
9022        input_to_shortpath="${new_path}.exe"
9023     elif test -f "${new_path}.cmd"; then
9024        input_to_shortpath="${new_path}.cmd"
9025     else
9026       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
9027 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
9028       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
9029 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
9030       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9031     fi
9032   else
9033     input_to_shortpath="$new_path"
9034   fi
9035 
9036   # Call helper function which possibly converts this using DOS-style short mode.
9037   # If so, the updated path is stored in $new_path.
9038   new_path="$input_to_shortpath"
9039 
9040   input_path="$input_to_shortpath"
9041   # Check if we need to convert this using DOS-style short mode. If the path
9042   # contains just simple characters, use it. Otherwise (spaces, weird characters),
9043   # take no chances and rewrite it.
9044   # Note: m4 eats our [], so we need to use [ and ] instead.
9045   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
9046   if test "x$has_forbidden_chars" != x; then
9047     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9048     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
9049     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
9050     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
9051       # Going to short mode and back again did indeed matter. Since short mode is
9052       # case insensitive, let's make it lowercase to improve readability.
9053       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9054       # Now convert it back to Unix-stile (cygpath)
9055       input_path=`$CYGPATH -u "$shortmode_path"`
9056       new_path="$input_path"
9057     fi
9058   fi
9059 
9060   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
9061   if test "x$test_cygdrive_prefix" = x; then
9062     # As a simple fix, exclude /usr/bin since it's not a real path.
9063     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
9064       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
9065       # a path prefixed by /cygdrive for fixpath to work.
9066       new_path="$CYGWIN_ROOT_PATH$input_path"
9067     fi
9068   fi
9069 
9070   # remove trailing .exe if any
9071   new_path="${new_path/%.exe/}"
9072 
9073   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9074 
9075   # First separate the path from the arguments. This will split at the first
9076   # space.
9077   complete="$FOUND_MAKE"
9078   path="${complete%% *}"
9079   tmp="$complete EOL"
9080   arguments="${tmp#* }"
9081 
9082   # Input might be given as Windows format, start by converting to
9083   # unix format.
9084   new_path="$path"
9085 
9086   windows_path="$new_path"
9087   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9088     unix_path=`$CYGPATH -u "$windows_path"`
9089     new_path="$unix_path"
9090   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9091     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9092     new_path="$unix_path"
9093   fi
9094 
9095 
9096   # Now try to locate executable using which
9097   new_path=`$WHICH "$new_path" 2> /dev/null`
9098 
9099   if test "x$new_path" = x; then
9100     # Oops. Which didn't find the executable.
9101     # The splitting of arguments from the executable at a space might have been incorrect,
9102     # since paths with space are more likely in Windows. Give it another try with the whole
9103     # argument.
9104     path="$complete"
9105     arguments="EOL"
9106     new_path="$path"
9107 
9108   windows_path="$new_path"
9109   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9110     unix_path=`$CYGPATH -u "$windows_path"`
9111     new_path="$unix_path"
9112   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9113     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9114     new_path="$unix_path"
9115   fi
9116 
9117 
9118     new_path=`$WHICH "$new_path" 2> /dev/null`
9119 
9120     if test "x$new_path" = x; then
9121       # It's still not found. Now this is an unrecoverable error.
9122       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9123 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9124       has_space=`$ECHO "$complete" | $GREP " "`
9125       if test "x$has_space" != x; then
9126         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9127 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9128       fi
9129       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9130     fi
9131   fi
9132 
9133   # Now new_path has a complete unix path to the binary
9134   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
9135     # Keep paths in /bin as-is, but remove trailing .exe if any
9136     new_path="${new_path/%.exe/}"
9137     # Do not save /bin paths to all_fixpath_prefixes!
9138   else
9139     # Not in mixed or Windows style, start by that.
9140     new_path=`cmd //c echo $new_path`
9141 
9142   input_path="$new_path"
9143   # Check if we need to convert this using DOS-style short mode. If the path
9144   # contains just simple characters, use it. Otherwise (spaces, weird characters),
9145   # take no chances and rewrite it.
9146   # Note: m4 eats our [], so we need to use [ and ] instead.
9147   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
9148   if test "x$has_forbidden_chars" != x; then
9149     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9150     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9151   fi
9152 
9153     # Output is in $new_path
9154 
9155   windows_path="$new_path"
9156   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9157     unix_path=`$CYGPATH -u "$windows_path"`
9158     new_path="$unix_path"
9159   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9160     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9161     new_path="$unix_path"
9162   fi
9163 
9164     # remove trailing .exe if any
9165     new_path="${new_path/%.exe/}"
9166 
9167     # Save the first 10 bytes of this path to the storage, so fixpath can work.
9168     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
9169   fi
9170 
9171   else
9172     # We're on a posix platform. Hooray! :)
9173     # First separate the path from the arguments. This will split at the first
9174     # space.
9175     complete="$FOUND_MAKE"
9176     path="${complete%% *}"
9177     tmp="$complete EOL"
9178     arguments="${tmp#* }"
9179 
9180     # Cannot rely on the command "which" here since it doesn't always work.
9181     is_absolute_path=`$ECHO "$path" | $GREP ^/`
9182     if test -z "$is_absolute_path"; then
9183       # Path to executable is not absolute. Find it.
9184       IFS_save="$IFS"
9185       IFS=:
9186       for p in $PATH; do
9187         if test -f "$p/$path" && test -x "$p/$path"; then
9188           new_path="$p/$path"
9189           break
9190         fi
9191       done
9192       IFS="$IFS_save"
9193     else
9194       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
9195 $as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
9196       new_path="$path"
9197     fi
9198 
9199     if test "x$new_path" = x; then
9200         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9201 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9202         has_space=`$ECHO "$complete" | $GREP " "`
9203         if test "x$has_space" != x; then
9204           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
9205 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
9206         fi
9207         as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9208       fi
9209   fi
9210 
9211       # Now join together the path and the arguments once again
9212       if test "x$arguments" != xEOL; then
9213         new_complete="$new_path ${arguments% *}"
9214       else
9215         new_complete="$new_path"
9216       fi
9217 
9218   if test "x$complete" != "x$new_complete"; then
9219       FOUND_MAKE="$new_complete"
9220       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
9221 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
9222     fi
9223 
9224         fi
9225       fi
9226     fi
9227   fi
9228 
9229     fi
9230 
9231     if test "x$FOUND_MAKE" = x; then
9232       if test "x$TOOLS_DIR" != x; then
9233         # We have a tools-dir, check that as well before giving up.
9234         OLD_PATH=$PATH
9235         PATH=$TOOLS_DIR:$PATH
9236         for ac_prog in gmake
9237 do
9238   # Extract the first word of "$ac_prog", so it can be a program name with args.
9239 set dummy $ac_prog; ac_word=$2
9240 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9241 $as_echo_n "checking for $ac_word... " >&6; }
9242 if test "${ac_cv_path_CHECK_TOOLSDIR_GMAKE+set}" = set; then :
9243   $as_echo_n "(cached) " >&6
9244 else
9245   case $CHECK_TOOLSDIR_GMAKE in
9246   [\\/]* | ?:[\\/]*)
9247   ac_cv_path_CHECK_TOOLSDIR_GMAKE="$CHECK_TOOLSDIR_GMAKE" # Let the user override the test with a path.
9248   ;;
9249   *)
9250   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9251 for as_dir in $PATH
9252 do
9253   IFS=$as_save_IFS
9254   test -z "$as_dir" && as_dir=.
9255     for ac_exec_ext in '' $ac_executable_extensions; do
9256   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9257     ac_cv_path_CHECK_TOOLSDIR_GMAKE="$as_dir/$ac_word$ac_exec_ext"
9258     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9259     break 2
9260   fi
9261 done
9262   done
9263 IFS=$as_save_IFS
9264 
9265   ;;
9266 esac
9267 fi
9268 CHECK_TOOLSDIR_GMAKE=$ac_cv_path_CHECK_TOOLSDIR_GMAKE
9269 if test -n "$CHECK_TOOLSDIR_GMAKE"; then
9270   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_GMAKE" >&5
9271 $as_echo "$CHECK_TOOLSDIR_GMAKE" >&6; }
9272 else
9273   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9274 $as_echo "no" >&6; }
9275 fi
9276 
9277 
9278   test -n "$CHECK_TOOLSDIR_GMAKE" && break
9279 done
9280 
9281 
9282   MAKE_CANDIDATE=""$CHECK_TOOLSDIR_GMAKE""
9283   DESCRIPTION="gmake in tools-dir"
9284   if test "x$MAKE_CANDIDATE" != x; then
9285     { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
9286 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
9287     MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
9288     IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
9289     if test "x$IS_GNU_MAKE" = x; then
9290       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
9291 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
9292     else
9293       IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'`
9294       if test "x$IS_MODERN_MAKE" = x; then
9295         { $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
9296 $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;}
9297       else
9298         if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
9299           if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9300             MAKE_EXPECTED_ENV='cygwin'
9301           elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9302             MAKE_EXPECTED_ENV='msys'
9303           else
9304             as_fn_error $? "Unknown Windows environment" "$LINENO" 5
9305           fi
9306           MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
9307           IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
9308         else
9309           # Not relevant for non-Windows
9310           IS_MAKE_CORRECT_ENV=true
9311         fi
9312         if test "x$IS_MAKE_CORRECT_ENV" = x; then
9313           { $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
9314 $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;}
9315         else
9316           FOUND_MAKE=$MAKE_CANDIDATE
9317 
9318   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9319 
9320   # First separate the path from the arguments. This will split at the first
9321   # space.
9322   complete="$FOUND_MAKE"
9323   path="${complete%% *}"
9324   tmp="$complete EOL"
9325   arguments="${tmp#* }"
9326 
9327   # Input might be given as Windows format, start by converting to
9328   # unix format.
9329   new_path=`$CYGPATH -u "$path"`
9330 
9331   # Now try to locate executable using which
9332   new_path=`$WHICH "$new_path" 2> /dev/null`
9333   # bat and cmd files are not always considered executable in cygwin causing which
9334   # to not find them
9335   if test "x$new_path" = x \
9336            && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
9337            && test "x`$LS \"$path\" 2>/dev/null`" != x; then
9338     new_path=`$CYGPATH -u "$path"`
9339   fi
9340   if test "x$new_path" = x; then
9341     # Oops. Which didn't find the executable.
9342     # The splitting of arguments from the executable at a space might have been incorrect,
9343     # since paths with space are more likely in Windows. Give it another try with the whole
9344     # argument.
9345     path="$complete"
9346     arguments="EOL"
9347     new_path=`$CYGPATH -u "$path"`
9348     new_path=`$WHICH "$new_path" 2> /dev/null`
9349     # bat and cmd files are not always considered executable in cygwin causing which
9350     # to not find them
9351     if test "x$new_path" = x \
9352              && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
9353              && test "x`$LS \"$path\" 2>/dev/null`" != x; then
9354       new_path=`$CYGPATH -u "$path"`
9355     fi
9356     if test "x$new_path" = x; then
9357       # It's still not found. Now this is an unrecoverable error.
9358       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9359 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9360       has_space=`$ECHO "$complete" | $GREP " "`
9361       if test "x$has_space" != x; then
9362         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9363 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9364       fi
9365       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9366     fi
9367   fi
9368 
9369   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
9370   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
9371   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
9372   # "foo.exe" is OK but "foo" is an error.
9373   #
9374   # This test is therefore slightly more accurate than "test -f" to check for file precense.
9375   # It is also a way to make sure we got the proper file name for the real test later on.
9376   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
9377   if test "x$test_shortpath" = x; then
9378     # Short path failed, file does not exist as specified.
9379     # Try adding .exe or .cmd
9380     if test -f "${new_path}.exe"; then
9381        input_to_shortpath="${new_path}.exe"
9382     elif test -f "${new_path}.cmd"; then
9383        input_to_shortpath="${new_path}.cmd"
9384     else
9385       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
9386 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
9387       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
9388 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
9389       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9390     fi
9391   else
9392     input_to_shortpath="$new_path"
9393   fi
9394 
9395   # Call helper function which possibly converts this using DOS-style short mode.
9396   # If so, the updated path is stored in $new_path.
9397   new_path="$input_to_shortpath"
9398 
9399   input_path="$input_to_shortpath"
9400   # Check if we need to convert this using DOS-style short mode. If the path
9401   # contains just simple characters, use it. Otherwise (spaces, weird characters),
9402   # take no chances and rewrite it.
9403   # Note: m4 eats our [], so we need to use [ and ] instead.
9404   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
9405   if test "x$has_forbidden_chars" != x; then
9406     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9407     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
9408     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
9409     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
9410       # Going to short mode and back again did indeed matter. Since short mode is
9411       # case insensitive, let's make it lowercase to improve readability.
9412       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9413       # Now convert it back to Unix-stile (cygpath)
9414       input_path=`$CYGPATH -u "$shortmode_path"`
9415       new_path="$input_path"
9416     fi
9417   fi
9418 
9419   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
9420   if test "x$test_cygdrive_prefix" = x; then
9421     # As a simple fix, exclude /usr/bin since it's not a real path.
9422     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
9423       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
9424       # a path prefixed by /cygdrive for fixpath to work.
9425       new_path="$CYGWIN_ROOT_PATH$input_path"
9426     fi
9427   fi
9428 
9429   # remove trailing .exe if any
9430   new_path="${new_path/%.exe/}"
9431 
9432   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9433 
9434   # First separate the path from the arguments. This will split at the first
9435   # space.
9436   complete="$FOUND_MAKE"
9437   path="${complete%% *}"
9438   tmp="$complete EOL"
9439   arguments="${tmp#* }"
9440 
9441   # Input might be given as Windows format, start by converting to
9442   # unix format.
9443   new_path="$path"
9444 
9445   windows_path="$new_path"
9446   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9447     unix_path=`$CYGPATH -u "$windows_path"`
9448     new_path="$unix_path"
9449   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9450     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9451     new_path="$unix_path"
9452   fi
9453 
9454 
9455   # Now try to locate executable using which
9456   new_path=`$WHICH "$new_path" 2> /dev/null`
9457 
9458   if test "x$new_path" = x; then
9459     # Oops. Which didn't find the executable.
9460     # The splitting of arguments from the executable at a space might have been incorrect,
9461     # since paths with space are more likely in Windows. Give it another try with the whole
9462     # argument.
9463     path="$complete"
9464     arguments="EOL"
9465     new_path="$path"
9466 
9467   windows_path="$new_path"
9468   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9469     unix_path=`$CYGPATH -u "$windows_path"`
9470     new_path="$unix_path"
9471   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9472     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9473     new_path="$unix_path"
9474   fi
9475 
9476 
9477     new_path=`$WHICH "$new_path" 2> /dev/null`
9478 
9479     if test "x$new_path" = x; then
9480       # It's still not found. Now this is an unrecoverable error.
9481       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9482 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9483       has_space=`$ECHO "$complete" | $GREP " "`
9484       if test "x$has_space" != x; then
9485         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9486 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9487       fi
9488       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9489     fi
9490   fi
9491 
9492   # Now new_path has a complete unix path to the binary
9493   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
9494     # Keep paths in /bin as-is, but remove trailing .exe if any
9495     new_path="${new_path/%.exe/}"
9496     # Do not save /bin paths to all_fixpath_prefixes!
9497   else
9498     # Not in mixed or Windows style, start by that.
9499     new_path=`cmd //c echo $new_path`
9500 
9501   input_path="$new_path"
9502   # Check if we need to convert this using DOS-style short mode. If the path
9503   # contains just simple characters, use it. Otherwise (spaces, weird characters),
9504   # take no chances and rewrite it.
9505   # Note: m4 eats our [], so we need to use [ and ] instead.
9506   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
9507   if test "x$has_forbidden_chars" != x; then
9508     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9509     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9510   fi
9511 
9512     # Output is in $new_path
9513 
9514   windows_path="$new_path"
9515   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9516     unix_path=`$CYGPATH -u "$windows_path"`
9517     new_path="$unix_path"
9518   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9519     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9520     new_path="$unix_path"
9521   fi
9522 
9523     # remove trailing .exe if any
9524     new_path="${new_path/%.exe/}"
9525 
9526     # Save the first 10 bytes of this path to the storage, so fixpath can work.
9527     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
9528   fi
9529 
9530   else
9531     # We're on a posix platform. Hooray! :)
9532     # First separate the path from the arguments. This will split at the first
9533     # space.
9534     complete="$FOUND_MAKE"
9535     path="${complete%% *}"
9536     tmp="$complete EOL"
9537     arguments="${tmp#* }"
9538 
9539     # Cannot rely on the command "which" here since it doesn't always work.
9540     is_absolute_path=`$ECHO "$path" | $GREP ^/`
9541     if test -z "$is_absolute_path"; then
9542       # Path to executable is not absolute. Find it.
9543       IFS_save="$IFS"
9544       IFS=:
9545       for p in $PATH; do
9546         if test -f "$p/$path" && test -x "$p/$path"; then
9547           new_path="$p/$path"
9548           break
9549         fi
9550       done
9551       IFS="$IFS_save"
9552     else
9553       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
9554 $as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
9555       new_path="$path"
9556     fi
9557 
9558     if test "x$new_path" = x; then
9559         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9560 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9561         has_space=`$ECHO "$complete" | $GREP " "`
9562         if test "x$has_space" != x; then
9563           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
9564 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
9565         fi
9566         as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9567       fi
9568   fi
9569 
9570       # Now join together the path and the arguments once again
9571       if test "x$arguments" != xEOL; then
9572         new_complete="$new_path ${arguments% *}"
9573       else
9574         new_complete="$new_path"
9575       fi
9576 
9577   if test "x$complete" != "x$new_complete"; then
9578       FOUND_MAKE="$new_complete"
9579       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
9580 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
9581     fi
9582 
9583         fi
9584       fi
9585     fi
9586   fi
9587 
9588         if test "x$FOUND_MAKE" = x; then
9589           for ac_prog in make
9590 do
9591   # Extract the first word of "$ac_prog", so it can be a program name with args.
9592 set dummy $ac_prog; ac_word=$2
9593 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9594 $as_echo_n "checking for $ac_word... " >&6; }
9595 if test "${ac_cv_path_CHECK_TOOLSDIR_MAKE+set}" = set; then :
9596   $as_echo_n "(cached) " >&6
9597 else
9598   case $CHECK_TOOLSDIR_MAKE in
9599   [\\/]* | ?:[\\/]*)
9600   ac_cv_path_CHECK_TOOLSDIR_MAKE="$CHECK_TOOLSDIR_MAKE" # Let the user override the test with a path.
9601   ;;
9602   *)
9603   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9604 for as_dir in $PATH
9605 do
9606   IFS=$as_save_IFS
9607   test -z "$as_dir" && as_dir=.
9608     for ac_exec_ext in '' $ac_executable_extensions; do
9609   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9610     ac_cv_path_CHECK_TOOLSDIR_MAKE="$as_dir/$ac_word$ac_exec_ext"
9611     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9612     break 2
9613   fi
9614 done
9615   done
9616 IFS=$as_save_IFS
9617 
9618   ;;
9619 esac
9620 fi
9621 CHECK_TOOLSDIR_MAKE=$ac_cv_path_CHECK_TOOLSDIR_MAKE
9622 if test -n "$CHECK_TOOLSDIR_MAKE"; then
9623   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_MAKE" >&5
9624 $as_echo "$CHECK_TOOLSDIR_MAKE" >&6; }
9625 else
9626   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9627 $as_echo "no" >&6; }
9628 fi
9629 
9630 
9631   test -n "$CHECK_TOOLSDIR_MAKE" && break
9632 done
9633 
9634 
9635   MAKE_CANDIDATE=""$CHECK_TOOLSDIR_MAKE""
9636   DESCRIPTION="make in tools-dir"
9637   if test "x$MAKE_CANDIDATE" != x; then
9638     { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
9639 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
9640     MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
9641     IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
9642     if test "x$IS_GNU_MAKE" = x; then
9643       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
9644 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
9645     else
9646       IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'`
9647       if test "x$IS_MODERN_MAKE" = x; then
9648         { $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
9649 $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;}
9650       else
9651         if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
9652           if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9653             MAKE_EXPECTED_ENV='cygwin'
9654           elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9655             MAKE_EXPECTED_ENV='msys'
9656           else
9657             as_fn_error $? "Unknown Windows environment" "$LINENO" 5
9658           fi
9659           MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
9660           IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
9661         else
9662           # Not relevant for non-Windows
9663           IS_MAKE_CORRECT_ENV=true
9664         fi
9665         if test "x$IS_MAKE_CORRECT_ENV" = x; then
9666           { $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
9667 $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;}
9668         else
9669           FOUND_MAKE=$MAKE_CANDIDATE
9670 
9671   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9672 
9673   # First separate the path from the arguments. This will split at the first
9674   # space.
9675   complete="$FOUND_MAKE"
9676   path="${complete%% *}"
9677   tmp="$complete EOL"
9678   arguments="${tmp#* }"
9679 
9680   # Input might be given as Windows format, start by converting to
9681   # unix format.
9682   new_path=`$CYGPATH -u "$path"`
9683 
9684   # Now try to locate executable using which
9685   new_path=`$WHICH "$new_path" 2> /dev/null`
9686   # bat and cmd files are not always considered executable in cygwin causing which
9687   # to not find them
9688   if test "x$new_path" = x \
9689            && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
9690            && test "x`$LS \"$path\" 2>/dev/null`" != x; then
9691     new_path=`$CYGPATH -u "$path"`
9692   fi
9693   if test "x$new_path" = x; then
9694     # Oops. Which didn't find the executable.
9695     # The splitting of arguments from the executable at a space might have been incorrect,
9696     # since paths with space are more likely in Windows. Give it another try with the whole
9697     # argument.
9698     path="$complete"
9699     arguments="EOL"
9700     new_path=`$CYGPATH -u "$path"`
9701     new_path=`$WHICH "$new_path" 2> /dev/null`
9702     # bat and cmd files are not always considered executable in cygwin causing which
9703     # to not find them
9704     if test "x$new_path" = x \
9705              && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
9706              && test "x`$LS \"$path\" 2>/dev/null`" != x; then
9707       new_path=`$CYGPATH -u "$path"`
9708     fi
9709     if test "x$new_path" = x; then
9710       # It's still not found. Now this is an unrecoverable error.
9711       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9712 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9713       has_space=`$ECHO "$complete" | $GREP " "`
9714       if test "x$has_space" != x; then
9715         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9716 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9717       fi
9718       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9719     fi
9720   fi
9721 
9722   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
9723   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
9724   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
9725   # "foo.exe" is OK but "foo" is an error.
9726   #
9727   # This test is therefore slightly more accurate than "test -f" to check for file precense.
9728   # It is also a way to make sure we got the proper file name for the real test later on.
9729   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
9730   if test "x$test_shortpath" = x; then
9731     # Short path failed, file does not exist as specified.
9732     # Try adding .exe or .cmd
9733     if test -f "${new_path}.exe"; then
9734        input_to_shortpath="${new_path}.exe"
9735     elif test -f "${new_path}.cmd"; then
9736        input_to_shortpath="${new_path}.cmd"
9737     else
9738       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
9739 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
9740       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
9741 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
9742       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9743     fi
9744   else
9745     input_to_shortpath="$new_path"
9746   fi
9747 
9748   # Call helper function which possibly converts this using DOS-style short mode.
9749   # If so, the updated path is stored in $new_path.
9750   new_path="$input_to_shortpath"
9751 
9752   input_path="$input_to_shortpath"
9753   # Check if we need to convert this using DOS-style short mode. If the path
9754   # contains just simple characters, use it. Otherwise (spaces, weird characters),
9755   # take no chances and rewrite it.
9756   # Note: m4 eats our [], so we need to use [ and ] instead.
9757   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
9758   if test "x$has_forbidden_chars" != x; then
9759     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9760     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
9761     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
9762     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
9763       # Going to short mode and back again did indeed matter. Since short mode is
9764       # case insensitive, let's make it lowercase to improve readability.
9765       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9766       # Now convert it back to Unix-stile (cygpath)
9767       input_path=`$CYGPATH -u "$shortmode_path"`
9768       new_path="$input_path"
9769     fi
9770   fi
9771 
9772   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
9773   if test "x$test_cygdrive_prefix" = x; then
9774     # As a simple fix, exclude /usr/bin since it's not a real path.
9775     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
9776       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
9777       # a path prefixed by /cygdrive for fixpath to work.
9778       new_path="$CYGWIN_ROOT_PATH$input_path"
9779     fi
9780   fi
9781 
9782   # remove trailing .exe if any
9783   new_path="${new_path/%.exe/}"
9784 
9785   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9786 
9787   # First separate the path from the arguments. This will split at the first
9788   # space.
9789   complete="$FOUND_MAKE"
9790   path="${complete%% *}"
9791   tmp="$complete EOL"
9792   arguments="${tmp#* }"
9793 
9794   # Input might be given as Windows format, start by converting to
9795   # unix format.
9796   new_path="$path"
9797 
9798   windows_path="$new_path"
9799   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9800     unix_path=`$CYGPATH -u "$windows_path"`
9801     new_path="$unix_path"
9802   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9803     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9804     new_path="$unix_path"
9805   fi
9806 
9807 
9808   # Now try to locate executable using which
9809   new_path=`$WHICH "$new_path" 2> /dev/null`
9810 
9811   if test "x$new_path" = x; then
9812     # Oops. Which didn't find the executable.
9813     # The splitting of arguments from the executable at a space might have been incorrect,
9814     # since paths with space are more likely in Windows. Give it another try with the whole
9815     # argument.
9816     path="$complete"
9817     arguments="EOL"
9818     new_path="$path"
9819 
9820   windows_path="$new_path"
9821   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9822     unix_path=`$CYGPATH -u "$windows_path"`
9823     new_path="$unix_path"
9824   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9825     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9826     new_path="$unix_path"
9827   fi
9828 
9829 
9830     new_path=`$WHICH "$new_path" 2> /dev/null`
9831 
9832     if test "x$new_path" = x; then
9833       # It's still not found. Now this is an unrecoverable error.
9834       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9835 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9836       has_space=`$ECHO "$complete" | $GREP " "`
9837       if test "x$has_space" != x; then
9838         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9839 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9840       fi
9841       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9842     fi
9843   fi
9844 
9845   # Now new_path has a complete unix path to the binary
9846   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
9847     # Keep paths in /bin as-is, but remove trailing .exe if any
9848     new_path="${new_path/%.exe/}"
9849     # Do not save /bin paths to all_fixpath_prefixes!
9850   else
9851     # Not in mixed or Windows style, start by that.
9852     new_path=`cmd //c echo $new_path`
9853 
9854   input_path="$new_path"
9855   # Check if we need to convert this using DOS-style short mode. If the path
9856   # contains just simple characters, use it. Otherwise (spaces, weird characters),
9857   # take no chances and rewrite it.
9858   # Note: m4 eats our [], so we need to use [ and ] instead.
9859   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
9860   if test "x$has_forbidden_chars" != x; then
9861     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9862     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9863   fi
9864 
9865     # Output is in $new_path
9866 
9867   windows_path="$new_path"
9868   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9869     unix_path=`$CYGPATH -u "$windows_path"`
9870     new_path="$unix_path"
9871   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9872     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9873     new_path="$unix_path"
9874   fi
9875 
9876     # remove trailing .exe if any
9877     new_path="${new_path/%.exe/}"
9878 
9879     # Save the first 10 bytes of this path to the storage, so fixpath can work.
9880     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
9881   fi
9882 
9883   else
9884     # We're on a posix platform. Hooray! :)
9885     # First separate the path from the arguments. This will split at the first
9886     # space.
9887     complete="$FOUND_MAKE"
9888     path="${complete%% *}"
9889     tmp="$complete EOL"
9890     arguments="${tmp#* }"
9891 
9892     # Cannot rely on the command "which" here since it doesn't always work.
9893     is_absolute_path=`$ECHO "$path" | $GREP ^/`
9894     if test -z "$is_absolute_path"; then
9895       # Path to executable is not absolute. Find it.
9896       IFS_save="$IFS"
9897       IFS=:
9898       for p in $PATH; do
9899         if test -f "$p/$path" && test -x "$p/$path"; then
9900           new_path="$p/$path"
9901           break
9902         fi
9903       done
9904       IFS="$IFS_save"
9905     else
9906       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
9907 $as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
9908       new_path="$path"
9909     fi
9910 
9911     if test "x$new_path" = x; then
9912         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9913 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9914         has_space=`$ECHO "$complete" | $GREP " "`
9915         if test "x$has_space" != x; then
9916           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
9917 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
9918         fi
9919         as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9920       fi
9921   fi
9922 
9923       # Now join together the path and the arguments once again
9924       if test "x$arguments" != xEOL; then
9925         new_complete="$new_path ${arguments% *}"
9926       else
9927         new_complete="$new_path"
9928       fi
9929 
9930   if test "x$complete" != "x$new_complete"; then
9931       FOUND_MAKE="$new_complete"
9932       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
9933 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
9934     fi
9935 
9936         fi
9937       fi
9938     fi
9939   fi
9940 
9941         fi
9942         PATH=$OLD_PATH
9943       fi
9944     fi
9945 
9946     if test "x$FOUND_MAKE" = x; then
9947       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
9948     fi
9949   fi
9950 
9951   MAKE=$FOUND_MAKE
9952 
9953   { $as_echo "$as_me:${as_lineno-$LINENO}: Using GNU make 3.81 (or later) at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&5
9954 $as_echo "$as_me: Using GNU make 3.81 (or later) at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&6;}
9955 
9956 
9957 
9958     # Test if find supports -delete
9959     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if find supports -delete" >&5
9960 $as_echo_n "checking if find supports -delete... " >&6; }
9961     FIND_DELETE="-delete"
9962 
9963     DELETEDIR=`$MKTEMP -d tmp.XXXXXXXXXX` || (echo Could not create temporary directory!; exit $?)
9964 
9965     echo Hejsan > $DELETEDIR/TestIfFindSupportsDelete
9966 
9967     TEST_DELETE=`$FIND "$DELETEDIR" -name TestIfFindSupportsDelete $FIND_DELETE 2>&1`
9968     if test -f $DELETEDIR/TestIfFindSupportsDelete; then
9969         # No, it does not.
9970         rm $DELETEDIR/TestIfFindSupportsDelete
9971         FIND_DELETE="-exec rm \{\} \+"
9972         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9973 $as_echo "no" >&6; }
9974     else
9975         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9976 $as_echo "yes" >&6; }
9977     fi
9978     rmdir $DELETEDIR
9979 
9980 
9981 
9982 # These tools might not be installed by default,
9983 # need hint on how to install them.
9984 
9985     for ac_prog in unzip
9986 do
9987   # Extract the first word of "$ac_prog", so it can be a program name with args.
9988 set dummy $ac_prog; ac_word=$2
9989 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9990 $as_echo_n "checking for $ac_word... " >&6; }
9991 if test "${ac_cv_path_UNZIP+set}" = set; then :
9992   $as_echo_n "(cached) " >&6
9993 else
9994   case $UNZIP in
9995   [\\/]* | ?:[\\/]*)
9996   ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
9997   ;;
9998   *)
9999   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10000 for as_dir in $PATH
10001 do
10002   IFS=$as_save_IFS
10003   test -z "$as_dir" && as_dir=.
10004     for ac_exec_ext in '' $ac_executable_extensions; do
10005   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10006     ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
10007     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10008     break 2
10009   fi
10010 done
10011   done
10012 IFS=$as_save_IFS
10013 
10014   ;;
10015 esac
10016 fi
10017 UNZIP=$ac_cv_path_UNZIP
10018 if test -n "$UNZIP"; then
10019   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
10020 $as_echo "$UNZIP" >&6; }
10021 else
10022   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10023 $as_echo "no" >&6; }
10024 fi
10025 
10026 
10027   test -n "$UNZIP" && break
10028 done
10029 
10030 
10031     if test "x$UNZIP" = x; then
10032         if test "xunzip" = x; then
10033           PROG_NAME=unzip
10034         else
10035           PROG_NAME=unzip
10036         fi
10037         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
10038 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
10039         as_fn_error $? "Cannot continue" "$LINENO" 5
10040     fi
10041 
10042 
10043 
10044     for ac_prog in zip
10045 do
10046   # Extract the first word of "$ac_prog", so it can be a program name with args.
10047 set dummy $ac_prog; ac_word=$2
10048 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10049 $as_echo_n "checking for $ac_word... " >&6; }
10050 if test "${ac_cv_path_ZIP+set}" = set; then :
10051   $as_echo_n "(cached) " >&6
10052 else
10053   case $ZIP in
10054   [\\/]* | ?:[\\/]*)
10055   ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
10056   ;;
10057   *)
10058   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10059 for as_dir in $PATH
10060 do
10061   IFS=$as_save_IFS
10062   test -z "$as_dir" && as_dir=.
10063     for ac_exec_ext in '' $ac_executable_extensions; do
10064   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10065     ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
10066     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10067     break 2
10068   fi
10069 done
10070   done
10071 IFS=$as_save_IFS
10072 
10073   ;;
10074 esac
10075 fi
10076 ZIP=$ac_cv_path_ZIP
10077 if test -n "$ZIP"; then
10078   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
10079 $as_echo "$ZIP" >&6; }
10080 else
10081   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10082 $as_echo "no" >&6; }
10083 fi
10084 
10085 
10086   test -n "$ZIP" && break
10087 done
10088 
10089 
10090     if test "x$ZIP" = x; then
10091         if test "xzip" = x; then
10092           PROG_NAME=zip
10093         else
10094           PROG_NAME=zip
10095         fi
10096         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
10097 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
10098         as_fn_error $? "Cannot continue" "$LINENO" 5
10099     fi
10100 
10101 
10102 
10103 # Non-required basic tools
10104 
10105 # Extract the first word of "ldd", so it can be a program name with args.
10106 set dummy ldd; ac_word=$2
10107 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10108 $as_echo_n "checking for $ac_word... " >&6; }
10109 if test "${ac_cv_path_LDD+set}" = set; then :
10110   $as_echo_n "(cached) " >&6
10111 else
10112   case $LDD in
10113   [\\/]* | ?:[\\/]*)
10114   ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
10115   ;;
10116   *)
10117   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10118 for as_dir in $PATH
10119 do
10120   IFS=$as_save_IFS
10121   test -z "$as_dir" && as_dir=.
10122     for ac_exec_ext in '' $ac_executable_extensions; do
10123   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10124     ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
10125     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10126     break 2
10127   fi
10128 done
10129   done
10130 IFS=$as_save_IFS
10131 
10132   ;;
10133 esac
10134 fi
10135 LDD=$ac_cv_path_LDD
10136 if test -n "$LDD"; then
10137   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
10138 $as_echo "$LDD" >&6; }
10139 else
10140   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10141 $as_echo "no" >&6; }
10142 fi
10143 
10144 
10145 if test "x$LDD" = "x"; then
10146     # List shared lib dependencies is used for
10147     # debug output and checking for forbidden dependencies.
10148     # We can build without it.
10149     LDD="true"
10150 fi
10151 # Extract the first word of "otool", so it can be a program name with args.
10152 set dummy otool; ac_word=$2
10153 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10154 $as_echo_n "checking for $ac_word... " >&6; }
10155 if test "${ac_cv_path_OTOOL+set}" = set; then :
10156   $as_echo_n "(cached) " >&6
10157 else
10158   case $OTOOL in
10159   [\\/]* | ?:[\\/]*)
10160   ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
10161   ;;
10162   *)
10163   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10164 for as_dir in $PATH
10165 do
10166   IFS=$as_save_IFS
10167   test -z "$as_dir" && as_dir=.
10168     for ac_exec_ext in '' $ac_executable_extensions; do
10169   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10170     ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
10171     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10172     break 2
10173   fi
10174 done
10175   done
10176 IFS=$as_save_IFS
10177 
10178   ;;
10179 esac
10180 fi
10181 OTOOL=$ac_cv_path_OTOOL
10182 if test -n "$OTOOL"; then
10183   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
10184 $as_echo "$OTOOL" >&6; }
10185 else
10186   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10187 $as_echo "no" >&6; }
10188 fi
10189 
10190 
10191 if test "x$OTOOL" = "x"; then
10192    OTOOL="true"
10193 fi
10194 for ac_prog in readelf greadelf
10195 do
10196   # Extract the first word of "$ac_prog", so it can be a program name with args.
10197 set dummy $ac_prog; ac_word=$2
10198 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10199 $as_echo_n "checking for $ac_word... " >&6; }
10200 if test "${ac_cv_path_READELF+set}" = set; then :
10201   $as_echo_n "(cached) " >&6
10202 else
10203   case $READELF in
10204   [\\/]* | ?:[\\/]*)
10205   ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
10206   ;;
10207   *)
10208   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10209 for as_dir in $PATH
10210 do
10211   IFS=$as_save_IFS
10212   test -z "$as_dir" && as_dir=.
10213     for ac_exec_ext in '' $ac_executable_extensions; do
10214   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10215     ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
10216     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10217     break 2
10218   fi
10219 done
10220   done
10221 IFS=$as_save_IFS
10222 
10223   ;;
10224 esac
10225 fi
10226 READELF=$ac_cv_path_READELF
10227 if test -n "$READELF"; then
10228   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
10229 $as_echo "$READELF" >&6; }
10230 else
10231   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10232 $as_echo "no" >&6; }
10233 fi
10234 
10235 
10236   test -n "$READELF" && break
10237 done
10238 
10239 # Extract the first word of "hg", so it can be a program name with args.
10240 set dummy hg; ac_word=$2
10241 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10242 $as_echo_n "checking for $ac_word... " >&6; }
10243 if test "${ac_cv_path_HG+set}" = set; then :
10244   $as_echo_n "(cached) " >&6
10245 else
10246   case $HG in
10247   [\\/]* | ?:[\\/]*)
10248   ac_cv_path_HG="$HG" # Let the user override the test with a path.
10249   ;;
10250   *)
10251   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10252 for as_dir in $PATH
10253 do
10254   IFS=$as_save_IFS
10255   test -z "$as_dir" && as_dir=.
10256     for ac_exec_ext in '' $ac_executable_extensions; do
10257   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10258     ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
10259     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10260     break 2
10261   fi
10262 done
10263   done
10264 IFS=$as_save_IFS
10265 
10266   ;;
10267 esac
10268 fi
10269 HG=$ac_cv_path_HG
10270 if test -n "$HG"; then
10271   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
10272 $as_echo "$HG" >&6; }
10273 else
10274   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10275 $as_echo "no" >&6; }
10276 fi
10277 
10278 
10279 # Extract the first word of "stat", so it can be a program name with args.
10280 set dummy stat; ac_word=$2
10281 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10282 $as_echo_n "checking for $ac_word... " >&6; }
10283 if test "${ac_cv_path_STAT+set}" = set; then :
10284   $as_echo_n "(cached) " >&6
10285 else
10286   case $STAT in
10287   [\\/]* | ?:[\\/]*)
10288   ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
10289   ;;
10290   *)
10291   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10292 for as_dir in $PATH
10293 do
10294   IFS=$as_save_IFS
10295   test -z "$as_dir" && as_dir=.
10296     for ac_exec_ext in '' $ac_executable_extensions; do
10297   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10298     ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
10299     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10300     break 2
10301   fi
10302 done
10303   done
10304 IFS=$as_save_IFS
10305 
10306   ;;
10307 esac
10308 fi
10309 STAT=$ac_cv_path_STAT
10310 if test -n "$STAT"; then
10311   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
10312 $as_echo "$STAT" >&6; }
10313 else
10314   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10315 $as_echo "no" >&6; }
10316 fi
10317 
10318 
10319 # Extract the first word of "time", so it can be a program name with args.
10320 set dummy time; ac_word=$2
10321 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10322 $as_echo_n "checking for $ac_word... " >&6; }
10323 if test "${ac_cv_path_TIME+set}" = set; then :
10324   $as_echo_n "(cached) " >&6
10325 else
10326   case $TIME in
10327   [\\/]* | ?:[\\/]*)
10328   ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
10329   ;;
10330   *)
10331   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10332 for as_dir in $PATH
10333 do
10334   IFS=$as_save_IFS
10335   test -z "$as_dir" && as_dir=.
10336     for ac_exec_ext in '' $ac_executable_extensions; do
10337   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10338     ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
10339     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10340     break 2
10341   fi
10342 done
10343   done
10344 IFS=$as_save_IFS
10345 
10346   ;;
10347 esac
10348 fi
10349 TIME=$ac_cv_path_TIME
10350 if test -n "$TIME"; then
10351   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
10352 $as_echo "$TIME" >&6; }
10353 else
10354   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10355 $as_echo "no" >&6; }
10356 fi
10357 
10358 
10359 
10360 if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
10361 
10362     for ac_prog in comm
10363 do
10364   # Extract the first word of "$ac_prog", so it can be a program name with args.
10365 set dummy $ac_prog; ac_word=$2
10366 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10367 $as_echo_n "checking for $ac_word... " >&6; }
10368 if test "${ac_cv_path_COMM+set}" = set; then :
10369   $as_echo_n "(cached) " >&6
10370 else
10371   case $COMM in
10372   [\\/]* | ?:[\\/]*)
10373   ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
10374   ;;
10375   *)
10376   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10377 for as_dir in $PATH
10378 do
10379   IFS=$as_save_IFS
10380   test -z "$as_dir" && as_dir=.
10381     for ac_exec_ext in '' $ac_executable_extensions; do
10382   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10383     ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
10384     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10385     break 2
10386   fi
10387 done
10388   done
10389 IFS=$as_save_IFS
10390 
10391   ;;
10392 esac
10393 fi
10394 COMM=$ac_cv_path_COMM
10395 if test -n "$COMM"; then
10396   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
10397 $as_echo "$COMM" >&6; }
10398 else
10399   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10400 $as_echo "no" >&6; }
10401 fi
10402 
10403 
10404   test -n "$COMM" && break
10405 done
10406 
10407 
10408     if test "x$COMM" = x; then
10409         if test "xcomm" = x; then
10410           PROG_NAME=comm
10411         else
10412           PROG_NAME=comm
10413         fi
10414         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
10415 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
10416         as_fn_error $? "Cannot continue" "$LINENO" 5
10417     fi
10418 
10419 
10420 fi
10421 
10422 if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
10423 
10424     for ac_prog in xattr
10425 do
10426   # Extract the first word of "$ac_prog", so it can be a program name with args.
10427 set dummy $ac_prog; ac_word=$2
10428 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10429 $as_echo_n "checking for $ac_word... " >&6; }
10430 if test "${ac_cv_path_XATTR+set}" = set; then :
10431   $as_echo_n "(cached) " >&6
10432 else
10433   case $XATTR in
10434   [\\/]* | ?:[\\/]*)
10435   ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
10436   ;;
10437   *)
10438   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10439 for as_dir in $PATH
10440 do
10441   IFS=$as_save_IFS
10442   test -z "$as_dir" && as_dir=.
10443     for ac_exec_ext in '' $ac_executable_extensions; do
10444   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10445     ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
10446     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10447     break 2
10448   fi
10449 done
10450   done
10451 IFS=$as_save_IFS
10452 
10453   ;;
10454 esac
10455 fi
10456 XATTR=$ac_cv_path_XATTR
10457 if test -n "$XATTR"; then
10458   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
10459 $as_echo "$XATTR" >&6; }
10460 else
10461   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10462 $as_echo "no" >&6; }
10463 fi
10464 
10465 
10466   test -n "$XATTR" && break
10467 done
10468 
10469 
10470     if test "x$XATTR" = x; then
10471         if test "xxattr" = x; then
10472           PROG_NAME=xattr
10473         else
10474           PROG_NAME=xattr
10475         fi
10476         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
10477 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
10478         as_fn_error $? "Cannot continue" "$LINENO" 5
10479     fi
10480 
10481 
10482 fi
10483 
10484 
10485 # Check if pkg-config is available.
10486 
10487 
10488 if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
10489         if test -n "$ac_tool_prefix"; then
10490   # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
10491 set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
10492 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10493 $as_echo_n "checking for $ac_word... " >&6; }
10494 if test "${ac_cv_path_PKG_CONFIG+set}" = set; then :
10495   $as_echo_n "(cached) " >&6
10496 else
10497   case $PKG_CONFIG in
10498   [\\/]* | ?:[\\/]*)
10499   ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
10500   ;;
10501   *)
10502   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10503 for as_dir in $PATH
10504 do
10505   IFS=$as_save_IFS
10506   test -z "$as_dir" && as_dir=.
10507     for ac_exec_ext in '' $ac_executable_extensions; do
10508   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10509     ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
10510     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10511     break 2
10512   fi
10513 done
10514   done
10515 IFS=$as_save_IFS
10516 
10517   ;;
10518 esac
10519 fi
10520 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
10521 if test -n "$PKG_CONFIG"; then
10522   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
10523 $as_echo "$PKG_CONFIG" >&6; }
10524 else
10525   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10526 $as_echo "no" >&6; }
10527 fi
10528 
10529 
10530 fi
10531 if test -z "$ac_cv_path_PKG_CONFIG"; then
10532   ac_pt_PKG_CONFIG=$PKG_CONFIG
10533   # Extract the first word of "pkg-config", so it can be a program name with args.
10534 set dummy pkg-config; ac_word=$2
10535 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10536 $as_echo_n "checking for $ac_word... " >&6; }
10537 if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then :
10538   $as_echo_n "(cached) " >&6
10539 else
10540   case $ac_pt_PKG_CONFIG in
10541   [\\/]* | ?:[\\/]*)
10542   ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
10543   ;;
10544   *)
10545   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10546 for as_dir in $PATH
10547 do
10548   IFS=$as_save_IFS
10549   test -z "$as_dir" && as_dir=.
10550     for ac_exec_ext in '' $ac_executable_extensions; do
10551   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10552     ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
10553     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10554     break 2
10555   fi
10556 done
10557   done
10558 IFS=$as_save_IFS
10559 
10560   ;;
10561 esac
10562 fi
10563 ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
10564 if test -n "$ac_pt_PKG_CONFIG"; then
10565   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
10566 $as_echo "$ac_pt_PKG_CONFIG" >&6; }
10567 else
10568   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10569 $as_echo "no" >&6; }
10570 fi
10571 
10572   if test "x$ac_pt_PKG_CONFIG" = x; then
10573     PKG_CONFIG=""
10574   else
10575     case $cross_compiling:$ac_tool_warned in
10576 yes:)
10577 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
10578 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
10579 ac_tool_warned=yes ;;
10580 esac
10581     PKG_CONFIG=$ac_pt_PKG_CONFIG
10582   fi
10583 else
10584   PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
10585 fi
10586 
10587 fi
10588 if test -n "$PKG_CONFIG"; then
10589         _pkg_min_version=0.9.0
10590         { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
10591 $as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
10592         if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
10593                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10594 $as_echo "yes" >&6; }
10595         else
10596                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10597 $as_echo "no" >&6; }
10598                 PKG_CONFIG=""
10599         fi
10600 
10601 fi
10602 
10603 # After basic tools have been setup, we can check build os specific details.
10604 
10605 ###############################################################################
10606 
10607 # Note that this is the build platform OS version!
10608 
10609 OS_VERSION="`uname -r | ${SED} 's!\.! !g' | ${SED} 's!-! !g'`"
10610 OS_VERSION_MAJOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 1 -d ' '`"
10611 OS_VERSION_MINOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 2 -d ' '`"
10612 OS_VERSION_MICRO="`${ECHO} ${OS_VERSION} | ${CUT} -f 3 -d ' '`"
10613 
10614 
10615 
10616 
10617 
10618 # Setup builddeps, for automatic downloading of tools we need.
10619 # This is needed before we can call BDEPS_CHECK_MODULE, which is done in
10620 # boot-jdk setup, but we need to have basic tools setup first.
10621 
10622 
10623 # Check whether --with-builddeps-conf was given.
10624 if test "${with_builddeps_conf+set}" = set; then :
10625   withval=$with_builddeps_conf;
10626 fi
10627 
10628 
10629 
10630 # Check whether --with-builddeps-server was given.
10631 if test "${with_builddeps_server+set}" = set; then :
10632   withval=$with_builddeps_server;
10633 fi
10634 
10635 
10636 
10637 # Check whether --with-builddeps-dir was given.
10638 if test "${with_builddeps_dir+set}" = set; then :
10639   withval=$with_builddeps_dir;
10640 else
10641   with_builddeps_dir=/localhome/builddeps
10642 fi
10643 
10644 
10645 
10646 # Check whether --with-builddeps-group was given.
10647 if test "${with_builddeps_group+set}" = set; then :
10648   withval=$with_builddeps_group;
10649 fi
10650 
10651 
10652 
10653 
10654     if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
10655         if test "x$with_builddeps_conf" != x; then
10656             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for supplied builddeps configuration file" >&5
10657 $as_echo_n "checking for supplied builddeps configuration file... " >&6; }
10658             builddepsfile=$with_builddeps_conf
10659             if test -s $builddepsfile; then
10660                 . $builddepsfile
10661                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: loaded!" >&5
10662 $as_echo "loaded!" >&6; }
10663             else
10664                as_fn_error $? "The given builddeps conf file $with_builddeps_conf could not be loaded!" "$LINENO" 5
10665            fi
10666         else
10667             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builddeps.conf files in sources..." >&5
10668 $as_echo_n "checking for builddeps.conf files in sources...... " >&6; }
10669             builddepsfile=`mktemp`
10670             touch $builddepsfile
10671             # Put all found confs into a single file.
10672             find ${SRC_ROOT} -name builddeps.conf -exec cat \{\} \; >> $builddepsfile
10673             # Source the file to acquire the variables
10674             if test -s $builddepsfile; then
10675                 . $builddepsfile
10676                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: found at least one!" >&5
10677 $as_echo "found at least one!" >&6; }
10678             else
10679                as_fn_error $? "Could not find any builddeps.conf at all!" "$LINENO" 5
10680            fi
10681         fi
10682         # Create build and target names that use _ instead of "-" and ".".
10683         # This is necessary to use them in variable names.
10684         build_var=`echo ${OPENJDK_BUILD_AUTOCONF_NAME} | tr '-' '_' | tr '.' '_'`
10685         target_var=`echo ${OPENJDK_TARGET_AUTOCONF_NAME} | tr '-' '_' | tr '.' '_'`
10686         # Extract rewrite information for build and target
10687         eval rewritten_build=\${REWRITE_${build_var}}
10688         if test "x$rewritten_build" = x; then
10689             rewritten_build=${OPENJDK_BUILD_AUTOCONF_NAME}
10690             echo Build stays the same $rewritten_build
10691         else
10692             echo Rewriting build for builddeps into $rewritten_build
10693         fi
10694         eval rewritten_target=\${REWRITE_${target_var}}
10695         if test "x$rewritten_target" = x; then
10696             rewritten_target=${OPENJDK_TARGET_AUTOCONF_NAME}
10697             echo Target stays the same $rewritten_target
10698         else
10699             echo Rewriting target for builddeps into $rewritten_target
10700         fi
10701         rewritten_build_var=`echo ${rewritten_build} | tr '-' '_' | tr '.' '_'`
10702         rewritten_target_var=`echo ${rewritten_target} | tr '-' '_' | tr '.' '_'`
10703     fi
10704     for ac_prog in 7z unzip
10705 do
10706   # Extract the first word of "$ac_prog", so it can be a program name with args.
10707 set dummy $ac_prog; ac_word=$2
10708 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10709 $as_echo_n "checking for $ac_word... " >&6; }
10710 if test "${ac_cv_prog_BDEPS_UNZIP+set}" = set; then :
10711   $as_echo_n "(cached) " >&6
10712 else
10713   if test -n "$BDEPS_UNZIP"; then
10714   ac_cv_prog_BDEPS_UNZIP="$BDEPS_UNZIP" # Let the user override the test.
10715 else
10716 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10717 for as_dir in $PATH
10718 do
10719   IFS=$as_save_IFS
10720   test -z "$as_dir" && as_dir=.
10721     for ac_exec_ext in '' $ac_executable_extensions; do
10722   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10723     ac_cv_prog_BDEPS_UNZIP="$ac_prog"
10724     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10725     break 2
10726   fi
10727 done
10728   done
10729 IFS=$as_save_IFS
10730 
10731 fi
10732 fi
10733 BDEPS_UNZIP=$ac_cv_prog_BDEPS_UNZIP
10734 if test -n "$BDEPS_UNZIP"; then
10735   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BDEPS_UNZIP" >&5
10736 $as_echo "$BDEPS_UNZIP" >&6; }
10737 else
10738   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10739 $as_echo "no" >&6; }
10740 fi
10741 
10742 
10743   test -n "$BDEPS_UNZIP" && break
10744 done
10745 
10746     if test "x$BDEPS_UNZIP" = x7z; then
10747         BDEPS_UNZIP="7z x"
10748     fi
10749 
10750     for ac_prog in wget lftp ftp
10751 do
10752   # Extract the first word of "$ac_prog", so it can be a program name with args.
10753 set dummy $ac_prog; ac_word=$2
10754 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10755 $as_echo_n "checking for $ac_word... " >&6; }
10756 if test "${ac_cv_prog_BDEPS_FTP+set}" = set; then :
10757   $as_echo_n "(cached) " >&6
10758 else
10759   if test -n "$BDEPS_FTP"; then
10760   ac_cv_prog_BDEPS_FTP="$BDEPS_FTP" # Let the user override the test.
10761 else
10762 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10763 for as_dir in $PATH
10764 do
10765   IFS=$as_save_IFS
10766   test -z "$as_dir" && as_dir=.
10767     for ac_exec_ext in '' $ac_executable_extensions; do
10768   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10769     ac_cv_prog_BDEPS_FTP="$ac_prog"
10770     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10771     break 2
10772   fi
10773 done
10774   done
10775 IFS=$as_save_IFS
10776 
10777 fi
10778 fi
10779 BDEPS_FTP=$ac_cv_prog_BDEPS_FTP
10780 if test -n "$BDEPS_FTP"; then
10781   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BDEPS_FTP" >&5
10782 $as_echo "$BDEPS_FTP" >&6; }
10783 else
10784   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10785 $as_echo "no" >&6; }
10786 fi
10787 
10788 
10789   test -n "$BDEPS_FTP" && break
10790 done
10791 
10792 
10793 
10794 ###############################################################################
10795 #
10796 # Determine OpenJDK variants, options and version numbers.
10797 #
10798 ###############################################################################
10799 
10800 # We need build & target for this.
10801 
10802 
10803 ###############################################################################
10804 #
10805 # Should we build a JDK/JVM with headful support (ie a graphical ui)?
10806 # We always build headless support.
10807 #
10808 { $as_echo "$as_me:${as_lineno-$LINENO}: checking headful support" >&5
10809 $as_echo_n "checking headful support... " >&6; }
10810 # Check whether --enable-headful was given.
10811 if test "${enable_headful+set}" = set; then :
10812   enableval=$enable_headful; SUPPORT_HEADFUL=${enable_headful}
10813 else
10814   SUPPORT_HEADFUL=yes
10815 fi
10816 
10817 
10818 SUPPORT_HEADLESS=yes
10819 BUILD_HEADLESS="BUILD_HEADLESS:=true"
10820 
10821 if test "x$SUPPORT_HEADFUL" = xyes; then
10822     # We are building both headful and headless.
10823     headful_msg="inlude support for both headful and headless"
10824 fi
10825 
10826 if test "x$SUPPORT_HEADFUL" = xno; then
10827     # Thus we are building headless only.
10828     BUILD_HEADLESS="BUILD_HEADLESS:=true"
10829     headful_msg="headless only"
10830 fi
10831 
10832 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $headful_msg" >&5
10833 $as_echo "$headful_msg" >&6; }
10834 
10835 
10836 
10837 
10838 
10839 # Control wether Hotspot runs Queens test after build.
10840 # Check whether --enable-hotspot-test-in-build was given.
10841 if test "${enable_hotspot_test_in_build+set}" = set; then :
10842   enableval=$enable_hotspot_test_in_build;
10843 else
10844   enable_hotspot_test_in_build=no
10845 fi
10846 
10847 if test "x$enable_hotspot_test_in_build" = "xyes"; then
10848     TEST_IN_BUILD=true
10849 else
10850     TEST_IN_BUILD=false
10851 fi
10852 
10853 
10854 ###############################################################################
10855 #
10856 # Choose cacerts source file
10857 #
10858 
10859 # Check whether --with-cacerts-file was given.
10860 if test "${with_cacerts_file+set}" = set; then :
10861   withval=$with_cacerts_file;
10862 fi
10863 
10864 if test "x$with_cacerts_file" != x; then
10865     CACERTS_FILE=$with_cacerts_file
10866 else
10867     if test "x$OPENJDK" = "xtrue"; then
10868         CACERTS_FILE=${SRC_ROOT}/jdk/src/share/lib/security/cacerts
10869     else
10870         CACERTS_FILE=${SRC_ROOT}/jdk/src/closed/share/lib/security/cacerts.internal
10871     fi
10872 fi
10873 
10874 
10875 ###############################################################################
10876 #
10877 # Enable or disable unlimited crypto
10878 #
10879 # Check whether --enable-unlimited-crypto was given.
10880 if test "${enable_unlimited_crypto+set}" = set; then :
10881   enableval=$enable_unlimited_crypto;
10882 else
10883   enable_unlimited_crypto=no
10884 fi
10885 
10886 if test "x$enable_unlimited_crypto" = "xyes"; then
10887     UNLIMITED_CRYPTO=true
10888 else
10889     UNLIMITED_CRYPTO=false
10890 fi
10891 
10892 
10893 ###############################################################################
10894 #
10895 # Enable or disable the elliptic curve crypto implementation
10896 #
10897 
10898 
10899 ###############################################################################
10900 #
10901 # Compress jars
10902 #
10903 COMPRESS_JARS=false
10904 
10905 
10906 
10907 
10908 # Source the version numbers
10909 . $AUTOCONF_DIR/version-numbers
10910 
10911 # Get the settings from parameters
10912 
10913 # Check whether --with-milestone was given.
10914 if test "${with_milestone+set}" = set; then :
10915   withval=$with_milestone;
10916 fi
10917 
10918 if test "x$with_milestone" = xyes; then
10919   as_fn_error $? "Milestone must have a value" "$LINENO" 5
10920 elif test "x$with_milestone" != x; then
10921     MILESTONE="$with_milestone"
10922 fi
10923 if test "x$MILESTONE" = x; then
10924   MILESTONE=internal
10925 fi
10926 
10927 
10928 # Check whether --with-build-number was given.
10929 if test "${with_build_number+set}" = set; then :
10930   withval=$with_build_number;
10931 fi
10932 
10933 if test "x$with_build_number" = xyes; then
10934   as_fn_error $? "Build number must have a value" "$LINENO" 5
10935 elif test "x$with_build_number" != x; then
10936   JDK_BUILD_NUMBER="$with_build_number"
10937 fi
10938 if test "x$JDK_BUILD_NUMBER" = x; then
10939   JDK_BUILD_NUMBER=b00
10940 fi
10941 
10942 
10943 # Check whether --with-user-release-suffix was given.
10944 if test "${with_user_release_suffix+set}" = set; then :
10945   withval=$with_user_release_suffix;
10946 fi
10947 
10948 if test "x$with_user_release_suffix" = xyes; then
10949   as_fn_error $? "Release suffix must have a value" "$LINENO" 5
10950 elif test "x$with_user_release_suffix" != x; then
10951   USER_RELEASE_SUFFIX="$with_user_release_suffix"
10952 else
10953   BUILD_DATE=`date '+%Y_%m_%d_%H_%M'`
10954   # Avoid [:alnum:] since it depends on the locale.
10955   CLEAN_USERNAME=`echo "$USER" | $TR -d -c 'abcdefghijklmnopqrstuvqxyz0123456789'`
10956   USER_RELEASE_SUFFIX=`echo "${CLEAN_USERNAME}_${BUILD_DATE}" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
10957 fi
10958 
10959 
10960 # Now set the JDK version, milestone, build number etc.
10961 
10962 
10963 
10964 
10965 
10966 
10967 
10968 
10969 
10970 
10971 
10972 
10973 
10974 
10975 COPYRIGHT_YEAR=`date +'%Y'`
10976 
10977 
10978 if test "x$JDK_UPDATE_VERSION" != x; then
10979   JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}_${JDK_UPDATE_VERSION}"
10980 else
10981   JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}"
10982 fi
10983 
10984 
10985 COOKED_BUILD_NUMBER=`$ECHO $JDK_BUILD_NUMBER | $SED -e 's/^b//' -e 's/^0//'`
10986 
10987 
10988 
10989 ###############################################################################
10990 #
10991 # Setup BootJDK, used to bootstrap the build.
10992 #
10993 ###############################################################################
10994 
10995 
10996 BOOT_JDK_FOUND=no
10997 
10998 # Check whether --with-boot-jdk was given.
10999 if test "${with_boot_jdk+set}" = set; then :
11000   withval=$with_boot_jdk;
11001 fi
11002 
11003 
11004 # We look for the Boot JDK through various means, going from more certain to
11005 # more of a guess-work. After each test, BOOT_JDK_FOUND is set to "yes" if
11006 # we detected something (if so, the path to the jdk is in BOOT_JDK). But we
11007 # must check if this is indeed valid; otherwise we'll continue looking.
11008 
11009 # Test: Is bootjdk explicitely set by command line arguments?
11010 
11011   if test "x$BOOT_JDK_FOUND" = xno; then
11012     # Now execute the test
11013 
11014 if test "x$with_boot_jdk" != x; then
11015     BOOT_JDK=$with_boot_jdk
11016     BOOT_JDK_FOUND=maybe
11017     { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using configure arguments" >&5
11018 $as_echo "$as_me: Found potential Boot JDK using configure arguments" >&6;}
11019 fi
11020 
11021 
11022     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
11023     if test "x$BOOT_JDK_FOUND" = xmaybe; then
11024       # Do we have a bin/java?
11025       if test ! -x "$BOOT_JDK/bin/java"; then
11026         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
11027 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
11028         BOOT_JDK_FOUND=no
11029       else
11030         # Do we have a bin/javac?
11031         if test ! -x "$BOOT_JDK/bin/javac"; then
11032           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
11033 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
11034           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
11035 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
11036           BOOT_JDK_FOUND=no
11037         else
11038           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
11039           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
11040             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
11041 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
11042             BOOT_JDK_FOUND=no
11043           else
11044             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
11045             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
11046 
11047             # Extra M4 quote needed to protect [] in grep expression.
11048             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
11049             if test "x$FOUND_VERSION_78" = x; then
11050               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
11051 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
11052               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
11053 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
11054               BOOT_JDK_FOUND=no
11055             else
11056               # We're done! :-)
11057               BOOT_JDK_FOUND=yes
11058 
11059   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11060 
11061   # Input might be given as Windows format, start by converting to
11062   # unix format.
11063   path="$BOOT_JDK"
11064   new_path=`$CYGPATH -u "$path"`
11065 
11066   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
11067   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
11068   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
11069   # "foo.exe" is OK but "foo" is an error.
11070   #
11071   # This test is therefore slightly more accurate than "test -f" to check for file precense.
11072   # It is also a way to make sure we got the proper file name for the real test later on.
11073   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
11074   if test "x$test_shortpath" = x; then
11075     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11076 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11077     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
11078   fi
11079 
11080   # Call helper function which possibly converts this using DOS-style short mode.
11081   # If so, the updated path is stored in $new_path.
11082 
11083   input_path="$new_path"
11084   # Check if we need to convert this using DOS-style short mode. If the path
11085   # contains just simple characters, use it. Otherwise (spaces, weird characters),
11086   # take no chances and rewrite it.
11087   # Note: m4 eats our [], so we need to use [ and ] instead.
11088   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
11089   if test "x$has_forbidden_chars" != x; then
11090     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11091     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
11092     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
11093     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
11094       # Going to short mode and back again did indeed matter. Since short mode is
11095       # case insensitive, let's make it lowercase to improve readability.
11096       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11097       # Now convert it back to Unix-stile (cygpath)
11098       input_path=`$CYGPATH -u "$shortmode_path"`
11099       new_path="$input_path"
11100     fi
11101   fi
11102 
11103   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
11104   if test "x$test_cygdrive_prefix" = x; then
11105     # As a simple fix, exclude /usr/bin since it's not a real path.
11106     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
11107       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
11108       # a path prefixed by /cygdrive for fixpath to work.
11109       new_path="$CYGWIN_ROOT_PATH$input_path"
11110     fi
11111   fi
11112 
11113 
11114   if test "x$path" != "x$new_path"; then
11115     BOOT_JDK="$new_path"
11116     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11117 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11118   fi
11119 
11120   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11121 
11122   path="$BOOT_JDK"
11123   has_colon=`$ECHO $path | $GREP ^.:`
11124   new_path="$path"
11125   if test "x$has_colon" = x; then
11126     # Not in mixed or Windows style, start by that.
11127     new_path=`cmd //c echo $path`
11128   fi
11129 
11130 
11131   input_path="$new_path"
11132   # Check if we need to convert this using DOS-style short mode. If the path
11133   # contains just simple characters, use it. Otherwise (spaces, weird characters),
11134   # take no chances and rewrite it.
11135   # Note: m4 eats our [], so we need to use [ and ] instead.
11136   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
11137   if test "x$has_forbidden_chars" != x; then
11138     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11139     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11140   fi
11141 
11142 
11143   windows_path="$new_path"
11144   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11145     unix_path=`$CYGPATH -u "$windows_path"`
11146     new_path="$unix_path"
11147   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11148     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11149     new_path="$unix_path"
11150   fi
11151 
11152   if test "x$path" != "x$new_path"; then
11153     BOOT_JDK="$new_path"
11154     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11155 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11156   fi
11157 
11158   # Save the first 10 bytes of this path to the storage, so fixpath can work.
11159   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
11160 
11161   else
11162     # We're on a posix platform. Hooray! :)
11163     path="$BOOT_JDK"
11164 
11165     if test ! -f "$path" && test ! -d "$path"; then
11166       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
11167     fi
11168 
11169     has_space=`$ECHO "$path" | $GREP " "`
11170     if test "x$has_space" != x; then
11171       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11172 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11173       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
11174     fi
11175   fi
11176 
11177               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
11178 $as_echo_n "checking for Boot JDK... " >&6; }
11179               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
11180 $as_echo "$BOOT_JDK" >&6; }
11181               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
11182 $as_echo_n "checking Boot JDK version... " >&6; }
11183               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
11184               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
11185 $as_echo "$BOOT_JDK_VERSION" >&6; }
11186             fi # end check jdk version
11187           fi # end check rt.jar
11188         fi # end check javac
11189       fi # end check java
11190     fi # end check boot jdk found
11191   fi
11192 
11193 if test "x$with_boot_jdk" != x && test "x$BOOT_JDK_FOUND" = xno; then
11194   # Having specified an argument which is incorrect will produce an instant failure;
11195   # we should not go on looking
11196   as_fn_error $? "The path given by --with-boot-jdk does not contain a valid Boot JDK" "$LINENO" 5
11197 fi
11198 
11199 # Test: Is bootjdk available from builddeps?
11200 
11201   if test "x$BOOT_JDK_FOUND" = xno; then
11202     # Now execute the test
11203 
11204 
11205 
11206     if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
11207         # Source the builddeps file again, to make sure it uses the latest variables!
11208         . $builddepsfile
11209         # Look for a target and build machine specific resource!
11210         eval resource=\${builddep_bootjdk_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
11211         if test "x$resource" = x; then
11212             # Ok, lets instead look for a target specific resource
11213             eval resource=\${builddep_bootjdk_TARGET_${rewritten_target_var}}
11214         fi
11215         if test "x$resource" = x; then
11216             # Ok, lets instead look for a build specific resource
11217             eval resource=\${builddep_bootjdk_BUILD_${rewritten_build_var}}
11218         fi
11219         if test "x$resource" = x; then
11220             # Ok, lets instead look for a generic resource
11221             # (The bootjdk comes from M4 and not the shell, thus no need for eval here.)
11222             resource=${builddep_bootjdk}
11223         fi
11224         if test "x$resource" != x; then
11225             { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for bootjdk" >&5
11226 $as_echo "$as_me: Using builddeps $resource for bootjdk" >&6;}
11227             # If the resource in the builddeps.conf file is an existing directory,
11228             # for example /java/linux/cups
11229             if test -d ${resource}; then
11230                depdir=${resource}
11231             else
11232 
11233 # bootjdk is for example mymodule
11234 # $resource is for example libs/general/libmymod_1_2_3.zip
11235 # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
11236 # $with_builddeps_dir is for example /localhome/builddeps
11237 # depdir is the name of the variable into which we store the depdir, eg MYMOD
11238 # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
11239 # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
11240     filename=`basename $resource`
11241     filebase=`echo $filename | sed 's/\.[^\.]*$//'`
11242     filebase=${filename%%.*}
11243     extension=${filename#*.}
11244     installdir=$with_builddeps_dir/$filebase
11245     if test ! -f $installdir/$filename.unpacked; then
11246         { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency bootjdk from $with_builddeps_server/$resource and installing into $installdir" >&5
11247 $as_echo "$as_me: Downloading build dependency bootjdk from $with_builddeps_server/$resource and installing into $installdir" >&6;}
11248         if test ! -d $installdir; then
11249             mkdir -p $installdir
11250         fi
11251         if test ! -d $installdir; then
11252             as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
11253         fi
11254         tmpfile=`mktemp $installdir/bootjdk.XXXXXXXXX`
11255         touch $tmpfile
11256         if test ! -f $tmpfile; then
11257             as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
11258         fi
11259 
11260     # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
11261     # $tmpfile is the local file name for the downloaded file.
11262     VALID_TOOL=no
11263     if test "x$BDEPS_FTP" = xwget; then
11264        VALID_TOOL=yes
11265        wget -O $tmpfile $with_builddeps_server/$resource
11266     fi
11267     if test "x$BDEPS_FTP" = xlftp; then
11268        VALID_TOOL=yes
11269        lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
11270     fi
11271     if test "x$BDEPS_FTP" = xftp; then
11272         VALID_TOOL=yes
11273         FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
11274         FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
11275         FTPUSERPWD=${FTPSERVER%%@*}
11276         if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
11277             FTPUSER=${userpwd%%:*}
11278             FTPPWD=${userpwd#*@}
11279             FTPSERVER=${FTPSERVER#*@}
11280         else
11281             FTPUSER=ftp
11282             FTPPWD=ftp
11283         fi
11284         # the "pass" command does not work on some
11285         # ftp clients (read ftp.exe) but if it works,
11286         # passive mode is better!
11287         (\
11288             echo "user $FTPUSER $FTPPWD"        ;\
11289             echo "pass"                         ;\
11290             echo "bin"                          ;\
11291             echo "get $FTPPATH $tmpfile"              ;\
11292         ) | ftp -in $FTPSERVER
11293     fi
11294     if test "x$VALID_TOOL" != xyes; then
11295        as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
11296     fi
11297 
11298         mv $tmpfile $installdir/$filename
11299         if test ! -s $installdir/$filename; then
11300             as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
11301         fi
11302         case "$extension" in
11303             zip)  echo "Unzipping $installdir/$filename..."
11304                (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
11305             ;;
11306             tar.gz) echo "Untaring $installdir/$filename..."
11307                (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
11308             ;;
11309             tgz) echo "Untaring $installdir/$filename..."
11310                (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
11311             ;;
11312             *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
11313             ;;
11314         esac
11315     fi
11316     if test -f $installdir/$filename.unpacked; then
11317         depdir=$installdir
11318     fi
11319 
11320             fi
11321             # Source the builddeps file again, because in the previous command, the depdir
11322             # was updated to point at the current build dependency install directory.
11323             . $builddepsfile
11324             # Now extract variables from the builddeps.conf files.
11325             theroot=${builddep_bootjdk_ROOT}
11326             thecflags=${builddep_bootjdk_CFLAGS}
11327             thelibs=${builddep_bootjdk_LIBS}
11328             if test "x$depdir" = x; then
11329                 as_fn_error $? "Could not download build dependency bootjdk" "$LINENO" 5
11330             fi
11331             BOOT_JDK=$depdir
11332             if test "x$theroot" != x; then
11333                BOOT_JDK="$theroot"
11334             fi
11335             if test "x$thecflags" != x; then
11336                BOOT_JDK_CFLAGS="$thecflags"
11337             fi
11338             if test "x$thelibs" != x; then
11339                BOOT_JDK_LIBS="$thelibs"
11340             fi
11341             BOOT_JDK_FOUND=maybe
11342             else BOOT_JDK_FOUND=no
11343 
11344         fi
11345         else BOOT_JDK_FOUND=no
11346 
11347     fi
11348 
11349 
11350 
11351     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
11352     if test "x$BOOT_JDK_FOUND" = xmaybe; then
11353       # Do we have a bin/java?
11354       if test ! -x "$BOOT_JDK/bin/java"; then
11355         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
11356 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
11357         BOOT_JDK_FOUND=no
11358       else
11359         # Do we have a bin/javac?
11360         if test ! -x "$BOOT_JDK/bin/javac"; then
11361           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
11362 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
11363           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
11364 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
11365           BOOT_JDK_FOUND=no
11366         else
11367           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
11368           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
11369             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
11370 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
11371             BOOT_JDK_FOUND=no
11372           else
11373             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
11374             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
11375 
11376             # Extra M4 quote needed to protect [] in grep expression.
11377             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
11378             if test "x$FOUND_VERSION_78" = x; then
11379               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
11380 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
11381               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
11382 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
11383               BOOT_JDK_FOUND=no
11384             else
11385               # We're done! :-)
11386               BOOT_JDK_FOUND=yes
11387 
11388   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11389 
11390   # Input might be given as Windows format, start by converting to
11391   # unix format.
11392   path="$BOOT_JDK"
11393   new_path=`$CYGPATH -u "$path"`
11394 
11395   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
11396   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
11397   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
11398   # "foo.exe" is OK but "foo" is an error.
11399   #
11400   # This test is therefore slightly more accurate than "test -f" to check for file precense.
11401   # It is also a way to make sure we got the proper file name for the real test later on.
11402   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
11403   if test "x$test_shortpath" = x; then
11404     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11405 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11406     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
11407   fi
11408 
11409   # Call helper function which possibly converts this using DOS-style short mode.
11410   # If so, the updated path is stored in $new_path.
11411 
11412   input_path="$new_path"
11413   # Check if we need to convert this using DOS-style short mode. If the path
11414   # contains just simple characters, use it. Otherwise (spaces, weird characters),
11415   # take no chances and rewrite it.
11416   # Note: m4 eats our [], so we need to use [ and ] instead.
11417   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
11418   if test "x$has_forbidden_chars" != x; then
11419     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11420     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
11421     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
11422     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
11423       # Going to short mode and back again did indeed matter. Since short mode is
11424       # case insensitive, let's make it lowercase to improve readability.
11425       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11426       # Now convert it back to Unix-stile (cygpath)
11427       input_path=`$CYGPATH -u "$shortmode_path"`
11428       new_path="$input_path"
11429     fi
11430   fi
11431 
11432   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
11433   if test "x$test_cygdrive_prefix" = x; then
11434     # As a simple fix, exclude /usr/bin since it's not a real path.
11435     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
11436       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
11437       # a path prefixed by /cygdrive for fixpath to work.
11438       new_path="$CYGWIN_ROOT_PATH$input_path"
11439     fi
11440   fi
11441 
11442 
11443   if test "x$path" != "x$new_path"; then
11444     BOOT_JDK="$new_path"
11445     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11446 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11447   fi
11448 
11449   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11450 
11451   path="$BOOT_JDK"
11452   has_colon=`$ECHO $path | $GREP ^.:`
11453   new_path="$path"
11454   if test "x$has_colon" = x; then
11455     # Not in mixed or Windows style, start by that.
11456     new_path=`cmd //c echo $path`
11457   fi
11458 
11459 
11460   input_path="$new_path"
11461   # Check if we need to convert this using DOS-style short mode. If the path
11462   # contains just simple characters, use it. Otherwise (spaces, weird characters),
11463   # take no chances and rewrite it.
11464   # Note: m4 eats our [], so we need to use [ and ] instead.
11465   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
11466   if test "x$has_forbidden_chars" != x; then
11467     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11468     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11469   fi
11470 
11471 
11472   windows_path="$new_path"
11473   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11474     unix_path=`$CYGPATH -u "$windows_path"`
11475     new_path="$unix_path"
11476   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11477     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11478     new_path="$unix_path"
11479   fi
11480 
11481   if test "x$path" != "x$new_path"; then
11482     BOOT_JDK="$new_path"
11483     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11484 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11485   fi
11486 
11487   # Save the first 10 bytes of this path to the storage, so fixpath can work.
11488   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
11489 
11490   else
11491     # We're on a posix platform. Hooray! :)
11492     path="$BOOT_JDK"
11493 
11494     if test ! -f "$path" && test ! -d "$path"; then
11495       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
11496     fi
11497 
11498     has_space=`$ECHO "$path" | $GREP " "`
11499     if test "x$has_space" != x; then
11500       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11501 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11502       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
11503     fi
11504   fi
11505 
11506               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
11507 $as_echo_n "checking for Boot JDK... " >&6; }
11508               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
11509 $as_echo "$BOOT_JDK" >&6; }
11510               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
11511 $as_echo_n "checking Boot JDK version... " >&6; }
11512               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
11513               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
11514 $as_echo "$BOOT_JDK_VERSION" >&6; }
11515             fi # end check jdk version
11516           fi # end check rt.jar
11517         fi # end check javac
11518       fi # end check java
11519     fi # end check boot jdk found
11520   fi
11521 
11522 
11523 # Test: Is $JAVA_HOME set?
11524 
11525   if test "x$BOOT_JDK_FOUND" = xno; then
11526     # Now execute the test
11527 
11528     if test "x$JAVA_HOME" != x; then
11529         JAVA_HOME_PROCESSED="$JAVA_HOME"
11530 
11531   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11532 
11533   # Input might be given as Windows format, start by converting to
11534   # unix format.
11535   path="$JAVA_HOME_PROCESSED"
11536   new_path=`$CYGPATH -u "$path"`
11537 
11538   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
11539   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
11540   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
11541   # "foo.exe" is OK but "foo" is an error.
11542   #
11543   # This test is therefore slightly more accurate than "test -f" to check for file precense.
11544   # It is also a way to make sure we got the proper file name for the real test later on.
11545   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
11546   if test "x$test_shortpath" = x; then
11547     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
11548 $as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
11549     as_fn_error $? "Cannot locate the the path of JAVA_HOME_PROCESSED" "$LINENO" 5
11550   fi
11551 
11552   # Call helper function which possibly converts this using DOS-style short mode.
11553   # If so, the updated path is stored in $new_path.
11554 
11555   input_path="$new_path"
11556   # Check if we need to convert this using DOS-style short mode. If the path
11557   # contains just simple characters, use it. Otherwise (spaces, weird characters),
11558   # take no chances and rewrite it.
11559   # Note: m4 eats our [], so we need to use [ and ] instead.
11560   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
11561   if test "x$has_forbidden_chars" != x; then
11562     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11563     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
11564     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
11565     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
11566       # Going to short mode and back again did indeed matter. Since short mode is
11567       # case insensitive, let's make it lowercase to improve readability.
11568       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11569       # Now convert it back to Unix-stile (cygpath)
11570       input_path=`$CYGPATH -u "$shortmode_path"`
11571       new_path="$input_path"
11572     fi
11573   fi
11574 
11575   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
11576   if test "x$test_cygdrive_prefix" = x; then
11577     # As a simple fix, exclude /usr/bin since it's not a real path.
11578     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
11579       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
11580       # a path prefixed by /cygdrive for fixpath to work.
11581       new_path="$CYGWIN_ROOT_PATH$input_path"
11582     fi
11583   fi
11584 
11585 
11586   if test "x$path" != "x$new_path"; then
11587     JAVA_HOME_PROCESSED="$new_path"
11588     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
11589 $as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
11590   fi
11591 
11592   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11593 
11594   path="$JAVA_HOME_PROCESSED"
11595   has_colon=`$ECHO $path | $GREP ^.:`
11596   new_path="$path"
11597   if test "x$has_colon" = x; then
11598     # Not in mixed or Windows style, start by that.
11599     new_path=`cmd //c echo $path`
11600   fi
11601 
11602 
11603   input_path="$new_path"
11604   # Check if we need to convert this using DOS-style short mode. If the path
11605   # contains just simple characters, use it. Otherwise (spaces, weird characters),
11606   # take no chances and rewrite it.
11607   # Note: m4 eats our [], so we need to use [ and ] instead.
11608   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
11609   if test "x$has_forbidden_chars" != x; then
11610     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11611     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11612   fi
11613 
11614 
11615   windows_path="$new_path"
11616   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11617     unix_path=`$CYGPATH -u "$windows_path"`
11618     new_path="$unix_path"
11619   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11620     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11621     new_path="$unix_path"
11622   fi
11623 
11624   if test "x$path" != "x$new_path"; then
11625     JAVA_HOME_PROCESSED="$new_path"
11626     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
11627 $as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
11628   fi
11629 
11630   # Save the first 10 bytes of this path to the storage, so fixpath can work.
11631   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
11632 
11633   else
11634     # We're on a posix platform. Hooray! :)
11635     path="$JAVA_HOME_PROCESSED"
11636 
11637     if test ! -f "$path" && test ! -d "$path"; then
11638       as_fn_error $? "The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is not found." "$LINENO" 5
11639     fi
11640 
11641     has_space=`$ECHO "$path" | $GREP " "`
11642     if test "x$has_space" != x; then
11643       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
11644 $as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
11645       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
11646     fi
11647   fi
11648 
11649         if test ! -d "$JAVA_HOME_PROCESSED"; then
11650             { $as_echo "$as_me:${as_lineno-$LINENO}: Your JAVA_HOME points to a non-existing directory!" >&5
11651 $as_echo "$as_me: Your JAVA_HOME points to a non-existing directory!" >&6;}
11652         else
11653           # Aha, the user has set a JAVA_HOME
11654           # let us use that as the Boot JDK.
11655           BOOT_JDK="$JAVA_HOME_PROCESSED"
11656           BOOT_JDK_FOUND=maybe
11657           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using JAVA_HOME" >&5
11658 $as_echo "$as_me: Found potential Boot JDK using JAVA_HOME" >&6;}
11659         fi
11660     fi
11661 
11662 
11663     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
11664     if test "x$BOOT_JDK_FOUND" = xmaybe; then
11665       # Do we have a bin/java?
11666       if test ! -x "$BOOT_JDK/bin/java"; then
11667         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
11668 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
11669         BOOT_JDK_FOUND=no
11670       else
11671         # Do we have a bin/javac?
11672         if test ! -x "$BOOT_JDK/bin/javac"; then
11673           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
11674 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
11675           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
11676 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
11677           BOOT_JDK_FOUND=no
11678         else
11679           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
11680           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
11681             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
11682 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
11683             BOOT_JDK_FOUND=no
11684           else
11685             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
11686             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
11687 
11688             # Extra M4 quote needed to protect [] in grep expression.
11689             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
11690             if test "x$FOUND_VERSION_78" = x; then
11691               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
11692 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
11693               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
11694 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
11695               BOOT_JDK_FOUND=no
11696             else
11697               # We're done! :-)
11698               BOOT_JDK_FOUND=yes
11699 
11700   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11701 
11702   # Input might be given as Windows format, start by converting to
11703   # unix format.
11704   path="$BOOT_JDK"
11705   new_path=`$CYGPATH -u "$path"`
11706 
11707   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
11708   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
11709   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
11710   # "foo.exe" is OK but "foo" is an error.
11711   #
11712   # This test is therefore slightly more accurate than "test -f" to check for file precense.
11713   # It is also a way to make sure we got the proper file name for the real test later on.
11714   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
11715   if test "x$test_shortpath" = x; then
11716     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11717 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11718     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
11719   fi
11720 
11721   # Call helper function which possibly converts this using DOS-style short mode.
11722   # If so, the updated path is stored in $new_path.
11723 
11724   input_path="$new_path"
11725   # Check if we need to convert this using DOS-style short mode. If the path
11726   # contains just simple characters, use it. Otherwise (spaces, weird characters),
11727   # take no chances and rewrite it.
11728   # Note: m4 eats our [], so we need to use [ and ] instead.
11729   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
11730   if test "x$has_forbidden_chars" != x; then
11731     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11732     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
11733     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
11734     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
11735       # Going to short mode and back again did indeed matter. Since short mode is
11736       # case insensitive, let's make it lowercase to improve readability.
11737       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11738       # Now convert it back to Unix-stile (cygpath)
11739       input_path=`$CYGPATH -u "$shortmode_path"`
11740       new_path="$input_path"
11741     fi
11742   fi
11743 
11744   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
11745   if test "x$test_cygdrive_prefix" = x; then
11746     # As a simple fix, exclude /usr/bin since it's not a real path.
11747     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
11748       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
11749       # a path prefixed by /cygdrive for fixpath to work.
11750       new_path="$CYGWIN_ROOT_PATH$input_path"
11751     fi
11752   fi
11753 
11754 
11755   if test "x$path" != "x$new_path"; then
11756     BOOT_JDK="$new_path"
11757     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11758 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11759   fi
11760 
11761   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11762 
11763   path="$BOOT_JDK"
11764   has_colon=`$ECHO $path | $GREP ^.:`
11765   new_path="$path"
11766   if test "x$has_colon" = x; then
11767     # Not in mixed or Windows style, start by that.
11768     new_path=`cmd //c echo $path`
11769   fi
11770 
11771 
11772   input_path="$new_path"
11773   # Check if we need to convert this using DOS-style short mode. If the path
11774   # contains just simple characters, use it. Otherwise (spaces, weird characters),
11775   # take no chances and rewrite it.
11776   # Note: m4 eats our [], so we need to use [ and ] instead.
11777   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
11778   if test "x$has_forbidden_chars" != x; then
11779     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11780     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11781   fi
11782 
11783 
11784   windows_path="$new_path"
11785   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11786     unix_path=`$CYGPATH -u "$windows_path"`
11787     new_path="$unix_path"
11788   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11789     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11790     new_path="$unix_path"
11791   fi
11792 
11793   if test "x$path" != "x$new_path"; then
11794     BOOT_JDK="$new_path"
11795     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11796 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11797   fi
11798 
11799   # Save the first 10 bytes of this path to the storage, so fixpath can work.
11800   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
11801 
11802   else
11803     # We're on a posix platform. Hooray! :)
11804     path="$BOOT_JDK"
11805 
11806     if test ! -f "$path" && test ! -d "$path"; then
11807       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
11808     fi
11809 
11810     has_space=`$ECHO "$path" | $GREP " "`
11811     if test "x$has_space" != x; then
11812       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11813 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11814       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
11815     fi
11816   fi
11817 
11818               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
11819 $as_echo_n "checking for Boot JDK... " >&6; }
11820               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
11821 $as_echo "$BOOT_JDK" >&6; }
11822               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
11823 $as_echo_n "checking Boot JDK version... " >&6; }
11824               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
11825               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
11826 $as_echo "$BOOT_JDK_VERSION" >&6; }
11827             fi # end check jdk version
11828           fi # end check rt.jar
11829         fi # end check javac
11830       fi # end check java
11831     fi # end check boot jdk found
11832   fi
11833 
11834 
11835 # Test: Is there a /usr/libexec/java_home? (Typically on MacOSX)
11836 
11837   if test "x$BOOT_JDK_FOUND" = xno; then
11838     # Now execute the test
11839 
11840     if test -x /usr/libexec/java_home; then
11841         BOOT_JDK=`/usr/libexec/java_home`
11842         BOOT_JDK_FOUND=maybe
11843         { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home" >&5
11844 $as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home" >&6;}
11845     fi
11846 
11847 
11848     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
11849     if test "x$BOOT_JDK_FOUND" = xmaybe; then
11850       # Do we have a bin/java?
11851       if test ! -x "$BOOT_JDK/bin/java"; then
11852         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
11853 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
11854         BOOT_JDK_FOUND=no
11855       else
11856         # Do we have a bin/javac?
11857         if test ! -x "$BOOT_JDK/bin/javac"; then
11858           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
11859 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
11860           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
11861 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
11862           BOOT_JDK_FOUND=no
11863         else
11864           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
11865           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
11866             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
11867 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
11868             BOOT_JDK_FOUND=no
11869           else
11870             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
11871             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
11872 
11873             # Extra M4 quote needed to protect [] in grep expression.
11874             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
11875             if test "x$FOUND_VERSION_78" = x; then
11876               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
11877 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
11878               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
11879 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
11880               BOOT_JDK_FOUND=no
11881             else
11882               # We're done! :-)
11883               BOOT_JDK_FOUND=yes
11884 
11885   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11886 
11887   # Input might be given as Windows format, start by converting to
11888   # unix format.
11889   path="$BOOT_JDK"
11890   new_path=`$CYGPATH -u "$path"`
11891 
11892   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
11893   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
11894   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
11895   # "foo.exe" is OK but "foo" is an error.
11896   #
11897   # This test is therefore slightly more accurate than "test -f" to check for file precense.
11898   # It is also a way to make sure we got the proper file name for the real test later on.
11899   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
11900   if test "x$test_shortpath" = x; then
11901     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11902 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11903     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
11904   fi
11905 
11906   # Call helper function which possibly converts this using DOS-style short mode.
11907   # If so, the updated path is stored in $new_path.
11908 
11909   input_path="$new_path"
11910   # Check if we need to convert this using DOS-style short mode. If the path
11911   # contains just simple characters, use it. Otherwise (spaces, weird characters),
11912   # take no chances and rewrite it.
11913   # Note: m4 eats our [], so we need to use [ and ] instead.
11914   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
11915   if test "x$has_forbidden_chars" != x; then
11916     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11917     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
11918     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
11919     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
11920       # Going to short mode and back again did indeed matter. Since short mode is
11921       # case insensitive, let's make it lowercase to improve readability.
11922       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11923       # Now convert it back to Unix-stile (cygpath)
11924       input_path=`$CYGPATH -u "$shortmode_path"`
11925       new_path="$input_path"
11926     fi
11927   fi
11928 
11929   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
11930   if test "x$test_cygdrive_prefix" = x; then
11931     # As a simple fix, exclude /usr/bin since it's not a real path.
11932     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
11933       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
11934       # a path prefixed by /cygdrive for fixpath to work.
11935       new_path="$CYGWIN_ROOT_PATH$input_path"
11936     fi
11937   fi
11938 
11939 
11940   if test "x$path" != "x$new_path"; then
11941     BOOT_JDK="$new_path"
11942     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11943 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11944   fi
11945 
11946   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11947 
11948   path="$BOOT_JDK"
11949   has_colon=`$ECHO $path | $GREP ^.:`
11950   new_path="$path"
11951   if test "x$has_colon" = x; then
11952     # Not in mixed or Windows style, start by that.
11953     new_path=`cmd //c echo $path`
11954   fi
11955 
11956 
11957   input_path="$new_path"
11958   # Check if we need to convert this using DOS-style short mode. If the path
11959   # contains just simple characters, use it. Otherwise (spaces, weird characters),
11960   # take no chances and rewrite it.
11961   # Note: m4 eats our [], so we need to use [ and ] instead.
11962   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
11963   if test "x$has_forbidden_chars" != x; then
11964     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11965     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11966   fi
11967 
11968 
11969   windows_path="$new_path"
11970   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11971     unix_path=`$CYGPATH -u "$windows_path"`
11972     new_path="$unix_path"
11973   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11974     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11975     new_path="$unix_path"
11976   fi
11977 
11978   if test "x$path" != "x$new_path"; then
11979     BOOT_JDK="$new_path"
11980     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11981 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11982   fi
11983 
11984   # Save the first 10 bytes of this path to the storage, so fixpath can work.
11985   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
11986 
11987   else
11988     # We're on a posix platform. Hooray! :)
11989     path="$BOOT_JDK"
11990 
11991     if test ! -f "$path" && test ! -d "$path"; then
11992       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
11993     fi
11994 
11995     has_space=`$ECHO "$path" | $GREP " "`
11996     if test "x$has_space" != x; then
11997       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11998 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11999       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
12000     fi
12001   fi
12002 
12003               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12004 $as_echo_n "checking for Boot JDK... " >&6; }
12005               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12006 $as_echo "$BOOT_JDK" >&6; }
12007               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12008 $as_echo_n "checking Boot JDK version... " >&6; }
12009               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12010               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12011 $as_echo "$BOOT_JDK_VERSION" >&6; }
12012             fi # end check jdk version
12013           fi # end check rt.jar
12014         fi # end check javac
12015       fi # end check java
12016     fi # end check boot jdk found
12017   fi
12018 
12019 
12020 # Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
12021 
12022   if test "x$BOOT_JDK_FOUND" = xno; then
12023     # Now execute the test
12024 
12025     # Extract the first word of "javac", so it can be a program name with args.
12026 set dummy javac; ac_word=$2
12027 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12028 $as_echo_n "checking for $ac_word... " >&6; }
12029 if test "${ac_cv_path_JAVAC_CHECK+set}" = set; then :
12030   $as_echo_n "(cached) " >&6
12031 else
12032   case $JAVAC_CHECK in
12033   [\\/]* | ?:[\\/]*)
12034   ac_cv_path_JAVAC_CHECK="$JAVAC_CHECK" # Let the user override the test with a path.
12035   ;;
12036   *)
12037   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12038 for as_dir in $PATH
12039 do
12040   IFS=$as_save_IFS
12041   test -z "$as_dir" && as_dir=.
12042     for ac_exec_ext in '' $ac_executable_extensions; do
12043   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
12044     ac_cv_path_JAVAC_CHECK="$as_dir/$ac_word$ac_exec_ext"
12045     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12046     break 2
12047   fi
12048 done
12049   done
12050 IFS=$as_save_IFS
12051 
12052   ;;
12053 esac
12054 fi
12055 JAVAC_CHECK=$ac_cv_path_JAVAC_CHECK
12056 if test -n "$JAVAC_CHECK"; then
12057   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC_CHECK" >&5
12058 $as_echo "$JAVAC_CHECK" >&6; }
12059 else
12060   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12061 $as_echo "no" >&6; }
12062 fi
12063 
12064 
12065     # Extract the first word of "java", so it can be a program name with args.
12066 set dummy java; ac_word=$2
12067 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12068 $as_echo_n "checking for $ac_word... " >&6; }
12069 if test "${ac_cv_path_JAVA_CHECK+set}" = set; then :
12070   $as_echo_n "(cached) " >&6
12071 else
12072   case $JAVA_CHECK in
12073   [\\/]* | ?:[\\/]*)
12074   ac_cv_path_JAVA_CHECK="$JAVA_CHECK" # Let the user override the test with a path.
12075   ;;
12076   *)
12077   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12078 for as_dir in $PATH
12079 do
12080   IFS=$as_save_IFS
12081   test -z "$as_dir" && as_dir=.
12082     for ac_exec_ext in '' $ac_executable_extensions; do
12083   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
12084     ac_cv_path_JAVA_CHECK="$as_dir/$ac_word$ac_exec_ext"
12085     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12086     break 2
12087   fi
12088 done
12089   done
12090 IFS=$as_save_IFS
12091 
12092   ;;
12093 esac
12094 fi
12095 JAVA_CHECK=$ac_cv_path_JAVA_CHECK
12096 if test -n "$JAVA_CHECK"; then
12097   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA_CHECK" >&5
12098 $as_echo "$JAVA_CHECK" >&6; }
12099 else
12100   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12101 $as_echo "no" >&6; }
12102 fi
12103 
12104 
12105     BINARY="$JAVAC_CHECK"
12106     if test "x$JAVAC_CHECK" = x; then
12107         BINARY="$JAVA_CHECK"
12108     fi
12109     if test "x$BINARY" != x; then
12110         # So there is a java(c) binary, it might be part of a JDK.
12111         # Lets find the JDK/JRE directory by following symbolic links.
12112         # Linux/GNU systems often have links from /usr/bin/java to
12113         # /etc/alternatives/java to the real JDK binary.
12114 
12115     if test "x$OPENJDK_BUILD_OS" != xwindows; then
12116         # Follow a chain of symbolic links. Use readlink
12117         # where it exists, else fall back to horribly
12118         # complicated shell code.
12119         if test "x$READLINK_TESTED" != yes; then
12120             # On MacOSX there is a readlink tool with a different
12121             # purpose than the GNU readlink tool. Check the found readlink.
12122             ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
12123             if test "x$ISGNU" = x; then
12124                  # A readlink that we do not know how to use.
12125                  # Are there other non-GNU readlinks out there?
12126                  READLINK_TESTED=yes
12127                  READLINK=
12128             fi
12129         fi
12130 
12131         if test "x$READLINK" != x; then
12132             BINARY=`$READLINK -f $BINARY`
12133         else
12134             # Save the current directory for restoring afterwards
12135             STARTDIR=$PWD
12136             COUNTER=0
12137             sym_link_dir=`$DIRNAME $BINARY`
12138             sym_link_file=`$BASENAME $BINARY`
12139             # Use the system pwd and not the shell builtin to resolve directory symlinks
12140             cd $sym_link_dir
12141             cd `$THEPWDCMD`
12142             sym_link_dir=`$THEPWDCMD`
12143             # Resolve file symlinks
12144             while test $COUNTER -lt 20; do
12145                 ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
12146                 if test "x$ISLINK" == x; then
12147                     # This is not a symbolic link! We are done!
12148                     break
12149                 fi
12150                 # Again resolve directory symlinks since the target of the just found
12151                 # link could be in a different directory
12152                 cd `$DIRNAME $ISLINK`
12153                 sym_link_dir=`$THEPWDCMD`
12154                 sym_link_file=`$BASENAME $ISLINK`
12155                 let COUNTER=COUNTER+1
12156             done
12157             cd $STARTDIR
12158             BINARY=$sym_link_dir/$sym_link_file
12159         fi
12160     fi
12161 
12162         BOOT_JDK=`dirname "$BINARY"`
12163         BOOT_JDK=`cd "$BOOT_JDK/.."; pwd`
12164         if test -x "$BOOT_JDK/bin/javac" && test -x "$BOOT_JDK/bin/java"; then
12165             # Looks like we found ourselves an JDK
12166             BOOT_JDK_FOUND=maybe
12167             { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using java(c) in PATH" >&5
12168 $as_echo "$as_me: Found potential Boot JDK using java(c) in PATH" >&6;}
12169         fi
12170     fi
12171 
12172 
12173     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12174     if test "x$BOOT_JDK_FOUND" = xmaybe; then
12175       # Do we have a bin/java?
12176       if test ! -x "$BOOT_JDK/bin/java"; then
12177         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12178 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12179         BOOT_JDK_FOUND=no
12180       else
12181         # Do we have a bin/javac?
12182         if test ! -x "$BOOT_JDK/bin/javac"; then
12183           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12184 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12185           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12186 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12187           BOOT_JDK_FOUND=no
12188         else
12189           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12190           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12191             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12192 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12193             BOOT_JDK_FOUND=no
12194           else
12195             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12196             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12197 
12198             # Extra M4 quote needed to protect [] in grep expression.
12199             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12200             if test "x$FOUND_VERSION_78" = x; then
12201               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12202 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12203               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12204 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12205               BOOT_JDK_FOUND=no
12206             else
12207               # We're done! :-)
12208               BOOT_JDK_FOUND=yes
12209 
12210   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12211 
12212   # Input might be given as Windows format, start by converting to
12213   # unix format.
12214   path="$BOOT_JDK"
12215   new_path=`$CYGPATH -u "$path"`
12216 
12217   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12218   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12219   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12220   # "foo.exe" is OK but "foo" is an error.
12221   #
12222   # This test is therefore slightly more accurate than "test -f" to check for file precense.
12223   # It is also a way to make sure we got the proper file name for the real test later on.
12224   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12225   if test "x$test_shortpath" = x; then
12226     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12227 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12228     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12229   fi
12230 
12231   # Call helper function which possibly converts this using DOS-style short mode.
12232   # If so, the updated path is stored in $new_path.
12233 
12234   input_path="$new_path"
12235   # Check if we need to convert this using DOS-style short mode. If the path
12236   # contains just simple characters, use it. Otherwise (spaces, weird characters),
12237   # take no chances and rewrite it.
12238   # Note: m4 eats our [], so we need to use [ and ] instead.
12239   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12240   if test "x$has_forbidden_chars" != x; then
12241     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12242     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12243     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12244     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12245       # Going to short mode and back again did indeed matter. Since short mode is
12246       # case insensitive, let's make it lowercase to improve readability.
12247       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12248       # Now convert it back to Unix-stile (cygpath)
12249       input_path=`$CYGPATH -u "$shortmode_path"`
12250       new_path="$input_path"
12251     fi
12252   fi
12253 
12254   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12255   if test "x$test_cygdrive_prefix" = x; then
12256     # As a simple fix, exclude /usr/bin since it's not a real path.
12257     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12258       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12259       # a path prefixed by /cygdrive for fixpath to work.
12260       new_path="$CYGWIN_ROOT_PATH$input_path"
12261     fi
12262   fi
12263 
12264 
12265   if test "x$path" != "x$new_path"; then
12266     BOOT_JDK="$new_path"
12267     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12268 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12269   fi
12270 
12271   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12272 
12273   path="$BOOT_JDK"
12274   has_colon=`$ECHO $path | $GREP ^.:`
12275   new_path="$path"
12276   if test "x$has_colon" = x; then
12277     # Not in mixed or Windows style, start by that.
12278     new_path=`cmd //c echo $path`
12279   fi
12280 
12281 
12282   input_path="$new_path"
12283   # Check if we need to convert this using DOS-style short mode. If the path
12284   # contains just simple characters, use it. Otherwise (spaces, weird characters),
12285   # take no chances and rewrite it.
12286   # Note: m4 eats our [], so we need to use [ and ] instead.
12287   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12288   if test "x$has_forbidden_chars" != x; then
12289     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12290     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12291   fi
12292 
12293 
12294   windows_path="$new_path"
12295   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12296     unix_path=`$CYGPATH -u "$windows_path"`
12297     new_path="$unix_path"
12298   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12299     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12300     new_path="$unix_path"
12301   fi
12302 
12303   if test "x$path" != "x$new_path"; then
12304     BOOT_JDK="$new_path"
12305     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12306 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12307   fi
12308 
12309   # Save the first 10 bytes of this path to the storage, so fixpath can work.
12310   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12311 
12312   else
12313     # We're on a posix platform. Hooray! :)
12314     path="$BOOT_JDK"
12315 
12316     if test ! -f "$path" && test ! -d "$path"; then
12317       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
12318     fi
12319 
12320     has_space=`$ECHO "$path" | $GREP " "`
12321     if test "x$has_space" != x; then
12322       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12323 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12324       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
12325     fi
12326   fi
12327 
12328               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12329 $as_echo_n "checking for Boot JDK... " >&6; }
12330               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12331 $as_echo "$BOOT_JDK" >&6; }
12332               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12333 $as_echo_n "checking Boot JDK version... " >&6; }
12334               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12335               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12336 $as_echo "$BOOT_JDK_VERSION" >&6; }
12337             fi # end check jdk version
12338           fi # end check rt.jar
12339         fi # end check javac
12340       fi # end check java
12341     fi # end check boot jdk found
12342   fi
12343 
12344 
12345 # Test: Is there a JDK installed in default, well-known locations?
12346 
12347   if test "x$BOOT_JDK_FOUND" = xno; then
12348     # Now execute the test
12349 
12350   if test "x$OPENJDK_TARGET_OS" = xwindows; then
12351 
12352   if test "x$BOOT_JDK_FOUND" = xno; then
12353     # Now execute the test
12354 
12355   if test "x$ProgramW6432" != x; then
12356     VIRTUAL_DIR="$ProgramW6432/Java"
12357 
12358   windows_path="$VIRTUAL_DIR"
12359   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12360     unix_path=`$CYGPATH -u "$windows_path"`
12361     VIRTUAL_DIR="$unix_path"
12362   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12363     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12364     VIRTUAL_DIR="$unix_path"
12365   fi
12366 
12367 
12368   BOOT_JDK_PREFIX="$VIRTUAL_DIR"
12369   BOOT_JDK_SUFFIX=""
12370   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
12371   if test "x$ALL_JDKS_FOUND" != x; then
12372     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
12373 
12374   if test "x$BOOT_JDK_FOUND" = xno; then
12375     # Now execute the test
12376 
12377         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
12378         if test -d "$BOOT_JDK"; then
12379           BOOT_JDK_FOUND=maybe
12380           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
12381 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
12382         fi
12383 
12384 
12385     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12386     if test "x$BOOT_JDK_FOUND" = xmaybe; then
12387       # Do we have a bin/java?
12388       if test ! -x "$BOOT_JDK/bin/java"; then
12389         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12390 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12391         BOOT_JDK_FOUND=no
12392       else
12393         # Do we have a bin/javac?
12394         if test ! -x "$BOOT_JDK/bin/javac"; then
12395           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12396 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12397           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12398 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12399           BOOT_JDK_FOUND=no
12400         else
12401           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12402           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12403             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12404 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12405             BOOT_JDK_FOUND=no
12406           else
12407             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12408             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12409 
12410             # Extra M4 quote needed to protect [] in grep expression.
12411             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12412             if test "x$FOUND_VERSION_78" = x; then
12413               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12414 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12415               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12416 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12417               BOOT_JDK_FOUND=no
12418             else
12419               # We're done! :-)
12420               BOOT_JDK_FOUND=yes
12421 
12422   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12423 
12424   # Input might be given as Windows format, start by converting to
12425   # unix format.
12426   path="$BOOT_JDK"
12427   new_path=`$CYGPATH -u "$path"`
12428 
12429   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12430   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12431   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12432   # "foo.exe" is OK but "foo" is an error.
12433   #
12434   # This test is therefore slightly more accurate than "test -f" to check for file precense.
12435   # It is also a way to make sure we got the proper file name for the real test later on.
12436   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12437   if test "x$test_shortpath" = x; then
12438     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12439 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12440     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12441   fi
12442 
12443   # Call helper function which possibly converts this using DOS-style short mode.
12444   # If so, the updated path is stored in $new_path.
12445 
12446   input_path="$new_path"
12447   # Check if we need to convert this using DOS-style short mode. If the path
12448   # contains just simple characters, use it. Otherwise (spaces, weird characters),
12449   # take no chances and rewrite it.
12450   # Note: m4 eats our [], so we need to use [ and ] instead.
12451   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12452   if test "x$has_forbidden_chars" != x; then
12453     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12454     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12455     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12456     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12457       # Going to short mode and back again did indeed matter. Since short mode is
12458       # case insensitive, let's make it lowercase to improve readability.
12459       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12460       # Now convert it back to Unix-stile (cygpath)
12461       input_path=`$CYGPATH -u "$shortmode_path"`
12462       new_path="$input_path"
12463     fi
12464   fi
12465 
12466   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12467   if test "x$test_cygdrive_prefix" = x; then
12468     # As a simple fix, exclude /usr/bin since it's not a real path.
12469     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12470       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12471       # a path prefixed by /cygdrive for fixpath to work.
12472       new_path="$CYGWIN_ROOT_PATH$input_path"
12473     fi
12474   fi
12475 
12476 
12477   if test "x$path" != "x$new_path"; then
12478     BOOT_JDK="$new_path"
12479     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12480 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12481   fi
12482 
12483   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12484 
12485   path="$BOOT_JDK"
12486   has_colon=`$ECHO $path | $GREP ^.:`
12487   new_path="$path"
12488   if test "x$has_colon" = x; then
12489     # Not in mixed or Windows style, start by that.
12490     new_path=`cmd //c echo $path`
12491   fi
12492 
12493 
12494   input_path="$new_path"
12495   # Check if we need to convert this using DOS-style short mode. If the path
12496   # contains just simple characters, use it. Otherwise (spaces, weird characters),
12497   # take no chances and rewrite it.
12498   # Note: m4 eats our [], so we need to use [ and ] instead.
12499   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12500   if test "x$has_forbidden_chars" != x; then
12501     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12502     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12503   fi
12504 
12505 
12506   windows_path="$new_path"
12507   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12508     unix_path=`$CYGPATH -u "$windows_path"`
12509     new_path="$unix_path"
12510   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12511     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12512     new_path="$unix_path"
12513   fi
12514 
12515   if test "x$path" != "x$new_path"; then
12516     BOOT_JDK="$new_path"
12517     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12518 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12519   fi
12520 
12521   # Save the first 10 bytes of this path to the storage, so fixpath can work.
12522   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12523 
12524   else
12525     # We're on a posix platform. Hooray! :)
12526     path="$BOOT_JDK"
12527 
12528     if test ! -f "$path" && test ! -d "$path"; then
12529       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
12530     fi
12531 
12532     has_space=`$ECHO "$path" | $GREP " "`
12533     if test "x$has_space" != x; then
12534       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12535 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12536       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
12537     fi
12538   fi
12539 
12540               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12541 $as_echo_n "checking for Boot JDK... " >&6; }
12542               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12543 $as_echo "$BOOT_JDK" >&6; }
12544               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12545 $as_echo_n "checking Boot JDK version... " >&6; }
12546               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12547               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12548 $as_echo "$BOOT_JDK_VERSION" >&6; }
12549             fi # end check jdk version
12550           fi # end check rt.jar
12551         fi # end check javac
12552       fi # end check java
12553     fi # end check boot jdk found
12554   fi
12555 
12556     done
12557   fi
12558 
12559   fi
12560 
12561 
12562     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12563     if test "x$BOOT_JDK_FOUND" = xmaybe; then
12564       # Do we have a bin/java?
12565       if test ! -x "$BOOT_JDK/bin/java"; then
12566         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12567 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12568         BOOT_JDK_FOUND=no
12569       else
12570         # Do we have a bin/javac?
12571         if test ! -x "$BOOT_JDK/bin/javac"; then
12572           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12573 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12574           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12575 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12576           BOOT_JDK_FOUND=no
12577         else
12578           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12579           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12580             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12581 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12582             BOOT_JDK_FOUND=no
12583           else
12584             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12585             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12586 
12587             # Extra M4 quote needed to protect [] in grep expression.
12588             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12589             if test "x$FOUND_VERSION_78" = x; then
12590               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12591 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12592               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12593 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12594               BOOT_JDK_FOUND=no
12595             else
12596               # We're done! :-)
12597               BOOT_JDK_FOUND=yes
12598 
12599   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12600 
12601   # Input might be given as Windows format, start by converting to
12602   # unix format.
12603   path="$BOOT_JDK"
12604   new_path=`$CYGPATH -u "$path"`
12605 
12606   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12607   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12608   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12609   # "foo.exe" is OK but "foo" is an error.
12610   #
12611   # This test is therefore slightly more accurate than "test -f" to check for file precense.
12612   # It is also a way to make sure we got the proper file name for the real test later on.
12613   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12614   if test "x$test_shortpath" = x; then
12615     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12616 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12617     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12618   fi
12619 
12620   # Call helper function which possibly converts this using DOS-style short mode.
12621   # If so, the updated path is stored in $new_path.
12622 
12623   input_path="$new_path"
12624   # Check if we need to convert this using DOS-style short mode. If the path
12625   # contains just simple characters, use it. Otherwise (spaces, weird characters),
12626   # take no chances and rewrite it.
12627   # Note: m4 eats our [], so we need to use [ and ] instead.
12628   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12629   if test "x$has_forbidden_chars" != x; then
12630     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12631     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12632     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12633     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12634       # Going to short mode and back again did indeed matter. Since short mode is
12635       # case insensitive, let's make it lowercase to improve readability.
12636       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12637       # Now convert it back to Unix-stile (cygpath)
12638       input_path=`$CYGPATH -u "$shortmode_path"`
12639       new_path="$input_path"
12640     fi
12641   fi
12642 
12643   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12644   if test "x$test_cygdrive_prefix" = x; then
12645     # As a simple fix, exclude /usr/bin since it's not a real path.
12646     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12647       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12648       # a path prefixed by /cygdrive for fixpath to work.
12649       new_path="$CYGWIN_ROOT_PATH$input_path"
12650     fi
12651   fi
12652 
12653 
12654   if test "x$path" != "x$new_path"; then
12655     BOOT_JDK="$new_path"
12656     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12657 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12658   fi
12659 
12660   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12661 
12662   path="$BOOT_JDK"
12663   has_colon=`$ECHO $path | $GREP ^.:`
12664   new_path="$path"
12665   if test "x$has_colon" = x; then
12666     # Not in mixed or Windows style, start by that.
12667     new_path=`cmd //c echo $path`
12668   fi
12669 
12670 
12671   input_path="$new_path"
12672   # Check if we need to convert this using DOS-style short mode. If the path
12673   # contains just simple characters, use it. Otherwise (spaces, weird characters),
12674   # take no chances and rewrite it.
12675   # Note: m4 eats our [], so we need to use [ and ] instead.
12676   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12677   if test "x$has_forbidden_chars" != x; then
12678     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12679     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12680   fi
12681 
12682 
12683   windows_path="$new_path"
12684   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12685     unix_path=`$CYGPATH -u "$windows_path"`
12686     new_path="$unix_path"
12687   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12688     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12689     new_path="$unix_path"
12690   fi
12691 
12692   if test "x$path" != "x$new_path"; then
12693     BOOT_JDK="$new_path"
12694     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12695 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12696   fi
12697 
12698   # Save the first 10 bytes of this path to the storage, so fixpath can work.
12699   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12700 
12701   else
12702     # We're on a posix platform. Hooray! :)
12703     path="$BOOT_JDK"
12704 
12705     if test ! -f "$path" && test ! -d "$path"; then
12706       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
12707     fi
12708 
12709     has_space=`$ECHO "$path" | $GREP " "`
12710     if test "x$has_space" != x; then
12711       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12712 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12713       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
12714     fi
12715   fi
12716 
12717               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12718 $as_echo_n "checking for Boot JDK... " >&6; }
12719               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12720 $as_echo "$BOOT_JDK" >&6; }
12721               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12722 $as_echo_n "checking Boot JDK version... " >&6; }
12723               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12724               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12725 $as_echo "$BOOT_JDK_VERSION" >&6; }
12726             fi # end check jdk version
12727           fi # end check rt.jar
12728         fi # end check javac
12729       fi # end check java
12730     fi # end check boot jdk found
12731   fi
12732 
12733 
12734   if test "x$BOOT_JDK_FOUND" = xno; then
12735     # Now execute the test
12736 
12737   if test "x$PROGRAMW6432" != x; then
12738     VIRTUAL_DIR="$PROGRAMW6432/Java"
12739 
12740   windows_path="$VIRTUAL_DIR"
12741   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12742     unix_path=`$CYGPATH -u "$windows_path"`
12743     VIRTUAL_DIR="$unix_path"
12744   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12745     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12746     VIRTUAL_DIR="$unix_path"
12747   fi
12748 
12749 
12750   BOOT_JDK_PREFIX="$VIRTUAL_DIR"
12751   BOOT_JDK_SUFFIX=""
12752   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
12753   if test "x$ALL_JDKS_FOUND" != x; then
12754     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
12755 
12756   if test "x$BOOT_JDK_FOUND" = xno; then
12757     # Now execute the test
12758 
12759         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
12760         if test -d "$BOOT_JDK"; then
12761           BOOT_JDK_FOUND=maybe
12762           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
12763 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
12764         fi
12765 
12766 
12767     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12768     if test "x$BOOT_JDK_FOUND" = xmaybe; then
12769       # Do we have a bin/java?
12770       if test ! -x "$BOOT_JDK/bin/java"; then
12771         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12772 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12773         BOOT_JDK_FOUND=no
12774       else
12775         # Do we have a bin/javac?
12776         if test ! -x "$BOOT_JDK/bin/javac"; then
12777           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12778 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12779           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12780 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12781           BOOT_JDK_FOUND=no
12782         else
12783           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12784           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12785             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12786 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12787             BOOT_JDK_FOUND=no
12788           else
12789             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12790             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12791 
12792             # Extra M4 quote needed to protect [] in grep expression.
12793             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12794             if test "x$FOUND_VERSION_78" = x; then
12795               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12796 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12797               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12798 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12799               BOOT_JDK_FOUND=no
12800             else
12801               # We're done! :-)
12802               BOOT_JDK_FOUND=yes
12803 
12804   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12805 
12806   # Input might be given as Windows format, start by converting to
12807   # unix format.
12808   path="$BOOT_JDK"
12809   new_path=`$CYGPATH -u "$path"`
12810 
12811   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12812   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12813   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12814   # "foo.exe" is OK but "foo" is an error.
12815   #
12816   # This test is therefore slightly more accurate than "test -f" to check for file precense.
12817   # It is also a way to make sure we got the proper file name for the real test later on.
12818   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12819   if test "x$test_shortpath" = x; then
12820     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12821 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12822     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12823   fi
12824 
12825   # Call helper function which possibly converts this using DOS-style short mode.
12826   # If so, the updated path is stored in $new_path.
12827 
12828   input_path="$new_path"
12829   # Check if we need to convert this using DOS-style short mode. If the path
12830   # contains just simple characters, use it. Otherwise (spaces, weird characters),
12831   # take no chances and rewrite it.
12832   # Note: m4 eats our [], so we need to use [ and ] instead.
12833   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12834   if test "x$has_forbidden_chars" != x; then
12835     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12836     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12837     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12838     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12839       # Going to short mode and back again did indeed matter. Since short mode is
12840       # case insensitive, let's make it lowercase to improve readability.
12841       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12842       # Now convert it back to Unix-stile (cygpath)
12843       input_path=`$CYGPATH -u "$shortmode_path"`
12844       new_path="$input_path"
12845     fi
12846   fi
12847 
12848   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12849   if test "x$test_cygdrive_prefix" = x; then
12850     # As a simple fix, exclude /usr/bin since it's not a real path.
12851     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12852       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12853       # a path prefixed by /cygdrive for fixpath to work.
12854       new_path="$CYGWIN_ROOT_PATH$input_path"
12855     fi
12856   fi
12857 
12858 
12859   if test "x$path" != "x$new_path"; then
12860     BOOT_JDK="$new_path"
12861     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12862 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12863   fi
12864 
12865   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12866 
12867   path="$BOOT_JDK"
12868   has_colon=`$ECHO $path | $GREP ^.:`
12869   new_path="$path"
12870   if test "x$has_colon" = x; then
12871     # Not in mixed or Windows style, start by that.
12872     new_path=`cmd //c echo $path`
12873   fi
12874 
12875 
12876   input_path="$new_path"
12877   # Check if we need to convert this using DOS-style short mode. If the path
12878   # contains just simple characters, use it. Otherwise (spaces, weird characters),
12879   # take no chances and rewrite it.
12880   # Note: m4 eats our [], so we need to use [ and ] instead.
12881   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12882   if test "x$has_forbidden_chars" != x; then
12883     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12884     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12885   fi
12886 
12887 
12888   windows_path="$new_path"
12889   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12890     unix_path=`$CYGPATH -u "$windows_path"`
12891     new_path="$unix_path"
12892   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12893     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12894     new_path="$unix_path"
12895   fi
12896 
12897   if test "x$path" != "x$new_path"; then
12898     BOOT_JDK="$new_path"
12899     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12900 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12901   fi
12902 
12903   # Save the first 10 bytes of this path to the storage, so fixpath can work.
12904   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12905 
12906   else
12907     # We're on a posix platform. Hooray! :)
12908     path="$BOOT_JDK"
12909 
12910     if test ! -f "$path" && test ! -d "$path"; then
12911       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
12912     fi
12913 
12914     has_space=`$ECHO "$path" | $GREP " "`
12915     if test "x$has_space" != x; then
12916       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12917 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12918       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
12919     fi
12920   fi
12921 
12922               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12923 $as_echo_n "checking for Boot JDK... " >&6; }
12924               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12925 $as_echo "$BOOT_JDK" >&6; }
12926               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12927 $as_echo_n "checking Boot JDK version... " >&6; }
12928               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12929               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12930 $as_echo "$BOOT_JDK_VERSION" >&6; }
12931             fi # end check jdk version
12932           fi # end check rt.jar
12933         fi # end check javac
12934       fi # end check java
12935     fi # end check boot jdk found
12936   fi
12937 
12938     done
12939   fi
12940 
12941   fi
12942 
12943 
12944     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12945     if test "x$BOOT_JDK_FOUND" = xmaybe; then
12946       # Do we have a bin/java?
12947       if test ! -x "$BOOT_JDK/bin/java"; then
12948         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12949 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12950         BOOT_JDK_FOUND=no
12951       else
12952         # Do we have a bin/javac?
12953         if test ! -x "$BOOT_JDK/bin/javac"; then
12954           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12955 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12956           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12957 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12958           BOOT_JDK_FOUND=no
12959         else
12960           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12961           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12962             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12963 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12964             BOOT_JDK_FOUND=no
12965           else
12966             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12967             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12968 
12969             # Extra M4 quote needed to protect [] in grep expression.
12970             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12971             if test "x$FOUND_VERSION_78" = x; then
12972               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12973 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12974               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12975 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12976               BOOT_JDK_FOUND=no
12977             else
12978               # We're done! :-)
12979               BOOT_JDK_FOUND=yes
12980 
12981   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12982 
12983   # Input might be given as Windows format, start by converting to
12984   # unix format.
12985   path="$BOOT_JDK"
12986   new_path=`$CYGPATH -u "$path"`
12987 
12988   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12989   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12990   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12991   # "foo.exe" is OK but "foo" is an error.
12992   #
12993   # This test is therefore slightly more accurate than "test -f" to check for file precense.
12994   # It is also a way to make sure we got the proper file name for the real test later on.
12995   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12996   if test "x$test_shortpath" = x; then
12997     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12998 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12999     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13000   fi
13001 
13002   # Call helper function which possibly converts this using DOS-style short mode.
13003   # If so, the updated path is stored in $new_path.
13004 
13005   input_path="$new_path"
13006   # Check if we need to convert this using DOS-style short mode. If the path
13007   # contains just simple characters, use it. Otherwise (spaces, weird characters),
13008   # take no chances and rewrite it.
13009   # Note: m4 eats our [], so we need to use [ and ] instead.
13010   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13011   if test "x$has_forbidden_chars" != x; then
13012     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13013     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13014     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13015     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13016       # Going to short mode and back again did indeed matter. Since short mode is
13017       # case insensitive, let's make it lowercase to improve readability.
13018       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13019       # Now convert it back to Unix-stile (cygpath)
13020       input_path=`$CYGPATH -u "$shortmode_path"`
13021       new_path="$input_path"
13022     fi
13023   fi
13024 
13025   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13026   if test "x$test_cygdrive_prefix" = x; then
13027     # As a simple fix, exclude /usr/bin since it's not a real path.
13028     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13029       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13030       # a path prefixed by /cygdrive for fixpath to work.
13031       new_path="$CYGWIN_ROOT_PATH$input_path"
13032     fi
13033   fi
13034 
13035 
13036   if test "x$path" != "x$new_path"; then
13037     BOOT_JDK="$new_path"
13038     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13039 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13040   fi
13041 
13042   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13043 
13044   path="$BOOT_JDK"
13045   has_colon=`$ECHO $path | $GREP ^.:`
13046   new_path="$path"
13047   if test "x$has_colon" = x; then
13048     # Not in mixed or Windows style, start by that.
13049     new_path=`cmd //c echo $path`
13050   fi
13051 
13052 
13053   input_path="$new_path"
13054   # Check if we need to convert this using DOS-style short mode. If the path
13055   # contains just simple characters, use it. Otherwise (spaces, weird characters),
13056   # take no chances and rewrite it.
13057   # Note: m4 eats our [], so we need to use [ and ] instead.
13058   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13059   if test "x$has_forbidden_chars" != x; then
13060     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13061     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13062   fi
13063 
13064 
13065   windows_path="$new_path"
13066   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13067     unix_path=`$CYGPATH -u "$windows_path"`
13068     new_path="$unix_path"
13069   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13070     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13071     new_path="$unix_path"
13072   fi
13073 
13074   if test "x$path" != "x$new_path"; then
13075     BOOT_JDK="$new_path"
13076     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13077 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13078   fi
13079 
13080   # Save the first 10 bytes of this path to the storage, so fixpath can work.
13081   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13082 
13083   else
13084     # We're on a posix platform. Hooray! :)
13085     path="$BOOT_JDK"
13086 
13087     if test ! -f "$path" && test ! -d "$path"; then
13088       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13089     fi
13090 
13091     has_space=`$ECHO "$path" | $GREP " "`
13092     if test "x$has_space" != x; then
13093       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13094 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13095       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13096     fi
13097   fi
13098 
13099               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13100 $as_echo_n "checking for Boot JDK... " >&6; }
13101               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13102 $as_echo "$BOOT_JDK" >&6; }
13103               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13104 $as_echo_n "checking Boot JDK version... " >&6; }
13105               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13106               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13107 $as_echo "$BOOT_JDK_VERSION" >&6; }
13108             fi # end check jdk version
13109           fi # end check rt.jar
13110         fi # end check javac
13111       fi # end check java
13112     fi # end check boot jdk found
13113   fi
13114 
13115 
13116   if test "x$BOOT_JDK_FOUND" = xno; then
13117     # Now execute the test
13118 
13119   if test "x$PROGRAMFILES" != x; then
13120     VIRTUAL_DIR="$PROGRAMFILES/Java"
13121 
13122   windows_path="$VIRTUAL_DIR"
13123   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13124     unix_path=`$CYGPATH -u "$windows_path"`
13125     VIRTUAL_DIR="$unix_path"
13126   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13127     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13128     VIRTUAL_DIR="$unix_path"
13129   fi
13130 
13131 
13132   BOOT_JDK_PREFIX="$VIRTUAL_DIR"
13133   BOOT_JDK_SUFFIX=""
13134   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
13135   if test "x$ALL_JDKS_FOUND" != x; then
13136     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
13137 
13138   if test "x$BOOT_JDK_FOUND" = xno; then
13139     # Now execute the test
13140 
13141         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
13142         if test -d "$BOOT_JDK"; then
13143           BOOT_JDK_FOUND=maybe
13144           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
13145 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
13146         fi
13147 
13148 
13149     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13150     if test "x$BOOT_JDK_FOUND" = xmaybe; then
13151       # Do we have a bin/java?
13152       if test ! -x "$BOOT_JDK/bin/java"; then
13153         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13154 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13155         BOOT_JDK_FOUND=no
13156       else
13157         # Do we have a bin/javac?
13158         if test ! -x "$BOOT_JDK/bin/javac"; then
13159           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13160 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13161           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13162 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13163           BOOT_JDK_FOUND=no
13164         else
13165           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13166           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13167             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13168 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13169             BOOT_JDK_FOUND=no
13170           else
13171             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13172             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13173 
13174             # Extra M4 quote needed to protect [] in grep expression.
13175             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13176             if test "x$FOUND_VERSION_78" = x; then
13177               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13178 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13179               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13180 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13181               BOOT_JDK_FOUND=no
13182             else
13183               # We're done! :-)
13184               BOOT_JDK_FOUND=yes
13185 
13186   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13187 
13188   # Input might be given as Windows format, start by converting to
13189   # unix format.
13190   path="$BOOT_JDK"
13191   new_path=`$CYGPATH -u "$path"`
13192 
13193   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13194   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13195   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13196   # "foo.exe" is OK but "foo" is an error.
13197   #
13198   # This test is therefore slightly more accurate than "test -f" to check for file precense.
13199   # It is also a way to make sure we got the proper file name for the real test later on.
13200   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13201   if test "x$test_shortpath" = x; then
13202     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13203 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13204     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13205   fi
13206 
13207   # Call helper function which possibly converts this using DOS-style short mode.
13208   # If so, the updated path is stored in $new_path.
13209 
13210   input_path="$new_path"
13211   # Check if we need to convert this using DOS-style short mode. If the path
13212   # contains just simple characters, use it. Otherwise (spaces, weird characters),
13213   # take no chances and rewrite it.
13214   # Note: m4 eats our [], so we need to use [ and ] instead.
13215   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13216   if test "x$has_forbidden_chars" != x; then
13217     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13218     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13219     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13220     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13221       # Going to short mode and back again did indeed matter. Since short mode is
13222       # case insensitive, let's make it lowercase to improve readability.
13223       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13224       # Now convert it back to Unix-stile (cygpath)
13225       input_path=`$CYGPATH -u "$shortmode_path"`
13226       new_path="$input_path"
13227     fi
13228   fi
13229 
13230   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13231   if test "x$test_cygdrive_prefix" = x; then
13232     # As a simple fix, exclude /usr/bin since it's not a real path.
13233     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13234       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13235       # a path prefixed by /cygdrive for fixpath to work.
13236       new_path="$CYGWIN_ROOT_PATH$input_path"
13237     fi
13238   fi
13239 
13240 
13241   if test "x$path" != "x$new_path"; then
13242     BOOT_JDK="$new_path"
13243     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13244 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13245   fi
13246 
13247   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13248 
13249   path="$BOOT_JDK"
13250   has_colon=`$ECHO $path | $GREP ^.:`
13251   new_path="$path"
13252   if test "x$has_colon" = x; then
13253     # Not in mixed or Windows style, start by that.
13254     new_path=`cmd //c echo $path`
13255   fi
13256 
13257 
13258   input_path="$new_path"
13259   # Check if we need to convert this using DOS-style short mode. If the path
13260   # contains just simple characters, use it. Otherwise (spaces, weird characters),
13261   # take no chances and rewrite it.
13262   # Note: m4 eats our [], so we need to use [ and ] instead.
13263   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13264   if test "x$has_forbidden_chars" != x; then
13265     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13266     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13267   fi
13268 
13269 
13270   windows_path="$new_path"
13271   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13272     unix_path=`$CYGPATH -u "$windows_path"`
13273     new_path="$unix_path"
13274   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13275     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13276     new_path="$unix_path"
13277   fi
13278 
13279   if test "x$path" != "x$new_path"; then
13280     BOOT_JDK="$new_path"
13281     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13282 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13283   fi
13284 
13285   # Save the first 10 bytes of this path to the storage, so fixpath can work.
13286   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13287 
13288   else
13289     # We're on a posix platform. Hooray! :)
13290     path="$BOOT_JDK"
13291 
13292     if test ! -f "$path" && test ! -d "$path"; then
13293       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13294     fi
13295 
13296     has_space=`$ECHO "$path" | $GREP " "`
13297     if test "x$has_space" != x; then
13298       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13299 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13300       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13301     fi
13302   fi
13303 
13304               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13305 $as_echo_n "checking for Boot JDK... " >&6; }
13306               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13307 $as_echo "$BOOT_JDK" >&6; }
13308               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13309 $as_echo_n "checking Boot JDK version... " >&6; }
13310               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13311               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13312 $as_echo "$BOOT_JDK_VERSION" >&6; }
13313             fi # end check jdk version
13314           fi # end check rt.jar
13315         fi # end check javac
13316       fi # end check java
13317     fi # end check boot jdk found
13318   fi
13319 
13320     done
13321   fi
13322 
13323   fi
13324 
13325 
13326     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13327     if test "x$BOOT_JDK_FOUND" = xmaybe; then
13328       # Do we have a bin/java?
13329       if test ! -x "$BOOT_JDK/bin/java"; then
13330         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13331 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13332         BOOT_JDK_FOUND=no
13333       else
13334         # Do we have a bin/javac?
13335         if test ! -x "$BOOT_JDK/bin/javac"; then
13336           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13337 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13338           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13339 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13340           BOOT_JDK_FOUND=no
13341         else
13342           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13343           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13344             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13345 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13346             BOOT_JDK_FOUND=no
13347           else
13348             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13349             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13350 
13351             # Extra M4 quote needed to protect [] in grep expression.
13352             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13353             if test "x$FOUND_VERSION_78" = x; then
13354               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13355 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13356               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13357 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13358               BOOT_JDK_FOUND=no
13359             else
13360               # We're done! :-)
13361               BOOT_JDK_FOUND=yes
13362 
13363   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13364 
13365   # Input might be given as Windows format, start by converting to
13366   # unix format.
13367   path="$BOOT_JDK"
13368   new_path=`$CYGPATH -u "$path"`
13369 
13370   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13371   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13372   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13373   # "foo.exe" is OK but "foo" is an error.
13374   #
13375   # This test is therefore slightly more accurate than "test -f" to check for file precense.
13376   # It is also a way to make sure we got the proper file name for the real test later on.
13377   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13378   if test "x$test_shortpath" = x; then
13379     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13380 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13381     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13382   fi
13383 
13384   # Call helper function which possibly converts this using DOS-style short mode.
13385   # If so, the updated path is stored in $new_path.
13386 
13387   input_path="$new_path"
13388   # Check if we need to convert this using DOS-style short mode. If the path
13389   # contains just simple characters, use it. Otherwise (spaces, weird characters),
13390   # take no chances and rewrite it.
13391   # Note: m4 eats our [], so we need to use [ and ] instead.
13392   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13393   if test "x$has_forbidden_chars" != x; then
13394     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13395     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13396     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13397     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13398       # Going to short mode and back again did indeed matter. Since short mode is
13399       # case insensitive, let's make it lowercase to improve readability.
13400       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13401       # Now convert it back to Unix-stile (cygpath)
13402       input_path=`$CYGPATH -u "$shortmode_path"`
13403       new_path="$input_path"
13404     fi
13405   fi
13406 
13407   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13408   if test "x$test_cygdrive_prefix" = x; then
13409     # As a simple fix, exclude /usr/bin since it's not a real path.
13410     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13411       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13412       # a path prefixed by /cygdrive for fixpath to work.
13413       new_path="$CYGWIN_ROOT_PATH$input_path"
13414     fi
13415   fi
13416 
13417 
13418   if test "x$path" != "x$new_path"; then
13419     BOOT_JDK="$new_path"
13420     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13421 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13422   fi
13423 
13424   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13425 
13426   path="$BOOT_JDK"
13427   has_colon=`$ECHO $path | $GREP ^.:`
13428   new_path="$path"
13429   if test "x$has_colon" = x; then
13430     # Not in mixed or Windows style, start by that.
13431     new_path=`cmd //c echo $path`
13432   fi
13433 
13434 
13435   input_path="$new_path"
13436   # Check if we need to convert this using DOS-style short mode. If the path
13437   # contains just simple characters, use it. Otherwise (spaces, weird characters),
13438   # take no chances and rewrite it.
13439   # Note: m4 eats our [], so we need to use [ and ] instead.
13440   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13441   if test "x$has_forbidden_chars" != x; then
13442     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13443     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13444   fi
13445 
13446 
13447   windows_path="$new_path"
13448   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13449     unix_path=`$CYGPATH -u "$windows_path"`
13450     new_path="$unix_path"
13451   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13452     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13453     new_path="$unix_path"
13454   fi
13455 
13456   if test "x$path" != "x$new_path"; then
13457     BOOT_JDK="$new_path"
13458     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13459 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13460   fi
13461 
13462   # Save the first 10 bytes of this path to the storage, so fixpath can work.
13463   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13464 
13465   else
13466     # We're on a posix platform. Hooray! :)
13467     path="$BOOT_JDK"
13468 
13469     if test ! -f "$path" && test ! -d "$path"; then
13470       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13471     fi
13472 
13473     has_space=`$ECHO "$path" | $GREP " "`
13474     if test "x$has_space" != x; then
13475       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13476 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13477       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13478     fi
13479   fi
13480 
13481               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13482 $as_echo_n "checking for Boot JDK... " >&6; }
13483               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13484 $as_echo "$BOOT_JDK" >&6; }
13485               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13486 $as_echo_n "checking Boot JDK version... " >&6; }
13487               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13488               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13489 $as_echo "$BOOT_JDK_VERSION" >&6; }
13490             fi # end check jdk version
13491           fi # end check rt.jar
13492         fi # end check javac
13493       fi # end check java
13494     fi # end check boot jdk found
13495   fi
13496 
13497 
13498   if test "x$BOOT_JDK_FOUND" = xno; then
13499     # Now execute the test
13500 
13501   if test "x$ProgramFiles" != x; then
13502     VIRTUAL_DIR="$ProgramFiles/Java"
13503 
13504   windows_path="$VIRTUAL_DIR"
13505   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13506     unix_path=`$CYGPATH -u "$windows_path"`
13507     VIRTUAL_DIR="$unix_path"
13508   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13509     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13510     VIRTUAL_DIR="$unix_path"
13511   fi
13512 
13513 
13514   BOOT_JDK_PREFIX="$VIRTUAL_DIR"
13515   BOOT_JDK_SUFFIX=""
13516   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
13517   if test "x$ALL_JDKS_FOUND" != x; then
13518     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
13519 
13520   if test "x$BOOT_JDK_FOUND" = xno; then
13521     # Now execute the test
13522 
13523         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
13524         if test -d "$BOOT_JDK"; then
13525           BOOT_JDK_FOUND=maybe
13526           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
13527 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
13528         fi
13529 
13530 
13531     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13532     if test "x$BOOT_JDK_FOUND" = xmaybe; then
13533       # Do we have a bin/java?
13534       if test ! -x "$BOOT_JDK/bin/java"; then
13535         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13536 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13537         BOOT_JDK_FOUND=no
13538       else
13539         # Do we have a bin/javac?
13540         if test ! -x "$BOOT_JDK/bin/javac"; then
13541           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13542 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13543           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13544 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13545           BOOT_JDK_FOUND=no
13546         else
13547           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13548           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13549             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13550 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13551             BOOT_JDK_FOUND=no
13552           else
13553             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13554             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13555 
13556             # Extra M4 quote needed to protect [] in grep expression.
13557             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13558             if test "x$FOUND_VERSION_78" = x; then
13559               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13560 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13561               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13562 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13563               BOOT_JDK_FOUND=no
13564             else
13565               # We're done! :-)
13566               BOOT_JDK_FOUND=yes
13567 
13568   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13569 
13570   # Input might be given as Windows format, start by converting to
13571   # unix format.
13572   path="$BOOT_JDK"
13573   new_path=`$CYGPATH -u "$path"`
13574 
13575   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13576   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13577   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13578   # "foo.exe" is OK but "foo" is an error.
13579   #
13580   # This test is therefore slightly more accurate than "test -f" to check for file precense.
13581   # It is also a way to make sure we got the proper file name for the real test later on.
13582   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13583   if test "x$test_shortpath" = x; then
13584     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13585 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13586     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13587   fi
13588 
13589   # Call helper function which possibly converts this using DOS-style short mode.
13590   # If so, the updated path is stored in $new_path.
13591 
13592   input_path="$new_path"
13593   # Check if we need to convert this using DOS-style short mode. If the path
13594   # contains just simple characters, use it. Otherwise (spaces, weird characters),
13595   # take no chances and rewrite it.
13596   # Note: m4 eats our [], so we need to use [ and ] instead.
13597   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13598   if test "x$has_forbidden_chars" != x; then
13599     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13600     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13601     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13602     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13603       # Going to short mode and back again did indeed matter. Since short mode is
13604       # case insensitive, let's make it lowercase to improve readability.
13605       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13606       # Now convert it back to Unix-stile (cygpath)
13607       input_path=`$CYGPATH -u "$shortmode_path"`
13608       new_path="$input_path"
13609     fi
13610   fi
13611 
13612   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13613   if test "x$test_cygdrive_prefix" = x; then
13614     # As a simple fix, exclude /usr/bin since it's not a real path.
13615     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13616       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13617       # a path prefixed by /cygdrive for fixpath to work.
13618       new_path="$CYGWIN_ROOT_PATH$input_path"
13619     fi
13620   fi
13621 
13622 
13623   if test "x$path" != "x$new_path"; then
13624     BOOT_JDK="$new_path"
13625     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13626 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13627   fi
13628 
13629   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13630 
13631   path="$BOOT_JDK"
13632   has_colon=`$ECHO $path | $GREP ^.:`
13633   new_path="$path"
13634   if test "x$has_colon" = x; then
13635     # Not in mixed or Windows style, start by that.
13636     new_path=`cmd //c echo $path`
13637   fi
13638 
13639 
13640   input_path="$new_path"
13641   # Check if we need to convert this using DOS-style short mode. If the path
13642   # contains just simple characters, use it. Otherwise (spaces, weird characters),
13643   # take no chances and rewrite it.
13644   # Note: m4 eats our [], so we need to use [ and ] instead.
13645   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13646   if test "x$has_forbidden_chars" != x; then
13647     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13648     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13649   fi
13650 
13651 
13652   windows_path="$new_path"
13653   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13654     unix_path=`$CYGPATH -u "$windows_path"`
13655     new_path="$unix_path"
13656   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13657     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13658     new_path="$unix_path"
13659   fi
13660 
13661   if test "x$path" != "x$new_path"; then
13662     BOOT_JDK="$new_path"
13663     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13664 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13665   fi
13666 
13667   # Save the first 10 bytes of this path to the storage, so fixpath can work.
13668   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13669 
13670   else
13671     # We're on a posix platform. Hooray! :)
13672     path="$BOOT_JDK"
13673 
13674     if test ! -f "$path" && test ! -d "$path"; then
13675       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13676     fi
13677 
13678     has_space=`$ECHO "$path" | $GREP " "`
13679     if test "x$has_space" != x; then
13680       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13681 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13682       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13683     fi
13684   fi
13685 
13686               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13687 $as_echo_n "checking for Boot JDK... " >&6; }
13688               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13689 $as_echo "$BOOT_JDK" >&6; }
13690               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13691 $as_echo_n "checking Boot JDK version... " >&6; }
13692               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13693               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13694 $as_echo "$BOOT_JDK_VERSION" >&6; }
13695             fi # end check jdk version
13696           fi # end check rt.jar
13697         fi # end check javac
13698       fi # end check java
13699     fi # end check boot jdk found
13700   fi
13701 
13702     done
13703   fi
13704 
13705   fi
13706 
13707 
13708     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13709     if test "x$BOOT_JDK_FOUND" = xmaybe; then
13710       # Do we have a bin/java?
13711       if test ! -x "$BOOT_JDK/bin/java"; then
13712         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13713 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13714         BOOT_JDK_FOUND=no
13715       else
13716         # Do we have a bin/javac?
13717         if test ! -x "$BOOT_JDK/bin/javac"; then
13718           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13719 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13720           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13721 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13722           BOOT_JDK_FOUND=no
13723         else
13724           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13725           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13726             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13727 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13728             BOOT_JDK_FOUND=no
13729           else
13730             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13731             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13732 
13733             # Extra M4 quote needed to protect [] in grep expression.
13734             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13735             if test "x$FOUND_VERSION_78" = x; then
13736               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13737 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13738               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13739 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13740               BOOT_JDK_FOUND=no
13741             else
13742               # We're done! :-)
13743               BOOT_JDK_FOUND=yes
13744 
13745   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13746 
13747   # Input might be given as Windows format, start by converting to
13748   # unix format.
13749   path="$BOOT_JDK"
13750   new_path=`$CYGPATH -u "$path"`
13751 
13752   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13753   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13754   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13755   # "foo.exe" is OK but "foo" is an error.
13756   #
13757   # This test is therefore slightly more accurate than "test -f" to check for file precense.
13758   # It is also a way to make sure we got the proper file name for the real test later on.
13759   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13760   if test "x$test_shortpath" = x; then
13761     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13762 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13763     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13764   fi
13765 
13766   # Call helper function which possibly converts this using DOS-style short mode.
13767   # If so, the updated path is stored in $new_path.
13768 
13769   input_path="$new_path"
13770   # Check if we need to convert this using DOS-style short mode. If the path
13771   # contains just simple characters, use it. Otherwise (spaces, weird characters),
13772   # take no chances and rewrite it.
13773   # Note: m4 eats our [], so we need to use [ and ] instead.
13774   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13775   if test "x$has_forbidden_chars" != x; then
13776     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13777     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13778     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13779     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13780       # Going to short mode and back again did indeed matter. Since short mode is
13781       # case insensitive, let's make it lowercase to improve readability.
13782       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13783       # Now convert it back to Unix-stile (cygpath)
13784       input_path=`$CYGPATH -u "$shortmode_path"`
13785       new_path="$input_path"
13786     fi
13787   fi
13788 
13789   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13790   if test "x$test_cygdrive_prefix" = x; then
13791     # As a simple fix, exclude /usr/bin since it's not a real path.
13792     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13793       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13794       # a path prefixed by /cygdrive for fixpath to work.
13795       new_path="$CYGWIN_ROOT_PATH$input_path"
13796     fi
13797   fi
13798 
13799 
13800   if test "x$path" != "x$new_path"; then
13801     BOOT_JDK="$new_path"
13802     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13803 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13804   fi
13805 
13806   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13807 
13808   path="$BOOT_JDK"
13809   has_colon=`$ECHO $path | $GREP ^.:`
13810   new_path="$path"
13811   if test "x$has_colon" = x; then
13812     # Not in mixed or Windows style, start by that.
13813     new_path=`cmd //c echo $path`
13814   fi
13815 
13816 
13817   input_path="$new_path"
13818   # Check if we need to convert this using DOS-style short mode. If the path
13819   # contains just simple characters, use it. Otherwise (spaces, weird characters),
13820   # take no chances and rewrite it.
13821   # Note: m4 eats our [], so we need to use [ and ] instead.
13822   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13823   if test "x$has_forbidden_chars" != x; then
13824     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13825     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13826   fi
13827 
13828 
13829   windows_path="$new_path"
13830   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13831     unix_path=`$CYGPATH -u "$windows_path"`
13832     new_path="$unix_path"
13833   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13834     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13835     new_path="$unix_path"
13836   fi
13837 
13838   if test "x$path" != "x$new_path"; then
13839     BOOT_JDK="$new_path"
13840     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13841 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13842   fi
13843 
13844   # Save the first 10 bytes of this path to the storage, so fixpath can work.
13845   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13846 
13847   else
13848     # We're on a posix platform. Hooray! :)
13849     path="$BOOT_JDK"
13850 
13851     if test ! -f "$path" && test ! -d "$path"; then
13852       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13853     fi
13854 
13855     has_space=`$ECHO "$path" | $GREP " "`
13856     if test "x$has_space" != x; then
13857       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13858 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13859       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13860     fi
13861   fi
13862 
13863               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13864 $as_echo_n "checking for Boot JDK... " >&6; }
13865               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13866 $as_echo "$BOOT_JDK" >&6; }
13867               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13868 $as_echo_n "checking Boot JDK version... " >&6; }
13869               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13870               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13871 $as_echo "$BOOT_JDK_VERSION" >&6; }
13872             fi # end check jdk version
13873           fi # end check rt.jar
13874         fi # end check javac
13875       fi # end check java
13876     fi # end check boot jdk found
13877   fi
13878 
13879 
13880   if test "x$BOOT_JDK_FOUND" = xno; then
13881     # Now execute the test
13882 
13883   BOOT_JDK_PREFIX="/cygdrive/c/Program Files/Java"
13884   BOOT_JDK_SUFFIX=""
13885   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
13886   if test "x$ALL_JDKS_FOUND" != x; then
13887     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
13888 
13889   if test "x$BOOT_JDK_FOUND" = xno; then
13890     # Now execute the test
13891 
13892         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
13893         if test -d "$BOOT_JDK"; then
13894           BOOT_JDK_FOUND=maybe
13895           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
13896 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
13897         fi
13898 
13899 
13900     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13901     if test "x$BOOT_JDK_FOUND" = xmaybe; then
13902       # Do we have a bin/java?
13903       if test ! -x "$BOOT_JDK/bin/java"; then
13904         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13905 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13906         BOOT_JDK_FOUND=no
13907       else
13908         # Do we have a bin/javac?
13909         if test ! -x "$BOOT_JDK/bin/javac"; then
13910           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13911 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13912           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13913 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13914           BOOT_JDK_FOUND=no
13915         else
13916           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13917           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13918             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13919 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13920             BOOT_JDK_FOUND=no
13921           else
13922             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13923             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13924 
13925             # Extra M4 quote needed to protect [] in grep expression.
13926             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13927             if test "x$FOUND_VERSION_78" = x; then
13928               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13929 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13930               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13931 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13932               BOOT_JDK_FOUND=no
13933             else
13934               # We're done! :-)
13935               BOOT_JDK_FOUND=yes
13936 
13937   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13938 
13939   # Input might be given as Windows format, start by converting to
13940   # unix format.
13941   path="$BOOT_JDK"
13942   new_path=`$CYGPATH -u "$path"`
13943 
13944   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13945   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13946   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13947   # "foo.exe" is OK but "foo" is an error.
13948   #
13949   # This test is therefore slightly more accurate than "test -f" to check for file precense.
13950   # It is also a way to make sure we got the proper file name for the real test later on.
13951   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13952   if test "x$test_shortpath" = x; then
13953     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13954 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13955     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13956   fi
13957 
13958   # Call helper function which possibly converts this using DOS-style short mode.
13959   # If so, the updated path is stored in $new_path.
13960 
13961   input_path="$new_path"
13962   # Check if we need to convert this using DOS-style short mode. If the path
13963   # contains just simple characters, use it. Otherwise (spaces, weird characters),
13964   # take no chances and rewrite it.
13965   # Note: m4 eats our [], so we need to use [ and ] instead.
13966   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13967   if test "x$has_forbidden_chars" != x; then
13968     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13969     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13970     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13971     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13972       # Going to short mode and back again did indeed matter. Since short mode is
13973       # case insensitive, let's make it lowercase to improve readability.
13974       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13975       # Now convert it back to Unix-stile (cygpath)
13976       input_path=`$CYGPATH -u "$shortmode_path"`
13977       new_path="$input_path"
13978     fi
13979   fi
13980 
13981   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13982   if test "x$test_cygdrive_prefix" = x; then
13983     # As a simple fix, exclude /usr/bin since it's not a real path.
13984     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13985       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13986       # a path prefixed by /cygdrive for fixpath to work.
13987       new_path="$CYGWIN_ROOT_PATH$input_path"
13988     fi
13989   fi
13990 
13991 
13992   if test "x$path" != "x$new_path"; then
13993     BOOT_JDK="$new_path"
13994     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13995 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13996   fi
13997 
13998   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13999 
14000   path="$BOOT_JDK"
14001   has_colon=`$ECHO $path | $GREP ^.:`
14002   new_path="$path"
14003   if test "x$has_colon" = x; then
14004     # Not in mixed or Windows style, start by that.
14005     new_path=`cmd //c echo $path`
14006   fi
14007 
14008 
14009   input_path="$new_path"
14010   # Check if we need to convert this using DOS-style short mode. If the path
14011   # contains just simple characters, use it. Otherwise (spaces, weird characters),
14012   # take no chances and rewrite it.
14013   # Note: m4 eats our [], so we need to use [ and ] instead.
14014   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14015   if test "x$has_forbidden_chars" != x; then
14016     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14017     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14018   fi
14019 
14020 
14021   windows_path="$new_path"
14022   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14023     unix_path=`$CYGPATH -u "$windows_path"`
14024     new_path="$unix_path"
14025   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14026     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14027     new_path="$unix_path"
14028   fi
14029 
14030   if test "x$path" != "x$new_path"; then
14031     BOOT_JDK="$new_path"
14032     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14033 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14034   fi
14035 
14036   # Save the first 10 bytes of this path to the storage, so fixpath can work.
14037   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14038 
14039   else
14040     # We're on a posix platform. Hooray! :)
14041     path="$BOOT_JDK"
14042 
14043     if test ! -f "$path" && test ! -d "$path"; then
14044       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14045     fi
14046 
14047     has_space=`$ECHO "$path" | $GREP " "`
14048     if test "x$has_space" != x; then
14049       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14050 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14051       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14052     fi
14053   fi
14054 
14055               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14056 $as_echo_n "checking for Boot JDK... " >&6; }
14057               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14058 $as_echo "$BOOT_JDK" >&6; }
14059               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14060 $as_echo_n "checking Boot JDK version... " >&6; }
14061               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14062               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14063 $as_echo "$BOOT_JDK_VERSION" >&6; }
14064             fi # end check jdk version
14065           fi # end check rt.jar
14066         fi # end check javac
14067       fi # end check java
14068     fi # end check boot jdk found
14069   fi
14070 
14071     done
14072   fi
14073 
14074 
14075     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14076     if test "x$BOOT_JDK_FOUND" = xmaybe; then
14077       # Do we have a bin/java?
14078       if test ! -x "$BOOT_JDK/bin/java"; then
14079         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14080 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14081         BOOT_JDK_FOUND=no
14082       else
14083         # Do we have a bin/javac?
14084         if test ! -x "$BOOT_JDK/bin/javac"; then
14085           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14086 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14087           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14088 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14089           BOOT_JDK_FOUND=no
14090         else
14091           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14092           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14093             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14094 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14095             BOOT_JDK_FOUND=no
14096           else
14097             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14098             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14099 
14100             # Extra M4 quote needed to protect [] in grep expression.
14101             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14102             if test "x$FOUND_VERSION_78" = x; then
14103               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14104 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14105               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14106 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14107               BOOT_JDK_FOUND=no
14108             else
14109               # We're done! :-)
14110               BOOT_JDK_FOUND=yes
14111 
14112   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14113 
14114   # Input might be given as Windows format, start by converting to
14115   # unix format.
14116   path="$BOOT_JDK"
14117   new_path=`$CYGPATH -u "$path"`
14118 
14119   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14120   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14121   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14122   # "foo.exe" is OK but "foo" is an error.
14123   #
14124   # This test is therefore slightly more accurate than "test -f" to check for file precense.
14125   # It is also a way to make sure we got the proper file name for the real test later on.
14126   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14127   if test "x$test_shortpath" = x; then
14128     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14129 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14130     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14131   fi
14132 
14133   # Call helper function which possibly converts this using DOS-style short mode.
14134   # If so, the updated path is stored in $new_path.
14135 
14136   input_path="$new_path"
14137   # Check if we need to convert this using DOS-style short mode. If the path
14138   # contains just simple characters, use it. Otherwise (spaces, weird characters),
14139   # take no chances and rewrite it.
14140   # Note: m4 eats our [], so we need to use [ and ] instead.
14141   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14142   if test "x$has_forbidden_chars" != x; then
14143     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14144     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14145     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14146     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14147       # Going to short mode and back again did indeed matter. Since short mode is
14148       # case insensitive, let's make it lowercase to improve readability.
14149       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14150       # Now convert it back to Unix-stile (cygpath)
14151       input_path=`$CYGPATH -u "$shortmode_path"`
14152       new_path="$input_path"
14153     fi
14154   fi
14155 
14156   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14157   if test "x$test_cygdrive_prefix" = x; then
14158     # As a simple fix, exclude /usr/bin since it's not a real path.
14159     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14160       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14161       # a path prefixed by /cygdrive for fixpath to work.
14162       new_path="$CYGWIN_ROOT_PATH$input_path"
14163     fi
14164   fi
14165 
14166 
14167   if test "x$path" != "x$new_path"; then
14168     BOOT_JDK="$new_path"
14169     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14170 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14171   fi
14172 
14173   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14174 
14175   path="$BOOT_JDK"
14176   has_colon=`$ECHO $path | $GREP ^.:`
14177   new_path="$path"
14178   if test "x$has_colon" = x; then
14179     # Not in mixed or Windows style, start by that.
14180     new_path=`cmd //c echo $path`
14181   fi
14182 
14183 
14184   input_path="$new_path"
14185   # Check if we need to convert this using DOS-style short mode. If the path
14186   # contains just simple characters, use it. Otherwise (spaces, weird characters),
14187   # take no chances and rewrite it.
14188   # Note: m4 eats our [], so we need to use [ and ] instead.
14189   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14190   if test "x$has_forbidden_chars" != x; then
14191     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14192     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14193   fi
14194 
14195 
14196   windows_path="$new_path"
14197   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14198     unix_path=`$CYGPATH -u "$windows_path"`
14199     new_path="$unix_path"
14200   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14201     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14202     new_path="$unix_path"
14203   fi
14204 
14205   if test "x$path" != "x$new_path"; then
14206     BOOT_JDK="$new_path"
14207     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14208 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14209   fi
14210 
14211   # Save the first 10 bytes of this path to the storage, so fixpath can work.
14212   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14213 
14214   else
14215     # We're on a posix platform. Hooray! :)
14216     path="$BOOT_JDK"
14217 
14218     if test ! -f "$path" && test ! -d "$path"; then
14219       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14220     fi
14221 
14222     has_space=`$ECHO "$path" | $GREP " "`
14223     if test "x$has_space" != x; then
14224       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14225 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14226       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14227     fi
14228   fi
14229 
14230               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14231 $as_echo_n "checking for Boot JDK... " >&6; }
14232               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14233 $as_echo "$BOOT_JDK" >&6; }
14234               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14235 $as_echo_n "checking Boot JDK version... " >&6; }
14236               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14237               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14238 $as_echo "$BOOT_JDK_VERSION" >&6; }
14239             fi # end check jdk version
14240           fi # end check rt.jar
14241         fi # end check javac
14242       fi # end check java
14243     fi # end check boot jdk found
14244   fi
14245 
14246   elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
14247 
14248   if test "x$BOOT_JDK_FOUND" = xno; then
14249     # Now execute the test
14250 
14251   BOOT_JDK_PREFIX="/Library/Java/JavaVirtualMachines"
14252   BOOT_JDK_SUFFIX="/Contents/Home"
14253   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
14254   if test "x$ALL_JDKS_FOUND" != x; then
14255     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
14256 
14257   if test "x$BOOT_JDK_FOUND" = xno; then
14258     # Now execute the test
14259 
14260         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
14261         if test -d "$BOOT_JDK"; then
14262           BOOT_JDK_FOUND=maybe
14263           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
14264 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
14265         fi
14266 
14267 
14268     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14269     if test "x$BOOT_JDK_FOUND" = xmaybe; then
14270       # Do we have a bin/java?
14271       if test ! -x "$BOOT_JDK/bin/java"; then
14272         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14273 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14274         BOOT_JDK_FOUND=no
14275       else
14276         # Do we have a bin/javac?
14277         if test ! -x "$BOOT_JDK/bin/javac"; then
14278           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14279 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14280           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14281 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14282           BOOT_JDK_FOUND=no
14283         else
14284           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14285           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14286             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14287 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14288             BOOT_JDK_FOUND=no
14289           else
14290             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14291             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14292 
14293             # Extra M4 quote needed to protect [] in grep expression.
14294             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14295             if test "x$FOUND_VERSION_78" = x; then
14296               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14297 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14298               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14299 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14300               BOOT_JDK_FOUND=no
14301             else
14302               # We're done! :-)
14303               BOOT_JDK_FOUND=yes
14304 
14305   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14306 
14307   # Input might be given as Windows format, start by converting to
14308   # unix format.
14309   path="$BOOT_JDK"
14310   new_path=`$CYGPATH -u "$path"`
14311 
14312   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14313   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14314   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14315   # "foo.exe" is OK but "foo" is an error.
14316   #
14317   # This test is therefore slightly more accurate than "test -f" to check for file precense.
14318   # It is also a way to make sure we got the proper file name for the real test later on.
14319   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14320   if test "x$test_shortpath" = x; then
14321     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14322 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14323     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14324   fi
14325 
14326   # Call helper function which possibly converts this using DOS-style short mode.
14327   # If so, the updated path is stored in $new_path.
14328 
14329   input_path="$new_path"
14330   # Check if we need to convert this using DOS-style short mode. If the path
14331   # contains just simple characters, use it. Otherwise (spaces, weird characters),
14332   # take no chances and rewrite it.
14333   # Note: m4 eats our [], so we need to use [ and ] instead.
14334   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14335   if test "x$has_forbidden_chars" != x; then
14336     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14337     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14338     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14339     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14340       # Going to short mode and back again did indeed matter. Since short mode is
14341       # case insensitive, let's make it lowercase to improve readability.
14342       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14343       # Now convert it back to Unix-stile (cygpath)
14344       input_path=`$CYGPATH -u "$shortmode_path"`
14345       new_path="$input_path"
14346     fi
14347   fi
14348 
14349   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14350   if test "x$test_cygdrive_prefix" = x; then
14351     # As a simple fix, exclude /usr/bin since it's not a real path.
14352     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14353       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14354       # a path prefixed by /cygdrive for fixpath to work.
14355       new_path="$CYGWIN_ROOT_PATH$input_path"
14356     fi
14357   fi
14358 
14359 
14360   if test "x$path" != "x$new_path"; then
14361     BOOT_JDK="$new_path"
14362     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14363 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14364   fi
14365 
14366   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14367 
14368   path="$BOOT_JDK"
14369   has_colon=`$ECHO $path | $GREP ^.:`
14370   new_path="$path"
14371   if test "x$has_colon" = x; then
14372     # Not in mixed or Windows style, start by that.
14373     new_path=`cmd //c echo $path`
14374   fi
14375 
14376 
14377   input_path="$new_path"
14378   # Check if we need to convert this using DOS-style short mode. If the path
14379   # contains just simple characters, use it. Otherwise (spaces, weird characters),
14380   # take no chances and rewrite it.
14381   # Note: m4 eats our [], so we need to use [ and ] instead.
14382   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14383   if test "x$has_forbidden_chars" != x; then
14384     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14385     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14386   fi
14387 
14388 
14389   windows_path="$new_path"
14390   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14391     unix_path=`$CYGPATH -u "$windows_path"`
14392     new_path="$unix_path"
14393   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14394     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14395     new_path="$unix_path"
14396   fi
14397 
14398   if test "x$path" != "x$new_path"; then
14399     BOOT_JDK="$new_path"
14400     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14401 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14402   fi
14403 
14404   # Save the first 10 bytes of this path to the storage, so fixpath can work.
14405   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14406 
14407   else
14408     # We're on a posix platform. Hooray! :)
14409     path="$BOOT_JDK"
14410 
14411     if test ! -f "$path" && test ! -d "$path"; then
14412       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14413     fi
14414 
14415     has_space=`$ECHO "$path" | $GREP " "`
14416     if test "x$has_space" != x; then
14417       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14418 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14419       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14420     fi
14421   fi
14422 
14423               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14424 $as_echo_n "checking for Boot JDK... " >&6; }
14425               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14426 $as_echo "$BOOT_JDK" >&6; }
14427               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14428 $as_echo_n "checking Boot JDK version... " >&6; }
14429               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14430               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14431 $as_echo "$BOOT_JDK_VERSION" >&6; }
14432             fi # end check jdk version
14433           fi # end check rt.jar
14434         fi # end check javac
14435       fi # end check java
14436     fi # end check boot jdk found
14437   fi
14438 
14439     done
14440   fi
14441 
14442 
14443     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14444     if test "x$BOOT_JDK_FOUND" = xmaybe; then
14445       # Do we have a bin/java?
14446       if test ! -x "$BOOT_JDK/bin/java"; then
14447         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14448 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14449         BOOT_JDK_FOUND=no
14450       else
14451         # Do we have a bin/javac?
14452         if test ! -x "$BOOT_JDK/bin/javac"; then
14453           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14454 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14455           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14456 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14457           BOOT_JDK_FOUND=no
14458         else
14459           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14460           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14461             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14462 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14463             BOOT_JDK_FOUND=no
14464           else
14465             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14466             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14467 
14468             # Extra M4 quote needed to protect [] in grep expression.
14469             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14470             if test "x$FOUND_VERSION_78" = x; then
14471               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14472 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14473               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14474 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14475               BOOT_JDK_FOUND=no
14476             else
14477               # We're done! :-)
14478               BOOT_JDK_FOUND=yes
14479 
14480   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14481 
14482   # Input might be given as Windows format, start by converting to
14483   # unix format.
14484   path="$BOOT_JDK"
14485   new_path=`$CYGPATH -u "$path"`
14486 
14487   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14488   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14489   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14490   # "foo.exe" is OK but "foo" is an error.
14491   #
14492   # This test is therefore slightly more accurate than "test -f" to check for file precense.
14493   # It is also a way to make sure we got the proper file name for the real test later on.
14494   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14495   if test "x$test_shortpath" = x; then
14496     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14497 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14498     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14499   fi
14500 
14501   # Call helper function which possibly converts this using DOS-style short mode.
14502   # If so, the updated path is stored in $new_path.
14503 
14504   input_path="$new_path"
14505   # Check if we need to convert this using DOS-style short mode. If the path
14506   # contains just simple characters, use it. Otherwise (spaces, weird characters),
14507   # take no chances and rewrite it.
14508   # Note: m4 eats our [], so we need to use [ and ] instead.
14509   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14510   if test "x$has_forbidden_chars" != x; then
14511     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14512     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14513     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14514     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14515       # Going to short mode and back again did indeed matter. Since short mode is
14516       # case insensitive, let's make it lowercase to improve readability.
14517       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14518       # Now convert it back to Unix-stile (cygpath)
14519       input_path=`$CYGPATH -u "$shortmode_path"`
14520       new_path="$input_path"
14521     fi
14522   fi
14523 
14524   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14525   if test "x$test_cygdrive_prefix" = x; then
14526     # As a simple fix, exclude /usr/bin since it's not a real path.
14527     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14528       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14529       # a path prefixed by /cygdrive for fixpath to work.
14530       new_path="$CYGWIN_ROOT_PATH$input_path"
14531     fi
14532   fi
14533 
14534 
14535   if test "x$path" != "x$new_path"; then
14536     BOOT_JDK="$new_path"
14537     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14538 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14539   fi
14540 
14541   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14542 
14543   path="$BOOT_JDK"
14544   has_colon=`$ECHO $path | $GREP ^.:`
14545   new_path="$path"
14546   if test "x$has_colon" = x; then
14547     # Not in mixed or Windows style, start by that.
14548     new_path=`cmd //c echo $path`
14549   fi
14550 
14551 
14552   input_path="$new_path"
14553   # Check if we need to convert this using DOS-style short mode. If the path
14554   # contains just simple characters, use it. Otherwise (spaces, weird characters),
14555   # take no chances and rewrite it.
14556   # Note: m4 eats our [], so we need to use [ and ] instead.
14557   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14558   if test "x$has_forbidden_chars" != x; then
14559     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14560     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14561   fi
14562 
14563 
14564   windows_path="$new_path"
14565   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14566     unix_path=`$CYGPATH -u "$windows_path"`
14567     new_path="$unix_path"
14568   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14569     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14570     new_path="$unix_path"
14571   fi
14572 
14573   if test "x$path" != "x$new_path"; then
14574     BOOT_JDK="$new_path"
14575     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14576 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14577   fi
14578 
14579   # Save the first 10 bytes of this path to the storage, so fixpath can work.
14580   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14581 
14582   else
14583     # We're on a posix platform. Hooray! :)
14584     path="$BOOT_JDK"
14585 
14586     if test ! -f "$path" && test ! -d "$path"; then
14587       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14588     fi
14589 
14590     has_space=`$ECHO "$path" | $GREP " "`
14591     if test "x$has_space" != x; then
14592       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14593 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14594       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14595     fi
14596   fi
14597 
14598               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14599 $as_echo_n "checking for Boot JDK... " >&6; }
14600               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14601 $as_echo "$BOOT_JDK" >&6; }
14602               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14603 $as_echo_n "checking Boot JDK version... " >&6; }
14604               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14605               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14606 $as_echo "$BOOT_JDK_VERSION" >&6; }
14607             fi # end check jdk version
14608           fi # end check rt.jar
14609         fi # end check javac
14610       fi # end check java
14611     fi # end check boot jdk found
14612   fi
14613 
14614 
14615   if test "x$BOOT_JDK_FOUND" = xno; then
14616     # Now execute the test
14617 
14618   BOOT_JDK_PREFIX="/System/Library/Java/JavaVirtualMachines"
14619   BOOT_JDK_SUFFIX="/Contents/Home"
14620   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
14621   if test "x$ALL_JDKS_FOUND" != x; then
14622     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
14623 
14624   if test "x$BOOT_JDK_FOUND" = xno; then
14625     # Now execute the test
14626 
14627         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
14628         if test -d "$BOOT_JDK"; then
14629           BOOT_JDK_FOUND=maybe
14630           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
14631 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
14632         fi
14633 
14634 
14635     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14636     if test "x$BOOT_JDK_FOUND" = xmaybe; then
14637       # Do we have a bin/java?
14638       if test ! -x "$BOOT_JDK/bin/java"; then
14639         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14640 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14641         BOOT_JDK_FOUND=no
14642       else
14643         # Do we have a bin/javac?
14644         if test ! -x "$BOOT_JDK/bin/javac"; then
14645           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14646 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14647           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14648 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14649           BOOT_JDK_FOUND=no
14650         else
14651           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14652           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14653             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14654 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14655             BOOT_JDK_FOUND=no
14656           else
14657             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14658             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14659 
14660             # Extra M4 quote needed to protect [] in grep expression.
14661             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14662             if test "x$FOUND_VERSION_78" = x; then
14663               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14664 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14665               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14666 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14667               BOOT_JDK_FOUND=no
14668             else
14669               # We're done! :-)
14670               BOOT_JDK_FOUND=yes
14671 
14672   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14673 
14674   # Input might be given as Windows format, start by converting to
14675   # unix format.
14676   path="$BOOT_JDK"
14677   new_path=`$CYGPATH -u "$path"`
14678 
14679   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14680   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14681   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14682   # "foo.exe" is OK but "foo" is an error.
14683   #
14684   # This test is therefore slightly more accurate than "test -f" to check for file precense.
14685   # It is also a way to make sure we got the proper file name for the real test later on.
14686   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14687   if test "x$test_shortpath" = x; then
14688     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14689 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14690     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14691   fi
14692 
14693   # Call helper function which possibly converts this using DOS-style short mode.
14694   # If so, the updated path is stored in $new_path.
14695 
14696   input_path="$new_path"
14697   # Check if we need to convert this using DOS-style short mode. If the path
14698   # contains just simple characters, use it. Otherwise (spaces, weird characters),
14699   # take no chances and rewrite it.
14700   # Note: m4 eats our [], so we need to use [ and ] instead.
14701   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14702   if test "x$has_forbidden_chars" != x; then
14703     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14704     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14705     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14706     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14707       # Going to short mode and back again did indeed matter. Since short mode is
14708       # case insensitive, let's make it lowercase to improve readability.
14709       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14710       # Now convert it back to Unix-stile (cygpath)
14711       input_path=`$CYGPATH -u "$shortmode_path"`
14712       new_path="$input_path"
14713     fi
14714   fi
14715 
14716   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14717   if test "x$test_cygdrive_prefix" = x; then
14718     # As a simple fix, exclude /usr/bin since it's not a real path.
14719     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14720       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14721       # a path prefixed by /cygdrive for fixpath to work.
14722       new_path="$CYGWIN_ROOT_PATH$input_path"
14723     fi
14724   fi
14725 
14726 
14727   if test "x$path" != "x$new_path"; then
14728     BOOT_JDK="$new_path"
14729     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14730 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14731   fi
14732 
14733   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14734 
14735   path="$BOOT_JDK"
14736   has_colon=`$ECHO $path | $GREP ^.:`
14737   new_path="$path"
14738   if test "x$has_colon" = x; then
14739     # Not in mixed or Windows style, start by that.
14740     new_path=`cmd //c echo $path`
14741   fi
14742 
14743 
14744   input_path="$new_path"
14745   # Check if we need to convert this using DOS-style short mode. If the path
14746   # contains just simple characters, use it. Otherwise (spaces, weird characters),
14747   # take no chances and rewrite it.
14748   # Note: m4 eats our [], so we need to use [ and ] instead.
14749   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14750   if test "x$has_forbidden_chars" != x; then
14751     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14752     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14753   fi
14754 
14755 
14756   windows_path="$new_path"
14757   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14758     unix_path=`$CYGPATH -u "$windows_path"`
14759     new_path="$unix_path"
14760   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14761     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14762     new_path="$unix_path"
14763   fi
14764 
14765   if test "x$path" != "x$new_path"; then
14766     BOOT_JDK="$new_path"
14767     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14768 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14769   fi
14770 
14771   # Save the first 10 bytes of this path to the storage, so fixpath can work.
14772   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14773 
14774   else
14775     # We're on a posix platform. Hooray! :)
14776     path="$BOOT_JDK"
14777 
14778     if test ! -f "$path" && test ! -d "$path"; then
14779       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14780     fi
14781 
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   fi
14789 
14790               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14791 $as_echo_n "checking for Boot JDK... " >&6; }
14792               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14793 $as_echo "$BOOT_JDK" >&6; }
14794               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14795 $as_echo_n "checking Boot JDK version... " >&6; }
14796               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14797               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14798 $as_echo "$BOOT_JDK_VERSION" >&6; }
14799             fi # end check jdk version
14800           fi # end check rt.jar
14801         fi # end check javac
14802       fi # end check java
14803     fi # end check boot jdk found
14804   fi
14805 
14806     done
14807   fi
14808 
14809 
14810     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14811     if test "x$BOOT_JDK_FOUND" = xmaybe; then
14812       # Do we have a bin/java?
14813       if test ! -x "$BOOT_JDK/bin/java"; then
14814         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14815 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14816         BOOT_JDK_FOUND=no
14817       else
14818         # Do we have a bin/javac?
14819         if test ! -x "$BOOT_JDK/bin/javac"; then
14820           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14821 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14822           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14823 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14824           BOOT_JDK_FOUND=no
14825         else
14826           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14827           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14828             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14829 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14830             BOOT_JDK_FOUND=no
14831           else
14832             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14833             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14834 
14835             # Extra M4 quote needed to protect [] in grep expression.
14836             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14837             if test "x$FOUND_VERSION_78" = x; then
14838               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14839 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14840               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14841 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14842               BOOT_JDK_FOUND=no
14843             else
14844               # We're done! :-)
14845               BOOT_JDK_FOUND=yes
14846 
14847   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14848 
14849   # Input might be given as Windows format, start by converting to
14850   # unix format.
14851   path="$BOOT_JDK"
14852   new_path=`$CYGPATH -u "$path"`
14853 
14854   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14855   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14856   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14857   # "foo.exe" is OK but "foo" is an error.
14858   #
14859   # This test is therefore slightly more accurate than "test -f" to check for file precense.
14860   # It is also a way to make sure we got the proper file name for the real test later on.
14861   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14862   if test "x$test_shortpath" = x; then
14863     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14864 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14865     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14866   fi
14867 
14868   # Call helper function which possibly converts this using DOS-style short mode.
14869   # If so, the updated path is stored in $new_path.
14870 
14871   input_path="$new_path"
14872   # Check if we need to convert this using DOS-style short mode. If the path
14873   # contains just simple characters, use it. Otherwise (spaces, weird characters),
14874   # take no chances and rewrite it.
14875   # Note: m4 eats our [], so we need to use [ and ] instead.
14876   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14877   if test "x$has_forbidden_chars" != x; then
14878     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14879     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14880     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14881     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14882       # Going to short mode and back again did indeed matter. Since short mode is
14883       # case insensitive, let's make it lowercase to improve readability.
14884       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14885       # Now convert it back to Unix-stile (cygpath)
14886       input_path=`$CYGPATH -u "$shortmode_path"`
14887       new_path="$input_path"
14888     fi
14889   fi
14890 
14891   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14892   if test "x$test_cygdrive_prefix" = x; then
14893     # As a simple fix, exclude /usr/bin since it's not a real path.
14894     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14895       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14896       # a path prefixed by /cygdrive for fixpath to work.
14897       new_path="$CYGWIN_ROOT_PATH$input_path"
14898     fi
14899   fi
14900 
14901 
14902   if test "x$path" != "x$new_path"; then
14903     BOOT_JDK="$new_path"
14904     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14905 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14906   fi
14907 
14908   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14909 
14910   path="$BOOT_JDK"
14911   has_colon=`$ECHO $path | $GREP ^.:`
14912   new_path="$path"
14913   if test "x$has_colon" = x; then
14914     # Not in mixed or Windows style, start by that.
14915     new_path=`cmd //c echo $path`
14916   fi
14917 
14918 
14919   input_path="$new_path"
14920   # Check if we need to convert this using DOS-style short mode. If the path
14921   # contains just simple characters, use it. Otherwise (spaces, weird characters),
14922   # take no chances and rewrite it.
14923   # Note: m4 eats our [], so we need to use [ and ] instead.
14924   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14925   if test "x$has_forbidden_chars" != x; then
14926     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14927     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14928   fi
14929 
14930 
14931   windows_path="$new_path"
14932   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14933     unix_path=`$CYGPATH -u "$windows_path"`
14934     new_path="$unix_path"
14935   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14936     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14937     new_path="$unix_path"
14938   fi
14939 
14940   if test "x$path" != "x$new_path"; then
14941     BOOT_JDK="$new_path"
14942     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14943 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14944   fi
14945 
14946   # Save the first 10 bytes of this path to the storage, so fixpath can work.
14947   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14948 
14949   else
14950     # We're on a posix platform. Hooray! :)
14951     path="$BOOT_JDK"
14952 
14953     if test ! -f "$path" && test ! -d "$path"; then
14954       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14955     fi
14956 
14957     has_space=`$ECHO "$path" | $GREP " "`
14958     if test "x$has_space" != x; then
14959       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14960 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14961       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14962     fi
14963   fi
14964 
14965               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14966 $as_echo_n "checking for Boot JDK... " >&6; }
14967               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14968 $as_echo "$BOOT_JDK" >&6; }
14969               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14970 $as_echo_n "checking Boot JDK version... " >&6; }
14971               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14972               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14973 $as_echo "$BOOT_JDK_VERSION" >&6; }
14974             fi # end check jdk version
14975           fi # end check rt.jar
14976         fi # end check javac
14977       fi # end check java
14978     fi # end check boot jdk found
14979   fi
14980 
14981   elif test "x$OPENJDK_TARGET_OS" = xlinux; then
14982 
14983   if test "x$BOOT_JDK_FOUND" = xno; then
14984     # Now execute the test
14985 
14986   BOOT_JDK_PREFIX="/usr/lib/jvm"
14987   BOOT_JDK_SUFFIX=""
14988   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
14989   if test "x$ALL_JDKS_FOUND" != x; then
14990     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
14991 
14992   if test "x$BOOT_JDK_FOUND" = xno; then
14993     # Now execute the test
14994 
14995         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
14996         if test -d "$BOOT_JDK"; then
14997           BOOT_JDK_FOUND=maybe
14998           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
14999 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
15000         fi
15001 
15002 
15003     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
15004     if test "x$BOOT_JDK_FOUND" = xmaybe; then
15005       # Do we have a bin/java?
15006       if test ! -x "$BOOT_JDK/bin/java"; then
15007         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
15008 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
15009         BOOT_JDK_FOUND=no
15010       else
15011         # Do we have a bin/javac?
15012         if test ! -x "$BOOT_JDK/bin/javac"; then
15013           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
15014 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
15015           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
15016 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
15017           BOOT_JDK_FOUND=no
15018         else
15019           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
15020           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
15021             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
15022 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
15023             BOOT_JDK_FOUND=no
15024           else
15025             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
15026             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
15027 
15028             # Extra M4 quote needed to protect [] in grep expression.
15029             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
15030             if test "x$FOUND_VERSION_78" = x; then
15031               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
15032 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
15033               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
15034 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
15035               BOOT_JDK_FOUND=no
15036             else
15037               # We're done! :-)
15038               BOOT_JDK_FOUND=yes
15039 
15040   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15041 
15042   # Input might be given as Windows format, start by converting to
15043   # unix format.
15044   path="$BOOT_JDK"
15045   new_path=`$CYGPATH -u "$path"`
15046 
15047   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15048   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15049   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15050   # "foo.exe" is OK but "foo" is an error.
15051   #
15052   # This test is therefore slightly more accurate than "test -f" to check for file precense.
15053   # It is also a way to make sure we got the proper file name for the real test later on.
15054   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15055   if test "x$test_shortpath" = x; then
15056     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15057 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15058     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
15059   fi
15060 
15061   # Call helper function which possibly converts this using DOS-style short mode.
15062   # If so, the updated path is stored in $new_path.
15063 
15064   input_path="$new_path"
15065   # Check if we need to convert this using DOS-style short mode. If the path
15066   # contains just simple characters, use it. Otherwise (spaces, weird characters),
15067   # take no chances and rewrite it.
15068   # Note: m4 eats our [], so we need to use [ and ] instead.
15069   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15070   if test "x$has_forbidden_chars" != x; then
15071     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15072     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15073     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15074     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15075       # Going to short mode and back again did indeed matter. Since short mode is
15076       # case insensitive, let's make it lowercase to improve readability.
15077       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15078       # Now convert it back to Unix-stile (cygpath)
15079       input_path=`$CYGPATH -u "$shortmode_path"`
15080       new_path="$input_path"
15081     fi
15082   fi
15083 
15084   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15085   if test "x$test_cygdrive_prefix" = x; then
15086     # As a simple fix, exclude /usr/bin since it's not a real path.
15087     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15088       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15089       # a path prefixed by /cygdrive for fixpath to work.
15090       new_path="$CYGWIN_ROOT_PATH$input_path"
15091     fi
15092   fi
15093 
15094 
15095   if test "x$path" != "x$new_path"; then
15096     BOOT_JDK="$new_path"
15097     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15098 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15099   fi
15100 
15101   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15102 
15103   path="$BOOT_JDK"
15104   has_colon=`$ECHO $path | $GREP ^.:`
15105   new_path="$path"
15106   if test "x$has_colon" = x; then
15107     # Not in mixed or Windows style, start by that.
15108     new_path=`cmd //c echo $path`
15109   fi
15110 
15111 
15112   input_path="$new_path"
15113   # Check if we need to convert this using DOS-style short mode. If the path
15114   # contains just simple characters, use it. Otherwise (spaces, weird characters),
15115   # take no chances and rewrite it.
15116   # Note: m4 eats our [], so we need to use [ and ] instead.
15117   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15118   if test "x$has_forbidden_chars" != x; then
15119     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15120     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15121   fi
15122 
15123 
15124   windows_path="$new_path"
15125   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15126     unix_path=`$CYGPATH -u "$windows_path"`
15127     new_path="$unix_path"
15128   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15129     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15130     new_path="$unix_path"
15131   fi
15132 
15133   if test "x$path" != "x$new_path"; then
15134     BOOT_JDK="$new_path"
15135     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15136 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15137   fi
15138 
15139   # Save the first 10 bytes of this path to the storage, so fixpath can work.
15140   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15141 
15142   else
15143     # We're on a posix platform. Hooray! :)
15144     path="$BOOT_JDK"
15145 
15146     if test ! -f "$path" && test ! -d "$path"; then
15147       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
15148     fi
15149 
15150     has_space=`$ECHO "$path" | $GREP " "`
15151     if test "x$has_space" != x; then
15152       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15153 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15154       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15155     fi
15156   fi
15157 
15158               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
15159 $as_echo_n "checking for Boot JDK... " >&6; }
15160               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
15161 $as_echo "$BOOT_JDK" >&6; }
15162               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
15163 $as_echo_n "checking Boot JDK version... " >&6; }
15164               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
15165               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
15166 $as_echo "$BOOT_JDK_VERSION" >&6; }
15167             fi # end check jdk version
15168           fi # end check rt.jar
15169         fi # end check javac
15170       fi # end check java
15171     fi # end check boot jdk found
15172   fi
15173 
15174     done
15175   fi
15176 
15177 
15178     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
15179     if test "x$BOOT_JDK_FOUND" = xmaybe; then
15180       # Do we have a bin/java?
15181       if test ! -x "$BOOT_JDK/bin/java"; then
15182         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
15183 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
15184         BOOT_JDK_FOUND=no
15185       else
15186         # Do we have a bin/javac?
15187         if test ! -x "$BOOT_JDK/bin/javac"; then
15188           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
15189 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
15190           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
15191 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
15192           BOOT_JDK_FOUND=no
15193         else
15194           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
15195           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
15196             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
15197 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
15198             BOOT_JDK_FOUND=no
15199           else
15200             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
15201             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
15202 
15203             # Extra M4 quote needed to protect [] in grep expression.
15204             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
15205             if test "x$FOUND_VERSION_78" = x; then
15206               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
15207 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
15208               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
15209 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
15210               BOOT_JDK_FOUND=no
15211             else
15212               # We're done! :-)
15213               BOOT_JDK_FOUND=yes
15214 
15215   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15216 
15217   # Input might be given as Windows format, start by converting to
15218   # unix format.
15219   path="$BOOT_JDK"
15220   new_path=`$CYGPATH -u "$path"`
15221 
15222   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15223   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15224   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15225   # "foo.exe" is OK but "foo" is an error.
15226   #
15227   # This test is therefore slightly more accurate than "test -f" to check for file precense.
15228   # It is also a way to make sure we got the proper file name for the real test later on.
15229   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15230   if test "x$test_shortpath" = x; then
15231     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15232 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15233     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
15234   fi
15235 
15236   # Call helper function which possibly converts this using DOS-style short mode.
15237   # If so, the updated path is stored in $new_path.
15238 
15239   input_path="$new_path"
15240   # Check if we need to convert this using DOS-style short mode. If the path
15241   # contains just simple characters, use it. Otherwise (spaces, weird characters),
15242   # take no chances and rewrite it.
15243   # Note: m4 eats our [], so we need to use [ and ] instead.
15244   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15245   if test "x$has_forbidden_chars" != x; then
15246     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15247     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15248     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15249     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15250       # Going to short mode and back again did indeed matter. Since short mode is
15251       # case insensitive, let's make it lowercase to improve readability.
15252       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15253       # Now convert it back to Unix-stile (cygpath)
15254       input_path=`$CYGPATH -u "$shortmode_path"`
15255       new_path="$input_path"
15256     fi
15257   fi
15258 
15259   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15260   if test "x$test_cygdrive_prefix" = x; then
15261     # As a simple fix, exclude /usr/bin since it's not a real path.
15262     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15263       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15264       # a path prefixed by /cygdrive for fixpath to work.
15265       new_path="$CYGWIN_ROOT_PATH$input_path"
15266     fi
15267   fi
15268 
15269 
15270   if test "x$path" != "x$new_path"; then
15271     BOOT_JDK="$new_path"
15272     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15273 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15274   fi
15275 
15276   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15277 
15278   path="$BOOT_JDK"
15279   has_colon=`$ECHO $path | $GREP ^.:`
15280   new_path="$path"
15281   if test "x$has_colon" = x; then
15282     # Not in mixed or Windows style, start by that.
15283     new_path=`cmd //c echo $path`
15284   fi
15285 
15286 
15287   input_path="$new_path"
15288   # Check if we need to convert this using DOS-style short mode. If the path
15289   # contains just simple characters, use it. Otherwise (spaces, weird characters),
15290   # take no chances and rewrite it.
15291   # Note: m4 eats our [], so we need to use [ and ] instead.
15292   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15293   if test "x$has_forbidden_chars" != x; then
15294     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15295     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15296   fi
15297 
15298 
15299   windows_path="$new_path"
15300   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15301     unix_path=`$CYGPATH -u "$windows_path"`
15302     new_path="$unix_path"
15303   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15304     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15305     new_path="$unix_path"
15306   fi
15307 
15308   if test "x$path" != "x$new_path"; then
15309     BOOT_JDK="$new_path"
15310     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15311 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15312   fi
15313 
15314   # Save the first 10 bytes of this path to the storage, so fixpath can work.
15315   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15316 
15317   else
15318     # We're on a posix platform. Hooray! :)
15319     path="$BOOT_JDK"
15320 
15321     if test ! -f "$path" && test ! -d "$path"; then
15322       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
15323     fi
15324 
15325     has_space=`$ECHO "$path" | $GREP " "`
15326     if test "x$has_space" != x; then
15327       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15328 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15329       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15330     fi
15331   fi
15332 
15333               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
15334 $as_echo_n "checking for Boot JDK... " >&6; }
15335               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
15336 $as_echo "$BOOT_JDK" >&6; }
15337               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
15338 $as_echo_n "checking Boot JDK version... " >&6; }
15339               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
15340               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
15341 $as_echo "$BOOT_JDK_VERSION" >&6; }
15342             fi # end check jdk version
15343           fi # end check rt.jar
15344         fi # end check javac
15345       fi # end check java
15346     fi # end check boot jdk found
15347   fi
15348 
15349   fi
15350 
15351 
15352     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
15353     if test "x$BOOT_JDK_FOUND" = xmaybe; then
15354       # Do we have a bin/java?
15355       if test ! -x "$BOOT_JDK/bin/java"; then
15356         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
15357 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
15358         BOOT_JDK_FOUND=no
15359       else
15360         # Do we have a bin/javac?
15361         if test ! -x "$BOOT_JDK/bin/javac"; then
15362           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
15363 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
15364           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
15365 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
15366           BOOT_JDK_FOUND=no
15367         else
15368           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
15369           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
15370             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
15371 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
15372             BOOT_JDK_FOUND=no
15373           else
15374             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
15375             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
15376 
15377             # Extra M4 quote needed to protect [] in grep expression.
15378             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
15379             if test "x$FOUND_VERSION_78" = x; then
15380               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
15381 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
15382               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
15383 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
15384               BOOT_JDK_FOUND=no
15385             else
15386               # We're done! :-)
15387               BOOT_JDK_FOUND=yes
15388 
15389   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15390 
15391   # Input might be given as Windows format, start by converting to
15392   # unix format.
15393   path="$BOOT_JDK"
15394   new_path=`$CYGPATH -u "$path"`
15395 
15396   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15397   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15398   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15399   # "foo.exe" is OK but "foo" is an error.
15400   #
15401   # This test is therefore slightly more accurate than "test -f" to check for file precense.
15402   # It is also a way to make sure we got the proper file name for the real test later on.
15403   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15404   if test "x$test_shortpath" = x; then
15405     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15406 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15407     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
15408   fi
15409 
15410   # Call helper function which possibly converts this using DOS-style short mode.
15411   # If so, the updated path is stored in $new_path.
15412 
15413   input_path="$new_path"
15414   # Check if we need to convert this using DOS-style short mode. If the path
15415   # contains just simple characters, use it. Otherwise (spaces, weird characters),
15416   # take no chances and rewrite it.
15417   # Note: m4 eats our [], so we need to use [ and ] instead.
15418   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15419   if test "x$has_forbidden_chars" != x; then
15420     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15421     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15422     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15423     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15424       # Going to short mode and back again did indeed matter. Since short mode is
15425       # case insensitive, let's make it lowercase to improve readability.
15426       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15427       # Now convert it back to Unix-stile (cygpath)
15428       input_path=`$CYGPATH -u "$shortmode_path"`
15429       new_path="$input_path"
15430     fi
15431   fi
15432 
15433   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15434   if test "x$test_cygdrive_prefix" = x; then
15435     # As a simple fix, exclude /usr/bin since it's not a real path.
15436     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15437       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15438       # a path prefixed by /cygdrive for fixpath to work.
15439       new_path="$CYGWIN_ROOT_PATH$input_path"
15440     fi
15441   fi
15442 
15443 
15444   if test "x$path" != "x$new_path"; then
15445     BOOT_JDK="$new_path"
15446     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15447 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15448   fi
15449 
15450   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15451 
15452   path="$BOOT_JDK"
15453   has_colon=`$ECHO $path | $GREP ^.:`
15454   new_path="$path"
15455   if test "x$has_colon" = x; then
15456     # Not in mixed or Windows style, start by that.
15457     new_path=`cmd //c echo $path`
15458   fi
15459 
15460 
15461   input_path="$new_path"
15462   # Check if we need to convert this using DOS-style short mode. If the path
15463   # contains just simple characters, use it. Otherwise (spaces, weird characters),
15464   # take no chances and rewrite it.
15465   # Note: m4 eats our [], so we need to use [ and ] instead.
15466   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15467   if test "x$has_forbidden_chars" != x; then
15468     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15469     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15470   fi
15471 
15472 
15473   windows_path="$new_path"
15474   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15475     unix_path=`$CYGPATH -u "$windows_path"`
15476     new_path="$unix_path"
15477   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15478     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15479     new_path="$unix_path"
15480   fi
15481 
15482   if test "x$path" != "x$new_path"; then
15483     BOOT_JDK="$new_path"
15484     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15485 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15486   fi
15487 
15488   # Save the first 10 bytes of this path to the storage, so fixpath can work.
15489   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15490 
15491   else
15492     # We're on a posix platform. Hooray! :)
15493     path="$BOOT_JDK"
15494 
15495     if test ! -f "$path" && test ! -d "$path"; then
15496       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
15497     fi
15498 
15499     has_space=`$ECHO "$path" | $GREP " "`
15500     if test "x$has_space" != x; then
15501       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15502 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15503       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15504     fi
15505   fi
15506 
15507               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
15508 $as_echo_n "checking for Boot JDK... " >&6; }
15509               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
15510 $as_echo "$BOOT_JDK" >&6; }
15511               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
15512 $as_echo_n "checking Boot JDK version... " >&6; }
15513               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
15514               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
15515 $as_echo "$BOOT_JDK_VERSION" >&6; }
15516             fi # end check jdk version
15517           fi # end check rt.jar
15518         fi # end check javac
15519       fi # end check java
15520     fi # end check boot jdk found
15521   fi
15522 
15523 
15524 # If we haven't found anything yet, we've truly lost. Give up.
15525 if test "x$BOOT_JDK_FOUND" = xno; then
15526 
15527     # Print a helpful message on how to acquire the necessary build dependency.
15528     # openjdk is the help tag: freetyp2, cups, pulse, alsa etc
15529     MISSING_DEPENDENCY=openjdk
15530     PKGHANDLER_COMMAND=
15531 
15532     case $PKGHANDLER in
15533         apt-get)
15534                 apt_help     $MISSING_DEPENDENCY ;;
15535     yum)
15536                 yum_help     $MISSING_DEPENDENCY ;;
15537         port)
15538                 port_help    $MISSING_DEPENDENCY ;;
15539         pkgutil)
15540                 pkgutil_help $MISSING_DEPENDENCY ;;
15541         pkgadd)
15542                 pkgadd_help  $MISSING_DEPENDENCY ;;
15543     * )
15544       break ;;
15545     esac
15546 
15547     if test "x$PKGHANDLER_COMMAND" != x; then
15548         HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
15549     fi
15550 
15551   { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find a valid Boot JDK. $HELP_MSG" >&5
15552 $as_echo "$as_me: Could not find a valid Boot JDK. $HELP_MSG" >&6;}
15553   { $as_echo "$as_me:${as_lineno-$LINENO}: This might be fixed by explicitely setting --with-boot-jdk" >&5
15554 $as_echo "$as_me: This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15555   as_fn_error $? "Cannot continue" "$LINENO" 5
15556 fi
15557 
15558 # Setup proper paths for what we found
15559 BOOT_RTJAR="$BOOT_JDK/jre/lib/rt.jar"
15560 if test ! -f "$BOOT_RTJAR"; then
15561     # On MacOSX it is called classes.jar
15562     BOOT_RTJAR="$BOOT_JDK/../Classes/classes.jar"
15563     if test -f "$BOOT_RTJAR"; then
15564       # Remove the ..
15565       BOOT_RTJAR="`cd ${BOOT_RTJAR%/*} && pwd`/${BOOT_RTJAR##*/}"
15566     fi
15567 fi
15568 BOOT_TOOLSJAR="$BOOT_JDK/lib/tools.jar"
15569 BOOT_JDK="$BOOT_JDK"
15570 
15571 
15572 
15573 
15574 # Setup tools from the Boot JDK.
15575 
15576   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
15577 $as_echo_n "checking for java in Boot JDK... " >&6; }
15578   JAVA=$BOOT_JDK/bin/java
15579   if test ! -x $JAVA; then
15580       { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15581 $as_echo "not found" >&6; }
15582       { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15583 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15584       as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
15585   fi
15586   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15587 $as_echo "ok" >&6; }
15588 
15589 
15590   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
15591 $as_echo_n "checking for javac in Boot JDK... " >&6; }
15592   JAVAC=$BOOT_JDK/bin/javac
15593   if test ! -x $JAVAC; then
15594       { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15595 $as_echo "not found" >&6; }
15596       { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15597 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15598       as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
15599   fi
15600   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15601 $as_echo "ok" >&6; }
15602 
15603 
15604   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
15605 $as_echo_n "checking for javah in Boot JDK... " >&6; }
15606   JAVAH=$BOOT_JDK/bin/javah
15607   if test ! -x $JAVAH; then
15608       { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15609 $as_echo "not found" >&6; }
15610       { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15611 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15612       as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
15613   fi
15614   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15615 $as_echo "ok" >&6; }
15616 
15617 
15618   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javap in Boot JDK" >&5
15619 $as_echo_n "checking for javap in Boot JDK... " >&6; }
15620   JAVAP=$BOOT_JDK/bin/javap
15621   if test ! -x $JAVAP; then
15622       { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15623 $as_echo "not found" >&6; }
15624       { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15625 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15626       as_fn_error $? "Could not find javap in the Boot JDK" "$LINENO" 5
15627   fi
15628   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15629 $as_echo "ok" >&6; }
15630 
15631 
15632   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
15633 $as_echo_n "checking for jar in Boot JDK... " >&6; }
15634   JAR=$BOOT_JDK/bin/jar
15635   if test ! -x $JAR; then
15636       { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15637 $as_echo "not found" >&6; }
15638       { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15639 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15640       as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
15641   fi
15642   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15643 $as_echo "ok" >&6; }
15644 
15645 
15646   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for rmic in Boot JDK" >&5
15647 $as_echo_n "checking for rmic in Boot JDK... " >&6; }
15648   RMIC=$BOOT_JDK/bin/rmic
15649   if test ! -x $RMIC; then
15650       { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15651 $as_echo "not found" >&6; }
15652       { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15653 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15654       as_fn_error $? "Could not find rmic in the Boot JDK" "$LINENO" 5
15655   fi
15656   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15657 $as_echo "ok" >&6; }
15658 
15659 
15660   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for native2ascii in Boot JDK" >&5
15661 $as_echo_n "checking for native2ascii in Boot JDK... " >&6; }
15662   NATIVE2ASCII=$BOOT_JDK/bin/native2ascii
15663   if test ! -x $NATIVE2ASCII; then
15664       { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15665 $as_echo "not found" >&6; }
15666       { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15667 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15668       as_fn_error $? "Could not find native2ascii in the Boot JDK" "$LINENO" 5
15669   fi
15670   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15671 $as_echo "ok" >&6; }
15672 
15673 
15674 # Finally, set some other options...
15675 
15676 # When compiling code to be executed by the Boot JDK, force jdk7 compatibility.
15677 BOOT_JDK_SOURCETARGET="-source 7 -target 7"
15678 
15679 
15680 
15681 
15682 ##############################################################################
15683 #
15684 # Specify options for anything that is run with the Boot JDK.
15685 #
15686 
15687 # Check whether --with-boot-jdk-jvmargs was given.
15688 if test "${with_boot_jdk_jvmargs+set}" = set; then :
15689   withval=$with_boot_jdk_jvmargs;
15690 fi
15691 
15692 
15693 if test "x$with_boot_jdk_jvmargs" = x; then
15694     # Not all JVM:s accept the same arguments on the command line.
15695     # OpenJDK specific increase in thread stack for JDK build,
15696     # well more specifically, when running javac.
15697     if test "x$BUILD_NUM_BITS" = x32; then
15698        STACK_SIZE=768
15699     else
15700        # Running Javac on a JVM on a 64-bit machine, the stack takes more space
15701        # since 64-bit pointers are pushed on the stach. Apparently, we need
15702        # to increase the stack space when javacing the JDK....
15703        STACK_SIZE=1536
15704     fi
15705 
15706     # Minimum amount of heap memory.
15707 
15708     # Test if -Xms64M is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
15709     # If so, then append -Xms64M to boot_jdk_jvmargs
15710     FOUND_WARN=`$JAVA -Xms64M -version 2>&1 | grep -i warn`
15711     FOUND_VERSION=`$JAVA -Xms64M -version 2>&1 | grep " version \""`
15712     if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15713         boot_jdk_jvmargs="$boot_jdk_jvmargs -Xms64M"
15714     fi
15715 
15716     if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
15717         # Why does macosx need more heap? Its the huge JDK batch.
15718 
15719     # Test if -Xmx1600M is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
15720     # If so, then append -Xmx1600M to boot_jdk_jvmargs
15721     FOUND_WARN=`$JAVA -Xmx1600M -version 2>&1 | grep -i warn`
15722     FOUND_VERSION=`$JAVA -Xmx1600M -version 2>&1 | grep " version \""`
15723     if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15724         boot_jdk_jvmargs="$boot_jdk_jvmargs -Xmx1600M"
15725     fi
15726 
15727     else
15728 
15729     # Test if -Xmx1100M is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
15730     # If so, then append -Xmx1100M to boot_jdk_jvmargs
15731     FOUND_WARN=`$JAVA -Xmx1100M -version 2>&1 | grep -i warn`
15732     FOUND_VERSION=`$JAVA -Xmx1100M -version 2>&1 | grep " version \""`
15733     if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15734         boot_jdk_jvmargs="$boot_jdk_jvmargs -Xmx1100M"
15735     fi
15736 
15737     fi
15738     # When is adding -client something that speeds up the JVM?
15739     # ADD_JVM_ARG_IF_OK([-client],boot_jdk_jvmargs,[$JAVA])
15740 
15741     # Test if -XX:PermSize=32m is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
15742     # If so, then append -XX:PermSize=32m to boot_jdk_jvmargs
15743     FOUND_WARN=`$JAVA -XX:PermSize=32m -version 2>&1 | grep -i warn`
15744     FOUND_VERSION=`$JAVA -XX:PermSize=32m -version 2>&1 | grep " version \""`
15745     if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15746         boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:PermSize=32m"
15747     fi
15748 
15749 
15750     # Test if -XX:MaxPermSize=160m is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
15751     # If so, then append -XX:MaxPermSize=160m to boot_jdk_jvmargs
15752     FOUND_WARN=`$JAVA -XX:MaxPermSize=160m -version 2>&1 | grep -i warn`
15753     FOUND_VERSION=`$JAVA -XX:MaxPermSize=160m -version 2>&1 | grep " version \""`
15754     if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15755         boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:MaxPermSize=160m"
15756     fi
15757 
15758 
15759     # Test if -XX:ThreadStackSize=$STACK_SIZE is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
15760     # If so, then append -XX:ThreadStackSize=$STACK_SIZE to boot_jdk_jvmargs
15761     FOUND_WARN=`$JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1 | grep -i warn`
15762     FOUND_VERSION=`$JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1 | grep " version \""`
15763     if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15764         boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:ThreadStackSize=$STACK_SIZE"
15765     fi
15766 
15767     # Disable special log output when a debug build is used as Boot JDK...
15768 
15769     # Test if -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
15770     # If so, then append -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput to boot_jdk_jvmargs
15771     FOUND_WARN=`$JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version 2>&1 | grep -i warn`
15772     FOUND_VERSION=`$JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version 2>&1 | grep " version \""`
15773     if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15774         boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput"
15775     fi
15776 
15777 fi
15778 
15779 BOOT_JDK_JVMARGS=$boot_jdk_jvmargs
15780 
15781 
15782 
15783 ###############################################################################
15784 #
15785 # Configure the sources to use. We can add or override individual directories.
15786 #
15787 ###############################################################################
15788 
15789 
15790 
15791 # Where are the sources. Any of these can be overridden
15792 # using --with-override-corba and the likes.
15793 LANGTOOLS_TOPDIR="$SRC_ROOT/langtools"
15794 CORBA_TOPDIR="$SRC_ROOT/corba"
15795 JAXP_TOPDIR="$SRC_ROOT/jaxp"
15796 JAXWS_TOPDIR="$SRC_ROOT/jaxws"
15797 HOTSPOT_TOPDIR="$SRC_ROOT/hotspot"
15798 NASHORN_TOPDIR="$SRC_ROOT/nashorn"
15799 JDK_TOPDIR="$SRC_ROOT/jdk"
15800 
15801 
15802 
15803 
15804 
15805 
15806 
15807 
15808 
15809 
15810 ###############################################################################
15811 #
15812 # Pickup additional source for a component from outside of the source root
15813 # or override source for a component.
15814 #
15815 
15816 # Check whether --with-add-source-root was given.
15817 if test "${with_add_source_root+set}" = set; then :
15818   withval=$with_add_source_root;
15819 fi
15820 
15821 
15822 
15823 # Check whether --with-override-source-root was given.
15824 if test "${with_override_source_root+set}" = set; then :
15825   withval=$with_override_source_root;
15826 fi
15827 
15828 
15829 
15830 # Check whether --with-adds-and-overrides was given.
15831 if test "${with_adds_and_overrides+set}" = set; then :
15832   withval=$with_adds_and_overrides;
15833 fi
15834 
15835 
15836 if test "x$with_adds_and_overrides" != x; then
15837     with_add_source_root="$with_adds_and_overrides/adds"
15838     with_override_source_root="$with_adds_and_overrides/overrides"
15839 fi
15840 
15841 if test "x$with_add_source_root" != x; then
15842     if ! test -d $with_add_source_root; then
15843        as_fn_error $? "Trying to use a non-existant add-source-root $with_add_source_root" "$LINENO" 5
15844     fi
15845     CURDIR="$PWD"
15846     cd "$with_add_source_root"
15847     ADD_SRC_ROOT="`pwd`"
15848     cd "$CURDIR"
15849     # Verify that the addon source root does not have any root makefiles.
15850     # If it does, then it is usually an error, prevent this.
15851     if test -f $with_add_source_root/langtools/makefiles/Makefile || \
15852        test -f $with_add_source_root/langtools/make/Makefile; then
15853         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
15854     fi
15855     if test -f $with_add_source_root/corba/makefiles/Makefile || \
15856        test -f $with_add_source_root/corba/make/Makefile; then
15857         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
15858     fi
15859     if test -f $with_add_source_root/jaxp/makefiles/Makefile || \
15860        test -f $with_add_source_root/jaxp/make/Makefile; then
15861         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
15862     fi
15863     if test -f $with_add_source_root/jaxws/makefiles/Makefile || \
15864        test -f $with_add_source_root/jaxws/make/Makefile; then
15865         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
15866     fi
15867     if test -f $with_add_source_root/hotspot/makefiles/Makefile || \
15868        test -f $with_add_source_root/hotspot/make/Makefile; then
15869         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
15870     fi
15871     if test -f $with_add_source_root/jdk/makefiles/Makefile || \
15872        test -f $with_add_source_root/jdk/make/Makefile; then
15873         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
15874     fi
15875 fi
15876 
15877 
15878 if test "x$with_override_source_root" != x; then
15879     if ! test -d $with_override_source_root; then
15880        as_fn_error $? "Trying to use a non-existant override-source-root $with_override_source_root" "$LINENO" 5
15881     fi
15882     CURDIR="$PWD"
15883     cd "$with_override_source_root"
15884     OVERRIDE_SRC_ROOT="`pwd`"
15885     cd "$CURDIR"
15886     if test -f $with_override_source_root/langtools/makefiles/Makefile || \
15887        test -f $with_override_source_root/langtools/make/Makefile; then
15888         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
15889     fi
15890     if test -f $with_override_source_root/corba/makefiles/Makefile || \
15891        test -f $with_override_source_root/corba/make/Makefile; then
15892         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
15893     fi
15894     if test -f $with_override_source_root/jaxp/makefiles/Makefile || \
15895        test -f $with_override_source_root/jaxp/make/Makefile; then
15896         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
15897     fi
15898     if test -f $with_override_source_root/jaxws/makefiles/Makefile || \
15899        test -f $with_override_source_root/jaxws/make/Makefile; then
15900         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
15901     fi
15902     if test -f $with_override_source_root/hotspot/makefiles/Makefile || \
15903        test -f $with_override_source_root/hotspot/make/Makefile; then
15904         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
15905     fi
15906     if test -f $with_override_source_root/jdk/makefiles/Makefile || \
15907        test -f $with_override_source_root/jdk/make/Makefile; then
15908         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
15909     fi
15910 fi
15911 
15912 
15913 ###############################################################################
15914 #
15915 # Override a repo completely, this is used for example when you have 3 small
15916 # development sandboxes of the langtools sources and want to avoid having 3 full
15917 # OpenJDK sources checked out on disk.
15918 #
15919 # Assuming that the 3 langtools sandboxes are located here:
15920 # /home/fredrik/sandbox1/langtools
15921 # /home/fredrik/sandbox2/langtools
15922 # /home/fredrik/sandbox3/langtools
15923 #
15924 # From the source root you create build subdirs manually:
15925 #     mkdir -p build1 build2 build3
15926 # in each build directory run:
15927 #     (cd build1 && ../configure --with-override-langtools=/home/fredrik/sandbox1 && make)
15928 #     (cd build2 && ../configure --with-override-langtools=/home/fredrik/sandbox2 && make)
15929 #     (cd build3 && ../configure --with-override-langtools=/home/fredrik/sandbox3 && make)
15930 #
15931 
15932 
15933 # Check whether --with-override-langtools was given.
15934 if test "${with_override_langtools+set}" = set; then :
15935   withval=$with_override_langtools;
15936 fi
15937 
15938 
15939 
15940 # Check whether --with-override-corba was given.
15941 if test "${with_override_corba+set}" = set; then :
15942   withval=$with_override_corba;
15943 fi
15944 
15945 
15946 
15947 # Check whether --with-override-jaxp was given.
15948 if test "${with_override_jaxp+set}" = set; then :
15949   withval=$with_override_jaxp;
15950 fi
15951 
15952 
15953 
15954 # Check whether --with-override-jaxws was given.
15955 if test "${with_override_jaxws+set}" = set; then :
15956   withval=$with_override_jaxws;
15957 fi
15958 
15959 
15960 
15961 # Check whether --with-override-hotspot was given.
15962 if test "${with_override_hotspot+set}" = set; then :
15963   withval=$with_override_hotspot;
15964 fi
15965 
15966 
15967 
15968 # Check whether --with-override-jdk was given.
15969 if test "${with_override_jdk+set}" = set; then :
15970   withval=$with_override_jdk;
15971 fi
15972 
15973 
15974 if test "x$with_override_langtools" != x; then
15975     CURDIR="$PWD"
15976     cd "$with_override_langtools"
15977     LANGTOOLS_TOPDIR="`pwd`"
15978     cd "$CURDIR"
15979     if ! test -f $LANGTOOLS_TOPDIR/makefiles/Makefile; then
15980         as_fn_error $? "You have to override langtools with a full langtools repo!" "$LINENO" 5
15981     fi
15982     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if langtools should be overridden" >&5
15983 $as_echo_n "checking if langtools should be overridden... " >&6; }
15984     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $LANGTOOLS_TOPDIR" >&5
15985 $as_echo "yes with $LANGTOOLS_TOPDIR" >&6; }
15986 fi
15987 if test "x$with_override_corba" != x; then
15988     CURDIR="$PWD"
15989     cd "$with_override_corba"
15990     CORBA_TOPDIR="`pwd`"
15991     cd "$CURDIR"
15992     if ! test -f $CORBA_TOPDIR/makefiles/Makefile; then
15993         as_fn_error $? "You have to override corba with a full corba repo!" "$LINENO" 5
15994     fi
15995     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if corba should be overridden" >&5
15996 $as_echo_n "checking if corba should be overridden... " >&6; }
15997     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $CORBA_TOPDIR" >&5
15998 $as_echo "yes with $CORBA_TOPDIR" >&6; }
15999 fi
16000 if test "x$with_override_jaxp" != x; then
16001     CURDIR="$PWD"
16002     cd "$with_override_jaxp"
16003     JAXP_TOPDIR="`pwd`"
16004     cd "$CURDIR"
16005     if ! test -f $JAXP_TOPDIR/makefiles/Makefile; then
16006         as_fn_error $? "You have to override jaxp with a full jaxp repo!" "$LINENO" 5
16007     fi
16008     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jaxp should be overridden" >&5
16009 $as_echo_n "checking if jaxp should be overridden... " >&6; }
16010     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JAXP_TOPDIR" >&5
16011 $as_echo "yes with $JAXP_TOPDIR" >&6; }
16012 fi
16013 if test "x$with_override_jaxws" != x; then
16014     CURDIR="$PWD"
16015     cd "$with_override_jaxws"
16016     JAXWS_TOPDIR="`pwd`"
16017     cd "$CURDIR"
16018     if ! test -f $JAXWS_TOPDIR/makefiles/Makefile; then
16019         as_fn_error $? "You have to override jaxws with a full jaxws repo!" "$LINENO" 5
16020     fi
16021     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jaxws should be overridden" >&5
16022 $as_echo_n "checking if jaxws should be overridden... " >&6; }
16023     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JAXWS_TOPDIR" >&5
16024 $as_echo "yes with $JAXWS_TOPDIR" >&6; }
16025 fi
16026 if test "x$with_override_hotspot" != x; then
16027     CURDIR="$PWD"
16028     cd "$with_override_hotspot"
16029     HOTSPOT_TOPDIR="`pwd`"
16030     cd "$CURDIR"
16031     if ! test -f $HOTSPOT_TOPDIR/make/Makefile && \
16032        ! test -f $HOTSPOT_TOPDIR/makefiles/Makefile; then
16033         as_fn_error $? "You have to override hotspot with a full hotspot repo!" "$LINENO" 5
16034     fi
16035     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be overridden" >&5
16036 $as_echo_n "checking if hotspot should be overridden... " >&6; }
16037     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $HOTSPOT_TOPDIR" >&5
16038 $as_echo "yes with $HOTSPOT_TOPDIR" >&6; }
16039 fi
16040 if test "x$with_override_nashorn" != x; then
16041     CURDIR="$PWD"
16042     cd "$with_override_nashorn"
16043     NASHORN_TOPDIR="`pwd`"
16044     cd "$CURDIR"
16045     if ! test -f $NASHORN_TOPDIR/makefiles/BuildNashorn.gmk; then
16046         as_fn_error $? "You have to override nashorn with a full nashorn repo!" "$LINENO" 5
16047     fi
16048     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if nashorn should be overridden" >&5
16049 $as_echo_n "checking if nashorn should be overridden... " >&6; }
16050     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $NASHORN_TOPDIR" >&5
16051 $as_echo "yes with $NASHORN_TOPDIR" >&6; }
16052 fi
16053 if test "x$with_override_jdk" != x; then
16054     CURDIR="$PWD"
16055     cd "$with_override_jdk"
16056     JDK_TOPDIR="`pwd`"
16057     cd "$CURDIR"
16058     if ! test -f $JDK_TOPDIR/makefiles/Makefile; then
16059         as_fn_error $? "You have to override JDK with a full JDK repo!" "$LINENO" 5
16060     fi
16061     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if JDK should be overridden" >&5
16062 $as_echo_n "checking if JDK should be overridden... " >&6; }
16063     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JDK_TOPDIR" >&5
16064 $as_echo "yes with $JDK_TOPDIR" >&6; }
16065 fi
16066 
16067 
16068 
16069 BUILD_OUTPUT="$OUTPUT_ROOT"
16070 
16071 
16072 HOTSPOT_DIST="$OUTPUT_ROOT/hotspot/dist"
16073 BUILD_HOTSPOT=true
16074 
16075 
16076 
16077 # Check whether --with-import-hotspot was given.
16078 if test "${with_import_hotspot+set}" = set; then :
16079   withval=$with_import_hotspot;
16080 fi
16081 
16082 if test "x$with_import_hotspot" != x; then
16083     CURDIR="$PWD"
16084     cd "$with_import_hotspot"
16085     HOTSPOT_DIST="`pwd`"
16086     cd "$CURDIR"
16087     if ! (test -d $HOTSPOT_DIST/lib && test -d $HOTSPOT_DIST/jre/lib); then
16088         as_fn_error $? "You have to import hotspot from a full jdk image or hotspot build dist dir!" "$LINENO" 5
16089     fi
16090     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be imported" >&5
16091 $as_echo_n "checking if hotspot should be imported... " >&6; }
16092     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes from $HOTSPOT_DIST" >&5
16093 $as_echo "yes from $HOTSPOT_DIST" >&6; }
16094     BUILD_HOTSPOT=false
16095 fi
16096 
16097 JDK_OUTPUTDIR="$OUTPUT_ROOT/jdk"
16098 
16099 
16100 ###############################################################################
16101 #
16102 # Setup the toolchain (compilers etc), i.e. the tools that need to be
16103 # cross-compilation aware.
16104 #
16105 ###############################################################################
16106 
16107 
16108 ###############################################################################
16109 #
16110 # Configure the development tool paths and potential sysroot.
16111 #
16112 ac_ext=cpp
16113 ac_cpp='$CXXCPP $CPPFLAGS'
16114 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
16115 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
16116 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
16117 
16118 
16119 # The option used to specify the target .o,.a or .so file.
16120 # When compiling, how to specify the to be created object file.
16121 CC_OUT_OPTION='-o$(SPACE)'
16122 # When linking, how to specify the to be created executable.
16123 EXE_OUT_OPTION='-o$(SPACE)'
16124 # When linking, how to specify the to be created dynamically linkable library.
16125 LD_OUT_OPTION='-o$(SPACE)'
16126 # When archiving, how to specify the to be create static archive for object files.
16127 AR_OUT_OPTION='rcs$(SPACE)'
16128 
16129 
16130 
16131 
16132 
16133 # Locate the actual tools
16134 
16135 if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
16136 
16137   # Store path to cygwin link.exe to help excluding it when searching for
16138   # VS linker. This must be done before changing the PATH when looking for VS.
16139   # Extract the first word of "link", so it can be a program name with args.
16140 set dummy link; ac_word=$2
16141 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16142 $as_echo_n "checking for $ac_word... " >&6; }
16143 if test "${ac_cv_path_CYGWIN_LINK+set}" = set; then :
16144   $as_echo_n "(cached) " >&6
16145 else
16146   case $CYGWIN_LINK in
16147   [\\/]* | ?:[\\/]*)
16148   ac_cv_path_CYGWIN_LINK="$CYGWIN_LINK" # Let the user override the test with a path.
16149   ;;
16150   *)
16151   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16152 for as_dir in $PATH
16153 do
16154   IFS=$as_save_IFS
16155   test -z "$as_dir" && as_dir=.
16156     for ac_exec_ext in '' $ac_executable_extensions; do
16157   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
16158     ac_cv_path_CYGWIN_LINK="$as_dir/$ac_word$ac_exec_ext"
16159     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16160     break 2
16161   fi
16162 done
16163   done
16164 IFS=$as_save_IFS
16165 
16166   ;;
16167 esac
16168 fi
16169 CYGWIN_LINK=$ac_cv_path_CYGWIN_LINK
16170 if test -n "$CYGWIN_LINK"; then
16171   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_LINK" >&5
16172 $as_echo "$CYGWIN_LINK" >&6; }
16173 else
16174   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16175 $as_echo "no" >&6; }
16176 fi
16177 
16178 
16179   if test "x$CYGWIN_LINK" != x; then
16180     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the first found link.exe is actually the Cygwin link tool" >&5
16181 $as_echo_n "checking if the first found link.exe is actually the Cygwin link tool... " >&6; }
16182     "$CYGWIN_LINK" --version > /dev/null
16183     if test $? -eq 0 ; then
16184       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16185 $as_echo "yes" >&6; }
16186     else
16187       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16188 $as_echo "no" >&6; }
16189       # This might be the VS linker. Don't exclude it later on.
16190       CYGWIN_LINK=""
16191     fi
16192   fi
16193 
16194   # First-hand choice is to locate and run the vsvars bat file.
16195 
16196   if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
16197     VCVARSFILE="vc/bin/vcvars32.bat"
16198   else
16199     VCVARSFILE="vc/bin/amd64/vcvars64.bat"
16200   fi
16201 
16202   VS_ENV_CMD=""
16203   VS_ENV_ARGS=""
16204   if test "x$with_toolsdir" != x; then
16205 
16206   if test "x$VS_ENV_CMD" = x; then
16207     VS100BASE="$with_toolsdir/../.."
16208     METHOD="--with-tools-dir"
16209 
16210   windows_path="$VS100BASE"
16211   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16212     unix_path=`$CYGPATH -u "$windows_path"`
16213     VS100BASE="$unix_path"
16214   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16215     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16216     VS100BASE="$unix_path"
16217   fi
16218 
16219     if test -d "$VS100BASE"; then
16220       if test -f "$VS100BASE/$VCVARSFILE"; then
16221         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16222 $as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16223         VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16224       else
16225         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16226 $as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16227         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16228 $as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16229       fi
16230     fi
16231   fi
16232 
16233   fi
16234 
16235   if test "x$with_toolsdir" != x && test "x$VS_ENV_CMD" = x; then
16236     # Having specified an argument which is incorrect will produce an instant failure;
16237     # we should not go on looking
16238     { $as_echo "$as_me:${as_lineno-$LINENO}: The path given by --with-tools-dir does not contain a valid Visual Studio installation" >&5
16239 $as_echo "$as_me: The path given by --with-tools-dir does not contain a valid Visual Studio installation" >&6;}
16240     { $as_echo "$as_me:${as_lineno-$LINENO}: Please point to the VC/bin directory within the Visual Studio installation" >&5
16241 $as_echo "$as_me: Please point to the VC/bin directory within the Visual Studio installation" >&6;}
16242     as_fn_error $? "Cannot locate a valid Visual Studio installation" "$LINENO" 5
16243   fi
16244 
16245   if test "x$ProgramW6432" != x; then
16246 
16247   if test "x$VS_ENV_CMD" = x; then
16248     WIN_SDK_BASE="$ProgramW6432/Microsoft SDKs/Windows/v7.1/Bin"
16249     METHOD="well-known name"
16250 
16251   windows_path="$WIN_SDK_BASE"
16252   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16253     unix_path=`$CYGPATH -u "$windows_path"`
16254     WIN_SDK_BASE="$unix_path"
16255   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16256     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16257     WIN_SDK_BASE="$unix_path"
16258   fi
16259 
16260     if test -d "$WIN_SDK_BASE"; then
16261       # There have been cases of partial or broken SDK installations. A missing
16262       # lib dir is not going to work.
16263       if test ! -d "$WIN_SDK_BASE/../lib"; then
16264         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16265 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16266         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
16267 $as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
16268       elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
16269         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16270 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16271         VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
16272         if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
16273           VS_ENV_ARGS="/x86"
16274         else
16275           VS_ENV_ARGS="/x64"
16276         fi
16277       else
16278         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16279 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16280         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
16281 $as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
16282       fi
16283     fi
16284   fi
16285 
16286   fi
16287   if test "x$PROGRAMW6432" != x; then
16288 
16289   if test "x$VS_ENV_CMD" = x; then
16290     WIN_SDK_BASE="$PROGRAMW6432/Microsoft SDKs/Windows/v7.1/Bin"
16291     METHOD="well-known name"
16292 
16293   windows_path="$WIN_SDK_BASE"
16294   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16295     unix_path=`$CYGPATH -u "$windows_path"`
16296     WIN_SDK_BASE="$unix_path"
16297   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16298     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16299     WIN_SDK_BASE="$unix_path"
16300   fi
16301 
16302     if test -d "$WIN_SDK_BASE"; then
16303       # There have been cases of partial or broken SDK installations. A missing
16304       # lib dir is not going to work.
16305       if test ! -d "$WIN_SDK_BASE/../lib"; then
16306         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16307 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16308         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
16309 $as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
16310       elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
16311         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16312 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16313         VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
16314         if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
16315           VS_ENV_ARGS="/x86"
16316         else
16317           VS_ENV_ARGS="/x64"
16318         fi
16319       else
16320         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16321 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16322         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
16323 $as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
16324       fi
16325     fi
16326   fi
16327 
16328   fi
16329   if test "x$PROGRAMFILES" != x; then
16330 
16331   if test "x$VS_ENV_CMD" = x; then
16332     WIN_SDK_BASE="$PROGRAMFILES/Microsoft SDKs/Windows/v7.1/Bin"
16333     METHOD="well-known name"
16334 
16335   windows_path="$WIN_SDK_BASE"
16336   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16337     unix_path=`$CYGPATH -u "$windows_path"`
16338     WIN_SDK_BASE="$unix_path"
16339   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16340     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16341     WIN_SDK_BASE="$unix_path"
16342   fi
16343 
16344     if test -d "$WIN_SDK_BASE"; then
16345       # There have been cases of partial or broken SDK installations. A missing
16346       # lib dir is not going to work.
16347       if test ! -d "$WIN_SDK_BASE/../lib"; then
16348         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16349 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16350         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
16351 $as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
16352       elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
16353         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16354 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16355         VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
16356         if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
16357           VS_ENV_ARGS="/x86"
16358         else
16359           VS_ENV_ARGS="/x64"
16360         fi
16361       else
16362         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16363 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16364         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
16365 $as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
16366       fi
16367     fi
16368   fi
16369 
16370   fi
16371 
16372   if test "x$VS_ENV_CMD" = x; then
16373     WIN_SDK_BASE="C:/Program Files/Microsoft SDKs/Windows/v7.1/Bin"
16374     METHOD="well-known name"
16375 
16376   windows_path="$WIN_SDK_BASE"
16377   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16378     unix_path=`$CYGPATH -u "$windows_path"`
16379     WIN_SDK_BASE="$unix_path"
16380   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16381     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16382     WIN_SDK_BASE="$unix_path"
16383   fi
16384 
16385     if test -d "$WIN_SDK_BASE"; then
16386       # There have been cases of partial or broken SDK installations. A missing
16387       # lib dir is not going to work.
16388       if test ! -d "$WIN_SDK_BASE/../lib"; then
16389         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16390 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16391         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
16392 $as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
16393       elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
16394         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16395 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16396         VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
16397         if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
16398           VS_ENV_ARGS="/x86"
16399         else
16400           VS_ENV_ARGS="/x64"
16401         fi
16402       else
16403         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16404 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16405         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
16406 $as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
16407       fi
16408     fi
16409   fi
16410 
16411 
16412   if test "x$VS_ENV_CMD" = x; then
16413     WIN_SDK_BASE="C:/Program Files (x86)/Microsoft SDKs/Windows/v7.1/Bin"
16414     METHOD="well-known name"
16415 
16416   windows_path="$WIN_SDK_BASE"
16417   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16418     unix_path=`$CYGPATH -u "$windows_path"`
16419     WIN_SDK_BASE="$unix_path"
16420   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16421     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16422     WIN_SDK_BASE="$unix_path"
16423   fi
16424 
16425     if test -d "$WIN_SDK_BASE"; then
16426       # There have been cases of partial or broken SDK installations. A missing
16427       # lib dir is not going to work.
16428       if test ! -d "$WIN_SDK_BASE/../lib"; then
16429         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16430 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16431         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
16432 $as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
16433       elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
16434         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16435 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16436         VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
16437         if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
16438           VS_ENV_ARGS="/x86"
16439         else
16440           VS_ENV_ARGS="/x64"
16441         fi
16442       else
16443         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16444 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16445         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
16446 $as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
16447       fi
16448     fi
16449   fi
16450 
16451 
16452   if test "x$VS100COMNTOOLS" != x; then
16453 
16454   if test "x$VS_ENV_CMD" = x; then
16455     VS100BASE="$VS100COMNTOOLS/../.."
16456     METHOD="VS100COMNTOOLS variable"
16457 
16458   windows_path="$VS100BASE"
16459   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16460     unix_path=`$CYGPATH -u "$windows_path"`
16461     VS100BASE="$unix_path"
16462   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16463     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16464     VS100BASE="$unix_path"
16465   fi
16466 
16467     if test -d "$VS100BASE"; then
16468       if test -f "$VS100BASE/$VCVARSFILE"; then
16469         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16470 $as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16471         VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16472       else
16473         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16474 $as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16475         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16476 $as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16477       fi
16478     fi
16479   fi
16480 
16481   fi
16482   if test "x$PROGRAMFILES" != x; then
16483 
16484   if test "x$VS_ENV_CMD" = x; then
16485     VS100BASE="$PROGRAMFILES/Microsoft Visual Studio 10.0"
16486     METHOD="well-known name"
16487 
16488   windows_path="$VS100BASE"
16489   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16490     unix_path=`$CYGPATH -u "$windows_path"`
16491     VS100BASE="$unix_path"
16492   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16493     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16494     VS100BASE="$unix_path"
16495   fi
16496 
16497     if test -d "$VS100BASE"; then
16498       if test -f "$VS100BASE/$VCVARSFILE"; then
16499         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16500 $as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16501         VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16502       else
16503         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16504 $as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16505         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16506 $as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16507       fi
16508     fi
16509   fi
16510 
16511   fi
16512 
16513   if test "x$VS_ENV_CMD" = x; then
16514     VS100BASE="C:/Program Files/Microsoft Visual Studio 10.0"
16515     METHOD="well-known name"
16516 
16517   windows_path="$VS100BASE"
16518   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16519     unix_path=`$CYGPATH -u "$windows_path"`
16520     VS100BASE="$unix_path"
16521   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16522     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16523     VS100BASE="$unix_path"
16524   fi
16525 
16526     if test -d "$VS100BASE"; then
16527       if test -f "$VS100BASE/$VCVARSFILE"; then
16528         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16529 $as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16530         VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16531       else
16532         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16533 $as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16534         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16535 $as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16536       fi
16537     fi
16538   fi
16539 
16540 
16541   if test "x$VS_ENV_CMD" = x; then
16542     VS100BASE="C:/Program Files (x86)/Microsoft Visual Studio 10.0"
16543     METHOD="well-known name"
16544 
16545   windows_path="$VS100BASE"
16546   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16547     unix_path=`$CYGPATH -u "$windows_path"`
16548     VS100BASE="$unix_path"
16549   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16550     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16551     VS100BASE="$unix_path"
16552   fi
16553 
16554     if test -d "$VS100BASE"; then
16555       if test -f "$VS100BASE/$VCVARSFILE"; then
16556         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16557 $as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16558         VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16559       else
16560         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16561 $as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16562         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16563 $as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16564       fi
16565     fi
16566   fi
16567 
16568 
16569   if test "x$VS_ENV_CMD" != x; then
16570     # We have found a Visual Studio environment on disk, let's extract variables from the vsvars bat file.
16571 
16572   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16573 
16574   # First separate the path from the arguments. This will split at the first
16575   # space.
16576   complete="$VS_ENV_CMD"
16577   path="${complete%% *}"
16578   tmp="$complete EOL"
16579   arguments="${tmp#* }"
16580 
16581   # Input might be given as Windows format, start by converting to
16582   # unix format.
16583   new_path=`$CYGPATH -u "$path"`
16584 
16585   # Now try to locate executable using which
16586   new_path=`$WHICH "$new_path" 2> /dev/null`
16587   # bat and cmd files are not always considered executable in cygwin causing which
16588   # to not find them
16589   if test "x$new_path" = x \
16590            && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16591            && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16592     new_path=`$CYGPATH -u "$path"`
16593   fi
16594   if test "x$new_path" = x; then
16595     # Oops. Which didn't find the executable.
16596     # The splitting of arguments from the executable at a space might have been incorrect,
16597     # since paths with space are more likely in Windows. Give it another try with the whole
16598     # argument.
16599     path="$complete"
16600     arguments="EOL"
16601     new_path=`$CYGPATH -u "$path"`
16602     new_path=`$WHICH "$new_path" 2> /dev/null`
16603     # bat and cmd files are not always considered executable in cygwin causing which
16604     # to not find them
16605     if test "x$new_path" = x \
16606              && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16607              && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16608       new_path=`$CYGPATH -u "$path"`
16609     fi
16610     if test "x$new_path" = x; then
16611       # It's still not found. Now this is an unrecoverable error.
16612       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
16613 $as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
16614       has_space=`$ECHO "$complete" | $GREP " "`
16615       if test "x$has_space" != x; then
16616         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16617 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16618       fi
16619       as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
16620     fi
16621   fi
16622 
16623   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16624   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16625   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16626   # "foo.exe" is OK but "foo" is an error.
16627   #
16628   # This test is therefore slightly more accurate than "test -f" to check for file precense.
16629   # It is also a way to make sure we got the proper file name for the real test later on.
16630   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16631   if test "x$test_shortpath" = x; then
16632     # Short path failed, file does not exist as specified.
16633     # Try adding .exe or .cmd
16634     if test -f "${new_path}.exe"; then
16635        input_to_shortpath="${new_path}.exe"
16636     elif test -f "${new_path}.cmd"; then
16637        input_to_shortpath="${new_path}.cmd"
16638     else
16639       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&5
16640 $as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&6;}
16641       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
16642 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
16643       as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
16644     fi
16645   else
16646     input_to_shortpath="$new_path"
16647   fi
16648 
16649   # Call helper function which possibly converts this using DOS-style short mode.
16650   # If so, the updated path is stored in $new_path.
16651   new_path="$input_to_shortpath"
16652 
16653   input_path="$input_to_shortpath"
16654   # Check if we need to convert this using DOS-style short mode. If the path
16655   # contains just simple characters, use it. Otherwise (spaces, weird characters),
16656   # take no chances and rewrite it.
16657   # Note: m4 eats our [], so we need to use [ and ] instead.
16658   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16659   if test "x$has_forbidden_chars" != x; then
16660     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16661     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16662     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16663     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16664       # Going to short mode and back again did indeed matter. Since short mode is
16665       # case insensitive, let's make it lowercase to improve readability.
16666       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16667       # Now convert it back to Unix-stile (cygpath)
16668       input_path=`$CYGPATH -u "$shortmode_path"`
16669       new_path="$input_path"
16670     fi
16671   fi
16672 
16673   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16674   if test "x$test_cygdrive_prefix" = x; then
16675     # As a simple fix, exclude /usr/bin since it's not a real path.
16676     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
16677       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16678       # a path prefixed by /cygdrive for fixpath to work.
16679       new_path="$CYGWIN_ROOT_PATH$input_path"
16680     fi
16681   fi
16682 
16683   # remove trailing .exe if any
16684   new_path="${new_path/%.exe/}"
16685 
16686   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16687 
16688   # First separate the path from the arguments. This will split at the first
16689   # space.
16690   complete="$VS_ENV_CMD"
16691   path="${complete%% *}"
16692   tmp="$complete EOL"
16693   arguments="${tmp#* }"
16694 
16695   # Input might be given as Windows format, start by converting to
16696   # unix format.
16697   new_path="$path"
16698 
16699   windows_path="$new_path"
16700   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16701     unix_path=`$CYGPATH -u "$windows_path"`
16702     new_path="$unix_path"
16703   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16704     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16705     new_path="$unix_path"
16706   fi
16707 
16708 
16709   # Now try to locate executable using which
16710   new_path=`$WHICH "$new_path" 2> /dev/null`
16711 
16712   if test "x$new_path" = x; then
16713     # Oops. Which didn't find the executable.
16714     # The splitting of arguments from the executable at a space might have been incorrect,
16715     # since paths with space are more likely in Windows. Give it another try with the whole
16716     # argument.
16717     path="$complete"
16718     arguments="EOL"
16719     new_path="$path"
16720 
16721   windows_path="$new_path"
16722   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16723     unix_path=`$CYGPATH -u "$windows_path"`
16724     new_path="$unix_path"
16725   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16726     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16727     new_path="$unix_path"
16728   fi
16729 
16730 
16731     new_path=`$WHICH "$new_path" 2> /dev/null`
16732 
16733     if test "x$new_path" = x; then
16734       # It's still not found. Now this is an unrecoverable error.
16735       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
16736 $as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
16737       has_space=`$ECHO "$complete" | $GREP " "`
16738       if test "x$has_space" != x; then
16739         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16740 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16741       fi
16742       as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
16743     fi
16744   fi
16745 
16746   # Now new_path has a complete unix path to the binary
16747   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
16748     # Keep paths in /bin as-is, but remove trailing .exe if any
16749     new_path="${new_path/%.exe/}"
16750     # Do not save /bin paths to all_fixpath_prefixes!
16751   else
16752     # Not in mixed or Windows style, start by that.
16753     new_path=`cmd //c echo $new_path`
16754 
16755   input_path="$new_path"
16756   # Check if we need to convert this using DOS-style short mode. If the path
16757   # contains just simple characters, use it. Otherwise (spaces, weird characters),
16758   # take no chances and rewrite it.
16759   # Note: m4 eats our [], so we need to use [ and ] instead.
16760   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16761   if test "x$has_forbidden_chars" != x; then
16762     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16763     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16764   fi
16765 
16766     # Output is in $new_path
16767 
16768   windows_path="$new_path"
16769   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16770     unix_path=`$CYGPATH -u "$windows_path"`
16771     new_path="$unix_path"
16772   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16773     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16774     new_path="$unix_path"
16775   fi
16776 
16777     # remove trailing .exe if any
16778     new_path="${new_path/%.exe/}"
16779 
16780     # Save the first 10 bytes of this path to the storage, so fixpath can work.
16781     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16782   fi
16783 
16784   else
16785     # We're on a posix platform. Hooray! :)
16786     # First separate the path from the arguments. This will split at the first
16787     # space.
16788     complete="$VS_ENV_CMD"
16789     path="${complete%% *}"
16790     tmp="$complete EOL"
16791     arguments="${tmp#* }"
16792 
16793     # Cannot rely on the command "which" here since it doesn't always work.
16794     is_absolute_path=`$ECHO "$path" | $GREP ^/`
16795     if test -z "$is_absolute_path"; then
16796       # Path to executable is not absolute. Find it.
16797       IFS_save="$IFS"
16798       IFS=:
16799       for p in $PATH; do
16800         if test -f "$p/$path" && test -x "$p/$path"; then
16801           new_path="$p/$path"
16802           break
16803         fi
16804       done
16805       IFS="$IFS_save"
16806     else
16807       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving VS_ENV_CMD (as $path) failed, using $path directly." >&5
16808 $as_echo "$as_me: Resolving VS_ENV_CMD (as $path) failed, using $path directly." >&6;}
16809       new_path="$path"
16810     fi
16811 
16812     if test "x$new_path" = x; then
16813         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
16814 $as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
16815         has_space=`$ECHO "$complete" | $GREP " "`
16816         if test "x$has_space" != x; then
16817           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
16818 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
16819         fi
16820         as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
16821       fi
16822   fi
16823 
16824       # Now join together the path and the arguments once again
16825       if test "x$arguments" != xEOL; then
16826         new_complete="$new_path ${arguments% *}"
16827       else
16828         new_complete="$new_path"
16829       fi
16830 
16831   if test "x$complete" != "x$new_complete"; then
16832       VS_ENV_CMD="$new_complete"
16833       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting VS_ENV_CMD to \"$new_complete\"" >&5
16834 $as_echo "$as_me: Rewriting VS_ENV_CMD to \"$new_complete\"" >&6;}
16835     fi
16836 
16837 
16838     # Lets extract the variables that are set by vcvarsall.bat/vsvars32.bat/vsvars64.bat
16839     { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to extract Visual Studio environment variables" >&5
16840 $as_echo "$as_me: Trying to extract Visual Studio environment variables" >&6;}
16841     cd $OUTPUT_ROOT
16842     # FIXME: The code betweeen ---- was inlined from a separate script and is not properly adapted
16843     # to autoconf standards.
16844 
16845     #----
16846 
16847     # Cannot use the VS10 setup script directly (since it only updates the DOS subshell environment)
16848     # but calculate the difference in Cygwin environment before/after running it and then
16849     # apply the diff.
16850 
16851     if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
16852       _vs10varsall=`cygpath -a -m -s "$VS_ENV_CMD"`
16853       _dosvs10varsall=`cygpath -a -w -s $_vs10varsall`
16854       _dosbash=`cygpath -a -w -s \`which bash\`.*`
16855     else
16856       _dosvs10varsall=`cmd //c echo $VS_ENV_CMD`
16857       _dosbash=`cmd //c echo \`which bash\``
16858     fi
16859 
16860     # generate the set of exported vars before/after the vs10 setup
16861     $ECHO "@echo off"                                           >  localdevenvtmp.bat
16862     $ECHO "$_dosbash -c \"export -p\" > localdevenvtmp.export0" >> localdevenvtmp.bat
16863     $ECHO "call $_dosvs10varsall $VS_ENV_ARGS"                  >> localdevenvtmp.bat
16864     $ECHO "$_dosbash -c \"export -p\" > localdevenvtmp.export1" >> localdevenvtmp.bat
16865 
16866     # Now execute the newly created bat file.
16867     # The | cat is to stop SetEnv.Cmd to mess with system colors on msys
16868     cmd /c localdevenvtmp.bat | cat
16869 
16870     # apply the diff (less some non-vs10 vars named by "!")
16871     $SORT localdevenvtmp.export0 | $GREP -v "!" > localdevenvtmp.export0.sort
16872     $SORT localdevenvtmp.export1 | $GREP -v "!" > localdevenvtmp.export1.sort
16873     $COMM -1 -3 localdevenvtmp.export0.sort localdevenvtmp.export1.sort > localdevenv.sh
16874 
16875     # cleanup
16876     $RM localdevenvtmp*
16877     #----
16878     cd $CURDIR
16879     if test ! -s $OUTPUT_ROOT/localdevenv.sh; then
16880       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16881 $as_echo "no" >&6; }
16882       { $as_echo "$as_me:${as_lineno-$LINENO}: Could not succesfully extract the envionment variables needed for the VS setup." >&5
16883 $as_echo "$as_me: Could not succesfully extract the envionment variables needed for the VS setup." >&6;}
16884       { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
16885 $as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
16886       { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
16887 $as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
16888       as_fn_error $? "Cannot continue" "$LINENO" 5
16889     fi
16890 
16891     # Now set all paths and other env variables. This will allow the rest of
16892     # the configure script to find and run the compiler in the proper way.
16893     { $as_echo "$as_me:${as_lineno-$LINENO}: Setting extracted environment variables" >&5
16894 $as_echo "$as_me: Setting extracted environment variables" >&6;}
16895     . $OUTPUT_ROOT/localdevenv.sh
16896   else
16897     # We did not find a vsvars bat file, let's hope we are run from a VS command prompt.
16898     { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio installation, checking current environment" >&5
16899 $as_echo "$as_me: Cannot locate a valid Visual Studio installation, checking current environment" >&6;}
16900   fi
16901 
16902   # At this point, we should have corrent variables in the environment, or we can't continue.
16903   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Visual Studio variables" >&5
16904 $as_echo_n "checking for Visual Studio variables... " >&6; }
16905 
16906   if test "x$VCINSTALLDIR" != x || test "x$WindowsSDKDir" != x || test "x$WINDOWSSDKDIR" != x; then
16907     if test "x$INCLUDE" = x || test "x$LIB" = x; then
16908       { $as_echo "$as_me:${as_lineno-$LINENO}: result: present but broken" >&5
16909 $as_echo "present but broken" >&6; }
16910       as_fn_error $? "Your VC command prompt seems broken, INCLUDE and/or LIB is missing." "$LINENO" 5
16911     else
16912       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
16913 $as_echo "ok" >&6; }
16914       # Remove any trailing \ from INCLUDE and LIB to avoid trouble in spec.gmk.
16915       VS_INCLUDE=`$ECHO "$INCLUDE" | $SED 's/\\\\$//'`
16916       VS_LIB=`$ECHO "$LIB" | $SED 's/\\\\$//'`
16917       VS_PATH="$PATH"
16918 
16919 
16920 
16921     fi
16922   else
16923     { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
16924 $as_echo "not found" >&6; }
16925 
16926     if test "x$VS_ENV_CMD" = x; then
16927       { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&5
16928 $as_echo "$as_me: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&6;}
16929       { $as_echo "$as_me:${as_lineno-$LINENO}: nor is this script run from a Visual Studio command prompt." >&5
16930 $as_echo "$as_me: nor is this script run from a Visual Studio command prompt." >&6;}
16931     else
16932       { $as_echo "$as_me:${as_lineno-$LINENO}: Running the extraction script failed." >&5
16933 $as_echo "$as_me: Running the extraction script failed." >&6;}
16934     fi
16935     { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
16936 $as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
16937     { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
16938 $as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
16939     as_fn_error $? "Cannot continue" "$LINENO" 5
16940   fi
16941 
16942   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
16943 $as_echo_n "checking for msvcr100.dll... " >&6; }
16944 
16945 # Check whether --with-msvcr-dll was given.
16946 if test "${with_msvcr_dll+set}" = set; then :
16947   withval=$with_msvcr_dll;
16948 fi
16949 
16950   if test "x$with_msvcr_dll" != x; then
16951     MSVCR_DLL="$with_msvcr_dll"
16952   else
16953     if test "x$VCINSTALLDIR" != x; then
16954       if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
16955         MSVCR_DLL=`find "$VCINSTALLDIR" -name msvcr100.dll | grep x64 | head --lines 1`
16956       else
16957         MSVCR_DLL=`find "$VCINSTALLDIR" -name msvcr100.dll | grep x86 | grep -v ia64 | grep -v x64 | head --lines 1`
16958         if test "x$MSVCR_DLL" = x; then
16959           MSVCR_DLL=`find "$VCINSTALLDIR" -name msvcr100.dll | head --lines 1`
16960         fi
16961       fi
16962       if test "x$MSVCR_DLL" != x; then
16963         { $as_echo "$as_me:${as_lineno-$LINENO}: msvcr100.dll found in VCINSTALLDIR: $VCINSTALLDIR" >&5
16964 $as_echo "$as_me: msvcr100.dll found in VCINSTALLDIR: $VCINSTALLDIR" >&6;}
16965       else
16966         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: msvcr100.dll not found in VCINSTALLDIR: $VCINSTALLDIR" >&5
16967 $as_echo "$as_me: Warning: msvcr100.dll not found in VCINSTALLDIR: $VCINSTALLDIR" >&6;}
16968       fi
16969     fi
16970     if test "x$MSVCR_DLL" = x; then
16971       if test -f "$SYSTEMROOT/system32/msvcr100.dll"; then
16972         { $as_echo "$as_me:${as_lineno-$LINENO}: msvcr100.dll found in $SYSTEMROOT/system32" >&5
16973 $as_echo "$as_me: msvcr100.dll found in $SYSTEMROOT/system32" >&6;}
16974         MSVCR_DLL="$SYSTEMROOT/system32/msvcr100.dll"
16975       fi
16976     fi
16977   fi
16978   if test "x$MSVCR_DLL" = x; then
16979     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16980 $as_echo "no" >&6; }
16981     as_fn_error $? "Could not find msvcr100.dll !" "$LINENO" 5
16982   fi
16983   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
16984 $as_echo "$MSVCR_DLL" >&6; }
16985 
16986   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16987 
16988   # Input might be given as Windows format, start by converting to
16989   # unix format.
16990   path="$MSVCR_DLL"
16991   new_path=`$CYGPATH -u "$path"`
16992 
16993   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16994   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16995   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16996   # "foo.exe" is OK but "foo" is an error.
16997   #
16998   # This test is therefore slightly more accurate than "test -f" to check for file precense.
16999   # It is also a way to make sure we got the proper file name for the real test later on.
17000   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17001   if test "x$test_shortpath" = x; then
17002     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&5
17003 $as_echo "$as_me: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&6;}
17004     as_fn_error $? "Cannot locate the the path of MSVCR_DLL" "$LINENO" 5
17005   fi
17006 
17007   # Call helper function which possibly converts this using DOS-style short mode.
17008   # If so, the updated path is stored in $new_path.
17009 
17010   input_path="$new_path"
17011   # Check if we need to convert this using DOS-style short mode. If the path
17012   # contains just simple characters, use it. Otherwise (spaces, weird characters),
17013   # take no chances and rewrite it.
17014   # Note: m4 eats our [], so we need to use [ and ] instead.
17015   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17016   if test "x$has_forbidden_chars" != x; then
17017     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17018     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17019     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17020     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17021       # Going to short mode and back again did indeed matter. Since short mode is
17022       # case insensitive, let's make it lowercase to improve readability.
17023       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17024       # Now convert it back to Unix-stile (cygpath)
17025       input_path=`$CYGPATH -u "$shortmode_path"`
17026       new_path="$input_path"
17027     fi
17028   fi
17029 
17030   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17031   if test "x$test_cygdrive_prefix" = x; then
17032     # As a simple fix, exclude /usr/bin since it's not a real path.
17033     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
17034       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17035       # a path prefixed by /cygdrive for fixpath to work.
17036       new_path="$CYGWIN_ROOT_PATH$input_path"
17037     fi
17038   fi
17039 
17040 
17041   if test "x$path" != "x$new_path"; then
17042     MSVCR_DLL="$new_path"
17043     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVCR_DLL to \"$new_path\"" >&5
17044 $as_echo "$as_me: Rewriting MSVCR_DLL to \"$new_path\"" >&6;}
17045   fi
17046 
17047   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17048 
17049   path="$MSVCR_DLL"
17050   has_colon=`$ECHO $path | $GREP ^.:`
17051   new_path="$path"
17052   if test "x$has_colon" = x; then
17053     # Not in mixed or Windows style, start by that.
17054     new_path=`cmd //c echo $path`
17055   fi
17056 
17057 
17058   input_path="$new_path"
17059   # Check if we need to convert this using DOS-style short mode. If the path
17060   # contains just simple characters, use it. Otherwise (spaces, weird characters),
17061   # take no chances and rewrite it.
17062   # Note: m4 eats our [], so we need to use [ and ] instead.
17063   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17064   if test "x$has_forbidden_chars" != x; then
17065     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17066     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17067   fi
17068 
17069 
17070   windows_path="$new_path"
17071   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17072     unix_path=`$CYGPATH -u "$windows_path"`
17073     new_path="$unix_path"
17074   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17075     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17076     new_path="$unix_path"
17077   fi
17078 
17079   if test "x$path" != "x$new_path"; then
17080     MSVCR_DLL="$new_path"
17081     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVCR_DLL to \"$new_path\"" >&5
17082 $as_echo "$as_me: Rewriting MSVCR_DLL to \"$new_path\"" >&6;}
17083   fi
17084 
17085   # Save the first 10 bytes of this path to the storage, so fixpath can work.
17086   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17087 
17088   else
17089     # We're on a posix platform. Hooray! :)
17090     path="$MSVCR_DLL"
17091 
17092     if test ! -f "$path" && test ! -d "$path"; then
17093       as_fn_error $? "The path of MSVCR_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
17094     fi
17095 
17096     has_space=`$ECHO "$path" | $GREP " "`
17097     if test "x$has_space" != x; then
17098       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&5
17099 $as_echo "$as_me: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&6;}
17100       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
17101     fi
17102   fi
17103 
17104 
17105 
17106 
17107 # Check whether --with-dxsdk was given.
17108 if test "${with_dxsdk+set}" = set; then :
17109   withval=$with_dxsdk;
17110 fi
17111 
17112 
17113 # Check whether --with-dxsdk-lib was given.
17114 if test "${with_dxsdk_lib+set}" = set; then :
17115   withval=$with_dxsdk_lib;
17116 fi
17117 
17118 
17119 # Check whether --with-dxsdk-include was given.
17120 if test "${with_dxsdk_include+set}" = set; then :
17121   withval=$with_dxsdk_include;
17122 fi
17123 
17124 
17125   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DirectX SDK" >&5
17126 $as_echo_n "checking for DirectX SDK... " >&6; }
17127 
17128   if test "x$with_dxsdk" != x; then
17129     dxsdk_path="$with_dxsdk"
17130   elif test "x$DXSDK_DIR" != x; then
17131     dxsdk_path="$DXSDK_DIR"
17132   elif test -d "C:/DXSDK"; then
17133     dxsdk_path="C:/DXSDK"
17134   else
17135     as_fn_error $? "Could not find the DirectX SDK" "$LINENO" 5
17136   fi
17137   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $dxsdk_path" >&5
17138 $as_echo "$dxsdk_path" >&6; }
17139 
17140   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17141 
17142   # Input might be given as Windows format, start by converting to
17143   # unix format.
17144   path="$dxsdk_path"
17145   new_path=`$CYGPATH -u "$path"`
17146 
17147   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17148   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17149   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17150   # "foo.exe" is OK but "foo" is an error.
17151   #
17152   # This test is therefore slightly more accurate than "test -f" to check for file precense.
17153   # It is also a way to make sure we got the proper file name for the real test later on.
17154   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17155   if test "x$test_shortpath" = x; then
17156     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of dxsdk_path, which resolves as \"$path\", is invalid." >&5
17157 $as_echo "$as_me: The path of dxsdk_path, which resolves as \"$path\", is invalid." >&6;}
17158     as_fn_error $? "Cannot locate the the path of dxsdk_path" "$LINENO" 5
17159   fi
17160 
17161   # Call helper function which possibly converts this using DOS-style short mode.
17162   # If so, the updated path is stored in $new_path.
17163 
17164   input_path="$new_path"
17165   # Check if we need to convert this using DOS-style short mode. If the path
17166   # contains just simple characters, use it. Otherwise (spaces, weird characters),
17167   # take no chances and rewrite it.
17168   # Note: m4 eats our [], so we need to use [ and ] instead.
17169   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17170   if test "x$has_forbidden_chars" != x; then
17171     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17172     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17173     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17174     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17175       # Going to short mode and back again did indeed matter. Since short mode is
17176       # case insensitive, let's make it lowercase to improve readability.
17177       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17178       # Now convert it back to Unix-stile (cygpath)
17179       input_path=`$CYGPATH -u "$shortmode_path"`
17180       new_path="$input_path"
17181     fi
17182   fi
17183 
17184   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17185   if test "x$test_cygdrive_prefix" = x; then
17186     # As a simple fix, exclude /usr/bin since it's not a real path.
17187     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
17188       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17189       # a path prefixed by /cygdrive for fixpath to work.
17190       new_path="$CYGWIN_ROOT_PATH$input_path"
17191     fi
17192   fi
17193 
17194 
17195   if test "x$path" != "x$new_path"; then
17196     dxsdk_path="$new_path"
17197     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting dxsdk_path to \"$new_path\"" >&5
17198 $as_echo "$as_me: Rewriting dxsdk_path to \"$new_path\"" >&6;}
17199   fi
17200 
17201   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17202 
17203   path="$dxsdk_path"
17204   has_colon=`$ECHO $path | $GREP ^.:`
17205   new_path="$path"
17206   if test "x$has_colon" = x; then
17207     # Not in mixed or Windows style, start by that.
17208     new_path=`cmd //c echo $path`
17209   fi
17210 
17211 
17212   input_path="$new_path"
17213   # Check if we need to convert this using DOS-style short mode. If the path
17214   # contains just simple characters, use it. Otherwise (spaces, weird characters),
17215   # take no chances and rewrite it.
17216   # Note: m4 eats our [], so we need to use [ and ] instead.
17217   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17218   if test "x$has_forbidden_chars" != x; then
17219     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17220     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17221   fi
17222 
17223 
17224   windows_path="$new_path"
17225   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17226     unix_path=`$CYGPATH -u "$windows_path"`
17227     new_path="$unix_path"
17228   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17229     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17230     new_path="$unix_path"
17231   fi
17232 
17233   if test "x$path" != "x$new_path"; then
17234     dxsdk_path="$new_path"
17235     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting dxsdk_path to \"$new_path\"" >&5
17236 $as_echo "$as_me: Rewriting dxsdk_path to \"$new_path\"" >&6;}
17237   fi
17238 
17239   # Save the first 10 bytes of this path to the storage, so fixpath can work.
17240   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17241 
17242   else
17243     # We're on a posix platform. Hooray! :)
17244     path="$dxsdk_path"
17245 
17246     if test ! -f "$path" && test ! -d "$path"; then
17247       as_fn_error $? "The path of dxsdk_path, which resolves as \"$path\", is not found." "$LINENO" 5
17248     fi
17249 
17250     has_space=`$ECHO "$path" | $GREP " "`
17251     if test "x$has_space" != x; then
17252       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of dxsdk_path, which resolves as \"$path\", is invalid." >&5
17253 $as_echo "$as_me: The path of dxsdk_path, which resolves as \"$path\", is invalid." >&6;}
17254       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
17255     fi
17256   fi
17257 
17258 
17259   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DirectX SDK lib dir" >&5
17260 $as_echo_n "checking for DirectX SDK lib dir... " >&6; }
17261   if test "x$with_dxsdk_lib" != x; then
17262     DXSDK_LIB_PATH="$with_dxsdk_lib"
17263   elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
17264     DXSDK_LIB_PATH="$dxsdk_path/Lib/x64"
17265   else
17266     DXSDK_LIB_PATH="$dxsdk_path/Lib"
17267   fi
17268   # dsound.lib is linked to in jsoundds
17269   if test ! -f "$DXSDK_LIB_PATH/dsound.lib"; then
17270     as_fn_error $? "Invalid DirectX SDK lib dir" "$LINENO" 5
17271   fi
17272   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DXSDK_LIB_PATH" >&5
17273 $as_echo "$DXSDK_LIB_PATH" >&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="$DXSDK_LIB_PATH"
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 DXSDK_LIB_PATH, which resolves as \"$path\", is invalid." >&5
17292 $as_echo "$as_me: The path of DXSDK_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
17293     as_fn_error $? "Cannot locate the the path of DXSDK_LIB_PATH" "$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     DXSDK_LIB_PATH="$new_path"
17332     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DXSDK_LIB_PATH to \"$new_path\"" >&5
17333 $as_echo "$as_me: Rewriting DXSDK_LIB_PATH to \"$new_path\"" >&6;}
17334   fi
17335 
17336   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17337 
17338   path="$DXSDK_LIB_PATH"
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     DXSDK_LIB_PATH="$new_path"
17370     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DXSDK_LIB_PATH to \"$new_path\"" >&5
17371 $as_echo "$as_me: Rewriting DXSDK_LIB_PATH 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="$DXSDK_LIB_PATH"
17380 
17381     if test ! -f "$path" && test ! -d "$path"; then
17382       as_fn_error $? "The path of DXSDK_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
17383     fi
17384 
17385     has_space=`$ECHO "$path" | $GREP " "`
17386     if test "x$has_space" != x; then
17387       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DXSDK_LIB_PATH, which resolves as \"$path\", is invalid." >&5
17388 $as_echo "$as_me: The path of DXSDK_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
17389       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
17390     fi
17391   fi
17392 
17393 
17394   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DirectX SDK include dir" >&5
17395 $as_echo_n "checking for DirectX SDK include dir... " >&6; }
17396   if test "x$with_dxsdk_include" != x; then
17397     DXSDK_INCLUDE_PATH="$with_dxsdk_include"
17398   else
17399     DXSDK_INCLUDE_PATH="$dxsdk_path/Include"
17400   fi
17401   # dsound.h is included in jsoundds
17402   if test ! -f "$DXSDK_INCLUDE_PATH/dsound.h"; then
17403     as_fn_error $? "Invalid DirectX SDK lib dir" "$LINENO" 5
17404   fi
17405   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DXSDK_INCLUDE_PATH" >&5
17406 $as_echo "$DXSDK_INCLUDE_PATH" >&6; }
17407 
17408   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17409 
17410   # Input might be given as Windows format, start by converting to
17411   # unix format.
17412   path="$DXSDK_INCLUDE_PATH"
17413   new_path=`$CYGPATH -u "$path"`
17414 
17415   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17416   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17417   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17418   # "foo.exe" is OK but "foo" is an error.
17419   #
17420   # This test is therefore slightly more accurate than "test -f" to check for file precense.
17421   # It is also a way to make sure we got the proper file name for the real test later on.
17422   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17423   if test "x$test_shortpath" = x; then
17424     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DXSDK_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
17425 $as_echo "$as_me: The path of DXSDK_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
17426     as_fn_error $? "Cannot locate the the path of DXSDK_INCLUDE_PATH" "$LINENO" 5
17427   fi
17428 
17429   # Call helper function which possibly converts this using DOS-style short mode.
17430   # If so, the updated path is stored in $new_path.
17431 
17432   input_path="$new_path"
17433   # Check if we need to convert this using DOS-style short mode. If the path
17434   # contains just simple characters, use it. Otherwise (spaces, weird characters),
17435   # take no chances and rewrite it.
17436   # Note: m4 eats our [], so we need to use [ and ] instead.
17437   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17438   if test "x$has_forbidden_chars" != x; then
17439     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17440     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17441     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17442     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17443       # Going to short mode and back again did indeed matter. Since short mode is
17444       # case insensitive, let's make it lowercase to improve readability.
17445       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17446       # Now convert it back to Unix-stile (cygpath)
17447       input_path=`$CYGPATH -u "$shortmode_path"`
17448       new_path="$input_path"
17449     fi
17450   fi
17451 
17452   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17453   if test "x$test_cygdrive_prefix" = x; then
17454     # As a simple fix, exclude /usr/bin since it's not a real path.
17455     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
17456       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17457       # a path prefixed by /cygdrive for fixpath to work.
17458       new_path="$CYGWIN_ROOT_PATH$input_path"
17459     fi
17460   fi
17461 
17462 
17463   if test "x$path" != "x$new_path"; then
17464     DXSDK_INCLUDE_PATH="$new_path"
17465     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DXSDK_INCLUDE_PATH to \"$new_path\"" >&5
17466 $as_echo "$as_me: Rewriting DXSDK_INCLUDE_PATH to \"$new_path\"" >&6;}
17467   fi
17468 
17469   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17470 
17471   path="$DXSDK_INCLUDE_PATH"
17472   has_colon=`$ECHO $path | $GREP ^.:`
17473   new_path="$path"
17474   if test "x$has_colon" = x; then
17475     # Not in mixed or Windows style, start by that.
17476     new_path=`cmd //c echo $path`
17477   fi
17478 
17479 
17480   input_path="$new_path"
17481   # Check if we need to convert this using DOS-style short mode. If the path
17482   # contains just simple characters, use it. Otherwise (spaces, weird characters),
17483   # take no chances and rewrite it.
17484   # Note: m4 eats our [], so we need to use [ and ] instead.
17485   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17486   if test "x$has_forbidden_chars" != x; then
17487     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17488     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17489   fi
17490 
17491 
17492   windows_path="$new_path"
17493   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17494     unix_path=`$CYGPATH -u "$windows_path"`
17495     new_path="$unix_path"
17496   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17497     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17498     new_path="$unix_path"
17499   fi
17500 
17501   if test "x$path" != "x$new_path"; then
17502     DXSDK_INCLUDE_PATH="$new_path"
17503     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DXSDK_INCLUDE_PATH to \"$new_path\"" >&5
17504 $as_echo "$as_me: Rewriting DXSDK_INCLUDE_PATH to \"$new_path\"" >&6;}
17505   fi
17506 
17507   # Save the first 10 bytes of this path to the storage, so fixpath can work.
17508   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17509 
17510   else
17511     # We're on a posix platform. Hooray! :)
17512     path="$DXSDK_INCLUDE_PATH"
17513 
17514     if test ! -f "$path" && test ! -d "$path"; then
17515       as_fn_error $? "The path of DXSDK_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
17516     fi
17517 
17518     has_space=`$ECHO "$path" | $GREP " "`
17519     if test "x$has_space" != x; then
17520       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DXSDK_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
17521 $as_echo "$as_me: The path of DXSDK_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
17522       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
17523     fi
17524   fi
17525 
17526 
17527 
17528 
17529   LDFLAGS_JDK="$LDFLAGS_JDK -libpath:$DXSDK_LIB_PATH"
17530 
17531 fi
17532 
17533 
17534 
17535 # If --build AND --host is set, then the configure script will find any
17536 # cross compilation tools in the PATH. Cross compilation tools
17537 # follows the cross compilation standard where they are prefixed with ${host}.
17538 # For example the binary i686-sun-solaris2.10-gcc
17539 # will cross compile for i686-sun-solaris2.10
17540 # If neither of build and host is not set, then build=host and the
17541 # default compiler found in the path will be used.
17542 # Setting only --host, does not seem to be really supported.
17543 # Please set both --build and --host if you want to cross compile.
17544 
17545 if test "x$COMPILE_TYPE" = "xcross"; then
17546     # Now we to find a C/C++ compiler that can build executables for the build
17547     # platform. We can't use the AC_PROG_CC macro, since it can only be used
17548     # once. Also, we need to do this before adding a tools dir to the path,
17549     # otherwise we might pick up cross-compilers which don't use standard naming.
17550     # Otherwise, we'll set the BUILD_tools to the native tools, but that'll have
17551     # to wait until they are properly discovered.
17552     for ac_prog in cl cc gcc
17553 do
17554   # Extract the first word of "$ac_prog", so it can be a program name with args.
17555 set dummy $ac_prog; ac_word=$2
17556 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17557 $as_echo_n "checking for $ac_word... " >&6; }
17558 if test "${ac_cv_path_BUILD_CC+set}" = set; then :
17559   $as_echo_n "(cached) " >&6
17560 else
17561   case $BUILD_CC in
17562   [\\/]* | ?:[\\/]*)
17563   ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
17564   ;;
17565   *)
17566   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17567 for as_dir in $PATH
17568 do
17569   IFS=$as_save_IFS
17570   test -z "$as_dir" && as_dir=.
17571     for ac_exec_ext in '' $ac_executable_extensions; do
17572   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
17573     ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
17574     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17575     break 2
17576   fi
17577 done
17578   done
17579 IFS=$as_save_IFS
17580 
17581   ;;
17582 esac
17583 fi
17584 BUILD_CC=$ac_cv_path_BUILD_CC
17585 if test -n "$BUILD_CC"; then
17586   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
17587 $as_echo "$BUILD_CC" >&6; }
17588 else
17589   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17590 $as_echo "no" >&6; }
17591 fi
17592 
17593 
17594   test -n "$BUILD_CC" && break
17595 done
17596 
17597 
17598   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17599 
17600   # First separate the path from the arguments. This will split at the first
17601   # space.
17602   complete="$BUILD_CC"
17603   path="${complete%% *}"
17604   tmp="$complete EOL"
17605   arguments="${tmp#* }"
17606 
17607   # Input might be given as Windows format, start by converting to
17608   # unix format.
17609   new_path=`$CYGPATH -u "$path"`
17610 
17611   # Now try to locate executable using which
17612   new_path=`$WHICH "$new_path" 2> /dev/null`
17613   # bat and cmd files are not always considered executable in cygwin causing which
17614   # to not find them
17615   if test "x$new_path" = x \
17616            && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17617            && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17618     new_path=`$CYGPATH -u "$path"`
17619   fi
17620   if test "x$new_path" = x; then
17621     # Oops. Which didn't find the executable.
17622     # The splitting of arguments from the executable at a space might have been incorrect,
17623     # since paths with space are more likely in Windows. Give it another try with the whole
17624     # argument.
17625     path="$complete"
17626     arguments="EOL"
17627     new_path=`$CYGPATH -u "$path"`
17628     new_path=`$WHICH "$new_path" 2> /dev/null`
17629     # bat and cmd files are not always considered executable in cygwin causing which
17630     # to not find them
17631     if test "x$new_path" = x \
17632              && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17633              && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17634       new_path=`$CYGPATH -u "$path"`
17635     fi
17636     if test "x$new_path" = x; then
17637       # It's still not found. Now this is an unrecoverable error.
17638       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
17639 $as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
17640       has_space=`$ECHO "$complete" | $GREP " "`
17641       if test "x$has_space" != x; then
17642         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17643 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17644       fi
17645       as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
17646     fi
17647   fi
17648 
17649   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17650   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17651   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17652   # "foo.exe" is OK but "foo" is an error.
17653   #
17654   # This test is therefore slightly more accurate than "test -f" to check for file precense.
17655   # It is also a way to make sure we got the proper file name for the real test later on.
17656   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17657   if test "x$test_shortpath" = x; then
17658     # Short path failed, file does not exist as specified.
17659     # Try adding .exe or .cmd
17660     if test -f "${new_path}.exe"; then
17661        input_to_shortpath="${new_path}.exe"
17662     elif test -f "${new_path}.cmd"; then
17663        input_to_shortpath="${new_path}.cmd"
17664     else
17665       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&5
17666 $as_echo "$as_me: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&6;}
17667       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
17668 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
17669       as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
17670     fi
17671   else
17672     input_to_shortpath="$new_path"
17673   fi
17674 
17675   # Call helper function which possibly converts this using DOS-style short mode.
17676   # If so, the updated path is stored in $new_path.
17677   new_path="$input_to_shortpath"
17678 
17679   input_path="$input_to_shortpath"
17680   # Check if we need to convert this using DOS-style short mode. If the path
17681   # contains just simple characters, use it. Otherwise (spaces, weird characters),
17682   # take no chances and rewrite it.
17683   # Note: m4 eats our [], so we need to use [ and ] instead.
17684   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17685   if test "x$has_forbidden_chars" != x; then
17686     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17687     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17688     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17689     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17690       # Going to short mode and back again did indeed matter. Since short mode is
17691       # case insensitive, let's make it lowercase to improve readability.
17692       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17693       # Now convert it back to Unix-stile (cygpath)
17694       input_path=`$CYGPATH -u "$shortmode_path"`
17695       new_path="$input_path"
17696     fi
17697   fi
17698 
17699   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17700   if test "x$test_cygdrive_prefix" = x; then
17701     # As a simple fix, exclude /usr/bin since it's not a real path.
17702     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
17703       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17704       # a path prefixed by /cygdrive for fixpath to work.
17705       new_path="$CYGWIN_ROOT_PATH$input_path"
17706     fi
17707   fi
17708 
17709   # remove trailing .exe if any
17710   new_path="${new_path/%.exe/}"
17711 
17712   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17713 
17714   # First separate the path from the arguments. This will split at the first
17715   # space.
17716   complete="$BUILD_CC"
17717   path="${complete%% *}"
17718   tmp="$complete EOL"
17719   arguments="${tmp#* }"
17720 
17721   # Input might be given as Windows format, start by converting to
17722   # unix format.
17723   new_path="$path"
17724 
17725   windows_path="$new_path"
17726   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17727     unix_path=`$CYGPATH -u "$windows_path"`
17728     new_path="$unix_path"
17729   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17730     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17731     new_path="$unix_path"
17732   fi
17733 
17734 
17735   # Now try to locate executable using which
17736   new_path=`$WHICH "$new_path" 2> /dev/null`
17737 
17738   if test "x$new_path" = x; then
17739     # Oops. Which didn't find the executable.
17740     # The splitting of arguments from the executable at a space might have been incorrect,
17741     # since paths with space are more likely in Windows. Give it another try with the whole
17742     # argument.
17743     path="$complete"
17744     arguments="EOL"
17745     new_path="$path"
17746 
17747   windows_path="$new_path"
17748   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17749     unix_path=`$CYGPATH -u "$windows_path"`
17750     new_path="$unix_path"
17751   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17752     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17753     new_path="$unix_path"
17754   fi
17755 
17756 
17757     new_path=`$WHICH "$new_path" 2> /dev/null`
17758 
17759     if test "x$new_path" = x; then
17760       # It's still not found. Now this is an unrecoverable error.
17761       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
17762 $as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
17763       has_space=`$ECHO "$complete" | $GREP " "`
17764       if test "x$has_space" != x; then
17765         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17766 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17767       fi
17768       as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
17769     fi
17770   fi
17771 
17772   # Now new_path has a complete unix path to the binary
17773   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
17774     # Keep paths in /bin as-is, but remove trailing .exe if any
17775     new_path="${new_path/%.exe/}"
17776     # Do not save /bin paths to all_fixpath_prefixes!
17777   else
17778     # Not in mixed or Windows style, start by that.
17779     new_path=`cmd //c echo $new_path`
17780 
17781   input_path="$new_path"
17782   # Check if we need to convert this using DOS-style short mode. If the path
17783   # contains just simple characters, use it. Otherwise (spaces, weird characters),
17784   # take no chances and rewrite it.
17785   # Note: m4 eats our [], so we need to use [ and ] instead.
17786   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17787   if test "x$has_forbidden_chars" != x; then
17788     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17789     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17790   fi
17791 
17792     # Output is in $new_path
17793 
17794   windows_path="$new_path"
17795   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17796     unix_path=`$CYGPATH -u "$windows_path"`
17797     new_path="$unix_path"
17798   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17799     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17800     new_path="$unix_path"
17801   fi
17802 
17803     # remove trailing .exe if any
17804     new_path="${new_path/%.exe/}"
17805 
17806     # Save the first 10 bytes of this path to the storage, so fixpath can work.
17807     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17808   fi
17809 
17810   else
17811     # We're on a posix platform. Hooray! :)
17812     # First separate the path from the arguments. This will split at the first
17813     # space.
17814     complete="$BUILD_CC"
17815     path="${complete%% *}"
17816     tmp="$complete EOL"
17817     arguments="${tmp#* }"
17818 
17819     # Cannot rely on the command "which" here since it doesn't always work.
17820     is_absolute_path=`$ECHO "$path" | $GREP ^/`
17821     if test -z "$is_absolute_path"; then
17822       # Path to executable is not absolute. Find it.
17823       IFS_save="$IFS"
17824       IFS=:
17825       for p in $PATH; do
17826         if test -f "$p/$path" && test -x "$p/$path"; then
17827           new_path="$p/$path"
17828           break
17829         fi
17830       done
17831       IFS="$IFS_save"
17832     else
17833       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving BUILD_CC (as $path) failed, using $path directly." >&5
17834 $as_echo "$as_me: Resolving BUILD_CC (as $path) failed, using $path directly." >&6;}
17835       new_path="$path"
17836     fi
17837 
17838     if test "x$new_path" = x; then
17839         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
17840 $as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
17841         has_space=`$ECHO "$complete" | $GREP " "`
17842         if test "x$has_space" != x; then
17843           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
17844 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
17845         fi
17846         as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
17847       fi
17848   fi
17849 
17850       # Now join together the path and the arguments once again
17851       if test "x$arguments" != xEOL; then
17852         new_complete="$new_path ${arguments% *}"
17853       else
17854         new_complete="$new_path"
17855       fi
17856 
17857   if test "x$complete" != "x$new_complete"; then
17858       BUILD_CC="$new_complete"
17859       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CC to \"$new_complete\"" >&5
17860 $as_echo "$as_me: Rewriting BUILD_CC to \"$new_complete\"" >&6;}
17861     fi
17862 
17863     for ac_prog in cl CC g++
17864 do
17865   # Extract the first word of "$ac_prog", so it can be a program name with args.
17866 set dummy $ac_prog; ac_word=$2
17867 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17868 $as_echo_n "checking for $ac_word... " >&6; }
17869 if test "${ac_cv_path_BUILD_CXX+set}" = set; then :
17870   $as_echo_n "(cached) " >&6
17871 else
17872   case $BUILD_CXX in
17873   [\\/]* | ?:[\\/]*)
17874   ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
17875   ;;
17876   *)
17877   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17878 for as_dir in $PATH
17879 do
17880   IFS=$as_save_IFS
17881   test -z "$as_dir" && as_dir=.
17882     for ac_exec_ext in '' $ac_executable_extensions; do
17883   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
17884     ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
17885     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17886     break 2
17887   fi
17888 done
17889   done
17890 IFS=$as_save_IFS
17891 
17892   ;;
17893 esac
17894 fi
17895 BUILD_CXX=$ac_cv_path_BUILD_CXX
17896 if test -n "$BUILD_CXX"; then
17897   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
17898 $as_echo "$BUILD_CXX" >&6; }
17899 else
17900   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17901 $as_echo "no" >&6; }
17902 fi
17903 
17904 
17905   test -n "$BUILD_CXX" && break
17906 done
17907 
17908 
17909   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17910 
17911   # First separate the path from the arguments. This will split at the first
17912   # space.
17913   complete="$BUILD_CXX"
17914   path="${complete%% *}"
17915   tmp="$complete EOL"
17916   arguments="${tmp#* }"
17917 
17918   # Input might be given as Windows format, start by converting to
17919   # unix format.
17920   new_path=`$CYGPATH -u "$path"`
17921 
17922   # Now try to locate executable using which
17923   new_path=`$WHICH "$new_path" 2> /dev/null`
17924   # bat and cmd files are not always considered executable in cygwin causing which
17925   # to not find them
17926   if test "x$new_path" = x \
17927            && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17928            && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17929     new_path=`$CYGPATH -u "$path"`
17930   fi
17931   if test "x$new_path" = x; then
17932     # Oops. Which didn't find the executable.
17933     # The splitting of arguments from the executable at a space might have been incorrect,
17934     # since paths with space are more likely in Windows. Give it another try with the whole
17935     # argument.
17936     path="$complete"
17937     arguments="EOL"
17938     new_path=`$CYGPATH -u "$path"`
17939     new_path=`$WHICH "$new_path" 2> /dev/null`
17940     # bat and cmd files are not always considered executable in cygwin causing which
17941     # to not find them
17942     if test "x$new_path" = x \
17943              && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17944              && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17945       new_path=`$CYGPATH -u "$path"`
17946     fi
17947     if test "x$new_path" = x; then
17948       # It's still not found. Now this is an unrecoverable error.
17949       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
17950 $as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
17951       has_space=`$ECHO "$complete" | $GREP " "`
17952       if test "x$has_space" != x; then
17953         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17954 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17955       fi
17956       as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
17957     fi
17958   fi
17959 
17960   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17961   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17962   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17963   # "foo.exe" is OK but "foo" is an error.
17964   #
17965   # This test is therefore slightly more accurate than "test -f" to check for file precense.
17966   # It is also a way to make sure we got the proper file name for the real test later on.
17967   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17968   if test "x$test_shortpath" = x; then
17969     # Short path failed, file does not exist as specified.
17970     # Try adding .exe or .cmd
17971     if test -f "${new_path}.exe"; then
17972        input_to_shortpath="${new_path}.exe"
17973     elif test -f "${new_path}.cmd"; then
17974        input_to_shortpath="${new_path}.cmd"
17975     else
17976       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&5
17977 $as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&6;}
17978       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
17979 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
17980       as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
17981     fi
17982   else
17983     input_to_shortpath="$new_path"
17984   fi
17985 
17986   # Call helper function which possibly converts this using DOS-style short mode.
17987   # If so, the updated path is stored in $new_path.
17988   new_path="$input_to_shortpath"
17989 
17990   input_path="$input_to_shortpath"
17991   # Check if we need to convert this using DOS-style short mode. If the path
17992   # contains just simple characters, use it. Otherwise (spaces, weird characters),
17993   # take no chances and rewrite it.
17994   # Note: m4 eats our [], so we need to use [ and ] instead.
17995   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17996   if test "x$has_forbidden_chars" != x; then
17997     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17998     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17999     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18000     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18001       # Going to short mode and back again did indeed matter. Since short mode is
18002       # case insensitive, let's make it lowercase to improve readability.
18003       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18004       # Now convert it back to Unix-stile (cygpath)
18005       input_path=`$CYGPATH -u "$shortmode_path"`
18006       new_path="$input_path"
18007     fi
18008   fi
18009 
18010   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18011   if test "x$test_cygdrive_prefix" = x; then
18012     # As a simple fix, exclude /usr/bin since it's not a real path.
18013     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18014       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18015       # a path prefixed by /cygdrive for fixpath to work.
18016       new_path="$CYGWIN_ROOT_PATH$input_path"
18017     fi
18018   fi
18019 
18020   # remove trailing .exe if any
18021   new_path="${new_path/%.exe/}"
18022 
18023   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18024 
18025   # First separate the path from the arguments. This will split at the first
18026   # space.
18027   complete="$BUILD_CXX"
18028   path="${complete%% *}"
18029   tmp="$complete EOL"
18030   arguments="${tmp#* }"
18031 
18032   # Input might be given as Windows format, start by converting to
18033   # unix format.
18034   new_path="$path"
18035 
18036   windows_path="$new_path"
18037   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18038     unix_path=`$CYGPATH -u "$windows_path"`
18039     new_path="$unix_path"
18040   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18041     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18042     new_path="$unix_path"
18043   fi
18044 
18045 
18046   # Now try to locate executable using which
18047   new_path=`$WHICH "$new_path" 2> /dev/null`
18048 
18049   if test "x$new_path" = x; then
18050     # Oops. Which didn't find the executable.
18051     # The splitting of arguments from the executable at a space might have been incorrect,
18052     # since paths with space are more likely in Windows. Give it another try with the whole
18053     # argument.
18054     path="$complete"
18055     arguments="EOL"
18056     new_path="$path"
18057 
18058   windows_path="$new_path"
18059   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18060     unix_path=`$CYGPATH -u "$windows_path"`
18061     new_path="$unix_path"
18062   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18063     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18064     new_path="$unix_path"
18065   fi
18066 
18067 
18068     new_path=`$WHICH "$new_path" 2> /dev/null`
18069 
18070     if test "x$new_path" = x; then
18071       # It's still not found. Now this is an unrecoverable error.
18072       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
18073 $as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
18074       has_space=`$ECHO "$complete" | $GREP " "`
18075       if test "x$has_space" != x; then
18076         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18077 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18078       fi
18079       as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
18080     fi
18081   fi
18082 
18083   # Now new_path has a complete unix path to the binary
18084   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18085     # Keep paths in /bin as-is, but remove trailing .exe if any
18086     new_path="${new_path/%.exe/}"
18087     # Do not save /bin paths to all_fixpath_prefixes!
18088   else
18089     # Not in mixed or Windows style, start by that.
18090     new_path=`cmd //c echo $new_path`
18091 
18092   input_path="$new_path"
18093   # Check if we need to convert this using DOS-style short mode. If the path
18094   # contains just simple characters, use it. Otherwise (spaces, weird characters),
18095   # take no chances and rewrite it.
18096   # Note: m4 eats our [], so we need to use [ and ] instead.
18097   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18098   if test "x$has_forbidden_chars" != x; then
18099     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18100     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18101   fi
18102 
18103     # Output is in $new_path
18104 
18105   windows_path="$new_path"
18106   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18107     unix_path=`$CYGPATH -u "$windows_path"`
18108     new_path="$unix_path"
18109   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18110     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18111     new_path="$unix_path"
18112   fi
18113 
18114     # remove trailing .exe if any
18115     new_path="${new_path/%.exe/}"
18116 
18117     # Save the first 10 bytes of this path to the storage, so fixpath can work.
18118     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18119   fi
18120 
18121   else
18122     # We're on a posix platform. Hooray! :)
18123     # First separate the path from the arguments. This will split at the first
18124     # space.
18125     complete="$BUILD_CXX"
18126     path="${complete%% *}"
18127     tmp="$complete EOL"
18128     arguments="${tmp#* }"
18129 
18130     # Cannot rely on the command "which" here since it doesn't always work.
18131     is_absolute_path=`$ECHO "$path" | $GREP ^/`
18132     if test -z "$is_absolute_path"; then
18133       # Path to executable is not absolute. Find it.
18134       IFS_save="$IFS"
18135       IFS=:
18136       for p in $PATH; do
18137         if test -f "$p/$path" && test -x "$p/$path"; then
18138           new_path="$p/$path"
18139           break
18140         fi
18141       done
18142       IFS="$IFS_save"
18143     else
18144       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving BUILD_CXX (as $path) failed, using $path directly." >&5
18145 $as_echo "$as_me: Resolving BUILD_CXX (as $path) failed, using $path directly." >&6;}
18146       new_path="$path"
18147     fi
18148 
18149     if test "x$new_path" = x; then
18150         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
18151 $as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
18152         has_space=`$ECHO "$complete" | $GREP " "`
18153         if test "x$has_space" != x; then
18154           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18155 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18156         fi
18157         as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
18158       fi
18159   fi
18160 
18161       # Now join together the path and the arguments once again
18162       if test "x$arguments" != xEOL; then
18163         new_complete="$new_path ${arguments% *}"
18164       else
18165         new_complete="$new_path"
18166       fi
18167 
18168   if test "x$complete" != "x$new_complete"; then
18169       BUILD_CXX="$new_complete"
18170       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CXX to \"$new_complete\"" >&5
18171 $as_echo "$as_me: Rewriting BUILD_CXX to \"$new_complete\"" >&6;}
18172     fi
18173 
18174     # Extract the first word of "ld", so it can be a program name with args.
18175 set dummy ld; ac_word=$2
18176 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18177 $as_echo_n "checking for $ac_word... " >&6; }
18178 if test "${ac_cv_path_BUILD_LD+set}" = set; then :
18179   $as_echo_n "(cached) " >&6
18180 else
18181   case $BUILD_LD in
18182   [\\/]* | ?:[\\/]*)
18183   ac_cv_path_BUILD_LD="$BUILD_LD" # Let the user override the test with a path.
18184   ;;
18185   *)
18186   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18187 for as_dir in $PATH
18188 do
18189   IFS=$as_save_IFS
18190   test -z "$as_dir" && as_dir=.
18191     for ac_exec_ext in '' $ac_executable_extensions; do
18192   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
18193     ac_cv_path_BUILD_LD="$as_dir/$ac_word$ac_exec_ext"
18194     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18195     break 2
18196   fi
18197 done
18198   done
18199 IFS=$as_save_IFS
18200 
18201   ;;
18202 esac
18203 fi
18204 BUILD_LD=$ac_cv_path_BUILD_LD
18205 if test -n "$BUILD_LD"; then
18206   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_LD" >&5
18207 $as_echo "$BUILD_LD" >&6; }
18208 else
18209   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18210 $as_echo "no" >&6; }
18211 fi
18212 
18213 
18214 
18215   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18216 
18217   # First separate the path from the arguments. This will split at the first
18218   # space.
18219   complete="$BUILD_LD"
18220   path="${complete%% *}"
18221   tmp="$complete EOL"
18222   arguments="${tmp#* }"
18223 
18224   # Input might be given as Windows format, start by converting to
18225   # unix format.
18226   new_path=`$CYGPATH -u "$path"`
18227 
18228   # Now try to locate executable using which
18229   new_path=`$WHICH "$new_path" 2> /dev/null`
18230   # bat and cmd files are not always considered executable in cygwin causing which
18231   # to not find them
18232   if test "x$new_path" = x \
18233            && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18234            && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18235     new_path=`$CYGPATH -u "$path"`
18236   fi
18237   if test "x$new_path" = x; then
18238     # Oops. Which didn't find the executable.
18239     # The splitting of arguments from the executable at a space might have been incorrect,
18240     # since paths with space are more likely in Windows. Give it another try with the whole
18241     # argument.
18242     path="$complete"
18243     arguments="EOL"
18244     new_path=`$CYGPATH -u "$path"`
18245     new_path=`$WHICH "$new_path" 2> /dev/null`
18246     # bat and cmd files are not always considered executable in cygwin causing which
18247     # to not find them
18248     if test "x$new_path" = x \
18249              && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18250              && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18251       new_path=`$CYGPATH -u "$path"`
18252     fi
18253     if test "x$new_path" = x; then
18254       # It's still not found. Now this is an unrecoverable error.
18255       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
18256 $as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
18257       has_space=`$ECHO "$complete" | $GREP " "`
18258       if test "x$has_space" != x; then
18259         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18260 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18261       fi
18262       as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
18263     fi
18264   fi
18265 
18266   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18267   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18268   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18269   # "foo.exe" is OK but "foo" is an error.
18270   #
18271   # This test is therefore slightly more accurate than "test -f" to check for file precense.
18272   # It is also a way to make sure we got the proper file name for the real test later on.
18273   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18274   if test "x$test_shortpath" = x; then
18275     # Short path failed, file does not exist as specified.
18276     # Try adding .exe or .cmd
18277     if test -f "${new_path}.exe"; then
18278        input_to_shortpath="${new_path}.exe"
18279     elif test -f "${new_path}.cmd"; then
18280        input_to_shortpath="${new_path}.cmd"
18281     else
18282       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$new_path\", is invalid." >&5
18283 $as_echo "$as_me: The path of BUILD_LD, which resolves as \"$new_path\", is invalid." >&6;}
18284       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18285 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18286       as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
18287     fi
18288   else
18289     input_to_shortpath="$new_path"
18290   fi
18291 
18292   # Call helper function which possibly converts this using DOS-style short mode.
18293   # If so, the updated path is stored in $new_path.
18294   new_path="$input_to_shortpath"
18295 
18296   input_path="$input_to_shortpath"
18297   # Check if we need to convert this using DOS-style short mode. If the path
18298   # contains just simple characters, use it. Otherwise (spaces, weird characters),
18299   # take no chances and rewrite it.
18300   # Note: m4 eats our [], so we need to use [ and ] instead.
18301   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18302   if test "x$has_forbidden_chars" != x; then
18303     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18304     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18305     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18306     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18307       # Going to short mode and back again did indeed matter. Since short mode is
18308       # case insensitive, let's make it lowercase to improve readability.
18309       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18310       # Now convert it back to Unix-stile (cygpath)
18311       input_path=`$CYGPATH -u "$shortmode_path"`
18312       new_path="$input_path"
18313     fi
18314   fi
18315 
18316   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18317   if test "x$test_cygdrive_prefix" = x; then
18318     # As a simple fix, exclude /usr/bin since it's not a real path.
18319     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18320       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18321       # a path prefixed by /cygdrive for fixpath to work.
18322       new_path="$CYGWIN_ROOT_PATH$input_path"
18323     fi
18324   fi
18325 
18326   # remove trailing .exe if any
18327   new_path="${new_path/%.exe/}"
18328 
18329   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18330 
18331   # First separate the path from the arguments. This will split at the first
18332   # space.
18333   complete="$BUILD_LD"
18334   path="${complete%% *}"
18335   tmp="$complete EOL"
18336   arguments="${tmp#* }"
18337 
18338   # Input might be given as Windows format, start by converting to
18339   # unix format.
18340   new_path="$path"
18341 
18342   windows_path="$new_path"
18343   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18344     unix_path=`$CYGPATH -u "$windows_path"`
18345     new_path="$unix_path"
18346   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18347     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18348     new_path="$unix_path"
18349   fi
18350 
18351 
18352   # Now try to locate executable using which
18353   new_path=`$WHICH "$new_path" 2> /dev/null`
18354 
18355   if test "x$new_path" = x; then
18356     # Oops. Which didn't find the executable.
18357     # The splitting of arguments from the executable at a space might have been incorrect,
18358     # since paths with space are more likely in Windows. Give it another try with the whole
18359     # argument.
18360     path="$complete"
18361     arguments="EOL"
18362     new_path="$path"
18363 
18364   windows_path="$new_path"
18365   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18366     unix_path=`$CYGPATH -u "$windows_path"`
18367     new_path="$unix_path"
18368   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18369     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18370     new_path="$unix_path"
18371   fi
18372 
18373 
18374     new_path=`$WHICH "$new_path" 2> /dev/null`
18375 
18376     if test "x$new_path" = x; then
18377       # It's still not found. Now this is an unrecoverable error.
18378       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
18379 $as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
18380       has_space=`$ECHO "$complete" | $GREP " "`
18381       if test "x$has_space" != x; then
18382         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18383 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18384       fi
18385       as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
18386     fi
18387   fi
18388 
18389   # Now new_path has a complete unix path to the binary
18390   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18391     # Keep paths in /bin as-is, but remove trailing .exe if any
18392     new_path="${new_path/%.exe/}"
18393     # Do not save /bin paths to all_fixpath_prefixes!
18394   else
18395     # Not in mixed or Windows style, start by that.
18396     new_path=`cmd //c echo $new_path`
18397 
18398   input_path="$new_path"
18399   # Check if we need to convert this using DOS-style short mode. If the path
18400   # contains just simple characters, use it. Otherwise (spaces, weird characters),
18401   # take no chances and rewrite it.
18402   # Note: m4 eats our [], so we need to use [ and ] instead.
18403   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18404   if test "x$has_forbidden_chars" != x; then
18405     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18406     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18407   fi
18408 
18409     # Output is in $new_path
18410 
18411   windows_path="$new_path"
18412   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18413     unix_path=`$CYGPATH -u "$windows_path"`
18414     new_path="$unix_path"
18415   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18416     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18417     new_path="$unix_path"
18418   fi
18419 
18420     # remove trailing .exe if any
18421     new_path="${new_path/%.exe/}"
18422 
18423     # Save the first 10 bytes of this path to the storage, so fixpath can work.
18424     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18425   fi
18426 
18427   else
18428     # We're on a posix platform. Hooray! :)
18429     # First separate the path from the arguments. This will split at the first
18430     # space.
18431     complete="$BUILD_LD"
18432     path="${complete%% *}"
18433     tmp="$complete EOL"
18434     arguments="${tmp#* }"
18435 
18436     # Cannot rely on the command "which" here since it doesn't always work.
18437     is_absolute_path=`$ECHO "$path" | $GREP ^/`
18438     if test -z "$is_absolute_path"; then
18439       # Path to executable is not absolute. Find it.
18440       IFS_save="$IFS"
18441       IFS=:
18442       for p in $PATH; do
18443         if test -f "$p/$path" && test -x "$p/$path"; then
18444           new_path="$p/$path"
18445           break
18446         fi
18447       done
18448       IFS="$IFS_save"
18449     else
18450       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving BUILD_LD (as $path) failed, using $path directly." >&5
18451 $as_echo "$as_me: Resolving BUILD_LD (as $path) failed, using $path directly." >&6;}
18452       new_path="$path"
18453     fi
18454 
18455     if test "x$new_path" = x; then
18456         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
18457 $as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
18458         has_space=`$ECHO "$complete" | $GREP " "`
18459         if test "x$has_space" != x; then
18460           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18461 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18462         fi
18463         as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
18464       fi
18465   fi
18466 
18467       # Now join together the path and the arguments once again
18468       if test "x$arguments" != xEOL; then
18469         new_complete="$new_path ${arguments% *}"
18470       else
18471         new_complete="$new_path"
18472       fi
18473 
18474   if test "x$complete" != "x$new_complete"; then
18475       BUILD_LD="$new_complete"
18476       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_LD to \"$new_complete\"" >&5
18477 $as_echo "$as_me: Rewriting BUILD_LD to \"$new_complete\"" >&6;}
18478     fi
18479 
18480 fi
18481 
18482 
18483 
18484 
18485 # If a devkit is found on the builddeps server, then prepend its path to the
18486 # PATH variable. If there are cross compilers available in the devkit, these
18487 # will be found by AC_PROG_CC et al.
18488 DEVKIT=
18489 
18490 
18491     if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
18492         # Source the builddeps file again, to make sure it uses the latest variables!
18493         . $builddepsfile
18494         # Look for a target and build machine specific resource!
18495         eval resource=\${builddep_devkit_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
18496         if test "x$resource" = x; then
18497             # Ok, lets instead look for a target specific resource
18498             eval resource=\${builddep_devkit_TARGET_${rewritten_target_var}}
18499         fi
18500         if test "x$resource" = x; then
18501             # Ok, lets instead look for a build specific resource
18502             eval resource=\${builddep_devkit_BUILD_${rewritten_build_var}}
18503         fi
18504         if test "x$resource" = x; then
18505             # Ok, lets instead look for a generic resource
18506             # (The devkit comes from M4 and not the shell, thus no need for eval here.)
18507             resource=${builddep_devkit}
18508         fi
18509         if test "x$resource" != x; then
18510             { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for devkit" >&5
18511 $as_echo "$as_me: Using builddeps $resource for devkit" >&6;}
18512             # If the resource in the builddeps.conf file is an existing directory,
18513             # for example /java/linux/cups
18514             if test -d ${resource}; then
18515                depdir=${resource}
18516             else
18517 
18518 # devkit is for example mymodule
18519 # $resource is for example libs/general/libmymod_1_2_3.zip
18520 # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
18521 # $with_builddeps_dir is for example /localhome/builddeps
18522 # depdir is the name of the variable into which we store the depdir, eg MYMOD
18523 # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
18524 # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
18525     filename=`basename $resource`
18526     filebase=`echo $filename | sed 's/\.[^\.]*$//'`
18527     filebase=${filename%%.*}
18528     extension=${filename#*.}
18529     installdir=$with_builddeps_dir/$filebase
18530     if test ! -f $installdir/$filename.unpacked; then
18531         { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency devkit from $with_builddeps_server/$resource and installing into $installdir" >&5
18532 $as_echo "$as_me: Downloading build dependency devkit from $with_builddeps_server/$resource and installing into $installdir" >&6;}
18533         if test ! -d $installdir; then
18534             mkdir -p $installdir
18535         fi
18536         if test ! -d $installdir; then
18537             as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
18538         fi
18539         tmpfile=`mktemp $installdir/devkit.XXXXXXXXX`
18540         touch $tmpfile
18541         if test ! -f $tmpfile; then
18542             as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
18543         fi
18544 
18545     # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
18546     # $tmpfile is the local file name for the downloaded file.
18547     VALID_TOOL=no
18548     if test "x$BDEPS_FTP" = xwget; then
18549        VALID_TOOL=yes
18550        wget -O $tmpfile $with_builddeps_server/$resource
18551     fi
18552     if test "x$BDEPS_FTP" = xlftp; then
18553        VALID_TOOL=yes
18554        lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
18555     fi
18556     if test "x$BDEPS_FTP" = xftp; then
18557         VALID_TOOL=yes
18558         FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
18559         FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
18560         FTPUSERPWD=${FTPSERVER%%@*}
18561         if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
18562             FTPUSER=${userpwd%%:*}
18563             FTPPWD=${userpwd#*@}
18564             FTPSERVER=${FTPSERVER#*@}
18565         else
18566             FTPUSER=ftp
18567             FTPPWD=ftp
18568         fi
18569         # the "pass" command does not work on some
18570         # ftp clients (read ftp.exe) but if it works,
18571         # passive mode is better!
18572         (\
18573             echo "user $FTPUSER $FTPPWD"        ;\
18574             echo "pass"                         ;\
18575             echo "bin"                          ;\
18576             echo "get $FTPPATH $tmpfile"              ;\
18577         ) | ftp -in $FTPSERVER
18578     fi
18579     if test "x$VALID_TOOL" != xyes; then
18580        as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
18581     fi
18582 
18583         mv $tmpfile $installdir/$filename
18584         if test ! -s $installdir/$filename; then
18585             as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
18586         fi
18587         case "$extension" in
18588             zip)  echo "Unzipping $installdir/$filename..."
18589                (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
18590             ;;
18591             tar.gz) echo "Untaring $installdir/$filename..."
18592                (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
18593             ;;
18594             tgz) echo "Untaring $installdir/$filename..."
18595                (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
18596             ;;
18597             *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
18598             ;;
18599         esac
18600     fi
18601     if test -f $installdir/$filename.unpacked; then
18602         depdir=$installdir
18603     fi
18604 
18605             fi
18606             # Source the builddeps file again, because in the previous command, the depdir
18607             # was updated to point at the current build dependency install directory.
18608             . $builddepsfile
18609             # Now extract variables from the builddeps.conf files.
18610             theroot=${builddep_devkit_ROOT}
18611             thecflags=${builddep_devkit_CFLAGS}
18612             thelibs=${builddep_devkit_LIBS}
18613             if test "x$depdir" = x; then
18614                 as_fn_error $? "Could not download build dependency devkit" "$LINENO" 5
18615             fi
18616             DEVKIT=$depdir
18617             if test "x$theroot" != x; then
18618                DEVKIT="$theroot"
18619             fi
18620             if test "x$thecflags" != x; then
18621                DEVKIT_CFLAGS="$thecflags"
18622             fi
18623             if test "x$thelibs" != x; then
18624                DEVKIT_LIBS="$thelibs"
18625             fi
18626             # Found devkit
18627                      PATH="$DEVKIT/bin:$PATH"
18628                      SYS_ROOT="$DEVKIT/${rewritten_target}/sys-root"
18629                      if test "x$x_includes" = "xNONE"; then
18630                          x_includes="$SYS_ROOT/usr/include/X11"
18631                      fi
18632                      if test "x$x_libraries" = "xNONE"; then
18633                          x_libraries="$SYS_ROOT/usr/lib"
18634                      fi
18635 
18636 
18637         fi
18638 
18639     fi
18640 
18641 
18642 if test "x$SYS_ROOT" != "x/" ; then
18643     CFLAGS="--sysroot=$SYS_ROOT $CFLAGS"
18644     CXXFLAGS="--sysroot=$SYS_ROOT $CXXFLAGS"
18645     OBJCFLAGS="--sysroot=$SYS_ROOT $OBJCFLAGS"
18646     OBJCXXFLAGS="--sysroot=$SYS_ROOT $OBJCFLAGS"
18647     CPPFLAGS="--sysroot=$SYS_ROOT $CPPFLAGS"
18648     LDFLAGS="--sysroot=$SYS_ROOT $LDFLAGS"
18649 fi
18650 
18651 # Store the CFLAGS etal passed to the configure script.
18652 ORG_CFLAGS="$CFLAGS"
18653 ORG_CXXFLAGS="$CXXFLAGS"
18654 ORG_OBJCFLAGS="$OBJCFLAGS"
18655 
18656 # autoconf magic only relies on PATH, so update it if tools dir is specified
18657 OLD_PATH="$PATH"
18658 if test "x$TOOLS_DIR" != x; then
18659   PATH=$TOOLS_DIR:$PATH
18660 fi
18661 
18662 
18663 ### Locate C compiler (CC)
18664 
18665 # On windows, only cl.exe is supported.
18666 # On Solaris, cc is preferred to gcc.
18667 # Elsewhere, gcc is preferred to cc.
18668 
18669 if test "x$CC" != x; then
18670   COMPILER_CHECK_LIST="$CC"
18671 elif test "x$OPENJDK_TARGET_OS" = "xwindows"; then
18672   COMPILER_CHECK_LIST="cl"
18673 elif test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
18674   COMPILER_CHECK_LIST="cc gcc"
18675 else
18676   COMPILER_CHECK_LIST="gcc cc"
18677 fi
18678 
18679 
18680   COMPILER_NAME=C
18681 
18682   CC=
18683   # If TOOLS_DIR is set, check for all compiler names in there first
18684   # before checking the rest of the PATH.
18685   if test -n "$TOOLS_DIR"; then
18686     PATH_save="$PATH"
18687     PATH="$TOOLS_DIR"
18688     for ac_prog in $COMPILER_CHECK_LIST
18689 do
18690   # Extract the first word of "$ac_prog", so it can be a program name with args.
18691 set dummy $ac_prog; ac_word=$2
18692 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18693 $as_echo_n "checking for $ac_word... " >&6; }
18694 if test "${ac_cv_path_TOOLS_DIR_CC+set}" = set; then :
18695   $as_echo_n "(cached) " >&6
18696 else
18697   case $TOOLS_DIR_CC in
18698   [\\/]* | ?:[\\/]*)
18699   ac_cv_path_TOOLS_DIR_CC="$TOOLS_DIR_CC" # Let the user override the test with a path.
18700   ;;
18701   *)
18702   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18703 for as_dir in $PATH
18704 do
18705   IFS=$as_save_IFS
18706   test -z "$as_dir" && as_dir=.
18707     for ac_exec_ext in '' $ac_executable_extensions; do
18708   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
18709     ac_cv_path_TOOLS_DIR_CC="$as_dir/$ac_word$ac_exec_ext"
18710     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18711     break 2
18712   fi
18713 done
18714   done
18715 IFS=$as_save_IFS
18716 
18717   ;;
18718 esac
18719 fi
18720 TOOLS_DIR_CC=$ac_cv_path_TOOLS_DIR_CC
18721 if test -n "$TOOLS_DIR_CC"; then
18722   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLS_DIR_CC" >&5
18723 $as_echo "$TOOLS_DIR_CC" >&6; }
18724 else
18725   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18726 $as_echo "no" >&6; }
18727 fi
18728 
18729 
18730   test -n "$TOOLS_DIR_CC" && break
18731 done
18732 
18733     CC=$TOOLS_DIR_CC
18734     PATH="$PATH_save"
18735   fi
18736 
18737   # AC_PATH_PROGS can't be run multiple times with the same variable,
18738   # so create a new name for this run.
18739   if test "x$CC" = x; then
18740     for ac_prog in $COMPILER_CHECK_LIST
18741 do
18742   # Extract the first word of "$ac_prog", so it can be a program name with args.
18743 set dummy $ac_prog; ac_word=$2
18744 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18745 $as_echo_n "checking for $ac_word... " >&6; }
18746 if test "${ac_cv_path_POTENTIAL_CC+set}" = set; then :
18747   $as_echo_n "(cached) " >&6
18748 else
18749   case $POTENTIAL_CC in
18750   [\\/]* | ?:[\\/]*)
18751   ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
18752   ;;
18753   *)
18754   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18755 for as_dir in $PATH
18756 do
18757   IFS=$as_save_IFS
18758   test -z "$as_dir" && as_dir=.
18759     for ac_exec_ext in '' $ac_executable_extensions; do
18760   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
18761     ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
18762     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18763     break 2
18764   fi
18765 done
18766   done
18767 IFS=$as_save_IFS
18768 
18769   ;;
18770 esac
18771 fi
18772 POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
18773 if test -n "$POTENTIAL_CC"; then
18774   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
18775 $as_echo "$POTENTIAL_CC" >&6; }
18776 else
18777   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18778 $as_echo "no" >&6; }
18779 fi
18780 
18781 
18782   test -n "$POTENTIAL_CC" && break
18783 done
18784 
18785     CC=$POTENTIAL_CC
18786   fi
18787 
18788   if test "x$CC" = x; then
18789 
18790     # Print a helpful message on how to acquire the necessary build dependency.
18791     # devkit is the help tag: freetyp2, cups, pulse, alsa etc
18792     MISSING_DEPENDENCY=devkit
18793     PKGHANDLER_COMMAND=
18794 
18795     case $PKGHANDLER in
18796         apt-get)
18797                 apt_help     $MISSING_DEPENDENCY ;;
18798     yum)
18799                 yum_help     $MISSING_DEPENDENCY ;;
18800         port)
18801                 port_help    $MISSING_DEPENDENCY ;;
18802         pkgutil)
18803                 pkgutil_help $MISSING_DEPENDENCY ;;
18804         pkgadd)
18805                 pkgadd_help  $MISSING_DEPENDENCY ;;
18806     * )
18807       break ;;
18808     esac
18809 
18810     if test "x$PKGHANDLER_COMMAND" != x; then
18811         HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
18812     fi
18813 
18814       as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
18815   fi
18816 
18817   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18818 
18819   # First separate the path from the arguments. This will split at the first
18820   # space.
18821   complete="$CC"
18822   path="${complete%% *}"
18823   tmp="$complete EOL"
18824   arguments="${tmp#* }"
18825 
18826   # Input might be given as Windows format, start by converting to
18827   # unix format.
18828   new_path=`$CYGPATH -u "$path"`
18829 
18830   # Now try to locate executable using which
18831   new_path=`$WHICH "$new_path" 2> /dev/null`
18832   # bat and cmd files are not always considered executable in cygwin causing which
18833   # to not find them
18834   if test "x$new_path" = x \
18835            && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18836            && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18837     new_path=`$CYGPATH -u "$path"`
18838   fi
18839   if test "x$new_path" = x; then
18840     # Oops. Which didn't find the executable.
18841     # The splitting of arguments from the executable at a space might have been incorrect,
18842     # since paths with space are more likely in Windows. Give it another try with the whole
18843     # argument.
18844     path="$complete"
18845     arguments="EOL"
18846     new_path=`$CYGPATH -u "$path"`
18847     new_path=`$WHICH "$new_path" 2> /dev/null`
18848     # bat and cmd files are not always considered executable in cygwin causing which
18849     # to not find them
18850     if test "x$new_path" = x \
18851              && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18852              && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18853       new_path=`$CYGPATH -u "$path"`
18854     fi
18855     if test "x$new_path" = x; then
18856       # It's still not found. Now this is an unrecoverable error.
18857       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
18858 $as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
18859       has_space=`$ECHO "$complete" | $GREP " "`
18860       if test "x$has_space" != x; then
18861         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18862 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18863       fi
18864       as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
18865     fi
18866   fi
18867 
18868   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18869   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18870   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18871   # "foo.exe" is OK but "foo" is an error.
18872   #
18873   # This test is therefore slightly more accurate than "test -f" to check for file precense.
18874   # It is also a way to make sure we got the proper file name for the real test later on.
18875   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18876   if test "x$test_shortpath" = x; then
18877     # Short path failed, file does not exist as specified.
18878     # Try adding .exe or .cmd
18879     if test -f "${new_path}.exe"; then
18880        input_to_shortpath="${new_path}.exe"
18881     elif test -f "${new_path}.cmd"; then
18882        input_to_shortpath="${new_path}.cmd"
18883     else
18884       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$new_path\", is invalid." >&5
18885 $as_echo "$as_me: The path of CC, which resolves as \"$new_path\", is invalid." >&6;}
18886       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18887 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18888       as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
18889     fi
18890   else
18891     input_to_shortpath="$new_path"
18892   fi
18893 
18894   # Call helper function which possibly converts this using DOS-style short mode.
18895   # If so, the updated path is stored in $new_path.
18896   new_path="$input_to_shortpath"
18897 
18898   input_path="$input_to_shortpath"
18899   # Check if we need to convert this using DOS-style short mode. If the path
18900   # contains just simple characters, use it. Otherwise (spaces, weird characters),
18901   # take no chances and rewrite it.
18902   # Note: m4 eats our [], so we need to use [ and ] instead.
18903   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18904   if test "x$has_forbidden_chars" != x; then
18905     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18906     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18907     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18908     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18909       # Going to short mode and back again did indeed matter. Since short mode is
18910       # case insensitive, let's make it lowercase to improve readability.
18911       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18912       # Now convert it back to Unix-stile (cygpath)
18913       input_path=`$CYGPATH -u "$shortmode_path"`
18914       new_path="$input_path"
18915     fi
18916   fi
18917 
18918   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18919   if test "x$test_cygdrive_prefix" = x; then
18920     # As a simple fix, exclude /usr/bin since it's not a real path.
18921     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18922       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18923       # a path prefixed by /cygdrive for fixpath to work.
18924       new_path="$CYGWIN_ROOT_PATH$input_path"
18925     fi
18926   fi
18927 
18928   # remove trailing .exe if any
18929   new_path="${new_path/%.exe/}"
18930 
18931   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18932 
18933   # First separate the path from the arguments. This will split at the first
18934   # space.
18935   complete="$CC"
18936   path="${complete%% *}"
18937   tmp="$complete EOL"
18938   arguments="${tmp#* }"
18939 
18940   # Input might be given as Windows format, start by converting to
18941   # unix format.
18942   new_path="$path"
18943 
18944   windows_path="$new_path"
18945   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18946     unix_path=`$CYGPATH -u "$windows_path"`
18947     new_path="$unix_path"
18948   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18949     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18950     new_path="$unix_path"
18951   fi
18952 
18953 
18954   # Now try to locate executable using which
18955   new_path=`$WHICH "$new_path" 2> /dev/null`
18956 
18957   if test "x$new_path" = x; then
18958     # Oops. Which didn't find the executable.
18959     # The splitting of arguments from the executable at a space might have been incorrect,
18960     # since paths with space are more likely in Windows. Give it another try with the whole
18961     # argument.
18962     path="$complete"
18963     arguments="EOL"
18964     new_path="$path"
18965 
18966   windows_path="$new_path"
18967   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18968     unix_path=`$CYGPATH -u "$windows_path"`
18969     new_path="$unix_path"
18970   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18971     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18972     new_path="$unix_path"
18973   fi
18974 
18975 
18976     new_path=`$WHICH "$new_path" 2> /dev/null`
18977 
18978     if test "x$new_path" = x; then
18979       # It's still not found. Now this is an unrecoverable error.
18980       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
18981 $as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
18982       has_space=`$ECHO "$complete" | $GREP " "`
18983       if test "x$has_space" != x; then
18984         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18985 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18986       fi
18987       as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
18988     fi
18989   fi
18990 
18991   # Now new_path has a complete unix path to the binary
18992   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18993     # Keep paths in /bin as-is, but remove trailing .exe if any
18994     new_path="${new_path/%.exe/}"
18995     # Do not save /bin paths to all_fixpath_prefixes!
18996   else
18997     # Not in mixed or Windows style, start by that.
18998     new_path=`cmd //c echo $new_path`
18999 
19000   input_path="$new_path"
19001   # Check if we need to convert this using DOS-style short mode. If the path
19002   # contains just simple characters, use it. Otherwise (spaces, weird characters),
19003   # take no chances and rewrite it.
19004   # Note: m4 eats our [], so we need to use [ and ] instead.
19005   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19006   if test "x$has_forbidden_chars" != x; then
19007     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19008     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19009   fi
19010 
19011     # Output is in $new_path
19012 
19013   windows_path="$new_path"
19014   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19015     unix_path=`$CYGPATH -u "$windows_path"`
19016     new_path="$unix_path"
19017   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19018     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19019     new_path="$unix_path"
19020   fi
19021 
19022     # remove trailing .exe if any
19023     new_path="${new_path/%.exe/}"
19024 
19025     # Save the first 10 bytes of this path to the storage, so fixpath can work.
19026     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19027   fi
19028 
19029   else
19030     # We're on a posix platform. Hooray! :)
19031     # First separate the path from the arguments. This will split at the first
19032     # space.
19033     complete="$CC"
19034     path="${complete%% *}"
19035     tmp="$complete EOL"
19036     arguments="${tmp#* }"
19037 
19038     # Cannot rely on the command "which" here since it doesn't always work.
19039     is_absolute_path=`$ECHO "$path" | $GREP ^/`
19040     if test -z "$is_absolute_path"; then
19041       # Path to executable is not absolute. Find it.
19042       IFS_save="$IFS"
19043       IFS=:
19044       for p in $PATH; do
19045         if test -f "$p/$path" && test -x "$p/$path"; then
19046           new_path="$p/$path"
19047           break
19048         fi
19049       done
19050       IFS="$IFS_save"
19051     else
19052       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CC (as $path) failed, using $path directly." >&5
19053 $as_echo "$as_me: Resolving CC (as $path) failed, using $path directly." >&6;}
19054       new_path="$path"
19055     fi
19056 
19057     if test "x$new_path" = x; then
19058         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
19059 $as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
19060         has_space=`$ECHO "$complete" | $GREP " "`
19061         if test "x$has_space" != x; then
19062           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19063 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19064         fi
19065         as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
19066       fi
19067   fi
19068 
19069       # Now join together the path and the arguments once again
19070       if test "x$arguments" != xEOL; then
19071         new_complete="$new_path ${arguments% *}"
19072       else
19073         new_complete="$new_path"
19074       fi
19075 
19076   if test "x$complete" != "x$new_complete"; then
19077       CC="$new_complete"
19078       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CC to \"$new_complete\"" >&5
19079 $as_echo "$as_me: Rewriting CC to \"$new_complete\"" >&6;}
19080     fi
19081 
19082   { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CC" >&5
19083 $as_echo_n "checking resolved symbolic links for CC... " >&6; }
19084   TEST_COMPILER="$CC"
19085 
19086     if test "x$OPENJDK_BUILD_OS" != xwindows; then
19087         # Follow a chain of symbolic links. Use readlink
19088         # where it exists, else fall back to horribly
19089         # complicated shell code.
19090         if test "x$READLINK_TESTED" != yes; then
19091             # On MacOSX there is a readlink tool with a different
19092             # purpose than the GNU readlink tool. Check the found readlink.
19093             ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
19094             if test "x$ISGNU" = x; then
19095                  # A readlink that we do not know how to use.
19096                  # Are there other non-GNU readlinks out there?
19097                  READLINK_TESTED=yes
19098                  READLINK=
19099             fi
19100         fi
19101 
19102         if test "x$READLINK" != x; then
19103             TEST_COMPILER=`$READLINK -f $TEST_COMPILER`
19104         else
19105             # Save the current directory for restoring afterwards
19106             STARTDIR=$PWD
19107             COUNTER=0
19108             sym_link_dir=`$DIRNAME $TEST_COMPILER`
19109             sym_link_file=`$BASENAME $TEST_COMPILER`
19110             # Use the system pwd and not the shell builtin to resolve directory symlinks
19111             cd $sym_link_dir
19112             cd `$THEPWDCMD`
19113             sym_link_dir=`$THEPWDCMD`
19114             # Resolve file symlinks
19115             while test $COUNTER -lt 20; do
19116                 ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
19117                 if test "x$ISLINK" == x; then
19118                     # This is not a symbolic link! We are done!
19119                     break
19120                 fi
19121                 # Again resolve directory symlinks since the target of the just found
19122                 # link could be in a different directory
19123                 cd `$DIRNAME $ISLINK`
19124                 sym_link_dir=`$THEPWDCMD`
19125                 sym_link_file=`$BASENAME $ISLINK`
19126                 let COUNTER=COUNTER+1
19127             done
19128             cd $STARTDIR
19129             TEST_COMPILER=$sym_link_dir/$sym_link_file
19130         fi
19131     fi
19132 
19133   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_COMPILER" >&5
19134 $as_echo "$TEST_COMPILER" >&6; }
19135   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CC is disguised ccache" >&5
19136 $as_echo_n "checking if CC is disguised ccache... " >&6; }
19137 
19138   COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"`
19139   if test "x$COMPILER_BASENAME" = "xccache"; then
19140     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5
19141 $as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; }
19142     # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache.
19143     # We want to control ccache invocation ourselves, so ignore this cc and try
19144     # searching again.
19145 
19146     # Remove the path to the fake ccache cc from the PATH
19147     RETRY_COMPILER_SAVED_PATH="$PATH"
19148     COMPILER_DIRNAME=`$DIRNAME $CC`
19149     PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`"
19150 
19151     # Try again looking for our compiler
19152     if test -n "$ac_tool_prefix"; then
19153   for ac_prog in $COMPILER_CHECK_LIST
19154   do
19155     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
19156 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
19157 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19158 $as_echo_n "checking for $ac_word... " >&6; }
19159 if test "${ac_cv_prog_PROPER_COMPILER_CC+set}" = set; then :
19160   $as_echo_n "(cached) " >&6
19161 else
19162   if test -n "$PROPER_COMPILER_CC"; then
19163   ac_cv_prog_PROPER_COMPILER_CC="$PROPER_COMPILER_CC" # Let the user override the test.
19164 else
19165 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19166 for as_dir in $PATH
19167 do
19168   IFS=$as_save_IFS
19169   test -z "$as_dir" && as_dir=.
19170     for ac_exec_ext in '' $ac_executable_extensions; do
19171   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
19172     ac_cv_prog_PROPER_COMPILER_CC="$ac_tool_prefix$ac_prog"
19173     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19174     break 2
19175   fi
19176 done
19177   done
19178 IFS=$as_save_IFS
19179 
19180 fi
19181 fi
19182 PROPER_COMPILER_CC=$ac_cv_prog_PROPER_COMPILER_CC
19183 if test -n "$PROPER_COMPILER_CC"; then
19184   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5
19185 $as_echo "$PROPER_COMPILER_CC" >&6; }
19186 else
19187   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19188 $as_echo "no" >&6; }
19189 fi
19190 
19191 
19192     test -n "$PROPER_COMPILER_CC" && break
19193   done
19194 fi
19195 if test -z "$PROPER_COMPILER_CC"; then
19196   ac_ct_PROPER_COMPILER_CC=$PROPER_COMPILER_CC
19197   for ac_prog in $COMPILER_CHECK_LIST
19198 do
19199   # Extract the first word of "$ac_prog", so it can be a program name with args.
19200 set dummy $ac_prog; ac_word=$2
19201 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19202 $as_echo_n "checking for $ac_word... " >&6; }
19203 if test "${ac_cv_prog_ac_ct_PROPER_COMPILER_CC+set}" = set; then :
19204   $as_echo_n "(cached) " >&6
19205 else
19206   if test -n "$ac_ct_PROPER_COMPILER_CC"; then
19207   ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_ct_PROPER_COMPILER_CC" # Let the user override the test.
19208 else
19209 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19210 for as_dir in $PATH
19211 do
19212   IFS=$as_save_IFS
19213   test -z "$as_dir" && as_dir=.
19214     for ac_exec_ext in '' $ac_executable_extensions; do
19215   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
19216     ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_prog"
19217     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19218     break 2
19219   fi
19220 done
19221   done
19222 IFS=$as_save_IFS
19223 
19224 fi
19225 fi
19226 ac_ct_PROPER_COMPILER_CC=$ac_cv_prog_ac_ct_PROPER_COMPILER_CC
19227 if test -n "$ac_ct_PROPER_COMPILER_CC"; then
19228   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CC" >&5
19229 $as_echo "$ac_ct_PROPER_COMPILER_CC" >&6; }
19230 else
19231   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19232 $as_echo "no" >&6; }
19233 fi
19234 
19235 
19236   test -n "$ac_ct_PROPER_COMPILER_CC" && break
19237 done
19238 
19239   if test "x$ac_ct_PROPER_COMPILER_CC" = x; then
19240     PROPER_COMPILER_CC=""
19241   else
19242     case $cross_compiling:$ac_tool_warned in
19243 yes:)
19244 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
19245 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
19246 ac_tool_warned=yes ;;
19247 esac
19248     PROPER_COMPILER_CC=$ac_ct_PROPER_COMPILER_CC
19249   fi
19250 fi
19251 
19252 
19253   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19254 
19255   # First separate the path from the arguments. This will split at the first
19256   # space.
19257   complete="$PROPER_COMPILER_CC"
19258   path="${complete%% *}"
19259   tmp="$complete EOL"
19260   arguments="${tmp#* }"
19261 
19262   # Input might be given as Windows format, start by converting to
19263   # unix format.
19264   new_path=`$CYGPATH -u "$path"`
19265 
19266   # Now try to locate executable using which
19267   new_path=`$WHICH "$new_path" 2> /dev/null`
19268   # bat and cmd files are not always considered executable in cygwin causing which
19269   # to not find them
19270   if test "x$new_path" = x \
19271            && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19272            && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19273     new_path=`$CYGPATH -u "$path"`
19274   fi
19275   if test "x$new_path" = x; then
19276     # Oops. Which didn't find the executable.
19277     # The splitting of arguments from the executable at a space might have been incorrect,
19278     # since paths with space are more likely in Windows. Give it another try with the whole
19279     # argument.
19280     path="$complete"
19281     arguments="EOL"
19282     new_path=`$CYGPATH -u "$path"`
19283     new_path=`$WHICH "$new_path" 2> /dev/null`
19284     # bat and cmd files are not always considered executable in cygwin causing which
19285     # to not find them
19286     if test "x$new_path" = x \
19287              && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19288              && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19289       new_path=`$CYGPATH -u "$path"`
19290     fi
19291     if test "x$new_path" = x; then
19292       # It's still not found. Now this is an unrecoverable error.
19293       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
19294 $as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
19295       has_space=`$ECHO "$complete" | $GREP " "`
19296       if test "x$has_space" != x; then
19297         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19298 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19299       fi
19300       as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
19301     fi
19302   fi
19303 
19304   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19305   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19306   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19307   # "foo.exe" is OK but "foo" is an error.
19308   #
19309   # This test is therefore slightly more accurate than "test -f" to check for file precense.
19310   # It is also a way to make sure we got the proper file name for the real test later on.
19311   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19312   if test "x$test_shortpath" = x; then
19313     # Short path failed, file does not exist as specified.
19314     # Try adding .exe or .cmd
19315     if test -f "${new_path}.exe"; then
19316        input_to_shortpath="${new_path}.exe"
19317     elif test -f "${new_path}.cmd"; then
19318        input_to_shortpath="${new_path}.cmd"
19319     else
19320       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&5
19321 $as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&6;}
19322       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19323 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19324       as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
19325     fi
19326   else
19327     input_to_shortpath="$new_path"
19328   fi
19329 
19330   # Call helper function which possibly converts this using DOS-style short mode.
19331   # If so, the updated path is stored in $new_path.
19332   new_path="$input_to_shortpath"
19333 
19334   input_path="$input_to_shortpath"
19335   # Check if we need to convert this using DOS-style short mode. If the path
19336   # contains just simple characters, use it. Otherwise (spaces, weird characters),
19337   # take no chances and rewrite it.
19338   # Note: m4 eats our [], so we need to use [ and ] instead.
19339   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19340   if test "x$has_forbidden_chars" != x; then
19341     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19342     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19343     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19344     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19345       # Going to short mode and back again did indeed matter. Since short mode is
19346       # case insensitive, let's make it lowercase to improve readability.
19347       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19348       # Now convert it back to Unix-stile (cygpath)
19349       input_path=`$CYGPATH -u "$shortmode_path"`
19350       new_path="$input_path"
19351     fi
19352   fi
19353 
19354   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19355   if test "x$test_cygdrive_prefix" = x; then
19356     # As a simple fix, exclude /usr/bin since it's not a real path.
19357     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19358       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19359       # a path prefixed by /cygdrive for fixpath to work.
19360       new_path="$CYGWIN_ROOT_PATH$input_path"
19361     fi
19362   fi
19363 
19364   # remove trailing .exe if any
19365   new_path="${new_path/%.exe/}"
19366 
19367   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19368 
19369   # First separate the path from the arguments. This will split at the first
19370   # space.
19371   complete="$PROPER_COMPILER_CC"
19372   path="${complete%% *}"
19373   tmp="$complete EOL"
19374   arguments="${tmp#* }"
19375 
19376   # Input might be given as Windows format, start by converting to
19377   # unix format.
19378   new_path="$path"
19379 
19380   windows_path="$new_path"
19381   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19382     unix_path=`$CYGPATH -u "$windows_path"`
19383     new_path="$unix_path"
19384   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19385     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19386     new_path="$unix_path"
19387   fi
19388 
19389 
19390   # Now try to locate executable using which
19391   new_path=`$WHICH "$new_path" 2> /dev/null`
19392 
19393   if test "x$new_path" = x; then
19394     # Oops. Which didn't find the executable.
19395     # The splitting of arguments from the executable at a space might have been incorrect,
19396     # since paths with space are more likely in Windows. Give it another try with the whole
19397     # argument.
19398     path="$complete"
19399     arguments="EOL"
19400     new_path="$path"
19401 
19402   windows_path="$new_path"
19403   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19404     unix_path=`$CYGPATH -u "$windows_path"`
19405     new_path="$unix_path"
19406   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19407     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19408     new_path="$unix_path"
19409   fi
19410 
19411 
19412     new_path=`$WHICH "$new_path" 2> /dev/null`
19413 
19414     if test "x$new_path" = x; then
19415       # It's still not found. Now this is an unrecoverable error.
19416       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
19417 $as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
19418       has_space=`$ECHO "$complete" | $GREP " "`
19419       if test "x$has_space" != x; then
19420         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19421 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19422       fi
19423       as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
19424     fi
19425   fi
19426 
19427   # Now new_path has a complete unix path to the binary
19428   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
19429     # Keep paths in /bin as-is, but remove trailing .exe if any
19430     new_path="${new_path/%.exe/}"
19431     # Do not save /bin paths to all_fixpath_prefixes!
19432   else
19433     # Not in mixed or Windows style, start by that.
19434     new_path=`cmd //c echo $new_path`
19435 
19436   input_path="$new_path"
19437   # Check if we need to convert this using DOS-style short mode. If the path
19438   # contains just simple characters, use it. Otherwise (spaces, weird characters),
19439   # take no chances and rewrite it.
19440   # Note: m4 eats our [], so we need to use [ and ] instead.
19441   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19442   if test "x$has_forbidden_chars" != x; then
19443     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19444     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19445   fi
19446 
19447     # Output is in $new_path
19448 
19449   windows_path="$new_path"
19450   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19451     unix_path=`$CYGPATH -u "$windows_path"`
19452     new_path="$unix_path"
19453   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19454     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19455     new_path="$unix_path"
19456   fi
19457 
19458     # remove trailing .exe if any
19459     new_path="${new_path/%.exe/}"
19460 
19461     # Save the first 10 bytes of this path to the storage, so fixpath can work.
19462     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19463   fi
19464 
19465   else
19466     # We're on a posix platform. Hooray! :)
19467     # First separate the path from the arguments. This will split at the first
19468     # space.
19469     complete="$PROPER_COMPILER_CC"
19470     path="${complete%% *}"
19471     tmp="$complete EOL"
19472     arguments="${tmp#* }"
19473 
19474     # Cannot rely on the command "which" here since it doesn't always work.
19475     is_absolute_path=`$ECHO "$path" | $GREP ^/`
19476     if test -z "$is_absolute_path"; then
19477       # Path to executable is not absolute. Find it.
19478       IFS_save="$IFS"
19479       IFS=:
19480       for p in $PATH; do
19481         if test -f "$p/$path" && test -x "$p/$path"; then
19482           new_path="$p/$path"
19483           break
19484         fi
19485       done
19486       IFS="$IFS_save"
19487     else
19488       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving PROPER_COMPILER_CC (as $path) failed, using $path directly." >&5
19489 $as_echo "$as_me: Resolving PROPER_COMPILER_CC (as $path) failed, using $path directly." >&6;}
19490       new_path="$path"
19491     fi
19492 
19493     if test "x$new_path" = x; then
19494         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
19495 $as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
19496         has_space=`$ECHO "$complete" | $GREP " "`
19497         if test "x$has_space" != x; then
19498           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19499 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19500         fi
19501         as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
19502       fi
19503   fi
19504 
19505       # Now join together the path and the arguments once again
19506       if test "x$arguments" != xEOL; then
19507         new_complete="$new_path ${arguments% *}"
19508       else
19509         new_complete="$new_path"
19510       fi
19511 
19512   if test "x$complete" != "x$new_complete"; then
19513       PROPER_COMPILER_CC="$new_complete"
19514       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&5
19515 $as_echo "$as_me: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&6;}
19516     fi
19517 
19518     PATH="$RETRY_COMPILER_SAVED_PATH"
19519 
19520     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CC" >&5
19521 $as_echo_n "checking for resolved symbolic links for CC... " >&6; }
19522 
19523     if test "x$OPENJDK_BUILD_OS" != xwindows; then
19524         # Follow a chain of symbolic links. Use readlink
19525         # where it exists, else fall back to horribly
19526         # complicated shell code.
19527         if test "x$READLINK_TESTED" != yes; then
19528             # On MacOSX there is a readlink tool with a different
19529             # purpose than the GNU readlink tool. Check the found readlink.
19530             ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
19531             if test "x$ISGNU" = x; then
19532                  # A readlink that we do not know how to use.
19533                  # Are there other non-GNU readlinks out there?
19534                  READLINK_TESTED=yes
19535                  READLINK=
19536             fi
19537         fi
19538 
19539         if test "x$READLINK" != x; then
19540             PROPER_COMPILER_CC=`$READLINK -f $PROPER_COMPILER_CC`
19541         else
19542             # Save the current directory for restoring afterwards
19543             STARTDIR=$PWD
19544             COUNTER=0
19545             sym_link_dir=`$DIRNAME $PROPER_COMPILER_CC`
19546             sym_link_file=`$BASENAME $PROPER_COMPILER_CC`
19547             # Use the system pwd and not the shell builtin to resolve directory symlinks
19548             cd $sym_link_dir
19549             cd `$THEPWDCMD`
19550             sym_link_dir=`$THEPWDCMD`
19551             # Resolve file symlinks
19552             while test $COUNTER -lt 20; do
19553                 ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
19554                 if test "x$ISLINK" == x; then
19555                     # This is not a symbolic link! We are done!
19556                     break
19557                 fi
19558                 # Again resolve directory symlinks since the target of the just found
19559                 # link could be in a different directory
19560                 cd `$DIRNAME $ISLINK`
19561                 sym_link_dir=`$THEPWDCMD`
19562                 sym_link_file=`$BASENAME $ISLINK`
19563                 let COUNTER=COUNTER+1
19564             done
19565             cd $STARTDIR
19566             PROPER_COMPILER_CC=$sym_link_dir/$sym_link_file
19567         fi
19568     fi
19569 
19570     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5
19571 $as_echo "$PROPER_COMPILER_CC" >&6; }
19572     CC="$PROPER_COMPILER_CC"
19573   else
19574     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CC" >&5
19575 $as_echo "no, keeping CC" >&6; }
19576     CC="$TEST_COMPILER"
19577   fi
19578 
19579   COMPILER=$CC
19580   COMPILER_NAME=$COMPILER_NAME
19581 
19582   if test "x$OPENJDK_TARGET_OS" = xsolaris; then
19583     # Make sure we use the Sun Studio compiler and not gcc on Solaris, which won't work
19584     COMPILER_VERSION_TEST=`$COMPILER -V 2>&1 | $HEAD -n 1`
19585     $ECHO $COMPILER_VERSION_TEST | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
19586     if test $? -ne 0; then
19587       GCC_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
19588 
19589       { $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
19590 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required Sun Studio compiler." >&6;}
19591       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&5
19592 $as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&6;}
19593       as_fn_error $? "Sun Studio compiler is required. Try setting --with-tools-dir." "$LINENO" 5
19594     else
19595       COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/p"`
19596       COMPILER_VENDOR="Sun Studio"
19597     fi
19598   elif test  "x$OPENJDK_TARGET_OS" = xwindows; then
19599     # First line typically looks something like:
19600     # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.30319.01 for 80x86
19601     COMPILER_VERSION_TEST=`$COMPILER 2>&1 | $HEAD -n 1`
19602     COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*Version \([1-9][0-9.]*\) .*/\1/p"`
19603     COMPILER_VENDOR="Microsoft CL.EXE"
19604     COMPILER_CPU_TEST=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* for \(.*\)$/\1/p"`
19605     if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
19606       if test "x$COMPILER_CPU_TEST" != "x80x86"; then
19607         as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"80x86\"." "$LINENO" 5
19608       fi
19609     elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
19610       if test "x$COMPILER_CPU_TEST" != "xx64"; then
19611         as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." "$LINENO" 5
19612       fi
19613     fi
19614   else
19615     COMPILER_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
19616     # Check that this is likely to be GCC.
19617     $COMPILER --version 2>&1 | $GREP "Free Software Foundation" > /dev/null
19618     if test $? -ne 0; then
19619       { $as_echo "$as_me:${as_lineno-$LINENO}: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&5
19620 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&6;}
19621       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&5
19622 $as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&6;}
19623       as_fn_error $? "GCC compiler is required. Try setting --with-tools-dir." "$LINENO" 5
19624     fi
19625 
19626     # First line typically looks something like:
19627     # gcc (Ubuntu/Linaro 4.5.2-8ubuntu4) 4.5.2
19628     COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* \([1-9][0-9.]*\)/\1/p"`
19629     COMPILER_VENDOR=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^\(.*\) [1-9][0-9.]*/\1/p"`
19630   fi
19631   # This sets CC_VERSION or CXX_VERSION. (This comment is a grep marker)
19632   CC_VERSION="$COMPILER_VERSION"
19633   # This sets CC_VENDOR or CXX_VENDOR. (This comment is a grep marker)
19634   CC_VENDOR="$COMPILER_VENDOR"
19635 
19636   { $as_echo "$as_me:${as_lineno-$LINENO}: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&5
19637 $as_echo "$as_me: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&6;}
19638 
19639 
19640 # Now that we have resolved CC ourself, let autoconf have its go at it
19641 ac_ext=c
19642 ac_cpp='$CPP $CPPFLAGS'
19643 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
19644 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
19645 ac_compiler_gnu=$ac_cv_c_compiler_gnu
19646 if test -n "$ac_tool_prefix"; then
19647   for ac_prog in $CC
19648   do
19649     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
19650 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
19651 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19652 $as_echo_n "checking for $ac_word... " >&6; }
19653 if test "${ac_cv_prog_CC+set}" = set; then :
19654   $as_echo_n "(cached) " >&6
19655 else
19656   if test -n "$CC"; then
19657   ac_cv_prog_CC="$CC" # Let the user override the test.
19658 else
19659 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19660 for as_dir in $PATH
19661 do
19662   IFS=$as_save_IFS
19663   test -z "$as_dir" && as_dir=.
19664     for ac_exec_ext in '' $ac_executable_extensions; do
19665   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
19666     ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
19667     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19668     break 2
19669   fi
19670 done
19671   done
19672 IFS=$as_save_IFS
19673 
19674 fi
19675 fi
19676 CC=$ac_cv_prog_CC
19677 if test -n "$CC"; then
19678   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
19679 $as_echo "$CC" >&6; }
19680 else
19681   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19682 $as_echo "no" >&6; }
19683 fi
19684 
19685 
19686     test -n "$CC" && break
19687   done
19688 fi
19689 if test -z "$CC"; then
19690   ac_ct_CC=$CC
19691   for ac_prog in $CC
19692 do
19693   # Extract the first word of "$ac_prog", so it can be a program name with args.
19694 set dummy $ac_prog; ac_word=$2
19695 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19696 $as_echo_n "checking for $ac_word... " >&6; }
19697 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
19698   $as_echo_n "(cached) " >&6
19699 else
19700   if test -n "$ac_ct_CC"; then
19701   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
19702 else
19703 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19704 for as_dir in $PATH
19705 do
19706   IFS=$as_save_IFS
19707   test -z "$as_dir" && as_dir=.
19708     for ac_exec_ext in '' $ac_executable_extensions; do
19709   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
19710     ac_cv_prog_ac_ct_CC="$ac_prog"
19711     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19712     break 2
19713   fi
19714 done
19715   done
19716 IFS=$as_save_IFS
19717 
19718 fi
19719 fi
19720 ac_ct_CC=$ac_cv_prog_ac_ct_CC
19721 if test -n "$ac_ct_CC"; then
19722   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
19723 $as_echo "$ac_ct_CC" >&6; }
19724 else
19725   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19726 $as_echo "no" >&6; }
19727 fi
19728 
19729 
19730   test -n "$ac_ct_CC" && break
19731 done
19732 
19733   if test "x$ac_ct_CC" = x; then
19734     CC=""
19735   else
19736     case $cross_compiling:$ac_tool_warned in
19737 yes:)
19738 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
19739 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
19740 ac_tool_warned=yes ;;
19741 esac
19742     CC=$ac_ct_CC
19743   fi
19744 fi
19745 
19746 
19747 test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
19748 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
19749 as_fn_error $? "no acceptable C compiler found in \$PATH
19750 See \`config.log' for more details" "$LINENO" 5 ; }
19751 
19752 # Provide some information about the compiler.
19753 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
19754 set X $ac_compile
19755 ac_compiler=$2
19756 for ac_option in --version -v -V -qversion; do
19757   { { ac_try="$ac_compiler $ac_option >&5"
19758 case "(($ac_try" in
19759   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19760   *) ac_try_echo=$ac_try;;
19761 esac
19762 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
19763 $as_echo "$ac_try_echo"; } >&5
19764   (eval "$ac_compiler $ac_option >&5") 2>conftest.err
19765   ac_status=$?
19766   if test -s conftest.err; then
19767     sed '10a\
19768 ... rest of stderr output deleted ...
19769          10q' conftest.err >conftest.er1
19770     cat conftest.er1 >&5
19771   fi
19772   rm -f conftest.er1 conftest.err
19773   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
19774   test $ac_status = 0; }
19775 done
19776 
19777 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19778 /* end confdefs.h.  */
19779 
19780 int
19781 main ()
19782 {
19783 
19784   ;
19785   return 0;
19786 }
19787 _ACEOF
19788 ac_clean_files_save=$ac_clean_files
19789 ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
19790 # Try to create an executable without -o first, disregard a.out.
19791 # It will help us diagnose broken compilers, and finding out an intuition
19792 # of exeext.
19793 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
19794 $as_echo_n "checking whether the C compiler works... " >&6; }
19795 ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
19796 
19797 # The possible output files:
19798 ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
19799 
19800 ac_rmfiles=
19801 for ac_file in $ac_files
19802 do
19803   case $ac_file in
19804     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
19805     * ) ac_rmfiles="$ac_rmfiles $ac_file";;
19806   esac
19807 done
19808 rm -f $ac_rmfiles
19809 
19810 if { { ac_try="$ac_link_default"
19811 case "(($ac_try" in
19812   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19813   *) ac_try_echo=$ac_try;;
19814 esac
19815 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
19816 $as_echo "$ac_try_echo"; } >&5
19817   (eval "$ac_link_default") 2>&5
19818   ac_status=$?
19819   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
19820   test $ac_status = 0; }; then :
19821   # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
19822 # So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
19823 # in a Makefile.  We should not override ac_cv_exeext if it was cached,
19824 # so that the user can short-circuit this test for compilers unknown to
19825 # Autoconf.
19826 for ac_file in $ac_files ''
19827 do
19828   test -f "$ac_file" || continue
19829   case $ac_file in
19830     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
19831         ;;
19832     [ab].out )
19833         # We found the default executable, but exeext='' is most
19834         # certainly right.
19835         break;;
19836     *.* )
19837         if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
19838         then :; else
19839            ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
19840         fi
19841         # We set ac_cv_exeext here because the later test for it is not
19842         # safe: cross compilers may not add the suffix if given an `-o'
19843         # argument, so we may need to know it at that point already.
19844         # Even if this section looks crufty: it has the advantage of
19845         # actually working.
19846         break;;
19847     * )
19848         break;;
19849   esac
19850 done
19851 test "$ac_cv_exeext" = no && ac_cv_exeext=
19852 
19853 else
19854   ac_file=''
19855 fi
19856 if test -z "$ac_file"; then :
19857   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19858 $as_echo "no" >&6; }
19859 $as_echo "$as_me: failed program was:" >&5
19860 sed 's/^/| /' conftest.$ac_ext >&5
19861 
19862 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
19863 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
19864 as_fn_error 77 "C compiler cannot create executables
19865 See \`config.log' for more details" "$LINENO" 5 ; }
19866 else
19867   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
19868 $as_echo "yes" >&6; }
19869 fi
19870 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
19871 $as_echo_n "checking for C compiler default output file name... " >&6; }
19872 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
19873 $as_echo "$ac_file" >&6; }
19874 ac_exeext=$ac_cv_exeext
19875 
19876 rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
19877 ac_clean_files=$ac_clean_files_save
19878 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
19879 $as_echo_n "checking for suffix of executables... " >&6; }
19880 if { { ac_try="$ac_link"
19881 case "(($ac_try" in
19882   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19883   *) ac_try_echo=$ac_try;;
19884 esac
19885 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
19886 $as_echo "$ac_try_echo"; } >&5
19887   (eval "$ac_link") 2>&5
19888   ac_status=$?
19889   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
19890   test $ac_status = 0; }; then :
19891   # If both `conftest.exe' and `conftest' are `present' (well, observable)
19892 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
19893 # work properly (i.e., refer to `conftest.exe'), while it won't with
19894 # `rm'.
19895 for ac_file in conftest.exe conftest conftest.*; do
19896   test -f "$ac_file" || continue
19897   case $ac_file in
19898     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
19899     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
19900           break;;
19901     * ) break;;
19902   esac
19903 done
19904 else
19905   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
19906 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
19907 as_fn_error $? "cannot compute suffix of executables: cannot compile and link
19908 See \`config.log' for more details" "$LINENO" 5 ; }
19909 fi
19910 rm -f conftest conftest$ac_cv_exeext
19911 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
19912 $as_echo "$ac_cv_exeext" >&6; }
19913 
19914 rm -f conftest.$ac_ext
19915 EXEEXT=$ac_cv_exeext
19916 ac_exeext=$EXEEXT
19917 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19918 /* end confdefs.h.  */
19919 #include <stdio.h>
19920 int
19921 main ()
19922 {
19923 FILE *f = fopen ("conftest.out", "w");
19924  return ferror (f) || fclose (f) != 0;
19925 
19926   ;
19927   return 0;
19928 }
19929 _ACEOF
19930 ac_clean_files="$ac_clean_files conftest.out"
19931 # Check that the compiler produces executables we can run.  If not, either
19932 # the compiler is broken, or we cross compile.
19933 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
19934 $as_echo_n "checking whether we are cross compiling... " >&6; }
19935 if test "$cross_compiling" != yes; then
19936   { { ac_try="$ac_link"
19937 case "(($ac_try" in
19938   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19939   *) ac_try_echo=$ac_try;;
19940 esac
19941 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
19942 $as_echo "$ac_try_echo"; } >&5
19943   (eval "$ac_link") 2>&5
19944   ac_status=$?
19945   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
19946   test $ac_status = 0; }
19947   if { ac_try='./conftest$ac_cv_exeext'
19948   { { case "(($ac_try" in
19949   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19950   *) ac_try_echo=$ac_try;;
19951 esac
19952 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
19953 $as_echo "$ac_try_echo"; } >&5
19954   (eval "$ac_try") 2>&5
19955   ac_status=$?
19956   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
19957   test $ac_status = 0; }; }; then
19958     cross_compiling=no
19959   else
19960     if test "$cross_compiling" = maybe; then
19961         cross_compiling=yes
19962     else
19963         { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
19964 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
19965 as_fn_error $? "cannot run C compiled programs.
19966 If you meant to cross compile, use \`--host'.
19967 See \`config.log' for more details" "$LINENO" 5 ; }
19968     fi
19969   fi
19970 fi
19971 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
19972 $as_echo "$cross_compiling" >&6; }
19973 
19974 rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
19975 ac_clean_files=$ac_clean_files_save
19976 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
19977 $as_echo_n "checking for suffix of object files... " >&6; }
19978 if test "${ac_cv_objext+set}" = set; then :
19979   $as_echo_n "(cached) " >&6
19980 else
19981   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19982 /* end confdefs.h.  */
19983 
19984 int
19985 main ()
19986 {
19987 
19988   ;
19989   return 0;
19990 }
19991 _ACEOF
19992 rm -f conftest.o conftest.obj
19993 if { { ac_try="$ac_compile"
19994 case "(($ac_try" in
19995   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19996   *) ac_try_echo=$ac_try;;
19997 esac
19998 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
19999 $as_echo "$ac_try_echo"; } >&5
20000   (eval "$ac_compile") 2>&5
20001   ac_status=$?
20002   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
20003   test $ac_status = 0; }; then :
20004   for ac_file in conftest.o conftest.obj conftest.*; do
20005   test -f "$ac_file" || continue;
20006   case $ac_file in
20007     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
20008     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
20009        break;;
20010   esac
20011 done
20012 else
20013   $as_echo "$as_me: failed program was:" >&5
20014 sed 's/^/| /' conftest.$ac_ext >&5
20015 
20016 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
20017 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
20018 as_fn_error $? "cannot compute suffix of object files: cannot compile
20019 See \`config.log' for more details" "$LINENO" 5 ; }
20020 fi
20021 rm -f conftest.$ac_cv_objext conftest.$ac_ext
20022 fi
20023 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
20024 $as_echo "$ac_cv_objext" >&6; }
20025 OBJEXT=$ac_cv_objext
20026 ac_objext=$OBJEXT
20027 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
20028 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
20029 if test "${ac_cv_c_compiler_gnu+set}" = set; then :
20030   $as_echo_n "(cached) " >&6
20031 else
20032   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20033 /* end confdefs.h.  */
20034 
20035 int
20036 main ()
20037 {
20038 #ifndef __GNUC__
20039        choke me
20040 #endif
20041 
20042   ;
20043   return 0;
20044 }
20045 _ACEOF
20046 if ac_fn_c_try_compile "$LINENO"; then :
20047   ac_compiler_gnu=yes
20048 else
20049   ac_compiler_gnu=no
20050 fi
20051 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20052 ac_cv_c_compiler_gnu=$ac_compiler_gnu
20053 
20054 fi
20055 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
20056 $as_echo "$ac_cv_c_compiler_gnu" >&6; }
20057 if test $ac_compiler_gnu = yes; then
20058   GCC=yes
20059 else
20060   GCC=
20061 fi
20062 ac_test_CFLAGS=${CFLAGS+set}
20063 ac_save_CFLAGS=$CFLAGS
20064 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
20065 $as_echo_n "checking whether $CC accepts -g... " >&6; }
20066 if test "${ac_cv_prog_cc_g+set}" = set; then :
20067   $as_echo_n "(cached) " >&6
20068 else
20069   ac_save_c_werror_flag=$ac_c_werror_flag
20070    ac_c_werror_flag=yes
20071    ac_cv_prog_cc_g=no
20072    CFLAGS="-g"
20073    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20074 /* end confdefs.h.  */
20075 
20076 int
20077 main ()
20078 {
20079 
20080   ;
20081   return 0;
20082 }
20083 _ACEOF
20084 if ac_fn_c_try_compile "$LINENO"; then :
20085   ac_cv_prog_cc_g=yes
20086 else
20087   CFLAGS=""
20088       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20089 /* end confdefs.h.  */
20090 
20091 int
20092 main ()
20093 {
20094 
20095   ;
20096   return 0;
20097 }
20098 _ACEOF
20099 if ac_fn_c_try_compile "$LINENO"; then :
20100 
20101 else
20102   ac_c_werror_flag=$ac_save_c_werror_flag
20103          CFLAGS="-g"
20104          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20105 /* end confdefs.h.  */
20106 
20107 int
20108 main ()
20109 {
20110 
20111   ;
20112   return 0;
20113 }
20114 _ACEOF
20115 if ac_fn_c_try_compile "$LINENO"; then :
20116   ac_cv_prog_cc_g=yes
20117 fi
20118 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20119 fi
20120 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20121 fi
20122 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20123    ac_c_werror_flag=$ac_save_c_werror_flag
20124 fi
20125 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
20126 $as_echo "$ac_cv_prog_cc_g" >&6; }
20127 if test "$ac_test_CFLAGS" = set; then
20128   CFLAGS=$ac_save_CFLAGS
20129 elif test $ac_cv_prog_cc_g = yes; then
20130   if test "$GCC" = yes; then
20131     CFLAGS="-g -O2"
20132   else
20133     CFLAGS="-g"
20134   fi
20135 else
20136   if test "$GCC" = yes; then
20137     CFLAGS="-O2"
20138   else
20139     CFLAGS=
20140   fi
20141 fi
20142 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
20143 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
20144 if test "${ac_cv_prog_cc_c89+set}" = set; then :
20145   $as_echo_n "(cached) " >&6
20146 else
20147   ac_cv_prog_cc_c89=no
20148 ac_save_CC=$CC
20149 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20150 /* end confdefs.h.  */
20151 #include <stdarg.h>
20152 #include <stdio.h>
20153 #include <sys/types.h>
20154 #include <sys/stat.h>
20155 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
20156 struct buf { int x; };
20157 FILE * (*rcsopen) (struct buf *, struct stat *, int);
20158 static char *e (p, i)
20159      char **p;
20160      int i;
20161 {
20162   return p[i];
20163 }
20164 static char *f (char * (*g) (char **, int), char **p, ...)
20165 {
20166   char *s;
20167   va_list v;
20168   va_start (v,p);
20169   s = g (p, va_arg (v,int));
20170   va_end (v);
20171   return s;
20172 }
20173 
20174 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
20175    function prototypes and stuff, but not '\xHH' hex character constants.
20176    These don't provoke an error unfortunately, instead are silently treated
20177    as 'x'.  The following induces an error, until -std is added to get
20178    proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
20179    array size at least.  It's necessary to write '\x00'==0 to get something
20180    that's true only with -std.  */
20181 int osf4_cc_array ['\x00' == 0 ? 1 : -1];
20182 
20183 /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
20184    inside strings and character constants.  */
20185 #define FOO(x) 'x'
20186 int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
20187 
20188 int test (int i, double x);
20189 struct s1 {int (*f) (int a);};
20190 struct s2 {int (*f) (double a);};
20191 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
20192 int argc;
20193 char **argv;
20194 int
20195 main ()
20196 {
20197 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
20198   ;
20199   return 0;
20200 }
20201 _ACEOF
20202 for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
20203         -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
20204 do
20205   CC="$ac_save_CC $ac_arg"
20206   if ac_fn_c_try_compile "$LINENO"; then :
20207   ac_cv_prog_cc_c89=$ac_arg
20208 fi
20209 rm -f core conftest.err conftest.$ac_objext
20210   test "x$ac_cv_prog_cc_c89" != "xno" && break
20211 done
20212 rm -f conftest.$ac_ext
20213 CC=$ac_save_CC
20214 
20215 fi
20216 # AC_CACHE_VAL
20217 case "x$ac_cv_prog_cc_c89" in
20218   x)
20219     { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
20220 $as_echo "none needed" >&6; } ;;
20221   xno)
20222     { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
20223 $as_echo "unsupported" >&6; } ;;
20224   *)
20225     CC="$CC $ac_cv_prog_cc_c89"
20226     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
20227 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
20228 esac
20229 if test "x$ac_cv_prog_cc_c89" != xno; then :
20230 
20231 fi
20232 
20233 ac_ext=cpp
20234 ac_cpp='$CXXCPP $CPPFLAGS'
20235 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
20236 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
20237 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
20238 
20239 
20240 ### Locate C++ compiler (CXX)
20241 
20242 if test "x$CXX" != x; then
20243   COMPILER_CHECK_LIST="$CXX"
20244 elif test "x$OPENJDK_TARGET_OS" = "xwindows"; then
20245   COMPILER_CHECK_LIST="cl"
20246 elif test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
20247   COMPILER_CHECK_LIST="CC g++"
20248 else
20249   COMPILER_CHECK_LIST="g++ CC"
20250 fi
20251 
20252 
20253   COMPILER_NAME=C++
20254 
20255   CXX=
20256   # If TOOLS_DIR is set, check for all compiler names in there first
20257   # before checking the rest of the PATH.
20258   if test -n "$TOOLS_DIR"; then
20259     PATH_save="$PATH"
20260     PATH="$TOOLS_DIR"
20261     for ac_prog in $COMPILER_CHECK_LIST
20262 do
20263   # Extract the first word of "$ac_prog", so it can be a program name with args.
20264 set dummy $ac_prog; ac_word=$2
20265 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20266 $as_echo_n "checking for $ac_word... " >&6; }
20267 if test "${ac_cv_path_TOOLS_DIR_CXX+set}" = set; then :
20268   $as_echo_n "(cached) " >&6
20269 else
20270   case $TOOLS_DIR_CXX in
20271   [\\/]* | ?:[\\/]*)
20272   ac_cv_path_TOOLS_DIR_CXX="$TOOLS_DIR_CXX" # Let the user override the test with a path.
20273   ;;
20274   *)
20275   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20276 for as_dir in $PATH
20277 do
20278   IFS=$as_save_IFS
20279   test -z "$as_dir" && as_dir=.
20280     for ac_exec_ext in '' $ac_executable_extensions; do
20281   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
20282     ac_cv_path_TOOLS_DIR_CXX="$as_dir/$ac_word$ac_exec_ext"
20283     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20284     break 2
20285   fi
20286 done
20287   done
20288 IFS=$as_save_IFS
20289 
20290   ;;
20291 esac
20292 fi
20293 TOOLS_DIR_CXX=$ac_cv_path_TOOLS_DIR_CXX
20294 if test -n "$TOOLS_DIR_CXX"; then
20295   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLS_DIR_CXX" >&5
20296 $as_echo "$TOOLS_DIR_CXX" >&6; }
20297 else
20298   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20299 $as_echo "no" >&6; }
20300 fi
20301 
20302 
20303   test -n "$TOOLS_DIR_CXX" && break
20304 done
20305 
20306     CXX=$TOOLS_DIR_CXX
20307     PATH="$PATH_save"
20308   fi
20309 
20310   # AC_PATH_PROGS can't be run multiple times with the same variable,
20311   # so create a new name for this run.
20312   if test "x$CXX" = x; then
20313     for ac_prog in $COMPILER_CHECK_LIST
20314 do
20315   # Extract the first word of "$ac_prog", so it can be a program name with args.
20316 set dummy $ac_prog; ac_word=$2
20317 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20318 $as_echo_n "checking for $ac_word... " >&6; }
20319 if test "${ac_cv_path_POTENTIAL_CXX+set}" = set; then :
20320   $as_echo_n "(cached) " >&6
20321 else
20322   case $POTENTIAL_CXX in
20323   [\\/]* | ?:[\\/]*)
20324   ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
20325   ;;
20326   *)
20327   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20328 for as_dir in $PATH
20329 do
20330   IFS=$as_save_IFS
20331   test -z "$as_dir" && as_dir=.
20332     for ac_exec_ext in '' $ac_executable_extensions; do
20333   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
20334     ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
20335     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20336     break 2
20337   fi
20338 done
20339   done
20340 IFS=$as_save_IFS
20341 
20342   ;;
20343 esac
20344 fi
20345 POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
20346 if test -n "$POTENTIAL_CXX"; then
20347   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
20348 $as_echo "$POTENTIAL_CXX" >&6; }
20349 else
20350   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20351 $as_echo "no" >&6; }
20352 fi
20353 
20354 
20355   test -n "$POTENTIAL_CXX" && break
20356 done
20357 
20358     CXX=$POTENTIAL_CXX
20359   fi
20360 
20361   if test "x$CXX" = x; then
20362 
20363     # Print a helpful message on how to acquire the necessary build dependency.
20364     # devkit is the help tag: freetyp2, cups, pulse, alsa etc
20365     MISSING_DEPENDENCY=devkit
20366     PKGHANDLER_COMMAND=
20367 
20368     case $PKGHANDLER in
20369         apt-get)
20370                 apt_help     $MISSING_DEPENDENCY ;;
20371     yum)
20372                 yum_help     $MISSING_DEPENDENCY ;;
20373         port)
20374                 port_help    $MISSING_DEPENDENCY ;;
20375         pkgutil)
20376                 pkgutil_help $MISSING_DEPENDENCY ;;
20377         pkgadd)
20378                 pkgadd_help  $MISSING_DEPENDENCY ;;
20379     * )
20380       break ;;
20381     esac
20382 
20383     if test "x$PKGHANDLER_COMMAND" != x; then
20384         HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
20385     fi
20386 
20387       as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
20388   fi
20389 
20390   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20391 
20392   # First separate the path from the arguments. This will split at the first
20393   # space.
20394   complete="$CXX"
20395   path="${complete%% *}"
20396   tmp="$complete EOL"
20397   arguments="${tmp#* }"
20398 
20399   # Input might be given as Windows format, start by converting to
20400   # unix format.
20401   new_path=`$CYGPATH -u "$path"`
20402 
20403   # Now try to locate executable using which
20404   new_path=`$WHICH "$new_path" 2> /dev/null`
20405   # bat and cmd files are not always considered executable in cygwin causing which
20406   # to not find them
20407   if test "x$new_path" = x \
20408            && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20409            && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20410     new_path=`$CYGPATH -u "$path"`
20411   fi
20412   if test "x$new_path" = x; then
20413     # Oops. Which didn't find the executable.
20414     # The splitting of arguments from the executable at a space might have been incorrect,
20415     # since paths with space are more likely in Windows. Give it another try with the whole
20416     # argument.
20417     path="$complete"
20418     arguments="EOL"
20419     new_path=`$CYGPATH -u "$path"`
20420     new_path=`$WHICH "$new_path" 2> /dev/null`
20421     # bat and cmd files are not always considered executable in cygwin causing which
20422     # to not find them
20423     if test "x$new_path" = x \
20424              && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20425              && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20426       new_path=`$CYGPATH -u "$path"`
20427     fi
20428     if test "x$new_path" = x; then
20429       # It's still not found. Now this is an unrecoverable error.
20430       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
20431 $as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
20432       has_space=`$ECHO "$complete" | $GREP " "`
20433       if test "x$has_space" != x; then
20434         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20435 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20436       fi
20437       as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
20438     fi
20439   fi
20440 
20441   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20442   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20443   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20444   # "foo.exe" is OK but "foo" is an error.
20445   #
20446   # This test is therefore slightly more accurate than "test -f" to check for file precense.
20447   # It is also a way to make sure we got the proper file name for the real test later on.
20448   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20449   if test "x$test_shortpath" = x; then
20450     # Short path failed, file does not exist as specified.
20451     # Try adding .exe or .cmd
20452     if test -f "${new_path}.exe"; then
20453        input_to_shortpath="${new_path}.exe"
20454     elif test -f "${new_path}.cmd"; then
20455        input_to_shortpath="${new_path}.cmd"
20456     else
20457       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$new_path\", is invalid." >&5
20458 $as_echo "$as_me: The path of CXX, which resolves as \"$new_path\", is invalid." >&6;}
20459       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
20460 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
20461       as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
20462     fi
20463   else
20464     input_to_shortpath="$new_path"
20465   fi
20466 
20467   # Call helper function which possibly converts this using DOS-style short mode.
20468   # If so, the updated path is stored in $new_path.
20469   new_path="$input_to_shortpath"
20470 
20471   input_path="$input_to_shortpath"
20472   # Check if we need to convert this using DOS-style short mode. If the path
20473   # contains just simple characters, use it. Otherwise (spaces, weird characters),
20474   # take no chances and rewrite it.
20475   # Note: m4 eats our [], so we need to use [ and ] instead.
20476   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20477   if test "x$has_forbidden_chars" != x; then
20478     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20479     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20480     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20481     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20482       # Going to short mode and back again did indeed matter. Since short mode is
20483       # case insensitive, let's make it lowercase to improve readability.
20484       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20485       # Now convert it back to Unix-stile (cygpath)
20486       input_path=`$CYGPATH -u "$shortmode_path"`
20487       new_path="$input_path"
20488     fi
20489   fi
20490 
20491   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20492   if test "x$test_cygdrive_prefix" = x; then
20493     # As a simple fix, exclude /usr/bin since it's not a real path.
20494     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
20495       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20496       # a path prefixed by /cygdrive for fixpath to work.
20497       new_path="$CYGWIN_ROOT_PATH$input_path"
20498     fi
20499   fi
20500 
20501   # remove trailing .exe if any
20502   new_path="${new_path/%.exe/}"
20503 
20504   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20505 
20506   # First separate the path from the arguments. This will split at the first
20507   # space.
20508   complete="$CXX"
20509   path="${complete%% *}"
20510   tmp="$complete EOL"
20511   arguments="${tmp#* }"
20512 
20513   # Input might be given as Windows format, start by converting to
20514   # unix format.
20515   new_path="$path"
20516 
20517   windows_path="$new_path"
20518   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20519     unix_path=`$CYGPATH -u "$windows_path"`
20520     new_path="$unix_path"
20521   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20522     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20523     new_path="$unix_path"
20524   fi
20525 
20526 
20527   # Now try to locate executable using which
20528   new_path=`$WHICH "$new_path" 2> /dev/null`
20529 
20530   if test "x$new_path" = x; then
20531     # Oops. Which didn't find the executable.
20532     # The splitting of arguments from the executable at a space might have been incorrect,
20533     # since paths with space are more likely in Windows. Give it another try with the whole
20534     # argument.
20535     path="$complete"
20536     arguments="EOL"
20537     new_path="$path"
20538 
20539   windows_path="$new_path"
20540   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20541     unix_path=`$CYGPATH -u "$windows_path"`
20542     new_path="$unix_path"
20543   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20544     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20545     new_path="$unix_path"
20546   fi
20547 
20548 
20549     new_path=`$WHICH "$new_path" 2> /dev/null`
20550 
20551     if test "x$new_path" = x; then
20552       # It's still not found. Now this is an unrecoverable error.
20553       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
20554 $as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
20555       has_space=`$ECHO "$complete" | $GREP " "`
20556       if test "x$has_space" != x; then
20557         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20558 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20559       fi
20560       as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
20561     fi
20562   fi
20563 
20564   # Now new_path has a complete unix path to the binary
20565   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
20566     # Keep paths in /bin as-is, but remove trailing .exe if any
20567     new_path="${new_path/%.exe/}"
20568     # Do not save /bin paths to all_fixpath_prefixes!
20569   else
20570     # Not in mixed or Windows style, start by that.
20571     new_path=`cmd //c echo $new_path`
20572 
20573   input_path="$new_path"
20574   # Check if we need to convert this using DOS-style short mode. If the path
20575   # contains just simple characters, use it. Otherwise (spaces, weird characters),
20576   # take no chances and rewrite it.
20577   # Note: m4 eats our [], so we need to use [ and ] instead.
20578   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20579   if test "x$has_forbidden_chars" != x; then
20580     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20581     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20582   fi
20583 
20584     # Output is in $new_path
20585 
20586   windows_path="$new_path"
20587   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20588     unix_path=`$CYGPATH -u "$windows_path"`
20589     new_path="$unix_path"
20590   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20591     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20592     new_path="$unix_path"
20593   fi
20594 
20595     # remove trailing .exe if any
20596     new_path="${new_path/%.exe/}"
20597 
20598     # Save the first 10 bytes of this path to the storage, so fixpath can work.
20599     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20600   fi
20601 
20602   else
20603     # We're on a posix platform. Hooray! :)
20604     # First separate the path from the arguments. This will split at the first
20605     # space.
20606     complete="$CXX"
20607     path="${complete%% *}"
20608     tmp="$complete EOL"
20609     arguments="${tmp#* }"
20610 
20611     # Cannot rely on the command "which" here since it doesn't always work.
20612     is_absolute_path=`$ECHO "$path" | $GREP ^/`
20613     if test -z "$is_absolute_path"; then
20614       # Path to executable is not absolute. Find it.
20615       IFS_save="$IFS"
20616       IFS=:
20617       for p in $PATH; do
20618         if test -f "$p/$path" && test -x "$p/$path"; then
20619           new_path="$p/$path"
20620           break
20621         fi
20622       done
20623       IFS="$IFS_save"
20624     else
20625       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CXX (as $path) failed, using $path directly." >&5
20626 $as_echo "$as_me: Resolving CXX (as $path) failed, using $path directly." >&6;}
20627       new_path="$path"
20628     fi
20629 
20630     if test "x$new_path" = x; then
20631         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
20632 $as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
20633         has_space=`$ECHO "$complete" | $GREP " "`
20634         if test "x$has_space" != x; then
20635           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
20636 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
20637         fi
20638         as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
20639       fi
20640   fi
20641 
20642       # Now join together the path and the arguments once again
20643       if test "x$arguments" != xEOL; then
20644         new_complete="$new_path ${arguments% *}"
20645       else
20646         new_complete="$new_path"
20647       fi
20648 
20649   if test "x$complete" != "x$new_complete"; then
20650       CXX="$new_complete"
20651       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXX to \"$new_complete\"" >&5
20652 $as_echo "$as_me: Rewriting CXX to \"$new_complete\"" >&6;}
20653     fi
20654 
20655   { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CXX" >&5
20656 $as_echo_n "checking resolved symbolic links for CXX... " >&6; }
20657   TEST_COMPILER="$CXX"
20658 
20659     if test "x$OPENJDK_BUILD_OS" != xwindows; then
20660         # Follow a chain of symbolic links. Use readlink
20661         # where it exists, else fall back to horribly
20662         # complicated shell code.
20663         if test "x$READLINK_TESTED" != yes; then
20664             # On MacOSX there is a readlink tool with a different
20665             # purpose than the GNU readlink tool. Check the found readlink.
20666             ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
20667             if test "x$ISGNU" = x; then
20668                  # A readlink that we do not know how to use.
20669                  # Are there other non-GNU readlinks out there?
20670                  READLINK_TESTED=yes
20671                  READLINK=
20672             fi
20673         fi
20674 
20675         if test "x$READLINK" != x; then
20676             TEST_COMPILER=`$READLINK -f $TEST_COMPILER`
20677         else
20678             # Save the current directory for restoring afterwards
20679             STARTDIR=$PWD
20680             COUNTER=0
20681             sym_link_dir=`$DIRNAME $TEST_COMPILER`
20682             sym_link_file=`$BASENAME $TEST_COMPILER`
20683             # Use the system pwd and not the shell builtin to resolve directory symlinks
20684             cd $sym_link_dir
20685             cd `$THEPWDCMD`
20686             sym_link_dir=`$THEPWDCMD`
20687             # Resolve file symlinks
20688             while test $COUNTER -lt 20; do
20689                 ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
20690                 if test "x$ISLINK" == x; then
20691                     # This is not a symbolic link! We are done!
20692                     break
20693                 fi
20694                 # Again resolve directory symlinks since the target of the just found
20695                 # link could be in a different directory
20696                 cd `$DIRNAME $ISLINK`
20697                 sym_link_dir=`$THEPWDCMD`
20698                 sym_link_file=`$BASENAME $ISLINK`
20699                 let COUNTER=COUNTER+1
20700             done
20701             cd $STARTDIR
20702             TEST_COMPILER=$sym_link_dir/$sym_link_file
20703         fi
20704     fi
20705 
20706   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_COMPILER" >&5
20707 $as_echo "$TEST_COMPILER" >&6; }
20708   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CXX is disguised ccache" >&5
20709 $as_echo_n "checking if CXX is disguised ccache... " >&6; }
20710 
20711   COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"`
20712   if test "x$COMPILER_BASENAME" = "xccache"; then
20713     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5
20714 $as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; }
20715     # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache.
20716     # We want to control ccache invocation ourselves, so ignore this cc and try
20717     # searching again.
20718 
20719     # Remove the path to the fake ccache cc from the PATH
20720     RETRY_COMPILER_SAVED_PATH="$PATH"
20721     COMPILER_DIRNAME=`$DIRNAME $CXX`
20722     PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`"
20723 
20724     # Try again looking for our compiler
20725     if test -n "$ac_tool_prefix"; then
20726   for ac_prog in $COMPILER_CHECK_LIST
20727   do
20728     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
20729 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
20730 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20731 $as_echo_n "checking for $ac_word... " >&6; }
20732 if test "${ac_cv_prog_PROPER_COMPILER_CXX+set}" = set; then :
20733   $as_echo_n "(cached) " >&6
20734 else
20735   if test -n "$PROPER_COMPILER_CXX"; then
20736   ac_cv_prog_PROPER_COMPILER_CXX="$PROPER_COMPILER_CXX" # Let the user override the test.
20737 else
20738 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20739 for as_dir in $PATH
20740 do
20741   IFS=$as_save_IFS
20742   test -z "$as_dir" && as_dir=.
20743     for ac_exec_ext in '' $ac_executable_extensions; do
20744   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
20745     ac_cv_prog_PROPER_COMPILER_CXX="$ac_tool_prefix$ac_prog"
20746     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20747     break 2
20748   fi
20749 done
20750   done
20751 IFS=$as_save_IFS
20752 
20753 fi
20754 fi
20755 PROPER_COMPILER_CXX=$ac_cv_prog_PROPER_COMPILER_CXX
20756 if test -n "$PROPER_COMPILER_CXX"; then
20757   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5
20758 $as_echo "$PROPER_COMPILER_CXX" >&6; }
20759 else
20760   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20761 $as_echo "no" >&6; }
20762 fi
20763 
20764 
20765     test -n "$PROPER_COMPILER_CXX" && break
20766   done
20767 fi
20768 if test -z "$PROPER_COMPILER_CXX"; then
20769   ac_ct_PROPER_COMPILER_CXX=$PROPER_COMPILER_CXX
20770   for ac_prog in $COMPILER_CHECK_LIST
20771 do
20772   # Extract the first word of "$ac_prog", so it can be a program name with args.
20773 set dummy $ac_prog; ac_word=$2
20774 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20775 $as_echo_n "checking for $ac_word... " >&6; }
20776 if test "${ac_cv_prog_ac_ct_PROPER_COMPILER_CXX+set}" = set; then :
20777   $as_echo_n "(cached) " >&6
20778 else
20779   if test -n "$ac_ct_PROPER_COMPILER_CXX"; then
20780   ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_ct_PROPER_COMPILER_CXX" # Let the user override the test.
20781 else
20782 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20783 for as_dir in $PATH
20784 do
20785   IFS=$as_save_IFS
20786   test -z "$as_dir" && as_dir=.
20787     for ac_exec_ext in '' $ac_executable_extensions; do
20788   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
20789     ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_prog"
20790     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20791     break 2
20792   fi
20793 done
20794   done
20795 IFS=$as_save_IFS
20796 
20797 fi
20798 fi
20799 ac_ct_PROPER_COMPILER_CXX=$ac_cv_prog_ac_ct_PROPER_COMPILER_CXX
20800 if test -n "$ac_ct_PROPER_COMPILER_CXX"; then
20801   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CXX" >&5
20802 $as_echo "$ac_ct_PROPER_COMPILER_CXX" >&6; }
20803 else
20804   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20805 $as_echo "no" >&6; }
20806 fi
20807 
20808 
20809   test -n "$ac_ct_PROPER_COMPILER_CXX" && break
20810 done
20811 
20812   if test "x$ac_ct_PROPER_COMPILER_CXX" = x; then
20813     PROPER_COMPILER_CXX=""
20814   else
20815     case $cross_compiling:$ac_tool_warned in
20816 yes:)
20817 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
20818 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
20819 ac_tool_warned=yes ;;
20820 esac
20821     PROPER_COMPILER_CXX=$ac_ct_PROPER_COMPILER_CXX
20822   fi
20823 fi
20824 
20825 
20826   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20827 
20828   # First separate the path from the arguments. This will split at the first
20829   # space.
20830   complete="$PROPER_COMPILER_CXX"
20831   path="${complete%% *}"
20832   tmp="$complete EOL"
20833   arguments="${tmp#* }"
20834 
20835   # Input might be given as Windows format, start by converting to
20836   # unix format.
20837   new_path=`$CYGPATH -u "$path"`
20838 
20839   # Now try to locate executable using which
20840   new_path=`$WHICH "$new_path" 2> /dev/null`
20841   # bat and cmd files are not always considered executable in cygwin causing which
20842   # to not find them
20843   if test "x$new_path" = x \
20844            && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20845            && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20846     new_path=`$CYGPATH -u "$path"`
20847   fi
20848   if test "x$new_path" = x; then
20849     # Oops. Which didn't find the executable.
20850     # The splitting of arguments from the executable at a space might have been incorrect,
20851     # since paths with space are more likely in Windows. Give it another try with the whole
20852     # argument.
20853     path="$complete"
20854     arguments="EOL"
20855     new_path=`$CYGPATH -u "$path"`
20856     new_path=`$WHICH "$new_path" 2> /dev/null`
20857     # bat and cmd files are not always considered executable in cygwin causing which
20858     # to not find them
20859     if test "x$new_path" = x \
20860              && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20861              && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20862       new_path=`$CYGPATH -u "$path"`
20863     fi
20864     if test "x$new_path" = x; then
20865       # It's still not found. Now this is an unrecoverable error.
20866       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
20867 $as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
20868       has_space=`$ECHO "$complete" | $GREP " "`
20869       if test "x$has_space" != x; then
20870         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20871 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20872       fi
20873       as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
20874     fi
20875   fi
20876 
20877   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20878   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20879   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20880   # "foo.exe" is OK but "foo" is an error.
20881   #
20882   # This test is therefore slightly more accurate than "test -f" to check for file precense.
20883   # It is also a way to make sure we got the proper file name for the real test later on.
20884   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20885   if test "x$test_shortpath" = x; then
20886     # Short path failed, file does not exist as specified.
20887     # Try adding .exe or .cmd
20888     if test -f "${new_path}.exe"; then
20889        input_to_shortpath="${new_path}.exe"
20890     elif test -f "${new_path}.cmd"; then
20891        input_to_shortpath="${new_path}.cmd"
20892     else
20893       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&5
20894 $as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&6;}
20895       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
20896 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
20897       as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
20898     fi
20899   else
20900     input_to_shortpath="$new_path"
20901   fi
20902 
20903   # Call helper function which possibly converts this using DOS-style short mode.
20904   # If so, the updated path is stored in $new_path.
20905   new_path="$input_to_shortpath"
20906 
20907   input_path="$input_to_shortpath"
20908   # Check if we need to convert this using DOS-style short mode. If the path
20909   # contains just simple characters, use it. Otherwise (spaces, weird characters),
20910   # take no chances and rewrite it.
20911   # Note: m4 eats our [], so we need to use [ and ] instead.
20912   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20913   if test "x$has_forbidden_chars" != x; then
20914     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20915     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20916     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20917     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20918       # Going to short mode and back again did indeed matter. Since short mode is
20919       # case insensitive, let's make it lowercase to improve readability.
20920       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20921       # Now convert it back to Unix-stile (cygpath)
20922       input_path=`$CYGPATH -u "$shortmode_path"`
20923       new_path="$input_path"
20924     fi
20925   fi
20926 
20927   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20928   if test "x$test_cygdrive_prefix" = x; then
20929     # As a simple fix, exclude /usr/bin since it's not a real path.
20930     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
20931       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20932       # a path prefixed by /cygdrive for fixpath to work.
20933       new_path="$CYGWIN_ROOT_PATH$input_path"
20934     fi
20935   fi
20936 
20937   # remove trailing .exe if any
20938   new_path="${new_path/%.exe/}"
20939 
20940   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20941 
20942   # First separate the path from the arguments. This will split at the first
20943   # space.
20944   complete="$PROPER_COMPILER_CXX"
20945   path="${complete%% *}"
20946   tmp="$complete EOL"
20947   arguments="${tmp#* }"
20948 
20949   # Input might be given as Windows format, start by converting to
20950   # unix format.
20951   new_path="$path"
20952 
20953   windows_path="$new_path"
20954   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20955     unix_path=`$CYGPATH -u "$windows_path"`
20956     new_path="$unix_path"
20957   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20958     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20959     new_path="$unix_path"
20960   fi
20961 
20962 
20963   # Now try to locate executable using which
20964   new_path=`$WHICH "$new_path" 2> /dev/null`
20965 
20966   if test "x$new_path" = x; then
20967     # Oops. Which didn't find the executable.
20968     # The splitting of arguments from the executable at a space might have been incorrect,
20969     # since paths with space are more likely in Windows. Give it another try with the whole
20970     # argument.
20971     path="$complete"
20972     arguments="EOL"
20973     new_path="$path"
20974 
20975   windows_path="$new_path"
20976   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20977     unix_path=`$CYGPATH -u "$windows_path"`
20978     new_path="$unix_path"
20979   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20980     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20981     new_path="$unix_path"
20982   fi
20983 
20984 
20985     new_path=`$WHICH "$new_path" 2> /dev/null`
20986 
20987     if test "x$new_path" = x; then
20988       # It's still not found. Now this is an unrecoverable error.
20989       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
20990 $as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
20991       has_space=`$ECHO "$complete" | $GREP " "`
20992       if test "x$has_space" != x; then
20993         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20994 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20995       fi
20996       as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
20997     fi
20998   fi
20999 
21000   # Now new_path has a complete unix path to the binary
21001   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
21002     # Keep paths in /bin as-is, but remove trailing .exe if any
21003     new_path="${new_path/%.exe/}"
21004     # Do not save /bin paths to all_fixpath_prefixes!
21005   else
21006     # Not in mixed or Windows style, start by that.
21007     new_path=`cmd //c echo $new_path`
21008 
21009   input_path="$new_path"
21010   # Check if we need to convert this using DOS-style short mode. If the path
21011   # contains just simple characters, use it. Otherwise (spaces, weird characters),
21012   # take no chances and rewrite it.
21013   # Note: m4 eats our [], so we need to use [ and ] instead.
21014   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21015   if test "x$has_forbidden_chars" != x; then
21016     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21017     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21018   fi
21019 
21020     # Output is in $new_path
21021 
21022   windows_path="$new_path"
21023   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21024     unix_path=`$CYGPATH -u "$windows_path"`
21025     new_path="$unix_path"
21026   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21027     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21028     new_path="$unix_path"
21029   fi
21030 
21031     # remove trailing .exe if any
21032     new_path="${new_path/%.exe/}"
21033 
21034     # Save the first 10 bytes of this path to the storage, so fixpath can work.
21035     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21036   fi
21037 
21038   else
21039     # We're on a posix platform. Hooray! :)
21040     # First separate the path from the arguments. This will split at the first
21041     # space.
21042     complete="$PROPER_COMPILER_CXX"
21043     path="${complete%% *}"
21044     tmp="$complete EOL"
21045     arguments="${tmp#* }"
21046 
21047     # Cannot rely on the command "which" here since it doesn't always work.
21048     is_absolute_path=`$ECHO "$path" | $GREP ^/`
21049     if test -z "$is_absolute_path"; then
21050       # Path to executable is not absolute. Find it.
21051       IFS_save="$IFS"
21052       IFS=:
21053       for p in $PATH; do
21054         if test -f "$p/$path" && test -x "$p/$path"; then
21055           new_path="$p/$path"
21056           break
21057         fi
21058       done
21059       IFS="$IFS_save"
21060     else
21061       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving PROPER_COMPILER_CXX (as $path) failed, using $path directly." >&5
21062 $as_echo "$as_me: Resolving PROPER_COMPILER_CXX (as $path) failed, using $path directly." >&6;}
21063       new_path="$path"
21064     fi
21065 
21066     if test "x$new_path" = x; then
21067         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
21068 $as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
21069         has_space=`$ECHO "$complete" | $GREP " "`
21070         if test "x$has_space" != x; then
21071           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
21072 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
21073         fi
21074         as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
21075       fi
21076   fi
21077 
21078       # Now join together the path and the arguments once again
21079       if test "x$arguments" != xEOL; then
21080         new_complete="$new_path ${arguments% *}"
21081       else
21082         new_complete="$new_path"
21083       fi
21084 
21085   if test "x$complete" != "x$new_complete"; then
21086       PROPER_COMPILER_CXX="$new_complete"
21087       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&5
21088 $as_echo "$as_me: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&6;}
21089     fi
21090 
21091     PATH="$RETRY_COMPILER_SAVED_PATH"
21092 
21093     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CXX" >&5
21094 $as_echo_n "checking for resolved symbolic links for CXX... " >&6; }
21095 
21096     if test "x$OPENJDK_BUILD_OS" != xwindows; then
21097         # Follow a chain of symbolic links. Use readlink
21098         # where it exists, else fall back to horribly
21099         # complicated shell code.
21100         if test "x$READLINK_TESTED" != yes; then
21101             # On MacOSX there is a readlink tool with a different
21102             # purpose than the GNU readlink tool. Check the found readlink.
21103             ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
21104             if test "x$ISGNU" = x; then
21105                  # A readlink that we do not know how to use.
21106                  # Are there other non-GNU readlinks out there?
21107                  READLINK_TESTED=yes
21108                  READLINK=
21109             fi
21110         fi
21111 
21112         if test "x$READLINK" != x; then
21113             PROPER_COMPILER_CXX=`$READLINK -f $PROPER_COMPILER_CXX`
21114         else
21115             # Save the current directory for restoring afterwards
21116             STARTDIR=$PWD
21117             COUNTER=0
21118             sym_link_dir=`$DIRNAME $PROPER_COMPILER_CXX`
21119             sym_link_file=`$BASENAME $PROPER_COMPILER_CXX`
21120             # Use the system pwd and not the shell builtin to resolve directory symlinks
21121             cd $sym_link_dir
21122             cd `$THEPWDCMD`
21123             sym_link_dir=`$THEPWDCMD`
21124             # Resolve file symlinks
21125             while test $COUNTER -lt 20; do
21126                 ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
21127                 if test "x$ISLINK" == x; then
21128                     # This is not a symbolic link! We are done!
21129                     break
21130                 fi
21131                 # Again resolve directory symlinks since the target of the just found
21132                 # link could be in a different directory
21133                 cd `$DIRNAME $ISLINK`
21134                 sym_link_dir=`$THEPWDCMD`
21135                 sym_link_file=`$BASENAME $ISLINK`
21136                 let COUNTER=COUNTER+1
21137             done
21138             cd $STARTDIR
21139             PROPER_COMPILER_CXX=$sym_link_dir/$sym_link_file
21140         fi
21141     fi
21142 
21143     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5
21144 $as_echo "$PROPER_COMPILER_CXX" >&6; }
21145     CXX="$PROPER_COMPILER_CXX"
21146   else
21147     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CXX" >&5
21148 $as_echo "no, keeping CXX" >&6; }
21149     CXX="$TEST_COMPILER"
21150   fi
21151 
21152   COMPILER=$CXX
21153   COMPILER_NAME=$COMPILER_NAME
21154 
21155   if test "x$OPENJDK_TARGET_OS" = xsolaris; then
21156     # Make sure we use the Sun Studio compiler and not gcc on Solaris, which won't work
21157     COMPILER_VERSION_TEST=`$COMPILER -V 2>&1 | $HEAD -n 1`
21158     $ECHO $COMPILER_VERSION_TEST | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
21159     if test $? -ne 0; then
21160       GCC_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
21161 
21162       { $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
21163 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required Sun Studio compiler." >&6;}
21164       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&5
21165 $as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&6;}
21166       as_fn_error $? "Sun Studio compiler is required. Try setting --with-tools-dir." "$LINENO" 5
21167     else
21168       COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/p"`
21169       COMPILER_VENDOR="Sun Studio"
21170     fi
21171   elif test  "x$OPENJDK_TARGET_OS" = xwindows; then
21172     # First line typically looks something like:
21173     # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.30319.01 for 80x86
21174     COMPILER_VERSION_TEST=`$COMPILER 2>&1 | $HEAD -n 1`
21175     COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*Version \([1-9][0-9.]*\) .*/\1/p"`
21176     COMPILER_VENDOR="Microsoft CL.EXE"
21177     COMPILER_CPU_TEST=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* for \(.*\)$/\1/p"`
21178     if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
21179       if test "x$COMPILER_CPU_TEST" != "x80x86"; then
21180         as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"80x86\"." "$LINENO" 5
21181       fi
21182     elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
21183       if test "x$COMPILER_CPU_TEST" != "xx64"; then
21184         as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." "$LINENO" 5
21185       fi
21186     fi
21187   else
21188     COMPILER_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
21189     # Check that this is likely to be GCC.
21190     $COMPILER --version 2>&1 | $GREP "Free Software Foundation" > /dev/null
21191     if test $? -ne 0; then
21192       { $as_echo "$as_me:${as_lineno-$LINENO}: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&5
21193 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&6;}
21194       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&5
21195 $as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&6;}
21196       as_fn_error $? "GCC compiler is required. Try setting --with-tools-dir." "$LINENO" 5
21197     fi
21198 
21199     # First line typically looks something like:
21200     # gcc (Ubuntu/Linaro 4.5.2-8ubuntu4) 4.5.2
21201     COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* \([1-9][0-9.]*\)/\1/p"`
21202     COMPILER_VENDOR=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^\(.*\) [1-9][0-9.]*/\1/p"`
21203   fi
21204   # This sets CC_VERSION or CXX_VERSION. (This comment is a grep marker)
21205   CXX_VERSION="$COMPILER_VERSION"
21206   # This sets CC_VENDOR or CXX_VENDOR. (This comment is a grep marker)
21207   CXX_VENDOR="$COMPILER_VENDOR"
21208 
21209   { $as_echo "$as_me:${as_lineno-$LINENO}: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&5
21210 $as_echo "$as_me: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&6;}
21211 
21212 
21213 # Now that we have resolved CXX ourself, let autoconf have its go at it
21214 ac_ext=cpp
21215 ac_cpp='$CXXCPP $CPPFLAGS'
21216 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
21217 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
21218 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
21219 if test -z "$CXX"; then
21220   if test -n "$CCC"; then
21221     CXX=$CCC
21222   else
21223     if test -n "$ac_tool_prefix"; then
21224   for ac_prog in $CXX
21225   do
21226     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
21227 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
21228 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21229 $as_echo_n "checking for $ac_word... " >&6; }
21230 if test "${ac_cv_prog_CXX+set}" = set; then :
21231   $as_echo_n "(cached) " >&6
21232 else
21233   if test -n "$CXX"; then
21234   ac_cv_prog_CXX="$CXX" # Let the user override the test.
21235 else
21236 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21237 for as_dir in $PATH
21238 do
21239   IFS=$as_save_IFS
21240   test -z "$as_dir" && as_dir=.
21241     for ac_exec_ext in '' $ac_executable_extensions; do
21242   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
21243     ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
21244     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21245     break 2
21246   fi
21247 done
21248   done
21249 IFS=$as_save_IFS
21250 
21251 fi
21252 fi
21253 CXX=$ac_cv_prog_CXX
21254 if test -n "$CXX"; then
21255   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
21256 $as_echo "$CXX" >&6; }
21257 else
21258   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21259 $as_echo "no" >&6; }
21260 fi
21261 
21262 
21263     test -n "$CXX" && break
21264   done
21265 fi
21266 if test -z "$CXX"; then
21267   ac_ct_CXX=$CXX
21268   for ac_prog in $CXX
21269 do
21270   # Extract the first word of "$ac_prog", so it can be a program name with args.
21271 set dummy $ac_prog; ac_word=$2
21272 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21273 $as_echo_n "checking for $ac_word... " >&6; }
21274 if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then :
21275   $as_echo_n "(cached) " >&6
21276 else
21277   if test -n "$ac_ct_CXX"; then
21278   ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
21279 else
21280 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21281 for as_dir in $PATH
21282 do
21283   IFS=$as_save_IFS
21284   test -z "$as_dir" && as_dir=.
21285     for ac_exec_ext in '' $ac_executable_extensions; do
21286   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
21287     ac_cv_prog_ac_ct_CXX="$ac_prog"
21288     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21289     break 2
21290   fi
21291 done
21292   done
21293 IFS=$as_save_IFS
21294 
21295 fi
21296 fi
21297 ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
21298 if test -n "$ac_ct_CXX"; then
21299   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
21300 $as_echo "$ac_ct_CXX" >&6; }
21301 else
21302   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21303 $as_echo "no" >&6; }
21304 fi
21305 
21306 
21307   test -n "$ac_ct_CXX" && break
21308 done
21309 
21310   if test "x$ac_ct_CXX" = x; then
21311     CXX="g++"
21312   else
21313     case $cross_compiling:$ac_tool_warned in
21314 yes:)
21315 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
21316 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
21317 ac_tool_warned=yes ;;
21318 esac
21319     CXX=$ac_ct_CXX
21320   fi
21321 fi
21322 
21323   fi
21324 fi
21325 # Provide some information about the compiler.
21326 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
21327 set X $ac_compile
21328 ac_compiler=$2
21329 for ac_option in --version -v -V -qversion; do
21330   { { ac_try="$ac_compiler $ac_option >&5"
21331 case "(($ac_try" in
21332   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21333   *) ac_try_echo=$ac_try;;
21334 esac
21335 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
21336 $as_echo "$ac_try_echo"; } >&5
21337   (eval "$ac_compiler $ac_option >&5") 2>conftest.err
21338   ac_status=$?
21339   if test -s conftest.err; then
21340     sed '10a\
21341 ... rest of stderr output deleted ...
21342          10q' conftest.err >conftest.er1
21343     cat conftest.er1 >&5
21344   fi
21345   rm -f conftest.er1 conftest.err
21346   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
21347   test $ac_status = 0; }
21348 done
21349 
21350 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
21351 $as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
21352 if test "${ac_cv_cxx_compiler_gnu+set}" = set; then :
21353   $as_echo_n "(cached) " >&6
21354 else
21355   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21356 /* end confdefs.h.  */
21357 
21358 int
21359 main ()
21360 {
21361 #ifndef __GNUC__
21362        choke me
21363 #endif
21364 
21365   ;
21366   return 0;
21367 }
21368 _ACEOF
21369 if ac_fn_cxx_try_compile "$LINENO"; then :
21370   ac_compiler_gnu=yes
21371 else
21372   ac_compiler_gnu=no
21373 fi
21374 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21375 ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
21376 
21377 fi
21378 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
21379 $as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
21380 if test $ac_compiler_gnu = yes; then
21381   GXX=yes
21382 else
21383   GXX=
21384 fi
21385 ac_test_CXXFLAGS=${CXXFLAGS+set}
21386 ac_save_CXXFLAGS=$CXXFLAGS
21387 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
21388 $as_echo_n "checking whether $CXX accepts -g... " >&6; }
21389 if test "${ac_cv_prog_cxx_g+set}" = set; then :
21390   $as_echo_n "(cached) " >&6
21391 else
21392   ac_save_cxx_werror_flag=$ac_cxx_werror_flag
21393    ac_cxx_werror_flag=yes
21394    ac_cv_prog_cxx_g=no
21395    CXXFLAGS="-g"
21396    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21397 /* end confdefs.h.  */
21398 
21399 int
21400 main ()
21401 {
21402 
21403   ;
21404   return 0;
21405 }
21406 _ACEOF
21407 if ac_fn_cxx_try_compile "$LINENO"; then :
21408   ac_cv_prog_cxx_g=yes
21409 else
21410   CXXFLAGS=""
21411       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21412 /* end confdefs.h.  */
21413 
21414 int
21415 main ()
21416 {
21417 
21418   ;
21419   return 0;
21420 }
21421 _ACEOF
21422 if ac_fn_cxx_try_compile "$LINENO"; then :
21423 
21424 else
21425   ac_cxx_werror_flag=$ac_save_cxx_werror_flag
21426          CXXFLAGS="-g"
21427          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21428 /* end confdefs.h.  */
21429 
21430 int
21431 main ()
21432 {
21433 
21434   ;
21435   return 0;
21436 }
21437 _ACEOF
21438 if ac_fn_cxx_try_compile "$LINENO"; then :
21439   ac_cv_prog_cxx_g=yes
21440 fi
21441 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21442 fi
21443 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21444 fi
21445 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21446    ac_cxx_werror_flag=$ac_save_cxx_werror_flag
21447 fi
21448 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
21449 $as_echo "$ac_cv_prog_cxx_g" >&6; }
21450 if test "$ac_test_CXXFLAGS" = set; then
21451   CXXFLAGS=$ac_save_CXXFLAGS
21452 elif test $ac_cv_prog_cxx_g = yes; then
21453   if test "$GXX" = yes; then
21454     CXXFLAGS="-g -O2"
21455   else
21456     CXXFLAGS="-g"
21457   fi
21458 else
21459   if test "$GXX" = yes; then
21460     CXXFLAGS="-O2"
21461   else
21462     CXXFLAGS=
21463   fi
21464 fi
21465 ac_ext=cpp
21466 ac_cpp='$CXXCPP $CPPFLAGS'
21467 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
21468 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
21469 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
21470 
21471 
21472 ### Locate other tools
21473 
21474 if test "x$OPENJDK_TARGET_OS" = xmacosx; then
21475     ac_ext=m
21476 ac_cpp='$OBJCPP $CPPFLAGS'
21477 ac_compile='$OBJC -c $OBJCFLAGS $CPPFLAGS conftest.$ac_ext >&5'
21478 ac_link='$OBJC -o conftest$ac_exeext $OBJCFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
21479 ac_compiler_gnu=$ac_cv_objc_compiler_gnu
21480 if test -n "$ac_tool_prefix"; then
21481   for ac_prog in gcc objcc objc cc CC
21482   do
21483     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
21484 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
21485 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21486 $as_echo_n "checking for $ac_word... " >&6; }
21487 if test "${ac_cv_prog_OBJC+set}" = set; then :
21488   $as_echo_n "(cached) " >&6
21489 else
21490   if test -n "$OBJC"; then
21491   ac_cv_prog_OBJC="$OBJC" # Let the user override the test.
21492 else
21493 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21494 for as_dir in $PATH
21495 do
21496   IFS=$as_save_IFS
21497   test -z "$as_dir" && as_dir=.
21498     for ac_exec_ext in '' $ac_executable_extensions; do
21499   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
21500     ac_cv_prog_OBJC="$ac_tool_prefix$ac_prog"
21501     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21502     break 2
21503   fi
21504 done
21505   done
21506 IFS=$as_save_IFS
21507 
21508 fi
21509 fi
21510 OBJC=$ac_cv_prog_OBJC
21511 if test -n "$OBJC"; then
21512   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJC" >&5
21513 $as_echo "$OBJC" >&6; }
21514 else
21515   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21516 $as_echo "no" >&6; }
21517 fi
21518 
21519 
21520     test -n "$OBJC" && break
21521   done
21522 fi
21523 if test -z "$OBJC"; then
21524   ac_ct_OBJC=$OBJC
21525   for ac_prog in gcc objcc objc cc CC
21526 do
21527   # Extract the first word of "$ac_prog", so it can be a program name with args.
21528 set dummy $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 test "${ac_cv_prog_ac_ct_OBJC+set}" = set; then :
21532   $as_echo_n "(cached) " >&6
21533 else
21534   if test -n "$ac_ct_OBJC"; then
21535   ac_cv_prog_ac_ct_OBJC="$ac_ct_OBJC" # 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_ac_ct_OBJC="$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 ac_ct_OBJC=$ac_cv_prog_ac_ct_OBJC
21555 if test -n "$ac_ct_OBJC"; then
21556   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJC" >&5
21557 $as_echo "$ac_ct_OBJC" >&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 "$ac_ct_OBJC" && break
21565 done
21566 
21567   if test "x$ac_ct_OBJC" = x; then
21568     OBJC="gcc"
21569   else
21570     case $cross_compiling:$ac_tool_warned in
21571 yes:)
21572 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
21573 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
21574 ac_tool_warned=yes ;;
21575 esac
21576     OBJC=$ac_ct_OBJC
21577   fi
21578 fi
21579 
21580 # Provide some information about the compiler.
21581 $as_echo "$as_me:${as_lineno-$LINENO}: checking for Objective C compiler version" >&5
21582 set X $ac_compile
21583 ac_compiler=$2
21584 for ac_option in --version -v -V -qversion; do
21585   { { ac_try="$ac_compiler $ac_option >&5"
21586 case "(($ac_try" in
21587   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21588   *) ac_try_echo=$ac_try;;
21589 esac
21590 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
21591 $as_echo "$ac_try_echo"; } >&5
21592   (eval "$ac_compiler $ac_option >&5") 2>conftest.err
21593   ac_status=$?
21594   if test -s conftest.err; then
21595     sed '10a\
21596 ... rest of stderr output deleted ...
21597          10q' conftest.err >conftest.er1
21598     cat conftest.er1 >&5
21599   fi
21600   rm -f conftest.er1 conftest.err
21601   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
21602   test $ac_status = 0; }
21603 done
21604 
21605 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU Objective C compiler" >&5
21606 $as_echo_n "checking whether we are using the GNU Objective C compiler... " >&6; }
21607 if test "${ac_cv_objc_compiler_gnu+set}" = set; then :
21608   $as_echo_n "(cached) " >&6
21609 else
21610   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21611 /* end confdefs.h.  */
21612 
21613 int
21614 main ()
21615 {
21616 #ifndef __GNUC__
21617        choke me
21618 #endif
21619 
21620   ;
21621   return 0;
21622 }
21623 _ACEOF
21624 if ac_fn_objc_try_compile "$LINENO"; then :
21625   ac_compiler_gnu=yes
21626 else
21627   ac_compiler_gnu=no
21628 fi
21629 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21630 ac_cv_objc_compiler_gnu=$ac_compiler_gnu
21631 
21632 fi
21633 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objc_compiler_gnu" >&5
21634 $as_echo "$ac_cv_objc_compiler_gnu" >&6; }
21635 if test $ac_compiler_gnu = yes; then
21636   GOBJC=yes
21637 else
21638   GOBJC=
21639 fi
21640 ac_test_OBJCFLAGS=${OBJCFLAGS+set}
21641 ac_save_OBJCFLAGS=$OBJCFLAGS
21642 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $OBJC accepts -g" >&5
21643 $as_echo_n "checking whether $OBJC accepts -g... " >&6; }
21644 if test "${ac_cv_prog_objc_g+set}" = set; then :
21645   $as_echo_n "(cached) " >&6
21646 else
21647   ac_save_objc_werror_flag=$ac_objc_werror_flag
21648    ac_objc_werror_flag=yes
21649    ac_cv_prog_objc_g=no
21650    OBJCFLAGS="-g"
21651    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21652 /* end confdefs.h.  */
21653 
21654 int
21655 main ()
21656 {
21657 
21658   ;
21659   return 0;
21660 }
21661 _ACEOF
21662 if ac_fn_objc_try_compile "$LINENO"; then :
21663   ac_cv_prog_objc_g=yes
21664 else
21665   OBJCFLAGS=""
21666       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21667 /* end confdefs.h.  */
21668 
21669 int
21670 main ()
21671 {
21672 
21673   ;
21674   return 0;
21675 }
21676 _ACEOF
21677 if ac_fn_objc_try_compile "$LINENO"; then :
21678 
21679 else
21680   ac_objc_werror_flag=$ac_save_objc_werror_flag
21681          OBJCFLAGS="-g"
21682          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21683 /* end confdefs.h.  */
21684 
21685 int
21686 main ()
21687 {
21688 
21689   ;
21690   return 0;
21691 }
21692 _ACEOF
21693 if ac_fn_objc_try_compile "$LINENO"; then :
21694   ac_cv_prog_objc_g=yes
21695 fi
21696 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21697 fi
21698 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21699 fi
21700 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21701    ac_objc_werror_flag=$ac_save_objc_werror_flag
21702 fi
21703 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_objc_g" >&5
21704 $as_echo "$ac_cv_prog_objc_g" >&6; }
21705 if test "$ac_test_OBJCFLAGS" = set; then
21706   OBJCFLAGS=$ac_save_OBJCFLAGS
21707 elif test $ac_cv_prog_objc_g = yes; then
21708   if test "$GOBJC" = yes; then
21709     OBJCFLAGS="-g -O2"
21710   else
21711     OBJCFLAGS="-g"
21712   fi
21713 else
21714   if test "$GOBJC" = yes; then
21715     OBJCFLAGS="-O2"
21716   else
21717     OBJCFLAGS=
21718   fi
21719 fi
21720 ac_ext=cpp
21721 ac_cpp='$CXXCPP $CPPFLAGS'
21722 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
21723 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
21724 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
21725 
21726 
21727   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21728 
21729   # First separate the path from the arguments. This will split at the first
21730   # space.
21731   complete="$OBJC"
21732   path="${complete%% *}"
21733   tmp="$complete EOL"
21734   arguments="${tmp#* }"
21735 
21736   # Input might be given as Windows format, start by converting to
21737   # unix format.
21738   new_path=`$CYGPATH -u "$path"`
21739 
21740   # Now try to locate executable using which
21741   new_path=`$WHICH "$new_path" 2> /dev/null`
21742   # bat and cmd files are not always considered executable in cygwin causing which
21743   # to not find them
21744   if test "x$new_path" = x \
21745            && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21746            && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21747     new_path=`$CYGPATH -u "$path"`
21748   fi
21749   if test "x$new_path" = x; then
21750     # Oops. Which didn't find the executable.
21751     # The splitting of arguments from the executable at a space might have been incorrect,
21752     # since paths with space are more likely in Windows. Give it another try with the whole
21753     # argument.
21754     path="$complete"
21755     arguments="EOL"
21756     new_path=`$CYGPATH -u "$path"`
21757     new_path=`$WHICH "$new_path" 2> /dev/null`
21758     # bat and cmd files are not always considered executable in cygwin causing which
21759     # to not find them
21760     if test "x$new_path" = x \
21761              && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21762              && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21763       new_path=`$CYGPATH -u "$path"`
21764     fi
21765     if test "x$new_path" = x; then
21766       # It's still not found. Now this is an unrecoverable error.
21767       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
21768 $as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
21769       has_space=`$ECHO "$complete" | $GREP " "`
21770       if test "x$has_space" != x; then
21771         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21772 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21773       fi
21774       as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
21775     fi
21776   fi
21777 
21778   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21779   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21780   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21781   # "foo.exe" is OK but "foo" is an error.
21782   #
21783   # This test is therefore slightly more accurate than "test -f" to check for file precense.
21784   # It is also a way to make sure we got the proper file name for the real test later on.
21785   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21786   if test "x$test_shortpath" = x; then
21787     # Short path failed, file does not exist as specified.
21788     # Try adding .exe or .cmd
21789     if test -f "${new_path}.exe"; then
21790        input_to_shortpath="${new_path}.exe"
21791     elif test -f "${new_path}.cmd"; then
21792        input_to_shortpath="${new_path}.cmd"
21793     else
21794       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$new_path\", is invalid." >&5
21795 $as_echo "$as_me: The path of OBJC, which resolves as \"$new_path\", is invalid." >&6;}
21796       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
21797 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
21798       as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
21799     fi
21800   else
21801     input_to_shortpath="$new_path"
21802   fi
21803 
21804   # Call helper function which possibly converts this using DOS-style short mode.
21805   # If so, the updated path is stored in $new_path.
21806   new_path="$input_to_shortpath"
21807 
21808   input_path="$input_to_shortpath"
21809   # Check if we need to convert this using DOS-style short mode. If the path
21810   # contains just simple characters, use it. Otherwise (spaces, weird characters),
21811   # take no chances and rewrite it.
21812   # Note: m4 eats our [], so we need to use [ and ] instead.
21813   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21814   if test "x$has_forbidden_chars" != x; then
21815     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21816     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21817     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21818     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21819       # Going to short mode and back again did indeed matter. Since short mode is
21820       # case insensitive, let's make it lowercase to improve readability.
21821       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21822       # Now convert it back to Unix-stile (cygpath)
21823       input_path=`$CYGPATH -u "$shortmode_path"`
21824       new_path="$input_path"
21825     fi
21826   fi
21827 
21828   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21829   if test "x$test_cygdrive_prefix" = x; then
21830     # As a simple fix, exclude /usr/bin since it's not a real path.
21831     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
21832       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21833       # a path prefixed by /cygdrive for fixpath to work.
21834       new_path="$CYGWIN_ROOT_PATH$input_path"
21835     fi
21836   fi
21837 
21838   # remove trailing .exe if any
21839   new_path="${new_path/%.exe/}"
21840 
21841   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21842 
21843   # First separate the path from the arguments. This will split at the first
21844   # space.
21845   complete="$OBJC"
21846   path="${complete%% *}"
21847   tmp="$complete EOL"
21848   arguments="${tmp#* }"
21849 
21850   # Input might be given as Windows format, start by converting to
21851   # unix format.
21852   new_path="$path"
21853 
21854   windows_path="$new_path"
21855   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21856     unix_path=`$CYGPATH -u "$windows_path"`
21857     new_path="$unix_path"
21858   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21859     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21860     new_path="$unix_path"
21861   fi
21862 
21863 
21864   # Now try to locate executable using which
21865   new_path=`$WHICH "$new_path" 2> /dev/null`
21866 
21867   if test "x$new_path" = x; then
21868     # Oops. Which didn't find the executable.
21869     # The splitting of arguments from the executable at a space might have been incorrect,
21870     # since paths with space are more likely in Windows. Give it another try with the whole
21871     # argument.
21872     path="$complete"
21873     arguments="EOL"
21874     new_path="$path"
21875 
21876   windows_path="$new_path"
21877   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21878     unix_path=`$CYGPATH -u "$windows_path"`
21879     new_path="$unix_path"
21880   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21881     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21882     new_path="$unix_path"
21883   fi
21884 
21885 
21886     new_path=`$WHICH "$new_path" 2> /dev/null`
21887 
21888     if test "x$new_path" = x; then
21889       # It's still not found. Now this is an unrecoverable error.
21890       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
21891 $as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
21892       has_space=`$ECHO "$complete" | $GREP " "`
21893       if test "x$has_space" != x; then
21894         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21895 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21896       fi
21897       as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
21898     fi
21899   fi
21900 
21901   # Now new_path has a complete unix path to the binary
21902   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
21903     # Keep paths in /bin as-is, but remove trailing .exe if any
21904     new_path="${new_path/%.exe/}"
21905     # Do not save /bin paths to all_fixpath_prefixes!
21906   else
21907     # Not in mixed or Windows style, start by that.
21908     new_path=`cmd //c echo $new_path`
21909 
21910   input_path="$new_path"
21911   # Check if we need to convert this using DOS-style short mode. If the path
21912   # contains just simple characters, use it. Otherwise (spaces, weird characters),
21913   # take no chances and rewrite it.
21914   # Note: m4 eats our [], so we need to use [ and ] instead.
21915   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21916   if test "x$has_forbidden_chars" != x; then
21917     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21918     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21919   fi
21920 
21921     # Output is in $new_path
21922 
21923   windows_path="$new_path"
21924   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21925     unix_path=`$CYGPATH -u "$windows_path"`
21926     new_path="$unix_path"
21927   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21928     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21929     new_path="$unix_path"
21930   fi
21931 
21932     # remove trailing .exe if any
21933     new_path="${new_path/%.exe/}"
21934 
21935     # Save the first 10 bytes of this path to the storage, so fixpath can work.
21936     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21937   fi
21938 
21939   else
21940     # We're on a posix platform. Hooray! :)
21941     # First separate the path from the arguments. This will split at the first
21942     # space.
21943     complete="$OBJC"
21944     path="${complete%% *}"
21945     tmp="$complete EOL"
21946     arguments="${tmp#* }"
21947 
21948     # Cannot rely on the command "which" here since it doesn't always work.
21949     is_absolute_path=`$ECHO "$path" | $GREP ^/`
21950     if test -z "$is_absolute_path"; then
21951       # Path to executable is not absolute. Find it.
21952       IFS_save="$IFS"
21953       IFS=:
21954       for p in $PATH; do
21955         if test -f "$p/$path" && test -x "$p/$path"; then
21956           new_path="$p/$path"
21957           break
21958         fi
21959       done
21960       IFS="$IFS_save"
21961     else
21962       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving OBJC (as $path) failed, using $path directly." >&5
21963 $as_echo "$as_me: Resolving OBJC (as $path) failed, using $path directly." >&6;}
21964       new_path="$path"
21965     fi
21966 
21967     if test "x$new_path" = x; then
21968         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
21969 $as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
21970         has_space=`$ECHO "$complete" | $GREP " "`
21971         if test "x$has_space" != x; then
21972           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
21973 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
21974         fi
21975         as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
21976       fi
21977   fi
21978 
21979       # Now join together the path and the arguments once again
21980       if test "x$arguments" != xEOL; then
21981         new_complete="$new_path ${arguments% *}"
21982       else
21983         new_complete="$new_path"
21984       fi
21985 
21986   if test "x$complete" != "x$new_complete"; then
21987       OBJC="$new_complete"
21988       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJC to \"$new_complete\"" >&5
21989 $as_echo "$as_me: Rewriting OBJC to \"$new_complete\"" >&6;}
21990     fi
21991 
21992 else
21993     OBJC=
21994 fi
21995 
21996 # Restore the flags to the user specified values.
21997 # This is necessary since AC_PROG_CC defaults CFLAGS to "-g -O2"
21998 CFLAGS="$ORG_CFLAGS"
21999 CXXFLAGS="$ORG_CXXFLAGS"
22000 OBJCFLAGS="$ORG_OBJCFLAGS"
22001 
22002 LD="$CC"
22003 LDEXE="$CC"
22004 LDCXX="$CXX"
22005 LDEXECXX="$CXX"
22006 
22007 # LDEXE is the linker to use, when creating executables.
22008 
22009 # Linking C++ libraries.
22010 
22011 # Linking C++ executables.
22012 
22013 
22014 if test "x$OPENJDK_TARGET_OS" != xwindows; then
22015     if test -n "$ac_tool_prefix"; then
22016   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
22017 set dummy ${ac_tool_prefix}ar; ac_word=$2
22018 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22019 $as_echo_n "checking for $ac_word... " >&6; }
22020 if test "${ac_cv_prog_AR+set}" = set; then :
22021   $as_echo_n "(cached) " >&6
22022 else
22023   if test -n "$AR"; then
22024   ac_cv_prog_AR="$AR" # Let the user override the test.
22025 else
22026 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22027 for as_dir in $PATH
22028 do
22029   IFS=$as_save_IFS
22030   test -z "$as_dir" && as_dir=.
22031     for ac_exec_ext in '' $ac_executable_extensions; do
22032   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
22033     ac_cv_prog_AR="${ac_tool_prefix}ar"
22034     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22035     break 2
22036   fi
22037 done
22038   done
22039 IFS=$as_save_IFS
22040 
22041 fi
22042 fi
22043 AR=$ac_cv_prog_AR
22044 if test -n "$AR"; then
22045   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
22046 $as_echo "$AR" >&6; }
22047 else
22048   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22049 $as_echo "no" >&6; }
22050 fi
22051 
22052 
22053 fi
22054 if test -z "$ac_cv_prog_AR"; then
22055   ac_ct_AR=$AR
22056   # Extract the first word of "ar", so it can be a program name with args.
22057 set dummy ar; ac_word=$2
22058 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22059 $as_echo_n "checking for $ac_word... " >&6; }
22060 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then :
22061   $as_echo_n "(cached) " >&6
22062 else
22063   if test -n "$ac_ct_AR"; then
22064   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
22065 else
22066 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22067 for as_dir in $PATH
22068 do
22069   IFS=$as_save_IFS
22070   test -z "$as_dir" && as_dir=.
22071     for ac_exec_ext in '' $ac_executable_extensions; do
22072   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
22073     ac_cv_prog_ac_ct_AR="ar"
22074     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22075     break 2
22076   fi
22077 done
22078   done
22079 IFS=$as_save_IFS
22080 
22081 fi
22082 fi
22083 ac_ct_AR=$ac_cv_prog_ac_ct_AR
22084 if test -n "$ac_ct_AR"; then
22085   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
22086 $as_echo "$ac_ct_AR" >&6; }
22087 else
22088   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22089 $as_echo "no" >&6; }
22090 fi
22091 
22092   if test "x$ac_ct_AR" = x; then
22093     AR=""
22094   else
22095     case $cross_compiling:$ac_tool_warned in
22096 yes:)
22097 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
22098 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
22099 ac_tool_warned=yes ;;
22100 esac
22101     AR=$ac_ct_AR
22102   fi
22103 else
22104   AR="$ac_cv_prog_AR"
22105 fi
22106 
22107 
22108   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22109 
22110   # First separate the path from the arguments. This will split at the first
22111   # space.
22112   complete="$AR"
22113   path="${complete%% *}"
22114   tmp="$complete EOL"
22115   arguments="${tmp#* }"
22116 
22117   # Input might be given as Windows format, start by converting to
22118   # unix format.
22119   new_path=`$CYGPATH -u "$path"`
22120 
22121   # Now try to locate executable using which
22122   new_path=`$WHICH "$new_path" 2> /dev/null`
22123   # bat and cmd files are not always considered executable in cygwin causing which
22124   # to not find them
22125   if test "x$new_path" = x \
22126            && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22127            && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22128     new_path=`$CYGPATH -u "$path"`
22129   fi
22130   if test "x$new_path" = x; then
22131     # Oops. Which didn't find the executable.
22132     # The splitting of arguments from the executable at a space might have been incorrect,
22133     # since paths with space are more likely in Windows. Give it another try with the whole
22134     # argument.
22135     path="$complete"
22136     arguments="EOL"
22137     new_path=`$CYGPATH -u "$path"`
22138     new_path=`$WHICH "$new_path" 2> /dev/null`
22139     # bat and cmd files are not always considered executable in cygwin causing which
22140     # to not find them
22141     if test "x$new_path" = x \
22142              && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22143              && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22144       new_path=`$CYGPATH -u "$path"`
22145     fi
22146     if test "x$new_path" = x; then
22147       # It's still not found. Now this is an unrecoverable error.
22148       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
22149 $as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
22150       has_space=`$ECHO "$complete" | $GREP " "`
22151       if test "x$has_space" != x; then
22152         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22153 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22154       fi
22155       as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
22156     fi
22157   fi
22158 
22159   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22160   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22161   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22162   # "foo.exe" is OK but "foo" is an error.
22163   #
22164   # This test is therefore slightly more accurate than "test -f" to check for file precense.
22165   # It is also a way to make sure we got the proper file name for the real test later on.
22166   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22167   if test "x$test_shortpath" = x; then
22168     # Short path failed, file does not exist as specified.
22169     # Try adding .exe or .cmd
22170     if test -f "${new_path}.exe"; then
22171        input_to_shortpath="${new_path}.exe"
22172     elif test -f "${new_path}.cmd"; then
22173        input_to_shortpath="${new_path}.cmd"
22174     else
22175       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$new_path\", is invalid." >&5
22176 $as_echo "$as_me: The path of AR, which resolves as \"$new_path\", is invalid." >&6;}
22177       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
22178 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
22179       as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
22180     fi
22181   else
22182     input_to_shortpath="$new_path"
22183   fi
22184 
22185   # Call helper function which possibly converts this using DOS-style short mode.
22186   # If so, the updated path is stored in $new_path.
22187   new_path="$input_to_shortpath"
22188 
22189   input_path="$input_to_shortpath"
22190   # Check if we need to convert this using DOS-style short mode. If the path
22191   # contains just simple characters, use it. Otherwise (spaces, weird characters),
22192   # take no chances and rewrite it.
22193   # Note: m4 eats our [], so we need to use [ and ] instead.
22194   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22195   if test "x$has_forbidden_chars" != x; then
22196     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22197     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22198     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22199     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22200       # Going to short mode and back again did indeed matter. Since short mode is
22201       # case insensitive, let's make it lowercase to improve readability.
22202       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22203       # Now convert it back to Unix-stile (cygpath)
22204       input_path=`$CYGPATH -u "$shortmode_path"`
22205       new_path="$input_path"
22206     fi
22207   fi
22208 
22209   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22210   if test "x$test_cygdrive_prefix" = x; then
22211     # As a simple fix, exclude /usr/bin since it's not a real path.
22212     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
22213       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22214       # a path prefixed by /cygdrive for fixpath to work.
22215       new_path="$CYGWIN_ROOT_PATH$input_path"
22216     fi
22217   fi
22218 
22219   # remove trailing .exe if any
22220   new_path="${new_path/%.exe/}"
22221 
22222   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22223 
22224   # First separate the path from the arguments. This will split at the first
22225   # space.
22226   complete="$AR"
22227   path="${complete%% *}"
22228   tmp="$complete EOL"
22229   arguments="${tmp#* }"
22230 
22231   # Input might be given as Windows format, start by converting to
22232   # unix format.
22233   new_path="$path"
22234 
22235   windows_path="$new_path"
22236   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22237     unix_path=`$CYGPATH -u "$windows_path"`
22238     new_path="$unix_path"
22239   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22240     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22241     new_path="$unix_path"
22242   fi
22243 
22244 
22245   # Now try to locate executable using which
22246   new_path=`$WHICH "$new_path" 2> /dev/null`
22247 
22248   if test "x$new_path" = x; then
22249     # Oops. Which didn't find the executable.
22250     # The splitting of arguments from the executable at a space might have been incorrect,
22251     # since paths with space are more likely in Windows. Give it another try with the whole
22252     # argument.
22253     path="$complete"
22254     arguments="EOL"
22255     new_path="$path"
22256 
22257   windows_path="$new_path"
22258   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22259     unix_path=`$CYGPATH -u "$windows_path"`
22260     new_path="$unix_path"
22261   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22262     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22263     new_path="$unix_path"
22264   fi
22265 
22266 
22267     new_path=`$WHICH "$new_path" 2> /dev/null`
22268 
22269     if test "x$new_path" = x; then
22270       # It's still not found. Now this is an unrecoverable error.
22271       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
22272 $as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
22273       has_space=`$ECHO "$complete" | $GREP " "`
22274       if test "x$has_space" != x; then
22275         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22276 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22277       fi
22278       as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
22279     fi
22280   fi
22281 
22282   # Now new_path has a complete unix path to the binary
22283   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
22284     # Keep paths in /bin as-is, but remove trailing .exe if any
22285     new_path="${new_path/%.exe/}"
22286     # Do not save /bin paths to all_fixpath_prefixes!
22287   else
22288     # Not in mixed or Windows style, start by that.
22289     new_path=`cmd //c echo $new_path`
22290 
22291   input_path="$new_path"
22292   # Check if we need to convert this using DOS-style short mode. If the path
22293   # contains just simple characters, use it. Otherwise (spaces, weird characters),
22294   # take no chances and rewrite it.
22295   # Note: m4 eats our [], so we need to use [ and ] instead.
22296   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22297   if test "x$has_forbidden_chars" != x; then
22298     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22299     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22300   fi
22301 
22302     # Output is in $new_path
22303 
22304   windows_path="$new_path"
22305   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22306     unix_path=`$CYGPATH -u "$windows_path"`
22307     new_path="$unix_path"
22308   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22309     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22310     new_path="$unix_path"
22311   fi
22312 
22313     # remove trailing .exe if any
22314     new_path="${new_path/%.exe/}"
22315 
22316     # Save the first 10 bytes of this path to the storage, so fixpath can work.
22317     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22318   fi
22319 
22320   else
22321     # We're on a posix platform. Hooray! :)
22322     # First separate the path from the arguments. This will split at the first
22323     # space.
22324     complete="$AR"
22325     path="${complete%% *}"
22326     tmp="$complete EOL"
22327     arguments="${tmp#* }"
22328 
22329     # Cannot rely on the command "which" here since it doesn't always work.
22330     is_absolute_path=`$ECHO "$path" | $GREP ^/`
22331     if test -z "$is_absolute_path"; then
22332       # Path to executable is not absolute. Find it.
22333       IFS_save="$IFS"
22334       IFS=:
22335       for p in $PATH; do
22336         if test -f "$p/$path" && test -x "$p/$path"; then
22337           new_path="$p/$path"
22338           break
22339         fi
22340       done
22341       IFS="$IFS_save"
22342     else
22343       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving AR (as $path) failed, using $path directly." >&5
22344 $as_echo "$as_me: Resolving AR (as $path) failed, using $path directly." >&6;}
22345       new_path="$path"
22346     fi
22347 
22348     if test "x$new_path" = x; then
22349         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
22350 $as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
22351         has_space=`$ECHO "$complete" | $GREP " "`
22352         if test "x$has_space" != x; then
22353           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
22354 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
22355         fi
22356         as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
22357       fi
22358   fi
22359 
22360       # Now join together the path and the arguments once again
22361       if test "x$arguments" != xEOL; then
22362         new_complete="$new_path ${arguments% *}"
22363       else
22364         new_complete="$new_path"
22365       fi
22366 
22367   if test "x$complete" != "x$new_complete"; then
22368       AR="$new_complete"
22369       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AR to \"$new_complete\"" >&5
22370 $as_echo "$as_me: Rewriting AR to \"$new_complete\"" >&6;}
22371     fi
22372 
22373 fi
22374 if test "x$OPENJDK_TARGET_OS" = xmacosx; then
22375     ARFLAGS="-r"
22376 else
22377     ARFLAGS=""
22378 fi
22379 
22380 
22381 # For hotspot, we need these in Windows mixed path; other platforms keep them the same
22382 HOTSPOT_CXX="$CXX"
22383 HOTSPOT_LD="$LD"
22384 
22385 
22386 
22387 COMPILER_NAME=gcc
22388 COMPILER_TYPE=CC
22389 if test "x$OPENJDK_TARGET_OS" = xwindows; then :
22390 
22391     # For now, assume that we are always compiling using cl.exe.
22392     CC_OUT_OPTION=-Fo
22393     EXE_OUT_OPTION=-out:
22394     LD_OUT_OPTION=-out:
22395     AR_OUT_OPTION=-out:
22396     # On Windows, reject /usr/bin/link (as determined in CYGWIN_LINK), which is a cygwin
22397     # program for something completely different.
22398     # Extract the first word of "link", so it can be a program name with args.
22399 set dummy link; ac_word=$2
22400 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22401 $as_echo_n "checking for $ac_word... " >&6; }
22402 if test "${ac_cv_prog_WINLD+set}" = set; then :
22403   $as_echo_n "(cached) " >&6
22404 else
22405   if test -n "$WINLD"; then
22406   ac_cv_prog_WINLD="$WINLD" # Let the user override the test.
22407 else
22408   ac_prog_rejected=no
22409 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22410 for as_dir in $PATH
22411 do
22412   IFS=$as_save_IFS
22413   test -z "$as_dir" && as_dir=.
22414     for ac_exec_ext in '' $ac_executable_extensions; do
22415   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
22416     if test "$as_dir/$ac_word$ac_exec_ext" = "$CYGWIN_LINK"; then
22417        ac_prog_rejected=yes
22418        continue
22419      fi
22420     ac_cv_prog_WINLD="link"
22421     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22422     break 2
22423   fi
22424 done
22425   done
22426 IFS=$as_save_IFS
22427 
22428 if test $ac_prog_rejected = yes; then
22429   # We found a bogon in the path, so make sure we never use it.
22430   set dummy $ac_cv_prog_WINLD
22431   shift
22432   if test $# != 0; then
22433     # We chose a different compiler from the bogus one.
22434     # However, it has the same basename, so the bogon will be chosen
22435     # first if we set WINLD to just the basename; use the full file name.
22436     shift
22437     ac_cv_prog_WINLD="$as_dir/$ac_word${1+' '}$@"
22438   fi
22439 fi
22440 fi
22441 fi
22442 WINLD=$ac_cv_prog_WINLD
22443 if test -n "$WINLD"; then
22444   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINLD" >&5
22445 $as_echo "$WINLD" >&6; }
22446 else
22447   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22448 $as_echo "no" >&6; }
22449 fi
22450 
22451 
22452     # Since we must ignore the first found link, WINLD will contain
22453     # the full path to the link.exe program.
22454 
22455   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22456 
22457   # First separate the path from the arguments. This will split at the first
22458   # space.
22459   complete="$WINLD"
22460   path="${complete%% *}"
22461   tmp="$complete EOL"
22462   arguments="${tmp#* }"
22463 
22464   # Input might be given as Windows format, start by converting to
22465   # unix format.
22466   new_path=`$CYGPATH -u "$path"`
22467 
22468   # Now try to locate executable using which
22469   new_path=`$WHICH "$new_path" 2> /dev/null`
22470   # bat and cmd files are not always considered executable in cygwin causing which
22471   # to not find them
22472   if test "x$new_path" = x \
22473            && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22474            && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22475     new_path=`$CYGPATH -u "$path"`
22476   fi
22477   if test "x$new_path" = x; then
22478     # Oops. Which didn't find the executable.
22479     # The splitting of arguments from the executable at a space might have been incorrect,
22480     # since paths with space are more likely in Windows. Give it another try with the whole
22481     # argument.
22482     path="$complete"
22483     arguments="EOL"
22484     new_path=`$CYGPATH -u "$path"`
22485     new_path=`$WHICH "$new_path" 2> /dev/null`
22486     # bat and cmd files are not always considered executable in cygwin causing which
22487     # to not find them
22488     if test "x$new_path" = x \
22489              && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22490              && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22491       new_path=`$CYGPATH -u "$path"`
22492     fi
22493     if test "x$new_path" = x; then
22494       # It's still not found. Now this is an unrecoverable error.
22495       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$complete\", is not found." >&5
22496 $as_echo "$as_me: The path of WINLD, which resolves as \"$complete\", is not found." >&6;}
22497       has_space=`$ECHO "$complete" | $GREP " "`
22498       if test "x$has_space" != x; then
22499         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22500 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22501       fi
22502       as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
22503     fi
22504   fi
22505 
22506   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22507   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22508   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22509   # "foo.exe" is OK but "foo" is an error.
22510   #
22511   # This test is therefore slightly more accurate than "test -f" to check for file precense.
22512   # It is also a way to make sure we got the proper file name for the real test later on.
22513   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22514   if test "x$test_shortpath" = x; then
22515     # Short path failed, file does not exist as specified.
22516     # Try adding .exe or .cmd
22517     if test -f "${new_path}.exe"; then
22518        input_to_shortpath="${new_path}.exe"
22519     elif test -f "${new_path}.cmd"; then
22520        input_to_shortpath="${new_path}.cmd"
22521     else
22522       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$new_path\", is invalid." >&5
22523 $as_echo "$as_me: The path of WINLD, which resolves as \"$new_path\", is invalid." >&6;}
22524       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
22525 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
22526       as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
22527     fi
22528   else
22529     input_to_shortpath="$new_path"
22530   fi
22531 
22532   # Call helper function which possibly converts this using DOS-style short mode.
22533   # If so, the updated path is stored in $new_path.
22534   new_path="$input_to_shortpath"
22535 
22536   input_path="$input_to_shortpath"
22537   # Check if we need to convert this using DOS-style short mode. If the path
22538   # contains just simple characters, use it. Otherwise (spaces, weird characters),
22539   # take no chances and rewrite it.
22540   # Note: m4 eats our [], so we need to use [ and ] instead.
22541   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22542   if test "x$has_forbidden_chars" != x; then
22543     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22544     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22545     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22546     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22547       # Going to short mode and back again did indeed matter. Since short mode is
22548       # case insensitive, let's make it lowercase to improve readability.
22549       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22550       # Now convert it back to Unix-stile (cygpath)
22551       input_path=`$CYGPATH -u "$shortmode_path"`
22552       new_path="$input_path"
22553     fi
22554   fi
22555 
22556   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22557   if test "x$test_cygdrive_prefix" = x; then
22558     # As a simple fix, exclude /usr/bin since it's not a real path.
22559     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
22560       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22561       # a path prefixed by /cygdrive for fixpath to work.
22562       new_path="$CYGWIN_ROOT_PATH$input_path"
22563     fi
22564   fi
22565 
22566   # remove trailing .exe if any
22567   new_path="${new_path/%.exe/}"
22568 
22569   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22570 
22571   # First separate the path from the arguments. This will split at the first
22572   # space.
22573   complete="$WINLD"
22574   path="${complete%% *}"
22575   tmp="$complete EOL"
22576   arguments="${tmp#* }"
22577 
22578   # Input might be given as Windows format, start by converting to
22579   # unix format.
22580   new_path="$path"
22581 
22582   windows_path="$new_path"
22583   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22584     unix_path=`$CYGPATH -u "$windows_path"`
22585     new_path="$unix_path"
22586   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22587     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22588     new_path="$unix_path"
22589   fi
22590 
22591 
22592   # Now try to locate executable using which
22593   new_path=`$WHICH "$new_path" 2> /dev/null`
22594 
22595   if test "x$new_path" = x; then
22596     # Oops. Which didn't find the executable.
22597     # The splitting of arguments from the executable at a space might have been incorrect,
22598     # since paths with space are more likely in Windows. Give it another try with the whole
22599     # argument.
22600     path="$complete"
22601     arguments="EOL"
22602     new_path="$path"
22603 
22604   windows_path="$new_path"
22605   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22606     unix_path=`$CYGPATH -u "$windows_path"`
22607     new_path="$unix_path"
22608   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22609     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22610     new_path="$unix_path"
22611   fi
22612 
22613 
22614     new_path=`$WHICH "$new_path" 2> /dev/null`
22615 
22616     if test "x$new_path" = x; then
22617       # It's still not found. Now this is an unrecoverable error.
22618       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$complete\", is not found." >&5
22619 $as_echo "$as_me: The path of WINLD, which resolves as \"$complete\", is not found." >&6;}
22620       has_space=`$ECHO "$complete" | $GREP " "`
22621       if test "x$has_space" != x; then
22622         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22623 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22624       fi
22625       as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
22626     fi
22627   fi
22628 
22629   # Now new_path has a complete unix path to the binary
22630   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
22631     # Keep paths in /bin as-is, but remove trailing .exe if any
22632     new_path="${new_path/%.exe/}"
22633     # Do not save /bin paths to all_fixpath_prefixes!
22634   else
22635     # Not in mixed or Windows style, start by that.
22636     new_path=`cmd //c echo $new_path`
22637 
22638   input_path="$new_path"
22639   # Check if we need to convert this using DOS-style short mode. If the path
22640   # contains just simple characters, use it. Otherwise (spaces, weird characters),
22641   # take no chances and rewrite it.
22642   # Note: m4 eats our [], so we need to use [ and ] instead.
22643   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22644   if test "x$has_forbidden_chars" != x; then
22645     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22646     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22647   fi
22648 
22649     # Output is in $new_path
22650 
22651   windows_path="$new_path"
22652   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22653     unix_path=`$CYGPATH -u "$windows_path"`
22654     new_path="$unix_path"
22655   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22656     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22657     new_path="$unix_path"
22658   fi
22659 
22660     # remove trailing .exe if any
22661     new_path="${new_path/%.exe/}"
22662 
22663     # Save the first 10 bytes of this path to the storage, so fixpath can work.
22664     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22665   fi
22666 
22667   else
22668     # We're on a posix platform. Hooray! :)
22669     # First separate the path from the arguments. This will split at the first
22670     # space.
22671     complete="$WINLD"
22672     path="${complete%% *}"
22673     tmp="$complete EOL"
22674     arguments="${tmp#* }"
22675 
22676     # Cannot rely on the command "which" here since it doesn't always work.
22677     is_absolute_path=`$ECHO "$path" | $GREP ^/`
22678     if test -z "$is_absolute_path"; then
22679       # Path to executable is not absolute. Find it.
22680       IFS_save="$IFS"
22681       IFS=:
22682       for p in $PATH; do
22683         if test -f "$p/$path" && test -x "$p/$path"; then
22684           new_path="$p/$path"
22685           break
22686         fi
22687       done
22688       IFS="$IFS_save"
22689     else
22690       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving WINLD (as $path) failed, using $path directly." >&5
22691 $as_echo "$as_me: Resolving WINLD (as $path) failed, using $path directly." >&6;}
22692       new_path="$path"
22693     fi
22694 
22695     if test "x$new_path" = x; then
22696         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$complete\", is not found." >&5
22697 $as_echo "$as_me: The path of WINLD, which resolves as \"$complete\", is not found." >&6;}
22698         has_space=`$ECHO "$complete" | $GREP " "`
22699         if test "x$has_space" != x; then
22700           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
22701 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
22702         fi
22703         as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
22704       fi
22705   fi
22706 
22707       # Now join together the path and the arguments once again
22708       if test "x$arguments" != xEOL; then
22709         new_complete="$new_path ${arguments% *}"
22710       else
22711         new_complete="$new_path"
22712       fi
22713 
22714   if test "x$complete" != "x$new_complete"; then
22715       WINLD="$new_complete"
22716       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting WINLD to \"$new_complete\"" >&5
22717 $as_echo "$as_me: Rewriting WINLD to \"$new_complete\"" >&6;}
22718     fi
22719 
22720     printf "Windows linker was found at $WINLD\n"
22721     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the found link.exe is actually the Visual Studio linker" >&5
22722 $as_echo_n "checking if the found link.exe is actually the Visual Studio linker... " >&6; }
22723     "$WINLD" --version > /dev/null
22724     if test $? -eq 0 ; then
22725       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22726 $as_echo "no" >&6; }
22727       as_fn_error $? "This is the Cygwin link tool. Please check your PATH and rerun configure." "$LINENO" 5
22728     else
22729       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
22730 $as_echo "yes" >&6; }
22731     fi
22732     LD="$WINLD"
22733     LDEXE="$WINLD"
22734     LDCXX="$WINLD"
22735     LDEXECXX="$WINLD"
22736 
22737     # Extract the first word of "mt", so it can be a program name with args.
22738 set dummy mt; ac_word=$2
22739 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22740 $as_echo_n "checking for $ac_word... " >&6; }
22741 if test "${ac_cv_prog_MT+set}" = set; then :
22742   $as_echo_n "(cached) " >&6
22743 else
22744   if test -n "$MT"; then
22745   ac_cv_prog_MT="$MT" # Let the user override the test.
22746 else
22747   ac_prog_rejected=no
22748 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22749 for as_dir in $PATH
22750 do
22751   IFS=$as_save_IFS
22752   test -z "$as_dir" && as_dir=.
22753     for ac_exec_ext in '' $ac_executable_extensions; do
22754   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
22755     if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/mt"; then
22756        ac_prog_rejected=yes
22757        continue
22758      fi
22759     ac_cv_prog_MT="mt"
22760     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22761     break 2
22762   fi
22763 done
22764   done
22765 IFS=$as_save_IFS
22766 
22767 if test $ac_prog_rejected = yes; then
22768   # We found a bogon in the path, so make sure we never use it.
22769   set dummy $ac_cv_prog_MT
22770   shift
22771   if test $# != 0; then
22772     # We chose a different compiler from the bogus one.
22773     # However, it has the same basename, so the bogon will be chosen
22774     # first if we set MT to just the basename; use the full file name.
22775     shift
22776     ac_cv_prog_MT="$as_dir/$ac_word${1+' '}$@"
22777   fi
22778 fi
22779 fi
22780 fi
22781 MT=$ac_cv_prog_MT
22782 if test -n "$MT"; then
22783   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MT" >&5
22784 $as_echo "$MT" >&6; }
22785 else
22786   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22787 $as_echo "no" >&6; }
22788 fi
22789 
22790 
22791 
22792   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22793 
22794   # First separate the path from the arguments. This will split at the first
22795   # space.
22796   complete="$MT"
22797   path="${complete%% *}"
22798   tmp="$complete EOL"
22799   arguments="${tmp#* }"
22800 
22801   # Input might be given as Windows format, start by converting to
22802   # unix format.
22803   new_path=`$CYGPATH -u "$path"`
22804 
22805   # Now try to locate executable using which
22806   new_path=`$WHICH "$new_path" 2> /dev/null`
22807   # bat and cmd files are not always considered executable in cygwin causing which
22808   # to not find them
22809   if test "x$new_path" = x \
22810            && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22811            && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22812     new_path=`$CYGPATH -u "$path"`
22813   fi
22814   if test "x$new_path" = x; then
22815     # Oops. Which didn't find the executable.
22816     # The splitting of arguments from the executable at a space might have been incorrect,
22817     # since paths with space are more likely in Windows. Give it another try with the whole
22818     # argument.
22819     path="$complete"
22820     arguments="EOL"
22821     new_path=`$CYGPATH -u "$path"`
22822     new_path=`$WHICH "$new_path" 2> /dev/null`
22823     # bat and cmd files are not always considered executable in cygwin causing which
22824     # to not find them
22825     if test "x$new_path" = x \
22826              && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22827              && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22828       new_path=`$CYGPATH -u "$path"`
22829     fi
22830     if test "x$new_path" = x; then
22831       # It's still not found. Now this is an unrecoverable error.
22832       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
22833 $as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
22834       has_space=`$ECHO "$complete" | $GREP " "`
22835       if test "x$has_space" != x; then
22836         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22837 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22838       fi
22839       as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
22840     fi
22841   fi
22842 
22843   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22844   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22845   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22846   # "foo.exe" is OK but "foo" is an error.
22847   #
22848   # This test is therefore slightly more accurate than "test -f" to check for file precense.
22849   # It is also a way to make sure we got the proper file name for the real test later on.
22850   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22851   if test "x$test_shortpath" = x; then
22852     # Short path failed, file does not exist as specified.
22853     # Try adding .exe or .cmd
22854     if test -f "${new_path}.exe"; then
22855        input_to_shortpath="${new_path}.exe"
22856     elif test -f "${new_path}.cmd"; then
22857        input_to_shortpath="${new_path}.cmd"
22858     else
22859       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$new_path\", is invalid." >&5
22860 $as_echo "$as_me: The path of MT, which resolves as \"$new_path\", is invalid." >&6;}
22861       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
22862 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
22863       as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
22864     fi
22865   else
22866     input_to_shortpath="$new_path"
22867   fi
22868 
22869   # Call helper function which possibly converts this using DOS-style short mode.
22870   # If so, the updated path is stored in $new_path.
22871   new_path="$input_to_shortpath"
22872 
22873   input_path="$input_to_shortpath"
22874   # Check if we need to convert this using DOS-style short mode. If the path
22875   # contains just simple characters, use it. Otherwise (spaces, weird characters),
22876   # take no chances and rewrite it.
22877   # Note: m4 eats our [], so we need to use [ and ] instead.
22878   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22879   if test "x$has_forbidden_chars" != x; then
22880     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22881     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22882     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22883     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22884       # Going to short mode and back again did indeed matter. Since short mode is
22885       # case insensitive, let's make it lowercase to improve readability.
22886       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22887       # Now convert it back to Unix-stile (cygpath)
22888       input_path=`$CYGPATH -u "$shortmode_path"`
22889       new_path="$input_path"
22890     fi
22891   fi
22892 
22893   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22894   if test "x$test_cygdrive_prefix" = x; then
22895     # As a simple fix, exclude /usr/bin since it's not a real path.
22896     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
22897       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22898       # a path prefixed by /cygdrive for fixpath to work.
22899       new_path="$CYGWIN_ROOT_PATH$input_path"
22900     fi
22901   fi
22902 
22903   # remove trailing .exe if any
22904   new_path="${new_path/%.exe/}"
22905 
22906   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22907 
22908   # First separate the path from the arguments. This will split at the first
22909   # space.
22910   complete="$MT"
22911   path="${complete%% *}"
22912   tmp="$complete EOL"
22913   arguments="${tmp#* }"
22914 
22915   # Input might be given as Windows format, start by converting to
22916   # unix format.
22917   new_path="$path"
22918 
22919   windows_path="$new_path"
22920   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22921     unix_path=`$CYGPATH -u "$windows_path"`
22922     new_path="$unix_path"
22923   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22924     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22925     new_path="$unix_path"
22926   fi
22927 
22928 
22929   # Now try to locate executable using which
22930   new_path=`$WHICH "$new_path" 2> /dev/null`
22931 
22932   if test "x$new_path" = x; then
22933     # Oops. Which didn't find the executable.
22934     # The splitting of arguments from the executable at a space might have been incorrect,
22935     # since paths with space are more likely in Windows. Give it another try with the whole
22936     # argument.
22937     path="$complete"
22938     arguments="EOL"
22939     new_path="$path"
22940 
22941   windows_path="$new_path"
22942   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22943     unix_path=`$CYGPATH -u "$windows_path"`
22944     new_path="$unix_path"
22945   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22946     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22947     new_path="$unix_path"
22948   fi
22949 
22950 
22951     new_path=`$WHICH "$new_path" 2> /dev/null`
22952 
22953     if test "x$new_path" = x; then
22954       # It's still not found. Now this is an unrecoverable error.
22955       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
22956 $as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
22957       has_space=`$ECHO "$complete" | $GREP " "`
22958       if test "x$has_space" != x; then
22959         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22960 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22961       fi
22962       as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
22963     fi
22964   fi
22965 
22966   # Now new_path has a complete unix path to the binary
22967   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
22968     # Keep paths in /bin as-is, but remove trailing .exe if any
22969     new_path="${new_path/%.exe/}"
22970     # Do not save /bin paths to all_fixpath_prefixes!
22971   else
22972     # Not in mixed or Windows style, start by that.
22973     new_path=`cmd //c echo $new_path`
22974 
22975   input_path="$new_path"
22976   # Check if we need to convert this using DOS-style short mode. If the path
22977   # contains just simple characters, use it. Otherwise (spaces, weird characters),
22978   # take no chances and rewrite it.
22979   # Note: m4 eats our [], so we need to use [ and ] instead.
22980   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22981   if test "x$has_forbidden_chars" != x; then
22982     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22983     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22984   fi
22985 
22986     # Output is in $new_path
22987 
22988   windows_path="$new_path"
22989   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22990     unix_path=`$CYGPATH -u "$windows_path"`
22991     new_path="$unix_path"
22992   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22993     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22994     new_path="$unix_path"
22995   fi
22996 
22997     # remove trailing .exe if any
22998     new_path="${new_path/%.exe/}"
22999 
23000     # Save the first 10 bytes of this path to the storage, so fixpath can work.
23001     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23002   fi
23003 
23004   else
23005     # We're on a posix platform. Hooray! :)
23006     # First separate the path from the arguments. This will split at the first
23007     # space.
23008     complete="$MT"
23009     path="${complete%% *}"
23010     tmp="$complete EOL"
23011     arguments="${tmp#* }"
23012 
23013     # Cannot rely on the command "which" here since it doesn't always work.
23014     is_absolute_path=`$ECHO "$path" | $GREP ^/`
23015     if test -z "$is_absolute_path"; then
23016       # Path to executable is not absolute. Find it.
23017       IFS_save="$IFS"
23018       IFS=:
23019       for p in $PATH; do
23020         if test -f "$p/$path" && test -x "$p/$path"; then
23021           new_path="$p/$path"
23022           break
23023         fi
23024       done
23025       IFS="$IFS_save"
23026     else
23027       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving MT (as $path) failed, using $path directly." >&5
23028 $as_echo "$as_me: Resolving MT (as $path) failed, using $path directly." >&6;}
23029       new_path="$path"
23030     fi
23031 
23032     if test "x$new_path" = x; then
23033         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
23034 $as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
23035         has_space=`$ECHO "$complete" | $GREP " "`
23036         if test "x$has_space" != x; then
23037           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
23038 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
23039         fi
23040         as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
23041       fi
23042   fi
23043 
23044       # Now join together the path and the arguments once again
23045       if test "x$arguments" != xEOL; then
23046         new_complete="$new_path ${arguments% *}"
23047       else
23048         new_complete="$new_path"
23049       fi
23050 
23051   if test "x$complete" != "x$new_complete"; then
23052       MT="$new_complete"
23053       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MT to \"$new_complete\"" >&5
23054 $as_echo "$as_me: Rewriting MT to \"$new_complete\"" >&6;}
23055     fi
23056 
23057     # The resource compiler
23058     # Extract the first word of "rc", so it can be a program name with args.
23059 set dummy rc; ac_word=$2
23060 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23061 $as_echo_n "checking for $ac_word... " >&6; }
23062 if test "${ac_cv_prog_RC+set}" = set; then :
23063   $as_echo_n "(cached) " >&6
23064 else
23065   if test -n "$RC"; then
23066   ac_cv_prog_RC="$RC" # Let the user override the test.
23067 else
23068   ac_prog_rejected=no
23069 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23070 for as_dir in $PATH
23071 do
23072   IFS=$as_save_IFS
23073   test -z "$as_dir" && as_dir=.
23074     for ac_exec_ext in '' $ac_executable_extensions; do
23075   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
23076     if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/rc"; then
23077        ac_prog_rejected=yes
23078        continue
23079      fi
23080     ac_cv_prog_RC="rc"
23081     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23082     break 2
23083   fi
23084 done
23085   done
23086 IFS=$as_save_IFS
23087 
23088 if test $ac_prog_rejected = yes; then
23089   # We found a bogon in the path, so make sure we never use it.
23090   set dummy $ac_cv_prog_RC
23091   shift
23092   if test $# != 0; then
23093     # We chose a different compiler from the bogus one.
23094     # However, it has the same basename, so the bogon will be chosen
23095     # first if we set RC to just the basename; use the full file name.
23096     shift
23097     ac_cv_prog_RC="$as_dir/$ac_word${1+' '}$@"
23098   fi
23099 fi
23100 fi
23101 fi
23102 RC=$ac_cv_prog_RC
23103 if test -n "$RC"; then
23104   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RC" >&5
23105 $as_echo "$RC" >&6; }
23106 else
23107   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23108 $as_echo "no" >&6; }
23109 fi
23110 
23111 
23112 
23113   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23114 
23115   # First separate the path from the arguments. This will split at the first
23116   # space.
23117   complete="$RC"
23118   path="${complete%% *}"
23119   tmp="$complete EOL"
23120   arguments="${tmp#* }"
23121 
23122   # Input might be given as Windows format, start by converting to
23123   # unix format.
23124   new_path=`$CYGPATH -u "$path"`
23125 
23126   # Now try to locate executable using which
23127   new_path=`$WHICH "$new_path" 2> /dev/null`
23128   # bat and cmd files are not always considered executable in cygwin causing which
23129   # to not find them
23130   if test "x$new_path" = x \
23131            && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23132            && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23133     new_path=`$CYGPATH -u "$path"`
23134   fi
23135   if test "x$new_path" = x; then
23136     # Oops. Which didn't find the executable.
23137     # The splitting of arguments from the executable at a space might have been incorrect,
23138     # since paths with space are more likely in Windows. Give it another try with the whole
23139     # argument.
23140     path="$complete"
23141     arguments="EOL"
23142     new_path=`$CYGPATH -u "$path"`
23143     new_path=`$WHICH "$new_path" 2> /dev/null`
23144     # bat and cmd files are not always considered executable in cygwin causing which
23145     # to not find them
23146     if test "x$new_path" = x \
23147              && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23148              && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23149       new_path=`$CYGPATH -u "$path"`
23150     fi
23151     if test "x$new_path" = x; then
23152       # It's still not found. Now this is an unrecoverable error.
23153       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
23154 $as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
23155       has_space=`$ECHO "$complete" | $GREP " "`
23156       if test "x$has_space" != x; then
23157         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23158 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23159       fi
23160       as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
23161     fi
23162   fi
23163 
23164   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23165   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23166   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23167   # "foo.exe" is OK but "foo" is an error.
23168   #
23169   # This test is therefore slightly more accurate than "test -f" to check for file precense.
23170   # It is also a way to make sure we got the proper file name for the real test later on.
23171   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23172   if test "x$test_shortpath" = x; then
23173     # Short path failed, file does not exist as specified.
23174     # Try adding .exe or .cmd
23175     if test -f "${new_path}.exe"; then
23176        input_to_shortpath="${new_path}.exe"
23177     elif test -f "${new_path}.cmd"; then
23178        input_to_shortpath="${new_path}.cmd"
23179     else
23180       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$new_path\", is invalid." >&5
23181 $as_echo "$as_me: The path of RC, which resolves as \"$new_path\", is invalid." >&6;}
23182       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
23183 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
23184       as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
23185     fi
23186   else
23187     input_to_shortpath="$new_path"
23188   fi
23189 
23190   # Call helper function which possibly converts this using DOS-style short mode.
23191   # If so, the updated path is stored in $new_path.
23192   new_path="$input_to_shortpath"
23193 
23194   input_path="$input_to_shortpath"
23195   # Check if we need to convert this using DOS-style short mode. If the path
23196   # contains just simple characters, use it. Otherwise (spaces, weird characters),
23197   # take no chances and rewrite it.
23198   # Note: m4 eats our [], so we need to use [ and ] instead.
23199   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23200   if test "x$has_forbidden_chars" != x; then
23201     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23202     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23203     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23204     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23205       # Going to short mode and back again did indeed matter. Since short mode is
23206       # case insensitive, let's make it lowercase to improve readability.
23207       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23208       # Now convert it back to Unix-stile (cygpath)
23209       input_path=`$CYGPATH -u "$shortmode_path"`
23210       new_path="$input_path"
23211     fi
23212   fi
23213 
23214   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23215   if test "x$test_cygdrive_prefix" = x; then
23216     # As a simple fix, exclude /usr/bin since it's not a real path.
23217     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
23218       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23219       # a path prefixed by /cygdrive for fixpath to work.
23220       new_path="$CYGWIN_ROOT_PATH$input_path"
23221     fi
23222   fi
23223 
23224   # remove trailing .exe if any
23225   new_path="${new_path/%.exe/}"
23226 
23227   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23228 
23229   # First separate the path from the arguments. This will split at the first
23230   # space.
23231   complete="$RC"
23232   path="${complete%% *}"
23233   tmp="$complete EOL"
23234   arguments="${tmp#* }"
23235 
23236   # Input might be given as Windows format, start by converting to
23237   # unix format.
23238   new_path="$path"
23239 
23240   windows_path="$new_path"
23241   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23242     unix_path=`$CYGPATH -u "$windows_path"`
23243     new_path="$unix_path"
23244   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23245     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23246     new_path="$unix_path"
23247   fi
23248 
23249 
23250   # Now try to locate executable using which
23251   new_path=`$WHICH "$new_path" 2> /dev/null`
23252 
23253   if test "x$new_path" = x; then
23254     # Oops. Which didn't find the executable.
23255     # The splitting of arguments from the executable at a space might have been incorrect,
23256     # since paths with space are more likely in Windows. Give it another try with the whole
23257     # argument.
23258     path="$complete"
23259     arguments="EOL"
23260     new_path="$path"
23261 
23262   windows_path="$new_path"
23263   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23264     unix_path=`$CYGPATH -u "$windows_path"`
23265     new_path="$unix_path"
23266   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23267     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23268     new_path="$unix_path"
23269   fi
23270 
23271 
23272     new_path=`$WHICH "$new_path" 2> /dev/null`
23273 
23274     if test "x$new_path" = x; then
23275       # It's still not found. Now this is an unrecoverable error.
23276       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
23277 $as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
23278       has_space=`$ECHO "$complete" | $GREP " "`
23279       if test "x$has_space" != x; then
23280         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23281 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23282       fi
23283       as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
23284     fi
23285   fi
23286 
23287   # Now new_path has a complete unix path to the binary
23288   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
23289     # Keep paths in /bin as-is, but remove trailing .exe if any
23290     new_path="${new_path/%.exe/}"
23291     # Do not save /bin paths to all_fixpath_prefixes!
23292   else
23293     # Not in mixed or Windows style, start by that.
23294     new_path=`cmd //c echo $new_path`
23295 
23296   input_path="$new_path"
23297   # Check if we need to convert this using DOS-style short mode. If the path
23298   # contains just simple characters, use it. Otherwise (spaces, weird characters),
23299   # take no chances and rewrite it.
23300   # Note: m4 eats our [], so we need to use [ and ] instead.
23301   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23302   if test "x$has_forbidden_chars" != x; then
23303     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23304     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23305   fi
23306 
23307     # Output is in $new_path
23308 
23309   windows_path="$new_path"
23310   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23311     unix_path=`$CYGPATH -u "$windows_path"`
23312     new_path="$unix_path"
23313   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23314     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23315     new_path="$unix_path"
23316   fi
23317 
23318     # remove trailing .exe if any
23319     new_path="${new_path/%.exe/}"
23320 
23321     # Save the first 10 bytes of this path to the storage, so fixpath can work.
23322     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23323   fi
23324 
23325   else
23326     # We're on a posix platform. Hooray! :)
23327     # First separate the path from the arguments. This will split at the first
23328     # space.
23329     complete="$RC"
23330     path="${complete%% *}"
23331     tmp="$complete EOL"
23332     arguments="${tmp#* }"
23333 
23334     # Cannot rely on the command "which" here since it doesn't always work.
23335     is_absolute_path=`$ECHO "$path" | $GREP ^/`
23336     if test -z "$is_absolute_path"; then
23337       # Path to executable is not absolute. Find it.
23338       IFS_save="$IFS"
23339       IFS=:
23340       for p in $PATH; do
23341         if test -f "$p/$path" && test -x "$p/$path"; then
23342           new_path="$p/$path"
23343           break
23344         fi
23345       done
23346       IFS="$IFS_save"
23347     else
23348       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving RC (as $path) failed, using $path directly." >&5
23349 $as_echo "$as_me: Resolving RC (as $path) failed, using $path directly." >&6;}
23350       new_path="$path"
23351     fi
23352 
23353     if test "x$new_path" = x; then
23354         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
23355 $as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
23356         has_space=`$ECHO "$complete" | $GREP " "`
23357         if test "x$has_space" != x; then
23358           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
23359 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
23360         fi
23361         as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
23362       fi
23363   fi
23364 
23365       # Now join together the path and the arguments once again
23366       if test "x$arguments" != xEOL; then
23367         new_complete="$new_path ${arguments% *}"
23368       else
23369         new_complete="$new_path"
23370       fi
23371 
23372   if test "x$complete" != "x$new_complete"; then
23373       RC="$new_complete"
23374       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting RC to \"$new_complete\"" >&5
23375 $as_echo "$as_me: Rewriting RC to \"$new_complete\"" >&6;}
23376     fi
23377 
23378 
23379     # For hotspot, we need these in Windows mixed path,
23380     # so rewrite them all. Need added .exe suffix.
23381     HOTSPOT_CXX="$CXX.exe"
23382     HOTSPOT_LD="$LD.exe"
23383     HOTSPOT_MT="$MT.exe"
23384     HOTSPOT_RC="$RC.exe"
23385 
23386   unix_path="$HOTSPOT_CXX"
23387   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23388     windows_path=`$CYGPATH -m "$unix_path"`
23389     HOTSPOT_CXX="$windows_path"
23390   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23391     windows_path=`cmd //c echo $unix_path`
23392     HOTSPOT_CXX="$windows_path"
23393   fi
23394 
23395 
23396   unix_path="$HOTSPOT_LD"
23397   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23398     windows_path=`$CYGPATH -m "$unix_path"`
23399     HOTSPOT_LD="$windows_path"
23400   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23401     windows_path=`cmd //c echo $unix_path`
23402     HOTSPOT_LD="$windows_path"
23403   fi
23404 
23405 
23406   unix_path="$HOTSPOT_MT"
23407   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23408     windows_path=`$CYGPATH -m "$unix_path"`
23409     HOTSPOT_MT="$windows_path"
23410   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23411     windows_path=`cmd //c echo $unix_path`
23412     HOTSPOT_MT="$windows_path"
23413   fi
23414 
23415 
23416   unix_path="$HOTSPOT_RC"
23417   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23418     windows_path=`$CYGPATH -m "$unix_path"`
23419     HOTSPOT_RC="$windows_path"
23420   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23421     windows_path=`cmd //c echo $unix_path`
23422     HOTSPOT_RC="$windows_path"
23423   fi
23424 
23425 
23426 
23427 
23428     RC_FLAGS="-nologo -l 0x409 -r"
23429     if test "x$VARIANT" = xOPT; then :
23430 
23431         RC_FLAGS="$RC_FLAGS -d NDEBUG"
23432 
23433 fi
23434     JDK_UPDATE_VERSION_NOTNULL=$JDK_UPDATE_VERSION
23435     if test "x$JDK_UPDATE_VERSION" = x; then :
23436 
23437         JDK_UPDATE_VERSION_NOTNULL=0
23438 
23439 fi
23440     RC_FLAGS="$RC_FLAGS -d \"JDK_BUILD_ID=$FULL_VERSION\""
23441     RC_FLAGS="$RC_FLAGS -d \"JDK_COMPANY=$COMPANY_NAME\""
23442     RC_FLAGS="$RC_FLAGS -d \"JDK_COMPONENT=$PRODUCT_NAME $JDK_RC_PLATFORM_NAME binary\""
23443     RC_FLAGS="$RC_FLAGS -d \"JDK_VER=$JDK_MINOR_VERSION.$JDK_MICRO_VERSION.$JDK_UPDATE_VERSION_NOTNULL.$COOKED_BUILD_NUMBER\""
23444     RC_FLAGS="$RC_FLAGS -d \"JDK_COPYRIGHT=Copyright \xA9 $COPYRIGHT_YEAR\""
23445     RC_FLAGS="$RC_FLAGS -d \"JDK_NAME=$PRODUCT_NAME $JDK_RC_PLATFORM_NAME $JDK_MINOR_VERSION $JDK_UPDATE_META_TAG\""
23446     RC_FLAGS="$RC_FLAGS -d \"JDK_FVER=$JDK_MINOR_VERSION,$JDK_MICRO_VERSION,$JDK_UPDATE_VERSION_NOTNULL,$COOKED_BUILD_NUMBER\""
23447 
23448     # lib.exe is used to create static libraries.
23449     # Extract the first word of "lib", so it can be a program name with args.
23450 set dummy lib; ac_word=$2
23451 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23452 $as_echo_n "checking for $ac_word... " >&6; }
23453 if test "${ac_cv_prog_WINAR+set}" = set; then :
23454   $as_echo_n "(cached) " >&6
23455 else
23456   if test -n "$WINAR"; then
23457   ac_cv_prog_WINAR="$WINAR" # Let the user override the test.
23458 else
23459 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23460 for as_dir in $PATH
23461 do
23462   IFS=$as_save_IFS
23463   test -z "$as_dir" && as_dir=.
23464     for ac_exec_ext in '' $ac_executable_extensions; do
23465   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
23466     ac_cv_prog_WINAR="lib"
23467     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23468     break 2
23469   fi
23470 done
23471   done
23472 IFS=$as_save_IFS
23473 
23474 fi
23475 fi
23476 WINAR=$ac_cv_prog_WINAR
23477 if test -n "$WINAR"; then
23478   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINAR" >&5
23479 $as_echo "$WINAR" >&6; }
23480 else
23481   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23482 $as_echo "no" >&6; }
23483 fi
23484 
23485 
23486 
23487   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23488 
23489   # First separate the path from the arguments. This will split at the first
23490   # space.
23491   complete="$WINAR"
23492   path="${complete%% *}"
23493   tmp="$complete EOL"
23494   arguments="${tmp#* }"
23495 
23496   # Input might be given as Windows format, start by converting to
23497   # unix format.
23498   new_path=`$CYGPATH -u "$path"`
23499 
23500   # Now try to locate executable using which
23501   new_path=`$WHICH "$new_path" 2> /dev/null`
23502   # bat and cmd files are not always considered executable in cygwin causing which
23503   # to not find them
23504   if test "x$new_path" = x \
23505            && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23506            && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23507     new_path=`$CYGPATH -u "$path"`
23508   fi
23509   if test "x$new_path" = x; then
23510     # Oops. Which didn't find the executable.
23511     # The splitting of arguments from the executable at a space might have been incorrect,
23512     # since paths with space are more likely in Windows. Give it another try with the whole
23513     # argument.
23514     path="$complete"
23515     arguments="EOL"
23516     new_path=`$CYGPATH -u "$path"`
23517     new_path=`$WHICH "$new_path" 2> /dev/null`
23518     # bat and cmd files are not always considered executable in cygwin causing which
23519     # to not find them
23520     if test "x$new_path" = x \
23521              && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23522              && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23523       new_path=`$CYGPATH -u "$path"`
23524     fi
23525     if test "x$new_path" = x; then
23526       # It's still not found. Now this is an unrecoverable error.
23527       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$complete\", is not found." >&5
23528 $as_echo "$as_me: The path of WINAR, which resolves as \"$complete\", is not found." >&6;}
23529       has_space=`$ECHO "$complete" | $GREP " "`
23530       if test "x$has_space" != x; then
23531         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23532 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23533       fi
23534       as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5
23535     fi
23536   fi
23537 
23538   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23539   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23540   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23541   # "foo.exe" is OK but "foo" is an error.
23542   #
23543   # This test is therefore slightly more accurate than "test -f" to check for file precense.
23544   # It is also a way to make sure we got the proper file name for the real test later on.
23545   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23546   if test "x$test_shortpath" = x; then
23547     # Short path failed, file does not exist as specified.
23548     # Try adding .exe or .cmd
23549     if test -f "${new_path}.exe"; then
23550        input_to_shortpath="${new_path}.exe"
23551     elif test -f "${new_path}.cmd"; then
23552        input_to_shortpath="${new_path}.cmd"
23553     else
23554       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$new_path\", is invalid." >&5
23555 $as_echo "$as_me: The path of WINAR, which resolves as \"$new_path\", is invalid." >&6;}
23556       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
23557 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
23558       as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5
23559     fi
23560   else
23561     input_to_shortpath="$new_path"
23562   fi
23563 
23564   # Call helper function which possibly converts this using DOS-style short mode.
23565   # If so, the updated path is stored in $new_path.
23566   new_path="$input_to_shortpath"
23567 
23568   input_path="$input_to_shortpath"
23569   # Check if we need to convert this using DOS-style short mode. If the path
23570   # contains just simple characters, use it. Otherwise (spaces, weird characters),
23571   # take no chances and rewrite it.
23572   # Note: m4 eats our [], so we need to use [ and ] instead.
23573   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23574   if test "x$has_forbidden_chars" != x; then
23575     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23576     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23577     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23578     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23579       # Going to short mode and back again did indeed matter. Since short mode is
23580       # case insensitive, let's make it lowercase to improve readability.
23581       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23582       # Now convert it back to Unix-stile (cygpath)
23583       input_path=`$CYGPATH -u "$shortmode_path"`
23584       new_path="$input_path"
23585     fi
23586   fi
23587 
23588   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23589   if test "x$test_cygdrive_prefix" = x; then
23590     # As a simple fix, exclude /usr/bin since it's not a real path.
23591     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
23592       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23593       # a path prefixed by /cygdrive for fixpath to work.
23594       new_path="$CYGWIN_ROOT_PATH$input_path"
23595     fi
23596   fi
23597 
23598   # remove trailing .exe if any
23599   new_path="${new_path/%.exe/}"
23600 
23601   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23602 
23603   # First separate the path from the arguments. This will split at the first
23604   # space.
23605   complete="$WINAR"
23606   path="${complete%% *}"
23607   tmp="$complete EOL"
23608   arguments="${tmp#* }"
23609 
23610   # Input might be given as Windows format, start by converting to
23611   # unix format.
23612   new_path="$path"
23613 
23614   windows_path="$new_path"
23615   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23616     unix_path=`$CYGPATH -u "$windows_path"`
23617     new_path="$unix_path"
23618   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23619     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23620     new_path="$unix_path"
23621   fi
23622 
23623 
23624   # Now try to locate executable using which
23625   new_path=`$WHICH "$new_path" 2> /dev/null`
23626 
23627   if test "x$new_path" = x; then
23628     # Oops. Which didn't find the executable.
23629     # The splitting of arguments from the executable at a space might have been incorrect,
23630     # since paths with space are more likely in Windows. Give it another try with the whole
23631     # argument.
23632     path="$complete"
23633     arguments="EOL"
23634     new_path="$path"
23635 
23636   windows_path="$new_path"
23637   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23638     unix_path=`$CYGPATH -u "$windows_path"`
23639     new_path="$unix_path"
23640   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23641     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23642     new_path="$unix_path"
23643   fi
23644 
23645 
23646     new_path=`$WHICH "$new_path" 2> /dev/null`
23647 
23648     if test "x$new_path" = x; then
23649       # It's still not found. Now this is an unrecoverable error.
23650       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$complete\", is not found." >&5
23651 $as_echo "$as_me: The path of WINAR, which resolves as \"$complete\", is not found." >&6;}
23652       has_space=`$ECHO "$complete" | $GREP " "`
23653       if test "x$has_space" != x; then
23654         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23655 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23656       fi
23657       as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5
23658     fi
23659   fi
23660 
23661   # Now new_path has a complete unix path to the binary
23662   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
23663     # Keep paths in /bin as-is, but remove trailing .exe if any
23664     new_path="${new_path/%.exe/}"
23665     # Do not save /bin paths to all_fixpath_prefixes!
23666   else
23667     # Not in mixed or Windows style, start by that.
23668     new_path=`cmd //c echo $new_path`
23669 
23670   input_path="$new_path"
23671   # Check if we need to convert this using DOS-style short mode. If the path
23672   # contains just simple characters, use it. Otherwise (spaces, weird characters),
23673   # take no chances and rewrite it.
23674   # Note: m4 eats our [], so we need to use [ and ] instead.
23675   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23676   if test "x$has_forbidden_chars" != x; then
23677     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23678     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23679   fi
23680 
23681     # Output is in $new_path
23682 
23683   windows_path="$new_path"
23684   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23685     unix_path=`$CYGPATH -u "$windows_path"`
23686     new_path="$unix_path"
23687   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23688     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23689     new_path="$unix_path"
23690   fi
23691 
23692     # remove trailing .exe if any
23693     new_path="${new_path/%.exe/}"
23694 
23695     # Save the first 10 bytes of this path to the storage, so fixpath can work.
23696     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23697   fi
23698 
23699   else
23700     # We're on a posix platform. Hooray! :)
23701     # First separate the path from the arguments. This will split at the first
23702     # space.
23703     complete="$WINAR"
23704     path="${complete%% *}"
23705     tmp="$complete EOL"
23706     arguments="${tmp#* }"
23707 
23708     # Cannot rely on the command "which" here since it doesn't always work.
23709     is_absolute_path=`$ECHO "$path" | $GREP ^/`
23710     if test -z "$is_absolute_path"; then
23711       # Path to executable is not absolute. Find it.
23712       IFS_save="$IFS"
23713       IFS=:
23714       for p in $PATH; do
23715         if test -f "$p/$path" && test -x "$p/$path"; then
23716           new_path="$p/$path"
23717           break
23718         fi
23719       done
23720       IFS="$IFS_save"
23721     else
23722       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving WINAR (as $path) failed, using $path directly." >&5
23723 $as_echo "$as_me: Resolving WINAR (as $path) failed, using $path directly." >&6;}
23724       new_path="$path"
23725     fi
23726 
23727     if test "x$new_path" = x; then
23728         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$complete\", is not found." >&5
23729 $as_echo "$as_me: The path of WINAR, which resolves as \"$complete\", is not found." >&6;}
23730         has_space=`$ECHO "$complete" | $GREP " "`
23731         if test "x$has_space" != x; then
23732           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
23733 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
23734         fi
23735         as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5
23736       fi
23737   fi
23738 
23739       # Now join together the path and the arguments once again
23740       if test "x$arguments" != xEOL; then
23741         new_complete="$new_path ${arguments% *}"
23742       else
23743         new_complete="$new_path"
23744       fi
23745 
23746   if test "x$complete" != "x$new_complete"; then
23747       WINAR="$new_complete"
23748       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting WINAR to \"$new_complete\"" >&5
23749 $as_echo "$as_me: Rewriting WINAR to \"$new_complete\"" >&6;}
23750     fi
23751 
23752     AR="$WINAR"
23753     ARFLAGS="-nologo -NODEFAULTLIB:MSVCRT"
23754 
23755     # Extract the first word of "dumpbin", so it can be a program name with args.
23756 set dummy dumpbin; ac_word=$2
23757 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23758 $as_echo_n "checking for $ac_word... " >&6; }
23759 if test "${ac_cv_prog_DUMPBIN+set}" = set; then :
23760   $as_echo_n "(cached) " >&6
23761 else
23762   if test -n "$DUMPBIN"; then
23763   ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test.
23764 else
23765 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23766 for as_dir in $PATH
23767 do
23768   IFS=$as_save_IFS
23769   test -z "$as_dir" && as_dir=.
23770     for ac_exec_ext in '' $ac_executable_extensions; do
23771   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
23772     ac_cv_prog_DUMPBIN="dumpbin"
23773     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23774     break 2
23775   fi
23776 done
23777   done
23778 IFS=$as_save_IFS
23779 
23780 fi
23781 fi
23782 DUMPBIN=$ac_cv_prog_DUMPBIN
23783 if test -n "$DUMPBIN"; then
23784   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5
23785 $as_echo "$DUMPBIN" >&6; }
23786 else
23787   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23788 $as_echo "no" >&6; }
23789 fi
23790 
23791 
23792 
23793   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23794 
23795   # First separate the path from the arguments. This will split at the first
23796   # space.
23797   complete="$DUMPBIN"
23798   path="${complete%% *}"
23799   tmp="$complete EOL"
23800   arguments="${tmp#* }"
23801 
23802   # Input might be given as Windows format, start by converting to
23803   # unix format.
23804   new_path=`$CYGPATH -u "$path"`
23805 
23806   # Now try to locate executable using which
23807   new_path=`$WHICH "$new_path" 2> /dev/null`
23808   # bat and cmd files are not always considered executable in cygwin causing which
23809   # to not find them
23810   if test "x$new_path" = x \
23811            && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23812            && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23813     new_path=`$CYGPATH -u "$path"`
23814   fi
23815   if test "x$new_path" = x; then
23816     # Oops. Which didn't find the executable.
23817     # The splitting of arguments from the executable at a space might have been incorrect,
23818     # since paths with space are more likely in Windows. Give it another try with the whole
23819     # argument.
23820     path="$complete"
23821     arguments="EOL"
23822     new_path=`$CYGPATH -u "$path"`
23823     new_path=`$WHICH "$new_path" 2> /dev/null`
23824     # bat and cmd files are not always considered executable in cygwin causing which
23825     # to not find them
23826     if test "x$new_path" = x \
23827              && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23828              && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23829       new_path=`$CYGPATH -u "$path"`
23830     fi
23831     if test "x$new_path" = x; then
23832       # It's still not found. Now this is an unrecoverable error.
23833       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
23834 $as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
23835       has_space=`$ECHO "$complete" | $GREP " "`
23836       if test "x$has_space" != x; then
23837         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23838 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is