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 USE_PRECOMPILED_HEADER
 599 CCACHE
 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_ccache
1031 with_ccache_dir
1032 enable_precompiled_headers
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-ccache        disable using ccache to speed up recompilations
1696                           [enabled]
1697   --disable-precompiled-headers
1698                           disable using precompiled headers when compiling C++
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 # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3370 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3371 #
3372 # This code is free software; you can redistribute it and/or modify it
3373 # under the terms of the GNU General Public License version 2 only, as
3374 # published by the Free Software Foundation.  Oracle designates this
3375 # particular file as subject to the "Classpath" exception as provided
3376 # by Oracle in the LICENSE file that accompanied this code.
3377 #
3378 # This code is distributed in the hope that it will be useful, but WITHOUT
3379 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3380 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3381 # version 2 for more details (a copy is included in the LICENSE file that
3382 # accompanied this code).
3383 #
3384 # You should have received a copy of the GNU General Public License version
3385 # 2 along with this work; if not, write to the Free Software Foundation,
3386 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3387 #
3388 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3389 # or visit www.oracle.com if you need additional information or have any
3390 # questions.
3391 #
3392 
3393 
3394 
3395 
3396 
3397 cygwin_help() {
3398     case $1 in
3399     unzip)
3400         PKGHANDLER_COMMAND="cd <location of cygwin setup.exe> && cmd /c setup -q -P unzip" ;;
3401     zip)
3402         PKGHANDLER_COMMAND="cd <location of cygwin setup.exe> && cmd /c setup -q -P zip" ;;
3403     make)
3404         PKGHANDLER_COMMAND="cd <location of cygwin setup.exe> && cmd /c setup -q -P make" ;;
3405     * )
3406        break ;;
3407     esac
3408 }
3409 
3410 apt_help() {
3411     case $1 in
3412     devkit)
3413         PKGHANDLER_COMMAND="sudo apt-get install build-essential" ;;
3414     openjdk)
3415         PKGHANDLER_COMMAND="sudo apt-get install openjdk-7-jdk" ;;
3416     alsa)
3417         PKGHANDLER_COMMAND="sudo apt-get install libasound2-dev" ;;
3418     cups)
3419         PKGHANDLER_COMMAND="sudo apt-get install libcups2-dev" ;;
3420     freetype2)
3421         PKGHANDLER_COMMAND="sudo apt-get install libfreetype6-dev" ;;
3422     pulse)
3423         PKGHANDLER_COMMAND="sudo apt-get install libpulse-dev" ;;
3424     x11)
3425         PKGHANDLER_COMMAND="sudo apt-get install libX11-dev libxext-dev libxrender-dev libxtst-dev" ;;
3426     ccache)
3427         PKGHANDLER_COMMAND="sudo apt-get install ccache" ;;
3428     * )
3429        break ;;
3430     esac
3431 }
3432 
3433 yum_help() {
3434     case $1 in
3435     devkit)
3436         PKGHANDLER_COMMAND="sudo yum groupinstall \"Development Tools\"" ;;
3437     openjdk)
3438         PKGHANDLER_COMMAND="sudo yum install java-1.7.0-openjdk" ;;
3439     alsa)
3440         PKGHANDLER_COMMAND="sudo yum install alsa-lib-devel" ;;
3441     cups)
3442         PKGHANDLER_COMMAND="sudo yum install cups-devel" ;;
3443     freetype2)
3444         PKGHANDLER_COMMAND="sudo yum install freetype2-devel" ;;
3445     pulse)
3446         PKGHANDLER_COMMAND="sudo yum install pulseaudio-libs-devel" ;;
3447     x11)
3448         PKGHANDLER_COMMAND="sudo yum install libXtst-devel" ;;
3449     ccache)
3450         PKGHANDLER_COMMAND="sudo yum install ccache" ;;
3451     * )
3452        break ;;
3453     esac
3454 }
3455 
3456 port_help() {
3457     PKGHANDLER_COMMAND=""
3458 }
3459 
3460 pkgutil_help() {
3461     PKGHANDLER_COMMAND=""
3462 }
3463 
3464 pkgadd_help() {
3465     PKGHANDLER_COMMAND=""
3466 }
3467 
3468 
3469 
3470 #
3471 # Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
3472 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3473 #
3474 # This code is free software; you can redistribute it and/or modify it
3475 # under the terms of the GNU General Public License version 2 only, as
3476 # published by the Free Software Foundation.  Oracle designates this
3477 # particular file as subject to the "Classpath" exception as provided
3478 # by Oracle in the LICENSE file that accompanied this code.
3479 #
3480 # This code is distributed in the hope that it will be useful, but WITHOUT
3481 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3482 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3483 # version 2 for more details (a copy is included in the LICENSE file that
3484 # accompanied this code).
3485 #
3486 # You should have received a copy of the GNU General Public License version
3487 # 2 along with this work; if not, write to the Free Software Foundation,
3488 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3489 #
3490 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3491 # or visit www.oracle.com if you need additional information or have any
3492 # questions.
3493 #
3494 
3495 
3496 
3497 
3498 
3499 
3500 
3501 
3502 ###############################################################################
3503 #
3504 # Should we build only OpenJDK even if closed sources are present?
3505 #
3506 
3507 
3508 
3509 
3510 ###############################################################################
3511 #
3512 # Setup version numbers
3513 #
3514 
3515 
3516 
3517 
3518 
3519 
3520 # Support for customization of the build process. Some build files
3521 # will include counterparts from this location, if they exist. This allows
3522 # for a degree of customization of the build targets and the rules/recipes
3523 # to create them
3524 
3525 # Check whether --with-custom-make-dir was given.
3526 if test "${with_custom_make_dir+set}" = set; then :
3527   withval=$with_custom_make_dir; CUSTOM_MAKE_DIR=$with_custom_make_dir
3528 fi
3529 
3530 
3531 
3532 #
3533 # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3534 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3535 #
3536 # This code is free software; you can redistribute it and/or modify it
3537 # under the terms of the GNU General Public License version 2 only, as
3538 # published by the Free Software Foundation.  Oracle designates this
3539 # particular file as subject to the "Classpath" exception as provided
3540 # by Oracle in the LICENSE file that accompanied this code.
3541 #
3542 # This code is distributed in the hope that it will be useful, but WITHOUT
3543 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3544 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3545 # version 2 for more details (a copy is included in the LICENSE file that
3546 # accompanied this code).
3547 #
3548 # You should have received a copy of the GNU General Public License version
3549 # 2 along with this work; if not, write to the Free Software Foundation,
3550 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3551 #
3552 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3553 # or visit www.oracle.com if you need additional information or have any
3554 # questions.
3555 #
3556 
3557 
3558 
3559 
3560 
3561 
3562 
3563 
3564 
3565 
3566 
3567 
3568 
3569 
3570 
3571 #
3572 # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3573 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3574 #
3575 # This code is free software; you can redistribute it and/or modify it
3576 # under the terms of the GNU General Public License version 2 only, as
3577 # published by the Free Software Foundation.  Oracle designates this
3578 # particular file as subject to the "Classpath" exception as provided
3579 # by Oracle in the LICENSE file that accompanied this code.
3580 #
3581 # This code is distributed in the hope that it will be useful, but WITHOUT
3582 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3583 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3584 # version 2 for more details (a copy is included in the LICENSE file that
3585 # accompanied this code).
3586 #
3587 # You should have received a copy of the GNU General Public License version
3588 # 2 along with this work; if not, write to the Free Software Foundation,
3589 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3590 #
3591 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3592 # or visit www.oracle.com if you need additional information or have any
3593 # questions.
3594 #
3595 
3596 # Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
3597 # Converts autoconf style CPU name to OpenJDK style, into
3598 # VAR_CPU, VAR_CPU_ARCH, VAR_CPU_BITS and VAR_CPU_ENDIAN.
3599 
3600 
3601 # Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
3602 # Converts autoconf style OS name to OpenJDK style, into
3603 # VAR_OS and VAR_OS_API.
3604 
3605 
3606 # Expects $host_os $host_cpu $build_os and $build_cpu
3607 # and $with_target_bits to have been setup!
3608 #
3609 # Translate the standard triplet(quadruplet) definition
3610 # of the target/build system into OPENJDK_TARGET_OS, OPENJDK_TARGET_CPU,
3611 # OPENJDK_BUILD_OS, etc.
3612 
3613 
3614 # Check if a reduced build (32-bit on 64-bit platforms) is requested, and modify behaviour
3615 # accordingly. Must be done after setting up build and target system, but before
3616 # doing anything else with these values.
3617 
3618 
3619     # Setup the legacy variables, for controlling the old makefiles.
3620     #
3621 
3622 
3623 
3624 
3625 #%%% Build and target systems %%%
3626 
3627 
3628 
3629 
3630 # Support macro for PLATFORM_SETUP_OPENJDK_TARGET_BITS.
3631 # Add -mX to various FLAGS variables.
3632 
3633 
3634 
3635 
3636 
3637 
3638 #
3639 # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3640 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3641 #
3642 # This code is free software; you can redistribute it and/or modify it
3643 # under the terms of the GNU General Public License version 2 only, as
3644 # published by the Free Software Foundation.  Oracle designates this
3645 # particular file as subject to the "Classpath" exception as provided
3646 # by Oracle in the LICENSE file that accompanied this code.
3647 #
3648 # This code is distributed in the hope that it will be useful, but WITHOUT
3649 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3650 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3651 # version 2 for more details (a copy is included in the LICENSE file that
3652 # accompanied this code).
3653 #
3654 # You should have received a copy of the GNU General Public License version
3655 # 2 along with this work; if not, write to the Free Software Foundation,
3656 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3657 #
3658 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3659 # or visit www.oracle.com if you need additional information or have any
3660 # questions.
3661 #
3662 
3663 
3664 
3665 
3666 
3667 
3668 
3669 
3670 #
3671 # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3672 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3673 #
3674 # This code is free software; you can redistribute it and/or modify it
3675 # under the terms of the GNU General Public License version 2 only, as
3676 # published by the Free Software Foundation.  Oracle designates this
3677 # particular file as subject to the "Classpath" exception as provided
3678 # by Oracle in the LICENSE file that accompanied this code.
3679 #
3680 # This code is distributed in the hope that it will be useful, but WITHOUT
3681 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3682 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3683 # version 2 for more details (a copy is included in the LICENSE file that
3684 # accompanied this code).
3685 #
3686 # You should have received a copy of the GNU General Public License version
3687 # 2 along with this work; if not, write to the Free Software Foundation,
3688 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3689 #
3690 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3691 # or visit www.oracle.com if you need additional information or have any
3692 # questions.
3693 #
3694 
3695 # $1 = compiler to test (CC or CXX)
3696 # $2 = human readable name of compiler (C or C++)
3697 
3698 
3699 
3700 
3701 
3702 # $1 = compiler to test (CC or CXX)
3703 # $2 = human readable name of compiler (C or C++)
3704 # $3 = list of compiler names to search for
3705 
3706 
3707 
3708 
3709 
3710 
3711 
3712 
3713 
3714 
3715 
3716 
3717 
3718 # TOOLCHAIN_COMPILER_CHECK_ARGUMENTS([ARGUMENT], [RUN-IF-TRUE],
3719 #                                   [RUN-IF-FALSE])
3720 # ------------------------------------------------------------
3721 # Check that the c and c++ compilers support an argument
3722 
3723 
3724 
3725 
3726 #
3727 # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3728 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3729 #
3730 # This code is free software; you can redistribute it and/or modify it
3731 # under the terms of the GNU General Public License version 2 only, as
3732 # published by the Free Software Foundation.  Oracle designates this
3733 # particular file as subject to the "Classpath" exception as provided
3734 # by Oracle in the LICENSE file that accompanied this code.
3735 #
3736 # This code is distributed in the hope that it will be useful, but WITHOUT
3737 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3738 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3739 # version 2 for more details (a copy is included in the LICENSE file that
3740 # accompanied this code).
3741 #
3742 # You should have received a copy of the GNU General Public License version
3743 # 2 along with this work; if not, write to the Free Software Foundation,
3744 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3745 #
3746 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3747 # or visit www.oracle.com if you need additional information or have any
3748 # questions.
3749 #
3750 
3751 
3752 
3753 
3754 
3755 
3756 
3757 # Check if the VS env variables were setup prior to running configure.
3758 # If not, then find vcvarsall.bat and run it automatically, and integrate
3759 # the set env variables into the spec file.
3760 
3761 
3762 
3763 # Setup the DXSDK paths
3764 
3765 
3766 
3767 
3768 
3769 
3770 # This line needs to be here, verbatim, after all includes and the dummy hook
3771 # definitions. It is replaced with custom functionality when building
3772 # custom sources.
3773 #CUSTOM_AUTOCONF_INCLUDE
3774 
3775 # Do not change or remove the following line, it is needed for consistency checks:
3776 DATE_WHEN_GENERATED=1369310526
3777 
3778 ###############################################################################
3779 #
3780 # Initialization / Boot-strapping
3781 #
3782 # The bootstrapping process needs to solve the "chicken or the egg" problem,
3783 # thus it jumps back and forth, each time gaining something needed later on.
3784 #
3785 ###############################################################################
3786 
3787 # Basic initialization that must happen first of all
3788 
3789 # Save the original command line. This is passed to us by the wrapper configure script.
3790 
3791 DATE_WHEN_CONFIGURED=`LANG=C date`
3792 
3793 { $as_echo "$as_me:${as_lineno-$LINENO}: Configuration created at $DATE_WHEN_CONFIGURED." >&5
3794 $as_echo "$as_me: Configuration created at $DATE_WHEN_CONFIGURED." >&6;}
3795 { $as_echo "$as_me:${as_lineno-$LINENO}: configure script generated at timestamp $DATE_WHEN_GENERATED." >&5
3796 $as_echo "$as_me: configure script generated at timestamp $DATE_WHEN_GENERATED." >&6;}
3797 
3798 
3799 
3800 # Start with tools that do not need have cross compilation support
3801 # and can be expected to be found in the default PATH. These tools are
3802 # used by configure. Nor are these tools expected to be found in the
3803 # devkit from the builddeps server either, since they are
3804 # needed to download the devkit.
3805 
3806 # First are all the simple required tools.
3807 
3808     for ac_prog in basename
3809 do
3810   # Extract the first word of "$ac_prog", so it can be a program name with args.
3811 set dummy $ac_prog; ac_word=$2
3812 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3813 $as_echo_n "checking for $ac_word... " >&6; }
3814 if test "${ac_cv_path_BASENAME+set}" = set; then :
3815   $as_echo_n "(cached) " >&6
3816 else
3817   case $BASENAME in
3818   [\\/]* | ?:[\\/]*)
3819   ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
3820   ;;
3821   *)
3822   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3823 for as_dir in $PATH
3824 do
3825   IFS=$as_save_IFS
3826   test -z "$as_dir" && as_dir=.
3827     for ac_exec_ext in '' $ac_executable_extensions; do
3828   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3829     ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
3830     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3831     break 2
3832   fi
3833 done
3834   done
3835 IFS=$as_save_IFS
3836 
3837   ;;
3838 esac
3839 fi
3840 BASENAME=$ac_cv_path_BASENAME
3841 if test -n "$BASENAME"; then
3842   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
3843 $as_echo "$BASENAME" >&6; }
3844 else
3845   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3846 $as_echo "no" >&6; }
3847 fi
3848 
3849 
3850   test -n "$BASENAME" && break
3851 done
3852 
3853 
3854     if test "x$BASENAME" = x; then
3855         if test "xbasename" = x; then
3856           PROG_NAME=basename
3857         else
3858           PROG_NAME=basename
3859         fi
3860         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
3861 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
3862         as_fn_error $? "Cannot continue" "$LINENO" 5
3863     fi
3864 
3865 
3866 
3867     for ac_prog in bash
3868 do
3869   # Extract the first word of "$ac_prog", so it can be a program name with args.
3870 set dummy $ac_prog; ac_word=$2
3871 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3872 $as_echo_n "checking for $ac_word... " >&6; }
3873 if test "${ac_cv_path_BASH+set}" = set; then :
3874   $as_echo_n "(cached) " >&6
3875 else
3876   case $BASH in
3877   [\\/]* | ?:[\\/]*)
3878   ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
3879   ;;
3880   *)
3881   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3882 for as_dir in $PATH
3883 do
3884   IFS=$as_save_IFS
3885   test -z "$as_dir" && as_dir=.
3886     for ac_exec_ext in '' $ac_executable_extensions; do
3887   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3888     ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
3889     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3890     break 2
3891   fi
3892 done
3893   done
3894 IFS=$as_save_IFS
3895 
3896   ;;
3897 esac
3898 fi
3899 BASH=$ac_cv_path_BASH
3900 if test -n "$BASH"; then
3901   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
3902 $as_echo "$BASH" >&6; }
3903 else
3904   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3905 $as_echo "no" >&6; }
3906 fi
3907 
3908 
3909   test -n "$BASH" && break
3910 done
3911 
3912 
3913     if test "x$BASH" = x; then
3914         if test "xbash" = x; then
3915           PROG_NAME=bash
3916         else
3917           PROG_NAME=bash
3918         fi
3919         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
3920 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
3921         as_fn_error $? "Cannot continue" "$LINENO" 5
3922     fi
3923 
3924 
3925 
3926     for ac_prog in cat
3927 do
3928   # Extract the first word of "$ac_prog", so it can be a program name with args.
3929 set dummy $ac_prog; ac_word=$2
3930 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3931 $as_echo_n "checking for $ac_word... " >&6; }
3932 if test "${ac_cv_path_CAT+set}" = set; then :
3933   $as_echo_n "(cached) " >&6
3934 else
3935   case $CAT in
3936   [\\/]* | ?:[\\/]*)
3937   ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
3938   ;;
3939   *)
3940   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3941 for as_dir in $PATH
3942 do
3943   IFS=$as_save_IFS
3944   test -z "$as_dir" && as_dir=.
3945     for ac_exec_ext in '' $ac_executable_extensions; do
3946   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3947     ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
3948     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3949     break 2
3950   fi
3951 done
3952   done
3953 IFS=$as_save_IFS
3954 
3955   ;;
3956 esac
3957 fi
3958 CAT=$ac_cv_path_CAT
3959 if test -n "$CAT"; then
3960   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
3961 $as_echo "$CAT" >&6; }
3962 else
3963   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3964 $as_echo "no" >&6; }
3965 fi
3966 
3967 
3968   test -n "$CAT" && break
3969 done
3970 
3971 
3972     if test "x$CAT" = x; then
3973         if test "xcat" = x; then
3974           PROG_NAME=cat
3975         else
3976           PROG_NAME=cat
3977         fi
3978         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
3979 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
3980         as_fn_error $? "Cannot continue" "$LINENO" 5
3981     fi
3982 
3983 
3984 
3985     for ac_prog in chmod
3986 do
3987   # Extract the first word of "$ac_prog", so it can be a program name with args.
3988 set dummy $ac_prog; ac_word=$2
3989 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3990 $as_echo_n "checking for $ac_word... " >&6; }
3991 if test "${ac_cv_path_CHMOD+set}" = set; then :
3992   $as_echo_n "(cached) " >&6
3993 else
3994   case $CHMOD in
3995   [\\/]* | ?:[\\/]*)
3996   ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
3997   ;;
3998   *)
3999   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4000 for as_dir in $PATH
4001 do
4002   IFS=$as_save_IFS
4003   test -z "$as_dir" && as_dir=.
4004     for ac_exec_ext in '' $ac_executable_extensions; do
4005   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4006     ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
4007     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4008     break 2
4009   fi
4010 done
4011   done
4012 IFS=$as_save_IFS
4013 
4014   ;;
4015 esac
4016 fi
4017 CHMOD=$ac_cv_path_CHMOD
4018 if test -n "$CHMOD"; then
4019   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
4020 $as_echo "$CHMOD" >&6; }
4021 else
4022   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4023 $as_echo "no" >&6; }
4024 fi
4025 
4026 
4027   test -n "$CHMOD" && break
4028 done
4029 
4030 
4031     if test "x$CHMOD" = x; then
4032         if test "xchmod" = x; then
4033           PROG_NAME=chmod
4034         else
4035           PROG_NAME=chmod
4036         fi
4037         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4038 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4039         as_fn_error $? "Cannot continue" "$LINENO" 5
4040     fi
4041 
4042 
4043 
4044     for ac_prog in cmp
4045 do
4046   # Extract the first word of "$ac_prog", so it can be a program name with args.
4047 set dummy $ac_prog; ac_word=$2
4048 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4049 $as_echo_n "checking for $ac_word... " >&6; }
4050 if test "${ac_cv_path_CMP+set}" = set; then :
4051   $as_echo_n "(cached) " >&6
4052 else
4053   case $CMP in
4054   [\\/]* | ?:[\\/]*)
4055   ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
4056   ;;
4057   *)
4058   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4059 for as_dir in $PATH
4060 do
4061   IFS=$as_save_IFS
4062   test -z "$as_dir" && as_dir=.
4063     for ac_exec_ext in '' $ac_executable_extensions; do
4064   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4065     ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
4066     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4067     break 2
4068   fi
4069 done
4070   done
4071 IFS=$as_save_IFS
4072 
4073   ;;
4074 esac
4075 fi
4076 CMP=$ac_cv_path_CMP
4077 if test -n "$CMP"; then
4078   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
4079 $as_echo "$CMP" >&6; }
4080 else
4081   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4082 $as_echo "no" >&6; }
4083 fi
4084 
4085 
4086   test -n "$CMP" && break
4087 done
4088 
4089 
4090     if test "x$CMP" = x; then
4091         if test "xcmp" = x; then
4092           PROG_NAME=cmp
4093         else
4094           PROG_NAME=cmp
4095         fi
4096         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4097 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4098         as_fn_error $? "Cannot continue" "$LINENO" 5
4099     fi
4100 
4101 
4102 
4103     for ac_prog in comm
4104 do
4105   # Extract the first word of "$ac_prog", so it can be a program name with args.
4106 set dummy $ac_prog; ac_word=$2
4107 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4108 $as_echo_n "checking for $ac_word... " >&6; }
4109 if test "${ac_cv_path_COMM+set}" = set; then :
4110   $as_echo_n "(cached) " >&6
4111 else
4112   case $COMM in
4113   [\\/]* | ?:[\\/]*)
4114   ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
4115   ;;
4116   *)
4117   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4118 for as_dir in $PATH
4119 do
4120   IFS=$as_save_IFS
4121   test -z "$as_dir" && as_dir=.
4122     for ac_exec_ext in '' $ac_executable_extensions; do
4123   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4124     ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
4125     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4126     break 2
4127   fi
4128 done
4129   done
4130 IFS=$as_save_IFS
4131 
4132   ;;
4133 esac
4134 fi
4135 COMM=$ac_cv_path_COMM
4136 if test -n "$COMM"; then
4137   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
4138 $as_echo "$COMM" >&6; }
4139 else
4140   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4141 $as_echo "no" >&6; }
4142 fi
4143 
4144 
4145   test -n "$COMM" && break
4146 done
4147 
4148 
4149     if test "x$COMM" = x; then
4150         if test "xcomm" = x; then
4151           PROG_NAME=comm
4152         else
4153           PROG_NAME=comm
4154         fi
4155         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4156 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4157         as_fn_error $? "Cannot continue" "$LINENO" 5
4158     fi
4159 
4160 
4161 
4162     for ac_prog in cp
4163 do
4164   # Extract the first word of "$ac_prog", so it can be a program name with args.
4165 set dummy $ac_prog; ac_word=$2
4166 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4167 $as_echo_n "checking for $ac_word... " >&6; }
4168 if test "${ac_cv_path_CP+set}" = set; then :
4169   $as_echo_n "(cached) " >&6
4170 else
4171   case $CP in
4172   [\\/]* | ?:[\\/]*)
4173   ac_cv_path_CP="$CP" # Let the user override the test with a path.
4174   ;;
4175   *)
4176   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4177 for as_dir in $PATH
4178 do
4179   IFS=$as_save_IFS
4180   test -z "$as_dir" && as_dir=.
4181     for ac_exec_ext in '' $ac_executable_extensions; do
4182   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4183     ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
4184     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4185     break 2
4186   fi
4187 done
4188   done
4189 IFS=$as_save_IFS
4190 
4191   ;;
4192 esac
4193 fi
4194 CP=$ac_cv_path_CP
4195 if test -n "$CP"; then
4196   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
4197 $as_echo "$CP" >&6; }
4198 else
4199   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4200 $as_echo "no" >&6; }
4201 fi
4202 
4203 
4204   test -n "$CP" && break
4205 done
4206 
4207 
4208     if test "x$CP" = x; then
4209         if test "xcp" = x; then
4210           PROG_NAME=cp
4211         else
4212           PROG_NAME=cp
4213         fi
4214         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4215 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4216         as_fn_error $? "Cannot continue" "$LINENO" 5
4217     fi
4218 
4219 
4220 
4221     for ac_prog in cpio
4222 do
4223   # Extract the first word of "$ac_prog", so it can be a program name with args.
4224 set dummy $ac_prog; ac_word=$2
4225 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4226 $as_echo_n "checking for $ac_word... " >&6; }
4227 if test "${ac_cv_path_CPIO+set}" = set; then :
4228   $as_echo_n "(cached) " >&6
4229 else
4230   case $CPIO in
4231   [\\/]* | ?:[\\/]*)
4232   ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
4233   ;;
4234   *)
4235   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4236 for as_dir in $PATH
4237 do
4238   IFS=$as_save_IFS
4239   test -z "$as_dir" && as_dir=.
4240     for ac_exec_ext in '' $ac_executable_extensions; do
4241   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4242     ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
4243     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4244     break 2
4245   fi
4246 done
4247   done
4248 IFS=$as_save_IFS
4249 
4250   ;;
4251 esac
4252 fi
4253 CPIO=$ac_cv_path_CPIO
4254 if test -n "$CPIO"; then
4255   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
4256 $as_echo "$CPIO" >&6; }
4257 else
4258   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4259 $as_echo "no" >&6; }
4260 fi
4261 
4262 
4263   test -n "$CPIO" && break
4264 done
4265 
4266 
4267     if test "x$CPIO" = x; then
4268         if test "xcpio" = x; then
4269           PROG_NAME=cpio
4270         else
4271           PROG_NAME=cpio
4272         fi
4273         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4274 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4275         as_fn_error $? "Cannot continue" "$LINENO" 5
4276     fi
4277 
4278 
4279 
4280     for ac_prog in cut
4281 do
4282   # Extract the first word of "$ac_prog", so it can be a program name with args.
4283 set dummy $ac_prog; ac_word=$2
4284 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4285 $as_echo_n "checking for $ac_word... " >&6; }
4286 if test "${ac_cv_path_CUT+set}" = set; then :
4287   $as_echo_n "(cached) " >&6
4288 else
4289   case $CUT in
4290   [\\/]* | ?:[\\/]*)
4291   ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
4292   ;;
4293   *)
4294   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4295 for as_dir in $PATH
4296 do
4297   IFS=$as_save_IFS
4298   test -z "$as_dir" && as_dir=.
4299     for ac_exec_ext in '' $ac_executable_extensions; do
4300   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4301     ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
4302     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4303     break 2
4304   fi
4305 done
4306   done
4307 IFS=$as_save_IFS
4308 
4309   ;;
4310 esac
4311 fi
4312 CUT=$ac_cv_path_CUT
4313 if test -n "$CUT"; then
4314   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
4315 $as_echo "$CUT" >&6; }
4316 else
4317   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4318 $as_echo "no" >&6; }
4319 fi
4320 
4321 
4322   test -n "$CUT" && break
4323 done
4324 
4325 
4326     if test "x$CUT" = x; then
4327         if test "xcut" = x; then
4328           PROG_NAME=cut
4329         else
4330           PROG_NAME=cut
4331         fi
4332         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4333 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4334         as_fn_error $? "Cannot continue" "$LINENO" 5
4335     fi
4336 
4337 
4338 
4339     for ac_prog in date
4340 do
4341   # Extract the first word of "$ac_prog", so it can be a program name with args.
4342 set dummy $ac_prog; ac_word=$2
4343 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4344 $as_echo_n "checking for $ac_word... " >&6; }
4345 if test "${ac_cv_path_DATE+set}" = set; then :
4346   $as_echo_n "(cached) " >&6
4347 else
4348   case $DATE in
4349   [\\/]* | ?:[\\/]*)
4350   ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
4351   ;;
4352   *)
4353   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4354 for as_dir in $PATH
4355 do
4356   IFS=$as_save_IFS
4357   test -z "$as_dir" && as_dir=.
4358     for ac_exec_ext in '' $ac_executable_extensions; do
4359   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4360     ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
4361     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4362     break 2
4363   fi
4364 done
4365   done
4366 IFS=$as_save_IFS
4367 
4368   ;;
4369 esac
4370 fi
4371 DATE=$ac_cv_path_DATE
4372 if test -n "$DATE"; then
4373   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
4374 $as_echo "$DATE" >&6; }
4375 else
4376   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4377 $as_echo "no" >&6; }
4378 fi
4379 
4380 
4381   test -n "$DATE" && break
4382 done
4383 
4384 
4385     if test "x$DATE" = x; then
4386         if test "xdate" = x; then
4387           PROG_NAME=date
4388         else
4389           PROG_NAME=date
4390         fi
4391         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4392 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4393         as_fn_error $? "Cannot continue" "$LINENO" 5
4394     fi
4395 
4396 
4397 
4398     for ac_prog in gdiff diff
4399 do
4400   # Extract the first word of "$ac_prog", so it can be a program name with args.
4401 set dummy $ac_prog; ac_word=$2
4402 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4403 $as_echo_n "checking for $ac_word... " >&6; }
4404 if test "${ac_cv_path_DIFF+set}" = set; then :
4405   $as_echo_n "(cached) " >&6
4406 else
4407   case $DIFF in
4408   [\\/]* | ?:[\\/]*)
4409   ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
4410   ;;
4411   *)
4412   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4413 for as_dir in $PATH
4414 do
4415   IFS=$as_save_IFS
4416   test -z "$as_dir" && as_dir=.
4417     for ac_exec_ext in '' $ac_executable_extensions; do
4418   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4419     ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
4420     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4421     break 2
4422   fi
4423 done
4424   done
4425 IFS=$as_save_IFS
4426 
4427   ;;
4428 esac
4429 fi
4430 DIFF=$ac_cv_path_DIFF
4431 if test -n "$DIFF"; then
4432   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
4433 $as_echo "$DIFF" >&6; }
4434 else
4435   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4436 $as_echo "no" >&6; }
4437 fi
4438 
4439 
4440   test -n "$DIFF" && break
4441 done
4442 
4443 
4444     if test "x$DIFF" = x; then
4445         if test "xgdiff diff" = x; then
4446           PROG_NAME=diff
4447         else
4448           PROG_NAME=gdiff diff
4449         fi
4450         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4451 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4452         as_fn_error $? "Cannot continue" "$LINENO" 5
4453     fi
4454 
4455 
4456 
4457     for ac_prog in dirname
4458 do
4459   # Extract the first word of "$ac_prog", so it can be a program name with args.
4460 set dummy $ac_prog; ac_word=$2
4461 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4462 $as_echo_n "checking for $ac_word... " >&6; }
4463 if test "${ac_cv_path_DIRNAME+set}" = set; then :
4464   $as_echo_n "(cached) " >&6
4465 else
4466   case $DIRNAME in
4467   [\\/]* | ?:[\\/]*)
4468   ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
4469   ;;
4470   *)
4471   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4472 for as_dir in $PATH
4473 do
4474   IFS=$as_save_IFS
4475   test -z "$as_dir" && as_dir=.
4476     for ac_exec_ext in '' $ac_executable_extensions; do
4477   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4478     ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
4479     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4480     break 2
4481   fi
4482 done
4483   done
4484 IFS=$as_save_IFS
4485 
4486   ;;
4487 esac
4488 fi
4489 DIRNAME=$ac_cv_path_DIRNAME
4490 if test -n "$DIRNAME"; then
4491   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
4492 $as_echo "$DIRNAME" >&6; }
4493 else
4494   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4495 $as_echo "no" >&6; }
4496 fi
4497 
4498 
4499   test -n "$DIRNAME" && break
4500 done
4501 
4502 
4503     if test "x$DIRNAME" = x; then
4504         if test "xdirname" = x; then
4505           PROG_NAME=dirname
4506         else
4507           PROG_NAME=dirname
4508         fi
4509         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4510 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4511         as_fn_error $? "Cannot continue" "$LINENO" 5
4512     fi
4513 
4514 
4515 
4516     for ac_prog in echo
4517 do
4518   # Extract the first word of "$ac_prog", so it can be a program name with args.
4519 set dummy $ac_prog; ac_word=$2
4520 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4521 $as_echo_n "checking for $ac_word... " >&6; }
4522 if test "${ac_cv_path_ECHO+set}" = set; then :
4523   $as_echo_n "(cached) " >&6
4524 else
4525   case $ECHO in
4526   [\\/]* | ?:[\\/]*)
4527   ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
4528   ;;
4529   *)
4530   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4531 for as_dir in $PATH
4532 do
4533   IFS=$as_save_IFS
4534   test -z "$as_dir" && as_dir=.
4535     for ac_exec_ext in '' $ac_executable_extensions; do
4536   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4537     ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
4538     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4539     break 2
4540   fi
4541 done
4542   done
4543 IFS=$as_save_IFS
4544 
4545   ;;
4546 esac
4547 fi
4548 ECHO=$ac_cv_path_ECHO
4549 if test -n "$ECHO"; then
4550   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
4551 $as_echo "$ECHO" >&6; }
4552 else
4553   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4554 $as_echo "no" >&6; }
4555 fi
4556 
4557 
4558   test -n "$ECHO" && break
4559 done
4560 
4561 
4562     if test "x$ECHO" = x; then
4563         if test "xecho" = x; then
4564           PROG_NAME=echo
4565         else
4566           PROG_NAME=echo
4567         fi
4568         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4569 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4570         as_fn_error $? "Cannot continue" "$LINENO" 5
4571     fi
4572 
4573 
4574 
4575     for ac_prog in expr
4576 do
4577   # Extract the first word of "$ac_prog", so it can be a program name with args.
4578 set dummy $ac_prog; ac_word=$2
4579 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4580 $as_echo_n "checking for $ac_word... " >&6; }
4581 if test "${ac_cv_path_EXPR+set}" = set; then :
4582   $as_echo_n "(cached) " >&6
4583 else
4584   case $EXPR in
4585   [\\/]* | ?:[\\/]*)
4586   ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
4587   ;;
4588   *)
4589   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4590 for as_dir in $PATH
4591 do
4592   IFS=$as_save_IFS
4593   test -z "$as_dir" && as_dir=.
4594     for ac_exec_ext in '' $ac_executable_extensions; do
4595   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4596     ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
4597     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4598     break 2
4599   fi
4600 done
4601   done
4602 IFS=$as_save_IFS
4603 
4604   ;;
4605 esac
4606 fi
4607 EXPR=$ac_cv_path_EXPR
4608 if test -n "$EXPR"; then
4609   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
4610 $as_echo "$EXPR" >&6; }
4611 else
4612   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4613 $as_echo "no" >&6; }
4614 fi
4615 
4616 
4617   test -n "$EXPR" && break
4618 done
4619 
4620 
4621     if test "x$EXPR" = x; then
4622         if test "xexpr" = x; then
4623           PROG_NAME=expr
4624         else
4625           PROG_NAME=expr
4626         fi
4627         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4628 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4629         as_fn_error $? "Cannot continue" "$LINENO" 5
4630     fi
4631 
4632 
4633 
4634     for ac_prog in file
4635 do
4636   # Extract the first word of "$ac_prog", so it can be a program name with args.
4637 set dummy $ac_prog; ac_word=$2
4638 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4639 $as_echo_n "checking for $ac_word... " >&6; }
4640 if test "${ac_cv_path_FILE+set}" = set; then :
4641   $as_echo_n "(cached) " >&6
4642 else
4643   case $FILE in
4644   [\\/]* | ?:[\\/]*)
4645   ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
4646   ;;
4647   *)
4648   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4649 for as_dir in $PATH
4650 do
4651   IFS=$as_save_IFS
4652   test -z "$as_dir" && as_dir=.
4653     for ac_exec_ext in '' $ac_executable_extensions; do
4654   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4655     ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
4656     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4657     break 2
4658   fi
4659 done
4660   done
4661 IFS=$as_save_IFS
4662 
4663   ;;
4664 esac
4665 fi
4666 FILE=$ac_cv_path_FILE
4667 if test -n "$FILE"; then
4668   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
4669 $as_echo "$FILE" >&6; }
4670 else
4671   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4672 $as_echo "no" >&6; }
4673 fi
4674 
4675 
4676   test -n "$FILE" && break
4677 done
4678 
4679 
4680     if test "x$FILE" = x; then
4681         if test "xfile" = x; then
4682           PROG_NAME=file
4683         else
4684           PROG_NAME=file
4685         fi
4686         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4687 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4688         as_fn_error $? "Cannot continue" "$LINENO" 5
4689     fi
4690 
4691 
4692 
4693     for ac_prog in find
4694 do
4695   # Extract the first word of "$ac_prog", so it can be a program name with args.
4696 set dummy $ac_prog; ac_word=$2
4697 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4698 $as_echo_n "checking for $ac_word... " >&6; }
4699 if test "${ac_cv_path_FIND+set}" = set; then :
4700   $as_echo_n "(cached) " >&6
4701 else
4702   case $FIND in
4703   [\\/]* | ?:[\\/]*)
4704   ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
4705   ;;
4706   *)
4707   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4708 for as_dir in $PATH
4709 do
4710   IFS=$as_save_IFS
4711   test -z "$as_dir" && as_dir=.
4712     for ac_exec_ext in '' $ac_executable_extensions; do
4713   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4714     ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
4715     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4716     break 2
4717   fi
4718 done
4719   done
4720 IFS=$as_save_IFS
4721 
4722   ;;
4723 esac
4724 fi
4725 FIND=$ac_cv_path_FIND
4726 if test -n "$FIND"; then
4727   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
4728 $as_echo "$FIND" >&6; }
4729 else
4730   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4731 $as_echo "no" >&6; }
4732 fi
4733 
4734 
4735   test -n "$FIND" && break
4736 done
4737 
4738 
4739     if test "x$FIND" = x; then
4740         if test "xfind" = x; then
4741           PROG_NAME=find
4742         else
4743           PROG_NAME=find
4744         fi
4745         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4746 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4747         as_fn_error $? "Cannot continue" "$LINENO" 5
4748     fi
4749 
4750 
4751 
4752     for ac_prog in head
4753 do
4754   # Extract the first word of "$ac_prog", so it can be a program name with args.
4755 set dummy $ac_prog; ac_word=$2
4756 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4757 $as_echo_n "checking for $ac_word... " >&6; }
4758 if test "${ac_cv_path_HEAD+set}" = set; then :
4759   $as_echo_n "(cached) " >&6
4760 else
4761   case $HEAD in
4762   [\\/]* | ?:[\\/]*)
4763   ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
4764   ;;
4765   *)
4766   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4767 for as_dir in $PATH
4768 do
4769   IFS=$as_save_IFS
4770   test -z "$as_dir" && as_dir=.
4771     for ac_exec_ext in '' $ac_executable_extensions; do
4772   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4773     ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
4774     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4775     break 2
4776   fi
4777 done
4778   done
4779 IFS=$as_save_IFS
4780 
4781   ;;
4782 esac
4783 fi
4784 HEAD=$ac_cv_path_HEAD
4785 if test -n "$HEAD"; then
4786   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
4787 $as_echo "$HEAD" >&6; }
4788 else
4789   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4790 $as_echo "no" >&6; }
4791 fi
4792 
4793 
4794   test -n "$HEAD" && break
4795 done
4796 
4797 
4798     if test "x$HEAD" = x; then
4799         if test "xhead" = x; then
4800           PROG_NAME=head
4801         else
4802           PROG_NAME=head
4803         fi
4804         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4805 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4806         as_fn_error $? "Cannot continue" "$LINENO" 5
4807     fi
4808 
4809 
4810 
4811     for ac_prog in ln
4812 do
4813   # Extract the first word of "$ac_prog", so it can be a program name with args.
4814 set dummy $ac_prog; ac_word=$2
4815 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4816 $as_echo_n "checking for $ac_word... " >&6; }
4817 if test "${ac_cv_path_LN+set}" = set; then :
4818   $as_echo_n "(cached) " >&6
4819 else
4820   case $LN in
4821   [\\/]* | ?:[\\/]*)
4822   ac_cv_path_LN="$LN" # Let the user override the test with a path.
4823   ;;
4824   *)
4825   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4826 for as_dir in $PATH
4827 do
4828   IFS=$as_save_IFS
4829   test -z "$as_dir" && as_dir=.
4830     for ac_exec_ext in '' $ac_executable_extensions; do
4831   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4832     ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
4833     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4834     break 2
4835   fi
4836 done
4837   done
4838 IFS=$as_save_IFS
4839 
4840   ;;
4841 esac
4842 fi
4843 LN=$ac_cv_path_LN
4844 if test -n "$LN"; then
4845   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
4846 $as_echo "$LN" >&6; }
4847 else
4848   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4849 $as_echo "no" >&6; }
4850 fi
4851 
4852 
4853   test -n "$LN" && break
4854 done
4855 
4856 
4857     if test "x$LN" = x; then
4858         if test "xln" = x; then
4859           PROG_NAME=ln
4860         else
4861           PROG_NAME=ln
4862         fi
4863         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4864 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4865         as_fn_error $? "Cannot continue" "$LINENO" 5
4866     fi
4867 
4868 
4869 
4870     for ac_prog in ls
4871 do
4872   # Extract the first word of "$ac_prog", so it can be a program name with args.
4873 set dummy $ac_prog; ac_word=$2
4874 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4875 $as_echo_n "checking for $ac_word... " >&6; }
4876 if test "${ac_cv_path_LS+set}" = set; then :
4877   $as_echo_n "(cached) " >&6
4878 else
4879   case $LS in
4880   [\\/]* | ?:[\\/]*)
4881   ac_cv_path_LS="$LS" # Let the user override the test with a path.
4882   ;;
4883   *)
4884   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4885 for as_dir in $PATH
4886 do
4887   IFS=$as_save_IFS
4888   test -z "$as_dir" && as_dir=.
4889     for ac_exec_ext in '' $ac_executable_extensions; do
4890   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4891     ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
4892     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4893     break 2
4894   fi
4895 done
4896   done
4897 IFS=$as_save_IFS
4898 
4899   ;;
4900 esac
4901 fi
4902 LS=$ac_cv_path_LS
4903 if test -n "$LS"; then
4904   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
4905 $as_echo "$LS" >&6; }
4906 else
4907   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4908 $as_echo "no" >&6; }
4909 fi
4910 
4911 
4912   test -n "$LS" && break
4913 done
4914 
4915 
4916     if test "x$LS" = x; then
4917         if test "xls" = x; then
4918           PROG_NAME=ls
4919         else
4920           PROG_NAME=ls
4921         fi
4922         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4923 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4924         as_fn_error $? "Cannot continue" "$LINENO" 5
4925     fi
4926 
4927 
4928 
4929     for ac_prog in mkdir
4930 do
4931   # Extract the first word of "$ac_prog", so it can be a program name with args.
4932 set dummy $ac_prog; ac_word=$2
4933 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4934 $as_echo_n "checking for $ac_word... " >&6; }
4935 if test "${ac_cv_path_MKDIR+set}" = set; then :
4936   $as_echo_n "(cached) " >&6
4937 else
4938   case $MKDIR in
4939   [\\/]* | ?:[\\/]*)
4940   ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
4941   ;;
4942   *)
4943   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4944 for as_dir in $PATH
4945 do
4946   IFS=$as_save_IFS
4947   test -z "$as_dir" && as_dir=.
4948     for ac_exec_ext in '' $ac_executable_extensions; do
4949   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4950     ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
4951     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4952     break 2
4953   fi
4954 done
4955   done
4956 IFS=$as_save_IFS
4957 
4958   ;;
4959 esac
4960 fi
4961 MKDIR=$ac_cv_path_MKDIR
4962 if test -n "$MKDIR"; then
4963   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
4964 $as_echo "$MKDIR" >&6; }
4965 else
4966   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4967 $as_echo "no" >&6; }
4968 fi
4969 
4970 
4971   test -n "$MKDIR" && break
4972 done
4973 
4974 
4975     if test "x$MKDIR" = x; then
4976         if test "xmkdir" = x; then
4977           PROG_NAME=mkdir
4978         else
4979           PROG_NAME=mkdir
4980         fi
4981         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4982 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4983         as_fn_error $? "Cannot continue" "$LINENO" 5
4984     fi
4985 
4986 
4987 
4988     for ac_prog in mktemp
4989 do
4990   # Extract the first word of "$ac_prog", so it can be a program name with args.
4991 set dummy $ac_prog; ac_word=$2
4992 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4993 $as_echo_n "checking for $ac_word... " >&6; }
4994 if test "${ac_cv_path_MKTEMP+set}" = set; then :
4995   $as_echo_n "(cached) " >&6
4996 else
4997   case $MKTEMP in
4998   [\\/]* | ?:[\\/]*)
4999   ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
5000   ;;
5001   *)
5002   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5003 for as_dir in $PATH
5004 do
5005   IFS=$as_save_IFS
5006   test -z "$as_dir" && as_dir=.
5007     for ac_exec_ext in '' $ac_executable_extensions; do
5008   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5009     ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
5010     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5011     break 2
5012   fi
5013 done
5014   done
5015 IFS=$as_save_IFS
5016 
5017   ;;
5018 esac
5019 fi
5020 MKTEMP=$ac_cv_path_MKTEMP
5021 if test -n "$MKTEMP"; then
5022   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
5023 $as_echo "$MKTEMP" >&6; }
5024 else
5025   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5026 $as_echo "no" >&6; }
5027 fi
5028 
5029 
5030   test -n "$MKTEMP" && break
5031 done
5032 
5033 
5034     if test "x$MKTEMP" = x; then
5035         if test "xmktemp" = x; then
5036           PROG_NAME=mktemp
5037         else
5038           PROG_NAME=mktemp
5039         fi
5040         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5041 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5042         as_fn_error $? "Cannot continue" "$LINENO" 5
5043     fi
5044 
5045 
5046 
5047     for ac_prog in mv
5048 do
5049   # Extract the first word of "$ac_prog", so it can be a program name with args.
5050 set dummy $ac_prog; ac_word=$2
5051 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5052 $as_echo_n "checking for $ac_word... " >&6; }
5053 if test "${ac_cv_path_MV+set}" = set; then :
5054   $as_echo_n "(cached) " >&6
5055 else
5056   case $MV in
5057   [\\/]* | ?:[\\/]*)
5058   ac_cv_path_MV="$MV" # Let the user override the test with a path.
5059   ;;
5060   *)
5061   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5062 for as_dir in $PATH
5063 do
5064   IFS=$as_save_IFS
5065   test -z "$as_dir" && as_dir=.
5066     for ac_exec_ext in '' $ac_executable_extensions; do
5067   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5068     ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
5069     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5070     break 2
5071   fi
5072 done
5073   done
5074 IFS=$as_save_IFS
5075 
5076   ;;
5077 esac
5078 fi
5079 MV=$ac_cv_path_MV
5080 if test -n "$MV"; then
5081   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
5082 $as_echo "$MV" >&6; }
5083 else
5084   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5085 $as_echo "no" >&6; }
5086 fi
5087 
5088 
5089   test -n "$MV" && break
5090 done
5091 
5092 
5093     if test "x$MV" = x; then
5094         if test "xmv" = x; then
5095           PROG_NAME=mv
5096         else
5097           PROG_NAME=mv
5098         fi
5099         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5100 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5101         as_fn_error $? "Cannot continue" "$LINENO" 5
5102     fi
5103 
5104 
5105 
5106     for ac_prog in printf
5107 do
5108   # Extract the first word of "$ac_prog", so it can be a program name with args.
5109 set dummy $ac_prog; ac_word=$2
5110 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5111 $as_echo_n "checking for $ac_word... " >&6; }
5112 if test "${ac_cv_path_PRINTF+set}" = set; then :
5113   $as_echo_n "(cached) " >&6
5114 else
5115   case $PRINTF in
5116   [\\/]* | ?:[\\/]*)
5117   ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
5118   ;;
5119   *)
5120   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5121 for as_dir in $PATH
5122 do
5123   IFS=$as_save_IFS
5124   test -z "$as_dir" && as_dir=.
5125     for ac_exec_ext in '' $ac_executable_extensions; do
5126   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5127     ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
5128     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5129     break 2
5130   fi
5131 done
5132   done
5133 IFS=$as_save_IFS
5134 
5135   ;;
5136 esac
5137 fi
5138 PRINTF=$ac_cv_path_PRINTF
5139 if test -n "$PRINTF"; then
5140   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
5141 $as_echo "$PRINTF" >&6; }
5142 else
5143   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5144 $as_echo "no" >&6; }
5145 fi
5146 
5147 
5148   test -n "$PRINTF" && break
5149 done
5150 
5151 
5152     if test "x$PRINTF" = x; then
5153         if test "xprintf" = x; then
5154           PROG_NAME=printf
5155         else
5156           PROG_NAME=printf
5157         fi
5158         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5159 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5160         as_fn_error $? "Cannot continue" "$LINENO" 5
5161     fi
5162 
5163 
5164 
5165     for ac_prog in pwd
5166 do
5167   # Extract the first word of "$ac_prog", so it can be a program name with args.
5168 set dummy $ac_prog; ac_word=$2
5169 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5170 $as_echo_n "checking for $ac_word... " >&6; }
5171 if test "${ac_cv_path_THEPWDCMD+set}" = set; then :
5172   $as_echo_n "(cached) " >&6
5173 else
5174   case $THEPWDCMD in
5175   [\\/]* | ?:[\\/]*)
5176   ac_cv_path_THEPWDCMD="$THEPWDCMD" # Let the user override the test with a path.
5177   ;;
5178   *)
5179   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5180 for as_dir in $PATH
5181 do
5182   IFS=$as_save_IFS
5183   test -z "$as_dir" && as_dir=.
5184     for ac_exec_ext in '' $ac_executable_extensions; do
5185   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5186     ac_cv_path_THEPWDCMD="$as_dir/$ac_word$ac_exec_ext"
5187     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5188     break 2
5189   fi
5190 done
5191   done
5192 IFS=$as_save_IFS
5193 
5194   ;;
5195 esac
5196 fi
5197 THEPWDCMD=$ac_cv_path_THEPWDCMD
5198 if test -n "$THEPWDCMD"; then
5199   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $THEPWDCMD" >&5
5200 $as_echo "$THEPWDCMD" >&6; }
5201 else
5202   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5203 $as_echo "no" >&6; }
5204 fi
5205 
5206 
5207   test -n "$THEPWDCMD" && break
5208 done
5209 
5210 
5211     if test "x$THEPWDCMD" = x; then
5212         if test "xpwd" = x; then
5213           PROG_NAME=thepwdcmd
5214         else
5215           PROG_NAME=pwd
5216         fi
5217         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5218 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5219         as_fn_error $? "Cannot continue" "$LINENO" 5
5220     fi
5221 
5222 
5223 
5224     for ac_prog in rm
5225 do
5226   # Extract the first word of "$ac_prog", so it can be a program name with args.
5227 set dummy $ac_prog; ac_word=$2
5228 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5229 $as_echo_n "checking for $ac_word... " >&6; }
5230 if test "${ac_cv_path_RM+set}" = set; then :
5231   $as_echo_n "(cached) " >&6
5232 else
5233   case $RM in
5234   [\\/]* | ?:[\\/]*)
5235   ac_cv_path_RM="$RM" # Let the user override the test with a path.
5236   ;;
5237   *)
5238   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5239 for as_dir in $PATH
5240 do
5241   IFS=$as_save_IFS
5242   test -z "$as_dir" && as_dir=.
5243     for ac_exec_ext in '' $ac_executable_extensions; do
5244   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5245     ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
5246     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5247     break 2
5248   fi
5249 done
5250   done
5251 IFS=$as_save_IFS
5252 
5253   ;;
5254 esac
5255 fi
5256 RM=$ac_cv_path_RM
5257 if test -n "$RM"; then
5258   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
5259 $as_echo "$RM" >&6; }
5260 else
5261   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5262 $as_echo "no" >&6; }
5263 fi
5264 
5265 
5266   test -n "$RM" && break
5267 done
5268 
5269 
5270     if test "x$RM" = x; then
5271         if test "xrm" = x; then
5272           PROG_NAME=rm
5273         else
5274           PROG_NAME=rm
5275         fi
5276         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5277 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5278         as_fn_error $? "Cannot continue" "$LINENO" 5
5279     fi
5280 
5281 
5282 
5283     for ac_prog in sh
5284 do
5285   # Extract the first word of "$ac_prog", so it can be a program name with args.
5286 set dummy $ac_prog; ac_word=$2
5287 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5288 $as_echo_n "checking for $ac_word... " >&6; }
5289 if test "${ac_cv_path_SH+set}" = set; then :
5290   $as_echo_n "(cached) " >&6
5291 else
5292   case $SH in
5293   [\\/]* | ?:[\\/]*)
5294   ac_cv_path_SH="$SH" # Let the user override the test with a path.
5295   ;;
5296   *)
5297   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5298 for as_dir in $PATH
5299 do
5300   IFS=$as_save_IFS
5301   test -z "$as_dir" && as_dir=.
5302     for ac_exec_ext in '' $ac_executable_extensions; do
5303   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5304     ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
5305     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5306     break 2
5307   fi
5308 done
5309   done
5310 IFS=$as_save_IFS
5311 
5312   ;;
5313 esac
5314 fi
5315 SH=$ac_cv_path_SH
5316 if test -n "$SH"; then
5317   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
5318 $as_echo "$SH" >&6; }
5319 else
5320   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5321 $as_echo "no" >&6; }
5322 fi
5323 
5324 
5325   test -n "$SH" && break
5326 done
5327 
5328 
5329     if test "x$SH" = x; then
5330         if test "xsh" = x; then
5331           PROG_NAME=sh
5332         else
5333           PROG_NAME=sh
5334         fi
5335         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5336 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5337         as_fn_error $? "Cannot continue" "$LINENO" 5
5338     fi
5339 
5340 
5341 
5342     for ac_prog in sort
5343 do
5344   # Extract the first word of "$ac_prog", so it can be a program name with args.
5345 set dummy $ac_prog; ac_word=$2
5346 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5347 $as_echo_n "checking for $ac_word... " >&6; }
5348 if test "${ac_cv_path_SORT+set}" = set; then :
5349   $as_echo_n "(cached) " >&6
5350 else
5351   case $SORT in
5352   [\\/]* | ?:[\\/]*)
5353   ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
5354   ;;
5355   *)
5356   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5357 for as_dir in $PATH
5358 do
5359   IFS=$as_save_IFS
5360   test -z "$as_dir" && as_dir=.
5361     for ac_exec_ext in '' $ac_executable_extensions; do
5362   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5363     ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
5364     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5365     break 2
5366   fi
5367 done
5368   done
5369 IFS=$as_save_IFS
5370 
5371   ;;
5372 esac
5373 fi
5374 SORT=$ac_cv_path_SORT
5375 if test -n "$SORT"; then
5376   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
5377 $as_echo "$SORT" >&6; }
5378 else
5379   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5380 $as_echo "no" >&6; }
5381 fi
5382 
5383 
5384   test -n "$SORT" && break
5385 done
5386 
5387 
5388     if test "x$SORT" = x; then
5389         if test "xsort" = x; then
5390           PROG_NAME=sort
5391         else
5392           PROG_NAME=sort
5393         fi
5394         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5395 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5396         as_fn_error $? "Cannot continue" "$LINENO" 5
5397     fi
5398 
5399 
5400 
5401     for ac_prog in tail
5402 do
5403   # Extract the first word of "$ac_prog", so it can be a program name with args.
5404 set dummy $ac_prog; ac_word=$2
5405 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5406 $as_echo_n "checking for $ac_word... " >&6; }
5407 if test "${ac_cv_path_TAIL+set}" = set; then :
5408   $as_echo_n "(cached) " >&6
5409 else
5410   case $TAIL in
5411   [\\/]* | ?:[\\/]*)
5412   ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
5413   ;;
5414   *)
5415   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5416 for as_dir in $PATH
5417 do
5418   IFS=$as_save_IFS
5419   test -z "$as_dir" && as_dir=.
5420     for ac_exec_ext in '' $ac_executable_extensions; do
5421   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5422     ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
5423     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5424     break 2
5425   fi
5426 done
5427   done
5428 IFS=$as_save_IFS
5429 
5430   ;;
5431 esac
5432 fi
5433 TAIL=$ac_cv_path_TAIL
5434 if test -n "$TAIL"; then
5435   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
5436 $as_echo "$TAIL" >&6; }
5437 else
5438   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5439 $as_echo "no" >&6; }
5440 fi
5441 
5442 
5443   test -n "$TAIL" && break
5444 done
5445 
5446 
5447     if test "x$TAIL" = x; then
5448         if test "xtail" = x; then
5449           PROG_NAME=tail
5450         else
5451           PROG_NAME=tail
5452         fi
5453         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5454 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5455         as_fn_error $? "Cannot continue" "$LINENO" 5
5456     fi
5457 
5458 
5459 
5460     for ac_prog in tar
5461 do
5462   # Extract the first word of "$ac_prog", so it can be a program name with args.
5463 set dummy $ac_prog; ac_word=$2
5464 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5465 $as_echo_n "checking for $ac_word... " >&6; }
5466 if test "${ac_cv_path_TAR+set}" = set; then :
5467   $as_echo_n "(cached) " >&6
5468 else
5469   case $TAR in
5470   [\\/]* | ?:[\\/]*)
5471   ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
5472   ;;
5473   *)
5474   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5475 for as_dir in $PATH
5476 do
5477   IFS=$as_save_IFS
5478   test -z "$as_dir" && as_dir=.
5479     for ac_exec_ext in '' $ac_executable_extensions; do
5480   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5481     ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
5482     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5483     break 2
5484   fi
5485 done
5486   done
5487 IFS=$as_save_IFS
5488 
5489   ;;
5490 esac
5491 fi
5492 TAR=$ac_cv_path_TAR
5493 if test -n "$TAR"; then
5494   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
5495 $as_echo "$TAR" >&6; }
5496 else
5497   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5498 $as_echo "no" >&6; }
5499 fi
5500 
5501 
5502   test -n "$TAR" && break
5503 done
5504 
5505 
5506     if test "x$TAR" = x; then
5507         if test "xtar" = x; then
5508           PROG_NAME=tar
5509         else
5510           PROG_NAME=tar
5511         fi
5512         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5513 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5514         as_fn_error $? "Cannot continue" "$LINENO" 5
5515     fi
5516 
5517 
5518 
5519     for ac_prog in tee
5520 do
5521   # Extract the first word of "$ac_prog", so it can be a program name with args.
5522 set dummy $ac_prog; ac_word=$2
5523 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5524 $as_echo_n "checking for $ac_word... " >&6; }
5525 if test "${ac_cv_path_TEE+set}" = set; then :
5526   $as_echo_n "(cached) " >&6
5527 else
5528   case $TEE in
5529   [\\/]* | ?:[\\/]*)
5530   ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
5531   ;;
5532   *)
5533   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5534 for as_dir in $PATH
5535 do
5536   IFS=$as_save_IFS
5537   test -z "$as_dir" && as_dir=.
5538     for ac_exec_ext in '' $ac_executable_extensions; do
5539   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5540     ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
5541     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5542     break 2
5543   fi
5544 done
5545   done
5546 IFS=$as_save_IFS
5547 
5548   ;;
5549 esac
5550 fi
5551 TEE=$ac_cv_path_TEE
5552 if test -n "$TEE"; then
5553   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
5554 $as_echo "$TEE" >&6; }
5555 else
5556   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5557 $as_echo "no" >&6; }
5558 fi
5559 
5560 
5561   test -n "$TEE" && break
5562 done
5563 
5564 
5565     if test "x$TEE" = x; then
5566         if test "xtee" = x; then
5567           PROG_NAME=tee
5568         else
5569           PROG_NAME=tee
5570         fi
5571         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5572 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5573         as_fn_error $? "Cannot continue" "$LINENO" 5
5574     fi
5575 
5576 
5577 
5578     for ac_prog in touch
5579 do
5580   # Extract the first word of "$ac_prog", so it can be a program name with args.
5581 set dummy $ac_prog; ac_word=$2
5582 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5583 $as_echo_n "checking for $ac_word... " >&6; }
5584 if test "${ac_cv_path_TOUCH+set}" = set; then :
5585   $as_echo_n "(cached) " >&6
5586 else
5587   case $TOUCH in
5588   [\\/]* | ?:[\\/]*)
5589   ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
5590   ;;
5591   *)
5592   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5593 for as_dir in $PATH
5594 do
5595   IFS=$as_save_IFS
5596   test -z "$as_dir" && as_dir=.
5597     for ac_exec_ext in '' $ac_executable_extensions; do
5598   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5599     ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
5600     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5601     break 2
5602   fi
5603 done
5604   done
5605 IFS=$as_save_IFS
5606 
5607   ;;
5608 esac
5609 fi
5610 TOUCH=$ac_cv_path_TOUCH
5611 if test -n "$TOUCH"; then
5612   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
5613 $as_echo "$TOUCH" >&6; }
5614 else
5615   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5616 $as_echo "no" >&6; }
5617 fi
5618 
5619 
5620   test -n "$TOUCH" && break
5621 done
5622 
5623 
5624     if test "x$TOUCH" = x; then
5625         if test "xtouch" = x; then
5626           PROG_NAME=touch
5627         else
5628           PROG_NAME=touch
5629         fi
5630         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5631 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5632         as_fn_error $? "Cannot continue" "$LINENO" 5
5633     fi
5634 
5635 
5636 
5637     for ac_prog in tr
5638 do
5639   # Extract the first word of "$ac_prog", so it can be a program name with args.
5640 set dummy $ac_prog; ac_word=$2
5641 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5642 $as_echo_n "checking for $ac_word... " >&6; }
5643 if test "${ac_cv_path_TR+set}" = set; then :
5644   $as_echo_n "(cached) " >&6
5645 else
5646   case $TR in
5647   [\\/]* | ?:[\\/]*)
5648   ac_cv_path_TR="$TR" # Let the user override the test with a path.
5649   ;;
5650   *)
5651   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5652 for as_dir in $PATH
5653 do
5654   IFS=$as_save_IFS
5655   test -z "$as_dir" && as_dir=.
5656     for ac_exec_ext in '' $ac_executable_extensions; do
5657   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5658     ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
5659     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5660     break 2
5661   fi
5662 done
5663   done
5664 IFS=$as_save_IFS
5665 
5666   ;;
5667 esac
5668 fi
5669 TR=$ac_cv_path_TR
5670 if test -n "$TR"; then
5671   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
5672 $as_echo "$TR" >&6; }
5673 else
5674   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5675 $as_echo "no" >&6; }
5676 fi
5677 
5678 
5679   test -n "$TR" && break
5680 done
5681 
5682 
5683     if test "x$TR" = x; then
5684         if test "xtr" = x; then
5685           PROG_NAME=tr
5686         else
5687           PROG_NAME=tr
5688         fi
5689         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5690 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5691         as_fn_error $? "Cannot continue" "$LINENO" 5
5692     fi
5693 
5694 
5695 
5696     for ac_prog in uname
5697 do
5698   # Extract the first word of "$ac_prog", so it can be a program name with args.
5699 set dummy $ac_prog; ac_word=$2
5700 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5701 $as_echo_n "checking for $ac_word... " >&6; }
5702 if test "${ac_cv_path_UNAME+set}" = set; then :
5703   $as_echo_n "(cached) " >&6
5704 else
5705   case $UNAME in
5706   [\\/]* | ?:[\\/]*)
5707   ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
5708   ;;
5709   *)
5710   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5711 for as_dir in $PATH
5712 do
5713   IFS=$as_save_IFS
5714   test -z "$as_dir" && as_dir=.
5715     for ac_exec_ext in '' $ac_executable_extensions; do
5716   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5717     ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
5718     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5719     break 2
5720   fi
5721 done
5722   done
5723 IFS=$as_save_IFS
5724 
5725   ;;
5726 esac
5727 fi
5728 UNAME=$ac_cv_path_UNAME
5729 if test -n "$UNAME"; then
5730   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
5731 $as_echo "$UNAME" >&6; }
5732 else
5733   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5734 $as_echo "no" >&6; }
5735 fi
5736 
5737 
5738   test -n "$UNAME" && break
5739 done
5740 
5741 
5742     if test "x$UNAME" = x; then
5743         if test "xuname" = x; then
5744           PROG_NAME=uname
5745         else
5746           PROG_NAME=uname
5747         fi
5748         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5749 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5750         as_fn_error $? "Cannot continue" "$LINENO" 5
5751     fi
5752 
5753 
5754 
5755     for ac_prog in uniq
5756 do
5757   # Extract the first word of "$ac_prog", so it can be a program name with args.
5758 set dummy $ac_prog; ac_word=$2
5759 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5760 $as_echo_n "checking for $ac_word... " >&6; }
5761 if test "${ac_cv_path_UNIQ+set}" = set; then :
5762   $as_echo_n "(cached) " >&6
5763 else
5764   case $UNIQ in
5765   [\\/]* | ?:[\\/]*)
5766   ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
5767   ;;
5768   *)
5769   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5770 for as_dir in $PATH
5771 do
5772   IFS=$as_save_IFS
5773   test -z "$as_dir" && as_dir=.
5774     for ac_exec_ext in '' $ac_executable_extensions; do
5775   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5776     ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
5777     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5778     break 2
5779   fi
5780 done
5781   done
5782 IFS=$as_save_IFS
5783 
5784   ;;
5785 esac
5786 fi
5787 UNIQ=$ac_cv_path_UNIQ
5788 if test -n "$UNIQ"; then
5789   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
5790 $as_echo "$UNIQ" >&6; }
5791 else
5792   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5793 $as_echo "no" >&6; }
5794 fi
5795 
5796 
5797   test -n "$UNIQ" && break
5798 done
5799 
5800 
5801     if test "x$UNIQ" = x; then
5802         if test "xuniq" = x; then
5803           PROG_NAME=uniq
5804         else
5805           PROG_NAME=uniq
5806         fi
5807         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5808 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5809         as_fn_error $? "Cannot continue" "$LINENO" 5
5810     fi
5811 
5812 
5813 
5814     for ac_prog in wc
5815 do
5816   # Extract the first word of "$ac_prog", so it can be a program name with args.
5817 set dummy $ac_prog; ac_word=$2
5818 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5819 $as_echo_n "checking for $ac_word... " >&6; }
5820 if test "${ac_cv_path_WC+set}" = set; then :
5821   $as_echo_n "(cached) " >&6
5822 else
5823   case $WC in
5824   [\\/]* | ?:[\\/]*)
5825   ac_cv_path_WC="$WC" # Let the user override the test with a path.
5826   ;;
5827   *)
5828   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5829 for as_dir in $PATH
5830 do
5831   IFS=$as_save_IFS
5832   test -z "$as_dir" && as_dir=.
5833     for ac_exec_ext in '' $ac_executable_extensions; do
5834   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5835     ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
5836     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5837     break 2
5838   fi
5839 done
5840   done
5841 IFS=$as_save_IFS
5842 
5843   ;;
5844 esac
5845 fi
5846 WC=$ac_cv_path_WC
5847 if test -n "$WC"; then
5848   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
5849 $as_echo "$WC" >&6; }
5850 else
5851   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5852 $as_echo "no" >&6; }
5853 fi
5854 
5855 
5856   test -n "$WC" && break
5857 done
5858 
5859 
5860     if test "x$WC" = x; then
5861         if test "xwc" = x; then
5862           PROG_NAME=wc
5863         else
5864           PROG_NAME=wc
5865         fi
5866         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5867 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5868         as_fn_error $? "Cannot continue" "$LINENO" 5
5869     fi
5870 
5871 
5872 
5873     for ac_prog in which
5874 do
5875   # Extract the first word of "$ac_prog", so it can be a program name with args.
5876 set dummy $ac_prog; ac_word=$2
5877 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5878 $as_echo_n "checking for $ac_word... " >&6; }
5879 if test "${ac_cv_path_WHICH+set}" = set; then :
5880   $as_echo_n "(cached) " >&6
5881 else
5882   case $WHICH in
5883   [\\/]* | ?:[\\/]*)
5884   ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
5885   ;;
5886   *)
5887   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5888 for as_dir in $PATH
5889 do
5890   IFS=$as_save_IFS
5891   test -z "$as_dir" && as_dir=.
5892     for ac_exec_ext in '' $ac_executable_extensions; do
5893   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5894     ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
5895     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5896     break 2
5897   fi
5898 done
5899   done
5900 IFS=$as_save_IFS
5901 
5902   ;;
5903 esac
5904 fi
5905 WHICH=$ac_cv_path_WHICH
5906 if test -n "$WHICH"; then
5907   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
5908 $as_echo "$WHICH" >&6; }
5909 else
5910   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5911 $as_echo "no" >&6; }
5912 fi
5913 
5914 
5915   test -n "$WHICH" && break
5916 done
5917 
5918 
5919     if test "x$WHICH" = x; then
5920         if test "xwhich" = x; then
5921           PROG_NAME=which
5922         else
5923           PROG_NAME=which
5924         fi
5925         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5926 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5927         as_fn_error $? "Cannot continue" "$LINENO" 5
5928     fi
5929 
5930 
5931 
5932     for ac_prog in xargs
5933 do
5934   # Extract the first word of "$ac_prog", so it can be a program name with args.
5935 set dummy $ac_prog; ac_word=$2
5936 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5937 $as_echo_n "checking for $ac_word... " >&6; }
5938 if test "${ac_cv_path_XARGS+set}" = set; then :
5939   $as_echo_n "(cached) " >&6
5940 else
5941   case $XARGS in
5942   [\\/]* | ?:[\\/]*)
5943   ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
5944   ;;
5945   *)
5946   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5947 for as_dir in $PATH
5948 do
5949   IFS=$as_save_IFS
5950   test -z "$as_dir" && as_dir=.
5951     for ac_exec_ext in '' $ac_executable_extensions; do
5952   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5953     ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
5954     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5955     break 2
5956   fi
5957 done
5958   done
5959 IFS=$as_save_IFS
5960 
5961   ;;
5962 esac
5963 fi
5964 XARGS=$ac_cv_path_XARGS
5965 if test -n "$XARGS"; then
5966   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
5967 $as_echo "$XARGS" >&6; }
5968 else
5969   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5970 $as_echo "no" >&6; }
5971 fi
5972 
5973 
5974   test -n "$XARGS" && break
5975 done
5976 
5977 
5978     if test "x$XARGS" = x; then
5979         if test "xxargs" = x; then
5980           PROG_NAME=xargs
5981         else
5982           PROG_NAME=xargs
5983         fi
5984         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5985 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5986         as_fn_error $? "Cannot continue" "$LINENO" 5
5987     fi
5988 
5989 
5990 
5991 # Then required tools that require some special treatment.
5992 for ac_prog in gawk mawk nawk awk
5993 do
5994   # Extract the first word of "$ac_prog", so it can be a program name with args.
5995 set dummy $ac_prog; ac_word=$2
5996 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5997 $as_echo_n "checking for $ac_word... " >&6; }
5998 if test "${ac_cv_prog_AWK+set}" = set; then :
5999   $as_echo_n "(cached) " >&6
6000 else
6001   if test -n "$AWK"; then
6002   ac_cv_prog_AWK="$AWK" # Let the user override the test.
6003 else
6004 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6005 for as_dir in $PATH
6006 do
6007   IFS=$as_save_IFS
6008   test -z "$as_dir" && as_dir=.
6009     for ac_exec_ext in '' $ac_executable_extensions; do
6010   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6011     ac_cv_prog_AWK="$ac_prog"
6012     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6013     break 2
6014   fi
6015 done
6016   done
6017 IFS=$as_save_IFS
6018 
6019 fi
6020 fi
6021 AWK=$ac_cv_prog_AWK
6022 if test -n "$AWK"; then
6023   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
6024 $as_echo "$AWK" >&6; }
6025 else
6026   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6027 $as_echo "no" >&6; }
6028 fi
6029 
6030 
6031   test -n "$AWK" && break
6032 done
6033 
6034 
6035     if test "x$AWK" = x; then
6036         if test "x" = x; then
6037           PROG_NAME=awk
6038         else
6039           PROG_NAME=
6040         fi
6041         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6042 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6043         as_fn_error $? "Cannot continue" "$LINENO" 5
6044     fi
6045 
6046 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
6047 $as_echo_n "checking for grep that handles long lines and -e... " >&6; }
6048 if test "${ac_cv_path_GREP+set}" = set; then :
6049   $as_echo_n "(cached) " >&6
6050 else
6051   if test -z "$GREP"; then
6052   ac_path_GREP_found=false
6053   # Loop through the user's path and test for each of PROGNAME-LIST
6054   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6055 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
6056 do
6057   IFS=$as_save_IFS
6058   test -z "$as_dir" && as_dir=.
6059     for ac_prog in grep ggrep; do
6060     for ac_exec_ext in '' $ac_executable_extensions; do
6061       ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
6062       { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
6063 # Check for GNU ac_path_GREP and select it if it is found.
6064   # Check for GNU $ac_path_GREP
6065 case `"$ac_path_GREP" --version 2>&1` in
6066 *GNU*)
6067   ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
6068 *)
6069   ac_count=0
6070   $as_echo_n 0123456789 >"conftest.in"
6071   while :
6072   do
6073     cat "conftest.in" "conftest.in" >"conftest.tmp"
6074     mv "conftest.tmp" "conftest.in"
6075     cp "conftest.in" "conftest.nl"
6076     $as_echo 'GREP' >> "conftest.nl"
6077     "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
6078     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6079     as_fn_arith $ac_count + 1 && ac_count=$as_val
6080     if test $ac_count -gt ${ac_path_GREP_max-0}; then
6081       # Best one so far, save it but keep looking for a better one
6082       ac_cv_path_GREP="$ac_path_GREP"
6083       ac_path_GREP_max=$ac_count
6084     fi
6085     # 10*(2^10) chars as input seems more than enough
6086     test $ac_count -gt 10 && break
6087   done
6088   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6089 esac
6090 
6091       $ac_path_GREP_found && break 3
6092     done
6093   done
6094   done
6095 IFS=$as_save_IFS
6096   if test -z "$ac_cv_path_GREP"; then
6097     as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
6098   fi
6099 else
6100   ac_cv_path_GREP=$GREP
6101 fi
6102 
6103 fi
6104 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
6105 $as_echo "$ac_cv_path_GREP" >&6; }
6106  GREP="$ac_cv_path_GREP"
6107 
6108 
6109 
6110     if test "x$GREP" = x; then
6111         if test "x" = x; then
6112           PROG_NAME=grep
6113         else
6114           PROG_NAME=
6115         fi
6116         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6117 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6118         as_fn_error $? "Cannot continue" "$LINENO" 5
6119     fi
6120 
6121 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
6122 $as_echo_n "checking for egrep... " >&6; }
6123 if test "${ac_cv_path_EGREP+set}" = set; then :
6124   $as_echo_n "(cached) " >&6
6125 else
6126   if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
6127    then ac_cv_path_EGREP="$GREP -E"
6128    else
6129      if test -z "$EGREP"; then
6130   ac_path_EGREP_found=false
6131   # Loop through the user's path and test for each of PROGNAME-LIST
6132   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6133 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
6134 do
6135   IFS=$as_save_IFS
6136   test -z "$as_dir" && as_dir=.
6137     for ac_prog in egrep; do
6138     for ac_exec_ext in '' $ac_executable_extensions; do
6139       ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
6140       { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
6141 # Check for GNU ac_path_EGREP and select it if it is found.
6142   # Check for GNU $ac_path_EGREP
6143 case `"$ac_path_EGREP" --version 2>&1` in
6144 *GNU*)
6145   ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
6146 *)
6147   ac_count=0
6148   $as_echo_n 0123456789 >"conftest.in"
6149   while :
6150   do
6151     cat "conftest.in" "conftest.in" >"conftest.tmp"
6152     mv "conftest.tmp" "conftest.in"
6153     cp "conftest.in" "conftest.nl"
6154     $as_echo 'EGREP' >> "conftest.nl"
6155     "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
6156     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6157     as_fn_arith $ac_count + 1 && ac_count=$as_val
6158     if test $ac_count -gt ${ac_path_EGREP_max-0}; then
6159       # Best one so far, save it but keep looking for a better one
6160       ac_cv_path_EGREP="$ac_path_EGREP"
6161       ac_path_EGREP_max=$ac_count
6162     fi
6163     # 10*(2^10) chars as input seems more than enough
6164     test $ac_count -gt 10 && break
6165   done
6166   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6167 esac
6168 
6169       $ac_path_EGREP_found && break 3
6170     done
6171   done
6172   done
6173 IFS=$as_save_IFS
6174   if test -z "$ac_cv_path_EGREP"; then
6175     as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
6176   fi
6177 else
6178   ac_cv_path_EGREP=$EGREP
6179 fi
6180 
6181    fi
6182 fi
6183 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
6184 $as_echo "$ac_cv_path_EGREP" >&6; }
6185  EGREP="$ac_cv_path_EGREP"
6186 
6187 
6188 
6189     if test "x$EGREP" = x; then
6190         if test "x" = x; then
6191           PROG_NAME=egrep
6192         else
6193           PROG_NAME=
6194         fi
6195         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6196 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6197         as_fn_error $? "Cannot continue" "$LINENO" 5
6198     fi
6199 
6200 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
6201 $as_echo_n "checking for fgrep... " >&6; }
6202 if test "${ac_cv_path_FGREP+set}" = set; then :
6203   $as_echo_n "(cached) " >&6
6204 else
6205   if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
6206    then ac_cv_path_FGREP="$GREP -F"
6207    else
6208      if test -z "$FGREP"; then
6209   ac_path_FGREP_found=false
6210   # Loop through the user's path and test for each of PROGNAME-LIST
6211   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6212 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
6213 do
6214   IFS=$as_save_IFS
6215   test -z "$as_dir" && as_dir=.
6216     for ac_prog in fgrep; do
6217     for ac_exec_ext in '' $ac_executable_extensions; do
6218       ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
6219       { test -f "$ac_path_FGREP" && $as_test_x "$ac_path_FGREP"; } || continue
6220 # Check for GNU ac_path_FGREP and select it if it is found.
6221   # Check for GNU $ac_path_FGREP
6222 case `"$ac_path_FGREP" --version 2>&1` in
6223 *GNU*)
6224   ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
6225 *)
6226   ac_count=0
6227   $as_echo_n 0123456789 >"conftest.in"
6228   while :
6229   do
6230     cat "conftest.in" "conftest.in" >"conftest.tmp"
6231     mv "conftest.tmp" "conftest.in"
6232     cp "conftest.in" "conftest.nl"
6233     $as_echo 'FGREP' >> "conftest.nl"
6234     "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
6235     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6236     as_fn_arith $ac_count + 1 && ac_count=$as_val
6237     if test $ac_count -gt ${ac_path_FGREP_max-0}; then
6238       # Best one so far, save it but keep looking for a better one
6239       ac_cv_path_FGREP="$ac_path_FGREP"
6240       ac_path_FGREP_max=$ac_count
6241     fi
6242     # 10*(2^10) chars as input seems more than enough
6243     test $ac_count -gt 10 && break
6244   done
6245   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6246 esac
6247 
6248       $ac_path_FGREP_found && break 3
6249     done
6250   done
6251   done
6252 IFS=$as_save_IFS
6253   if test -z "$ac_cv_path_FGREP"; then
6254     as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
6255   fi
6256 else
6257   ac_cv_path_FGREP=$FGREP
6258 fi
6259 
6260    fi
6261 fi
6262 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
6263 $as_echo "$ac_cv_path_FGREP" >&6; }
6264  FGREP="$ac_cv_path_FGREP"
6265 
6266 
6267 
6268     if test "x$FGREP" = x; then
6269         if test "x" = x; then
6270           PROG_NAME=fgrep
6271         else
6272           PROG_NAME=
6273         fi
6274         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6275 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6276         as_fn_error $? "Cannot continue" "$LINENO" 5
6277     fi
6278 
6279 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
6280 $as_echo_n "checking for a sed that does not truncate output... " >&6; }
6281 if test "${ac_cv_path_SED+set}" = set; then :
6282   $as_echo_n "(cached) " >&6
6283 else
6284             ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
6285      for ac_i in 1 2 3 4 5 6 7; do
6286        ac_script="$ac_script$as_nl$ac_script"
6287      done
6288      echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
6289      { ac_script=; unset ac_script;}
6290      if test -z "$SED"; then
6291   ac_path_SED_found=false
6292   # Loop through the user's path and test for each of PROGNAME-LIST
6293   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6294 for as_dir in $PATH
6295 do
6296   IFS=$as_save_IFS
6297   test -z "$as_dir" && as_dir=.
6298     for ac_prog in sed gsed; do
6299     for ac_exec_ext in '' $ac_executable_extensions; do
6300       ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
6301       { test -f "$ac_path_SED" && $as_test_x "$ac_path_SED"; } || continue
6302 # Check for GNU ac_path_SED and select it if it is found.
6303   # Check for GNU $ac_path_SED
6304 case `"$ac_path_SED" --version 2>&1` in
6305 *GNU*)
6306   ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
6307 *)
6308   ac_count=0
6309   $as_echo_n 0123456789 >"conftest.in"
6310   while :
6311   do
6312     cat "conftest.in" "conftest.in" >"conftest.tmp"
6313     mv "conftest.tmp" "conftest.in"
6314     cp "conftest.in" "conftest.nl"
6315     $as_echo '' >> "conftest.nl"
6316     "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
6317     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6318     as_fn_arith $ac_count + 1 && ac_count=$as_val
6319     if test $ac_count -gt ${ac_path_SED_max-0}; then
6320       # Best one so far, save it but keep looking for a better one
6321       ac_cv_path_SED="$ac_path_SED"
6322       ac_path_SED_max=$ac_count
6323     fi
6324     # 10*(2^10) chars as input seems more than enough
6325     test $ac_count -gt 10 && break
6326   done
6327   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6328 esac
6329 
6330       $ac_path_SED_found && break 3
6331     done
6332   done
6333   done
6334 IFS=$as_save_IFS
6335   if test -z "$ac_cv_path_SED"; then
6336     as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
6337   fi
6338 else
6339   ac_cv_path_SED=$SED
6340 fi
6341 
6342 fi
6343 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
6344 $as_echo "$ac_cv_path_SED" >&6; }
6345  SED="$ac_cv_path_SED"
6346   rm -f conftest.sed
6347 
6348 
6349     if test "x$SED" = x; then
6350         if test "x" = x; then
6351           PROG_NAME=sed
6352         else
6353           PROG_NAME=
6354         fi
6355         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6356 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6357         as_fn_error $? "Cannot continue" "$LINENO" 5
6358     fi
6359 
6360 
6361 for ac_prog in nawk gawk awk
6362 do
6363   # Extract the first word of "$ac_prog", so it can be a program name with args.
6364 set dummy $ac_prog; ac_word=$2
6365 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6366 $as_echo_n "checking for $ac_word... " >&6; }
6367 if test "${ac_cv_path_NAWK+set}" = set; then :
6368   $as_echo_n "(cached) " >&6
6369 else
6370   case $NAWK in
6371   [\\/]* | ?:[\\/]*)
6372   ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
6373   ;;
6374   *)
6375   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6376 for as_dir in $PATH
6377 do
6378   IFS=$as_save_IFS
6379   test -z "$as_dir" && as_dir=.
6380     for ac_exec_ext in '' $ac_executable_extensions; do
6381   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6382     ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
6383     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6384     break 2
6385   fi
6386 done
6387   done
6388 IFS=$as_save_IFS
6389 
6390   ;;
6391 esac
6392 fi
6393 NAWK=$ac_cv_path_NAWK
6394 if test -n "$NAWK"; then
6395   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
6396 $as_echo "$NAWK" >&6; }
6397 else
6398   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6399 $as_echo "no" >&6; }
6400 fi
6401 
6402 
6403   test -n "$NAWK" && break
6404 done
6405 
6406 
6407     if test "x$NAWK" = x; then
6408         if test "x" = x; then
6409           PROG_NAME=nawk
6410         else
6411           PROG_NAME=
6412         fi
6413         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6414 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6415         as_fn_error $? "Cannot continue" "$LINENO" 5
6416     fi
6417 
6418 
6419 # Always force rm.
6420 RM="$RM -f"
6421 
6422 # These are not required on all platforms
6423 # Extract the first word of "cygpath", so it can be a program name with args.
6424 set dummy cygpath; ac_word=$2
6425 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6426 $as_echo_n "checking for $ac_word... " >&6; }
6427 if test "${ac_cv_path_CYGPATH+set}" = set; then :
6428   $as_echo_n "(cached) " >&6
6429 else
6430   case $CYGPATH in
6431   [\\/]* | ?:[\\/]*)
6432   ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
6433   ;;
6434   *)
6435   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6436 for as_dir in $PATH
6437 do
6438   IFS=$as_save_IFS
6439   test -z "$as_dir" && as_dir=.
6440     for ac_exec_ext in '' $ac_executable_extensions; do
6441   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6442     ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
6443     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6444     break 2
6445   fi
6446 done
6447   done
6448 IFS=$as_save_IFS
6449 
6450   ;;
6451 esac
6452 fi
6453 CYGPATH=$ac_cv_path_CYGPATH
6454 if test -n "$CYGPATH"; then
6455   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
6456 $as_echo "$CYGPATH" >&6; }
6457 else
6458   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6459 $as_echo "no" >&6; }
6460 fi
6461 
6462 
6463 # Extract the first word of "readlink", so it can be a program name with args.
6464 set dummy readlink; ac_word=$2
6465 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6466 $as_echo_n "checking for $ac_word... " >&6; }
6467 if test "${ac_cv_path_READLINK+set}" = set; then :
6468   $as_echo_n "(cached) " >&6
6469 else
6470   case $READLINK in
6471   [\\/]* | ?:[\\/]*)
6472   ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
6473   ;;
6474   *)
6475   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6476 for as_dir in $PATH
6477 do
6478   IFS=$as_save_IFS
6479   test -z "$as_dir" && as_dir=.
6480     for ac_exec_ext in '' $ac_executable_extensions; do
6481   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6482     ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
6483     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6484     break 2
6485   fi
6486 done
6487   done
6488 IFS=$as_save_IFS
6489 
6490   ;;
6491 esac
6492 fi
6493 READLINK=$ac_cv_path_READLINK
6494 if test -n "$READLINK"; then
6495   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
6496 $as_echo "$READLINK" >&6; }
6497 else
6498   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6499 $as_echo "no" >&6; }
6500 fi
6501 
6502 
6503 # Extract the first word of "df", so it can be a program name with args.
6504 set dummy df; ac_word=$2
6505 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6506 $as_echo_n "checking for $ac_word... " >&6; }
6507 if test "${ac_cv_path_DF+set}" = set; then :
6508   $as_echo_n "(cached) " >&6
6509 else
6510   case $DF in
6511   [\\/]* | ?:[\\/]*)
6512   ac_cv_path_DF="$DF" # Let the user override the test with a path.
6513   ;;
6514   *)
6515   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6516 for as_dir in $PATH
6517 do
6518   IFS=$as_save_IFS
6519   test -z "$as_dir" && as_dir=.
6520     for ac_exec_ext in '' $ac_executable_extensions; do
6521   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6522     ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
6523     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6524     break 2
6525   fi
6526 done
6527   done
6528 IFS=$as_save_IFS
6529 
6530   ;;
6531 esac
6532 fi
6533 DF=$ac_cv_path_DF
6534 if test -n "$DF"; then
6535   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
6536 $as_echo "$DF" >&6; }
6537 else
6538   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6539 $as_echo "no" >&6; }
6540 fi
6541 
6542 
6543 # Extract the first word of "SetFile", so it can be a program name with args.
6544 set dummy SetFile; ac_word=$2
6545 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6546 $as_echo_n "checking for $ac_word... " >&6; }
6547 if test "${ac_cv_path_SETFILE+set}" = set; then :
6548   $as_echo_n "(cached) " >&6
6549 else
6550   case $SETFILE in
6551   [\\/]* | ?:[\\/]*)
6552   ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
6553   ;;
6554   *)
6555   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6556 for as_dir in $PATH
6557 do
6558   IFS=$as_save_IFS
6559   test -z "$as_dir" && as_dir=.
6560     for ac_exec_ext in '' $ac_executable_extensions; do
6561   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6562     ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
6563     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6564     break 2
6565   fi
6566 done
6567   done
6568 IFS=$as_save_IFS
6569 
6570   ;;
6571 esac
6572 fi
6573 SETFILE=$ac_cv_path_SETFILE
6574 if test -n "$SETFILE"; then
6575   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
6576 $as_echo "$SETFILE" >&6; }
6577 else
6578   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6579 $as_echo "no" >&6; }
6580 fi
6581 
6582 
6583 
6584 
6585 # Now we can determine OpenJDK build and target platforms. This is required to
6586 # have early on.
6587 # Make sure we can run config.sub.
6588 $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
6589   as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
6590 
6591 { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
6592 $as_echo_n "checking build system type... " >&6; }
6593 if test "${ac_cv_build+set}" = set; then :
6594   $as_echo_n "(cached) " >&6
6595 else
6596   ac_build_alias=$build_alias
6597 test "x$ac_build_alias" = x &&
6598   ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
6599 test "x$ac_build_alias" = x &&
6600   as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
6601 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
6602   as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
6603 
6604 fi
6605 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
6606 $as_echo "$ac_cv_build" >&6; }
6607 case $ac_cv_build in
6608 *-*-*) ;;
6609 *) as_fn_error $? "invalid value of canonical build" "$LINENO" 5 ;;
6610 esac
6611 build=$ac_cv_build
6612 ac_save_IFS=$IFS; IFS='-'
6613 set x $ac_cv_build
6614 shift
6615 build_cpu=$1
6616 build_vendor=$2
6617 shift; shift
6618 # Remember, the first character of IFS is used to create $*,
6619 # except with old shells:
6620 build_os=$*
6621 IFS=$ac_save_IFS
6622 case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
6623 
6624 
6625 { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
6626 $as_echo_n "checking host system type... " >&6; }
6627 if test "${ac_cv_host+set}" = set; then :
6628   $as_echo_n "(cached) " >&6
6629 else
6630   if test "x$host_alias" = x; then
6631   ac_cv_host=$ac_cv_build
6632 else
6633   ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
6634     as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
6635 fi
6636 
6637 fi
6638 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
6639 $as_echo "$ac_cv_host" >&6; }
6640 case $ac_cv_host in
6641 *-*-*) ;;
6642 *) as_fn_error $? "invalid value of canonical host" "$LINENO" 5 ;;
6643 esac
6644 host=$ac_cv_host
6645 ac_save_IFS=$IFS; IFS='-'
6646 set x $ac_cv_host
6647 shift
6648 host_cpu=$1
6649 host_vendor=$2
6650 shift; shift
6651 # Remember, the first character of IFS is used to create $*,
6652 # except with old shells:
6653 host_os=$*
6654 IFS=$ac_save_IFS
6655 case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
6656 
6657 
6658 { $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
6659 $as_echo_n "checking target system type... " >&6; }
6660 if test "${ac_cv_target+set}" = set; then :
6661   $as_echo_n "(cached) " >&6
6662 else
6663   if test "x$target_alias" = x; then
6664   ac_cv_target=$ac_cv_host
6665 else
6666   ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
6667     as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
6668 fi
6669 
6670 fi
6671 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
6672 $as_echo "$ac_cv_target" >&6; }
6673 case $ac_cv_target in
6674 *-*-*) ;;
6675 *) as_fn_error $? "invalid value of canonical target" "$LINENO" 5 ;;
6676 esac
6677 target=$ac_cv_target
6678 ac_save_IFS=$IFS; IFS='-'
6679 set x $ac_cv_target
6680 shift
6681 target_cpu=$1
6682 target_vendor=$2
6683 shift; shift
6684 # Remember, the first character of IFS is used to create $*,
6685 # except with old shells:
6686 target_os=$*
6687 IFS=$ac_save_IFS
6688 case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
6689 
6690 
6691 # The aliases save the names the user supplied, while $host etc.
6692 # will get canonicalized.
6693 test -n "$target_alias" &&
6694   test "$program_prefix$program_suffix$program_transform_name" = \
6695     NONENONEs,x,x, &&
6696   program_prefix=${target_alias}-
6697 
6698 # Figure out the build and target systems. # Note that in autoconf terminology, "build" is obvious, but "target"
6699 # is confusing; it assumes you are cross-compiling a cross-compiler (!)  and "target" is thus the target of the
6700 # product you're building. The target of this build is called "host". Since this is confusing to most people, we
6701 # have not adopted that system, but use "target" as the platform we are building for. In some places though we need
6702 # to use the configure naming style.
6703 
6704 
6705 
6706 
6707 
6708     # Copy the autoconf trip/quadruplet verbatim to OPENJDK_TARGET_AUTOCONF_NAME
6709     # (from the autoconf "host") and OPENJDK_BUILD_AUTOCONF_NAME
6710     # Note that we might later on rewrite e.g. OPENJDK_TARGET_CPU due to reduced build,
6711     # but this will not change the value of OPENJDK_TARGET_AUTOCONF_NAME.
6712     OPENJDK_TARGET_AUTOCONF_NAME="$host"
6713     OPENJDK_BUILD_AUTOCONF_NAME="$build"
6714 
6715 
6716 
6717     # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
6718 
6719   case "$build_os" in
6720     *linux*)
6721       VAR_OS=linux
6722       VAR_OS_API=posix
6723       VAR_OS_ENV=linux
6724       ;;
6725     *solaris*)
6726       VAR_OS=solaris
6727       VAR_OS_API=posix
6728       VAR_OS_ENV=solaris
6729       ;;
6730     *darwin*)
6731       VAR_OS=macosx
6732       VAR_OS_API=posix
6733       VAR_OS_ENV=macosx
6734       ;;
6735     *bsd*)
6736       VAR_OS=bsd
6737       VAR_OS_API=posix
6738       VAR_OS_ENV=bsd
6739       ;;
6740     *cygwin*)
6741       VAR_OS=windows
6742       VAR_OS_API=winapi
6743       VAR_OS_ENV=windows.cygwin
6744       ;;
6745     *mingw*)
6746       VAR_OS=windows
6747       VAR_OS_API=winapi
6748       VAR_OS_ENV=windows.msys
6749       ;;
6750     *)
6751       as_fn_error $? "unsupported operating system $build_os" "$LINENO" 5
6752       ;;
6753   esac
6754 
6755 
6756   # First argument is the cpu name from the trip/quad
6757   case "$build_cpu" in
6758     x86_64)
6759       VAR_CPU=x86_64
6760       VAR_CPU_ARCH=x86
6761       VAR_CPU_BITS=64
6762       VAR_CPU_ENDIAN=little
6763       ;;
6764     i?86)
6765       VAR_CPU=x86
6766       VAR_CPU_ARCH=x86
6767       VAR_CPU_BITS=32
6768       VAR_CPU_ENDIAN=little
6769       ;;
6770     arm*)
6771       VAR_CPU=arm
6772       VAR_CPU_ARCH=arm
6773       VAR_CPU_BITS=32
6774       VAR_CPU_ENDIAN=little
6775       ;;
6776     powerpc)
6777       VAR_CPU=ppc
6778       VAR_CPU_ARCH=ppc
6779       VAR_CPU_BITS=32
6780       VAR_CPU_ENDIAN=big
6781        ;;
6782     powerpc64)
6783       VAR_CPU=ppc64
6784       VAR_CPU_ARCH=ppc
6785       VAR_CPU_BITS=64
6786       VAR_CPU_ENDIAN=big
6787        ;;
6788     sparc)
6789       VAR_CPU=sparc
6790       VAR_CPU_ARCH=sparc
6791       VAR_CPU_BITS=32
6792       VAR_CPU_ENDIAN=big
6793        ;;
6794     sparcv9)
6795       VAR_CPU=sparcv9
6796       VAR_CPU_ARCH=sparc
6797       VAR_CPU_BITS=64
6798       VAR_CPU_ENDIAN=big
6799        ;;
6800     *)
6801       as_fn_error $? "unsupported cpu $build_cpu" "$LINENO" 5
6802       ;;
6803   esac
6804 
6805     # ..and setup our own variables. (Do this explicitely to facilitate searching)
6806     OPENJDK_BUILD_OS="$VAR_OS"
6807     OPENJDK_BUILD_OS_API="$VAR_OS_API"
6808     OPENJDK_BUILD_OS_ENV="$VAR_OS_ENV"
6809     OPENJDK_BUILD_CPU="$VAR_CPU"
6810     OPENJDK_BUILD_CPU_ARCH="$VAR_CPU_ARCH"
6811     OPENJDK_BUILD_CPU_BITS="$VAR_CPU_BITS"
6812     OPENJDK_BUILD_CPU_ENDIAN="$VAR_CPU_ENDIAN"
6813 
6814 
6815 
6816 
6817 
6818 
6819 
6820     { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-build os-cpu" >&5
6821 $as_echo_n "checking openjdk-build os-cpu... " >&6; }
6822     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&5
6823 $as_echo "$OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&6; }
6824 
6825     # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
6826 
6827   case "$host_os" in
6828     *linux*)
6829       VAR_OS=linux
6830       VAR_OS_API=posix
6831       VAR_OS_ENV=linux
6832       ;;
6833     *solaris*)
6834       VAR_OS=solaris
6835       VAR_OS_API=posix
6836       VAR_OS_ENV=solaris
6837       ;;
6838     *darwin*)
6839       VAR_OS=macosx
6840       VAR_OS_API=posix
6841       VAR_OS_ENV=macosx
6842       ;;
6843     *bsd*)
6844       VAR_OS=bsd
6845       VAR_OS_API=posix
6846       VAR_OS_ENV=bsd
6847       ;;
6848     *cygwin*)
6849       VAR_OS=windows
6850       VAR_OS_API=winapi
6851       VAR_OS_ENV=windows.cygwin
6852       ;;
6853     *mingw*)
6854       VAR_OS=windows
6855       VAR_OS_API=winapi
6856       VAR_OS_ENV=windows.msys
6857       ;;
6858     *)
6859       as_fn_error $? "unsupported operating system $host_os" "$LINENO" 5
6860       ;;
6861   esac
6862 
6863 
6864   # First argument is the cpu name from the trip/quad
6865   case "$host_cpu" in
6866     x86_64)
6867       VAR_CPU=x86_64
6868       VAR_CPU_ARCH=x86
6869       VAR_CPU_BITS=64
6870       VAR_CPU_ENDIAN=little
6871       ;;
6872     i?86)
6873       VAR_CPU=x86
6874       VAR_CPU_ARCH=x86
6875       VAR_CPU_BITS=32
6876       VAR_CPU_ENDIAN=little
6877       ;;
6878     arm*)
6879       VAR_CPU=arm
6880       VAR_CPU_ARCH=arm
6881       VAR_CPU_BITS=32
6882       VAR_CPU_ENDIAN=little
6883       ;;
6884     powerpc)
6885       VAR_CPU=ppc
6886       VAR_CPU_ARCH=ppc
6887       VAR_CPU_BITS=32
6888       VAR_CPU_ENDIAN=big
6889        ;;
6890     powerpc64)
6891       VAR_CPU=ppc64
6892       VAR_CPU_ARCH=ppc
6893       VAR_CPU_BITS=64
6894       VAR_CPU_ENDIAN=big
6895        ;;
6896     sparc)
6897       VAR_CPU=sparc
6898       VAR_CPU_ARCH=sparc
6899       VAR_CPU_BITS=32
6900       VAR_CPU_ENDIAN=big
6901        ;;
6902     sparcv9)
6903       VAR_CPU=sparcv9
6904       VAR_CPU_ARCH=sparc
6905       VAR_CPU_BITS=64
6906       VAR_CPU_ENDIAN=big
6907        ;;
6908     *)
6909       as_fn_error $? "unsupported cpu $host_cpu" "$LINENO" 5
6910       ;;
6911   esac
6912 
6913     # ... and setup our own variables. (Do this explicitely to facilitate searching)
6914     OPENJDK_TARGET_OS="$VAR_OS"
6915     OPENJDK_TARGET_OS_API="$VAR_OS_API"
6916     OPENJDK_TARGET_OS_ENV="$VAR_OS_ENV"
6917     OPENJDK_TARGET_CPU="$VAR_CPU"
6918     OPENJDK_TARGET_CPU_ARCH="$VAR_CPU_ARCH"
6919     OPENJDK_TARGET_CPU_BITS="$VAR_CPU_BITS"
6920     OPENJDK_TARGET_CPU_ENDIAN="$VAR_CPU_ENDIAN"
6921 
6922 
6923 
6924 
6925 
6926 
6927 
6928     { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-target os-cpu" >&5
6929 $as_echo_n "checking openjdk-target os-cpu... " >&6; }
6930     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&5
6931 $as_echo "$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&6; }
6932 
6933 
6934 
6935 # Check whether --with-target-bits was given.
6936 if test "${with_target_bits+set}" = set; then :
6937   withval=$with_target_bits;
6938 fi
6939 
6940 
6941   # We have three types of compiles:
6942   # native  == normal compilation, target system == build system
6943   # cross   == traditional cross compilation, target system != build system; special toolchain needed
6944   # reduced == using native compilers, but with special flags (e.g. -m32) to produce 32-bit builds on 64-bit machines
6945   #
6946   if test "x$OPENJDK_BUILD_AUTOCONF_NAME" != "x$OPENJDK_TARGET_AUTOCONF_NAME"; then
6947     # We're doing a proper cross-compilation
6948     COMPILE_TYPE="cross"
6949   else
6950     COMPILE_TYPE="native"
6951   fi
6952 
6953   if test "x$with_target_bits" != x; then
6954     if test "x$COMPILE_TYPE" = "xcross"; then
6955       as_fn_error $? "It is not possible to combine --with-target-bits=X and proper cross-compilation. Choose either." "$LINENO" 5
6956     fi
6957 
6958     if test "x$with_target_bits" = x32 && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
6959       # A reduced build is requested
6960       COMPILE_TYPE="reduced"
6961       OPENJDK_TARGET_CPU_BITS=32
6962       if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
6963         OPENJDK_TARGET_CPU=x86
6964       elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
6965         OPENJDK_TARGET_CPU=sparc
6966       else
6967         as_fn_error $? "Reduced build (--with-target-bits=32) is only supported on x86_64 and sparcv9" "$LINENO" 5
6968       fi
6969     elif test "x$with_target_bits" = x64 && test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
6970       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
6971     elif test "x$with_target_bits" = "x$OPENJDK_TARGET_CPU_BITS"; then
6972       { $as_echo "$as_me:${as_lineno-$LINENO}: --with-target-bits are set to build platform address size; argument has no meaning" >&5
6973 $as_echo "$as_me: --with-target-bits are set to build platform address size; argument has no meaning" >&6;}
6974     else
6975       as_fn_error $? "--with-target-bits can only be 32 or 64, you specified $with_target_bits!" "$LINENO" 5
6976     fi
6977   fi
6978 
6979 
6980 { $as_echo "$as_me:${as_lineno-$LINENO}: checking compilation type" >&5
6981 $as_echo_n "checking compilation type... " >&6; }
6982 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMPILE_TYPE" >&5
6983 $as_echo "$COMPILE_TYPE" >&6; }
6984 
6985 
6986     if test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
6987        REQUIRED_OS_NAME=SunOS
6988        REQUIRED_OS_VERSION=5.10
6989     fi
6990     if test "x$OPENJDK_TARGET_OS" = "xlinux"; then
6991        REQUIRED_OS_NAME=Linux
6992        REQUIRED_OS_VERSION=2.6
6993     fi
6994     if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
6995         REQUIRED_OS_NAME=Windows
6996         if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
6997             REQUIRED_OS_VERSION=5.2
6998         else
6999             REQUIRED_OS_VERSION=5.1
7000         fi
7001     fi
7002     if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
7003         REQUIRED_OS_NAME=Darwin
7004         REQUIRED_OS_VERSION=11.2
7005     fi
7006 
7007 
7008 
7009 
7010 
7011     # Also store the legacy naming of the cpu.
7012     # Ie i586 and amd64 instead of x86 and x86_64
7013     OPENJDK_TARGET_CPU_LEGACY="$OPENJDK_TARGET_CPU"
7014     if test "x$OPENJDK_TARGET_CPU" = xx86; then
7015       OPENJDK_TARGET_CPU_LEGACY="i586"
7016     elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
7017       # On all platforms except MacOSX replace x86_64 with amd64.
7018       OPENJDK_TARGET_CPU_LEGACY="amd64"
7019     fi
7020 
7021 
7022     # And the second legacy naming of the cpu.
7023     # Ie i386 and amd64 instead of x86 and x86_64.
7024     OPENJDK_TARGET_CPU_LEGACY_LIB="$OPENJDK_TARGET_CPU"
7025     if test "x$OPENJDK_TARGET_CPU" = xx86; then
7026       OPENJDK_TARGET_CPU_LEGACY_LIB="i386"
7027     elif test "x$OPENJDK_TARGET_CPU" = xx86_64; then
7028       OPENJDK_TARGET_CPU_LEGACY_LIB="amd64"
7029     fi
7030 
7031 
7032     # This is the name of the cpu (but using i386 and amd64 instead of
7033     # x86 and x86_64, respectively), preceeded by a /, to be used when
7034     # locating libraries. On macosx, it's empty, though.
7035     OPENJDK_TARGET_CPU_LIBDIR="/$OPENJDK_TARGET_CPU_LEGACY_LIB"
7036     if test "x$OPENJDK_TARGET_OS" = xmacosx; then
7037         OPENJDK_TARGET_CPU_LIBDIR=""
7038     fi
7039 
7040 
7041     # OPENJDK_TARGET_CPU_ISADIR is normally empty. On 64-bit Solaris systems, it is set to
7042     # /amd64 or /sparcv9. This string is appended to some library paths, like this:
7043     # /usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libexample.so
7044     OPENJDK_TARGET_CPU_ISADIR=""
7045     if test "x$OPENJDK_TARGET_OS" = xsolaris; then
7046       if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
7047           OPENJDK_TARGET_CPU_ISADIR="/amd64"
7048       elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
7049           OPENJDK_TARGET_CPU_ISADIR="/sparcv9"
7050       fi
7051     fi
7052 
7053 
7054     # Setup OPENJDK_TARGET_CPU_OSARCH, which is used to set the os.arch Java system property
7055     OPENJDK_TARGET_CPU_OSARCH="$OPENJDK_TARGET_CPU"
7056     if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$OPENJDK_TARGET_CPU" = xx86; then
7057       # On linux only, we replace x86 with i386.
7058       OPENJDK_TARGET_CPU_OSARCH="i386"
7059     elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
7060       # On all platforms except macosx, we replace x86_64 with amd64.
7061       OPENJDK_TARGET_CPU_OSARCH="amd64"
7062     fi
7063 
7064 
7065     OPENJDK_TARGET_CPU_JLI="$OPENJDK_TARGET_CPU"
7066     if test "x$OPENJDK_TARGET_CPU" = xx86; then
7067       OPENJDK_TARGET_CPU_JLI="i386"
7068     elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
7069       # On all platforms except macosx, we replace x86_64 with amd64.
7070       OPENJDK_TARGET_CPU_JLI="amd64"
7071     fi
7072     # Now setup the -D flags for building libjli.
7073     OPENJDK_TARGET_CPU_JLI_CFLAGS="-DLIBARCHNAME='\"$OPENJDK_TARGET_CPU_JLI\"'"
7074     if test "x$OPENJDK_TARGET_OS" = xsolaris; then
7075       if test "x$OPENJDK_TARGET_CPU_ARCH" = xsparc; then
7076         OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"sparc\"' -DLIBARCH64NAME='\"sparcv9\"'"
7077       elif test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
7078         OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"i386\"' -DLIBARCH64NAME='\"amd64\"'"
7079       fi
7080     fi
7081 
7082 
7083     # Setup OPENJDK_TARGET_OS_API_DIR, used in source paths.
7084     if test "x$OPENJDK_TARGET_OS_API" = xposix; then
7085         OPENJDK_TARGET_OS_API_DIR="solaris"
7086     fi
7087     if test "x$OPENJDK_TARGET_OS_API" = xwinapi; then
7088         OPENJDK_TARGET_OS_API_DIR="windows"
7089     fi
7090 
7091 
7092     if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
7093         A_LP64="LP64:="
7094         # -D_LP64=1 is only set on linux and mac. Setting on windows causes diff in
7095         # unpack200.exe
7096         if test "x$OPENJDK_TARGET_OS" = xlinux || test "x$OPENJDK_TARGET_OS" = xmacosx; then
7097             ADD_LP64="-D_LP64=1"
7098         fi
7099     fi
7100     LP64=$A_LP64
7101 
7102 
7103     if test "x$COMPILE_TYPE" = "xcross"; then
7104       # FIXME: ... or should this include reduced builds..?
7105       DEFINE_CROSS_COMPILE_ARCH="CROSS_COMPILE_ARCH:=$OPENJDK_TARGET_CPU_LEGACY"
7106     else
7107       DEFINE_CROSS_COMPILE_ARCH=""
7108     fi
7109 
7110 
7111     # ZERO_ARCHDEF is used to enable architecture-specific code
7112     case "${OPENJDK_TARGET_CPU}" in
7113       ppc*)    ZERO_ARCHDEF=PPC   ;;
7114       s390*)   ZERO_ARCHDEF=S390  ;;
7115       sparc*)  ZERO_ARCHDEF=SPARC ;;
7116       x86_64*) ZERO_ARCHDEF=AMD64 ;;
7117       x86)     ZERO_ARCHDEF=IA32  ;;
7118       *)      ZERO_ARCHDEF=$(echo "${OPENJDK_TARGET_CPU_LEGACY_LIB}" | tr a-z A-Z)
7119     esac
7120 
7121 
7122 
7123 
7124 
7125 # Continue setting up basic stuff. Most remaining code require fundamental tools.
7126 
7127 # Locate the directory of this script.
7128 SCRIPT="$0"
7129 
7130     if test "x$OPENJDK_BUILD_OS" != xwindows; then
7131         # Follow a chain of symbolic links. Use readlink
7132         # where it exists, else fall back to horribly
7133         # complicated shell code.
7134         if test "x$READLINK_TESTED" != yes; then
7135             # On MacOSX there is a readlink tool with a different
7136             # purpose than the GNU readlink tool. Check the found readlink.
7137             ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
7138             if test "x$ISGNU" = x; then
7139                  # A readlink that we do not know how to use.
7140                  # Are there other non-GNU readlinks out there?
7141                  READLINK_TESTED=yes
7142                  READLINK=
7143             fi
7144         fi
7145 
7146         if test "x$READLINK" != x; then
7147             SCRIPT=`$READLINK -f $SCRIPT`
7148         else
7149             # Save the current directory for restoring afterwards
7150             STARTDIR=$PWD
7151             COUNTER=0
7152             sym_link_dir=`$DIRNAME $SCRIPT`
7153             sym_link_file=`$BASENAME $SCRIPT`
7154             # Use the system pwd and not the shell builtin to resolve directory symlinks
7155             cd $sym_link_dir
7156             cd `$THEPWDCMD`
7157             sym_link_dir=`$THEPWDCMD`
7158             # Resolve file symlinks
7159             while test $COUNTER -lt 20; do
7160                 ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
7161                 if test "x$ISLINK" == x; then
7162                     # This is not a symbolic link! We are done!
7163                     break
7164                 fi
7165                 # Again resolve directory symlinks since the target of the just found
7166                 # link could be in a different directory
7167                 cd `$DIRNAME $ISLINK`
7168                 sym_link_dir=`$THEPWDCMD`
7169                 sym_link_file=`$BASENAME $ISLINK`
7170                 let COUNTER=COUNTER+1
7171             done
7172             cd $STARTDIR
7173             SCRIPT=$sym_link_dir/$sym_link_file
7174         fi
7175     fi
7176 
7177 AUTOCONF_DIR=`cd \`$DIRNAME $SCRIPT\`; $THEPWDCMD`
7178 
7179 # Where is the source? It is located two levels above the configure script.
7180 CURDIR="$PWD"
7181 cd "$AUTOCONF_DIR/../.."
7182 SRC_ROOT="`$THEPWDCMD`"
7183 
7184 if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
7185   PATH_SEP=";"
7186 
7187   SRC_ROOT_LENGTH=`$THEPWDCMD|$WC -m`
7188   if test $SRC_ROOT_LENGTH -gt 100; then
7189       as_fn_error $? "Your base path is too long. It is $SRC_ROOT_LENGTH characters long, but only 100 is supported" "$LINENO" 5
7190   fi
7191 
7192   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7193     { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin release" >&5
7194 $as_echo_n "checking cygwin release... " >&6; }
7195     CYGWIN_VERSION=`$UNAME -r`
7196     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_VERSION" >&5
7197 $as_echo "$CYGWIN_VERSION" >&6; }
7198     WINDOWS_ENV_VENDOR='cygwin'
7199     WINDOWS_ENV_VERSION="$CYGWIN_VERSION"
7200 
7201     CYGWIN_VERSION_OK=`$ECHO $CYGWIN_VERSION | $GREP ^1.7.`
7202     if test "x$CYGWIN_VERSION_OK" = x; then
7203       { $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
7204 $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;}
7205       as_fn_error $? "Cannot continue" "$LINENO" 5
7206     fi
7207     if test "x$CYGPATH" = x; then
7208         as_fn_error $? "Something is wrong with your cygwin installation since I cannot find cygpath.exe in your path" "$LINENO" 5
7209     fi
7210     { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin root directory as unix-style path" >&5
7211 $as_echo_n "checking cygwin root directory as unix-style path... " >&6; }
7212     # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
7213     cygwin_winpath_root=`cd / ; cmd /c cd | grep ".*"`
7214     # Force cygpath to report the proper root by including a trailing space, and then stripping it off again.
7215     CYGWIN_ROOT_PATH=`$CYGPATH -u "$cygwin_winpath_root " | $CUT -f 1 -d " "`
7216     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_ROOT_PATH" >&5
7217 $as_echo "$CYGWIN_ROOT_PATH" >&6; }
7218     WINDOWS_ENV_ROOT_PATH="$CYGWIN_ROOT_PATH"
7219     test_cygdrive_prefix=`$ECHO $CYGWIN_ROOT_PATH | $GREP ^/cygdrive/`
7220     if test "x$test_cygdrive_prefix" = x; then
7221         as_fn_error $? "Your cygdrive prefix is not /cygdrive. This is currently not supported. Change with mount -c." "$LINENO" 5
7222     fi
7223   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7224     { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys release" >&5
7225 $as_echo_n "checking msys release... " >&6; }
7226     MSYS_VERSION=`$UNAME -r`
7227     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_VERSION" >&5
7228 $as_echo "$MSYS_VERSION" >&6; }
7229 
7230     WINDOWS_ENV_VENDOR='msys'
7231     WINDOWS_ENV_VERSION="$MSYS_VERSION"
7232 
7233     { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys root directory as unix-style path" >&5
7234 $as_echo_n "checking msys root directory as unix-style path... " >&6; }
7235     # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
7236     MSYS_ROOT_PATH=`cd / ; cmd /c cd | grep ".*"`
7237 
7238   windows_path="$MSYS_ROOT_PATH"
7239   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7240     unix_path=`$CYGPATH -u "$windows_path"`
7241     MSYS_ROOT_PATH="$unix_path"
7242   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7243     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
7244     MSYS_ROOT_PATH="$unix_path"
7245   fi
7246 
7247     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_ROOT_PATH" >&5
7248 $as_echo "$MSYS_ROOT_PATH" >&6; }
7249     WINDOWS_ENV_ROOT_PATH="$MSYS_ROOT_PATH"
7250   else
7251     as_fn_error $? "Unknown Windows environment. Neither cygwin nor msys was detected." "$LINENO" 5
7252   fi
7253 
7254   # Test if windows or unix (cygwin/msys) find is first in path.
7255   { $as_echo "$as_me:${as_lineno-$LINENO}: checking what kind of 'find' is first on the PATH" >&5
7256 $as_echo_n "checking what kind of 'find' is first on the PATH... " >&6; }
7257   FIND_BINARY_OUTPUT=`find --version 2>&1`
7258   if test "x`echo $FIND_BINARY_OUTPUT | $GREP GNU`" != x; then
7259     { $as_echo "$as_me:${as_lineno-$LINENO}: result: unix style" >&5
7260 $as_echo "unix style" >&6; }
7261   elif test "x`echo $FIND_BINARY_OUTPUT | $GREP FIND`" != x; then
7262     { $as_echo "$as_me:${as_lineno-$LINENO}: result: Windows" >&5
7263 $as_echo "Windows" >&6; }
7264     { $as_echo "$as_me:${as_lineno-$LINENO}: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&5
7265 $as_echo "$as_me: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&6;}
7266     { $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
7267 $as_echo "$as_me: This will not work. Please correct and make sure /usr/bin (or similar) is first in path." >&6;}
7268     as_fn_error $? "Cannot continue" "$LINENO" 5
7269   else
7270     { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
7271 $as_echo "unknown" >&6; }
7272     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: It seems that your find utility is non-standard." >&5
7273 $as_echo "$as_me: WARNING: It seems that your find utility is non-standard." >&2;}
7274   fi
7275 
7276 else
7277   PATH_SEP=":"
7278 fi
7279 
7280 
7281 
7282 cd "$CURDIR"
7283 
7284 
7285   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7286 
7287   # Input might be given as Windows format, start by converting to
7288   # unix format.
7289   path="$SRC_ROOT"
7290   new_path=`$CYGPATH -u "$path"`
7291 
7292   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
7293   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
7294   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
7295   # "foo.exe" is OK but "foo" is an error.
7296   #
7297   # This test is therefore slightly more accurate than "test -f" to check for file precense.
7298   # It is also a way to make sure we got the proper file name for the real test later on.
7299   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
7300   if test "x$test_shortpath" = x; then
7301     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&5
7302 $as_echo "$as_me: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&6;}
7303     as_fn_error $? "Cannot locate the the path of SRC_ROOT" "$LINENO" 5
7304   fi
7305 
7306   # Call helper function which possibly converts this using DOS-style short mode.
7307   # If so, the updated path is stored in $new_path.
7308 
7309   input_path="$new_path"
7310   # Check if we need to convert this using DOS-style short mode. If the path
7311   # contains just simple characters, use it. Otherwise (spaces, weird characters),
7312   # take no chances and rewrite it.
7313   # Note: m4 eats our [], so we need to use [ and ] instead.
7314   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
7315   if test "x$has_forbidden_chars" != x; then
7316     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7317     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
7318     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
7319     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
7320       # Going to short mode and back again did indeed matter. Since short mode is
7321       # case insensitive, let's make it lowercase to improve readability.
7322       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7323       # Now convert it back to Unix-stile (cygpath)
7324       input_path=`$CYGPATH -u "$shortmode_path"`
7325       new_path="$input_path"
7326     fi
7327   fi
7328 
7329   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
7330   if test "x$test_cygdrive_prefix" = x; then
7331     # As a simple fix, exclude /usr/bin since it's not a real path.
7332     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
7333       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
7334       # a path prefixed by /cygdrive for fixpath to work.
7335       new_path="$CYGWIN_ROOT_PATH$input_path"
7336     fi
7337   fi
7338 
7339 
7340   if test "x$path" != "x$new_path"; then
7341     SRC_ROOT="$new_path"
7342     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting SRC_ROOT to \"$new_path\"" >&5
7343 $as_echo "$as_me: Rewriting SRC_ROOT to \"$new_path\"" >&6;}
7344   fi
7345 
7346   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7347 
7348   path="$SRC_ROOT"
7349   has_colon=`$ECHO $path | $GREP ^.:`
7350   new_path="$path"
7351   if test "x$has_colon" = x; then
7352     # Not in mixed or Windows style, start by that.
7353     new_path=`cmd //c echo $path`
7354   fi
7355 
7356 
7357   input_path="$new_path"
7358   # Check if we need to convert this using DOS-style short mode. If the path
7359   # contains just simple characters, use it. Otherwise (spaces, weird characters),
7360   # take no chances and rewrite it.
7361   # Note: m4 eats our [], so we need to use [ and ] instead.
7362   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
7363   if test "x$has_forbidden_chars" != x; then
7364     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7365     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7366   fi
7367 
7368 
7369   windows_path="$new_path"
7370   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7371     unix_path=`$CYGPATH -u "$windows_path"`
7372     new_path="$unix_path"
7373   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7374     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
7375     new_path="$unix_path"
7376   fi
7377 
7378   if test "x$path" != "x$new_path"; then
7379     SRC_ROOT="$new_path"
7380     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting SRC_ROOT to \"$new_path\"" >&5
7381 $as_echo "$as_me: Rewriting SRC_ROOT to \"$new_path\"" >&6;}
7382   fi
7383 
7384   # Save the first 10 bytes of this path to the storage, so fixpath can work.
7385   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
7386 
7387   else
7388     # We're on a posix platform. Hooray! :)
7389     path="$SRC_ROOT"
7390 
7391     if test ! -f "$path" && test ! -d "$path"; then
7392       as_fn_error $? "The path of SRC_ROOT, which resolves as \"$path\", is not found." "$LINENO" 5
7393     fi
7394 
7395     has_space=`$ECHO "$path" | $GREP " "`
7396     if test "x$has_space" != x; then
7397       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&5
7398 $as_echo "$as_me: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&6;}
7399       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
7400     fi
7401   fi
7402 
7403 
7404   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7405 
7406   # Input might be given as Windows format, start by converting to
7407   # unix format.
7408   path="$CURDIR"
7409   new_path=`$CYGPATH -u "$path"`
7410 
7411   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
7412   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
7413   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
7414   # "foo.exe" is OK but "foo" is an error.
7415   #
7416   # This test is therefore slightly more accurate than "test -f" to check for file precense.
7417   # It is also a way to make sure we got the proper file name for the real test later on.
7418   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
7419   if test "x$test_shortpath" = x; then
7420     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
7421 $as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
7422     as_fn_error $? "Cannot locate the the path of CURDIR" "$LINENO" 5
7423   fi
7424 
7425   # Call helper function which possibly converts this using DOS-style short mode.
7426   # If so, the updated path is stored in $new_path.
7427 
7428   input_path="$new_path"
7429   # Check if we need to convert this using DOS-style short mode. If the path
7430   # contains just simple characters, use it. Otherwise (spaces, weird characters),
7431   # take no chances and rewrite it.
7432   # Note: m4 eats our [], so we need to use [ and ] instead.
7433   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
7434   if test "x$has_forbidden_chars" != x; then
7435     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7436     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
7437     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
7438     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
7439       # Going to short mode and back again did indeed matter. Since short mode is
7440       # case insensitive, let's make it lowercase to improve readability.
7441       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7442       # Now convert it back to Unix-stile (cygpath)
7443       input_path=`$CYGPATH -u "$shortmode_path"`
7444       new_path="$input_path"
7445     fi
7446   fi
7447 
7448   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
7449   if test "x$test_cygdrive_prefix" = x; then
7450     # As a simple fix, exclude /usr/bin since it's not a real path.
7451     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
7452       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
7453       # a path prefixed by /cygdrive for fixpath to work.
7454       new_path="$CYGWIN_ROOT_PATH$input_path"
7455     fi
7456   fi
7457 
7458 
7459   if test "x$path" != "x$new_path"; then
7460     CURDIR="$new_path"
7461     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
7462 $as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
7463   fi
7464 
7465   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7466 
7467   path="$CURDIR"
7468   has_colon=`$ECHO $path | $GREP ^.:`
7469   new_path="$path"
7470   if test "x$has_colon" = x; then
7471     # Not in mixed or Windows style, start by that.
7472     new_path=`cmd //c echo $path`
7473   fi
7474 
7475 
7476   input_path="$new_path"
7477   # Check if we need to convert this using DOS-style short mode. If the path
7478   # contains just simple characters, use it. Otherwise (spaces, weird characters),
7479   # take no chances and rewrite it.
7480   # Note: m4 eats our [], so we need to use [ and ] instead.
7481   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
7482   if test "x$has_forbidden_chars" != x; then
7483     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7484     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7485   fi
7486 
7487 
7488   windows_path="$new_path"
7489   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7490     unix_path=`$CYGPATH -u "$windows_path"`
7491     new_path="$unix_path"
7492   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7493     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
7494     new_path="$unix_path"
7495   fi
7496 
7497   if test "x$path" != "x$new_path"; then
7498     CURDIR="$new_path"
7499     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
7500 $as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
7501   fi
7502 
7503   # Save the first 10 bytes of this path to the storage, so fixpath can work.
7504   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
7505 
7506   else
7507     # We're on a posix platform. Hooray! :)
7508     path="$CURDIR"
7509 
7510     if test ! -f "$path" && test ! -d "$path"; then
7511       as_fn_error $? "The path of CURDIR, which resolves as \"$path\", is not found." "$LINENO" 5
7512     fi
7513 
7514     has_space=`$ECHO "$path" | $GREP " "`
7515     if test "x$has_space" != x; then
7516       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
7517 $as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
7518       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
7519     fi
7520   fi
7521 
7522 
7523 if test "x$OPENJDK_BUILD_OS" = "xsolaris"; then
7524     # Add extra search paths on solaris for utilities like ar and as etc...
7525     PATH="$PATH:/usr/ccs/bin:/usr/sfw/bin:/opt/csw/bin"
7526 fi
7527 
7528 # You can force the sys-root if the sys-root encoded into the cross compiler tools
7529 # is not correct.
7530 
7531 # Check whether --with-sys-root was given.
7532 if test "${with_sys_root+set}" = set; then :
7533   withval=$with_sys_root;
7534 fi
7535 
7536 
7537 if test "x$with_sys_root" != x; then
7538   SYS_ROOT=$with_sys_root
7539 else
7540   SYS_ROOT=/
7541 fi
7542 
7543 
7544 
7545 # Check whether --with-tools-dir was given.
7546 if test "${with_tools_dir+set}" = set; then :
7547   withval=$with_tools_dir; TOOLS_DIR=$with_tools_dir
7548 fi
7549 
7550 
7551 
7552 # Check whether --with-devkit was given.
7553 if test "${with_devkit+set}" = set; then :
7554   withval=$with_devkit;
7555     if test "x$with_sys_root" != x; then
7556       as_fn_error $? "Cannot specify both --with-devkit and --with-sys-root at the same time" "$LINENO" 5
7557     fi
7558     if test "x$with_tools_dir" != x; then
7559       as_fn_error $? "Cannot specify both --with-devkit and --with-tools-dir at the same time" "$LINENO" 5
7560     fi
7561     TOOLS_DIR=$with_devkit/bin
7562     SYS_ROOT=$with_devkit/$host_alias/libc
7563 
7564 fi
7565 
7566 
7567 
7568 
7569 # Setup default logging of stdout and stderr to build.log in the output root.
7570 BUILD_LOG='$(OUTPUT_ROOT)/build.log'
7571 BUILD_LOG_PREVIOUS='$(OUTPUT_ROOT)/build.log.old'
7572 BUILD_LOG_WRAPPER='$(BASH) $(SRC_ROOT)/common/bin/logger.sh $(BUILD_LOG)'
7573 
7574 
7575 
7576 
7577 
7578 # Check if it's a pure open build or if custom sources are to be used.
7579 
7580   # Check whether --enable-openjdk-only was given.
7581 if test "${enable_openjdk_only+set}" = set; then :
7582   enableval=$enable_openjdk_only;
7583 else
7584   enable_openjdk_only="no"
7585 fi
7586 
7587 
7588   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for presence of closed sources" >&5
7589 $as_echo_n "checking for presence of closed sources... " >&6; }
7590   if test -d "$SRC_ROOT/jdk/src/closed"; then
7591     CLOSED_SOURCE_PRESENT=yes
7592   else
7593     CLOSED_SOURCE_PRESENT=no
7594   fi
7595   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CLOSED_SOURCE_PRESENT" >&5
7596 $as_echo "$CLOSED_SOURCE_PRESENT" >&6; }
7597 
7598   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if closed source is suppressed (openjdk-only)" >&5
7599 $as_echo_n "checking if closed source is suppressed (openjdk-only)... " >&6; }
7600   SUPPRESS_CLOSED_SOURCE="$enable_openjdk_only"
7601   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SUPPRESS_CLOSED_SOURCE" >&5
7602 $as_echo "$SUPPRESS_CLOSED_SOURCE" >&6; }
7603 
7604   if test "x$CLOSED_SOURCE_PRESENT" = xno; then
7605     OPENJDK=true
7606     if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then
7607       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&5
7608 $as_echo "$as_me: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&2;}
7609     fi
7610   else
7611     if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then
7612       OPENJDK=true
7613     else
7614       OPENJDK=false
7615     fi
7616   fi
7617 
7618   if test "x$OPENJDK" = "xtrue"; then
7619     SET_OPENJDK="OPENJDK=true"
7620   fi
7621 
7622 
7623 
7624 
7625 # These are needed to be able to create a configuration name (and thus the output directory)
7626 
7627 ###############################################################################
7628 #
7629 # Check which variant of the JDK that we want to build.
7630 # Currently we have:
7631 #    normal:   standard edition
7632 # but the custom make system may add other variants
7633 #
7634 # Effectively the JDK variant gives a name to a specific set of
7635 # modules to compile into the JDK. In the future, these modules
7636 # might even be Jigsaw modules.
7637 #
7638 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variant of the JDK to build" >&5
7639 $as_echo_n "checking which variant of the JDK to build... " >&6; }
7640 
7641 # Check whether --with-jdk-variant was given.
7642 if test "${with_jdk_variant+set}" = set; then :
7643   withval=$with_jdk_variant;
7644 fi
7645 
7646 
7647 if test "x$with_jdk_variant" = xnormal || test "x$with_jdk_variant" = x; then
7648     JDK_VARIANT="normal"
7649 else
7650     as_fn_error $? "The available JDK variants are: normal" "$LINENO" 5
7651 fi
7652 
7653 
7654 
7655 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JDK_VARIANT" >&5
7656 $as_echo "$JDK_VARIANT" >&6; }
7657 
7658 
7659 
7660 ###############################################################################
7661 #
7662 # Check which variants of the JVM that we want to build.
7663 # Currently we have:
7664 #    server: normal interpreter and a tiered C1/C2 compiler
7665 #    client: normal interpreter and C1 (no C2 compiler) (only 32-bit platforms)
7666 #    minimal1: reduced form of client with optional VM services and features stripped out
7667 #    kernel: kernel footprint JVM that passes the TCK without major performance problems,
7668 #             ie normal interpreter and C1, only the serial GC, kernel jvmti etc
7669 #    zero: no machine code interpreter, no compiler
7670 #    zeroshark: zero interpreter and shark/llvm compiler backend
7671 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variants of the JVM to build" >&5
7672 $as_echo_n "checking which variants of the JVM to build... " >&6; }
7673 
7674 # Check whether --with-jvm-variants was given.
7675 if test "${with_jvm_variants+set}" = set; then :
7676   withval=$with_jvm_variants;
7677 fi
7678 
7679 
7680 if test "x$with_jvm_variants" = x; then
7681      with_jvm_variants="server"
7682 fi
7683 
7684 JVM_VARIANTS=",$with_jvm_variants,"
7685 TEST_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/server,//' -e 's/client,//'  -e 's/minimal1,//' -e 's/kernel,//' -e 's/zero,//' -e 's/zeroshark,//'`
7686 
7687 if test "x$TEST_VARIANTS" != "x,"; then
7688    as_fn_error $? "The available JVM variants are: server, client, minimal1, kernel, zero, zeroshark" "$LINENO" 5
7689 fi
7690 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_jvm_variants" >&5
7691 $as_echo "$with_jvm_variants" >&6; }
7692 
7693 JVM_VARIANT_SERVER=`$ECHO "$JVM_VARIANTS" | $SED -e '/,server,/!s/.*/false/g' -e '/,server,/s/.*/true/g'`
7694 JVM_VARIANT_CLIENT=`$ECHO "$JVM_VARIANTS" | $SED -e '/,client,/!s/.*/false/g' -e '/,client,/s/.*/true/g'`
7695 JVM_VARIANT_MINIMAL1=`$ECHO "$JVM_VARIANTS" | $SED -e '/,minimal1,/!s/.*/false/g' -e '/,minimal1,/s/.*/true/g'`
7696 JVM_VARIANT_KERNEL=`$ECHO "$JVM_VARIANTS" | $SED -e '/,kernel,/!s/.*/false/g' -e '/,kernel,/s/.*/true/g'`
7697 JVM_VARIANT_ZERO=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zero,/!s/.*/false/g' -e '/,zero,/s/.*/true/g'`
7698 JVM_VARIANT_ZEROSHARK=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zeroshark,/!s/.*/false/g' -e '/,zeroshark,/s/.*/true/g'`
7699 
7700 if test "x$JVM_VARIANT_CLIENT" = xtrue; then
7701     if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
7702         as_fn_error $? "You cannot build a client JVM for a 64-bit machine." "$LINENO" 5
7703     fi
7704 fi
7705 if test "x$JVM_VARIANT_KERNEL" = xtrue; then
7706     if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
7707         as_fn_error $? "You cannot build a kernel JVM for a 64-bit machine." "$LINENO" 5
7708     fi
7709 fi
7710 if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
7711     if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
7712         as_fn_error $? "You cannot build a minimal JVM for a 64-bit machine." "$LINENO" 5
7713     fi
7714 fi
7715 
7716 # Replace the commas with AND for use in the build directory name.
7717 ANDED_JVM_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/^,//' -e 's/,$//' -e 's/,/AND/'`
7718 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/'`
7719 if test "x$COUNT_VARIANTS" != "x,1"; then
7720     BUILDING_MULTIPLE_JVM_VARIANTS=yes
7721 else
7722     BUILDING_MULTIPLE_JVM_VARIANTS=no
7723 fi
7724 
7725 
7726 
7727 
7728 
7729 
7730 
7731 
7732 
7733 INCLUDE_SA=true
7734 if test "x$JVM_VARIANT_ZERO" = xtrue ; then
7735     INCLUDE_SA=false
7736 fi
7737 if test "x$JVM_VARIANT_ZEROSHARK" = xtrue ; then
7738     INCLUDE_SA=false
7739 fi
7740 
7741 
7742 if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
7743    MACOSX_UNIVERSAL="true"
7744 fi
7745 
7746 
7747 
7748 
7749 
7750 ###############################################################################
7751 #
7752 # Set the debug level
7753 #    release: no debug information, all optimizations, no asserts.
7754 #    fastdebug: debug information (-g), all optimizations, all asserts
7755 #    slowdebug: debug information (-g), no optimizations, all asserts
7756 #
7757 DEBUG_LEVEL="release"
7758 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which debug level to use" >&5
7759 $as_echo_n "checking which debug level to use... " >&6; }
7760 # Check whether --enable-debug was given.
7761 if test "${enable_debug+set}" = set; then :
7762   enableval=$enable_debug;
7763         ENABLE_DEBUG="${enableval}"
7764         DEBUG_LEVEL="fastdebug"
7765 
7766 else
7767   ENABLE_DEBUG="no"
7768 fi
7769 
7770 
7771 
7772 # Check whether --with-debug-level was given.
7773 if test "${with_debug_level+set}" = set; then :
7774   withval=$with_debug_level;
7775         DEBUG_LEVEL="${withval}"
7776         if test "x$ENABLE_DEBUG" = xyes; then
7777                         as_fn_error $? "You cannot use both --enable-debug and --with-debug-level at the same time." "$LINENO" 5
7778         fi
7779 
7780 fi
7781 
7782 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEBUG_LEVEL" >&5
7783 $as_echo "$DEBUG_LEVEL" >&6; }
7784 
7785 if test "x$DEBUG_LEVEL" != xrelease && \
7786    test "x$DEBUG_LEVEL" != xfastdebug && \
7787    test "x$DEBUG_LEVEL" != xslowdebug; then
7788    as_fn_error $? "Allowed debug levels are: release, fastdebug and slowdebug" "$LINENO" 5
7789 fi
7790 
7791 
7792 ###############################################################################
7793 #
7794 # Setup legacy vars/targets and new vars to deal with different debug levels.
7795 #
7796 
7797 case $DEBUG_LEVEL in
7798       release )
7799           VARIANT="OPT"
7800           FASTDEBUG="false"
7801           DEBUG_CLASSFILES="false"
7802           BUILD_VARIANT_RELEASE=""
7803           HOTSPOT_DEBUG_LEVEL="product"
7804           HOTSPOT_EXPORT="product"
7805            ;;
7806       fastdebug )
7807           VARIANT="DBG"
7808           FASTDEBUG="true"
7809           DEBUG_CLASSFILES="true"
7810           BUILD_VARIANT_RELEASE="-fastdebug"
7811           HOTSPOT_DEBUG_LEVEL="fastdebug"
7812           HOTSPOT_EXPORT="fastdebug"
7813            ;;
7814       slowdebug )
7815           VARIANT="DBG"
7816           FASTDEBUG="false"
7817           DEBUG_CLASSFILES="true"
7818           BUILD_VARIANT_RELEASE="-debug"
7819           HOTSPOT_DEBUG_LEVEL="jvmg"
7820           HOTSPOT_EXPORT="debug"
7821            ;;
7822 esac
7823 
7824 #####
7825 # Generate the legacy makefile targets for hotspot.
7826 # The hotspot api for selecting the build artifacts, really, needs to be improved.
7827 # JDK-7195896 will fix this on the hotspot side by using the JVM_VARIANT_* variables to
7828 # determine what needs to be built. All we will need to set here is all_product, all_fastdebug etc
7829 # But until then ...
7830 HOTSPOT_TARGET=""
7831 
7832 if test "x$JVM_VARIANT_SERVER" = xtrue; then
7833     HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL} "
7834 fi
7835 
7836 if test "x$JVM_VARIANT_CLIENT" = xtrue; then
7837     HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}1 "
7838 fi
7839 
7840 if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
7841     HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}minimal1 "
7842 fi
7843 
7844 if test "x$JVM_VARIANT_KERNEL" = xtrue; then
7845     HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}kernel "
7846 fi
7847 
7848 if test "x$JVM_VARIANT_ZERO" = xtrue; then
7849     HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}zero "
7850 fi
7851 
7852 if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
7853     HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}shark "
7854 fi
7855 
7856 HOTSPOT_TARGET="$HOTSPOT_TARGET docs export_$HOTSPOT_EXPORT"
7857 
7858 # On Macosx universal binaries are produced, but they only contain
7859 # 64 bit intel. This invalidates control of which jvms are built
7860 # from configure, but only server is valid anyway. Fix this
7861 # when hotspot makefiles are rewritten.
7862 if test "x$MACOSX_UNIVERSAL" = xtrue; then
7863     HOTSPOT_TARGET=universal_${HOTSPOT_EXPORT}
7864 fi
7865 
7866 #####
7867 
7868 
7869 
7870 
7871 
7872 
7873 
7874 
7875 # With basic setup done, call the custom early hook.
7876 
7877 
7878 # To properly create a configuration name, we need to have the OpenJDK target
7879 # and options (variants and debug level) parsed.
7880 
7881 
7882 
7883 # Check whether --with-conf-name was given.
7884 if test "${with_conf_name+set}" = set; then :
7885   withval=$with_conf_name;  CONF_NAME=${with_conf_name}
7886 fi
7887 
7888 
7889 # Test from where we are running configure, in or outside of src root.
7890 # To enable comparison of directories, CURDIR needs to be symlink free
7891 # just like SRC_ROOT already is
7892 NOSYM_CURDIR="$CURDIR"
7893 
7894     if test "x$OPENJDK_BUILD_OS" != xwindows; then
7895         # Follow a chain of symbolic links. Use readlink
7896         # where it exists, else fall back to horribly
7897         # complicated shell code.
7898         if test "x$READLINK_TESTED" != yes; then
7899             # On MacOSX there is a readlink tool with a different
7900             # purpose than the GNU readlink tool. Check the found readlink.
7901             ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
7902             if test "x$ISGNU" = x; then
7903                  # A readlink that we do not know how to use.
7904                  # Are there other non-GNU readlinks out there?
7905                  READLINK_TESTED=yes
7906                  READLINK=
7907             fi
7908         fi
7909 
7910         if test "x$READLINK" != x; then
7911             NOSYM_CURDIR=`$READLINK -f $NOSYM_CURDIR`
7912         else
7913             # Save the current directory for restoring afterwards
7914             STARTDIR=$PWD
7915             COUNTER=0
7916             sym_link_dir=`$DIRNAME $NOSYM_CURDIR`
7917             sym_link_file=`$BASENAME $NOSYM_CURDIR`
7918             # Use the system pwd and not the shell builtin to resolve directory symlinks
7919             cd $sym_link_dir
7920             cd `$THEPWDCMD`
7921             sym_link_dir=`$THEPWDCMD`
7922             # Resolve file symlinks
7923             while test $COUNTER -lt 20; do
7924                 ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
7925                 if test "x$ISLINK" == x; then
7926                     # This is not a symbolic link! We are done!
7927                     break
7928                 fi
7929                 # Again resolve directory symlinks since the target of the just found
7930                 # link could be in a different directory
7931                 cd `$DIRNAME $ISLINK`
7932                 sym_link_dir=`$THEPWDCMD`
7933                 sym_link_file=`$BASENAME $ISLINK`
7934                 let COUNTER=COUNTER+1
7935             done
7936             cd $STARTDIR
7937             NOSYM_CURDIR=$sym_link_dir/$sym_link_file
7938         fi
7939     fi
7940 
7941 if test "x$NOSYM_CURDIR" = "x$SRC_ROOT" || test "x$NOSYM_CURDIR" = "x$SRC_ROOT/common" \
7942         || test "x$NOSYM_CURDIR" = "x$SRC_ROOT/common/autoconf" \
7943         || test "x$NOSYM_CURDIR" = "x$SRC_ROOT/common/makefiles" ; then
7944     # We are running configure from the src root.
7945     # Create a default ./build/target-variant-debuglevel output root.
7946     if test "x${CONF_NAME}" = x; then
7947         CONF_NAME="${OPENJDK_TARGET_OS}-${OPENJDK_TARGET_CPU}-${JDK_VARIANT}-${ANDED_JVM_VARIANTS}-${DEBUG_LEVEL}"
7948     fi
7949     OUTPUT_ROOT="$SRC_ROOT/build/${CONF_NAME}"
7950     $MKDIR -p "$OUTPUT_ROOT"
7951     if test ! -d "$OUTPUT_ROOT"; then
7952         as_fn_error $? "Could not create build directory $OUTPUT_ROOT" "$LINENO" 5
7953     fi
7954 else
7955     # We are running configure from outside of the src dir.
7956     # Then use the current directory as output dir!
7957     # If configuration is situated in normal build directory, just use the build
7958     # directory name as configuration name, otherwise use the complete path.
7959     if test "x${CONF_NAME}" = x; then
7960         CONF_NAME=`$ECHO $CURDIR | $SED -e "s!^${SRC_ROOT}/build/!!"`
7961     fi
7962     OUTPUT_ROOT="$CURDIR"
7963 
7964     # WARNING: This might be a bad thing to do. You need to be sure you want to
7965     # have a configuration in this directory. Do some sanity checks!
7966 
7967     if test ! -e "$OUTPUT_ROOT/spec.gmk"; then
7968       # If we have a spec.gmk, we have run here before and we are OK. Otherwise, check for
7969       # other files
7970       files_present=`$LS $OUTPUT_ROOT`
7971       # Configure has already touched config.log and confdefs.h in the current dir when this check
7972       # is performed.
7973       filtered_files=`$ECHO "$files_present" | $SED -e 's/config.log//g' -e 's/confdefs.h//g' -e 's/ //g' \
7974                                              | $TR -d '\n'`
7975       if test "x$filtered_files" != x; then
7976         { $as_echo "$as_me:${as_lineno-$LINENO}: Current directory is $CURDIR." >&5
7977 $as_echo "$as_me: Current directory is $CURDIR." >&6;}
7978         { $as_echo "$as_me:${as_lineno-$LINENO}: Since this is not the source root, configure will output the configuration here" >&5
7979 $as_echo "$as_me: Since this is not the source root, configure will output the configuration here" >&6;}
7980         { $as_echo "$as_me:${as_lineno-$LINENO}: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&5
7981 $as_echo "$as_me: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&6;}
7982         { $as_echo "$as_me:${as_lineno-$LINENO}: However, this directory is not empty. This is not allowed, since it could" >&5
7983 $as_echo "$as_me: However, this directory is not empty. This is not allowed, since it could" >&6;}
7984         { $as_echo "$as_me:${as_lineno-$LINENO}: seriously mess up just about everything." >&5
7985 $as_echo "$as_me: seriously mess up just about everything." >&6;}
7986         { $as_echo "$as_me:${as_lineno-$LINENO}: Try 'cd $SRC_ROOT' and restart configure" >&5
7987 $as_echo "$as_me: Try 'cd $SRC_ROOT' and restart configure" >&6;}
7988         { $as_echo "$as_me:${as_lineno-$LINENO}: (or create a new empty directory and cd to it)." >&5
7989 $as_echo "$as_me: (or create a new empty directory and cd to it)." >&6;}
7990         as_fn_error $? "Will not continue creating configuration in $CURDIR" "$LINENO" 5
7991       fi
7992     fi
7993 fi
7994 { $as_echo "$as_me:${as_lineno-$LINENO}: checking what configuration name to use" >&5
7995 $as_echo_n "checking what configuration name to use... " >&6; }
7996 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CONF_NAME" >&5
7997 $as_echo "$CONF_NAME" >&6; }
7998 
7999 
8000   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8001 
8002   # Input might be given as Windows format, start by converting to
8003   # unix format.
8004   path="$OUTPUT_ROOT"
8005   new_path=`$CYGPATH -u "$path"`
8006 
8007   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
8008   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
8009   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
8010   # "foo.exe" is OK but "foo" is an error.
8011   #
8012   # This test is therefore slightly more accurate than "test -f" to check for file precense.
8013   # It is also a way to make sure we got the proper file name for the real test later on.
8014   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
8015   if test "x$test_shortpath" = x; then
8016     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
8017 $as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
8018     as_fn_error $? "Cannot locate the the path of OUTPUT_ROOT" "$LINENO" 5
8019   fi
8020 
8021   # Call helper function which possibly converts this using DOS-style short mode.
8022   # If so, the updated path is stored in $new_path.
8023 
8024   input_path="$new_path"
8025   # Check if we need to convert this using DOS-style short mode. If the path
8026   # contains just simple characters, use it. Otherwise (spaces, weird characters),
8027   # take no chances and rewrite it.
8028   # Note: m4 eats our [], so we need to use [ and ] instead.
8029   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
8030   if test "x$has_forbidden_chars" != x; then
8031     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8032     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
8033     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
8034     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
8035       # Going to short mode and back again did indeed matter. Since short mode is
8036       # case insensitive, let's make it lowercase to improve readability.
8037       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8038       # Now convert it back to Unix-stile (cygpath)
8039       input_path=`$CYGPATH -u "$shortmode_path"`
8040       new_path="$input_path"
8041     fi
8042   fi
8043 
8044   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
8045   if test "x$test_cygdrive_prefix" = x; then
8046     # As a simple fix, exclude /usr/bin since it's not a real path.
8047     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
8048       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
8049       # a path prefixed by /cygdrive for fixpath to work.
8050       new_path="$CYGWIN_ROOT_PATH$input_path"
8051     fi
8052   fi
8053 
8054 
8055   if test "x$path" != "x$new_path"; then
8056     OUTPUT_ROOT="$new_path"
8057     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
8058 $as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
8059   fi
8060 
8061   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8062 
8063   path="$OUTPUT_ROOT"
8064   has_colon=`$ECHO $path | $GREP ^.:`
8065   new_path="$path"
8066   if test "x$has_colon" = x; then
8067     # Not in mixed or Windows style, start by that.
8068     new_path=`cmd //c echo $path`
8069   fi
8070 
8071 
8072   input_path="$new_path"
8073   # Check if we need to convert this using DOS-style short mode. If the path
8074   # contains just simple characters, use it. Otherwise (spaces, weird characters),
8075   # take no chances and rewrite it.
8076   # Note: m4 eats our [], so we need to use [ and ] instead.
8077   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
8078   if test "x$has_forbidden_chars" != x; then
8079     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8080     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8081   fi
8082 
8083 
8084   windows_path="$new_path"
8085   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8086     unix_path=`$CYGPATH -u "$windows_path"`
8087     new_path="$unix_path"
8088   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8089     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8090     new_path="$unix_path"
8091   fi
8092 
8093   if test "x$path" != "x$new_path"; then
8094     OUTPUT_ROOT="$new_path"
8095     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
8096 $as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
8097   fi
8098 
8099   # Save the first 10 bytes of this path to the storage, so fixpath can work.
8100   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
8101 
8102   else
8103     # We're on a posix platform. Hooray! :)
8104     path="$OUTPUT_ROOT"
8105 
8106     if test ! -f "$path" && test ! -d "$path"; then
8107       as_fn_error $? "The path of OUTPUT_ROOT, which resolves as \"$path\", is not found." "$LINENO" 5
8108     fi
8109 
8110     has_space=`$ECHO "$path" | $GREP " "`
8111     if test "x$has_space" != x; then
8112       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
8113 $as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
8114       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
8115     fi
8116   fi
8117 
8118 
8119 SPEC=$OUTPUT_ROOT/spec.gmk
8120 
8121 CONF_NAME=$CONF_NAME
8122 
8123 OUTPUT_ROOT=$OUTPUT_ROOT
8124 
8125 
8126 # Most of the probed defines are put into config.h
8127 ac_config_headers="$ac_config_headers $OUTPUT_ROOT/config.h:$AUTOCONF_DIR/config.h.in"
8128 
8129 # The spec.gmk file contains all variables for the make system.
8130 ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in"
8131 
8132 # The hotspot-spec.gmk file contains legacy variables for the hotspot make system.
8133 ac_config_files="$ac_config_files $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in"
8134 
8135 # The bootcycle-spec.gmk file contains support for boot cycle builds.
8136 ac_config_files="$ac_config_files $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in"
8137 
8138 # The compare.sh is used to compare the build output to other builds.
8139 ac_config_files="$ac_config_files $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in"
8140 
8141 # Spec.sh is currently used by compare-objects.sh
8142 ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.sh:$AUTOCONF_DIR/spec.sh.in"
8143 
8144 # The generated Makefile knows where the spec.gmk is and where the source is.
8145 # You can run make from the OUTPUT_ROOT, or from the top-level Makefile
8146 # which will look for generated configurations
8147 ac_config_files="$ac_config_files $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in"
8148 
8149 
8150 # Save the arguments given to us
8151 echo "$CONFIGURE_COMMAND_LINE" > $OUTPUT_ROOT/configure-arguments
8152 
8153 
8154 # Must be done before we can call HELP_MSG_MISSING_DEPENDENCY.
8155 
8156     for ac_prog in apt-get yum port pkgutil pkgadd
8157 do
8158   # Extract the first word of "$ac_prog", so it can be a program name with args.
8159 set dummy $ac_prog; ac_word=$2
8160 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8161 $as_echo_n "checking for $ac_word... " >&6; }
8162 if test "${ac_cv_prog_PKGHANDLER+set}" = set; then :
8163   $as_echo_n "(cached) " >&6
8164 else
8165   if test -n "$PKGHANDLER"; then
8166   ac_cv_prog_PKGHANDLER="$PKGHANDLER" # Let the user override the test.
8167 else
8168 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8169 for as_dir in $PATH
8170 do
8171   IFS=$as_save_IFS
8172   test -z "$as_dir" && as_dir=.
8173     for ac_exec_ext in '' $ac_executable_extensions; do
8174   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8175     ac_cv_prog_PKGHANDLER="$ac_prog"
8176     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8177     break 2
8178   fi
8179 done
8180   done
8181 IFS=$as_save_IFS
8182 
8183 fi
8184 fi
8185 PKGHANDLER=$ac_cv_prog_PKGHANDLER
8186 if test -n "$PKGHANDLER"; then
8187   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKGHANDLER" >&5
8188 $as_echo "$PKGHANDLER" >&6; }
8189 else
8190   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8191 $as_echo "no" >&6; }
8192 fi
8193 
8194 
8195   test -n "$PKGHANDLER" && break
8196 done
8197 
8198 
8199 
8200 # Setup tools that requires more complex handling, or that is not needed by the configure script.
8201 
8202 
8203   # We need to find a recent version of GNU make. Especially on Solaris, this can be tricky.
8204   if test "x$MAKE" != x; then
8205     # User has supplied a make, test it.
8206     if test ! -f "$MAKE"; then
8207       as_fn_error $? "The specified make (by MAKE=$MAKE) is not found." "$LINENO" 5
8208     fi
8209 
8210   MAKE_CANDIDATE=""$MAKE""
8211   DESCRIPTION="user supplied MAKE=$MAKE"
8212   if test "x$MAKE_CANDIDATE" != x; then
8213     { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
8214 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
8215     MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
8216     IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
8217     if test "x$IS_GNU_MAKE" = x; then
8218       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
8219 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
8220     else
8221       IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'`
8222       if test "x$IS_MODERN_MAKE" = x; then
8223         { $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
8224 $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;}
8225       else
8226         if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
8227           if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8228             MAKE_EXPECTED_ENV='cygwin'
8229           elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8230             MAKE_EXPECTED_ENV='msys'
8231           else
8232             as_fn_error $? "Unknown Windows environment" "$LINENO" 5
8233           fi
8234           MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
8235           IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
8236         else
8237           # Not relevant for non-Windows
8238           IS_MAKE_CORRECT_ENV=true
8239         fi
8240         if test "x$IS_MAKE_CORRECT_ENV" = x; then
8241           { $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
8242 $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;}
8243         else
8244           FOUND_MAKE=$MAKE_CANDIDATE
8245 
8246   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8247 
8248   # First separate the path from the arguments. This will split at the first
8249   # space.
8250   complete="$FOUND_MAKE"
8251   path="${complete%% *}"
8252   tmp="$complete EOL"
8253   arguments="${tmp#* }"
8254 
8255   # Input might be given as Windows format, start by converting to
8256   # unix format.
8257   new_path=`$CYGPATH -u "$path"`
8258 
8259   # Now try to locate executable using which
8260   new_path=`$WHICH "$new_path" 2> /dev/null`
8261   # bat and cmd files are not always considered executable in cygwin causing which
8262   # to not find them
8263   if test "x$new_path" = x \
8264            && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8265            && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8266     new_path=`$CYGPATH -u "$path"`
8267   fi
8268   if test "x$new_path" = x; then
8269     # Oops. Which didn't find the executable.
8270     # The splitting of arguments from the executable at a space might have been incorrect,
8271     # since paths with space are more likely in Windows. Give it another try with the whole
8272     # argument.
8273     path="$complete"
8274     arguments="EOL"
8275     new_path=`$CYGPATH -u "$path"`
8276     new_path=`$WHICH "$new_path" 2> /dev/null`
8277     # bat and cmd files are not always considered executable in cygwin causing which
8278     # to not find them
8279     if test "x$new_path" = x \
8280              && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8281              && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8282       new_path=`$CYGPATH -u "$path"`
8283     fi
8284     if test "x$new_path" = x; then
8285       # It's still not found. Now this is an unrecoverable error.
8286       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8287 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8288       has_space=`$ECHO "$complete" | $GREP " "`
8289       if test "x$has_space" != x; then
8290         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8291 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8292       fi
8293       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8294     fi
8295   fi
8296 
8297   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
8298   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
8299   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
8300   # "foo.exe" is OK but "foo" is an error.
8301   #
8302   # This test is therefore slightly more accurate than "test -f" to check for file precense.
8303   # It is also a way to make sure we got the proper file name for the real test later on.
8304   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
8305   if test "x$test_shortpath" = x; then
8306     # Short path failed, file does not exist as specified.
8307     # Try adding .exe or .cmd
8308     if test -f "${new_path}.exe"; then
8309        input_to_shortpath="${new_path}.exe"
8310     elif test -f "${new_path}.cmd"; then
8311        input_to_shortpath="${new_path}.cmd"
8312     else
8313       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
8314 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
8315       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
8316 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
8317       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8318     fi
8319   else
8320     input_to_shortpath="$new_path"
8321   fi
8322 
8323   # Call helper function which possibly converts this using DOS-style short mode.
8324   # If so, the updated path is stored in $new_path.
8325   new_path="$input_to_shortpath"
8326 
8327   input_path="$input_to_shortpath"
8328   # Check if we need to convert this using DOS-style short mode. If the path
8329   # contains just simple characters, use it. Otherwise (spaces, weird characters),
8330   # take no chances and rewrite it.
8331   # Note: m4 eats our [], so we need to use [ and ] instead.
8332   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
8333   if test "x$has_forbidden_chars" != x; then
8334     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8335     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
8336     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
8337     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
8338       # Going to short mode and back again did indeed matter. Since short mode is
8339       # case insensitive, let's make it lowercase to improve readability.
8340       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8341       # Now convert it back to Unix-stile (cygpath)
8342       input_path=`$CYGPATH -u "$shortmode_path"`
8343       new_path="$input_path"
8344     fi
8345   fi
8346 
8347   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
8348   if test "x$test_cygdrive_prefix" = x; then
8349     # As a simple fix, exclude /usr/bin since it's not a real path.
8350     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
8351       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
8352       # a path prefixed by /cygdrive for fixpath to work.
8353       new_path="$CYGWIN_ROOT_PATH$input_path"
8354     fi
8355   fi
8356 
8357   # remove trailing .exe if any
8358   new_path="${new_path/%.exe/}"
8359 
8360   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8361 
8362   # First separate the path from the arguments. This will split at the first
8363   # space.
8364   complete="$FOUND_MAKE"
8365   path="${complete%% *}"
8366   tmp="$complete EOL"
8367   arguments="${tmp#* }"
8368 
8369   # Input might be given as Windows format, start by converting to
8370   # unix format.
8371   new_path="$path"
8372 
8373   windows_path="$new_path"
8374   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8375     unix_path=`$CYGPATH -u "$windows_path"`
8376     new_path="$unix_path"
8377   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8378     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8379     new_path="$unix_path"
8380   fi
8381 
8382 
8383   # Now try to locate executable using which
8384   new_path=`$WHICH "$new_path" 2> /dev/null`
8385 
8386   if test "x$new_path" = x; then
8387     # Oops. Which didn't find the executable.
8388     # The splitting of arguments from the executable at a space might have been incorrect,
8389     # since paths with space are more likely in Windows. Give it another try with the whole
8390     # argument.
8391     path="$complete"
8392     arguments="EOL"
8393     new_path="$path"
8394 
8395   windows_path="$new_path"
8396   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8397     unix_path=`$CYGPATH -u "$windows_path"`
8398     new_path="$unix_path"
8399   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8400     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8401     new_path="$unix_path"
8402   fi
8403 
8404 
8405     new_path=`$WHICH "$new_path" 2> /dev/null`
8406 
8407     if test "x$new_path" = x; then
8408       # It's still not found. Now this is an unrecoverable error.
8409       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8410 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8411       has_space=`$ECHO "$complete" | $GREP " "`
8412       if test "x$has_space" != x; then
8413         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8414 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8415       fi
8416       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8417     fi
8418   fi
8419 
8420   # Now new_path has a complete unix path to the binary
8421   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
8422     # Keep paths in /bin as-is, but remove trailing .exe if any
8423     new_path="${new_path/%.exe/}"
8424     # Do not save /bin paths to all_fixpath_prefixes!
8425   else
8426     # Not in mixed or Windows style, start by that.
8427     new_path=`cmd //c echo $new_path`
8428 
8429   input_path="$new_path"
8430   # Check if we need to convert this using DOS-style short mode. If the path
8431   # contains just simple characters, use it. Otherwise (spaces, weird characters),
8432   # take no chances and rewrite it.
8433   # Note: m4 eats our [], so we need to use [ and ] instead.
8434   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
8435   if test "x$has_forbidden_chars" != x; then
8436     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8437     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8438   fi
8439 
8440     # Output is in $new_path
8441 
8442   windows_path="$new_path"
8443   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8444     unix_path=`$CYGPATH -u "$windows_path"`
8445     new_path="$unix_path"
8446   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8447     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8448     new_path="$unix_path"
8449   fi
8450 
8451     # remove trailing .exe if any
8452     new_path="${new_path/%.exe/}"
8453 
8454     # Save the first 10 bytes of this path to the storage, so fixpath can work.
8455     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
8456   fi
8457 
8458   else
8459     # We're on a posix platform. Hooray! :)
8460     # First separate the path from the arguments. This will split at the first
8461     # space.
8462     complete="$FOUND_MAKE"
8463     path="${complete%% *}"
8464     tmp="$complete EOL"
8465     arguments="${tmp#* }"
8466 
8467     # Cannot rely on the command "which" here since it doesn't always work.
8468     is_absolute_path=`$ECHO "$path" | $GREP ^/`
8469     if test -z "$is_absolute_path"; then
8470       # Path to executable is not absolute. Find it.
8471       IFS_save="$IFS"
8472       IFS=:
8473       for p in $PATH; do
8474         if test -f "$p/$path" && test -x "$p/$path"; then
8475           new_path="$p/$path"
8476           break
8477         fi
8478       done
8479       IFS="$IFS_save"
8480     else
8481       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
8482 $as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
8483       new_path="$path"
8484     fi
8485 
8486     if test "x$new_path" = x; then
8487         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8488 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8489         has_space=`$ECHO "$complete" | $GREP " "`
8490         if test "x$has_space" != x; then
8491           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
8492 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
8493         fi
8494         as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8495       fi
8496   fi
8497 
8498       # Now join together the path and the arguments once again
8499       if test "x$arguments" != xEOL; then
8500         new_complete="$new_path ${arguments% *}"
8501       else
8502         new_complete="$new_path"
8503       fi
8504 
8505   if test "x$complete" != "x$new_complete"; then
8506       FOUND_MAKE="$new_complete"
8507       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
8508 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
8509     fi
8510 
8511         fi
8512       fi
8513     fi
8514   fi
8515 
8516     if test "x$FOUND_MAKE" = x; then
8517       as_fn_error $? "The specified make (by MAKE=$MAKE) is not GNU make 3.81 or newer." "$LINENO" 5
8518     fi
8519   else
8520     # Try our hardest to locate a correct version of GNU make
8521     for ac_prog in gmake
8522 do
8523   # Extract the first word of "$ac_prog", so it can be a program name with args.
8524 set dummy $ac_prog; ac_word=$2
8525 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8526 $as_echo_n "checking for $ac_word... " >&6; }
8527 if test "${ac_cv_path_CHECK_GMAKE+set}" = set; then :
8528   $as_echo_n "(cached) " >&6
8529 else
8530   case $CHECK_GMAKE in
8531   [\\/]* | ?:[\\/]*)
8532   ac_cv_path_CHECK_GMAKE="$CHECK_GMAKE" # Let the user override the test with a path.
8533   ;;
8534   *)
8535   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8536 for as_dir in $PATH
8537 do
8538   IFS=$as_save_IFS
8539   test -z "$as_dir" && as_dir=.
8540     for ac_exec_ext in '' $ac_executable_extensions; do
8541   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8542     ac_cv_path_CHECK_GMAKE="$as_dir/$ac_word$ac_exec_ext"
8543     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8544     break 2
8545   fi
8546 done
8547   done
8548 IFS=$as_save_IFS
8549 
8550   ;;
8551 esac
8552 fi
8553 CHECK_GMAKE=$ac_cv_path_CHECK_GMAKE
8554 if test -n "$CHECK_GMAKE"; then
8555   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_GMAKE" >&5
8556 $as_echo "$CHECK_GMAKE" >&6; }
8557 else
8558   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8559 $as_echo "no" >&6; }
8560 fi
8561 
8562 
8563   test -n "$CHECK_GMAKE" && break
8564 done
8565 
8566 
8567   MAKE_CANDIDATE=""$CHECK_GMAKE""
8568   DESCRIPTION="gmake in PATH"
8569   if test "x$MAKE_CANDIDATE" != x; then
8570     { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
8571 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
8572     MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
8573     IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
8574     if test "x$IS_GNU_MAKE" = x; then
8575       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
8576 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
8577     else
8578       IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'`
8579       if test "x$IS_MODERN_MAKE" = x; then
8580         { $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
8581 $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;}
8582       else
8583         if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
8584           if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8585             MAKE_EXPECTED_ENV='cygwin'
8586           elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8587             MAKE_EXPECTED_ENV='msys'
8588           else
8589             as_fn_error $? "Unknown Windows environment" "$LINENO" 5
8590           fi
8591           MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
8592           IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
8593         else
8594           # Not relevant for non-Windows
8595           IS_MAKE_CORRECT_ENV=true
8596         fi
8597         if test "x$IS_MAKE_CORRECT_ENV" = x; then
8598           { $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
8599 $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;}
8600         else
8601           FOUND_MAKE=$MAKE_CANDIDATE
8602 
8603   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8604 
8605   # First separate the path from the arguments. This will split at the first
8606   # space.
8607   complete="$FOUND_MAKE"
8608   path="${complete%% *}"
8609   tmp="$complete EOL"
8610   arguments="${tmp#* }"
8611 
8612   # Input might be given as Windows format, start by converting to
8613   # unix format.
8614   new_path=`$CYGPATH -u "$path"`
8615 
8616   # Now try to locate executable using which
8617   new_path=`$WHICH "$new_path" 2> /dev/null`
8618   # bat and cmd files are not always considered executable in cygwin causing which
8619   # to not find them
8620   if test "x$new_path" = x \
8621            && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8622            && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8623     new_path=`$CYGPATH -u "$path"`
8624   fi
8625   if test "x$new_path" = x; then
8626     # Oops. Which didn't find the executable.
8627     # The splitting of arguments from the executable at a space might have been incorrect,
8628     # since paths with space are more likely in Windows. Give it another try with the whole
8629     # argument.
8630     path="$complete"
8631     arguments="EOL"
8632     new_path=`$CYGPATH -u "$path"`
8633     new_path=`$WHICH "$new_path" 2> /dev/null`
8634     # bat and cmd files are not always considered executable in cygwin causing which
8635     # to not find them
8636     if test "x$new_path" = x \
8637              && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8638              && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8639       new_path=`$CYGPATH -u "$path"`
8640     fi
8641     if test "x$new_path" = x; then
8642       # It's still not found. Now this is an unrecoverable error.
8643       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8644 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8645       has_space=`$ECHO "$complete" | $GREP " "`
8646       if test "x$has_space" != x; then
8647         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8648 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8649       fi
8650       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8651     fi
8652   fi
8653 
8654   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
8655   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
8656   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
8657   # "foo.exe" is OK but "foo" is an error.
8658   #
8659   # This test is therefore slightly more accurate than "test -f" to check for file precense.
8660   # It is also a way to make sure we got the proper file name for the real test later on.
8661   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
8662   if test "x$test_shortpath" = x; then
8663     # Short path failed, file does not exist as specified.
8664     # Try adding .exe or .cmd
8665     if test -f "${new_path}.exe"; then
8666        input_to_shortpath="${new_path}.exe"
8667     elif test -f "${new_path}.cmd"; then
8668        input_to_shortpath="${new_path}.cmd"
8669     else
8670       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
8671 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
8672       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
8673 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
8674       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8675     fi
8676   else
8677     input_to_shortpath="$new_path"
8678   fi
8679 
8680   # Call helper function which possibly converts this using DOS-style short mode.
8681   # If so, the updated path is stored in $new_path.
8682   new_path="$input_to_shortpath"
8683 
8684   input_path="$input_to_shortpath"
8685   # Check if we need to convert this using DOS-style short mode. If the path
8686   # contains just simple characters, use it. Otherwise (spaces, weird characters),
8687   # take no chances and rewrite it.
8688   # Note: m4 eats our [], so we need to use [ and ] instead.
8689   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
8690   if test "x$has_forbidden_chars" != x; then
8691     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8692     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
8693     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
8694     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
8695       # Going to short mode and back again did indeed matter. Since short mode is
8696       # case insensitive, let's make it lowercase to improve readability.
8697       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8698       # Now convert it back to Unix-stile (cygpath)
8699       input_path=`$CYGPATH -u "$shortmode_path"`
8700       new_path="$input_path"
8701     fi
8702   fi
8703 
8704   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
8705   if test "x$test_cygdrive_prefix" = x; then
8706     # As a simple fix, exclude /usr/bin since it's not a real path.
8707     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
8708       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
8709       # a path prefixed by /cygdrive for fixpath to work.
8710       new_path="$CYGWIN_ROOT_PATH$input_path"
8711     fi
8712   fi
8713 
8714   # remove trailing .exe if any
8715   new_path="${new_path/%.exe/}"
8716 
8717   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8718 
8719   # First separate the path from the arguments. This will split at the first
8720   # space.
8721   complete="$FOUND_MAKE"
8722   path="${complete%% *}"
8723   tmp="$complete EOL"
8724   arguments="${tmp#* }"
8725 
8726   # Input might be given as Windows format, start by converting to
8727   # unix format.
8728   new_path="$path"
8729 
8730   windows_path="$new_path"
8731   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8732     unix_path=`$CYGPATH -u "$windows_path"`
8733     new_path="$unix_path"
8734   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8735     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8736     new_path="$unix_path"
8737   fi
8738 
8739 
8740   # Now try to locate executable using which
8741   new_path=`$WHICH "$new_path" 2> /dev/null`
8742 
8743   if test "x$new_path" = x; then
8744     # Oops. Which didn't find the executable.
8745     # The splitting of arguments from the executable at a space might have been incorrect,
8746     # since paths with space are more likely in Windows. Give it another try with the whole
8747     # argument.
8748     path="$complete"
8749     arguments="EOL"
8750     new_path="$path"
8751 
8752   windows_path="$new_path"
8753   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8754     unix_path=`$CYGPATH -u "$windows_path"`
8755     new_path="$unix_path"
8756   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8757     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8758     new_path="$unix_path"
8759   fi
8760 
8761 
8762     new_path=`$WHICH "$new_path" 2> /dev/null`
8763 
8764     if test "x$new_path" = x; then
8765       # It's still not found. Now this is an unrecoverable error.
8766       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8767 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8768       has_space=`$ECHO "$complete" | $GREP " "`
8769       if test "x$has_space" != x; then
8770         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8771 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8772       fi
8773       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8774     fi
8775   fi
8776 
8777   # Now new_path has a complete unix path to the binary
8778   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
8779     # Keep paths in /bin as-is, but remove trailing .exe if any
8780     new_path="${new_path/%.exe/}"
8781     # Do not save /bin paths to all_fixpath_prefixes!
8782   else
8783     # Not in mixed or Windows style, start by that.
8784     new_path=`cmd //c echo $new_path`
8785 
8786   input_path="$new_path"
8787   # Check if we need to convert this using DOS-style short mode. If the path
8788   # contains just simple characters, use it. Otherwise (spaces, weird characters),
8789   # take no chances and rewrite it.
8790   # Note: m4 eats our [], so we need to use [ and ] instead.
8791   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
8792   if test "x$has_forbidden_chars" != x; then
8793     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8794     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8795   fi
8796 
8797     # Output is in $new_path
8798 
8799   windows_path="$new_path"
8800   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8801     unix_path=`$CYGPATH -u "$windows_path"`
8802     new_path="$unix_path"
8803   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8804     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8805     new_path="$unix_path"
8806   fi
8807 
8808     # remove trailing .exe if any
8809     new_path="${new_path/%.exe/}"
8810 
8811     # Save the first 10 bytes of this path to the storage, so fixpath can work.
8812     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
8813   fi
8814 
8815   else
8816     # We're on a posix platform. Hooray! :)
8817     # First separate the path from the arguments. This will split at the first
8818     # space.
8819     complete="$FOUND_MAKE"
8820     path="${complete%% *}"
8821     tmp="$complete EOL"
8822     arguments="${tmp#* }"
8823 
8824     # Cannot rely on the command "which" here since it doesn't always work.
8825     is_absolute_path=`$ECHO "$path" | $GREP ^/`
8826     if test -z "$is_absolute_path"; then
8827       # Path to executable is not absolute. Find it.
8828       IFS_save="$IFS"
8829       IFS=:
8830       for p in $PATH; do
8831         if test -f "$p/$path" && test -x "$p/$path"; then
8832           new_path="$p/$path"
8833           break
8834         fi
8835       done
8836       IFS="$IFS_save"
8837     else
8838       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
8839 $as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
8840       new_path="$path"
8841     fi
8842 
8843     if test "x$new_path" = x; then
8844         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8845 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8846         has_space=`$ECHO "$complete" | $GREP " "`
8847         if test "x$has_space" != x; then
8848           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
8849 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
8850         fi
8851         as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8852       fi
8853   fi
8854 
8855       # Now join together the path and the arguments once again
8856       if test "x$arguments" != xEOL; then
8857         new_complete="$new_path ${arguments% *}"
8858       else
8859         new_complete="$new_path"
8860       fi
8861 
8862   if test "x$complete" != "x$new_complete"; then
8863       FOUND_MAKE="$new_complete"
8864       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
8865 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
8866     fi
8867 
8868         fi
8869       fi
8870     fi
8871   fi
8872 
8873 
8874     if test "x$FOUND_MAKE" = x; then
8875       for ac_prog in make
8876 do
8877   # Extract the first word of "$ac_prog", so it can be a program name with args.
8878 set dummy $ac_prog; ac_word=$2
8879 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8880 $as_echo_n "checking for $ac_word... " >&6; }
8881 if test "${ac_cv_path_CHECK_MAKE+set}" = set; then :
8882   $as_echo_n "(cached) " >&6
8883 else
8884   case $CHECK_MAKE in
8885   [\\/]* | ?:[\\/]*)
8886   ac_cv_path_CHECK_MAKE="$CHECK_MAKE" # Let the user override the test with a path.
8887   ;;
8888   *)
8889   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8890 for as_dir in $PATH
8891 do
8892   IFS=$as_save_IFS
8893   test -z "$as_dir" && as_dir=.
8894     for ac_exec_ext in '' $ac_executable_extensions; do
8895   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8896     ac_cv_path_CHECK_MAKE="$as_dir/$ac_word$ac_exec_ext"
8897     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8898     break 2
8899   fi
8900 done
8901   done
8902 IFS=$as_save_IFS
8903 
8904   ;;
8905 esac
8906 fi
8907 CHECK_MAKE=$ac_cv_path_CHECK_MAKE
8908 if test -n "$CHECK_MAKE"; then
8909   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_MAKE" >&5
8910 $as_echo "$CHECK_MAKE" >&6; }
8911 else
8912   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8913 $as_echo "no" >&6; }
8914 fi
8915 
8916 
8917   test -n "$CHECK_MAKE" && break
8918 done
8919 
8920 
8921   MAKE_CANDIDATE=""$CHECK_MAKE""
8922   DESCRIPTION="make in PATH"
8923   if test "x$MAKE_CANDIDATE" != x; then
8924     { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
8925 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
8926     MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
8927     IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
8928     if test "x$IS_GNU_MAKE" = x; then
8929       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
8930 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
8931     else
8932       IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'`
8933       if test "x$IS_MODERN_MAKE" = x; then
8934         { $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
8935 $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;}
8936       else
8937         if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
8938           if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8939             MAKE_EXPECTED_ENV='cygwin'
8940           elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8941             MAKE_EXPECTED_ENV='msys'
8942           else
8943             as_fn_error $? "Unknown Windows environment" "$LINENO" 5
8944           fi
8945           MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
8946           IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
8947         else
8948           # Not relevant for non-Windows
8949           IS_MAKE_CORRECT_ENV=true
8950         fi
8951         if test "x$IS_MAKE_CORRECT_ENV" = x; then
8952           { $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
8953 $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;}
8954         else
8955           FOUND_MAKE=$MAKE_CANDIDATE
8956 
8957   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8958 
8959   # First separate the path from the arguments. This will split at the first
8960   # space.
8961   complete="$FOUND_MAKE"
8962   path="${complete%% *}"
8963   tmp="$complete EOL"
8964   arguments="${tmp#* }"
8965 
8966   # Input might be given as Windows format, start by converting to
8967   # unix format.
8968   new_path=`$CYGPATH -u "$path"`
8969 
8970   # Now try to locate executable using which
8971   new_path=`$WHICH "$new_path" 2> /dev/null`
8972   # bat and cmd files are not always considered executable in cygwin causing which
8973   # to not find them
8974   if test "x$new_path" = x \
8975            && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8976            && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8977     new_path=`$CYGPATH -u "$path"`
8978   fi
8979   if test "x$new_path" = x; then
8980     # Oops. Which didn't find the executable.
8981     # The splitting of arguments from the executable at a space might have been incorrect,
8982     # since paths with space are more likely in Windows. Give it another try with the whole
8983     # argument.
8984     path="$complete"
8985     arguments="EOL"
8986     new_path=`$CYGPATH -u "$path"`
8987     new_path=`$WHICH "$new_path" 2> /dev/null`
8988     # bat and cmd files are not always considered executable in cygwin causing which
8989     # to not find them
8990     if test "x$new_path" = x \
8991              && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8992              && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8993       new_path=`$CYGPATH -u "$path"`
8994     fi
8995     if test "x$new_path" = x; then
8996       # It's still not found. Now this is an unrecoverable error.
8997       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8998 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8999       has_space=`$ECHO "$complete" | $GREP " "`
9000       if test "x$has_space" != x; then
9001         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9002 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9003       fi
9004       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9005     fi
9006   fi
9007 
9008   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
9009   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
9010   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
9011   # "foo.exe" is OK but "foo" is an error.
9012   #
9013   # This test is therefore slightly more accurate than "test -f" to check for file precense.
9014   # It is also a way to make sure we got the proper file name for the real test later on.
9015   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
9016   if test "x$test_shortpath" = x; then
9017     # Short path failed, file does not exist as specified.
9018     # Try adding .exe or .cmd
9019     if test -f "${new_path}.exe"; then
9020        input_to_shortpath="${new_path}.exe"
9021     elif test -f "${new_path}.cmd"; then
9022        input_to_shortpath="${new_path}.cmd"
9023     else
9024       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
9025 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
9026       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
9027 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
9028       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9029     fi
9030   else
9031     input_to_shortpath="$new_path"
9032   fi
9033 
9034   # Call helper function which possibly converts this using DOS-style short mode.
9035   # If so, the updated path is stored in $new_path.
9036   new_path="$input_to_shortpath"
9037 
9038   input_path="$input_to_shortpath"
9039   # Check if we need to convert this using DOS-style short mode. If the path
9040   # contains just simple characters, use it. Otherwise (spaces, weird characters),
9041   # take no chances and rewrite it.
9042   # Note: m4 eats our [], so we need to use [ and ] instead.
9043   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
9044   if test "x$has_forbidden_chars" != x; then
9045     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9046     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
9047     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
9048     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
9049       # Going to short mode and back again did indeed matter. Since short mode is
9050       # case insensitive, let's make it lowercase to improve readability.
9051       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9052       # Now convert it back to Unix-stile (cygpath)
9053       input_path=`$CYGPATH -u "$shortmode_path"`
9054       new_path="$input_path"
9055     fi
9056   fi
9057 
9058   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
9059   if test "x$test_cygdrive_prefix" = x; then
9060     # As a simple fix, exclude /usr/bin since it's not a real path.
9061     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
9062       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
9063       # a path prefixed by /cygdrive for fixpath to work.
9064       new_path="$CYGWIN_ROOT_PATH$input_path"
9065     fi
9066   fi
9067 
9068   # remove trailing .exe if any
9069   new_path="${new_path/%.exe/}"
9070 
9071   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9072 
9073   # First separate the path from the arguments. This will split at the first
9074   # space.
9075   complete="$FOUND_MAKE"
9076   path="${complete%% *}"
9077   tmp="$complete EOL"
9078   arguments="${tmp#* }"
9079 
9080   # Input might be given as Windows format, start by converting to
9081   # unix format.
9082   new_path="$path"
9083 
9084   windows_path="$new_path"
9085   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9086     unix_path=`$CYGPATH -u "$windows_path"`
9087     new_path="$unix_path"
9088   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9089     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9090     new_path="$unix_path"
9091   fi
9092 
9093 
9094   # Now try to locate executable using which
9095   new_path=`$WHICH "$new_path" 2> /dev/null`
9096 
9097   if test "x$new_path" = x; then
9098     # Oops. Which didn't find the executable.
9099     # The splitting of arguments from the executable at a space might have been incorrect,
9100     # since paths with space are more likely in Windows. Give it another try with the whole
9101     # argument.
9102     path="$complete"
9103     arguments="EOL"
9104     new_path="$path"
9105 
9106   windows_path="$new_path"
9107   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9108     unix_path=`$CYGPATH -u "$windows_path"`
9109     new_path="$unix_path"
9110   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9111     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9112     new_path="$unix_path"
9113   fi
9114 
9115 
9116     new_path=`$WHICH "$new_path" 2> /dev/null`
9117 
9118     if test "x$new_path" = x; then
9119       # It's still not found. Now this is an unrecoverable error.
9120       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9121 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9122       has_space=`$ECHO "$complete" | $GREP " "`
9123       if test "x$has_space" != x; then
9124         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9125 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9126       fi
9127       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9128     fi
9129   fi
9130 
9131   # Now new_path has a complete unix path to the binary
9132   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
9133     # Keep paths in /bin as-is, but remove trailing .exe if any
9134     new_path="${new_path/%.exe/}"
9135     # Do not save /bin paths to all_fixpath_prefixes!
9136   else
9137     # Not in mixed or Windows style, start by that.
9138     new_path=`cmd //c echo $new_path`
9139 
9140   input_path="$new_path"
9141   # Check if we need to convert this using DOS-style short mode. If the path
9142   # contains just simple characters, use it. Otherwise (spaces, weird characters),
9143   # take no chances and rewrite it.
9144   # Note: m4 eats our [], so we need to use [ and ] instead.
9145   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
9146   if test "x$has_forbidden_chars" != x; then
9147     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9148     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9149   fi
9150 
9151     # Output is in $new_path
9152 
9153   windows_path="$new_path"
9154   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9155     unix_path=`$CYGPATH -u "$windows_path"`
9156     new_path="$unix_path"
9157   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9158     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9159     new_path="$unix_path"
9160   fi
9161 
9162     # remove trailing .exe if any
9163     new_path="${new_path/%.exe/}"
9164 
9165     # Save the first 10 bytes of this path to the storage, so fixpath can work.
9166     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
9167   fi
9168 
9169   else
9170     # We're on a posix platform. Hooray! :)
9171     # First separate the path from the arguments. This will split at the first
9172     # space.
9173     complete="$FOUND_MAKE"
9174     path="${complete%% *}"
9175     tmp="$complete EOL"
9176     arguments="${tmp#* }"
9177 
9178     # Cannot rely on the command "which" here since it doesn't always work.
9179     is_absolute_path=`$ECHO "$path" | $GREP ^/`
9180     if test -z "$is_absolute_path"; then
9181       # Path to executable is not absolute. Find it.
9182       IFS_save="$IFS"
9183       IFS=:
9184       for p in $PATH; do
9185         if test -f "$p/$path" && test -x "$p/$path"; then
9186           new_path="$p/$path"
9187           break
9188         fi
9189       done
9190       IFS="$IFS_save"
9191     else
9192       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
9193 $as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
9194       new_path="$path"
9195     fi
9196 
9197     if test "x$new_path" = x; then
9198         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9199 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9200         has_space=`$ECHO "$complete" | $GREP " "`
9201         if test "x$has_space" != x; then
9202           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
9203 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
9204         fi
9205         as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9206       fi
9207   fi
9208 
9209       # Now join together the path and the arguments once again
9210       if test "x$arguments" != xEOL; then
9211         new_complete="$new_path ${arguments% *}"
9212       else
9213         new_complete="$new_path"
9214       fi
9215 
9216   if test "x$complete" != "x$new_complete"; then
9217       FOUND_MAKE="$new_complete"
9218       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
9219 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
9220     fi
9221 
9222         fi
9223       fi
9224     fi
9225   fi
9226 
9227     fi
9228 
9229     if test "x$FOUND_MAKE" = x; then
9230       if test "x$TOOLS_DIR" != x; then
9231         # We have a tools-dir, check that as well before giving up.
9232         OLD_PATH=$PATH
9233         PATH=$TOOLS_DIR:$PATH
9234         for ac_prog in gmake
9235 do
9236   # Extract the first word of "$ac_prog", so it can be a program name with args.
9237 set dummy $ac_prog; ac_word=$2
9238 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9239 $as_echo_n "checking for $ac_word... " >&6; }
9240 if test "${ac_cv_path_CHECK_TOOLSDIR_GMAKE+set}" = set; then :
9241   $as_echo_n "(cached) " >&6
9242 else
9243   case $CHECK_TOOLSDIR_GMAKE in
9244   [\\/]* | ?:[\\/]*)
9245   ac_cv_path_CHECK_TOOLSDIR_GMAKE="$CHECK_TOOLSDIR_GMAKE" # Let the user override the test with a path.
9246   ;;
9247   *)
9248   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9249 for as_dir in $PATH
9250 do
9251   IFS=$as_save_IFS
9252   test -z "$as_dir" && as_dir=.
9253     for ac_exec_ext in '' $ac_executable_extensions; do
9254   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9255     ac_cv_path_CHECK_TOOLSDIR_GMAKE="$as_dir/$ac_word$ac_exec_ext"
9256     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9257     break 2
9258   fi
9259 done
9260   done
9261 IFS=$as_save_IFS
9262 
9263   ;;
9264 esac
9265 fi
9266 CHECK_TOOLSDIR_GMAKE=$ac_cv_path_CHECK_TOOLSDIR_GMAKE
9267 if test -n "$CHECK_TOOLSDIR_GMAKE"; then
9268   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_GMAKE" >&5
9269 $as_echo "$CHECK_TOOLSDIR_GMAKE" >&6; }
9270 else
9271   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9272 $as_echo "no" >&6; }
9273 fi
9274 
9275 
9276   test -n "$CHECK_TOOLSDIR_GMAKE" && break
9277 done
9278 
9279 
9280   MAKE_CANDIDATE=""$CHECK_TOOLSDIR_GMAKE""
9281   DESCRIPTION="gmake in tools-dir"
9282   if test "x$MAKE_CANDIDATE" != x; then
9283     { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
9284 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
9285     MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
9286     IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
9287     if test "x$IS_GNU_MAKE" = x; then
9288       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
9289 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
9290     else
9291       IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'`
9292       if test "x$IS_MODERN_MAKE" = x; then
9293         { $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
9294 $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;}
9295       else
9296         if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
9297           if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9298             MAKE_EXPECTED_ENV='cygwin'
9299           elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9300             MAKE_EXPECTED_ENV='msys'
9301           else
9302             as_fn_error $? "Unknown Windows environment" "$LINENO" 5
9303           fi
9304           MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
9305           IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
9306         else
9307           # Not relevant for non-Windows
9308           IS_MAKE_CORRECT_ENV=true
9309         fi
9310         if test "x$IS_MAKE_CORRECT_ENV" = x; then
9311           { $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
9312 $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;}
9313         else
9314           FOUND_MAKE=$MAKE_CANDIDATE
9315 
9316   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9317 
9318   # First separate the path from the arguments. This will split at the first
9319   # space.
9320   complete="$FOUND_MAKE"
9321   path="${complete%% *}"
9322   tmp="$complete EOL"
9323   arguments="${tmp#* }"
9324 
9325   # Input might be given as Windows format, start by converting to
9326   # unix format.
9327   new_path=`$CYGPATH -u "$path"`
9328 
9329   # Now try to locate executable using which
9330   new_path=`$WHICH "$new_path" 2> /dev/null`
9331   # bat and cmd files are not always considered executable in cygwin causing which
9332   # to not find them
9333   if test "x$new_path" = x \
9334            && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
9335            && test "x`$LS \"$path\" 2>/dev/null`" != x; then
9336     new_path=`$CYGPATH -u "$path"`
9337   fi
9338   if test "x$new_path" = x; then
9339     # Oops. Which didn't find the executable.
9340     # The splitting of arguments from the executable at a space might have been incorrect,
9341     # since paths with space are more likely in Windows. Give it another try with the whole
9342     # argument.
9343     path="$complete"
9344     arguments="EOL"
9345     new_path=`$CYGPATH -u "$path"`
9346     new_path=`$WHICH "$new_path" 2> /dev/null`
9347     # bat and cmd files are not always considered executable in cygwin causing which
9348     # to not find them
9349     if test "x$new_path" = x \
9350              && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
9351              && test "x`$LS \"$path\" 2>/dev/null`" != x; then
9352       new_path=`$CYGPATH -u "$path"`
9353     fi
9354     if test "x$new_path" = x; then
9355       # It's still not found. Now this is an unrecoverable error.
9356       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9357 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9358       has_space=`$ECHO "$complete" | $GREP " "`
9359       if test "x$has_space" != x; then
9360         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9361 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9362       fi
9363       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9364     fi
9365   fi
9366 
9367   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
9368   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
9369   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
9370   # "foo.exe" is OK but "foo" is an error.
9371   #
9372   # This test is therefore slightly more accurate than "test -f" to check for file precense.
9373   # It is also a way to make sure we got the proper file name for the real test later on.
9374   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
9375   if test "x$test_shortpath" = x; then
9376     # Short path failed, file does not exist as specified.
9377     # Try adding .exe or .cmd
9378     if test -f "${new_path}.exe"; then
9379        input_to_shortpath="${new_path}.exe"
9380     elif test -f "${new_path}.cmd"; then
9381        input_to_shortpath="${new_path}.cmd"
9382     else
9383       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
9384 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
9385       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
9386 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
9387       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9388     fi
9389   else
9390     input_to_shortpath="$new_path"
9391   fi
9392 
9393   # Call helper function which possibly converts this using DOS-style short mode.
9394   # If so, the updated path is stored in $new_path.
9395   new_path="$input_to_shortpath"
9396 
9397   input_path="$input_to_shortpath"
9398   # Check if we need to convert this using DOS-style short mode. If the path
9399   # contains just simple characters, use it. Otherwise (spaces, weird characters),
9400   # take no chances and rewrite it.
9401   # Note: m4 eats our [], so we need to use [ and ] instead.
9402   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
9403   if test "x$has_forbidden_chars" != x; then
9404     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9405     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
9406     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
9407     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
9408       # Going to short mode and back again did indeed matter. Since short mode is
9409       # case insensitive, let's make it lowercase to improve readability.
9410       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9411       # Now convert it back to Unix-stile (cygpath)
9412       input_path=`$CYGPATH -u "$shortmode_path"`
9413       new_path="$input_path"
9414     fi
9415   fi
9416 
9417   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
9418   if test "x$test_cygdrive_prefix" = x; then
9419     # As a simple fix, exclude /usr/bin since it's not a real path.
9420     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
9421       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
9422       # a path prefixed by /cygdrive for fixpath to work.
9423       new_path="$CYGWIN_ROOT_PATH$input_path"
9424     fi
9425   fi
9426 
9427   # remove trailing .exe if any
9428   new_path="${new_path/%.exe/}"
9429 
9430   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9431 
9432   # First separate the path from the arguments. This will split at the first
9433   # space.
9434   complete="$FOUND_MAKE"
9435   path="${complete%% *}"
9436   tmp="$complete EOL"
9437   arguments="${tmp#* }"
9438 
9439   # Input might be given as Windows format, start by converting to
9440   # unix format.
9441   new_path="$path"
9442 
9443   windows_path="$new_path"
9444   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9445     unix_path=`$CYGPATH -u "$windows_path"`
9446     new_path="$unix_path"
9447   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9448     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9449     new_path="$unix_path"
9450   fi
9451 
9452 
9453   # Now try to locate executable using which
9454   new_path=`$WHICH "$new_path" 2> /dev/null`
9455 
9456   if test "x$new_path" = x; then
9457     # Oops. Which didn't find the executable.
9458     # The splitting of arguments from the executable at a space might have been incorrect,
9459     # since paths with space are more likely in Windows. Give it another try with the whole
9460     # argument.
9461     path="$complete"
9462     arguments="EOL"
9463     new_path="$path"
9464 
9465   windows_path="$new_path"
9466   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9467     unix_path=`$CYGPATH -u "$windows_path"`
9468     new_path="$unix_path"
9469   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9470     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9471     new_path="$unix_path"
9472   fi
9473 
9474 
9475     new_path=`$WHICH "$new_path" 2> /dev/null`
9476 
9477     if test "x$new_path" = x; then
9478       # It's still not found. Now this is an unrecoverable error.
9479       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9480 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9481       has_space=`$ECHO "$complete" | $GREP " "`
9482       if test "x$has_space" != x; then
9483         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9484 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9485       fi
9486       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9487     fi
9488   fi
9489 
9490   # Now new_path has a complete unix path to the binary
9491   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
9492     # Keep paths in /bin as-is, but remove trailing .exe if any
9493     new_path="${new_path/%.exe/}"
9494     # Do not save /bin paths to all_fixpath_prefixes!
9495   else
9496     # Not in mixed or Windows style, start by that.
9497     new_path=`cmd //c echo $new_path`
9498 
9499   input_path="$new_path"
9500   # Check if we need to convert this using DOS-style short mode. If the path
9501   # contains just simple characters, use it. Otherwise (spaces, weird characters),
9502   # take no chances and rewrite it.
9503   # Note: m4 eats our [], so we need to use [ and ] instead.
9504   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
9505   if test "x$has_forbidden_chars" != x; then
9506     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9507     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9508   fi
9509 
9510     # Output is in $new_path
9511 
9512   windows_path="$new_path"
9513   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9514     unix_path=`$CYGPATH -u "$windows_path"`
9515     new_path="$unix_path"
9516   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9517     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9518     new_path="$unix_path"
9519   fi
9520 
9521     # remove trailing .exe if any
9522     new_path="${new_path/%.exe/}"
9523 
9524     # Save the first 10 bytes of this path to the storage, so fixpath can work.
9525     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
9526   fi
9527 
9528   else
9529     # We're on a posix platform. Hooray! :)
9530     # First separate the path from the arguments. This will split at the first
9531     # space.
9532     complete="$FOUND_MAKE"
9533     path="${complete%% *}"
9534     tmp="$complete EOL"
9535     arguments="${tmp#* }"
9536 
9537     # Cannot rely on the command "which" here since it doesn't always work.
9538     is_absolute_path=`$ECHO "$path" | $GREP ^/`
9539     if test -z "$is_absolute_path"; then
9540       # Path to executable is not absolute. Find it.
9541       IFS_save="$IFS"
9542       IFS=:
9543       for p in $PATH; do
9544         if test -f "$p/$path" && test -x "$p/$path"; then
9545           new_path="$p/$path"
9546           break
9547         fi
9548       done
9549       IFS="$IFS_save"
9550     else
9551       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
9552 $as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
9553       new_path="$path"
9554     fi
9555 
9556     if test "x$new_path" = x; then
9557         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9558 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9559         has_space=`$ECHO "$complete" | $GREP " "`
9560         if test "x$has_space" != x; then
9561           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
9562 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
9563         fi
9564         as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9565       fi
9566   fi
9567 
9568       # Now join together the path and the arguments once again
9569       if test "x$arguments" != xEOL; then
9570         new_complete="$new_path ${arguments% *}"
9571       else
9572         new_complete="$new_path"
9573       fi
9574 
9575   if test "x$complete" != "x$new_complete"; then
9576       FOUND_MAKE="$new_complete"
9577       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
9578 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
9579     fi
9580 
9581         fi
9582       fi
9583     fi
9584   fi
9585 
9586         if test "x$FOUND_MAKE" = x; then
9587           for ac_prog in make
9588 do
9589   # Extract the first word of "$ac_prog", so it can be a program name with args.
9590 set dummy $ac_prog; ac_word=$2
9591 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9592 $as_echo_n "checking for $ac_word... " >&6; }
9593 if test "${ac_cv_path_CHECK_TOOLSDIR_MAKE+set}" = set; then :
9594   $as_echo_n "(cached) " >&6
9595 else
9596   case $CHECK_TOOLSDIR_MAKE in
9597   [\\/]* | ?:[\\/]*)
9598   ac_cv_path_CHECK_TOOLSDIR_MAKE="$CHECK_TOOLSDIR_MAKE" # Let the user override the test with a path.
9599   ;;
9600   *)
9601   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9602 for as_dir in $PATH
9603 do
9604   IFS=$as_save_IFS
9605   test -z "$as_dir" && as_dir=.
9606     for ac_exec_ext in '' $ac_executable_extensions; do
9607   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9608     ac_cv_path_CHECK_TOOLSDIR_MAKE="$as_dir/$ac_word$ac_exec_ext"
9609     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9610     break 2
9611   fi
9612 done
9613   done
9614 IFS=$as_save_IFS
9615 
9616   ;;
9617 esac
9618 fi
9619 CHECK_TOOLSDIR_MAKE=$ac_cv_path_CHECK_TOOLSDIR_MAKE
9620 if test -n "$CHECK_TOOLSDIR_MAKE"; then
9621   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_MAKE" >&5
9622 $as_echo "$CHECK_TOOLSDIR_MAKE" >&6; }
9623 else
9624   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9625 $as_echo "no" >&6; }
9626 fi
9627 
9628 
9629   test -n "$CHECK_TOOLSDIR_MAKE" && break
9630 done
9631 
9632 
9633   MAKE_CANDIDATE=""$CHECK_TOOLSDIR_MAKE""
9634   DESCRIPTION="make in tools-dir"
9635   if test "x$MAKE_CANDIDATE" != x; then
9636     { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
9637 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
9638     MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
9639     IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
9640     if test "x$IS_GNU_MAKE" = x; then
9641       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
9642 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
9643     else
9644       IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'`
9645       if test "x$IS_MODERN_MAKE" = x; then
9646         { $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
9647 $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;}
9648       else
9649         if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
9650           if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9651             MAKE_EXPECTED_ENV='cygwin'
9652           elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9653             MAKE_EXPECTED_ENV='msys'
9654           else
9655             as_fn_error $? "Unknown Windows environment" "$LINENO" 5
9656           fi
9657           MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
9658           IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
9659         else
9660           # Not relevant for non-Windows
9661           IS_MAKE_CORRECT_ENV=true
9662         fi
9663         if test "x$IS_MAKE_CORRECT_ENV" = x; then
9664           { $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
9665 $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;}
9666         else
9667           FOUND_MAKE=$MAKE_CANDIDATE
9668 
9669   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9670 
9671   # First separate the path from the arguments. This will split at the first
9672   # space.
9673   complete="$FOUND_MAKE"
9674   path="${complete%% *}"
9675   tmp="$complete EOL"
9676   arguments="${tmp#* }"
9677 
9678   # Input might be given as Windows format, start by converting to
9679   # unix format.
9680   new_path=`$CYGPATH -u "$path"`
9681 
9682   # Now try to locate executable using which
9683   new_path=`$WHICH "$new_path" 2> /dev/null`
9684   # bat and cmd files are not always considered executable in cygwin causing which
9685   # to not find them
9686   if test "x$new_path" = x \
9687            && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
9688            && test "x`$LS \"$path\" 2>/dev/null`" != x; then
9689     new_path=`$CYGPATH -u "$path"`
9690   fi
9691   if test "x$new_path" = x; then
9692     # Oops. Which didn't find the executable.
9693     # The splitting of arguments from the executable at a space might have been incorrect,
9694     # since paths with space are more likely in Windows. Give it another try with the whole
9695     # argument.
9696     path="$complete"
9697     arguments="EOL"
9698     new_path=`$CYGPATH -u "$path"`
9699     new_path=`$WHICH "$new_path" 2> /dev/null`
9700     # bat and cmd files are not always considered executable in cygwin causing which
9701     # to not find them
9702     if test "x$new_path" = x \
9703              && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
9704              && test "x`$LS \"$path\" 2>/dev/null`" != x; then
9705       new_path=`$CYGPATH -u "$path"`
9706     fi
9707     if test "x$new_path" = x; then
9708       # It's still not found. Now this is an unrecoverable error.
9709       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9710 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9711       has_space=`$ECHO "$complete" | $GREP " "`
9712       if test "x$has_space" != x; then
9713         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9714 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9715       fi
9716       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9717     fi
9718   fi
9719 
9720   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
9721   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
9722   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
9723   # "foo.exe" is OK but "foo" is an error.
9724   #
9725   # This test is therefore slightly more accurate than "test -f" to check for file precense.
9726   # It is also a way to make sure we got the proper file name for the real test later on.
9727   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
9728   if test "x$test_shortpath" = x; then
9729     # Short path failed, file does not exist as specified.
9730     # Try adding .exe or .cmd
9731     if test -f "${new_path}.exe"; then
9732        input_to_shortpath="${new_path}.exe"
9733     elif test -f "${new_path}.cmd"; then
9734        input_to_shortpath="${new_path}.cmd"
9735     else
9736       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
9737 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
9738       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
9739 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
9740       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9741     fi
9742   else
9743     input_to_shortpath="$new_path"
9744   fi
9745 
9746   # Call helper function which possibly converts this using DOS-style short mode.
9747   # If so, the updated path is stored in $new_path.
9748   new_path="$input_to_shortpath"
9749 
9750   input_path="$input_to_shortpath"
9751   # Check if we need to convert this using DOS-style short mode. If the path
9752   # contains just simple characters, use it. Otherwise (spaces, weird characters),
9753   # take no chances and rewrite it.
9754   # Note: m4 eats our [], so we need to use [ and ] instead.
9755   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
9756   if test "x$has_forbidden_chars" != x; then
9757     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9758     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
9759     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
9760     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
9761       # Going to short mode and back again did indeed matter. Since short mode is
9762       # case insensitive, let's make it lowercase to improve readability.
9763       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9764       # Now convert it back to Unix-stile (cygpath)
9765       input_path=`$CYGPATH -u "$shortmode_path"`
9766       new_path="$input_path"
9767     fi
9768   fi
9769 
9770   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
9771   if test "x$test_cygdrive_prefix" = x; then
9772     # As a simple fix, exclude /usr/bin since it's not a real path.
9773     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
9774       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
9775       # a path prefixed by /cygdrive for fixpath to work.
9776       new_path="$CYGWIN_ROOT_PATH$input_path"
9777     fi
9778   fi
9779 
9780   # remove trailing .exe if any
9781   new_path="${new_path/%.exe/}"
9782 
9783   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9784 
9785   # First separate the path from the arguments. This will split at the first
9786   # space.
9787   complete="$FOUND_MAKE"
9788   path="${complete%% *}"
9789   tmp="$complete EOL"
9790   arguments="${tmp#* }"
9791 
9792   # Input might be given as Windows format, start by converting to
9793   # unix format.
9794   new_path="$path"
9795 
9796   windows_path="$new_path"
9797   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9798     unix_path=`$CYGPATH -u "$windows_path"`
9799     new_path="$unix_path"
9800   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9801     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9802     new_path="$unix_path"
9803   fi
9804 
9805 
9806   # Now try to locate executable using which
9807   new_path=`$WHICH "$new_path" 2> /dev/null`
9808 
9809   if test "x$new_path" = x; then
9810     # Oops. Which didn't find the executable.
9811     # The splitting of arguments from the executable at a space might have been incorrect,
9812     # since paths with space are more likely in Windows. Give it another try with the whole
9813     # argument.
9814     path="$complete"
9815     arguments="EOL"
9816     new_path="$path"
9817 
9818   windows_path="$new_path"
9819   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9820     unix_path=`$CYGPATH -u "$windows_path"`
9821     new_path="$unix_path"
9822   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9823     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9824     new_path="$unix_path"
9825   fi
9826 
9827 
9828     new_path=`$WHICH "$new_path" 2> /dev/null`
9829 
9830     if test "x$new_path" = x; then
9831       # It's still not found. Now this is an unrecoverable error.
9832       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9833 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9834       has_space=`$ECHO "$complete" | $GREP " "`
9835       if test "x$has_space" != x; then
9836         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9837 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9838       fi
9839       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9840     fi
9841   fi
9842 
9843   # Now new_path has a complete unix path to the binary
9844   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
9845     # Keep paths in /bin as-is, but remove trailing .exe if any
9846     new_path="${new_path/%.exe/}"
9847     # Do not save /bin paths to all_fixpath_prefixes!
9848   else
9849     # Not in mixed or Windows style, start by that.
9850     new_path=`cmd //c echo $new_path`
9851 
9852   input_path="$new_path"
9853   # Check if we need to convert this using DOS-style short mode. If the path
9854   # contains just simple characters, use it. Otherwise (spaces, weird characters),
9855   # take no chances and rewrite it.
9856   # Note: m4 eats our [], so we need to use [ and ] instead.
9857   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
9858   if test "x$has_forbidden_chars" != x; then
9859     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9860     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9861   fi
9862 
9863     # Output is in $new_path
9864 
9865   windows_path="$new_path"
9866   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9867     unix_path=`$CYGPATH -u "$windows_path"`
9868     new_path="$unix_path"
9869   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9870     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9871     new_path="$unix_path"
9872   fi
9873 
9874     # remove trailing .exe if any
9875     new_path="${new_path/%.exe/}"
9876 
9877     # Save the first 10 bytes of this path to the storage, so fixpath can work.
9878     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
9879   fi
9880 
9881   else
9882     # We're on a posix platform. Hooray! :)
9883     # First separate the path from the arguments. This will split at the first
9884     # space.
9885     complete="$FOUND_MAKE"
9886     path="${complete%% *}"
9887     tmp="$complete EOL"
9888     arguments="${tmp#* }"
9889 
9890     # Cannot rely on the command "which" here since it doesn't always work.
9891     is_absolute_path=`$ECHO "$path" | $GREP ^/`
9892     if test -z "$is_absolute_path"; then
9893       # Path to executable is not absolute. Find it.
9894       IFS_save="$IFS"
9895       IFS=:
9896       for p in $PATH; do
9897         if test -f "$p/$path" && test -x "$p/$path"; then
9898           new_path="$p/$path"
9899           break
9900         fi
9901       done
9902       IFS="$IFS_save"
9903     else
9904       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
9905 $as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
9906       new_path="$path"
9907     fi
9908 
9909     if test "x$new_path" = x; then
9910         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9911 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9912         has_space=`$ECHO "$complete" | $GREP " "`
9913         if test "x$has_space" != x; then
9914           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
9915 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
9916         fi
9917         as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9918       fi
9919   fi
9920 
9921       # Now join together the path and the arguments once again
9922       if test "x$arguments" != xEOL; then
9923         new_complete="$new_path ${arguments% *}"
9924       else
9925         new_complete="$new_path"
9926       fi
9927 
9928   if test "x$complete" != "x$new_complete"; then
9929       FOUND_MAKE="$new_complete"
9930       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
9931 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
9932     fi
9933 
9934         fi
9935       fi
9936     fi
9937   fi
9938 
9939         fi
9940         PATH=$OLD_PATH
9941       fi
9942     fi
9943 
9944     if test "x$FOUND_MAKE" = x; then
9945       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
9946     fi
9947   fi
9948 
9949   MAKE=$FOUND_MAKE
9950 
9951   { $as_echo "$as_me:${as_lineno-$LINENO}: Using GNU make 3.81 (or later) at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&5
9952 $as_echo "$as_me: Using GNU make 3.81 (or later) at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&6;}
9953 
9954 
9955 
9956     # Test if find supports -delete
9957     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if find supports -delete" >&5
9958 $as_echo_n "checking if find supports -delete... " >&6; }
9959     FIND_DELETE="-delete"
9960 
9961     DELETEDIR=`$MKTEMP -d tmp.XXXXXXXXXX` || (echo Could not create temporary directory!; exit $?)
9962 
9963     echo Hejsan > $DELETEDIR/TestIfFindSupportsDelete
9964 
9965     TEST_DELETE=`$FIND "$DELETEDIR" -name TestIfFindSupportsDelete $FIND_DELETE 2>&1`
9966     if test -f $DELETEDIR/TestIfFindSupportsDelete; then
9967         # No, it does not.
9968         rm $DELETEDIR/TestIfFindSupportsDelete
9969         FIND_DELETE="-exec rm \{\} \+"
9970         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9971 $as_echo "no" >&6; }
9972     else
9973         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9974 $as_echo "yes" >&6; }
9975     fi
9976     rmdir $DELETEDIR
9977 
9978 
9979 
9980 # These tools might not be installed by default,
9981 # need hint on how to install them.
9982 
9983     for ac_prog in unzip
9984 do
9985   # Extract the first word of "$ac_prog", so it can be a program name with args.
9986 set dummy $ac_prog; ac_word=$2
9987 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9988 $as_echo_n "checking for $ac_word... " >&6; }
9989 if test "${ac_cv_path_UNZIP+set}" = set; then :
9990   $as_echo_n "(cached) " >&6
9991 else
9992   case $UNZIP in
9993   [\\/]* | ?:[\\/]*)
9994   ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
9995   ;;
9996   *)
9997   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9998 for as_dir in $PATH
9999 do
10000   IFS=$as_save_IFS
10001   test -z "$as_dir" && as_dir=.
10002     for ac_exec_ext in '' $ac_executable_extensions; do
10003   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10004     ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
10005     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10006     break 2
10007   fi
10008 done
10009   done
10010 IFS=$as_save_IFS
10011 
10012   ;;
10013 esac
10014 fi
10015 UNZIP=$ac_cv_path_UNZIP
10016 if test -n "$UNZIP"; then
10017   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
10018 $as_echo "$UNZIP" >&6; }
10019 else
10020   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10021 $as_echo "no" >&6; }
10022 fi
10023 
10024 
10025   test -n "$UNZIP" && break
10026 done
10027 
10028 
10029     if test "x$UNZIP" = x; then
10030         if test "xunzip" = x; then
10031           PROG_NAME=unzip
10032         else
10033           PROG_NAME=unzip
10034         fi
10035         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
10036 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
10037         as_fn_error $? "Cannot continue" "$LINENO" 5
10038     fi
10039 
10040 
10041 
10042     for ac_prog in zip
10043 do
10044   # Extract the first word of "$ac_prog", so it can be a program name with args.
10045 set dummy $ac_prog; ac_word=$2
10046 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10047 $as_echo_n "checking for $ac_word... " >&6; }
10048 if test "${ac_cv_path_ZIP+set}" = set; then :
10049   $as_echo_n "(cached) " >&6
10050 else
10051   case $ZIP in
10052   [\\/]* | ?:[\\/]*)
10053   ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
10054   ;;
10055   *)
10056   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10057 for as_dir in $PATH
10058 do
10059   IFS=$as_save_IFS
10060   test -z "$as_dir" && as_dir=.
10061     for ac_exec_ext in '' $ac_executable_extensions; do
10062   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10063     ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
10064     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10065     break 2
10066   fi
10067 done
10068   done
10069 IFS=$as_save_IFS
10070 
10071   ;;
10072 esac
10073 fi
10074 ZIP=$ac_cv_path_ZIP
10075 if test -n "$ZIP"; then
10076   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
10077 $as_echo "$ZIP" >&6; }
10078 else
10079   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10080 $as_echo "no" >&6; }
10081 fi
10082 
10083 
10084   test -n "$ZIP" && break
10085 done
10086 
10087 
10088     if test "x$ZIP" = x; then
10089         if test "xzip" = x; then
10090           PROG_NAME=zip
10091         else
10092           PROG_NAME=zip
10093         fi
10094         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
10095 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
10096         as_fn_error $? "Cannot continue" "$LINENO" 5
10097     fi
10098 
10099 
10100 
10101 # Non-required basic tools
10102 
10103 # Extract the first word of "ldd", so it can be a program name with args.
10104 set dummy ldd; ac_word=$2
10105 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10106 $as_echo_n "checking for $ac_word... " >&6; }
10107 if test "${ac_cv_path_LDD+set}" = set; then :
10108   $as_echo_n "(cached) " >&6
10109 else
10110   case $LDD in
10111   [\\/]* | ?:[\\/]*)
10112   ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
10113   ;;
10114   *)
10115   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10116 for as_dir in $PATH
10117 do
10118   IFS=$as_save_IFS
10119   test -z "$as_dir" && as_dir=.
10120     for ac_exec_ext in '' $ac_executable_extensions; do
10121   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10122     ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
10123     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10124     break 2
10125   fi
10126 done
10127   done
10128 IFS=$as_save_IFS
10129 
10130   ;;
10131 esac
10132 fi
10133 LDD=$ac_cv_path_LDD
10134 if test -n "$LDD"; then
10135   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
10136 $as_echo "$LDD" >&6; }
10137 else
10138   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10139 $as_echo "no" >&6; }
10140 fi
10141 
10142 
10143 if test "x$LDD" = "x"; then
10144     # List shared lib dependencies is used for
10145     # debug output and checking for forbidden dependencies.
10146     # We can build without it.
10147     LDD="true"
10148 fi
10149 # Extract the first word of "otool", so it can be a program name with args.
10150 set dummy otool; ac_word=$2
10151 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10152 $as_echo_n "checking for $ac_word... " >&6; }
10153 if test "${ac_cv_path_OTOOL+set}" = set; then :
10154   $as_echo_n "(cached) " >&6
10155 else
10156   case $OTOOL in
10157   [\\/]* | ?:[\\/]*)
10158   ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
10159   ;;
10160   *)
10161   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10162 for as_dir in $PATH
10163 do
10164   IFS=$as_save_IFS
10165   test -z "$as_dir" && as_dir=.
10166     for ac_exec_ext in '' $ac_executable_extensions; do
10167   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10168     ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
10169     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10170     break 2
10171   fi
10172 done
10173   done
10174 IFS=$as_save_IFS
10175 
10176   ;;
10177 esac
10178 fi
10179 OTOOL=$ac_cv_path_OTOOL
10180 if test -n "$OTOOL"; then
10181   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
10182 $as_echo "$OTOOL" >&6; }
10183 else
10184   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10185 $as_echo "no" >&6; }
10186 fi
10187 
10188 
10189 if test "x$OTOOL" = "x"; then
10190    OTOOL="true"
10191 fi
10192 for ac_prog in readelf greadelf
10193 do
10194   # Extract the first word of "$ac_prog", so it can be a program name with args.
10195 set dummy $ac_prog; ac_word=$2
10196 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10197 $as_echo_n "checking for $ac_word... " >&6; }
10198 if test "${ac_cv_path_READELF+set}" = set; then :
10199   $as_echo_n "(cached) " >&6
10200 else
10201   case $READELF in
10202   [\\/]* | ?:[\\/]*)
10203   ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
10204   ;;
10205   *)
10206   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10207 for as_dir in $PATH
10208 do
10209   IFS=$as_save_IFS
10210   test -z "$as_dir" && as_dir=.
10211     for ac_exec_ext in '' $ac_executable_extensions; do
10212   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10213     ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
10214     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10215     break 2
10216   fi
10217 done
10218   done
10219 IFS=$as_save_IFS
10220 
10221   ;;
10222 esac
10223 fi
10224 READELF=$ac_cv_path_READELF
10225 if test -n "$READELF"; then
10226   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
10227 $as_echo "$READELF" >&6; }
10228 else
10229   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10230 $as_echo "no" >&6; }
10231 fi
10232 
10233 
10234   test -n "$READELF" && break
10235 done
10236 
10237 # Extract the first word of "hg", so it can be a program name with args.
10238 set dummy hg; ac_word=$2
10239 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10240 $as_echo_n "checking for $ac_word... " >&6; }
10241 if test "${ac_cv_path_HG+set}" = set; then :
10242   $as_echo_n "(cached) " >&6
10243 else
10244   case $HG in
10245   [\\/]* | ?:[\\/]*)
10246   ac_cv_path_HG="$HG" # Let the user override the test with a path.
10247   ;;
10248   *)
10249   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10250 for as_dir in $PATH
10251 do
10252   IFS=$as_save_IFS
10253   test -z "$as_dir" && as_dir=.
10254     for ac_exec_ext in '' $ac_executable_extensions; do
10255   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10256     ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
10257     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10258     break 2
10259   fi
10260 done
10261   done
10262 IFS=$as_save_IFS
10263 
10264   ;;
10265 esac
10266 fi
10267 HG=$ac_cv_path_HG
10268 if test -n "$HG"; then
10269   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
10270 $as_echo "$HG" >&6; }
10271 else
10272   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10273 $as_echo "no" >&6; }
10274 fi
10275 
10276 
10277 # Extract the first word of "stat", so it can be a program name with args.
10278 set dummy stat; ac_word=$2
10279 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10280 $as_echo_n "checking for $ac_word... " >&6; }
10281 if test "${ac_cv_path_STAT+set}" = set; then :
10282   $as_echo_n "(cached) " >&6
10283 else
10284   case $STAT in
10285   [\\/]* | ?:[\\/]*)
10286   ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
10287   ;;
10288   *)
10289   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10290 for as_dir in $PATH
10291 do
10292   IFS=$as_save_IFS
10293   test -z "$as_dir" && as_dir=.
10294     for ac_exec_ext in '' $ac_executable_extensions; do
10295   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10296     ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
10297     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10298     break 2
10299   fi
10300 done
10301   done
10302 IFS=$as_save_IFS
10303 
10304   ;;
10305 esac
10306 fi
10307 STAT=$ac_cv_path_STAT
10308 if test -n "$STAT"; then
10309   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
10310 $as_echo "$STAT" >&6; }
10311 else
10312   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10313 $as_echo "no" >&6; }
10314 fi
10315 
10316 
10317 # Extract the first word of "time", so it can be a program name with args.
10318 set dummy time; ac_word=$2
10319 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10320 $as_echo_n "checking for $ac_word... " >&6; }
10321 if test "${ac_cv_path_TIME+set}" = set; then :
10322   $as_echo_n "(cached) " >&6
10323 else
10324   case $TIME in
10325   [\\/]* | ?:[\\/]*)
10326   ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
10327   ;;
10328   *)
10329   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10330 for as_dir in $PATH
10331 do
10332   IFS=$as_save_IFS
10333   test -z "$as_dir" && as_dir=.
10334     for ac_exec_ext in '' $ac_executable_extensions; do
10335   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10336     ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
10337     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10338     break 2
10339   fi
10340 done
10341   done
10342 IFS=$as_save_IFS
10343 
10344   ;;
10345 esac
10346 fi
10347 TIME=$ac_cv_path_TIME
10348 if test -n "$TIME"; then
10349   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
10350 $as_echo "$TIME" >&6; }
10351 else
10352   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10353 $as_echo "no" >&6; }
10354 fi
10355 
10356 
10357 
10358 if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
10359 
10360     for ac_prog in comm
10361 do
10362   # Extract the first word of "$ac_prog", so it can be a program name with args.
10363 set dummy $ac_prog; ac_word=$2
10364 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10365 $as_echo_n "checking for $ac_word... " >&6; }
10366 if test "${ac_cv_path_COMM+set}" = set; then :
10367   $as_echo_n "(cached) " >&6
10368 else
10369   case $COMM in
10370   [\\/]* | ?:[\\/]*)
10371   ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
10372   ;;
10373   *)
10374   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10375 for as_dir in $PATH
10376 do
10377   IFS=$as_save_IFS
10378   test -z "$as_dir" && as_dir=.
10379     for ac_exec_ext in '' $ac_executable_extensions; do
10380   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10381     ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
10382     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10383     break 2
10384   fi
10385 done
10386   done
10387 IFS=$as_save_IFS
10388 
10389   ;;
10390 esac
10391 fi
10392 COMM=$ac_cv_path_COMM
10393 if test -n "$COMM"; then
10394   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
10395 $as_echo "$COMM" >&6; }
10396 else
10397   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10398 $as_echo "no" >&6; }
10399 fi
10400 
10401 
10402   test -n "$COMM" && break
10403 done
10404 
10405 
10406     if test "x$COMM" = x; then
10407         if test "xcomm" = x; then
10408           PROG_NAME=comm
10409         else
10410           PROG_NAME=comm
10411         fi
10412         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
10413 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
10414         as_fn_error $? "Cannot continue" "$LINENO" 5
10415     fi
10416 
10417 
10418 fi
10419 
10420 if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
10421 
10422     for ac_prog in xattr
10423 do
10424   # Extract the first word of "$ac_prog", so it can be a program name with args.
10425 set dummy $ac_prog; ac_word=$2
10426 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10427 $as_echo_n "checking for $ac_word... " >&6; }
10428 if test "${ac_cv_path_XATTR+set}" = set; then :
10429   $as_echo_n "(cached) " >&6
10430 else
10431   case $XATTR in
10432   [\\/]* | ?:[\\/]*)
10433   ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
10434   ;;
10435   *)
10436   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10437 for as_dir in $PATH
10438 do
10439   IFS=$as_save_IFS
10440   test -z "$as_dir" && as_dir=.
10441     for ac_exec_ext in '' $ac_executable_extensions; do
10442   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10443     ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
10444     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10445     break 2
10446   fi
10447 done
10448   done
10449 IFS=$as_save_IFS
10450 
10451   ;;
10452 esac
10453 fi
10454 XATTR=$ac_cv_path_XATTR
10455 if test -n "$XATTR"; then
10456   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
10457 $as_echo "$XATTR" >&6; }
10458 else
10459   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10460 $as_echo "no" >&6; }
10461 fi
10462 
10463 
10464   test -n "$XATTR" && break
10465 done
10466 
10467 
10468     if test "x$XATTR" = x; then
10469         if test "xxattr" = x; then
10470           PROG_NAME=xattr
10471         else
10472           PROG_NAME=xattr
10473         fi
10474         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
10475 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
10476         as_fn_error $? "Cannot continue" "$LINENO" 5
10477     fi
10478 
10479 
10480 fi
10481 
10482 
10483 # Check if pkg-config is available.
10484 
10485 
10486 if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
10487         if test -n "$ac_tool_prefix"; then
10488   # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
10489 set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
10490 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10491 $as_echo_n "checking for $ac_word... " >&6; }
10492 if test "${ac_cv_path_PKG_CONFIG+set}" = set; then :
10493   $as_echo_n "(cached) " >&6
10494 else
10495   case $PKG_CONFIG in
10496   [\\/]* | ?:[\\/]*)
10497   ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
10498   ;;
10499   *)
10500   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10501 for as_dir in $PATH
10502 do
10503   IFS=$as_save_IFS
10504   test -z "$as_dir" && as_dir=.
10505     for ac_exec_ext in '' $ac_executable_extensions; do
10506   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10507     ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
10508     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10509     break 2
10510   fi
10511 done
10512   done
10513 IFS=$as_save_IFS
10514 
10515   ;;
10516 esac
10517 fi
10518 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
10519 if test -n "$PKG_CONFIG"; then
10520   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
10521 $as_echo "$PKG_CONFIG" >&6; }
10522 else
10523   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10524 $as_echo "no" >&6; }
10525 fi
10526 
10527 
10528 fi
10529 if test -z "$ac_cv_path_PKG_CONFIG"; then
10530   ac_pt_PKG_CONFIG=$PKG_CONFIG
10531   # Extract the first word of "pkg-config", so it can be a program name with args.
10532 set dummy pkg-config; ac_word=$2
10533 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10534 $as_echo_n "checking for $ac_word... " >&6; }
10535 if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then :
10536   $as_echo_n "(cached) " >&6
10537 else
10538   case $ac_pt_PKG_CONFIG in
10539   [\\/]* | ?:[\\/]*)
10540   ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
10541   ;;
10542   *)
10543   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10544 for as_dir in $PATH
10545 do
10546   IFS=$as_save_IFS
10547   test -z "$as_dir" && as_dir=.
10548     for ac_exec_ext in '' $ac_executable_extensions; do
10549   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10550     ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
10551     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10552     break 2
10553   fi
10554 done
10555   done
10556 IFS=$as_save_IFS
10557 
10558   ;;
10559 esac
10560 fi
10561 ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
10562 if test -n "$ac_pt_PKG_CONFIG"; then
10563   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
10564 $as_echo "$ac_pt_PKG_CONFIG" >&6; }
10565 else
10566   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10567 $as_echo "no" >&6; }
10568 fi
10569 
10570   if test "x$ac_pt_PKG_CONFIG" = x; then
10571     PKG_CONFIG=""
10572   else
10573     case $cross_compiling:$ac_tool_warned in
10574 yes:)
10575 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
10576 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
10577 ac_tool_warned=yes ;;
10578 esac
10579     PKG_CONFIG=$ac_pt_PKG_CONFIG
10580   fi
10581 else
10582   PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
10583 fi
10584 
10585 fi
10586 if test -n "$PKG_CONFIG"; then
10587         _pkg_min_version=0.9.0
10588         { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
10589 $as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
10590         if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
10591                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10592 $as_echo "yes" >&6; }
10593         else
10594                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10595 $as_echo "no" >&6; }
10596                 PKG_CONFIG=""
10597         fi
10598 
10599 fi
10600 
10601 # After basic tools have been setup, we can check build os specific details.
10602 
10603 ###############################################################################
10604 
10605 # Note that this is the build platform OS version!
10606 
10607 OS_VERSION="`uname -r | ${SED} 's!\.! !g' | ${SED} 's!-! !g'`"
10608 OS_VERSION_MAJOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 1 -d ' '`"
10609 OS_VERSION_MINOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 2 -d ' '`"
10610 OS_VERSION_MICRO="`${ECHO} ${OS_VERSION} | ${CUT} -f 3 -d ' '`"
10611 
10612 
10613 
10614 
10615 
10616 # Setup builddeps, for automatic downloading of tools we need.
10617 # This is needed before we can call BDEPS_CHECK_MODULE, which is done in
10618 # boot-jdk setup, but we need to have basic tools setup first.
10619 
10620 
10621 # Check whether --with-builddeps-conf was given.
10622 if test "${with_builddeps_conf+set}" = set; then :
10623   withval=$with_builddeps_conf;
10624 fi
10625 
10626 
10627 
10628 # Check whether --with-builddeps-server was given.
10629 if test "${with_builddeps_server+set}" = set; then :
10630   withval=$with_builddeps_server;
10631 fi
10632 
10633 
10634 
10635 # Check whether --with-builddeps-dir was given.
10636 if test "${with_builddeps_dir+set}" = set; then :
10637   withval=$with_builddeps_dir;
10638 else
10639   with_builddeps_dir=/localhome/builddeps
10640 fi
10641 
10642 
10643 
10644 # Check whether --with-builddeps-group was given.
10645 if test "${with_builddeps_group+set}" = set; then :
10646   withval=$with_builddeps_group;
10647 fi
10648 
10649 
10650 
10651 
10652     if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
10653         if test "x$with_builddeps_conf" != x; then
10654             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for supplied builddeps configuration file" >&5
10655 $as_echo_n "checking for supplied builddeps configuration file... " >&6; }
10656             builddepsfile=$with_builddeps_conf
10657             if test -s $builddepsfile; then
10658                 . $builddepsfile
10659                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: loaded!" >&5
10660 $as_echo "loaded!" >&6; }
10661             else
10662                as_fn_error $? "The given builddeps conf file $with_builddeps_conf could not be loaded!" "$LINENO" 5
10663            fi
10664         else
10665             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builddeps.conf files in sources..." >&5
10666 $as_echo_n "checking for builddeps.conf files in sources...... " >&6; }
10667             builddepsfile=`mktemp`
10668             touch $builddepsfile
10669             # Put all found confs into a single file.
10670             find ${SRC_ROOT} -name builddeps.conf -exec cat \{\} \; >> $builddepsfile
10671             # Source the file to acquire the variables
10672             if test -s $builddepsfile; then
10673                 . $builddepsfile
10674                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: found at least one!" >&5
10675 $as_echo "found at least one!" >&6; }
10676             else
10677                as_fn_error $? "Could not find any builddeps.conf at all!" "$LINENO" 5
10678            fi
10679         fi
10680         # Create build and target names that use _ instead of "-" and ".".
10681         # This is necessary to use them in variable names.
10682         build_var=`echo ${OPENJDK_BUILD_AUTOCONF_NAME} | tr '-' '_' | tr '.' '_'`
10683         target_var=`echo ${OPENJDK_TARGET_AUTOCONF_NAME} | tr '-' '_' | tr '.' '_'`
10684         # Extract rewrite information for build and target
10685         eval rewritten_build=\${REWRITE_${build_var}}
10686         if test "x$rewritten_build" = x; then
10687             rewritten_build=${OPENJDK_BUILD_AUTOCONF_NAME}
10688             echo Build stays the same $rewritten_build
10689         else
10690             echo Rewriting build for builddeps into $rewritten_build
10691         fi
10692         eval rewritten_target=\${REWRITE_${target_var}}
10693         if test "x$rewritten_target" = x; then
10694             rewritten_target=${OPENJDK_TARGET_AUTOCONF_NAME}
10695             echo Target stays the same $rewritten_target
10696         else
10697             echo Rewriting target for builddeps into $rewritten_target
10698         fi
10699         rewritten_build_var=`echo ${rewritten_build} | tr '-' '_' | tr '.' '_'`
10700         rewritten_target_var=`echo ${rewritten_target} | tr '-' '_' | tr '.' '_'`
10701     fi
10702     for ac_prog in 7z unzip
10703 do
10704   # Extract the first word of "$ac_prog", so it can be a program name with args.
10705 set dummy $ac_prog; ac_word=$2
10706 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10707 $as_echo_n "checking for $ac_word... " >&6; }
10708 if test "${ac_cv_prog_BDEPS_UNZIP+set}" = set; then :
10709   $as_echo_n "(cached) " >&6
10710 else
10711   if test -n "$BDEPS_UNZIP"; then
10712   ac_cv_prog_BDEPS_UNZIP="$BDEPS_UNZIP" # Let the user override the test.
10713 else
10714 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10715 for as_dir in $PATH
10716 do
10717   IFS=$as_save_IFS
10718   test -z "$as_dir" && as_dir=.
10719     for ac_exec_ext in '' $ac_executable_extensions; do
10720   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10721     ac_cv_prog_BDEPS_UNZIP="$ac_prog"
10722     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10723     break 2
10724   fi
10725 done
10726   done
10727 IFS=$as_save_IFS
10728 
10729 fi
10730 fi
10731 BDEPS_UNZIP=$ac_cv_prog_BDEPS_UNZIP
10732 if test -n "$BDEPS_UNZIP"; then
10733   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BDEPS_UNZIP" >&5
10734 $as_echo "$BDEPS_UNZIP" >&6; }
10735 else
10736   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10737 $as_echo "no" >&6; }
10738 fi
10739 
10740 
10741   test -n "$BDEPS_UNZIP" && break
10742 done
10743 
10744     if test "x$BDEPS_UNZIP" = x7z; then
10745         BDEPS_UNZIP="7z x"
10746     fi
10747 
10748     for ac_prog in wget lftp ftp
10749 do
10750   # Extract the first word of "$ac_prog", so it can be a program name with args.
10751 set dummy $ac_prog; ac_word=$2
10752 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10753 $as_echo_n "checking for $ac_word... " >&6; }
10754 if test "${ac_cv_prog_BDEPS_FTP+set}" = set; then :
10755   $as_echo_n "(cached) " >&6
10756 else
10757   if test -n "$BDEPS_FTP"; then
10758   ac_cv_prog_BDEPS_FTP="$BDEPS_FTP" # Let the user override the test.
10759 else
10760 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10761 for as_dir in $PATH
10762 do
10763   IFS=$as_save_IFS
10764   test -z "$as_dir" && as_dir=.
10765     for ac_exec_ext in '' $ac_executable_extensions; do
10766   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10767     ac_cv_prog_BDEPS_FTP="$ac_prog"
10768     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10769     break 2
10770   fi
10771 done
10772   done
10773 IFS=$as_save_IFS
10774 
10775 fi
10776 fi
10777 BDEPS_FTP=$ac_cv_prog_BDEPS_FTP
10778 if test -n "$BDEPS_FTP"; then
10779   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BDEPS_FTP" >&5
10780 $as_echo "$BDEPS_FTP" >&6; }
10781 else
10782   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10783 $as_echo "no" >&6; }
10784 fi
10785 
10786 
10787   test -n "$BDEPS_FTP" && break
10788 done
10789 
10790 
10791 
10792 ###############################################################################
10793 #
10794 # Determine OpenJDK variants, options and version numbers.
10795 #
10796 ###############################################################################
10797 
10798 # We need build & target for this.
10799 
10800 
10801 ###############################################################################
10802 #
10803 # Should we build a JDK/JVM with headful support (ie a graphical ui)?
10804 # We always build headless support.
10805 #
10806 { $as_echo "$as_me:${as_lineno-$LINENO}: checking headful support" >&5
10807 $as_echo_n "checking headful support... " >&6; }
10808 # Check whether --enable-headful was given.
10809 if test "${enable_headful+set}" = set; then :
10810   enableval=$enable_headful; SUPPORT_HEADFUL=${enable_headful}
10811 else
10812   SUPPORT_HEADFUL=yes
10813 fi
10814 
10815 
10816 SUPPORT_HEADLESS=yes
10817 BUILD_HEADLESS="BUILD_HEADLESS:=true"
10818 
10819 if test "x$SUPPORT_HEADFUL" = xyes; then
10820     # We are building both headful and headless.
10821     headful_msg="inlude support for both headful and headless"
10822 fi
10823 
10824 if test "x$SUPPORT_HEADFUL" = xno; then
10825     # Thus we are building headless only.
10826     BUILD_HEADLESS="BUILD_HEADLESS:=true"
10827     headful_msg="headless only"
10828 fi
10829 
10830 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $headful_msg" >&5
10831 $as_echo "$headful_msg" >&6; }
10832 
10833 
10834 
10835 
10836 
10837 # Control wether Hotspot runs Queens test after build.
10838 # Check whether --enable-hotspot-test-in-build was given.
10839 if test "${enable_hotspot_test_in_build+set}" = set; then :
10840   enableval=$enable_hotspot_test_in_build;
10841 else
10842   enable_hotspot_test_in_build=no
10843 fi
10844 
10845 if test "x$enable_hotspot_test_in_build" = "xyes"; then
10846     TEST_IN_BUILD=true
10847 else
10848     TEST_IN_BUILD=false
10849 fi
10850 
10851 
10852 ###############################################################################
10853 #
10854 # Choose cacerts source file
10855 #
10856 
10857 # Check whether --with-cacerts-file was given.
10858 if test "${with_cacerts_file+set}" = set; then :
10859   withval=$with_cacerts_file;
10860 fi
10861 
10862 if test "x$with_cacerts_file" != x; then
10863     CACERTS_FILE=$with_cacerts_file
10864 else
10865     if test "x$OPENJDK" = "xtrue"; then
10866         CACERTS_FILE=${SRC_ROOT}/jdk/src/share/lib/security/cacerts
10867     else
10868         CACERTS_FILE=${SRC_ROOT}/jdk/src/closed/share/lib/security/cacerts.internal
10869     fi
10870 fi
10871 
10872 
10873 ###############################################################################
10874 #
10875 # Enable or disable unlimited crypto
10876 #
10877 # Check whether --enable-unlimited-crypto was given.
10878 if test "${enable_unlimited_crypto+set}" = set; then :
10879   enableval=$enable_unlimited_crypto;
10880 else
10881   enable_unlimited_crypto=no
10882 fi
10883 
10884 if test "x$enable_unlimited_crypto" = "xyes"; then
10885     UNLIMITED_CRYPTO=true
10886 else
10887     UNLIMITED_CRYPTO=false
10888 fi
10889 
10890 
10891 ###############################################################################
10892 #
10893 # Enable or disable the elliptic curve crypto implementation
10894 #
10895 
10896 
10897 ###############################################################################
10898 #
10899 # Compress jars
10900 #
10901 COMPRESS_JARS=false
10902 
10903 
10904 
10905 
10906 # Source the version numbers
10907 . $AUTOCONF_DIR/version-numbers
10908 
10909 # Get the settings from parameters
10910 
10911 # Check whether --with-milestone was given.
10912 if test "${with_milestone+set}" = set; then :
10913   withval=$with_milestone;
10914 fi
10915 
10916 if test "x$with_milestone" = xyes; then
10917   as_fn_error $? "Milestone must have a value" "$LINENO" 5
10918 elif test "x$with_milestone" != x; then
10919     MILESTONE="$with_milestone"
10920 fi
10921 if test "x$MILESTONE" = x; then
10922   MILESTONE=internal
10923 fi
10924 
10925 
10926 # Check whether --with-build-number was given.
10927 if test "${with_build_number+set}" = set; then :
10928   withval=$with_build_number;
10929 fi
10930 
10931 if test "x$with_build_number" = xyes; then
10932   as_fn_error $? "Build number must have a value" "$LINENO" 5
10933 elif test "x$with_build_number" != x; then
10934   JDK_BUILD_NUMBER="$with_build_number"
10935 fi
10936 if test "x$JDK_BUILD_NUMBER" = x; then
10937   JDK_BUILD_NUMBER=b00
10938 fi
10939 
10940 
10941 # Check whether --with-user-release-suffix was given.
10942 if test "${with_user_release_suffix+set}" = set; then :
10943   withval=$with_user_release_suffix;
10944 fi
10945 
10946 if test "x$with_user_release_suffix" = xyes; then
10947   as_fn_error $? "Release suffix must have a value" "$LINENO" 5
10948 elif test "x$with_user_release_suffix" != x; then
10949   USER_RELEASE_SUFFIX="$with_user_release_suffix"
10950 else
10951   BUILD_DATE=`date '+%Y_%m_%d_%H_%M'`
10952   # Avoid [:alnum:] since it depends on the locale.
10953   CLEAN_USERNAME=`echo "$USER" | $TR -d -c 'abcdefghijklmnopqrstuvqxyz0123456789'`
10954   USER_RELEASE_SUFFIX=`echo "${CLEAN_USERNAME}_${BUILD_DATE}" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
10955 fi
10956 
10957 
10958 # Now set the JDK version, milestone, build number etc.
10959 
10960 
10961 
10962 
10963 
10964 
10965 
10966 
10967 
10968 
10969 
10970 
10971 
10972 
10973 COPYRIGHT_YEAR=`date +'%Y'`
10974 
10975 
10976 if test "x$JDK_UPDATE_VERSION" != x; then
10977   JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}_${JDK_UPDATE_VERSION}"
10978 else
10979   JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}"
10980 fi
10981 
10982 
10983 COOKED_BUILD_NUMBER=`$ECHO $JDK_BUILD_NUMBER | $SED -e 's/^b//' -e 's/^0//'`
10984 
10985 
10986 
10987 ###############################################################################
10988 #
10989 # Setup BootJDK, used to bootstrap the build.
10990 #
10991 ###############################################################################
10992 
10993 
10994 BOOT_JDK_FOUND=no
10995 
10996 # Check whether --with-boot-jdk was given.
10997 if test "${with_boot_jdk+set}" = set; then :
10998   withval=$with_boot_jdk;
10999 fi
11000 
11001 
11002 # We look for the Boot JDK through various means, going from more certain to
11003 # more of a guess-work. After each test, BOOT_JDK_FOUND is set to "yes" if
11004 # we detected something (if so, the path to the jdk is in BOOT_JDK). But we
11005 # must check if this is indeed valid; otherwise we'll continue looking.
11006 
11007 # Test: Is bootjdk explicitely set by command line arguments?
11008 
11009   if test "x$BOOT_JDK_FOUND" = xno; then
11010     # Now execute the test
11011 
11012 if test "x$with_boot_jdk" != x; then
11013     BOOT_JDK=$with_boot_jdk
11014     BOOT_JDK_FOUND=maybe
11015     { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using configure arguments" >&5
11016 $as_echo "$as_me: Found potential Boot JDK using configure arguments" >&6;}
11017 fi
11018 
11019 
11020     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
11021     if test "x$BOOT_JDK_FOUND" = xmaybe; then
11022       # Do we have a bin/java?
11023       if test ! -x "$BOOT_JDK/bin/java"; then
11024         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
11025 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
11026         BOOT_JDK_FOUND=no
11027       else
11028         # Do we have a bin/javac?
11029         if test ! -x "$BOOT_JDK/bin/javac"; then
11030           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
11031 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
11032           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
11033 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
11034           BOOT_JDK_FOUND=no
11035         else
11036           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
11037           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
11038             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
11039 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
11040             BOOT_JDK_FOUND=no
11041           else
11042             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
11043             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
11044 
11045             # Extra M4 quote needed to protect [] in grep expression.
11046             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
11047             if test "x$FOUND_VERSION_78" = x; then
11048               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
11049 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
11050               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
11051 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
11052               BOOT_JDK_FOUND=no
11053             else
11054               # We're done! :-)
11055               BOOT_JDK_FOUND=yes
11056 
11057   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11058 
11059   # Input might be given as Windows format, start by converting to
11060   # unix format.
11061   path="$BOOT_JDK"
11062   new_path=`$CYGPATH -u "$path"`
11063 
11064   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
11065   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
11066   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
11067   # "foo.exe" is OK but "foo" is an error.
11068   #
11069   # This test is therefore slightly more accurate than "test -f" to check for file precense.
11070   # It is also a way to make sure we got the proper file name for the real test later on.
11071   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
11072   if test "x$test_shortpath" = x; then
11073     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11074 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11075     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
11076   fi
11077 
11078   # Call helper function which possibly converts this using DOS-style short mode.
11079   # If so, the updated path is stored in $new_path.
11080 
11081   input_path="$new_path"
11082   # Check if we need to convert this using DOS-style short mode. If the path
11083   # contains just simple characters, use it. Otherwise (spaces, weird characters),
11084   # take no chances and rewrite it.
11085   # Note: m4 eats our [], so we need to use [ and ] instead.
11086   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
11087   if test "x$has_forbidden_chars" != x; then
11088     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11089     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
11090     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
11091     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
11092       # Going to short mode and back again did indeed matter. Since short mode is
11093       # case insensitive, let's make it lowercase to improve readability.
11094       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11095       # Now convert it back to Unix-stile (cygpath)
11096       input_path=`$CYGPATH -u "$shortmode_path"`
11097       new_path="$input_path"
11098     fi
11099   fi
11100 
11101   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
11102   if test "x$test_cygdrive_prefix" = x; then
11103     # As a simple fix, exclude /usr/bin since it's not a real path.
11104     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
11105       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
11106       # a path prefixed by /cygdrive for fixpath to work.
11107       new_path="$CYGWIN_ROOT_PATH$input_path"
11108     fi
11109   fi
11110 
11111 
11112   if test "x$path" != "x$new_path"; then
11113     BOOT_JDK="$new_path"
11114     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11115 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11116   fi
11117 
11118   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11119 
11120   path="$BOOT_JDK"
11121   has_colon=`$ECHO $path | $GREP ^.:`
11122   new_path="$path"
11123   if test "x$has_colon" = x; then
11124     # Not in mixed or Windows style, start by that.
11125     new_path=`cmd //c echo $path`
11126   fi
11127 
11128 
11129   input_path="$new_path"
11130   # Check if we need to convert this using DOS-style short mode. If the path
11131   # contains just simple characters, use it. Otherwise (spaces, weird characters),
11132   # take no chances and rewrite it.
11133   # Note: m4 eats our [], so we need to use [ and ] instead.
11134   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
11135   if test "x$has_forbidden_chars" != x; then
11136     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11137     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11138   fi
11139 
11140 
11141   windows_path="$new_path"
11142   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11143     unix_path=`$CYGPATH -u "$windows_path"`
11144     new_path="$unix_path"
11145   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11146     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11147     new_path="$unix_path"
11148   fi
11149 
11150   if test "x$path" != "x$new_path"; then
11151     BOOT_JDK="$new_path"
11152     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11153 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11154   fi
11155 
11156   # Save the first 10 bytes of this path to the storage, so fixpath can work.
11157   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
11158 
11159   else
11160     # We're on a posix platform. Hooray! :)
11161     path="$BOOT_JDK"
11162 
11163     if test ! -f "$path" && test ! -d "$path"; then
11164       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
11165     fi
11166 
11167     has_space=`$ECHO "$path" | $GREP " "`
11168     if test "x$has_space" != x; then
11169       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11170 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11171       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
11172     fi
11173   fi
11174 
11175               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
11176 $as_echo_n "checking for Boot JDK... " >&6; }
11177               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
11178 $as_echo "$BOOT_JDK" >&6; }
11179               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
11180 $as_echo_n "checking Boot JDK version... " >&6; }
11181               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
11182               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
11183 $as_echo "$BOOT_JDK_VERSION" >&6; }
11184             fi # end check jdk version
11185           fi # end check rt.jar
11186         fi # end check javac
11187       fi # end check java
11188     fi # end check boot jdk found
11189   fi
11190 
11191 if test "x$with_boot_jdk" != x && test "x$BOOT_JDK_FOUND" = xno; then
11192   # Having specified an argument which is incorrect will produce an instant failure;
11193   # we should not go on looking
11194   as_fn_error $? "The path given by --with-boot-jdk does not contain a valid Boot JDK" "$LINENO" 5
11195 fi
11196 
11197 # Test: Is bootjdk available from builddeps?
11198 
11199   if test "x$BOOT_JDK_FOUND" = xno; then
11200     # Now execute the test
11201 
11202 
11203 
11204     if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
11205         # Source the builddeps file again, to make sure it uses the latest variables!
11206         . $builddepsfile
11207         # Look for a target and build machine specific resource!
11208         eval resource=\${builddep_bootjdk_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
11209         if test "x$resource" = x; then
11210             # Ok, lets instead look for a target specific resource
11211             eval resource=\${builddep_bootjdk_TARGET_${rewritten_target_var}}
11212         fi
11213         if test "x$resource" = x; then
11214             # Ok, lets instead look for a build specific resource
11215             eval resource=\${builddep_bootjdk_BUILD_${rewritten_build_var}}
11216         fi
11217         if test "x$resource" = x; then
11218             # Ok, lets instead look for a generic resource
11219             # (The bootjdk comes from M4 and not the shell, thus no need for eval here.)
11220             resource=${builddep_bootjdk}
11221         fi
11222         if test "x$resource" != x; then
11223             { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for bootjdk" >&5
11224 $as_echo "$as_me: Using builddeps $resource for bootjdk" >&6;}
11225             # If the resource in the builddeps.conf file is an existing directory,
11226             # for example /java/linux/cups
11227             if test -d ${resource}; then
11228                depdir=${resource}
11229             else
11230 
11231 # bootjdk is for example mymodule
11232 # $resource is for example libs/general/libmymod_1_2_3.zip
11233 # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
11234 # $with_builddeps_dir is for example /localhome/builddeps
11235 # depdir is the name of the variable into which we store the depdir, eg MYMOD
11236 # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
11237 # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
11238     filename=`basename $resource`
11239     filebase=`echo $filename | sed 's/\.[^\.]*$//'`
11240     filebase=${filename%%.*}
11241     extension=${filename#*.}
11242     installdir=$with_builddeps_dir/$filebase
11243     if test ! -f $installdir/$filename.unpacked; then
11244         { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency bootjdk from $with_builddeps_server/$resource and installing into $installdir" >&5
11245 $as_echo "$as_me: Downloading build dependency bootjdk from $with_builddeps_server/$resource and installing into $installdir" >&6;}
11246         if test ! -d $installdir; then
11247             mkdir -p $installdir
11248         fi
11249         if test ! -d $installdir; then
11250             as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
11251         fi
11252         tmpfile=`mktemp $installdir/bootjdk.XXXXXXXXX`
11253         touch $tmpfile
11254         if test ! -f $tmpfile; then
11255             as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
11256         fi
11257 
11258     # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
11259     # $tmpfile is the local file name for the downloaded file.
11260     VALID_TOOL=no
11261     if test "x$BDEPS_FTP" = xwget; then
11262        VALID_TOOL=yes
11263        wget -O $tmpfile $with_builddeps_server/$resource
11264     fi
11265     if test "x$BDEPS_FTP" = xlftp; then
11266        VALID_TOOL=yes
11267        lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
11268     fi
11269     if test "x$BDEPS_FTP" = xftp; then
11270         VALID_TOOL=yes
11271         FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
11272         FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
11273         FTPUSERPWD=${FTPSERVER%%@*}
11274         if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
11275             FTPUSER=${userpwd%%:*}
11276             FTPPWD=${userpwd#*@}
11277             FTPSERVER=${FTPSERVER#*@}
11278         else
11279             FTPUSER=ftp
11280             FTPPWD=ftp
11281         fi
11282         # the "pass" command does not work on some
11283         # ftp clients (read ftp.exe) but if it works,
11284         # passive mode is better!
11285         (\
11286             echo "user $FTPUSER $FTPPWD"        ;\
11287             echo "pass"                         ;\
11288             echo "bin"                          ;\
11289             echo "get $FTPPATH $tmpfile"              ;\
11290         ) | ftp -in $FTPSERVER
11291     fi
11292     if test "x$VALID_TOOL" != xyes; then
11293        as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
11294     fi
11295 
11296         mv $tmpfile $installdir/$filename
11297         if test ! -s $installdir/$filename; then
11298             as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
11299         fi
11300         case "$extension" in
11301             zip)  echo "Unzipping $installdir/$filename..."
11302                (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
11303             ;;
11304             tar.gz) echo "Untaring $installdir/$filename..."
11305                (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
11306             ;;
11307             tgz) echo "Untaring $installdir/$filename..."
11308                (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
11309             ;;
11310             *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
11311             ;;
11312         esac
11313     fi
11314     if test -f $installdir/$filename.unpacked; then
11315         depdir=$installdir
11316     fi
11317 
11318             fi
11319             # Source the builddeps file again, because in the previous command, the depdir
11320             # was updated to point at the current build dependency install directory.
11321             . $builddepsfile
11322             # Now extract variables from the builddeps.conf files.
11323             theroot=${builddep_bootjdk_ROOT}
11324             thecflags=${builddep_bootjdk_CFLAGS}
11325             thelibs=${builddep_bootjdk_LIBS}
11326             if test "x$depdir" = x; then
11327                 as_fn_error $? "Could not download build dependency bootjdk" "$LINENO" 5
11328             fi
11329             BOOT_JDK=$depdir
11330             if test "x$theroot" != x; then
11331                BOOT_JDK="$theroot"
11332             fi
11333             if test "x$thecflags" != x; then
11334                BOOT_JDK_CFLAGS="$thecflags"
11335             fi
11336             if test "x$thelibs" != x; then
11337                BOOT_JDK_LIBS="$thelibs"
11338             fi
11339             BOOT_JDK_FOUND=maybe
11340             else BOOT_JDK_FOUND=no
11341 
11342         fi
11343         else BOOT_JDK_FOUND=no
11344 
11345     fi
11346 
11347 
11348 
11349     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
11350     if test "x$BOOT_JDK_FOUND" = xmaybe; then
11351       # Do we have a bin/java?
11352       if test ! -x "$BOOT_JDK/bin/java"; then
11353         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
11354 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
11355         BOOT_JDK_FOUND=no
11356       else
11357         # Do we have a bin/javac?
11358         if test ! -x "$BOOT_JDK/bin/javac"; then
11359           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
11360 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
11361           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
11362 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
11363           BOOT_JDK_FOUND=no
11364         else
11365           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
11366           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
11367             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
11368 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
11369             BOOT_JDK_FOUND=no
11370           else
11371             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
11372             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
11373 
11374             # Extra M4 quote needed to protect [] in grep expression.
11375             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
11376             if test "x$FOUND_VERSION_78" = x; then
11377               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
11378 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
11379               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
11380 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
11381               BOOT_JDK_FOUND=no
11382             else
11383               # We're done! :-)
11384               BOOT_JDK_FOUND=yes
11385 
11386   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11387 
11388   # Input might be given as Windows format, start by converting to
11389   # unix format.
11390   path="$BOOT_JDK"
11391   new_path=`$CYGPATH -u "$path"`
11392 
11393   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
11394   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
11395   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
11396   # "foo.exe" is OK but "foo" is an error.
11397   #
11398   # This test is therefore slightly more accurate than "test -f" to check for file precense.
11399   # It is also a way to make sure we got the proper file name for the real test later on.
11400   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
11401   if test "x$test_shortpath" = x; then
11402     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11403 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11404     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
11405   fi
11406 
11407   # Call helper function which possibly converts this using DOS-style short mode.
11408   # If so, the updated path is stored in $new_path.
11409 
11410   input_path="$new_path"
11411   # Check if we need to convert this using DOS-style short mode. If the path
11412   # contains just simple characters, use it. Otherwise (spaces, weird characters),
11413   # take no chances and rewrite it.
11414   # Note: m4 eats our [], so we need to use [ and ] instead.
11415   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
11416   if test "x$has_forbidden_chars" != x; then
11417     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11418     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
11419     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
11420     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
11421       # Going to short mode and back again did indeed matter. Since short mode is
11422       # case insensitive, let's make it lowercase to improve readability.
11423       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11424       # Now convert it back to Unix-stile (cygpath)
11425       input_path=`$CYGPATH -u "$shortmode_path"`
11426       new_path="$input_path"
11427     fi
11428   fi
11429 
11430   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
11431   if test "x$test_cygdrive_prefix" = x; then
11432     # As a simple fix, exclude /usr/bin since it's not a real path.
11433     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
11434       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
11435       # a path prefixed by /cygdrive for fixpath to work.
11436       new_path="$CYGWIN_ROOT_PATH$input_path"
11437     fi
11438   fi
11439 
11440 
11441   if test "x$path" != "x$new_path"; then
11442     BOOT_JDK="$new_path"
11443     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11444 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11445   fi
11446 
11447   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11448 
11449   path="$BOOT_JDK"
11450   has_colon=`$ECHO $path | $GREP ^.:`
11451   new_path="$path"
11452   if test "x$has_colon" = x; then
11453     # Not in mixed or Windows style, start by that.
11454     new_path=`cmd //c echo $path`
11455   fi
11456 
11457 
11458   input_path="$new_path"
11459   # Check if we need to convert this using DOS-style short mode. If the path
11460   # contains just simple characters, use it. Otherwise (spaces, weird characters),
11461   # take no chances and rewrite it.
11462   # Note: m4 eats our [], so we need to use [ and ] instead.
11463   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
11464   if test "x$has_forbidden_chars" != x; then
11465     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11466     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11467   fi
11468 
11469 
11470   windows_path="$new_path"
11471   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11472     unix_path=`$CYGPATH -u "$windows_path"`
11473     new_path="$unix_path"
11474   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11475     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11476     new_path="$unix_path"
11477   fi
11478 
11479   if test "x$path" != "x$new_path"; then
11480     BOOT_JDK="$new_path"
11481     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11482 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11483   fi
11484 
11485   # Save the first 10 bytes of this path to the storage, so fixpath can work.
11486   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
11487 
11488   else
11489     # We're on a posix platform. Hooray! :)
11490     path="$BOOT_JDK"
11491 
11492     if test ! -f "$path" && test ! -d "$path"; then
11493       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
11494     fi
11495 
11496     has_space=`$ECHO "$path" | $GREP " "`
11497     if test "x$has_space" != x; then
11498       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11499 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11500       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
11501     fi
11502   fi
11503 
11504               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
11505 $as_echo_n "checking for Boot JDK... " >&6; }
11506               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
11507 $as_echo "$BOOT_JDK" >&6; }
11508               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
11509 $as_echo_n "checking Boot JDK version... " >&6; }
11510               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
11511               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
11512 $as_echo "$BOOT_JDK_VERSION" >&6; }
11513             fi # end check jdk version
11514           fi # end check rt.jar
11515         fi # end check javac
11516       fi # end check java
11517     fi # end check boot jdk found
11518   fi
11519 
11520 
11521 # Test: Is $JAVA_HOME set?
11522 
11523   if test "x$BOOT_JDK_FOUND" = xno; then
11524     # Now execute the test
11525 
11526     if test "x$JAVA_HOME" != x; then
11527         JAVA_HOME_PROCESSED="$JAVA_HOME"
11528 
11529   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11530 
11531   # Input might be given as Windows format, start by converting to
11532   # unix format.
11533   path="$JAVA_HOME_PROCESSED"
11534   new_path=`$CYGPATH -u "$path"`
11535 
11536   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
11537   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
11538   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
11539   # "foo.exe" is OK but "foo" is an error.
11540   #
11541   # This test is therefore slightly more accurate than "test -f" to check for file precense.
11542   # It is also a way to make sure we got the proper file name for the real test later on.
11543   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
11544   if test "x$test_shortpath" = x; then
11545     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
11546 $as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
11547     as_fn_error $? "Cannot locate the the path of JAVA_HOME_PROCESSED" "$LINENO" 5
11548   fi
11549 
11550   # Call helper function which possibly converts this using DOS-style short mode.
11551   # If so, the updated path is stored in $new_path.
11552 
11553   input_path="$new_path"
11554   # Check if we need to convert this using DOS-style short mode. If the path
11555   # contains just simple characters, use it. Otherwise (spaces, weird characters),
11556   # take no chances and rewrite it.
11557   # Note: m4 eats our [], so we need to use [ and ] instead.
11558   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
11559   if test "x$has_forbidden_chars" != x; then
11560     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11561     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
11562     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
11563     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
11564       # Going to short mode and back again did indeed matter. Since short mode is
11565       # case insensitive, let's make it lowercase to improve readability.
11566       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11567       # Now convert it back to Unix-stile (cygpath)
11568       input_path=`$CYGPATH -u "$shortmode_path"`
11569       new_path="$input_path"
11570     fi
11571   fi
11572 
11573   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
11574   if test "x$test_cygdrive_prefix" = x; then
11575     # As a simple fix, exclude /usr/bin since it's not a real path.
11576     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
11577       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
11578       # a path prefixed by /cygdrive for fixpath to work.
11579       new_path="$CYGWIN_ROOT_PATH$input_path"
11580     fi
11581   fi
11582 
11583 
11584   if test "x$path" != "x$new_path"; then
11585     JAVA_HOME_PROCESSED="$new_path"
11586     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
11587 $as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
11588   fi
11589 
11590   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11591 
11592   path="$JAVA_HOME_PROCESSED"
11593   has_colon=`$ECHO $path | $GREP ^.:`
11594   new_path="$path"
11595   if test "x$has_colon" = x; then
11596     # Not in mixed or Windows style, start by that.
11597     new_path=`cmd //c echo $path`
11598   fi
11599 
11600 
11601   input_path="$new_path"
11602   # Check if we need to convert this using DOS-style short mode. If the path
11603   # contains just simple characters, use it. Otherwise (spaces, weird characters),
11604   # take no chances and rewrite it.
11605   # Note: m4 eats our [], so we need to use [ and ] instead.
11606   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
11607   if test "x$has_forbidden_chars" != x; then
11608     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11609     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11610   fi
11611 
11612 
11613   windows_path="$new_path"
11614   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11615     unix_path=`$CYGPATH -u "$windows_path"`
11616     new_path="$unix_path"
11617   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11618     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11619     new_path="$unix_path"
11620   fi
11621 
11622   if test "x$path" != "x$new_path"; then
11623     JAVA_HOME_PROCESSED="$new_path"
11624     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
11625 $as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
11626   fi
11627 
11628   # Save the first 10 bytes of this path to the storage, so fixpath can work.
11629   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
11630 
11631   else
11632     # We're on a posix platform. Hooray! :)
11633     path="$JAVA_HOME_PROCESSED"
11634 
11635     if test ! -f "$path" && test ! -d "$path"; then
11636       as_fn_error $? "The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is not found." "$LINENO" 5
11637     fi
11638 
11639     has_space=`$ECHO "$path" | $GREP " "`
11640     if test "x$has_space" != x; then
11641       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
11642 $as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
11643       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
11644     fi
11645   fi
11646 
11647         if test ! -d "$JAVA_HOME_PROCESSED"; then
11648             { $as_echo "$as_me:${as_lineno-$LINENO}: Your JAVA_HOME points to a non-existing directory!" >&5
11649 $as_echo "$as_me: Your JAVA_HOME points to a non-existing directory!" >&6;}
11650         else
11651           # Aha, the user has set a JAVA_HOME
11652           # let us use that as the Boot JDK.
11653           BOOT_JDK="$JAVA_HOME_PROCESSED"
11654           BOOT_JDK_FOUND=maybe
11655           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using JAVA_HOME" >&5
11656 $as_echo "$as_me: Found potential Boot JDK using JAVA_HOME" >&6;}
11657         fi
11658     fi
11659 
11660 
11661     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
11662     if test "x$BOOT_JDK_FOUND" = xmaybe; then
11663       # Do we have a bin/java?
11664       if test ! -x "$BOOT_JDK/bin/java"; then
11665         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
11666 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
11667         BOOT_JDK_FOUND=no
11668       else
11669         # Do we have a bin/javac?
11670         if test ! -x "$BOOT_JDK/bin/javac"; then
11671           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
11672 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
11673           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
11674 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
11675           BOOT_JDK_FOUND=no
11676         else
11677           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
11678           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
11679             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
11680 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
11681             BOOT_JDK_FOUND=no
11682           else
11683             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
11684             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
11685 
11686             # Extra M4 quote needed to protect [] in grep expression.
11687             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
11688             if test "x$FOUND_VERSION_78" = x; then
11689               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
11690 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
11691               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
11692 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
11693               BOOT_JDK_FOUND=no
11694             else
11695               # We're done! :-)
11696               BOOT_JDK_FOUND=yes
11697 
11698   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11699 
11700   # Input might be given as Windows format, start by converting to
11701   # unix format.
11702   path="$BOOT_JDK"
11703   new_path=`$CYGPATH -u "$path"`
11704 
11705   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
11706   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
11707   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
11708   # "foo.exe" is OK but "foo" is an error.
11709   #
11710   # This test is therefore slightly more accurate than "test -f" to check for file precense.
11711   # It is also a way to make sure we got the proper file name for the real test later on.
11712   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
11713   if test "x$test_shortpath" = x; then
11714     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11715 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11716     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
11717   fi
11718 
11719   # Call helper function which possibly converts this using DOS-style short mode.
11720   # If so, the updated path is stored in $new_path.
11721 
11722   input_path="$new_path"
11723   # Check if we need to convert this using DOS-style short mode. If the path
11724   # contains just simple characters, use it. Otherwise (spaces, weird characters),
11725   # take no chances and rewrite it.
11726   # Note: m4 eats our [], so we need to use [ and ] instead.
11727   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
11728   if test "x$has_forbidden_chars" != x; then
11729     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11730     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
11731     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
11732     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
11733       # Going to short mode and back again did indeed matter. Since short mode is
11734       # case insensitive, let's make it lowercase to improve readability.
11735       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11736       # Now convert it back to Unix-stile (cygpath)
11737       input_path=`$CYGPATH -u "$shortmode_path"`
11738       new_path="$input_path"
11739     fi
11740   fi
11741 
11742   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
11743   if test "x$test_cygdrive_prefix" = x; then
11744     # As a simple fix, exclude /usr/bin since it's not a real path.
11745     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
11746       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
11747       # a path prefixed by /cygdrive for fixpath to work.
11748       new_path="$CYGWIN_ROOT_PATH$input_path"
11749     fi
11750   fi
11751 
11752 
11753   if test "x$path" != "x$new_path"; then
11754     BOOT_JDK="$new_path"
11755     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11756 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11757   fi
11758 
11759   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11760 
11761   path="$BOOT_JDK"
11762   has_colon=`$ECHO $path | $GREP ^.:`
11763   new_path="$path"
11764   if test "x$has_colon" = x; then
11765     # Not in mixed or Windows style, start by that.
11766     new_path=`cmd //c echo $path`
11767   fi
11768 
11769 
11770   input_path="$new_path"
11771   # Check if we need to convert this using DOS-style short mode. If the path
11772   # contains just simple characters, use it. Otherwise (spaces, weird characters),
11773   # take no chances and rewrite it.
11774   # Note: m4 eats our [], so we need to use [ and ] instead.
11775   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
11776   if test "x$has_forbidden_chars" != x; then
11777     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11778     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11779   fi
11780 
11781 
11782   windows_path="$new_path"
11783   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11784     unix_path=`$CYGPATH -u "$windows_path"`
11785     new_path="$unix_path"
11786   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11787     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11788     new_path="$unix_path"
11789   fi
11790 
11791   if test "x$path" != "x$new_path"; then
11792     BOOT_JDK="$new_path"
11793     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11794 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11795   fi
11796 
11797   # Save the first 10 bytes of this path to the storage, so fixpath can work.
11798   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
11799 
11800   else
11801     # We're on a posix platform. Hooray! :)
11802     path="$BOOT_JDK"
11803 
11804     if test ! -f "$path" && test ! -d "$path"; then
11805       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
11806     fi
11807 
11808     has_space=`$ECHO "$path" | $GREP " "`
11809     if test "x$has_space" != x; then
11810       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11811 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11812       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
11813     fi
11814   fi
11815 
11816               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
11817 $as_echo_n "checking for Boot JDK... " >&6; }
11818               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
11819 $as_echo "$BOOT_JDK" >&6; }
11820               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
11821 $as_echo_n "checking Boot JDK version... " >&6; }
11822               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
11823               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
11824 $as_echo "$BOOT_JDK_VERSION" >&6; }
11825             fi # end check jdk version
11826           fi # end check rt.jar
11827         fi # end check javac
11828       fi # end check java
11829     fi # end check boot jdk found
11830   fi
11831 
11832 
11833 # Test: Is there a /usr/libexec/java_home? (Typically on MacOSX)
11834 
11835   if test "x$BOOT_JDK_FOUND" = xno; then
11836     # Now execute the test
11837 
11838     if test -x /usr/libexec/java_home; then
11839         BOOT_JDK=`/usr/libexec/java_home`
11840         BOOT_JDK_FOUND=maybe
11841         { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home" >&5
11842 $as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home" >&6;}
11843     fi
11844 
11845 
11846     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
11847     if test "x$BOOT_JDK_FOUND" = xmaybe; then
11848       # Do we have a bin/java?
11849       if test ! -x "$BOOT_JDK/bin/java"; then
11850         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
11851 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
11852         BOOT_JDK_FOUND=no
11853       else
11854         # Do we have a bin/javac?
11855         if test ! -x "$BOOT_JDK/bin/javac"; then
11856           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
11857 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
11858           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
11859 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
11860           BOOT_JDK_FOUND=no
11861         else
11862           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
11863           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
11864             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
11865 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
11866             BOOT_JDK_FOUND=no
11867           else
11868             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
11869             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
11870 
11871             # Extra M4 quote needed to protect [] in grep expression.
11872             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
11873             if test "x$FOUND_VERSION_78" = x; then
11874               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
11875 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
11876               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
11877 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
11878               BOOT_JDK_FOUND=no
11879             else
11880               # We're done! :-)
11881               BOOT_JDK_FOUND=yes
11882 
11883   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11884 
11885   # Input might be given as Windows format, start by converting to
11886   # unix format.
11887   path="$BOOT_JDK"
11888   new_path=`$CYGPATH -u "$path"`
11889 
11890   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
11891   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
11892   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
11893   # "foo.exe" is OK but "foo" is an error.
11894   #
11895   # This test is therefore slightly more accurate than "test -f" to check for file precense.
11896   # It is also a way to make sure we got the proper file name for the real test later on.
11897   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
11898   if test "x$test_shortpath" = x; then
11899     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11900 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11901     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
11902   fi
11903 
11904   # Call helper function which possibly converts this using DOS-style short mode.
11905   # If so, the updated path is stored in $new_path.
11906 
11907   input_path="$new_path"
11908   # Check if we need to convert this using DOS-style short mode. If the path
11909   # contains just simple characters, use it. Otherwise (spaces, weird characters),
11910   # take no chances and rewrite it.
11911   # Note: m4 eats our [], so we need to use [ and ] instead.
11912   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
11913   if test "x$has_forbidden_chars" != x; then
11914     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11915     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
11916     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
11917     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
11918       # Going to short mode and back again did indeed matter. Since short mode is
11919       # case insensitive, let's make it lowercase to improve readability.
11920       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11921       # Now convert it back to Unix-stile (cygpath)
11922       input_path=`$CYGPATH -u "$shortmode_path"`
11923       new_path="$input_path"
11924     fi
11925   fi
11926 
11927   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
11928   if test "x$test_cygdrive_prefix" = x; then
11929     # As a simple fix, exclude /usr/bin since it's not a real path.
11930     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
11931       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
11932       # a path prefixed by /cygdrive for fixpath to work.
11933       new_path="$CYGWIN_ROOT_PATH$input_path"
11934     fi
11935   fi
11936 
11937 
11938   if test "x$path" != "x$new_path"; then
11939     BOOT_JDK="$new_path"
11940     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11941 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11942   fi
11943 
11944   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11945 
11946   path="$BOOT_JDK"
11947   has_colon=`$ECHO $path | $GREP ^.:`
11948   new_path="$path"
11949   if test "x$has_colon" = x; then
11950     # Not in mixed or Windows style, start by that.
11951     new_path=`cmd //c echo $path`
11952   fi
11953 
11954 
11955   input_path="$new_path"
11956   # Check if we need to convert this using DOS-style short mode. If the path
11957   # contains just simple characters, use it. Otherwise (spaces, weird characters),
11958   # take no chances and rewrite it.
11959   # Note: m4 eats our [], so we need to use [ and ] instead.
11960   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
11961   if test "x$has_forbidden_chars" != x; then
11962     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11963     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11964   fi
11965 
11966 
11967   windows_path="$new_path"
11968   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11969     unix_path=`$CYGPATH -u "$windows_path"`
11970     new_path="$unix_path"
11971   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11972     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11973     new_path="$unix_path"
11974   fi
11975 
11976   if test "x$path" != "x$new_path"; then
11977     BOOT_JDK="$new_path"
11978     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11979 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11980   fi
11981 
11982   # Save the first 10 bytes of this path to the storage, so fixpath can work.
11983   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
11984 
11985   else
11986     # We're on a posix platform. Hooray! :)
11987     path="$BOOT_JDK"
11988 
11989     if test ! -f "$path" && test ! -d "$path"; then
11990       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
11991     fi
11992 
11993     has_space=`$ECHO "$path" | $GREP " "`
11994     if test "x$has_space" != x; then
11995       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11996 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11997       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
11998     fi
11999   fi
12000 
12001               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12002 $as_echo_n "checking for Boot JDK... " >&6; }
12003               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12004 $as_echo "$BOOT_JDK" >&6; }
12005               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12006 $as_echo_n "checking Boot JDK version... " >&6; }
12007               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12008               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12009 $as_echo "$BOOT_JDK_VERSION" >&6; }
12010             fi # end check jdk version
12011           fi # end check rt.jar
12012         fi # end check javac
12013       fi # end check java
12014     fi # end check boot jdk found
12015   fi
12016 
12017 
12018 # Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
12019 
12020   if test "x$BOOT_JDK_FOUND" = xno; then
12021     # Now execute the test
12022 
12023     # Extract the first word of "javac", so it can be a program name with args.
12024 set dummy javac; ac_word=$2
12025 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12026 $as_echo_n "checking for $ac_word... " >&6; }
12027 if test "${ac_cv_path_JAVAC_CHECK+set}" = set; then :
12028   $as_echo_n "(cached) " >&6
12029 else
12030   case $JAVAC_CHECK in
12031   [\\/]* | ?:[\\/]*)
12032   ac_cv_path_JAVAC_CHECK="$JAVAC_CHECK" # Let the user override the test with a path.
12033   ;;
12034   *)
12035   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12036 for as_dir in $PATH
12037 do
12038   IFS=$as_save_IFS
12039   test -z "$as_dir" && as_dir=.
12040     for ac_exec_ext in '' $ac_executable_extensions; do
12041   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
12042     ac_cv_path_JAVAC_CHECK="$as_dir/$ac_word$ac_exec_ext"
12043     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12044     break 2
12045   fi
12046 done
12047   done
12048 IFS=$as_save_IFS
12049 
12050   ;;
12051 esac
12052 fi
12053 JAVAC_CHECK=$ac_cv_path_JAVAC_CHECK
12054 if test -n "$JAVAC_CHECK"; then
12055   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC_CHECK" >&5
12056 $as_echo "$JAVAC_CHECK" >&6; }
12057 else
12058   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12059 $as_echo "no" >&6; }
12060 fi
12061 
12062 
12063     # Extract the first word of "java", so it can be a program name with args.
12064 set dummy java; ac_word=$2
12065 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12066 $as_echo_n "checking for $ac_word... " >&6; }
12067 if test "${ac_cv_path_JAVA_CHECK+set}" = set; then :
12068   $as_echo_n "(cached) " >&6
12069 else
12070   case $JAVA_CHECK in
12071   [\\/]* | ?:[\\/]*)
12072   ac_cv_path_JAVA_CHECK="$JAVA_CHECK" # Let the user override the test with a path.
12073   ;;
12074   *)
12075   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12076 for as_dir in $PATH
12077 do
12078   IFS=$as_save_IFS
12079   test -z "$as_dir" && as_dir=.
12080     for ac_exec_ext in '' $ac_executable_extensions; do
12081   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
12082     ac_cv_path_JAVA_CHECK="$as_dir/$ac_word$ac_exec_ext"
12083     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12084     break 2
12085   fi
12086 done
12087   done
12088 IFS=$as_save_IFS
12089 
12090   ;;
12091 esac
12092 fi
12093 JAVA_CHECK=$ac_cv_path_JAVA_CHECK
12094 if test -n "$JAVA_CHECK"; then
12095   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA_CHECK" >&5
12096 $as_echo "$JAVA_CHECK" >&6; }
12097 else
12098   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12099 $as_echo "no" >&6; }
12100 fi
12101 
12102 
12103     BINARY="$JAVAC_CHECK"
12104     if test "x$JAVAC_CHECK" = x; then
12105         BINARY="$JAVA_CHECK"
12106     fi
12107     if test "x$BINARY" != x; then
12108         # So there is a java(c) binary, it might be part of a JDK.
12109         # Lets find the JDK/JRE directory by following symbolic links.
12110         # Linux/GNU systems often have links from /usr/bin/java to
12111         # /etc/alternatives/java to the real JDK binary.
12112 
12113     if test "x$OPENJDK_BUILD_OS" != xwindows; then
12114         # Follow a chain of symbolic links. Use readlink
12115         # where it exists, else fall back to horribly
12116         # complicated shell code.
12117         if test "x$READLINK_TESTED" != yes; then
12118             # On MacOSX there is a readlink tool with a different
12119             # purpose than the GNU readlink tool. Check the found readlink.
12120             ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
12121             if test "x$ISGNU" = x; then
12122                  # A readlink that we do not know how to use.
12123                  # Are there other non-GNU readlinks out there?
12124                  READLINK_TESTED=yes
12125                  READLINK=
12126             fi
12127         fi
12128 
12129         if test "x$READLINK" != x; then
12130             BINARY=`$READLINK -f $BINARY`
12131         else
12132             # Save the current directory for restoring afterwards
12133             STARTDIR=$PWD
12134             COUNTER=0
12135             sym_link_dir=`$DIRNAME $BINARY`
12136             sym_link_file=`$BASENAME $BINARY`
12137             # Use the system pwd and not the shell builtin to resolve directory symlinks
12138             cd $sym_link_dir
12139             cd `$THEPWDCMD`
12140             sym_link_dir=`$THEPWDCMD`
12141             # Resolve file symlinks
12142             while test $COUNTER -lt 20; do
12143                 ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
12144                 if test "x$ISLINK" == x; then
12145                     # This is not a symbolic link! We are done!
12146                     break
12147                 fi
12148                 # Again resolve directory symlinks since the target of the just found
12149                 # link could be in a different directory
12150                 cd `$DIRNAME $ISLINK`
12151                 sym_link_dir=`$THEPWDCMD`
12152                 sym_link_file=`$BASENAME $ISLINK`
12153                 let COUNTER=COUNTER+1
12154             done
12155             cd $STARTDIR
12156             BINARY=$sym_link_dir/$sym_link_file
12157         fi
12158     fi
12159 
12160         BOOT_JDK=`dirname "$BINARY"`
12161         BOOT_JDK=`cd "$BOOT_JDK/.."; pwd`
12162         if test -x "$BOOT_JDK/bin/javac" && test -x "$BOOT_JDK/bin/java"; then
12163             # Looks like we found ourselves an JDK
12164             BOOT_JDK_FOUND=maybe
12165             { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using java(c) in PATH" >&5
12166 $as_echo "$as_me: Found potential Boot JDK using java(c) in PATH" >&6;}
12167         fi
12168     fi
12169 
12170 
12171     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12172     if test "x$BOOT_JDK_FOUND" = xmaybe; then
12173       # Do we have a bin/java?
12174       if test ! -x "$BOOT_JDK/bin/java"; then
12175         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12176 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12177         BOOT_JDK_FOUND=no
12178       else
12179         # Do we have a bin/javac?
12180         if test ! -x "$BOOT_JDK/bin/javac"; then
12181           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12182 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12183           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12184 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12185           BOOT_JDK_FOUND=no
12186         else
12187           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12188           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12189             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12190 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12191             BOOT_JDK_FOUND=no
12192           else
12193             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12194             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12195 
12196             # Extra M4 quote needed to protect [] in grep expression.
12197             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12198             if test "x$FOUND_VERSION_78" = x; then
12199               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12200 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12201               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12202 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12203               BOOT_JDK_FOUND=no
12204             else
12205               # We're done! :-)
12206               BOOT_JDK_FOUND=yes
12207 
12208   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12209 
12210   # Input might be given as Windows format, start by converting to
12211   # unix format.
12212   path="$BOOT_JDK"
12213   new_path=`$CYGPATH -u "$path"`
12214 
12215   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12216   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12217   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12218   # "foo.exe" is OK but "foo" is an error.
12219   #
12220   # This test is therefore slightly more accurate than "test -f" to check for file precense.
12221   # It is also a way to make sure we got the proper file name for the real test later on.
12222   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12223   if test "x$test_shortpath" = x; then
12224     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12225 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12226     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12227   fi
12228 
12229   # Call helper function which possibly converts this using DOS-style short mode.
12230   # If so, the updated path is stored in $new_path.
12231 
12232   input_path="$new_path"
12233   # Check if we need to convert this using DOS-style short mode. If the path
12234   # contains just simple characters, use it. Otherwise (spaces, weird characters),
12235   # take no chances and rewrite it.
12236   # Note: m4 eats our [], so we need to use [ and ] instead.
12237   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12238   if test "x$has_forbidden_chars" != x; then
12239     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12240     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12241     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12242     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12243       # Going to short mode and back again did indeed matter. Since short mode is
12244       # case insensitive, let's make it lowercase to improve readability.
12245       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12246       # Now convert it back to Unix-stile (cygpath)
12247       input_path=`$CYGPATH -u "$shortmode_path"`
12248       new_path="$input_path"
12249     fi
12250   fi
12251 
12252   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12253   if test "x$test_cygdrive_prefix" = x; then
12254     # As a simple fix, exclude /usr/bin since it's not a real path.
12255     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12256       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12257       # a path prefixed by /cygdrive for fixpath to work.
12258       new_path="$CYGWIN_ROOT_PATH$input_path"
12259     fi
12260   fi
12261 
12262 
12263   if test "x$path" != "x$new_path"; then
12264     BOOT_JDK="$new_path"
12265     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12266 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12267   fi
12268 
12269   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12270 
12271   path="$BOOT_JDK"
12272   has_colon=`$ECHO $path | $GREP ^.:`
12273   new_path="$path"
12274   if test "x$has_colon" = x; then
12275     # Not in mixed or Windows style, start by that.
12276     new_path=`cmd //c echo $path`
12277   fi
12278 
12279 
12280   input_path="$new_path"
12281   # Check if we need to convert this using DOS-style short mode. If the path
12282   # contains just simple characters, use it. Otherwise (spaces, weird characters),
12283   # take no chances and rewrite it.
12284   # Note: m4 eats our [], so we need to use [ and ] instead.
12285   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12286   if test "x$has_forbidden_chars" != x; then
12287     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12288     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12289   fi
12290 
12291 
12292   windows_path="$new_path"
12293   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12294     unix_path=`$CYGPATH -u "$windows_path"`
12295     new_path="$unix_path"
12296   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12297     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12298     new_path="$unix_path"
12299   fi
12300 
12301   if test "x$path" != "x$new_path"; then
12302     BOOT_JDK="$new_path"
12303     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12304 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12305   fi
12306 
12307   # Save the first 10 bytes of this path to the storage, so fixpath can work.
12308   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12309 
12310   else
12311     # We're on a posix platform. Hooray! :)
12312     path="$BOOT_JDK"
12313 
12314     if test ! -f "$path" && test ! -d "$path"; then
12315       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
12316     fi
12317 
12318     has_space=`$ECHO "$path" | $GREP " "`
12319     if test "x$has_space" != x; then
12320       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12321 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12322       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
12323     fi
12324   fi
12325 
12326               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12327 $as_echo_n "checking for Boot JDK... " >&6; }
12328               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12329 $as_echo "$BOOT_JDK" >&6; }
12330               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12331 $as_echo_n "checking Boot JDK version... " >&6; }
12332               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12333               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12334 $as_echo "$BOOT_JDK_VERSION" >&6; }
12335             fi # end check jdk version
12336           fi # end check rt.jar
12337         fi # end check javac
12338       fi # end check java
12339     fi # end check boot jdk found
12340   fi
12341 
12342 
12343 # Test: Is there a JDK installed in default, well-known locations?
12344 
12345   if test "x$BOOT_JDK_FOUND" = xno; then
12346     # Now execute the test
12347 
12348   if test "x$OPENJDK_TARGET_OS" = xwindows; then
12349 
12350   if test "x$BOOT_JDK_FOUND" = xno; then
12351     # Now execute the test
12352 
12353   if test "x$ProgramW6432" != x; then
12354     VIRTUAL_DIR="$ProgramW6432/Java"
12355 
12356   windows_path="$VIRTUAL_DIR"
12357   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12358     unix_path=`$CYGPATH -u "$windows_path"`
12359     VIRTUAL_DIR="$unix_path"
12360   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12361     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12362     VIRTUAL_DIR="$unix_path"
12363   fi
12364 
12365 
12366   BOOT_JDK_PREFIX="$VIRTUAL_DIR"
12367   BOOT_JDK_SUFFIX=""
12368   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
12369   if test "x$ALL_JDKS_FOUND" != x; then
12370     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
12371 
12372   if test "x$BOOT_JDK_FOUND" = xno; then
12373     # Now execute the test
12374 
12375         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
12376         if test -d "$BOOT_JDK"; then
12377           BOOT_JDK_FOUND=maybe
12378           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
12379 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
12380         fi
12381 
12382 
12383     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12384     if test "x$BOOT_JDK_FOUND" = xmaybe; then
12385       # Do we have a bin/java?
12386       if test ! -x "$BOOT_JDK/bin/java"; then
12387         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12388 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12389         BOOT_JDK_FOUND=no
12390       else
12391         # Do we have a bin/javac?
12392         if test ! -x "$BOOT_JDK/bin/javac"; then
12393           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12394 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12395           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12396 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12397           BOOT_JDK_FOUND=no
12398         else
12399           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12400           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12401             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12402 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12403             BOOT_JDK_FOUND=no
12404           else
12405             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12406             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12407 
12408             # Extra M4 quote needed to protect [] in grep expression.
12409             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12410             if test "x$FOUND_VERSION_78" = x; then
12411               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12412 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12413               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12414 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12415               BOOT_JDK_FOUND=no
12416             else
12417               # We're done! :-)
12418               BOOT_JDK_FOUND=yes
12419 
12420   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12421 
12422   # Input might be given as Windows format, start by converting to
12423   # unix format.
12424   path="$BOOT_JDK"
12425   new_path=`$CYGPATH -u "$path"`
12426 
12427   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12428   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12429   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12430   # "foo.exe" is OK but "foo" is an error.
12431   #
12432   # This test is therefore slightly more accurate than "test -f" to check for file precense.
12433   # It is also a way to make sure we got the proper file name for the real test later on.
12434   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12435   if test "x$test_shortpath" = x; then
12436     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12437 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12438     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12439   fi
12440 
12441   # Call helper function which possibly converts this using DOS-style short mode.
12442   # If so, the updated path is stored in $new_path.
12443 
12444   input_path="$new_path"
12445   # Check if we need to convert this using DOS-style short mode. If the path
12446   # contains just simple characters, use it. Otherwise (spaces, weird characters),
12447   # take no chances and rewrite it.
12448   # Note: m4 eats our [], so we need to use [ and ] instead.
12449   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12450   if test "x$has_forbidden_chars" != x; then
12451     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12452     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12453     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12454     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12455       # Going to short mode and back again did indeed matter. Since short mode is
12456       # case insensitive, let's make it lowercase to improve readability.
12457       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12458       # Now convert it back to Unix-stile (cygpath)
12459       input_path=`$CYGPATH -u "$shortmode_path"`
12460       new_path="$input_path"
12461     fi
12462   fi
12463 
12464   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12465   if test "x$test_cygdrive_prefix" = x; then
12466     # As a simple fix, exclude /usr/bin since it's not a real path.
12467     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12468       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12469       # a path prefixed by /cygdrive for fixpath to work.
12470       new_path="$CYGWIN_ROOT_PATH$input_path"
12471     fi
12472   fi
12473 
12474 
12475   if test "x$path" != "x$new_path"; then
12476     BOOT_JDK="$new_path"
12477     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12478 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12479   fi
12480 
12481   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12482 
12483   path="$BOOT_JDK"
12484   has_colon=`$ECHO $path | $GREP ^.:`
12485   new_path="$path"
12486   if test "x$has_colon" = x; then
12487     # Not in mixed or Windows style, start by that.
12488     new_path=`cmd //c echo $path`
12489   fi
12490 
12491 
12492   input_path="$new_path"
12493   # Check if we need to convert this using DOS-style short mode. If the path
12494   # contains just simple characters, use it. Otherwise (spaces, weird characters),
12495   # take no chances and rewrite it.
12496   # Note: m4 eats our [], so we need to use [ and ] instead.
12497   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12498   if test "x$has_forbidden_chars" != x; then
12499     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12500     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12501   fi
12502 
12503 
12504   windows_path="$new_path"
12505   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12506     unix_path=`$CYGPATH -u "$windows_path"`
12507     new_path="$unix_path"
12508   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12509     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12510     new_path="$unix_path"
12511   fi
12512 
12513   if test "x$path" != "x$new_path"; then
12514     BOOT_JDK="$new_path"
12515     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12516 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12517   fi
12518 
12519   # Save the first 10 bytes of this path to the storage, so fixpath can work.
12520   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12521 
12522   else
12523     # We're on a posix platform. Hooray! :)
12524     path="$BOOT_JDK"
12525 
12526     if test ! -f "$path" && test ! -d "$path"; then
12527       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
12528     fi
12529 
12530     has_space=`$ECHO "$path" | $GREP " "`
12531     if test "x$has_space" != x; then
12532       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12533 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12534       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
12535     fi
12536   fi
12537 
12538               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12539 $as_echo_n "checking for Boot JDK... " >&6; }
12540               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12541 $as_echo "$BOOT_JDK" >&6; }
12542               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12543 $as_echo_n "checking Boot JDK version... " >&6; }
12544               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12545               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12546 $as_echo "$BOOT_JDK_VERSION" >&6; }
12547             fi # end check jdk version
12548           fi # end check rt.jar
12549         fi # end check javac
12550       fi # end check java
12551     fi # end check boot jdk found
12552   fi
12553 
12554     done
12555   fi
12556 
12557   fi
12558 
12559 
12560     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12561     if test "x$BOOT_JDK_FOUND" = xmaybe; then
12562       # Do we have a bin/java?
12563       if test ! -x "$BOOT_JDK/bin/java"; then
12564         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12565 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12566         BOOT_JDK_FOUND=no
12567       else
12568         # Do we have a bin/javac?
12569         if test ! -x "$BOOT_JDK/bin/javac"; then
12570           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12571 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12572           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12573 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12574           BOOT_JDK_FOUND=no
12575         else
12576           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12577           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12578             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12579 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12580             BOOT_JDK_FOUND=no
12581           else
12582             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12583             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12584 
12585             # Extra M4 quote needed to protect [] in grep expression.
12586             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12587             if test "x$FOUND_VERSION_78" = x; then
12588               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12589 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12590               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12591 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12592               BOOT_JDK_FOUND=no
12593             else
12594               # We're done! :-)
12595               BOOT_JDK_FOUND=yes
12596 
12597   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12598 
12599   # Input might be given as Windows format, start by converting to
12600   # unix format.
12601   path="$BOOT_JDK"
12602   new_path=`$CYGPATH -u "$path"`
12603 
12604   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12605   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12606   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12607   # "foo.exe" is OK but "foo" is an error.
12608   #
12609   # This test is therefore slightly more accurate than "test -f" to check for file precense.
12610   # It is also a way to make sure we got the proper file name for the real test later on.
12611   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12612   if test "x$test_shortpath" = x; then
12613     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12614 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12615     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12616   fi
12617 
12618   # Call helper function which possibly converts this using DOS-style short mode.
12619   # If so, the updated path is stored in $new_path.
12620 
12621   input_path="$new_path"
12622   # Check if we need to convert this using DOS-style short mode. If the path
12623   # contains just simple characters, use it. Otherwise (spaces, weird characters),
12624   # take no chances and rewrite it.
12625   # Note: m4 eats our [], so we need to use [ and ] instead.
12626   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12627   if test "x$has_forbidden_chars" != x; then
12628     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12629     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12630     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12631     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12632       # Going to short mode and back again did indeed matter. Since short mode is
12633       # case insensitive, let's make it lowercase to improve readability.
12634       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12635       # Now convert it back to Unix-stile (cygpath)
12636       input_path=`$CYGPATH -u "$shortmode_path"`
12637       new_path="$input_path"
12638     fi
12639   fi
12640 
12641   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12642   if test "x$test_cygdrive_prefix" = x; then
12643     # As a simple fix, exclude /usr/bin since it's not a real path.
12644     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12645       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12646       # a path prefixed by /cygdrive for fixpath to work.
12647       new_path="$CYGWIN_ROOT_PATH$input_path"
12648     fi
12649   fi
12650 
12651 
12652   if test "x$path" != "x$new_path"; then
12653     BOOT_JDK="$new_path"
12654     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12655 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12656   fi
12657 
12658   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12659 
12660   path="$BOOT_JDK"
12661   has_colon=`$ECHO $path | $GREP ^.:`
12662   new_path="$path"
12663   if test "x$has_colon" = x; then
12664     # Not in mixed or Windows style, start by that.
12665     new_path=`cmd //c echo $path`
12666   fi
12667 
12668 
12669   input_path="$new_path"
12670   # Check if we need to convert this using DOS-style short mode. If the path
12671   # contains just simple characters, use it. Otherwise (spaces, weird characters),
12672   # take no chances and rewrite it.
12673   # Note: m4 eats our [], so we need to use [ and ] instead.
12674   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12675   if test "x$has_forbidden_chars" != x; then
12676     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12677     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12678   fi
12679 
12680 
12681   windows_path="$new_path"
12682   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12683     unix_path=`$CYGPATH -u "$windows_path"`
12684     new_path="$unix_path"
12685   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12686     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12687     new_path="$unix_path"
12688   fi
12689 
12690   if test "x$path" != "x$new_path"; then
12691     BOOT_JDK="$new_path"
12692     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12693 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12694   fi
12695 
12696   # Save the first 10 bytes of this path to the storage, so fixpath can work.
12697   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12698 
12699   else
12700     # We're on a posix platform. Hooray! :)
12701     path="$BOOT_JDK"
12702 
12703     if test ! -f "$path" && test ! -d "$path"; then
12704       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
12705     fi
12706 
12707     has_space=`$ECHO "$path" | $GREP " "`
12708     if test "x$has_space" != x; then
12709       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12710 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12711       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
12712     fi
12713   fi
12714 
12715               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12716 $as_echo_n "checking for Boot JDK... " >&6; }
12717               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12718 $as_echo "$BOOT_JDK" >&6; }
12719               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12720 $as_echo_n "checking Boot JDK version... " >&6; }
12721               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12722               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12723 $as_echo "$BOOT_JDK_VERSION" >&6; }
12724             fi # end check jdk version
12725           fi # end check rt.jar
12726         fi # end check javac
12727       fi # end check java
12728     fi # end check boot jdk found
12729   fi
12730 
12731 
12732   if test "x$BOOT_JDK_FOUND" = xno; then
12733     # Now execute the test
12734 
12735   if test "x$PROGRAMW6432" != x; then
12736     VIRTUAL_DIR="$PROGRAMW6432/Java"
12737 
12738   windows_path="$VIRTUAL_DIR"
12739   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12740     unix_path=`$CYGPATH -u "$windows_path"`
12741     VIRTUAL_DIR="$unix_path"
12742   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12743     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12744     VIRTUAL_DIR="$unix_path"
12745   fi
12746 
12747 
12748   BOOT_JDK_PREFIX="$VIRTUAL_DIR"
12749   BOOT_JDK_SUFFIX=""
12750   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
12751   if test "x$ALL_JDKS_FOUND" != x; then
12752     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
12753 
12754   if test "x$BOOT_JDK_FOUND" = xno; then
12755     # Now execute the test
12756 
12757         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
12758         if test -d "$BOOT_JDK"; then
12759           BOOT_JDK_FOUND=maybe
12760           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
12761 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
12762         fi
12763 
12764 
12765     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12766     if test "x$BOOT_JDK_FOUND" = xmaybe; then
12767       # Do we have a bin/java?
12768       if test ! -x "$BOOT_JDK/bin/java"; then
12769         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12770 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12771         BOOT_JDK_FOUND=no
12772       else
12773         # Do we have a bin/javac?
12774         if test ! -x "$BOOT_JDK/bin/javac"; then
12775           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12776 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12777           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12778 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12779           BOOT_JDK_FOUND=no
12780         else
12781           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12782           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12783             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12784 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12785             BOOT_JDK_FOUND=no
12786           else
12787             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12788             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12789 
12790             # Extra M4 quote needed to protect [] in grep expression.
12791             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12792             if test "x$FOUND_VERSION_78" = x; then
12793               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12794 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12795               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12796 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12797               BOOT_JDK_FOUND=no
12798             else
12799               # We're done! :-)
12800               BOOT_JDK_FOUND=yes
12801 
12802   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12803 
12804   # Input might be given as Windows format, start by converting to
12805   # unix format.
12806   path="$BOOT_JDK"
12807   new_path=`$CYGPATH -u "$path"`
12808 
12809   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12810   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12811   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12812   # "foo.exe" is OK but "foo" is an error.
12813   #
12814   # This test is therefore slightly more accurate than "test -f" to check for file precense.
12815   # It is also a way to make sure we got the proper file name for the real test later on.
12816   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12817   if test "x$test_shortpath" = x; then
12818     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12819 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12820     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12821   fi
12822 
12823   # Call helper function which possibly converts this using DOS-style short mode.
12824   # If so, the updated path is stored in $new_path.
12825 
12826   input_path="$new_path"
12827   # Check if we need to convert this using DOS-style short mode. If the path
12828   # contains just simple characters, use it. Otherwise (spaces, weird characters),
12829   # take no chances and rewrite it.
12830   # Note: m4 eats our [], so we need to use [ and ] instead.
12831   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12832   if test "x$has_forbidden_chars" != x; then
12833     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12834     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12835     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12836     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12837       # Going to short mode and back again did indeed matter. Since short mode is
12838       # case insensitive, let's make it lowercase to improve readability.
12839       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12840       # Now convert it back to Unix-stile (cygpath)
12841       input_path=`$CYGPATH -u "$shortmode_path"`
12842       new_path="$input_path"
12843     fi
12844   fi
12845 
12846   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12847   if test "x$test_cygdrive_prefix" = x; then
12848     # As a simple fix, exclude /usr/bin since it's not a real path.
12849     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12850       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12851       # a path prefixed by /cygdrive for fixpath to work.
12852       new_path="$CYGWIN_ROOT_PATH$input_path"
12853     fi
12854   fi
12855 
12856 
12857   if test "x$path" != "x$new_path"; then
12858     BOOT_JDK="$new_path"
12859     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12860 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12861   fi
12862 
12863   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12864 
12865   path="$BOOT_JDK"
12866   has_colon=`$ECHO $path | $GREP ^.:`
12867   new_path="$path"
12868   if test "x$has_colon" = x; then
12869     # Not in mixed or Windows style, start by that.
12870     new_path=`cmd //c echo $path`
12871   fi
12872 
12873 
12874   input_path="$new_path"
12875   # Check if we need to convert this using DOS-style short mode. If the path
12876   # contains just simple characters, use it. Otherwise (spaces, weird characters),
12877   # take no chances and rewrite it.
12878   # Note: m4 eats our [], so we need to use [ and ] instead.
12879   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12880   if test "x$has_forbidden_chars" != x; then
12881     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12882     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12883   fi
12884 
12885 
12886   windows_path="$new_path"
12887   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12888     unix_path=`$CYGPATH -u "$windows_path"`
12889     new_path="$unix_path"
12890   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12891     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12892     new_path="$unix_path"
12893   fi
12894 
12895   if test "x$path" != "x$new_path"; then
12896     BOOT_JDK="$new_path"
12897     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12898 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12899   fi
12900 
12901   # Save the first 10 bytes of this path to the storage, so fixpath can work.
12902   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12903 
12904   else
12905     # We're on a posix platform. Hooray! :)
12906     path="$BOOT_JDK"
12907 
12908     if test ! -f "$path" && test ! -d "$path"; then
12909       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
12910     fi
12911 
12912     has_space=`$ECHO "$path" | $GREP " "`
12913     if test "x$has_space" != x; then
12914       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12915 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12916       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
12917     fi
12918   fi
12919 
12920               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12921 $as_echo_n "checking for Boot JDK... " >&6; }
12922               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12923 $as_echo "$BOOT_JDK" >&6; }
12924               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12925 $as_echo_n "checking Boot JDK version... " >&6; }
12926               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12927               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12928 $as_echo "$BOOT_JDK_VERSION" >&6; }
12929             fi # end check jdk version
12930           fi # end check rt.jar
12931         fi # end check javac
12932       fi # end check java
12933     fi # end check boot jdk found
12934   fi
12935 
12936     done
12937   fi
12938 
12939   fi
12940 
12941 
12942     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12943     if test "x$BOOT_JDK_FOUND" = xmaybe; then
12944       # Do we have a bin/java?
12945       if test ! -x "$BOOT_JDK/bin/java"; then
12946         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12947 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12948         BOOT_JDK_FOUND=no
12949       else
12950         # Do we have a bin/javac?
12951         if test ! -x "$BOOT_JDK/bin/javac"; then
12952           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12953 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12954           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12955 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12956           BOOT_JDK_FOUND=no
12957         else
12958           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12959           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12960             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12961 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12962             BOOT_JDK_FOUND=no
12963           else
12964             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12965             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12966 
12967             # Extra M4 quote needed to protect [] in grep expression.
12968             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12969             if test "x$FOUND_VERSION_78" = x; then
12970               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12971 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12972               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12973 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12974               BOOT_JDK_FOUND=no
12975             else
12976               # We're done! :-)
12977               BOOT_JDK_FOUND=yes
12978 
12979   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12980 
12981   # Input might be given as Windows format, start by converting to
12982   # unix format.
12983   path="$BOOT_JDK"
12984   new_path=`$CYGPATH -u "$path"`
12985 
12986   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12987   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12988   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12989   # "foo.exe" is OK but "foo" is an error.
12990   #
12991   # This test is therefore slightly more accurate than "test -f" to check for file precense.
12992   # It is also a way to make sure we got the proper file name for the real test later on.
12993   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12994   if test "x$test_shortpath" = x; then
12995     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12996 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12997     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12998   fi
12999 
13000   # Call helper function which possibly converts this using DOS-style short mode.
13001   # If so, the updated path is stored in $new_path.
13002 
13003   input_path="$new_path"
13004   # Check if we need to convert this using DOS-style short mode. If the path
13005   # contains just simple characters, use it. Otherwise (spaces, weird characters),
13006   # take no chances and rewrite it.
13007   # Note: m4 eats our [], so we need to use [ and ] instead.
13008   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13009   if test "x$has_forbidden_chars" != x; then
13010     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13011     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13012     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13013     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13014       # Going to short mode and back again did indeed matter. Since short mode is
13015       # case insensitive, let's make it lowercase to improve readability.
13016       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13017       # Now convert it back to Unix-stile (cygpath)
13018       input_path=`$CYGPATH -u "$shortmode_path"`
13019       new_path="$input_path"
13020     fi
13021   fi
13022 
13023   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13024   if test "x$test_cygdrive_prefix" = x; then
13025     # As a simple fix, exclude /usr/bin since it's not a real path.
13026     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13027       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13028       # a path prefixed by /cygdrive for fixpath to work.
13029       new_path="$CYGWIN_ROOT_PATH$input_path"
13030     fi
13031   fi
13032 
13033 
13034   if test "x$path" != "x$new_path"; then
13035     BOOT_JDK="$new_path"
13036     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13037 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13038   fi
13039 
13040   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13041 
13042   path="$BOOT_JDK"
13043   has_colon=`$ECHO $path | $GREP ^.:`
13044   new_path="$path"
13045   if test "x$has_colon" = x; then
13046     # Not in mixed or Windows style, start by that.
13047     new_path=`cmd //c echo $path`
13048   fi
13049 
13050 
13051   input_path="$new_path"
13052   # Check if we need to convert this using DOS-style short mode. If the path
13053   # contains just simple characters, use it. Otherwise (spaces, weird characters),
13054   # take no chances and rewrite it.
13055   # Note: m4 eats our [], so we need to use [ and ] instead.
13056   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13057   if test "x$has_forbidden_chars" != x; then
13058     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13059     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13060   fi
13061 
13062 
13063   windows_path="$new_path"
13064   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13065     unix_path=`$CYGPATH -u "$windows_path"`
13066     new_path="$unix_path"
13067   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13068     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13069     new_path="$unix_path"
13070   fi
13071 
13072   if test "x$path" != "x$new_path"; then
13073     BOOT_JDK="$new_path"
13074     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13075 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13076   fi
13077 
13078   # Save the first 10 bytes of this path to the storage, so fixpath can work.
13079   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13080 
13081   else
13082     # We're on a posix platform. Hooray! :)
13083     path="$BOOT_JDK"
13084 
13085     if test ! -f "$path" && test ! -d "$path"; then
13086       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13087     fi
13088 
13089     has_space=`$ECHO "$path" | $GREP " "`
13090     if test "x$has_space" != x; then
13091       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13092 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13093       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13094     fi
13095   fi
13096 
13097               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13098 $as_echo_n "checking for Boot JDK... " >&6; }
13099               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13100 $as_echo "$BOOT_JDK" >&6; }
13101               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13102 $as_echo_n "checking Boot JDK version... " >&6; }
13103               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13104               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13105 $as_echo "$BOOT_JDK_VERSION" >&6; }
13106             fi # end check jdk version
13107           fi # end check rt.jar
13108         fi # end check javac
13109       fi # end check java
13110     fi # end check boot jdk found
13111   fi
13112 
13113 
13114   if test "x$BOOT_JDK_FOUND" = xno; then
13115     # Now execute the test
13116 
13117   if test "x$PROGRAMFILES" != x; then
13118     VIRTUAL_DIR="$PROGRAMFILES/Java"
13119 
13120   windows_path="$VIRTUAL_DIR"
13121   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13122     unix_path=`$CYGPATH -u "$windows_path"`
13123     VIRTUAL_DIR="$unix_path"
13124   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13125     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13126     VIRTUAL_DIR="$unix_path"
13127   fi
13128 
13129 
13130   BOOT_JDK_PREFIX="$VIRTUAL_DIR"
13131   BOOT_JDK_SUFFIX=""
13132   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
13133   if test "x$ALL_JDKS_FOUND" != x; then
13134     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
13135 
13136   if test "x$BOOT_JDK_FOUND" = xno; then
13137     # Now execute the test
13138 
13139         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
13140         if test -d "$BOOT_JDK"; then
13141           BOOT_JDK_FOUND=maybe
13142           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
13143 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
13144         fi
13145 
13146 
13147     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13148     if test "x$BOOT_JDK_FOUND" = xmaybe; then
13149       # Do we have a bin/java?
13150       if test ! -x "$BOOT_JDK/bin/java"; then
13151         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13152 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13153         BOOT_JDK_FOUND=no
13154       else
13155         # Do we have a bin/javac?
13156         if test ! -x "$BOOT_JDK/bin/javac"; then
13157           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13158 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13159           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13160 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13161           BOOT_JDK_FOUND=no
13162         else
13163           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13164           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13165             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13166 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13167             BOOT_JDK_FOUND=no
13168           else
13169             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13170             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13171 
13172             # Extra M4 quote needed to protect [] in grep expression.
13173             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13174             if test "x$FOUND_VERSION_78" = x; then
13175               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13176 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13177               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13178 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13179               BOOT_JDK_FOUND=no
13180             else
13181               # We're done! :-)
13182               BOOT_JDK_FOUND=yes
13183 
13184   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13185 
13186   # Input might be given as Windows format, start by converting to
13187   # unix format.
13188   path="$BOOT_JDK"
13189   new_path=`$CYGPATH -u "$path"`
13190 
13191   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13192   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13193   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13194   # "foo.exe" is OK but "foo" is an error.
13195   #
13196   # This test is therefore slightly more accurate than "test -f" to check for file precense.
13197   # It is also a way to make sure we got the proper file name for the real test later on.
13198   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13199   if test "x$test_shortpath" = x; then
13200     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13201 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13202     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13203   fi
13204 
13205   # Call helper function which possibly converts this using DOS-style short mode.
13206   # If so, the updated path is stored in $new_path.
13207 
13208   input_path="$new_path"
13209   # Check if we need to convert this using DOS-style short mode. If the path
13210   # contains just simple characters, use it. Otherwise (spaces, weird characters),
13211   # take no chances and rewrite it.
13212   # Note: m4 eats our [], so we need to use [ and ] instead.
13213   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13214   if test "x$has_forbidden_chars" != x; then
13215     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13216     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13217     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13218     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13219       # Going to short mode and back again did indeed matter. Since short mode is
13220       # case insensitive, let's make it lowercase to improve readability.
13221       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13222       # Now convert it back to Unix-stile (cygpath)
13223       input_path=`$CYGPATH -u "$shortmode_path"`
13224       new_path="$input_path"
13225     fi
13226   fi
13227 
13228   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13229   if test "x$test_cygdrive_prefix" = x; then
13230     # As a simple fix, exclude /usr/bin since it's not a real path.
13231     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13232       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13233       # a path prefixed by /cygdrive for fixpath to work.
13234       new_path="$CYGWIN_ROOT_PATH$input_path"
13235     fi
13236   fi
13237 
13238 
13239   if test "x$path" != "x$new_path"; then
13240     BOOT_JDK="$new_path"
13241     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13242 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13243   fi
13244 
13245   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13246 
13247   path="$BOOT_JDK"
13248   has_colon=`$ECHO $path | $GREP ^.:`
13249   new_path="$path"
13250   if test "x$has_colon" = x; then
13251     # Not in mixed or Windows style, start by that.
13252     new_path=`cmd //c echo $path`
13253   fi
13254 
13255 
13256   input_path="$new_path"
13257   # Check if we need to convert this using DOS-style short mode. If the path
13258   # contains just simple characters, use it. Otherwise (spaces, weird characters),
13259   # take no chances and rewrite it.
13260   # Note: m4 eats our [], so we need to use [ and ] instead.
13261   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13262   if test "x$has_forbidden_chars" != x; then
13263     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13264     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13265   fi
13266 
13267 
13268   windows_path="$new_path"
13269   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13270     unix_path=`$CYGPATH -u "$windows_path"`
13271     new_path="$unix_path"
13272   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13273     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13274     new_path="$unix_path"
13275   fi
13276 
13277   if test "x$path" != "x$new_path"; then
13278     BOOT_JDK="$new_path"
13279     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13280 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13281   fi
13282 
13283   # Save the first 10 bytes of this path to the storage, so fixpath can work.
13284   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13285 
13286   else
13287     # We're on a posix platform. Hooray! :)
13288     path="$BOOT_JDK"
13289 
13290     if test ! -f "$path" && test ! -d "$path"; then
13291       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13292     fi
13293 
13294     has_space=`$ECHO "$path" | $GREP " "`
13295     if test "x$has_space" != x; then
13296       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13297 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13298       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13299     fi
13300   fi
13301 
13302               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13303 $as_echo_n "checking for Boot JDK... " >&6; }
13304               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13305 $as_echo "$BOOT_JDK" >&6; }
13306               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13307 $as_echo_n "checking Boot JDK version... " >&6; }
13308               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13309               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13310 $as_echo "$BOOT_JDK_VERSION" >&6; }
13311             fi # end check jdk version
13312           fi # end check rt.jar
13313         fi # end check javac
13314       fi # end check java
13315     fi # end check boot jdk found
13316   fi
13317 
13318     done
13319   fi
13320 
13321   fi
13322 
13323 
13324     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13325     if test "x$BOOT_JDK_FOUND" = xmaybe; then
13326       # Do we have a bin/java?
13327       if test ! -x "$BOOT_JDK/bin/java"; then
13328         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13329 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13330         BOOT_JDK_FOUND=no
13331       else
13332         # Do we have a bin/javac?
13333         if test ! -x "$BOOT_JDK/bin/javac"; then
13334           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13335 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13336           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13337 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13338           BOOT_JDK_FOUND=no
13339         else
13340           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13341           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13342             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13343 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13344             BOOT_JDK_FOUND=no
13345           else
13346             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13347             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13348 
13349             # Extra M4 quote needed to protect [] in grep expression.
13350             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13351             if test "x$FOUND_VERSION_78" = x; then
13352               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13353 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13354               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13355 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13356               BOOT_JDK_FOUND=no
13357             else
13358               # We're done! :-)
13359               BOOT_JDK_FOUND=yes
13360 
13361   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13362 
13363   # Input might be given as Windows format, start by converting to
13364   # unix format.
13365   path="$BOOT_JDK"
13366   new_path=`$CYGPATH -u "$path"`
13367 
13368   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13369   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13370   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13371   # "foo.exe" is OK but "foo" is an error.
13372   #
13373   # This test is therefore slightly more accurate than "test -f" to check for file precense.
13374   # It is also a way to make sure we got the proper file name for the real test later on.
13375   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13376   if test "x$test_shortpath" = x; then
13377     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13378 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13379     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13380   fi
13381 
13382   # Call helper function which possibly converts this using DOS-style short mode.
13383   # If so, the updated path is stored in $new_path.
13384 
13385   input_path="$new_path"
13386   # Check if we need to convert this using DOS-style short mode. If the path
13387   # contains just simple characters, use it. Otherwise (spaces, weird characters),
13388   # take no chances and rewrite it.
13389   # Note: m4 eats our [], so we need to use [ and ] instead.
13390   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13391   if test "x$has_forbidden_chars" != x; then
13392     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13393     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13394     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13395     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13396       # Going to short mode and back again did indeed matter. Since short mode is
13397       # case insensitive, let's make it lowercase to improve readability.
13398       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13399       # Now convert it back to Unix-stile (cygpath)
13400       input_path=`$CYGPATH -u "$shortmode_path"`
13401       new_path="$input_path"
13402     fi
13403   fi
13404 
13405   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13406   if test "x$test_cygdrive_prefix" = x; then
13407     # As a simple fix, exclude /usr/bin since it's not a real path.
13408     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13409       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13410       # a path prefixed by /cygdrive for fixpath to work.
13411       new_path="$CYGWIN_ROOT_PATH$input_path"
13412     fi
13413   fi
13414 
13415 
13416   if test "x$path" != "x$new_path"; then
13417     BOOT_JDK="$new_path"
13418     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13419 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13420   fi
13421 
13422   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13423 
13424   path="$BOOT_JDK"
13425   has_colon=`$ECHO $path | $GREP ^.:`
13426   new_path="$path"
13427   if test "x$has_colon" = x; then
13428     # Not in mixed or Windows style, start by that.
13429     new_path=`cmd //c echo $path`
13430   fi
13431 
13432 
13433   input_path="$new_path"
13434   # Check if we need to convert this using DOS-style short mode. If the path
13435   # contains just simple characters, use it. Otherwise (spaces, weird characters),
13436   # take no chances and rewrite it.
13437   # Note: m4 eats our [], so we need to use [ and ] instead.
13438   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13439   if test "x$has_forbidden_chars" != x; then
13440     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13441     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13442   fi
13443 
13444 
13445   windows_path="$new_path"
13446   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13447     unix_path=`$CYGPATH -u "$windows_path"`
13448     new_path="$unix_path"
13449   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13450     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13451     new_path="$unix_path"
13452   fi
13453 
13454   if test "x$path" != "x$new_path"; then
13455     BOOT_JDK="$new_path"
13456     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13457 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13458   fi
13459 
13460   # Save the first 10 bytes of this path to the storage, so fixpath can work.
13461   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13462 
13463   else
13464     # We're on a posix platform. Hooray! :)
13465     path="$BOOT_JDK"
13466 
13467     if test ! -f "$path" && test ! -d "$path"; then
13468       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13469     fi
13470 
13471     has_space=`$ECHO "$path" | $GREP " "`
13472     if test "x$has_space" != x; then
13473       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13474 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13475       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13476     fi
13477   fi
13478 
13479               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13480 $as_echo_n "checking for Boot JDK... " >&6; }
13481               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13482 $as_echo "$BOOT_JDK" >&6; }
13483               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13484 $as_echo_n "checking Boot JDK version... " >&6; }
13485               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13486               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13487 $as_echo "$BOOT_JDK_VERSION" >&6; }
13488             fi # end check jdk version
13489           fi # end check rt.jar
13490         fi # end check javac
13491       fi # end check java
13492     fi # end check boot jdk found
13493   fi
13494 
13495 
13496   if test "x$BOOT_JDK_FOUND" = xno; then
13497     # Now execute the test
13498 
13499   if test "x$ProgramFiles" != x; then
13500     VIRTUAL_DIR="$ProgramFiles/Java"
13501 
13502   windows_path="$VIRTUAL_DIR"
13503   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13504     unix_path=`$CYGPATH -u "$windows_path"`
13505     VIRTUAL_DIR="$unix_path"
13506   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13507     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13508     VIRTUAL_DIR="$unix_path"
13509   fi
13510 
13511 
13512   BOOT_JDK_PREFIX="$VIRTUAL_DIR"
13513   BOOT_JDK_SUFFIX=""
13514   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
13515   if test "x$ALL_JDKS_FOUND" != x; then
13516     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
13517 
13518   if test "x$BOOT_JDK_FOUND" = xno; then
13519     # Now execute the test
13520 
13521         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
13522         if test -d "$BOOT_JDK"; then
13523           BOOT_JDK_FOUND=maybe
13524           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
13525 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
13526         fi
13527 
13528 
13529     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13530     if test "x$BOOT_JDK_FOUND" = xmaybe; then
13531       # Do we have a bin/java?
13532       if test ! -x "$BOOT_JDK/bin/java"; then
13533         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13534 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13535         BOOT_JDK_FOUND=no
13536       else
13537         # Do we have a bin/javac?
13538         if test ! -x "$BOOT_JDK/bin/javac"; then
13539           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13540 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13541           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13542 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13543           BOOT_JDK_FOUND=no
13544         else
13545           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13546           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13547             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13548 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13549             BOOT_JDK_FOUND=no
13550           else
13551             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13552             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13553 
13554             # Extra M4 quote needed to protect [] in grep expression.
13555             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13556             if test "x$FOUND_VERSION_78" = x; then
13557               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13558 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13559               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13560 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13561               BOOT_JDK_FOUND=no
13562             else
13563               # We're done! :-)
13564               BOOT_JDK_FOUND=yes
13565 
13566   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13567 
13568   # Input might be given as Windows format, start by converting to
13569   # unix format.
13570   path="$BOOT_JDK"
13571   new_path=`$CYGPATH -u "$path"`
13572 
13573   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13574   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13575   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13576   # "foo.exe" is OK but "foo" is an error.
13577   #
13578   # This test is therefore slightly more accurate than "test -f" to check for file precense.
13579   # It is also a way to make sure we got the proper file name for the real test later on.
13580   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13581   if test "x$test_shortpath" = x; then
13582     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13583 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13584     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13585   fi
13586 
13587   # Call helper function which possibly converts this using DOS-style short mode.
13588   # If so, the updated path is stored in $new_path.
13589 
13590   input_path="$new_path"
13591   # Check if we need to convert this using DOS-style short mode. If the path
13592   # contains just simple characters, use it. Otherwise (spaces, weird characters),
13593   # take no chances and rewrite it.
13594   # Note: m4 eats our [], so we need to use [ and ] instead.
13595   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13596   if test "x$has_forbidden_chars" != x; then
13597     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13598     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13599     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13600     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13601       # Going to short mode and back again did indeed matter. Since short mode is
13602       # case insensitive, let's make it lowercase to improve readability.
13603       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13604       # Now convert it back to Unix-stile (cygpath)
13605       input_path=`$CYGPATH -u "$shortmode_path"`
13606       new_path="$input_path"
13607     fi
13608   fi
13609 
13610   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13611   if test "x$test_cygdrive_prefix" = x; then
13612     # As a simple fix, exclude /usr/bin since it's not a real path.
13613     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13614       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13615       # a path prefixed by /cygdrive for fixpath to work.
13616       new_path="$CYGWIN_ROOT_PATH$input_path"
13617     fi
13618   fi
13619 
13620 
13621   if test "x$path" != "x$new_path"; then
13622     BOOT_JDK="$new_path"
13623     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13624 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13625   fi
13626 
13627   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13628 
13629   path="$BOOT_JDK"
13630   has_colon=`$ECHO $path | $GREP ^.:`
13631   new_path="$path"
13632   if test "x$has_colon" = x; then
13633     # Not in mixed or Windows style, start by that.
13634     new_path=`cmd //c echo $path`
13635   fi
13636 
13637 
13638   input_path="$new_path"
13639   # Check if we need to convert this using DOS-style short mode. If the path
13640   # contains just simple characters, use it. Otherwise (spaces, weird characters),
13641   # take no chances and rewrite it.
13642   # Note: m4 eats our [], so we need to use [ and ] instead.
13643   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13644   if test "x$has_forbidden_chars" != x; then
13645     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13646     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13647   fi
13648 
13649 
13650   windows_path="$new_path"
13651   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13652     unix_path=`$CYGPATH -u "$windows_path"`
13653     new_path="$unix_path"
13654   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13655     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13656     new_path="$unix_path"
13657   fi
13658 
13659   if test "x$path" != "x$new_path"; then
13660     BOOT_JDK="$new_path"
13661     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13662 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13663   fi
13664 
13665   # Save the first 10 bytes of this path to the storage, so fixpath can work.
13666   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13667 
13668   else
13669     # We're on a posix platform. Hooray! :)
13670     path="$BOOT_JDK"
13671 
13672     if test ! -f "$path" && test ! -d "$path"; then
13673       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13674     fi
13675 
13676     has_space=`$ECHO "$path" | $GREP " "`
13677     if test "x$has_space" != x; then
13678       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13679 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13680       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13681     fi
13682   fi
13683 
13684               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13685 $as_echo_n "checking for Boot JDK... " >&6; }
13686               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13687 $as_echo "$BOOT_JDK" >&6; }
13688               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13689 $as_echo_n "checking Boot JDK version... " >&6; }
13690               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13691               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13692 $as_echo "$BOOT_JDK_VERSION" >&6; }
13693             fi # end check jdk version
13694           fi # end check rt.jar
13695         fi # end check javac
13696       fi # end check java
13697     fi # end check boot jdk found
13698   fi
13699 
13700     done
13701   fi
13702 
13703   fi
13704 
13705 
13706     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13707     if test "x$BOOT_JDK_FOUND" = xmaybe; then
13708       # Do we have a bin/java?
13709       if test ! -x "$BOOT_JDK/bin/java"; then
13710         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13711 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13712         BOOT_JDK_FOUND=no
13713       else
13714         # Do we have a bin/javac?
13715         if test ! -x "$BOOT_JDK/bin/javac"; then
13716           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13717 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13718           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13719 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13720           BOOT_JDK_FOUND=no
13721         else
13722           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13723           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13724             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13725 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13726             BOOT_JDK_FOUND=no
13727           else
13728             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13729             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13730 
13731             # Extra M4 quote needed to protect [] in grep expression.
13732             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13733             if test "x$FOUND_VERSION_78" = x; then
13734               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13735 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13736               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13737 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13738               BOOT_JDK_FOUND=no
13739             else
13740               # We're done! :-)
13741               BOOT_JDK_FOUND=yes
13742 
13743   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13744 
13745   # Input might be given as Windows format, start by converting to
13746   # unix format.
13747   path="$BOOT_JDK"
13748   new_path=`$CYGPATH -u "$path"`
13749 
13750   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13751   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13752   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13753   # "foo.exe" is OK but "foo" is an error.
13754   #
13755   # This test is therefore slightly more accurate than "test -f" to check for file precense.
13756   # It is also a way to make sure we got the proper file name for the real test later on.
13757   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13758   if test "x$test_shortpath" = x; then
13759     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13760 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13761     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13762   fi
13763 
13764   # Call helper function which possibly converts this using DOS-style short mode.
13765   # If so, the updated path is stored in $new_path.
13766 
13767   input_path="$new_path"
13768   # Check if we need to convert this using DOS-style short mode. If the path
13769   # contains just simple characters, use it. Otherwise (spaces, weird characters),
13770   # take no chances and rewrite it.
13771   # Note: m4 eats our [], so we need to use [ and ] instead.
13772   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13773   if test "x$has_forbidden_chars" != x; then
13774     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13775     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13776     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13777     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13778       # Going to short mode and back again did indeed matter. Since short mode is
13779       # case insensitive, let's make it lowercase to improve readability.
13780       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13781       # Now convert it back to Unix-stile (cygpath)
13782       input_path=`$CYGPATH -u "$shortmode_path"`
13783       new_path="$input_path"
13784     fi
13785   fi
13786 
13787   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13788   if test "x$test_cygdrive_prefix" = x; then
13789     # As a simple fix, exclude /usr/bin since it's not a real path.
13790     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13791       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13792       # a path prefixed by /cygdrive for fixpath to work.
13793       new_path="$CYGWIN_ROOT_PATH$input_path"
13794     fi
13795   fi
13796 
13797 
13798   if test "x$path" != "x$new_path"; then
13799     BOOT_JDK="$new_path"
13800     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13801 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13802   fi
13803 
13804   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13805 
13806   path="$BOOT_JDK"
13807   has_colon=`$ECHO $path | $GREP ^.:`
13808   new_path="$path"
13809   if test "x$has_colon" = x; then
13810     # Not in mixed or Windows style, start by that.
13811     new_path=`cmd //c echo $path`
13812   fi
13813 
13814 
13815   input_path="$new_path"
13816   # Check if we need to convert this using DOS-style short mode. If the path
13817   # contains just simple characters, use it. Otherwise (spaces, weird characters),
13818   # take no chances and rewrite it.
13819   # Note: m4 eats our [], so we need to use [ and ] instead.
13820   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13821   if test "x$has_forbidden_chars" != x; then
13822     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13823     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13824   fi
13825 
13826 
13827   windows_path="$new_path"
13828   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13829     unix_path=`$CYGPATH -u "$windows_path"`
13830     new_path="$unix_path"
13831   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13832     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13833     new_path="$unix_path"
13834   fi
13835 
13836   if test "x$path" != "x$new_path"; then
13837     BOOT_JDK="$new_path"
13838     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13839 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13840   fi
13841 
13842   # Save the first 10 bytes of this path to the storage, so fixpath can work.
13843   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13844 
13845   else
13846     # We're on a posix platform. Hooray! :)
13847     path="$BOOT_JDK"
13848 
13849     if test ! -f "$path" && test ! -d "$path"; then
13850       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13851     fi
13852 
13853     has_space=`$ECHO "$path" | $GREP " "`
13854     if test "x$has_space" != x; then
13855       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13856 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13857       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13858     fi
13859   fi
13860 
13861               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13862 $as_echo_n "checking for Boot JDK... " >&6; }
13863               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13864 $as_echo "$BOOT_JDK" >&6; }
13865               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13866 $as_echo_n "checking Boot JDK version... " >&6; }
13867               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13868               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13869 $as_echo "$BOOT_JDK_VERSION" >&6; }
13870             fi # end check jdk version
13871           fi # end check rt.jar
13872         fi # end check javac
13873       fi # end check java
13874     fi # end check boot jdk found
13875   fi
13876 
13877 
13878   if test "x$BOOT_JDK_FOUND" = xno; then
13879     # Now execute the test
13880 
13881   BOOT_JDK_PREFIX="/cygdrive/c/Program Files/Java"
13882   BOOT_JDK_SUFFIX=""
13883   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
13884   if test "x$ALL_JDKS_FOUND" != x; then
13885     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
13886 
13887   if test "x$BOOT_JDK_FOUND" = xno; then
13888     # Now execute the test
13889 
13890         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
13891         if test -d "$BOOT_JDK"; then
13892           BOOT_JDK_FOUND=maybe
13893           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
13894 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
13895         fi
13896 
13897 
13898     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13899     if test "x$BOOT_JDK_FOUND" = xmaybe; then
13900       # Do we have a bin/java?
13901       if test ! -x "$BOOT_JDK/bin/java"; then
13902         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13903 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13904         BOOT_JDK_FOUND=no
13905       else
13906         # Do we have a bin/javac?
13907         if test ! -x "$BOOT_JDK/bin/javac"; then
13908           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13909 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13910           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13911 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13912           BOOT_JDK_FOUND=no
13913         else
13914           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13915           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13916             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13917 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13918             BOOT_JDK_FOUND=no
13919           else
13920             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13921             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13922 
13923             # Extra M4 quote needed to protect [] in grep expression.
13924             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13925             if test "x$FOUND_VERSION_78" = x; then
13926               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13927 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13928               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13929 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13930               BOOT_JDK_FOUND=no
13931             else
13932               # We're done! :-)
13933               BOOT_JDK_FOUND=yes
13934 
13935   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13936 
13937   # Input might be given as Windows format, start by converting to
13938   # unix format.
13939   path="$BOOT_JDK"
13940   new_path=`$CYGPATH -u "$path"`
13941 
13942   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13943   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13944   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13945   # "foo.exe" is OK but "foo" is an error.
13946   #
13947   # This test is therefore slightly more accurate than "test -f" to check for file precense.
13948   # It is also a way to make sure we got the proper file name for the real test later on.
13949   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13950   if test "x$test_shortpath" = x; then
13951     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13952 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13953     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13954   fi
13955 
13956   # Call helper function which possibly converts this using DOS-style short mode.
13957   # If so, the updated path is stored in $new_path.
13958 
13959   input_path="$new_path"
13960   # Check if we need to convert this using DOS-style short mode. If the path
13961   # contains just simple characters, use it. Otherwise (spaces, weird characters),
13962   # take no chances and rewrite it.
13963   # Note: m4 eats our [], so we need to use [ and ] instead.
13964   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13965   if test "x$has_forbidden_chars" != x; then
13966     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13967     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13968     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13969     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13970       # Going to short mode and back again did indeed matter. Since short mode is
13971       # case insensitive, let's make it lowercase to improve readability.
13972       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13973       # Now convert it back to Unix-stile (cygpath)
13974       input_path=`$CYGPATH -u "$shortmode_path"`
13975       new_path="$input_path"
13976     fi
13977   fi
13978 
13979   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13980   if test "x$test_cygdrive_prefix" = x; then
13981     # As a simple fix, exclude /usr/bin since it's not a real path.
13982     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13983       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13984       # a path prefixed by /cygdrive for fixpath to work.
13985       new_path="$CYGWIN_ROOT_PATH$input_path"
13986     fi
13987   fi
13988 
13989 
13990   if test "x$path" != "x$new_path"; then
13991     BOOT_JDK="$new_path"
13992     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13993 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13994   fi
13995 
13996   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13997 
13998   path="$BOOT_JDK"
13999   has_colon=`$ECHO $path | $GREP ^.:`
14000   new_path="$path"
14001   if test "x$has_colon" = x; then
14002     # Not in mixed or Windows style, start by that.
14003     new_path=`cmd //c echo $path`
14004   fi
14005 
14006 
14007   input_path="$new_path"
14008   # Check if we need to convert this using DOS-style short mode. If the path
14009   # contains just simple characters, use it. Otherwise (spaces, weird characters),
14010   # take no chances and rewrite it.
14011   # Note: m4 eats our [], so we need to use [ and ] instead.
14012   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14013   if test "x$has_forbidden_chars" != x; then
14014     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14015     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14016   fi
14017 
14018 
14019   windows_path="$new_path"
14020   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14021     unix_path=`$CYGPATH -u "$windows_path"`
14022     new_path="$unix_path"
14023   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14024     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14025     new_path="$unix_path"
14026   fi
14027 
14028   if test "x$path" != "x$new_path"; then
14029     BOOT_JDK="$new_path"
14030     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14031 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14032   fi
14033 
14034   # Save the first 10 bytes of this path to the storage, so fixpath can work.
14035   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14036 
14037   else
14038     # We're on a posix platform. Hooray! :)
14039     path="$BOOT_JDK"
14040 
14041     if test ! -f "$path" && test ! -d "$path"; then
14042       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14043     fi
14044 
14045     has_space=`$ECHO "$path" | $GREP " "`
14046     if test "x$has_space" != x; then
14047       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14048 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14049       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14050     fi
14051   fi
14052 
14053               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14054 $as_echo_n "checking for Boot JDK... " >&6; }
14055               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14056 $as_echo "$BOOT_JDK" >&6; }
14057               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14058 $as_echo_n "checking Boot JDK version... " >&6; }
14059               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14060               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14061 $as_echo "$BOOT_JDK_VERSION" >&6; }
14062             fi # end check jdk version
14063           fi # end check rt.jar
14064         fi # end check javac
14065       fi # end check java
14066     fi # end check boot jdk found
14067   fi
14068 
14069     done
14070   fi
14071 
14072 
14073     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14074     if test "x$BOOT_JDK_FOUND" = xmaybe; then
14075       # Do we have a bin/java?
14076       if test ! -x "$BOOT_JDK/bin/java"; then
14077         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14078 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14079         BOOT_JDK_FOUND=no
14080       else
14081         # Do we have a bin/javac?
14082         if test ! -x "$BOOT_JDK/bin/javac"; then
14083           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14084 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14085           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14086 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14087           BOOT_JDK_FOUND=no
14088         else
14089           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14090           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14091             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14092 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14093             BOOT_JDK_FOUND=no
14094           else
14095             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14096             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14097 
14098             # Extra M4 quote needed to protect [] in grep expression.
14099             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14100             if test "x$FOUND_VERSION_78" = x; then
14101               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14102 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14103               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14104 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14105               BOOT_JDK_FOUND=no
14106             else
14107               # We're done! :-)
14108               BOOT_JDK_FOUND=yes
14109 
14110   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14111 
14112   # Input might be given as Windows format, start by converting to
14113   # unix format.
14114   path="$BOOT_JDK"
14115   new_path=`$CYGPATH -u "$path"`
14116 
14117   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14118   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14119   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14120   # "foo.exe" is OK but "foo" is an error.
14121   #
14122   # This test is therefore slightly more accurate than "test -f" to check for file precense.
14123   # It is also a way to make sure we got the proper file name for the real test later on.
14124   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14125   if test "x$test_shortpath" = x; then
14126     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14127 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14128     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14129   fi
14130 
14131   # Call helper function which possibly converts this using DOS-style short mode.
14132   # If so, the updated path is stored in $new_path.
14133 
14134   input_path="$new_path"
14135   # Check if we need to convert this using DOS-style short mode. If the path
14136   # contains just simple characters, use it. Otherwise (spaces, weird characters),
14137   # take no chances and rewrite it.
14138   # Note: m4 eats our [], so we need to use [ and ] instead.
14139   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14140   if test "x$has_forbidden_chars" != x; then
14141     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14142     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14143     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14144     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14145       # Going to short mode and back again did indeed matter. Since short mode is
14146       # case insensitive, let's make it lowercase to improve readability.
14147       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14148       # Now convert it back to Unix-stile (cygpath)
14149       input_path=`$CYGPATH -u "$shortmode_path"`
14150       new_path="$input_path"
14151     fi
14152   fi
14153 
14154   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14155   if test "x$test_cygdrive_prefix" = x; then
14156     # As a simple fix, exclude /usr/bin since it's not a real path.
14157     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14158       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14159       # a path prefixed by /cygdrive for fixpath to work.
14160       new_path="$CYGWIN_ROOT_PATH$input_path"
14161     fi
14162   fi
14163 
14164 
14165   if test "x$path" != "x$new_path"; then
14166     BOOT_JDK="$new_path"
14167     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14168 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14169   fi
14170 
14171   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14172 
14173   path="$BOOT_JDK"
14174   has_colon=`$ECHO $path | $GREP ^.:`
14175   new_path="$path"
14176   if test "x$has_colon" = x; then
14177     # Not in mixed or Windows style, start by that.
14178     new_path=`cmd //c echo $path`
14179   fi
14180 
14181 
14182   input_path="$new_path"
14183   # Check if we need to convert this using DOS-style short mode. If the path
14184   # contains just simple characters, use it. Otherwise (spaces, weird characters),
14185   # take no chances and rewrite it.
14186   # Note: m4 eats our [], so we need to use [ and ] instead.
14187   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14188   if test "x$has_forbidden_chars" != x; then
14189     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14190     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14191   fi
14192 
14193 
14194   windows_path="$new_path"
14195   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14196     unix_path=`$CYGPATH -u "$windows_path"`
14197     new_path="$unix_path"
14198   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14199     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14200     new_path="$unix_path"
14201   fi
14202 
14203   if test "x$path" != "x$new_path"; then
14204     BOOT_JDK="$new_path"
14205     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14206 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14207   fi
14208 
14209   # Save the first 10 bytes of this path to the storage, so fixpath can work.
14210   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14211 
14212   else
14213     # We're on a posix platform. Hooray! :)
14214     path="$BOOT_JDK"
14215 
14216     if test ! -f "$path" && test ! -d "$path"; then
14217       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14218     fi
14219 
14220     has_space=`$ECHO "$path" | $GREP " "`
14221     if test "x$has_space" != x; then
14222       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14223 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14224       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14225     fi
14226   fi
14227 
14228               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14229 $as_echo_n "checking for Boot JDK... " >&6; }
14230               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14231 $as_echo "$BOOT_JDK" >&6; }
14232               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14233 $as_echo_n "checking Boot JDK version... " >&6; }
14234               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14235               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14236 $as_echo "$BOOT_JDK_VERSION" >&6; }
14237             fi # end check jdk version
14238           fi # end check rt.jar
14239         fi # end check javac
14240       fi # end check java
14241     fi # end check boot jdk found
14242   fi
14243 
14244   elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
14245 
14246   if test "x$BOOT_JDK_FOUND" = xno; then
14247     # Now execute the test
14248 
14249   BOOT_JDK_PREFIX="/Library/Java/JavaVirtualMachines"
14250   BOOT_JDK_SUFFIX="/Contents/Home"
14251   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
14252   if test "x$ALL_JDKS_FOUND" != x; then
14253     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
14254 
14255   if test "x$BOOT_JDK_FOUND" = xno; then
14256     # Now execute the test
14257 
14258         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
14259         if test -d "$BOOT_JDK"; then
14260           BOOT_JDK_FOUND=maybe
14261           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
14262 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
14263         fi
14264 
14265 
14266     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14267     if test "x$BOOT_JDK_FOUND" = xmaybe; then
14268       # Do we have a bin/java?
14269       if test ! -x "$BOOT_JDK/bin/java"; then
14270         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14271 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14272         BOOT_JDK_FOUND=no
14273       else
14274         # Do we have a bin/javac?
14275         if test ! -x "$BOOT_JDK/bin/javac"; then
14276           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14277 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14278           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14279 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14280           BOOT_JDK_FOUND=no
14281         else
14282           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14283           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14284             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14285 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14286             BOOT_JDK_FOUND=no
14287           else
14288             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14289             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14290 
14291             # Extra M4 quote needed to protect [] in grep expression.
14292             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14293             if test "x$FOUND_VERSION_78" = x; then
14294               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14295 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14296               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14297 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14298               BOOT_JDK_FOUND=no
14299             else
14300               # We're done! :-)
14301               BOOT_JDK_FOUND=yes
14302 
14303   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14304 
14305   # Input might be given as Windows format, start by converting to
14306   # unix format.
14307   path="$BOOT_JDK"
14308   new_path=`$CYGPATH -u "$path"`
14309 
14310   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14311   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14312   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14313   # "foo.exe" is OK but "foo" is an error.
14314   #
14315   # This test is therefore slightly more accurate than "test -f" to check for file precense.
14316   # It is also a way to make sure we got the proper file name for the real test later on.
14317   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14318   if test "x$test_shortpath" = x; then
14319     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14320 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14321     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14322   fi
14323 
14324   # Call helper function which possibly converts this using DOS-style short mode.
14325   # If so, the updated path is stored in $new_path.
14326 
14327   input_path="$new_path"
14328   # Check if we need to convert this using DOS-style short mode. If the path
14329   # contains just simple characters, use it. Otherwise (spaces, weird characters),
14330   # take no chances and rewrite it.
14331   # Note: m4 eats our [], so we need to use [ and ] instead.
14332   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14333   if test "x$has_forbidden_chars" != x; then
14334     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14335     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14336     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14337     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14338       # Going to short mode and back again did indeed matter. Since short mode is
14339       # case insensitive, let's make it lowercase to improve readability.
14340       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14341       # Now convert it back to Unix-stile (cygpath)
14342       input_path=`$CYGPATH -u "$shortmode_path"`
14343       new_path="$input_path"
14344     fi
14345   fi
14346 
14347   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14348   if test "x$test_cygdrive_prefix" = x; then
14349     # As a simple fix, exclude /usr/bin since it's not a real path.
14350     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14351       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14352       # a path prefixed by /cygdrive for fixpath to work.
14353       new_path="$CYGWIN_ROOT_PATH$input_path"
14354     fi
14355   fi
14356 
14357 
14358   if test "x$path" != "x$new_path"; then
14359     BOOT_JDK="$new_path"
14360     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14361 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14362   fi
14363 
14364   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14365 
14366   path="$BOOT_JDK"
14367   has_colon=`$ECHO $path | $GREP ^.:`
14368   new_path="$path"
14369   if test "x$has_colon" = x; then
14370     # Not in mixed or Windows style, start by that.
14371     new_path=`cmd //c echo $path`
14372   fi
14373 
14374 
14375   input_path="$new_path"
14376   # Check if we need to convert this using DOS-style short mode. If the path
14377   # contains just simple characters, use it. Otherwise (spaces, weird characters),
14378   # take no chances and rewrite it.
14379   # Note: m4 eats our [], so we need to use [ and ] instead.
14380   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14381   if test "x$has_forbidden_chars" != x; then
14382     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14383     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14384   fi
14385 
14386 
14387   windows_path="$new_path"
14388   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14389     unix_path=`$CYGPATH -u "$windows_path"`
14390     new_path="$unix_path"
14391   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14392     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14393     new_path="$unix_path"
14394   fi
14395 
14396   if test "x$path" != "x$new_path"; then
14397     BOOT_JDK="$new_path"
14398     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14399 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14400   fi
14401 
14402   # Save the first 10 bytes of this path to the storage, so fixpath can work.
14403   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14404 
14405   else
14406     # We're on a posix platform. Hooray! :)
14407     path="$BOOT_JDK"
14408 
14409     if test ! -f "$path" && test ! -d "$path"; then
14410       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14411     fi
14412 
14413     has_space=`$ECHO "$path" | $GREP " "`
14414     if test "x$has_space" != x; then
14415       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14416 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14417       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14418     fi
14419   fi
14420 
14421               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14422 $as_echo_n "checking for Boot JDK... " >&6; }
14423               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14424 $as_echo "$BOOT_JDK" >&6; }
14425               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14426 $as_echo_n "checking Boot JDK version... " >&6; }
14427               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14428               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14429 $as_echo "$BOOT_JDK_VERSION" >&6; }
14430             fi # end check jdk version
14431           fi # end check rt.jar
14432         fi # end check javac
14433       fi # end check java
14434     fi # end check boot jdk found
14435   fi
14436 
14437     done
14438   fi
14439 
14440 
14441     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14442     if test "x$BOOT_JDK_FOUND" = xmaybe; then
14443       # Do we have a bin/java?
14444       if test ! -x "$BOOT_JDK/bin/java"; then
14445         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14446 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14447         BOOT_JDK_FOUND=no
14448       else
14449         # Do we have a bin/javac?
14450         if test ! -x "$BOOT_JDK/bin/javac"; then
14451           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14452 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14453           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14454 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14455           BOOT_JDK_FOUND=no
14456         else
14457           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14458           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14459             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14460 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14461             BOOT_JDK_FOUND=no
14462           else
14463             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14464             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14465 
14466             # Extra M4 quote needed to protect [] in grep expression.
14467             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14468             if test "x$FOUND_VERSION_78" = x; then
14469               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14470 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14471               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14472 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14473               BOOT_JDK_FOUND=no
14474             else
14475               # We're done! :-)
14476               BOOT_JDK_FOUND=yes
14477 
14478   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14479 
14480   # Input might be given as Windows format, start by converting to
14481   # unix format.
14482   path="$BOOT_JDK"
14483   new_path=`$CYGPATH -u "$path"`
14484 
14485   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14486   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14487   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14488   # "foo.exe" is OK but "foo" is an error.
14489   #
14490   # This test is therefore slightly more accurate than "test -f" to check for file precense.
14491   # It is also a way to make sure we got the proper file name for the real test later on.
14492   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14493   if test "x$test_shortpath" = x; then
14494     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14495 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14496     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14497   fi
14498 
14499   # Call helper function which possibly converts this using DOS-style short mode.
14500   # If so, the updated path is stored in $new_path.
14501 
14502   input_path="$new_path"
14503   # Check if we need to convert this using DOS-style short mode. If the path
14504   # contains just simple characters, use it. Otherwise (spaces, weird characters),
14505   # take no chances and rewrite it.
14506   # Note: m4 eats our [], so we need to use [ and ] instead.
14507   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14508   if test "x$has_forbidden_chars" != x; then
14509     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14510     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14511     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14512     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14513       # Going to short mode and back again did indeed matter. Since short mode is
14514       # case insensitive, let's make it lowercase to improve readability.
14515       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14516       # Now convert it back to Unix-stile (cygpath)
14517       input_path=`$CYGPATH -u "$shortmode_path"`
14518       new_path="$input_path"
14519     fi
14520   fi
14521 
14522   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14523   if test "x$test_cygdrive_prefix" = x; then
14524     # As a simple fix, exclude /usr/bin since it's not a real path.
14525     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14526       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14527       # a path prefixed by /cygdrive for fixpath to work.
14528       new_path="$CYGWIN_ROOT_PATH$input_path"
14529     fi
14530   fi
14531 
14532 
14533   if test "x$path" != "x$new_path"; then
14534     BOOT_JDK="$new_path"
14535     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14536 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14537   fi
14538 
14539   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14540 
14541   path="$BOOT_JDK"
14542   has_colon=`$ECHO $path | $GREP ^.:`
14543   new_path="$path"
14544   if test "x$has_colon" = x; then
14545     # Not in mixed or Windows style, start by that.
14546     new_path=`cmd //c echo $path`
14547   fi
14548 
14549 
14550   input_path="$new_path"
14551   # Check if we need to convert this using DOS-style short mode. If the path
14552   # contains just simple characters, use it. Otherwise (spaces, weird characters),
14553   # take no chances and rewrite it.
14554   # Note: m4 eats our [], so we need to use [ and ] instead.
14555   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14556   if test "x$has_forbidden_chars" != x; then
14557     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14558     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14559   fi
14560 
14561 
14562   windows_path="$new_path"
14563   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14564     unix_path=`$CYGPATH -u "$windows_path"`
14565     new_path="$unix_path"
14566   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14567     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14568     new_path="$unix_path"
14569   fi
14570 
14571   if test "x$path" != "x$new_path"; then
14572     BOOT_JDK="$new_path"
14573     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14574 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14575   fi
14576 
14577   # Save the first 10 bytes of this path to the storage, so fixpath can work.
14578   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14579 
14580   else
14581     # We're on a posix platform. Hooray! :)
14582     path="$BOOT_JDK"
14583 
14584     if test ! -f "$path" && test ! -d "$path"; then
14585       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14586     fi
14587 
14588     has_space=`$ECHO "$path" | $GREP " "`
14589     if test "x$has_space" != x; then
14590       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14591 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14592       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14593     fi
14594   fi
14595 
14596               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14597 $as_echo_n "checking for Boot JDK... " >&6; }
14598               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14599 $as_echo "$BOOT_JDK" >&6; }
14600               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14601 $as_echo_n "checking Boot JDK version... " >&6; }
14602               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14603               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14604 $as_echo "$BOOT_JDK_VERSION" >&6; }
14605             fi # end check jdk version
14606           fi # end check rt.jar
14607         fi # end check javac
14608       fi # end check java
14609     fi # end check boot jdk found
14610   fi
14611 
14612 
14613   if test "x$BOOT_JDK_FOUND" = xno; then
14614     # Now execute the test
14615 
14616   BOOT_JDK_PREFIX="/System/Library/Java/JavaVirtualMachines"
14617   BOOT_JDK_SUFFIX="/Contents/Home"
14618   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
14619   if test "x$ALL_JDKS_FOUND" != x; then
14620     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
14621 
14622   if test "x$BOOT_JDK_FOUND" = xno; then
14623     # Now execute the test
14624 
14625         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
14626         if test -d "$BOOT_JDK"; then
14627           BOOT_JDK_FOUND=maybe
14628           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
14629 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
14630         fi
14631 
14632 
14633     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14634     if test "x$BOOT_JDK_FOUND" = xmaybe; then
14635       # Do we have a bin/java?
14636       if test ! -x "$BOOT_JDK/bin/java"; then
14637         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14638 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14639         BOOT_JDK_FOUND=no
14640       else
14641         # Do we have a bin/javac?
14642         if test ! -x "$BOOT_JDK/bin/javac"; then
14643           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14644 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14645           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14646 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14647           BOOT_JDK_FOUND=no
14648         else
14649           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14650           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14651             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14652 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14653             BOOT_JDK_FOUND=no
14654           else
14655             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14656             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14657 
14658             # Extra M4 quote needed to protect [] in grep expression.
14659             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14660             if test "x$FOUND_VERSION_78" = x; then
14661               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14662 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14663               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14664 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14665               BOOT_JDK_FOUND=no
14666             else
14667               # We're done! :-)
14668               BOOT_JDK_FOUND=yes
14669 
14670   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14671 
14672   # Input might be given as Windows format, start by converting to
14673   # unix format.
14674   path="$BOOT_JDK"
14675   new_path=`$CYGPATH -u "$path"`
14676 
14677   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14678   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14679   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14680   # "foo.exe" is OK but "foo" is an error.
14681   #
14682   # This test is therefore slightly more accurate than "test -f" to check for file precense.
14683   # It is also a way to make sure we got the proper file name for the real test later on.
14684   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14685   if test "x$test_shortpath" = x; then
14686     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14687 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14688     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14689   fi
14690 
14691   # Call helper function which possibly converts this using DOS-style short mode.
14692   # If so, the updated path is stored in $new_path.
14693 
14694   input_path="$new_path"
14695   # Check if we need to convert this using DOS-style short mode. If the path
14696   # contains just simple characters, use it. Otherwise (spaces, weird characters),
14697   # take no chances and rewrite it.
14698   # Note: m4 eats our [], so we need to use [ and ] instead.
14699   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14700   if test "x$has_forbidden_chars" != x; then
14701     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14702     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14703     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14704     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14705       # Going to short mode and back again did indeed matter. Since short mode is
14706       # case insensitive, let's make it lowercase to improve readability.
14707       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14708       # Now convert it back to Unix-stile (cygpath)
14709       input_path=`$CYGPATH -u "$shortmode_path"`
14710       new_path="$input_path"
14711     fi
14712   fi
14713 
14714   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14715   if test "x$test_cygdrive_prefix" = x; then
14716     # As a simple fix, exclude /usr/bin since it's not a real path.
14717     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14718       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14719       # a path prefixed by /cygdrive for fixpath to work.
14720       new_path="$CYGWIN_ROOT_PATH$input_path"
14721     fi
14722   fi
14723 
14724 
14725   if test "x$path" != "x$new_path"; then
14726     BOOT_JDK="$new_path"
14727     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14728 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14729   fi
14730 
14731   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14732 
14733   path="$BOOT_JDK"
14734   has_colon=`$ECHO $path | $GREP ^.:`
14735   new_path="$path"
14736   if test "x$has_colon" = x; then
14737     # Not in mixed or Windows style, start by that.
14738     new_path=`cmd //c echo $path`
14739   fi
14740 
14741 
14742   input_path="$new_path"
14743   # Check if we need to convert this using DOS-style short mode. If the path
14744   # contains just simple characters, use it. Otherwise (spaces, weird characters),
14745   # take no chances and rewrite it.
14746   # Note: m4 eats our [], so we need to use [ and ] instead.
14747   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14748   if test "x$has_forbidden_chars" != x; then
14749     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14750     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14751   fi
14752 
14753 
14754   windows_path="$new_path"
14755   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14756     unix_path=`$CYGPATH -u "$windows_path"`
14757     new_path="$unix_path"
14758   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14759     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14760     new_path="$unix_path"
14761   fi
14762 
14763   if test "x$path" != "x$new_path"; then
14764     BOOT_JDK="$new_path"
14765     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14766 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14767   fi
14768 
14769   # Save the first 10 bytes of this path to the storage, so fixpath can work.
14770   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14771 
14772   else
14773     # We're on a posix platform. Hooray! :)
14774     path="$BOOT_JDK"
14775 
14776     if test ! -f "$path" && test ! -d "$path"; then
14777       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14778     fi
14779 
14780     has_space=`$ECHO "$path" | $GREP " "`
14781     if test "x$has_space" != x; then
14782       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14783 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14784       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14785     fi
14786   fi
14787 
14788               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14789 $as_echo_n "checking for Boot JDK... " >&6; }
14790               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14791 $as_echo "$BOOT_JDK" >&6; }
14792               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14793 $as_echo_n "checking Boot JDK version... " >&6; }
14794               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14795               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14796 $as_echo "$BOOT_JDK_VERSION" >&6; }
14797             fi # end check jdk version
14798           fi # end check rt.jar
14799         fi # end check javac
14800       fi # end check java
14801     fi # end check boot jdk found
14802   fi
14803 
14804     done
14805   fi
14806 
14807 
14808     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14809     if test "x$BOOT_JDK_FOUND" = xmaybe; then
14810       # Do we have a bin/java?
14811       if test ! -x "$BOOT_JDK/bin/java"; then
14812         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14813 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14814         BOOT_JDK_FOUND=no
14815       else
14816         # Do we have a bin/javac?
14817         if test ! -x "$BOOT_JDK/bin/javac"; then
14818           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14819 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14820           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14821 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14822           BOOT_JDK_FOUND=no
14823         else
14824           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14825           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14826             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14827 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14828             BOOT_JDK_FOUND=no
14829           else
14830             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14831             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14832 
14833             # Extra M4 quote needed to protect [] in grep expression.
14834             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14835             if test "x$FOUND_VERSION_78" = x; then
14836               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14837 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14838               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14839 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14840               BOOT_JDK_FOUND=no
14841             else
14842               # We're done! :-)
14843               BOOT_JDK_FOUND=yes
14844 
14845   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14846 
14847   # Input might be given as Windows format, start by converting to
14848   # unix format.
14849   path="$BOOT_JDK"
14850   new_path=`$CYGPATH -u "$path"`
14851 
14852   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14853   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14854   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14855   # "foo.exe" is OK but "foo" is an error.
14856   #
14857   # This test is therefore slightly more accurate than "test -f" to check for file precense.
14858   # It is also a way to make sure we got the proper file name for the real test later on.
14859   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14860   if test "x$test_shortpath" = x; then
14861     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14862 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14863     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14864   fi
14865 
14866   # Call helper function which possibly converts this using DOS-style short mode.
14867   # If so, the updated path is stored in $new_path.
14868 
14869   input_path="$new_path"
14870   # Check if we need to convert this using DOS-style short mode. If the path
14871   # contains just simple characters, use it. Otherwise (spaces, weird characters),
14872   # take no chances and rewrite it.
14873   # Note: m4 eats our [], so we need to use [ and ] instead.
14874   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14875   if test "x$has_forbidden_chars" != x; then
14876     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14877     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14878     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14879     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14880       # Going to short mode and back again did indeed matter. Since short mode is
14881       # case insensitive, let's make it lowercase to improve readability.
14882       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14883       # Now convert it back to Unix-stile (cygpath)
14884       input_path=`$CYGPATH -u "$shortmode_path"`
14885       new_path="$input_path"
14886     fi
14887   fi
14888 
14889   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14890   if test "x$test_cygdrive_prefix" = x; then
14891     # As a simple fix, exclude /usr/bin since it's not a real path.
14892     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14893       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14894       # a path prefixed by /cygdrive for fixpath to work.
14895       new_path="$CYGWIN_ROOT_PATH$input_path"
14896     fi
14897   fi
14898 
14899 
14900   if test "x$path" != "x$new_path"; then
14901     BOOT_JDK="$new_path"
14902     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14903 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14904   fi
14905 
14906   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14907 
14908   path="$BOOT_JDK"
14909   has_colon=`$ECHO $path | $GREP ^.:`
14910   new_path="$path"
14911   if test "x$has_colon" = x; then
14912     # Not in mixed or Windows style, start by that.
14913     new_path=`cmd //c echo $path`
14914   fi
14915 
14916 
14917   input_path="$new_path"
14918   # Check if we need to convert this using DOS-style short mode. If the path
14919   # contains just simple characters, use it. Otherwise (spaces, weird characters),
14920   # take no chances and rewrite it.
14921   # Note: m4 eats our [], so we need to use [ and ] instead.
14922   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14923   if test "x$has_forbidden_chars" != x; then
14924     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14925     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14926   fi
14927 
14928 
14929   windows_path="$new_path"
14930   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14931     unix_path=`$CYGPATH -u "$windows_path"`
14932     new_path="$unix_path"
14933   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14934     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14935     new_path="$unix_path"
14936   fi
14937 
14938   if test "x$path" != "x$new_path"; then
14939     BOOT_JDK="$new_path"
14940     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14941 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14942   fi
14943 
14944   # Save the first 10 bytes of this path to the storage, so fixpath can work.
14945   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14946 
14947   else
14948     # We're on a posix platform. Hooray! :)
14949     path="$BOOT_JDK"
14950 
14951     if test ! -f "$path" && test ! -d "$path"; then
14952       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14953     fi
14954 
14955     has_space=`$ECHO "$path" | $GREP " "`
14956     if test "x$has_space" != x; then
14957       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14958 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14959       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14960     fi
14961   fi
14962 
14963               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14964 $as_echo_n "checking for Boot JDK... " >&6; }
14965               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14966 $as_echo "$BOOT_JDK" >&6; }
14967               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14968 $as_echo_n "checking Boot JDK version... " >&6; }
14969               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14970               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14971 $as_echo "$BOOT_JDK_VERSION" >&6; }
14972             fi # end check jdk version
14973           fi # end check rt.jar
14974         fi # end check javac
14975       fi # end check java
14976     fi # end check boot jdk found
14977   fi
14978 
14979   elif test "x$OPENJDK_TARGET_OS" = xlinux; then
14980 
14981   if test "x$BOOT_JDK_FOUND" = xno; then
14982     # Now execute the test
14983 
14984   BOOT_JDK_PREFIX="/usr/lib/jvm"
14985   BOOT_JDK_SUFFIX=""
14986   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
14987   if test "x$ALL_JDKS_FOUND" != x; then
14988     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
14989 
14990   if test "x$BOOT_JDK_FOUND" = xno; then
14991     # Now execute the test
14992 
14993         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
14994         if test -d "$BOOT_JDK"; then
14995           BOOT_JDK_FOUND=maybe
14996           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
14997 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
14998         fi
14999 
15000 
15001     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
15002     if test "x$BOOT_JDK_FOUND" = xmaybe; then
15003       # Do we have a bin/java?
15004       if test ! -x "$BOOT_JDK/bin/java"; then
15005         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
15006 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
15007         BOOT_JDK_FOUND=no
15008       else
15009         # Do we have a bin/javac?
15010         if test ! -x "$BOOT_JDK/bin/javac"; then
15011           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
15012 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
15013           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
15014 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
15015           BOOT_JDK_FOUND=no
15016         else
15017           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
15018           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
15019             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
15020 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
15021             BOOT_JDK_FOUND=no
15022           else
15023             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
15024             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
15025 
15026             # Extra M4 quote needed to protect [] in grep expression.
15027             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
15028             if test "x$FOUND_VERSION_78" = x; then
15029               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
15030 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
15031               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
15032 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
15033               BOOT_JDK_FOUND=no
15034             else
15035               # We're done! :-)
15036               BOOT_JDK_FOUND=yes
15037 
15038   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15039 
15040   # Input might be given as Windows format, start by converting to
15041   # unix format.
15042   path="$BOOT_JDK"
15043   new_path=`$CYGPATH -u "$path"`
15044 
15045   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15046   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15047   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15048   # "foo.exe" is OK but "foo" is an error.
15049   #
15050   # This test is therefore slightly more accurate than "test -f" to check for file precense.
15051   # It is also a way to make sure we got the proper file name for the real test later on.
15052   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15053   if test "x$test_shortpath" = x; then
15054     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15055 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15056     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
15057   fi
15058 
15059   # Call helper function which possibly converts this using DOS-style short mode.
15060   # If so, the updated path is stored in $new_path.
15061 
15062   input_path="$new_path"
15063   # Check if we need to convert this using DOS-style short mode. If the path
15064   # contains just simple characters, use it. Otherwise (spaces, weird characters),
15065   # take no chances and rewrite it.
15066   # Note: m4 eats our [], so we need to use [ and ] instead.
15067   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15068   if test "x$has_forbidden_chars" != x; then
15069     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15070     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15071     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15072     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15073       # Going to short mode and back again did indeed matter. Since short mode is
15074       # case insensitive, let's make it lowercase to improve readability.
15075       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15076       # Now convert it back to Unix-stile (cygpath)
15077       input_path=`$CYGPATH -u "$shortmode_path"`
15078       new_path="$input_path"
15079     fi
15080   fi
15081 
15082   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15083   if test "x$test_cygdrive_prefix" = x; then
15084     # As a simple fix, exclude /usr/bin since it's not a real path.
15085     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15086       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15087       # a path prefixed by /cygdrive for fixpath to work.
15088       new_path="$CYGWIN_ROOT_PATH$input_path"
15089     fi
15090   fi
15091 
15092 
15093   if test "x$path" != "x$new_path"; then
15094     BOOT_JDK="$new_path"
15095     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15096 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15097   fi
15098 
15099   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15100 
15101   path="$BOOT_JDK"
15102   has_colon=`$ECHO $path | $GREP ^.:`
15103   new_path="$path"
15104   if test "x$has_colon" = x; then
15105     # Not in mixed or Windows style, start by that.
15106     new_path=`cmd //c echo $path`
15107   fi
15108 
15109 
15110   input_path="$new_path"
15111   # Check if we need to convert this using DOS-style short mode. If the path
15112   # contains just simple characters, use it. Otherwise (spaces, weird characters),
15113   # take no chances and rewrite it.
15114   # Note: m4 eats our [], so we need to use [ and ] instead.
15115   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15116   if test "x$has_forbidden_chars" != x; then
15117     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15118     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15119   fi
15120 
15121 
15122   windows_path="$new_path"
15123   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15124     unix_path=`$CYGPATH -u "$windows_path"`
15125     new_path="$unix_path"
15126   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15127     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15128     new_path="$unix_path"
15129   fi
15130 
15131   if test "x$path" != "x$new_path"; then
15132     BOOT_JDK="$new_path"
15133     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15134 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15135   fi
15136 
15137   # Save the first 10 bytes of this path to the storage, so fixpath can work.
15138   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15139 
15140   else
15141     # We're on a posix platform. Hooray! :)
15142     path="$BOOT_JDK"
15143 
15144     if test ! -f "$path" && test ! -d "$path"; then
15145       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
15146     fi
15147 
15148     has_space=`$ECHO "$path" | $GREP " "`
15149     if test "x$has_space" != x; then
15150       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15151 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15152       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15153     fi
15154   fi
15155 
15156               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
15157 $as_echo_n "checking for Boot JDK... " >&6; }
15158               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
15159 $as_echo "$BOOT_JDK" >&6; }
15160               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
15161 $as_echo_n "checking Boot JDK version... " >&6; }
15162               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
15163               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
15164 $as_echo "$BOOT_JDK_VERSION" >&6; }
15165             fi # end check jdk version
15166           fi # end check rt.jar
15167         fi # end check javac
15168       fi # end check java
15169     fi # end check boot jdk found
15170   fi
15171 
15172     done
15173   fi
15174 
15175 
15176     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
15177     if test "x$BOOT_JDK_FOUND" = xmaybe; then
15178       # Do we have a bin/java?
15179       if test ! -x "$BOOT_JDK/bin/java"; then
15180         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
15181 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
15182         BOOT_JDK_FOUND=no
15183       else
15184         # Do we have a bin/javac?
15185         if test ! -x "$BOOT_JDK/bin/javac"; then
15186           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
15187 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
15188           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
15189 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
15190           BOOT_JDK_FOUND=no
15191         else
15192           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
15193           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
15194             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
15195 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
15196             BOOT_JDK_FOUND=no
15197           else
15198             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
15199             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
15200 
15201             # Extra M4 quote needed to protect [] in grep expression.
15202             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
15203             if test "x$FOUND_VERSION_78" = x; then
15204               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
15205 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
15206               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
15207 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
15208               BOOT_JDK_FOUND=no
15209             else
15210               # We're done! :-)
15211               BOOT_JDK_FOUND=yes
15212 
15213   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15214 
15215   # Input might be given as Windows format, start by converting to
15216   # unix format.
15217   path="$BOOT_JDK"
15218   new_path=`$CYGPATH -u "$path"`
15219 
15220   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15221   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15222   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15223   # "foo.exe" is OK but "foo" is an error.
15224   #
15225   # This test is therefore slightly more accurate than "test -f" to check for file precense.
15226   # It is also a way to make sure we got the proper file name for the real test later on.
15227   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15228   if test "x$test_shortpath" = x; then
15229     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15230 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15231     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
15232   fi
15233 
15234   # Call helper function which possibly converts this using DOS-style short mode.
15235   # If so, the updated path is stored in $new_path.
15236 
15237   input_path="$new_path"
15238   # Check if we need to convert this using DOS-style short mode. If the path
15239   # contains just simple characters, use it. Otherwise (spaces, weird characters),
15240   # take no chances and rewrite it.
15241   # Note: m4 eats our [], so we need to use [ and ] instead.
15242   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15243   if test "x$has_forbidden_chars" != x; then
15244     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15245     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15246     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15247     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15248       # Going to short mode and back again did indeed matter. Since short mode is
15249       # case insensitive, let's make it lowercase to improve readability.
15250       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15251       # Now convert it back to Unix-stile (cygpath)
15252       input_path=`$CYGPATH -u "$shortmode_path"`
15253       new_path="$input_path"
15254     fi
15255   fi
15256 
15257   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15258   if test "x$test_cygdrive_prefix" = x; then
15259     # As a simple fix, exclude /usr/bin since it's not a real path.
15260     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15261       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15262       # a path prefixed by /cygdrive for fixpath to work.
15263       new_path="$CYGWIN_ROOT_PATH$input_path"
15264     fi
15265   fi
15266 
15267 
15268   if test "x$path" != "x$new_path"; then
15269     BOOT_JDK="$new_path"
15270     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15271 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15272   fi
15273 
15274   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15275 
15276   path="$BOOT_JDK"
15277   has_colon=`$ECHO $path | $GREP ^.:`
15278   new_path="$path"
15279   if test "x$has_colon" = x; then
15280     # Not in mixed or Windows style, start by that.
15281     new_path=`cmd //c echo $path`
15282   fi
15283 
15284 
15285   input_path="$new_path"
15286   # Check if we need to convert this using DOS-style short mode. If the path
15287   # contains just simple characters, use it. Otherwise (spaces, weird characters),
15288   # take no chances and rewrite it.
15289   # Note: m4 eats our [], so we need to use [ and ] instead.
15290   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15291   if test "x$has_forbidden_chars" != x; then
15292     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15293     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15294   fi
15295 
15296 
15297   windows_path="$new_path"
15298   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15299     unix_path=`$CYGPATH -u "$windows_path"`
15300     new_path="$unix_path"
15301   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15302     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15303     new_path="$unix_path"
15304   fi
15305 
15306   if test "x$path" != "x$new_path"; then
15307     BOOT_JDK="$new_path"
15308     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15309 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15310   fi
15311 
15312   # Save the first 10 bytes of this path to the storage, so fixpath can work.
15313   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15314 
15315   else
15316     # We're on a posix platform. Hooray! :)
15317     path="$BOOT_JDK"
15318 
15319     if test ! -f "$path" && test ! -d "$path"; then
15320       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
15321     fi
15322 
15323     has_space=`$ECHO "$path" | $GREP " "`
15324     if test "x$has_space" != x; then
15325       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15326 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15327       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15328     fi
15329   fi
15330 
15331               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
15332 $as_echo_n "checking for Boot JDK... " >&6; }
15333               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
15334 $as_echo "$BOOT_JDK" >&6; }
15335               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
15336 $as_echo_n "checking Boot JDK version... " >&6; }
15337               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
15338               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
15339 $as_echo "$BOOT_JDK_VERSION" >&6; }
15340             fi # end check jdk version
15341           fi # end check rt.jar
15342         fi # end check javac
15343       fi # end check java
15344     fi # end check boot jdk found
15345   fi
15346 
15347   fi
15348 
15349 
15350     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
15351     if test "x$BOOT_JDK_FOUND" = xmaybe; then
15352       # Do we have a bin/java?
15353       if test ! -x "$BOOT_JDK/bin/java"; then
15354         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
15355 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
15356         BOOT_JDK_FOUND=no
15357       else
15358         # Do we have a bin/javac?
15359         if test ! -x "$BOOT_JDK/bin/javac"; then
15360           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
15361 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
15362           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
15363 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
15364           BOOT_JDK_FOUND=no
15365         else
15366           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
15367           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
15368             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
15369 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
15370             BOOT_JDK_FOUND=no
15371           else
15372             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
15373             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
15374 
15375             # Extra M4 quote needed to protect [] in grep expression.
15376             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
15377             if test "x$FOUND_VERSION_78" = x; then
15378               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
15379 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
15380               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
15381 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
15382               BOOT_JDK_FOUND=no
15383             else
15384               # We're done! :-)
15385               BOOT_JDK_FOUND=yes
15386 
15387   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15388 
15389   # Input might be given as Windows format, start by converting to
15390   # unix format.
15391   path="$BOOT_JDK"
15392   new_path=`$CYGPATH -u "$path"`
15393 
15394   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15395   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15396   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15397   # "foo.exe" is OK but "foo" is an error.
15398   #
15399   # This test is therefore slightly more accurate than "test -f" to check for file precense.
15400   # It is also a way to make sure we got the proper file name for the real test later on.
15401   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15402   if test "x$test_shortpath" = x; then
15403     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15404 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15405     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
15406   fi
15407 
15408   # Call helper function which possibly converts this using DOS-style short mode.
15409   # If so, the updated path is stored in $new_path.
15410 
15411   input_path="$new_path"
15412   # Check if we need to convert this using DOS-style short mode. If the path
15413   # contains just simple characters, use it. Otherwise (spaces, weird characters),
15414   # take no chances and rewrite it.
15415   # Note: m4 eats our [], so we need to use [ and ] instead.
15416   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15417   if test "x$has_forbidden_chars" != x; then
15418     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15419     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15420     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15421     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15422       # Going to short mode and back again did indeed matter. Since short mode is
15423       # case insensitive, let's make it lowercase to improve readability.
15424       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15425       # Now convert it back to Unix-stile (cygpath)
15426       input_path=`$CYGPATH -u "$shortmode_path"`
15427       new_path="$input_path"
15428     fi
15429   fi
15430 
15431   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15432   if test "x$test_cygdrive_prefix" = x; then
15433     # As a simple fix, exclude /usr/bin since it's not a real path.
15434     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15435       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15436       # a path prefixed by /cygdrive for fixpath to work.
15437       new_path="$CYGWIN_ROOT_PATH$input_path"
15438     fi
15439   fi
15440 
15441 
15442   if test "x$path" != "x$new_path"; then
15443     BOOT_JDK="$new_path"
15444     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15445 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15446   fi
15447 
15448   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15449 
15450   path="$BOOT_JDK"
15451   has_colon=`$ECHO $path | $GREP ^.:`
15452   new_path="$path"
15453   if test "x$has_colon" = x; then
15454     # Not in mixed or Windows style, start by that.
15455     new_path=`cmd //c echo $path`
15456   fi
15457 
15458 
15459   input_path="$new_path"
15460   # Check if we need to convert this using DOS-style short mode. If the path
15461   # contains just simple characters, use it. Otherwise (spaces, weird characters),
15462   # take no chances and rewrite it.
15463   # Note: m4 eats our [], so we need to use [ and ] instead.
15464   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15465   if test "x$has_forbidden_chars" != x; then
15466     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15467     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15468   fi
15469 
15470 
15471   windows_path="$new_path"
15472   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15473     unix_path=`$CYGPATH -u "$windows_path"`
15474     new_path="$unix_path"
15475   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15476     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15477     new_path="$unix_path"
15478   fi
15479 
15480   if test "x$path" != "x$new_path"; then
15481     BOOT_JDK="$new_path"
15482     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15483 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15484   fi
15485 
15486   # Save the first 10 bytes of this path to the storage, so fixpath can work.
15487   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15488 
15489   else
15490     # We're on a posix platform. Hooray! :)
15491     path="$BOOT_JDK"
15492 
15493     if test ! -f "$path" && test ! -d "$path"; then
15494       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
15495     fi
15496 
15497     has_space=`$ECHO "$path" | $GREP " "`
15498     if test "x$has_space" != x; then
15499       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15500 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15501       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15502     fi
15503   fi
15504 
15505               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
15506 $as_echo_n "checking for Boot JDK... " >&6; }
15507               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
15508 $as_echo "$BOOT_JDK" >&6; }
15509               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
15510 $as_echo_n "checking Boot JDK version... " >&6; }
15511               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
15512               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
15513 $as_echo "$BOOT_JDK_VERSION" >&6; }
15514             fi # end check jdk version
15515           fi # end check rt.jar
15516         fi # end check javac
15517       fi # end check java
15518     fi # end check boot jdk found
15519   fi
15520 
15521 
15522 # If we haven't found anything yet, we've truly lost. Give up.
15523 if test "x$BOOT_JDK_FOUND" = xno; then
15524 
15525     # Print a helpful message on how to acquire the necessary build dependency.
15526     # openjdk is the help tag: freetyp2, cups, pulse, alsa etc
15527     MISSING_DEPENDENCY=openjdk
15528     PKGHANDLER_COMMAND=
15529 
15530     case $PKGHANDLER in
15531         apt-get)
15532                 apt_help     $MISSING_DEPENDENCY ;;
15533     yum)
15534                 yum_help     $MISSING_DEPENDENCY ;;
15535         port)
15536                 port_help    $MISSING_DEPENDENCY ;;
15537         pkgutil)
15538                 pkgutil_help $MISSING_DEPENDENCY ;;
15539         pkgadd)
15540                 pkgadd_help  $MISSING_DEPENDENCY ;;
15541     * )
15542       break ;;
15543     esac
15544 
15545     if test "x$PKGHANDLER_COMMAND" != x; then
15546         HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
15547     fi
15548 
15549   { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find a valid Boot JDK. $HELP_MSG" >&5
15550 $as_echo "$as_me: Could not find a valid Boot JDK. $HELP_MSG" >&6;}
15551   { $as_echo "$as_me:${as_lineno-$LINENO}: This might be fixed by explicitely setting --with-boot-jdk" >&5
15552 $as_echo "$as_me: This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15553   as_fn_error $? "Cannot continue" "$LINENO" 5
15554 fi
15555 
15556 # Setup proper paths for what we found
15557 BOOT_RTJAR="$BOOT_JDK/jre/lib/rt.jar"
15558 if test ! -f "$BOOT_RTJAR"; then
15559     # On MacOSX it is called classes.jar
15560     BOOT_RTJAR="$BOOT_JDK/../Classes/classes.jar"
15561     if test -f "$BOOT_RTJAR"; then
15562       # Remove the ..
15563       BOOT_RTJAR="`cd ${BOOT_RTJAR%/*} && pwd`/${BOOT_RTJAR##*/}"
15564     fi
15565 fi
15566 BOOT_TOOLSJAR="$BOOT_JDK/lib/tools.jar"
15567 BOOT_JDK="$BOOT_JDK"
15568 
15569 
15570 
15571 
15572 # Setup tools from the Boot JDK.
15573 
15574   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
15575 $as_echo_n "checking for java in Boot JDK... " >&6; }
15576   JAVA=$BOOT_JDK/bin/java
15577   if test ! -x $JAVA; then
15578       { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15579 $as_echo "not found" >&6; }
15580       { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15581 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15582       as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
15583   fi
15584   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15585 $as_echo "ok" >&6; }
15586 
15587 
15588   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
15589 $as_echo_n "checking for javac in Boot JDK... " >&6; }
15590   JAVAC=$BOOT_JDK/bin/javac
15591   if test ! -x $JAVAC; then
15592       { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15593 $as_echo "not found" >&6; }
15594       { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15595 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15596       as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
15597   fi
15598   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15599 $as_echo "ok" >&6; }
15600 
15601 
15602   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
15603 $as_echo_n "checking for javah in Boot JDK... " >&6; }
15604   JAVAH=$BOOT_JDK/bin/javah
15605   if test ! -x $JAVAH; then
15606       { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15607 $as_echo "not found" >&6; }
15608       { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15609 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15610       as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
15611   fi
15612   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15613 $as_echo "ok" >&6; }
15614 
15615 
15616   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javap in Boot JDK" >&5
15617 $as_echo_n "checking for javap in Boot JDK... " >&6; }
15618   JAVAP=$BOOT_JDK/bin/javap
15619   if test ! -x $JAVAP; then
15620       { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15621 $as_echo "not found" >&6; }
15622       { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15623 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15624       as_fn_error $? "Could not find javap in the Boot JDK" "$LINENO" 5
15625   fi
15626   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15627 $as_echo "ok" >&6; }
15628 
15629 
15630   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
15631 $as_echo_n "checking for jar in Boot JDK... " >&6; }
15632   JAR=$BOOT_JDK/bin/jar
15633   if test ! -x $JAR; then
15634       { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15635 $as_echo "not found" >&6; }
15636       { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15637 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15638       as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
15639   fi
15640   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15641 $as_echo "ok" >&6; }
15642 
15643 
15644   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for rmic in Boot JDK" >&5
15645 $as_echo_n "checking for rmic in Boot JDK... " >&6; }
15646   RMIC=$BOOT_JDK/bin/rmic
15647   if test ! -x $RMIC; then
15648       { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15649 $as_echo "not found" >&6; }
15650       { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15651 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15652       as_fn_error $? "Could not find rmic in the Boot JDK" "$LINENO" 5
15653   fi
15654   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15655 $as_echo "ok" >&6; }
15656 
15657 
15658   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for native2ascii in Boot JDK" >&5
15659 $as_echo_n "checking for native2ascii in Boot JDK... " >&6; }
15660   NATIVE2ASCII=$BOOT_JDK/bin/native2ascii
15661   if test ! -x $NATIVE2ASCII; then
15662       { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15663 $as_echo "not found" >&6; }
15664       { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15665 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15666       as_fn_error $? "Could not find native2ascii in the Boot JDK" "$LINENO" 5
15667   fi
15668   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15669 $as_echo "ok" >&6; }
15670 
15671 
15672 # Finally, set some other options...
15673 
15674 # When compiling code to be executed by the Boot JDK, force jdk7 compatibility.
15675 BOOT_JDK_SOURCETARGET="-source 7 -target 7"
15676 
15677 
15678 
15679 
15680 ##############################################################################
15681 #
15682 # Specify options for anything that is run with the Boot JDK.
15683 #
15684 
15685 # Check whether --with-boot-jdk-jvmargs was given.
15686 if test "${with_boot_jdk_jvmargs+set}" = set; then :
15687   withval=$with_boot_jdk_jvmargs;
15688 fi
15689 
15690 
15691 if test "x$with_boot_jdk_jvmargs" = x; then
15692     # Not all JVM:s accept the same arguments on the command line.
15693     # OpenJDK specific increase in thread stack for JDK build,
15694     # well more specifically, when running javac.
15695     if test "x$BUILD_NUM_BITS" = x32; then
15696        STACK_SIZE=768
15697     else
15698        # Running Javac on a JVM on a 64-bit machine, the stack takes more space
15699        # since 64-bit pointers are pushed on the stach. Apparently, we need
15700        # to increase the stack space when javacing the JDK....
15701        STACK_SIZE=1536
15702     fi
15703 
15704     # Minimum amount of heap memory.
15705 
15706     # Test if -Xms64M is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
15707     # If so, then append -Xms64M to boot_jdk_jvmargs
15708     FOUND_WARN=`$JAVA -Xms64M -version 2>&1 | grep -i warn`
15709     FOUND_VERSION=`$JAVA -Xms64M -version 2>&1 | grep " version \""`
15710     if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15711         boot_jdk_jvmargs="$boot_jdk_jvmargs -Xms64M"
15712     fi
15713 
15714     if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
15715         # Why does macosx need more heap? Its the huge JDK batch.
15716 
15717     # Test if -Xmx1600M is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
15718     # If so, then append -Xmx1600M to boot_jdk_jvmargs
15719     FOUND_WARN=`$JAVA -Xmx1600M -version 2>&1 | grep -i warn`
15720     FOUND_VERSION=`$JAVA -Xmx1600M -version 2>&1 | grep " version \""`
15721     if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15722         boot_jdk_jvmargs="$boot_jdk_jvmargs -Xmx1600M"
15723     fi
15724 
15725     else
15726 
15727     # Test if -Xmx1100M is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
15728     # If so, then append -Xmx1100M to boot_jdk_jvmargs
15729     FOUND_WARN=`$JAVA -Xmx1100M -version 2>&1 | grep -i warn`
15730     FOUND_VERSION=`$JAVA -Xmx1100M -version 2>&1 | grep " version \""`
15731     if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15732         boot_jdk_jvmargs="$boot_jdk_jvmargs -Xmx1100M"
15733     fi
15734 
15735     fi
15736     # When is adding -client something that speeds up the JVM?
15737     # ADD_JVM_ARG_IF_OK([-client],boot_jdk_jvmargs,[$JAVA])
15738 
15739     # Test if -XX:PermSize=32m is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
15740     # If so, then append -XX:PermSize=32m to boot_jdk_jvmargs
15741     FOUND_WARN=`$JAVA -XX:PermSize=32m -version 2>&1 | grep -i warn`
15742     FOUND_VERSION=`$JAVA -XX:PermSize=32m -version 2>&1 | grep " version \""`
15743     if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15744         boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:PermSize=32m"
15745     fi
15746 
15747 
15748     # Test if -XX:MaxPermSize=160m is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
15749     # If so, then append -XX:MaxPermSize=160m to boot_jdk_jvmargs
15750     FOUND_WARN=`$JAVA -XX:MaxPermSize=160m -version 2>&1 | grep -i warn`
15751     FOUND_VERSION=`$JAVA -XX:MaxPermSize=160m -version 2>&1 | grep " version \""`
15752     if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15753         boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:MaxPermSize=160m"
15754     fi
15755 
15756 
15757     # Test if -XX:ThreadStackSize=$STACK_SIZE is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
15758     # If so, then append -XX:ThreadStackSize=$STACK_SIZE to boot_jdk_jvmargs
15759     FOUND_WARN=`$JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1 | grep -i warn`
15760     FOUND_VERSION=`$JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1 | grep " version \""`
15761     if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15762         boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:ThreadStackSize=$STACK_SIZE"
15763     fi
15764 
15765     # Disable special log output when a debug build is used as Boot JDK...
15766 
15767     # Test if -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
15768     # If so, then append -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput to boot_jdk_jvmargs
15769     FOUND_WARN=`$JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version 2>&1 | grep -i warn`
15770     FOUND_VERSION=`$JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version 2>&1 | grep " version \""`
15771     if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15772         boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput"
15773     fi
15774 
15775 fi
15776 
15777 BOOT_JDK_JVMARGS=$boot_jdk_jvmargs
15778 
15779 
15780 
15781 ###############################################################################
15782 #
15783 # Configure the sources to use. We can add or override individual directories.
15784 #
15785 ###############################################################################
15786 
15787 
15788 
15789 # Where are the sources. Any of these can be overridden
15790 # using --with-override-corba and the likes.
15791 LANGTOOLS_TOPDIR="$SRC_ROOT/langtools"
15792 CORBA_TOPDIR="$SRC_ROOT/corba"
15793 JAXP_TOPDIR="$SRC_ROOT/jaxp"
15794 JAXWS_TOPDIR="$SRC_ROOT/jaxws"
15795 HOTSPOT_TOPDIR="$SRC_ROOT/hotspot"
15796 NASHORN_TOPDIR="$SRC_ROOT/nashorn"
15797 JDK_TOPDIR="$SRC_ROOT/jdk"
15798 
15799 
15800 
15801 
15802 
15803 
15804 
15805 
15806 
15807 
15808 ###############################################################################
15809 #
15810 # Pickup additional source for a component from outside of the source root
15811 # or override source for a component.
15812 #
15813 
15814 # Check whether --with-add-source-root was given.
15815 if test "${with_add_source_root+set}" = set; then :
15816   withval=$with_add_source_root;
15817 fi
15818 
15819 
15820 
15821 # Check whether --with-override-source-root was given.
15822 if test "${with_override_source_root+set}" = set; then :
15823   withval=$with_override_source_root;
15824 fi
15825 
15826 
15827 
15828 # Check whether --with-adds-and-overrides was given.
15829 if test "${with_adds_and_overrides+set}" = set; then :
15830   withval=$with_adds_and_overrides;
15831 fi
15832 
15833 
15834 if test "x$with_adds_and_overrides" != x; then
15835     with_add_source_root="$with_adds_and_overrides/adds"
15836     with_override_source_root="$with_adds_and_overrides/overrides"
15837 fi
15838 
15839 if test "x$with_add_source_root" != x; then
15840     if ! test -d $with_add_source_root; then
15841        as_fn_error $? "Trying to use a non-existant add-source-root $with_add_source_root" "$LINENO" 5
15842     fi
15843     CURDIR="$PWD"
15844     cd "$with_add_source_root"
15845     ADD_SRC_ROOT="`pwd`"
15846     cd "$CURDIR"
15847     # Verify that the addon source root does not have any root makefiles.
15848     # If it does, then it is usually an error, prevent this.
15849     if test -f $with_add_source_root/langtools/makefiles/Makefile || \
15850        test -f $with_add_source_root/langtools/make/Makefile; then
15851         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
15852     fi
15853     if test -f $with_add_source_root/corba/makefiles/Makefile || \
15854        test -f $with_add_source_root/corba/make/Makefile; then
15855         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
15856     fi
15857     if test -f $with_add_source_root/jaxp/makefiles/Makefile || \
15858        test -f $with_add_source_root/jaxp/make/Makefile; then
15859         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
15860     fi
15861     if test -f $with_add_source_root/jaxws/makefiles/Makefile || \
15862        test -f $with_add_source_root/jaxws/make/Makefile; then
15863         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
15864     fi
15865     if test -f $with_add_source_root/hotspot/makefiles/Makefile || \
15866        test -f $with_add_source_root/hotspot/make/Makefile; then
15867         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
15868     fi
15869     if test -f $with_add_source_root/jdk/makefiles/Makefile || \
15870        test -f $with_add_source_root/jdk/make/Makefile; then
15871         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
15872     fi
15873 fi
15874 
15875 
15876 if test "x$with_override_source_root" != x; then
15877     if ! test -d $with_override_source_root; then
15878        as_fn_error $? "Trying to use a non-existant override-source-root $with_override_source_root" "$LINENO" 5
15879     fi
15880     CURDIR="$PWD"
15881     cd "$with_override_source_root"
15882     OVERRIDE_SRC_ROOT="`pwd`"
15883     cd "$CURDIR"
15884     if test -f $with_override_source_root/langtools/makefiles/Makefile || \
15885        test -f $with_override_source_root/langtools/make/Makefile; then
15886         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
15887     fi
15888     if test -f $with_override_source_root/corba/makefiles/Makefile || \
15889        test -f $with_override_source_root/corba/make/Makefile; then
15890         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
15891     fi
15892     if test -f $with_override_source_root/jaxp/makefiles/Makefile || \
15893        test -f $with_override_source_root/jaxp/make/Makefile; then
15894         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
15895     fi
15896     if test -f $with_override_source_root/jaxws/makefiles/Makefile || \
15897        test -f $with_override_source_root/jaxws/make/Makefile; then
15898         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
15899     fi
15900     if test -f $with_override_source_root/hotspot/makefiles/Makefile || \
15901        test -f $with_override_source_root/hotspot/make/Makefile; then
15902         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
15903     fi
15904     if test -f $with_override_source_root/jdk/makefiles/Makefile || \
15905        test -f $with_override_source_root/jdk/make/Makefile; then
15906         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
15907     fi
15908 fi
15909 
15910 
15911 ###############################################################################
15912 #
15913 # Override a repo completely, this is used for example when you have 3 small
15914 # development sandboxes of the langtools sources and want to avoid having 3 full
15915 # OpenJDK sources checked out on disk.
15916 #
15917 # Assuming that the 3 langtools sandboxes are located here:
15918 # /home/fredrik/sandbox1/langtools
15919 # /home/fredrik/sandbox2/langtools
15920 # /home/fredrik/sandbox3/langtools
15921 #
15922 # From the source root you create build subdirs manually:
15923 #     mkdir -p build1 build2 build3
15924 # in each build directory run:
15925 #     (cd build1 && ../configure --with-override-langtools=/home/fredrik/sandbox1 && make)
15926 #     (cd build2 && ../configure --with-override-langtools=/home/fredrik/sandbox2 && make)
15927 #     (cd build3 && ../configure --with-override-langtools=/home/fredrik/sandbox3 && make)
15928 #
15929 
15930 
15931 # Check whether --with-override-langtools was given.
15932 if test "${with_override_langtools+set}" = set; then :
15933   withval=$with_override_langtools;
15934 fi
15935 
15936 
15937 
15938 # Check whether --with-override-corba was given.
15939 if test "${with_override_corba+set}" = set; then :
15940   withval=$with_override_corba;
15941 fi
15942 
15943 
15944 
15945 # Check whether --with-override-jaxp was given.
15946 if test "${with_override_jaxp+set}" = set; then :
15947   withval=$with_override_jaxp;
15948 fi
15949 
15950 
15951 
15952 # Check whether --with-override-jaxws was given.
15953 if test "${with_override_jaxws+set}" = set; then :
15954   withval=$with_override_jaxws;
15955 fi
15956 
15957 
15958 
15959 # Check whether --with-override-hotspot was given.
15960 if test "${with_override_hotspot+set}" = set; then :
15961   withval=$with_override_hotspot;
15962 fi
15963 
15964 
15965 
15966 # Check whether --with-override-jdk was given.
15967 if test "${with_override_jdk+set}" = set; then :
15968   withval=$with_override_jdk;
15969 fi
15970 
15971 
15972 if test "x$with_override_langtools" != x; then
15973     CURDIR="$PWD"
15974     cd "$with_override_langtools"
15975     LANGTOOLS_TOPDIR="`pwd`"
15976     cd "$CURDIR"
15977     if ! test -f $LANGTOOLS_TOPDIR/makefiles/Makefile; then
15978         as_fn_error $? "You have to override langtools with a full langtools repo!" "$LINENO" 5
15979     fi
15980     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if langtools should be overridden" >&5
15981 $as_echo_n "checking if langtools should be overridden... " >&6; }
15982     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $LANGTOOLS_TOPDIR" >&5
15983 $as_echo "yes with $LANGTOOLS_TOPDIR" >&6; }
15984 fi
15985 if test "x$with_override_corba" != x; then
15986     CURDIR="$PWD"
15987     cd "$with_override_corba"
15988     CORBA_TOPDIR="`pwd`"
15989     cd "$CURDIR"
15990     if ! test -f $CORBA_TOPDIR/makefiles/Makefile; then
15991         as_fn_error $? "You have to override corba with a full corba repo!" "$LINENO" 5
15992     fi
15993     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if corba should be overridden" >&5
15994 $as_echo_n "checking if corba should be overridden... " >&6; }
15995     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $CORBA_TOPDIR" >&5
15996 $as_echo "yes with $CORBA_TOPDIR" >&6; }
15997 fi
15998 if test "x$with_override_jaxp" != x; then
15999     CURDIR="$PWD"
16000     cd "$with_override_jaxp"
16001     JAXP_TOPDIR="`pwd`"
16002     cd "$CURDIR"
16003     if ! test -f $JAXP_TOPDIR/makefiles/Makefile; then
16004         as_fn_error $? "You have to override jaxp with a full jaxp repo!" "$LINENO" 5
16005     fi
16006     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jaxp should be overridden" >&5
16007 $as_echo_n "checking if jaxp should be overridden... " >&6; }
16008     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JAXP_TOPDIR" >&5
16009 $as_echo "yes with $JAXP_TOPDIR" >&6; }
16010 fi
16011 if test "x$with_override_jaxws" != x; then
16012     CURDIR="$PWD"
16013     cd "$with_override_jaxws"
16014     JAXWS_TOPDIR="`pwd`"
16015     cd "$CURDIR"
16016     if ! test -f $JAXWS_TOPDIR/makefiles/Makefile; then
16017         as_fn_error $? "You have to override jaxws with a full jaxws repo!" "$LINENO" 5
16018     fi
16019     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jaxws should be overridden" >&5
16020 $as_echo_n "checking if jaxws should be overridden... " >&6; }
16021     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JAXWS_TOPDIR" >&5
16022 $as_echo "yes with $JAXWS_TOPDIR" >&6; }
16023 fi
16024 if test "x$with_override_hotspot" != x; then
16025     CURDIR="$PWD"
16026     cd "$with_override_hotspot"
16027     HOTSPOT_TOPDIR="`pwd`"
16028     cd "$CURDIR"
16029     if ! test -f $HOTSPOT_TOPDIR/make/Makefile && \
16030        ! test -f $HOTSPOT_TOPDIR/makefiles/Makefile; then
16031         as_fn_error $? "You have to override hotspot with a full hotspot repo!" "$LINENO" 5
16032     fi
16033     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be overridden" >&5
16034 $as_echo_n "checking if hotspot should be overridden... " >&6; }
16035     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $HOTSPOT_TOPDIR" >&5
16036 $as_echo "yes with $HOTSPOT_TOPDIR" >&6; }
16037 fi
16038 if test "x$with_override_nashorn" != x; then
16039     CURDIR="$PWD"
16040     cd "$with_override_nashorn"
16041     NASHORN_TOPDIR="`pwd`"
16042     cd "$CURDIR"
16043     if ! test -f $NASHORN_TOPDIR/makefiles/BuildNashorn.gmk; then
16044         as_fn_error $? "You have to override nashorn with a full nashorn repo!" "$LINENO" 5
16045     fi
16046     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if nashorn should be overridden" >&5
16047 $as_echo_n "checking if nashorn should be overridden... " >&6; }
16048     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $NASHORN_TOPDIR" >&5
16049 $as_echo "yes with $NASHORN_TOPDIR" >&6; }
16050 fi
16051 if test "x$with_override_jdk" != x; then
16052     CURDIR="$PWD"
16053     cd "$with_override_jdk"
16054     JDK_TOPDIR="`pwd`"
16055     cd "$CURDIR"
16056     if ! test -f $JDK_TOPDIR/makefiles/Makefile; then
16057         as_fn_error $? "You have to override JDK with a full JDK repo!" "$LINENO" 5
16058     fi
16059     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if JDK should be overridden" >&5
16060 $as_echo_n "checking if JDK should be overridden... " >&6; }
16061     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JDK_TOPDIR" >&5
16062 $as_echo "yes with $JDK_TOPDIR" >&6; }
16063 fi
16064 
16065 
16066 
16067 BUILD_OUTPUT="$OUTPUT_ROOT"
16068 
16069 
16070 HOTSPOT_DIST="$OUTPUT_ROOT/hotspot/dist"
16071 BUILD_HOTSPOT=true
16072 
16073 
16074 
16075 # Check whether --with-import-hotspot was given.
16076 if test "${with_import_hotspot+set}" = set; then :
16077   withval=$with_import_hotspot;
16078 fi
16079 
16080 if test "x$with_import_hotspot" != x; then
16081     CURDIR="$PWD"
16082     cd "$with_import_hotspot"
16083     HOTSPOT_DIST="`pwd`"
16084     cd "$CURDIR"
16085     if ! (test -d $HOTSPOT_DIST/lib && test -d $HOTSPOT_DIST/jre/lib); then
16086         as_fn_error $? "You have to import hotspot from a full jdk image or hotspot build dist dir!" "$LINENO" 5
16087     fi
16088     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be imported" >&5
16089 $as_echo_n "checking if hotspot should be imported... " >&6; }
16090     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes from $HOTSPOT_DIST" >&5
16091 $as_echo "yes from $HOTSPOT_DIST" >&6; }
16092     BUILD_HOTSPOT=false
16093 fi
16094 
16095 JDK_OUTPUTDIR="$OUTPUT_ROOT/jdk"
16096 
16097 
16098 ###############################################################################
16099 #
16100 # Setup the toolchain (compilers etc), i.e. the tools that need to be
16101 # cross-compilation aware.
16102 #
16103 ###############################################################################
16104 
16105 
16106 ###############################################################################
16107 #
16108 # Configure the development tool paths and potential sysroot.
16109 #
16110 ac_ext=cpp
16111 ac_cpp='$CXXCPP $CPPFLAGS'
16112 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
16113 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
16114 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
16115 
16116 
16117 # The option used to specify the target .o,.a or .so file.
16118 # When compiling, how to specify the to be created object file.
16119 CC_OUT_OPTION='-o$(SPACE)'
16120 # When linking, how to specify the to be created executable.
16121 EXE_OUT_OPTION='-o$(SPACE)'
16122 # When linking, how to specify the to be created dynamically linkable library.
16123 LD_OUT_OPTION='-o$(SPACE)'
16124 # When archiving, how to specify the to be create static archive for object files.
16125 AR_OUT_OPTION='rcs$(SPACE)'
16126 
16127 
16128 
16129 
16130 
16131 # Locate the actual tools
16132 
16133 if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
16134 
16135   # Store path to cygwin link.exe to help excluding it when searching for
16136   # VS linker. This must be done before changing the PATH when looking for VS.
16137   # Extract the first word of "link", so it can be a program name with args.
16138 set dummy link; ac_word=$2
16139 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16140 $as_echo_n "checking for $ac_word... " >&6; }
16141 if test "${ac_cv_path_CYGWIN_LINK+set}" = set; then :
16142   $as_echo_n "(cached) " >&6
16143 else
16144   case $CYGWIN_LINK in
16145   [\\/]* | ?:[\\/]*)
16146   ac_cv_path_CYGWIN_LINK="$CYGWIN_LINK" # Let the user override the test with a path.
16147   ;;
16148   *)
16149   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16150 for as_dir in $PATH
16151 do
16152   IFS=$as_save_IFS
16153   test -z "$as_dir" && as_dir=.
16154     for ac_exec_ext in '' $ac_executable_extensions; do
16155   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
16156     ac_cv_path_CYGWIN_LINK="$as_dir/$ac_word$ac_exec_ext"
16157     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16158     break 2
16159   fi
16160 done
16161   done
16162 IFS=$as_save_IFS
16163 
16164   ;;
16165 esac
16166 fi
16167 CYGWIN_LINK=$ac_cv_path_CYGWIN_LINK
16168 if test -n "$CYGWIN_LINK"; then
16169   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_LINK" >&5
16170 $as_echo "$CYGWIN_LINK" >&6; }
16171 else
16172   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16173 $as_echo "no" >&6; }
16174 fi
16175 
16176 
16177   if test "x$CYGWIN_LINK" != x; then
16178     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the first found link.exe is actually the Cygwin link tool" >&5
16179 $as_echo_n "checking if the first found link.exe is actually the Cygwin link tool... " >&6; }
16180     "$CYGWIN_LINK" --version > /dev/null
16181     if test $? -eq 0 ; then
16182       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16183 $as_echo "yes" >&6; }
16184     else
16185       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16186 $as_echo "no" >&6; }
16187       # This might be the VS linker. Don't exclude it later on.
16188       CYGWIN_LINK=""
16189     fi
16190   fi
16191 
16192   # First-hand choice is to locate and run the vsvars bat file.
16193 
16194   if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
16195     VCVARSFILE="vc/bin/vcvars32.bat"
16196   else
16197     VCVARSFILE="vc/bin/amd64/vcvars64.bat"
16198   fi
16199 
16200   VS_ENV_CMD=""
16201   VS_ENV_ARGS=""
16202   if test "x$with_toolsdir" != x; then
16203 
16204   if test "x$VS_ENV_CMD" = x; then
16205     VS100BASE="$with_toolsdir/../.."
16206     METHOD="--with-tools-dir"
16207 
16208   windows_path="$VS100BASE"
16209   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16210     unix_path=`$CYGPATH -u "$windows_path"`
16211     VS100BASE="$unix_path"
16212   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16213     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16214     VS100BASE="$unix_path"
16215   fi
16216 
16217     if test -d "$VS100BASE"; then
16218       if test -f "$VS100BASE/$VCVARSFILE"; then
16219         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16220 $as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16221         VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16222       else
16223         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16224 $as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16225         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16226 $as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16227       fi
16228     fi
16229   fi
16230 
16231   fi
16232 
16233   if test "x$with_toolsdir" != x && test "x$VS_ENV_CMD" = x; then
16234     # Having specified an argument which is incorrect will produce an instant failure;
16235     # we should not go on looking
16236     { $as_echo "$as_me:${as_lineno-$LINENO}: The path given by --with-tools-dir does not contain a valid Visual Studio installation" >&5
16237 $as_echo "$as_me: The path given by --with-tools-dir does not contain a valid Visual Studio installation" >&6;}
16238     { $as_echo "$as_me:${as_lineno-$LINENO}: Please point to the VC/bin directory within the Visual Studio installation" >&5
16239 $as_echo "$as_me: Please point to the VC/bin directory within the Visual Studio installation" >&6;}
16240     as_fn_error $? "Cannot locate a valid Visual Studio installation" "$LINENO" 5
16241   fi
16242 
16243   if test "x$ProgramW6432" != x; then
16244 
16245   if test "x$VS_ENV_CMD" = x; then
16246     WIN_SDK_BASE="$ProgramW6432/Microsoft SDKs/Windows/v7.1/Bin"
16247     METHOD="well-known name"
16248 
16249   windows_path="$WIN_SDK_BASE"
16250   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16251     unix_path=`$CYGPATH -u "$windows_path"`
16252     WIN_SDK_BASE="$unix_path"
16253   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16254     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16255     WIN_SDK_BASE="$unix_path"
16256   fi
16257 
16258     if test -d "$WIN_SDK_BASE"; then
16259       # There have been cases of partial or broken SDK installations. A missing
16260       # lib dir is not going to work.
16261       if test ! -d "$WIN_SDK_BASE/../lib"; then
16262         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16263 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16264         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
16265 $as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
16266       elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
16267         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16268 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16269         VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
16270         if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
16271           VS_ENV_ARGS="/x86"
16272         else
16273           VS_ENV_ARGS="/x64"
16274         fi
16275       else
16276         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16277 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16278         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
16279 $as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
16280       fi
16281     fi
16282   fi
16283 
16284   fi
16285   if test "x$PROGRAMW6432" != x; then
16286 
16287   if test "x$VS_ENV_CMD" = x; then
16288     WIN_SDK_BASE="$PROGRAMW6432/Microsoft SDKs/Windows/v7.1/Bin"
16289     METHOD="well-known name"
16290 
16291   windows_path="$WIN_SDK_BASE"
16292   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16293     unix_path=`$CYGPATH -u "$windows_path"`
16294     WIN_SDK_BASE="$unix_path"
16295   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16296     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16297     WIN_SDK_BASE="$unix_path"
16298   fi
16299 
16300     if test -d "$WIN_SDK_BASE"; then
16301       # There have been cases of partial or broken SDK installations. A missing
16302       # lib dir is not going to work.
16303       if test ! -d "$WIN_SDK_BASE/../lib"; then
16304         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16305 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16306         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
16307 $as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
16308       elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
16309         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16310 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16311         VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
16312         if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
16313           VS_ENV_ARGS="/x86"
16314         else
16315           VS_ENV_ARGS="/x64"
16316         fi
16317       else
16318         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16319 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16320         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
16321 $as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
16322       fi
16323     fi
16324   fi
16325 
16326   fi
16327   if test "x$PROGRAMFILES" != x; then
16328 
16329   if test "x$VS_ENV_CMD" = x; then
16330     WIN_SDK_BASE="$PROGRAMFILES/Microsoft SDKs/Windows/v7.1/Bin"
16331     METHOD="well-known name"
16332 
16333   windows_path="$WIN_SDK_BASE"
16334   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16335     unix_path=`$CYGPATH -u "$windows_path"`
16336     WIN_SDK_BASE="$unix_path"
16337   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16338     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16339     WIN_SDK_BASE="$unix_path"
16340   fi
16341 
16342     if test -d "$WIN_SDK_BASE"; then
16343       # There have been cases of partial or broken SDK installations. A missing
16344       # lib dir is not going to work.
16345       if test ! -d "$WIN_SDK_BASE/../lib"; then
16346         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16347 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16348         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
16349 $as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
16350       elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
16351         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16352 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16353         VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
16354         if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
16355           VS_ENV_ARGS="/x86"
16356         else
16357           VS_ENV_ARGS="/x64"
16358         fi
16359       else
16360         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16361 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16362         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
16363 $as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
16364       fi
16365     fi
16366   fi
16367 
16368   fi
16369 
16370   if test "x$VS_ENV_CMD" = x; then
16371     WIN_SDK_BASE="C:/Program Files/Microsoft SDKs/Windows/v7.1/Bin"
16372     METHOD="well-known name"
16373 
16374   windows_path="$WIN_SDK_BASE"
16375   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16376     unix_path=`$CYGPATH -u "$windows_path"`
16377     WIN_SDK_BASE="$unix_path"
16378   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16379     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16380     WIN_SDK_BASE="$unix_path"
16381   fi
16382 
16383     if test -d "$WIN_SDK_BASE"; then
16384       # There have been cases of partial or broken SDK installations. A missing
16385       # lib dir is not going to work.
16386       if test ! -d "$WIN_SDK_BASE/../lib"; then
16387         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16388 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16389         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
16390 $as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
16391       elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
16392         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16393 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16394         VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
16395         if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
16396           VS_ENV_ARGS="/x86"
16397         else
16398           VS_ENV_ARGS="/x64"
16399         fi
16400       else
16401         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16402 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16403         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
16404 $as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
16405       fi
16406     fi
16407   fi
16408 
16409 
16410   if test "x$VS_ENV_CMD" = x; then
16411     WIN_SDK_BASE="C:/Program Files (x86)/Microsoft SDKs/Windows/v7.1/Bin"
16412     METHOD="well-known name"
16413 
16414   windows_path="$WIN_SDK_BASE"
16415   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16416     unix_path=`$CYGPATH -u "$windows_path"`
16417     WIN_SDK_BASE="$unix_path"
16418   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16419     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16420     WIN_SDK_BASE="$unix_path"
16421   fi
16422 
16423     if test -d "$WIN_SDK_BASE"; then
16424       # There have been cases of partial or broken SDK installations. A missing
16425       # lib dir is not going to work.
16426       if test ! -d "$WIN_SDK_BASE/../lib"; then
16427         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16428 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16429         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
16430 $as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
16431       elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
16432         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16433 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16434         VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
16435         if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
16436           VS_ENV_ARGS="/x86"
16437         else
16438           VS_ENV_ARGS="/x64"
16439         fi
16440       else
16441         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16442 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16443         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
16444 $as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
16445       fi
16446     fi
16447   fi
16448 
16449 
16450   if test "x$VS100COMNTOOLS" != x; then
16451 
16452   if test "x$VS_ENV_CMD" = x; then
16453     VS100BASE="$VS100COMNTOOLS/../.."
16454     METHOD="VS100COMNTOOLS variable"
16455 
16456   windows_path="$VS100BASE"
16457   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16458     unix_path=`$CYGPATH -u "$windows_path"`
16459     VS100BASE="$unix_path"
16460   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16461     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16462     VS100BASE="$unix_path"
16463   fi
16464 
16465     if test -d "$VS100BASE"; then
16466       if test -f "$VS100BASE/$VCVARSFILE"; then
16467         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16468 $as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16469         VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16470       else
16471         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16472 $as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16473         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16474 $as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16475       fi
16476     fi
16477   fi
16478 
16479   fi
16480   if test "x$PROGRAMFILES" != x; then
16481 
16482   if test "x$VS_ENV_CMD" = x; then
16483     VS100BASE="$PROGRAMFILES/Microsoft Visual Studio 10.0"
16484     METHOD="well-known name"
16485 
16486   windows_path="$VS100BASE"
16487   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16488     unix_path=`$CYGPATH -u "$windows_path"`
16489     VS100BASE="$unix_path"
16490   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16491     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16492     VS100BASE="$unix_path"
16493   fi
16494 
16495     if test -d "$VS100BASE"; then
16496       if test -f "$VS100BASE/$VCVARSFILE"; then
16497         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16498 $as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16499         VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16500       else
16501         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16502 $as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16503         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16504 $as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16505       fi
16506     fi
16507   fi
16508 
16509   fi
16510 
16511   if test "x$VS_ENV_CMD" = x; then
16512     VS100BASE="C:/Program Files/Microsoft Visual Studio 10.0"
16513     METHOD="well-known name"
16514 
16515   windows_path="$VS100BASE"
16516   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16517     unix_path=`$CYGPATH -u "$windows_path"`
16518     VS100BASE="$unix_path"
16519   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16520     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16521     VS100BASE="$unix_path"
16522   fi
16523 
16524     if test -d "$VS100BASE"; then
16525       if test -f "$VS100BASE/$VCVARSFILE"; then
16526         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16527 $as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16528         VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16529       else
16530         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16531 $as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16532         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16533 $as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16534       fi
16535     fi
16536   fi
16537 
16538 
16539   if test "x$VS_ENV_CMD" = x; then
16540     VS100BASE="C:/Program Files (x86)/Microsoft Visual Studio 10.0"
16541     METHOD="well-known name"
16542 
16543   windows_path="$VS100BASE"
16544   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16545     unix_path=`$CYGPATH -u "$windows_path"`
16546     VS100BASE="$unix_path"
16547   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16548     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16549     VS100BASE="$unix_path"
16550   fi
16551 
16552     if test -d "$VS100BASE"; then
16553       if test -f "$VS100BASE/$VCVARSFILE"; then
16554         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16555 $as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16556         VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16557       else
16558         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16559 $as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16560         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16561 $as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16562       fi
16563     fi
16564   fi
16565 
16566 
16567   if test "x$VS_ENV_CMD" != x; then
16568     # We have found a Visual Studio environment on disk, let's extract variables from the vsvars bat file.
16569 
16570   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16571 
16572   # First separate the path from the arguments. This will split at the first
16573   # space.
16574   complete="$VS_ENV_CMD"
16575   path="${complete%% *}"
16576   tmp="$complete EOL"
16577   arguments="${tmp#* }"
16578 
16579   # Input might be given as Windows format, start by converting to
16580   # unix format.
16581   new_path=`$CYGPATH -u "$path"`
16582 
16583   # Now try to locate executable using which
16584   new_path=`$WHICH "$new_path" 2> /dev/null`
16585   # bat and cmd files are not always considered executable in cygwin causing which
16586   # to not find them
16587   if test "x$new_path" = x \
16588            && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16589            && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16590     new_path=`$CYGPATH -u "$path"`
16591   fi
16592   if test "x$new_path" = x; then
16593     # Oops. Which didn't find the executable.
16594     # The splitting of arguments from the executable at a space might have been incorrect,
16595     # since paths with space are more likely in Windows. Give it another try with the whole
16596     # argument.
16597     path="$complete"
16598     arguments="EOL"
16599     new_path=`$CYGPATH -u "$path"`
16600     new_path=`$WHICH "$new_path" 2> /dev/null`
16601     # bat and cmd files are not always considered executable in cygwin causing which
16602     # to not find them
16603     if test "x$new_path" = x \
16604              && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16605              && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16606       new_path=`$CYGPATH -u "$path"`
16607     fi
16608     if test "x$new_path" = x; then
16609       # It's still not found. Now this is an unrecoverable error.
16610       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
16611 $as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
16612       has_space=`$ECHO "$complete" | $GREP " "`
16613       if test "x$has_space" != x; then
16614         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16615 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16616       fi
16617       as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
16618     fi
16619   fi
16620 
16621   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16622   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16623   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16624   # "foo.exe" is OK but "foo" is an error.
16625   #
16626   # This test is therefore slightly more accurate than "test -f" to check for file precense.
16627   # It is also a way to make sure we got the proper file name for the real test later on.
16628   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16629   if test "x$test_shortpath" = x; then
16630     # Short path failed, file does not exist as specified.
16631     # Try adding .exe or .cmd
16632     if test -f "${new_path}.exe"; then
16633        input_to_shortpath="${new_path}.exe"
16634     elif test -f "${new_path}.cmd"; then
16635        input_to_shortpath="${new_path}.cmd"
16636     else
16637       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&5
16638 $as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&6;}
16639       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
16640 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
16641       as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
16642     fi
16643   else
16644     input_to_shortpath="$new_path"
16645   fi
16646 
16647   # Call helper function which possibly converts this using DOS-style short mode.
16648   # If so, the updated path is stored in $new_path.
16649   new_path="$input_to_shortpath"
16650 
16651   input_path="$input_to_shortpath"
16652   # Check if we need to convert this using DOS-style short mode. If the path
16653   # contains just simple characters, use it. Otherwise (spaces, weird characters),
16654   # take no chances and rewrite it.
16655   # Note: m4 eats our [], so we need to use [ and ] instead.
16656   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16657   if test "x$has_forbidden_chars" != x; then
16658     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16659     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16660     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16661     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16662       # Going to short mode and back again did indeed matter. Since short mode is
16663       # case insensitive, let's make it lowercase to improve readability.
16664       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16665       # Now convert it back to Unix-stile (cygpath)
16666       input_path=`$CYGPATH -u "$shortmode_path"`
16667       new_path="$input_path"
16668     fi
16669   fi
16670 
16671   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16672   if test "x$test_cygdrive_prefix" = x; then
16673     # As a simple fix, exclude /usr/bin since it's not a real path.
16674     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
16675       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16676       # a path prefixed by /cygdrive for fixpath to work.
16677       new_path="$CYGWIN_ROOT_PATH$input_path"
16678     fi
16679   fi
16680 
16681   # remove trailing .exe if any
16682   new_path="${new_path/%.exe/}"
16683 
16684   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16685 
16686   # First separate the path from the arguments. This will split at the first
16687   # space.
16688   complete="$VS_ENV_CMD"
16689   path="${complete%% *}"
16690   tmp="$complete EOL"
16691   arguments="${tmp#* }"
16692 
16693   # Input might be given as Windows format, start by converting to
16694   # unix format.
16695   new_path="$path"
16696 
16697   windows_path="$new_path"
16698   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16699     unix_path=`$CYGPATH -u "$windows_path"`
16700     new_path="$unix_path"
16701   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16702     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16703     new_path="$unix_path"
16704   fi
16705 
16706 
16707   # Now try to locate executable using which
16708   new_path=`$WHICH "$new_path" 2> /dev/null`
16709 
16710   if test "x$new_path" = x; then
16711     # Oops. Which didn't find the executable.
16712     # The splitting of arguments from the executable at a space might have been incorrect,
16713     # since paths with space are more likely in Windows. Give it another try with the whole
16714     # argument.
16715     path="$complete"
16716     arguments="EOL"
16717     new_path="$path"
16718 
16719   windows_path="$new_path"
16720   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16721     unix_path=`$CYGPATH -u "$windows_path"`
16722     new_path="$unix_path"
16723   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16724     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16725     new_path="$unix_path"
16726   fi
16727 
16728 
16729     new_path=`$WHICH "$new_path" 2> /dev/null`
16730 
16731     if test "x$new_path" = x; then
16732       # It's still not found. Now this is an unrecoverable error.
16733       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
16734 $as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
16735       has_space=`$ECHO "$complete" | $GREP " "`
16736       if test "x$has_space" != x; then
16737         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16738 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16739       fi
16740       as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
16741     fi
16742   fi
16743 
16744   # Now new_path has a complete unix path to the binary
16745   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
16746     # Keep paths in /bin as-is, but remove trailing .exe if any
16747     new_path="${new_path/%.exe/}"
16748     # Do not save /bin paths to all_fixpath_prefixes!
16749   else
16750     # Not in mixed or Windows style, start by that.
16751     new_path=`cmd //c echo $new_path`
16752 
16753   input_path="$new_path"
16754   # Check if we need to convert this using DOS-style short mode. If the path
16755   # contains just simple characters, use it. Otherwise (spaces, weird characters),
16756   # take no chances and rewrite it.
16757   # Note: m4 eats our [], so we need to use [ and ] instead.
16758   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16759   if test "x$has_forbidden_chars" != x; then
16760     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16761     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16762   fi
16763 
16764     # Output is in $new_path
16765 
16766   windows_path="$new_path"
16767   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16768     unix_path=`$CYGPATH -u "$windows_path"`
16769     new_path="$unix_path"
16770   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16771     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16772     new_path="$unix_path"
16773   fi
16774 
16775     # remove trailing .exe if any
16776     new_path="${new_path/%.exe/}"
16777 
16778     # Save the first 10 bytes of this path to the storage, so fixpath can work.
16779     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16780   fi
16781 
16782   else
16783     # We're on a posix platform. Hooray! :)
16784     # First separate the path from the arguments. This will split at the first
16785     # space.
16786     complete="$VS_ENV_CMD"
16787     path="${complete%% *}"
16788     tmp="$complete EOL"
16789     arguments="${tmp#* }"
16790 
16791     # Cannot rely on the command "which" here since it doesn't always work.
16792     is_absolute_path=`$ECHO "$path" | $GREP ^/`
16793     if test -z "$is_absolute_path"; then
16794       # Path to executable is not absolute. Find it.
16795       IFS_save="$IFS"
16796       IFS=:
16797       for p in $PATH; do
16798         if test -f "$p/$path" && test -x "$p/$path"; then
16799           new_path="$p/$path"
16800           break
16801         fi
16802       done
16803       IFS="$IFS_save"
16804     else
16805       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving VS_ENV_CMD (as $path) failed, using $path directly." >&5
16806 $as_echo "$as_me: Resolving VS_ENV_CMD (as $path) failed, using $path directly." >&6;}
16807       new_path="$path"
16808     fi
16809 
16810     if test "x$new_path" = x; then
16811         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
16812 $as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
16813         has_space=`$ECHO "$complete" | $GREP " "`
16814         if test "x$has_space" != x; then
16815           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
16816 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
16817         fi
16818         as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
16819       fi
16820   fi
16821 
16822       # Now join together the path and the arguments once again
16823       if test "x$arguments" != xEOL; then
16824         new_complete="$new_path ${arguments% *}"
16825       else
16826         new_complete="$new_path"
16827       fi
16828 
16829   if test "x$complete" != "x$new_complete"; then
16830       VS_ENV_CMD="$new_complete"
16831       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting VS_ENV_CMD to \"$new_complete\"" >&5
16832 $as_echo "$as_me: Rewriting VS_ENV_CMD to \"$new_complete\"" >&6;}
16833     fi
16834 
16835 
16836     # Lets extract the variables that are set by vcvarsall.bat/vsvars32.bat/vsvars64.bat
16837     { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to extract Visual Studio environment variables" >&5
16838 $as_echo "$as_me: Trying to extract Visual Studio environment variables" >&6;}
16839     cd $OUTPUT_ROOT
16840     # FIXME: The code betweeen ---- was inlined from a separate script and is not properly adapted
16841     # to autoconf standards.
16842 
16843     #----
16844 
16845     # Cannot use the VS10 setup script directly (since it only updates the DOS subshell environment)
16846     # but calculate the difference in Cygwin environment before/after running it and then
16847     # apply the diff.
16848 
16849     if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
16850       _vs10varsall=`cygpath -a -m -s "$VS_ENV_CMD"`
16851       _dosvs10varsall=`cygpath -a -w -s $_vs10varsall`
16852       _dosbash=`cygpath -a -w -s \`which bash\`.*`
16853     else
16854       _dosvs10varsall=`cmd //c echo $VS_ENV_CMD`
16855       _dosbash=`cmd //c echo \`which bash\``
16856     fi
16857 
16858     # generate the set of exported vars before/after the vs10 setup
16859     $ECHO "@echo off"                                           >  localdevenvtmp.bat
16860     $ECHO "$_dosbash -c \"export -p\" > localdevenvtmp.export0" >> localdevenvtmp.bat
16861     $ECHO "call $_dosvs10varsall $VS_ENV_ARGS"                  >> localdevenvtmp.bat
16862     $ECHO "$_dosbash -c \"export -p\" > localdevenvtmp.export1" >> localdevenvtmp.bat
16863 
16864     # Now execute the newly created bat file.
16865     # The | cat is to stop SetEnv.Cmd to mess with system colors on msys
16866     cmd /c localdevenvtmp.bat | cat
16867 
16868     # apply the diff (less some non-vs10 vars named by "!")
16869     $SORT localdevenvtmp.export0 | $GREP -v "!" > localdevenvtmp.export0.sort
16870     $SORT localdevenvtmp.export1 | $GREP -v "!" > localdevenvtmp.export1.sort
16871     $COMM -1 -3 localdevenvtmp.export0.sort localdevenvtmp.export1.sort > localdevenv.sh
16872 
16873     # cleanup
16874     $RM localdevenvtmp*
16875     #----
16876     cd $CURDIR
16877     if test ! -s $OUTPUT_ROOT/localdevenv.sh; then
16878       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16879 $as_echo "no" >&6; }
16880       { $as_echo "$as_me:${as_lineno-$LINENO}: Could not succesfully extract the envionment variables needed for the VS setup." >&5
16881 $as_echo "$as_me: Could not succesfully extract the envionment variables needed for the VS setup." >&6;}
16882       { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
16883 $as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
16884       { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
16885 $as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
16886       as_fn_error $? "Cannot continue" "$LINENO" 5
16887     fi
16888 
16889     # Now set all paths and other env variables. This will allow the rest of
16890     # the configure script to find and run the compiler in the proper way.
16891     { $as_echo "$as_me:${as_lineno-$LINENO}: Setting extracted environment variables" >&5
16892 $as_echo "$as_me: Setting extracted environment variables" >&6;}
16893     . $OUTPUT_ROOT/localdevenv.sh
16894   else
16895     # We did not find a vsvars bat file, let's hope we are run from a VS command prompt.
16896     { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio installation, checking current environment" >&5
16897 $as_echo "$as_me: Cannot locate a valid Visual Studio installation, checking current environment" >&6;}
16898   fi
16899 
16900   # At this point, we should have corrent variables in the environment, or we can't continue.
16901   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Visual Studio variables" >&5
16902 $as_echo_n "checking for Visual Studio variables... " >&6; }
16903 
16904   if test "x$VCINSTALLDIR" != x || test "x$WindowsSDKDir" != x || test "x$WINDOWSSDKDIR" != x; then
16905     if test "x$INCLUDE" = x || test "x$LIB" = x; then
16906       { $as_echo "$as_me:${as_lineno-$LINENO}: result: present but broken" >&5
16907 $as_echo "present but broken" >&6; }
16908       as_fn_error $? "Your VC command prompt seems broken, INCLUDE and/or LIB is missing." "$LINENO" 5
16909     else
16910       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
16911 $as_echo "ok" >&6; }
16912       # Remove any trailing \ from INCLUDE and LIB to avoid trouble in spec.gmk.
16913       VS_INCLUDE=`$ECHO "$INCLUDE" | $SED 's/\\\\$//'`
16914       VS_LIB=`$ECHO "$LIB" | $SED 's/\\\\$//'`
16915       VS_PATH="$PATH"
16916 
16917 
16918 
16919     fi
16920   else
16921     { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
16922 $as_echo "not found" >&6; }
16923 
16924     if test "x$VS_ENV_CMD" = x; then
16925       { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&5
16926 $as_echo "$as_me: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&6;}
16927       { $as_echo "$as_me:${as_lineno-$LINENO}: nor is this script run from a Visual Studio command prompt." >&5
16928 $as_echo "$as_me: nor is this script run from a Visual Studio command prompt." >&6;}
16929     else
16930       { $as_echo "$as_me:${as_lineno-$LINENO}: Running the extraction script failed." >&5
16931 $as_echo "$as_me: Running the extraction script failed." >&6;}
16932     fi
16933     { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
16934 $as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
16935     { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
16936 $as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
16937     as_fn_error $? "Cannot continue" "$LINENO" 5
16938   fi
16939 
16940   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
16941 $as_echo_n "checking for msvcr100.dll... " >&6; }
16942 
16943 # Check whether --with-msvcr-dll was given.
16944 if test "${with_msvcr_dll+set}" = set; then :
16945   withval=$with_msvcr_dll;
16946 fi
16947 
16948   if test "x$with_msvcr_dll" != x; then
16949     MSVCR_DLL="$with_msvcr_dll"
16950   else
16951     if test "x$VCINSTALLDIR" != x; then
16952       if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
16953         MSVCR_DLL=`find "$VCINSTALLDIR" -name msvcr100.dll | grep x64 | head --lines 1`
16954       else
16955         MSVCR_DLL=`find "$VCINSTALLDIR" -name msvcr100.dll | grep x86 | grep -v ia64 | grep -v x64 | head --lines 1`
16956         if test "x$MSVCR_DLL" = x; then
16957           MSVCR_DLL=`find "$VCINSTALLDIR" -name msvcr100.dll | head --lines 1`
16958         fi
16959       fi
16960       if test "x$MSVCR_DLL" != x; then
16961         { $as_echo "$as_me:${as_lineno-$LINENO}: msvcr100.dll found in VCINSTALLDIR: $VCINSTALLDIR" >&5
16962 $as_echo "$as_me: msvcr100.dll found in VCINSTALLDIR: $VCINSTALLDIR" >&6;}
16963       else
16964         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: msvcr100.dll not found in VCINSTALLDIR: $VCINSTALLDIR" >&5
16965 $as_echo "$as_me: Warning: msvcr100.dll not found in VCINSTALLDIR: $VCINSTALLDIR" >&6;}
16966       fi
16967     fi
16968     if test "x$MSVCR_DLL" = x; then
16969       if test -f "$SYSTEMROOT/system32/msvcr100.dll"; then
16970         { $as_echo "$as_me:${as_lineno-$LINENO}: msvcr100.dll found in $SYSTEMROOT/system32" >&5
16971 $as_echo "$as_me: msvcr100.dll found in $SYSTEMROOT/system32" >&6;}
16972         MSVCR_DLL="$SYSTEMROOT/system32/msvcr100.dll"
16973       fi
16974     fi
16975   fi
16976   if test "x$MSVCR_DLL" = x; then
16977     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16978 $as_echo "no" >&6; }
16979     as_fn_error $? "Could not find msvcr100.dll !" "$LINENO" 5
16980   fi
16981   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
16982 $as_echo "$MSVCR_DLL" >&6; }
16983 
16984   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16985 
16986   # Input might be given as Windows format, start by converting to
16987   # unix format.
16988   path="$MSVCR_DLL"
16989   new_path=`$CYGPATH -u "$path"`
16990 
16991   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16992   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16993   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16994   # "foo.exe" is OK but "foo" is an error.
16995   #
16996   # This test is therefore slightly more accurate than "test -f" to check for file precense.
16997   # It is also a way to make sure we got the proper file name for the real test later on.
16998   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16999   if test "x$test_shortpath" = x; then
17000     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&5
17001 $as_echo "$as_me: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&6;}
17002     as_fn_error $? "Cannot locate the the path of MSVCR_DLL" "$LINENO" 5
17003   fi
17004 
17005   # Call helper function which possibly converts this using DOS-style short mode.
17006   # If so, the updated path is stored in $new_path.
17007 
17008   input_path="$new_path"
17009   # Check if we need to convert this using DOS-style short mode. If the path
17010   # contains just simple characters, use it. Otherwise (spaces, weird characters),
17011   # take no chances and rewrite it.
17012   # Note: m4 eats our [], so we need to use [ and ] instead.
17013   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17014   if test "x$has_forbidden_chars" != x; then
17015     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17016     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17017     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17018     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17019       # Going to short mode and back again did indeed matter. Since short mode is
17020       # case insensitive, let's make it lowercase to improve readability.
17021       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17022       # Now convert it back to Unix-stile (cygpath)
17023       input_path=`$CYGPATH -u "$shortmode_path"`
17024       new_path="$input_path"
17025     fi
17026   fi
17027 
17028   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17029   if test "x$test_cygdrive_prefix" = x; then
17030     # As a simple fix, exclude /usr/bin since it's not a real path.
17031     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
17032       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17033       # a path prefixed by /cygdrive for fixpath to work.
17034       new_path="$CYGWIN_ROOT_PATH$input_path"
17035     fi
17036   fi
17037 
17038 
17039   if test "x$path" != "x$new_path"; then
17040     MSVCR_DLL="$new_path"
17041     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVCR_DLL to \"$new_path\"" >&5
17042 $as_echo "$as_me: Rewriting MSVCR_DLL to \"$new_path\"" >&6;}
17043   fi
17044 
17045   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17046 
17047   path="$MSVCR_DLL"
17048   has_colon=`$ECHO $path | $GREP ^.:`
17049   new_path="$path"
17050   if test "x$has_colon" = x; then
17051     # Not in mixed or Windows style, start by that.
17052     new_path=`cmd //c echo $path`
17053   fi
17054 
17055 
17056   input_path="$new_path"
17057   # Check if we need to convert this using DOS-style short mode. If the path
17058   # contains just simple characters, use it. Otherwise (spaces, weird characters),
17059   # take no chances and rewrite it.
17060   # Note: m4 eats our [], so we need to use [ and ] instead.
17061   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17062   if test "x$has_forbidden_chars" != x; then
17063     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17064     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17065   fi
17066 
17067 
17068   windows_path="$new_path"
17069   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17070     unix_path=`$CYGPATH -u "$windows_path"`
17071     new_path="$unix_path"
17072   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17073     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17074     new_path="$unix_path"
17075   fi
17076 
17077   if test "x$path" != "x$new_path"; then
17078     MSVCR_DLL="$new_path"
17079     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVCR_DLL to \"$new_path\"" >&5
17080 $as_echo "$as_me: Rewriting MSVCR_DLL to \"$new_path\"" >&6;}
17081   fi
17082 
17083   # Save the first 10 bytes of this path to the storage, so fixpath can work.
17084   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17085 
17086   else
17087     # We're on a posix platform. Hooray! :)
17088     path="$MSVCR_DLL"
17089 
17090     if test ! -f "$path" && test ! -d "$path"; then
17091       as_fn_error $? "The path of MSVCR_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
17092     fi
17093 
17094     has_space=`$ECHO "$path" | $GREP " "`
17095     if test "x$has_space" != x; then
17096       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&5
17097 $as_echo "$as_me: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&6;}
17098       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
17099     fi
17100   fi
17101 
17102 
17103 
17104 
17105 # Check whether --with-dxsdk was given.
17106 if test "${with_dxsdk+set}" = set; then :
17107   withval=$with_dxsdk;
17108 fi
17109 
17110 
17111 # Check whether --with-dxsdk-lib was given.
17112 if test "${with_dxsdk_lib+set}" = set; then :
17113   withval=$with_dxsdk_lib;
17114 fi
17115 
17116 
17117 # Check whether --with-dxsdk-include was given.
17118 if test "${with_dxsdk_include+set}" = set; then :
17119   withval=$with_dxsdk_include;
17120 fi
17121 
17122 
17123   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DirectX SDK" >&5
17124 $as_echo_n "checking for DirectX SDK... " >&6; }
17125 
17126   if test "x$with_dxsdk" != x; then
17127     dxsdk_path="$with_dxsdk"
17128   elif test "x$DXSDK_DIR" != x; then
17129     dxsdk_path="$DXSDK_DIR"
17130   elif test -d "C:/DXSDK"; then
17131     dxsdk_path="C:/DXSDK"
17132   else
17133     as_fn_error $? "Could not find the DirectX SDK" "$LINENO" 5
17134   fi
17135   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $dxsdk_path" >&5
17136 $as_echo "$dxsdk_path" >&6; }
17137 
17138   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17139 
17140   # Input might be given as Windows format, start by converting to
17141   # unix format.
17142   path="$dxsdk_path"
17143   new_path=`$CYGPATH -u "$path"`
17144 
17145   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17146   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17147   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17148   # "foo.exe" is OK but "foo" is an error.
17149   #
17150   # This test is therefore slightly more accurate than "test -f" to check for file precense.
17151   # It is also a way to make sure we got the proper file name for the real test later on.
17152   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17153   if test "x$test_shortpath" = x; then
17154     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of dxsdk_path, which resolves as \"$path\", is invalid." >&5
17155 $as_echo "$as_me: The path of dxsdk_path, which resolves as \"$path\", is invalid." >&6;}
17156     as_fn_error $? "Cannot locate the the path of dxsdk_path" "$LINENO" 5
17157   fi
17158 
17159   # Call helper function which possibly converts this using DOS-style short mode.
17160   # If so, the updated path is stored in $new_path.
17161 
17162   input_path="$new_path"
17163   # Check if we need to convert this using DOS-style short mode. If the path
17164   # contains just simple characters, use it. Otherwise (spaces, weird characters),
17165   # take no chances and rewrite it.
17166   # Note: m4 eats our [], so we need to use [ and ] instead.
17167   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17168   if test "x$has_forbidden_chars" != x; then
17169     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17170     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17171     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17172     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17173       # Going to short mode and back again did indeed matter. Since short mode is
17174       # case insensitive, let's make it lowercase to improve readability.
17175       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17176       # Now convert it back to Unix-stile (cygpath)
17177       input_path=`$CYGPATH -u "$shortmode_path"`
17178       new_path="$input_path"
17179     fi
17180   fi
17181 
17182   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17183   if test "x$test_cygdrive_prefix" = x; then
17184     # As a simple fix, exclude /usr/bin since it's not a real path.
17185     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
17186       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17187       # a path prefixed by /cygdrive for fixpath to work.
17188       new_path="$CYGWIN_ROOT_PATH$input_path"
17189     fi
17190   fi
17191 
17192 
17193   if test "x$path" != "x$new_path"; then
17194     dxsdk_path="$new_path"
17195     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting dxsdk_path to \"$new_path\"" >&5
17196 $as_echo "$as_me: Rewriting dxsdk_path to \"$new_path\"" >&6;}
17197   fi
17198 
17199   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17200 
17201   path="$dxsdk_path"
17202   has_colon=`$ECHO $path | $GREP ^.:`
17203   new_path="$path"
17204   if test "x$has_colon" = x; then
17205     # Not in mixed or Windows style, start by that.
17206     new_path=`cmd //c echo $path`
17207   fi
17208 
17209 
17210   input_path="$new_path"
17211   # Check if we need to convert this using DOS-style short mode. If the path
17212   # contains just simple characters, use it. Otherwise (spaces, weird characters),
17213   # take no chances and rewrite it.
17214   # Note: m4 eats our [], so we need to use [ and ] instead.
17215   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17216   if test "x$has_forbidden_chars" != x; then
17217     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17218     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17219   fi
17220 
17221 
17222   windows_path="$new_path"
17223   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17224     unix_path=`$CYGPATH -u "$windows_path"`
17225     new_path="$unix_path"
17226   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17227     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17228     new_path="$unix_path"
17229   fi
17230 
17231   if test "x$path" != "x$new_path"; then
17232     dxsdk_path="$new_path"
17233     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting dxsdk_path to \"$new_path\"" >&5
17234 $as_echo "$as_me: Rewriting dxsdk_path to \"$new_path\"" >&6;}
17235   fi
17236 
17237   # Save the first 10 bytes of this path to the storage, so fixpath can work.
17238   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17239 
17240   else
17241     # We're on a posix platform. Hooray! :)
17242     path="$dxsdk_path"
17243 
17244     if test ! -f "$path" && test ! -d "$path"; then
17245       as_fn_error $? "The path of dxsdk_path, which resolves as \"$path\", is not found." "$LINENO" 5
17246     fi
17247 
17248     has_space=`$ECHO "$path" | $GREP " "`
17249     if test "x$has_space" != x; then
17250       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of dxsdk_path, which resolves as \"$path\", is invalid." >&5
17251 $as_echo "$as_me: The path of dxsdk_path, which resolves as \"$path\", is invalid." >&6;}
17252       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
17253     fi
17254   fi
17255 
17256 
17257   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DirectX SDK lib dir" >&5
17258 $as_echo_n "checking for DirectX SDK lib dir... " >&6; }
17259   if test "x$with_dxsdk_lib" != x; then
17260     DXSDK_LIB_PATH="$with_dxsdk_lib"
17261   elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
17262     DXSDK_LIB_PATH="$dxsdk_path/Lib/x64"
17263   else
17264     DXSDK_LIB_PATH="$dxsdk_path/Lib"
17265   fi
17266   # dsound.lib is linked to in jsoundds
17267   if test ! -f "$DXSDK_LIB_PATH/dsound.lib"; then
17268     as_fn_error $? "Invalid DirectX SDK lib dir" "$LINENO" 5
17269   fi
17270   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DXSDK_LIB_PATH" >&5
17271 $as_echo "$DXSDK_LIB_PATH" >&6; }
17272 
17273   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17274 
17275   # Input might be given as Windows format, start by converting to
17276   # unix format.
17277   path="$DXSDK_LIB_PATH"
17278   new_path=`$CYGPATH -u "$path"`
17279 
17280   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17281   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17282   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17283   # "foo.exe" is OK but "foo" is an error.
17284   #
17285   # This test is therefore slightly more accurate than "test -f" to check for file precense.
17286   # It is also a way to make sure we got the proper file name for the real test later on.
17287   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17288   if test "x$test_shortpath" = x; then
17289     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DXSDK_LIB_PATH, which resolves as \"$path\", is invalid." >&5
17290 $as_echo "$as_me: The path of DXSDK_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
17291     as_fn_error $? "Cannot locate the the path of DXSDK_LIB_PATH" "$LINENO" 5
17292   fi
17293 
17294   # Call helper function which possibly converts this using DOS-style short mode.
17295   # If so, the updated path is stored in $new_path.
17296 
17297   input_path="$new_path"
17298   # Check if we need to convert this using DOS-style short mode. If the path
17299   # contains just simple characters, use it. Otherwise (spaces, weird characters),
17300   # take no chances and rewrite it.
17301   # Note: m4 eats our [], so we need to use [ and ] instead.
17302   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17303   if test "x$has_forbidden_chars" != x; then
17304     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17305     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17306     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17307     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17308       # Going to short mode and back again did indeed matter. Since short mode is
17309       # case insensitive, let's make it lowercase to improve readability.
17310       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17311       # Now convert it back to Unix-stile (cygpath)
17312       input_path=`$CYGPATH -u "$shortmode_path"`
17313       new_path="$input_path"
17314     fi
17315   fi
17316 
17317   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17318   if test "x$test_cygdrive_prefix" = x; then
17319     # As a simple fix, exclude /usr/bin since it's not a real path.
17320     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
17321       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17322       # a path prefixed by /cygdrive for fixpath to work.
17323       new_path="$CYGWIN_ROOT_PATH$input_path"
17324     fi
17325   fi
17326 
17327 
17328   if test "x$path" != "x$new_path"; then
17329     DXSDK_LIB_PATH="$new_path"
17330     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DXSDK_LIB_PATH to \"$new_path\"" >&5
17331 $as_echo "$as_me: Rewriting DXSDK_LIB_PATH to \"$new_path\"" >&6;}
17332   fi
17333 
17334   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17335 
17336   path="$DXSDK_LIB_PATH"
17337   has_colon=`$ECHO $path | $GREP ^.:`
17338   new_path="$path"
17339   if test "x$has_colon" = x; then
17340     # Not in mixed or Windows style, start by that.
17341     new_path=`cmd //c echo $path`
17342   fi
17343 
17344 
17345   input_path="$new_path"
17346   # Check if we need to convert this using DOS-style short mode. If the path
17347   # contains just simple characters, use it. Otherwise (spaces, weird characters),
17348   # take no chances and rewrite it.
17349   # Note: m4 eats our [], so we need to use [ and ] instead.
17350   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17351   if test "x$has_forbidden_chars" != x; then
17352     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17353     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17354   fi
17355 
17356 
17357   windows_path="$new_path"
17358   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17359     unix_path=`$CYGPATH -u "$windows_path"`
17360     new_path="$unix_path"
17361   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17362     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17363     new_path="$unix_path"
17364   fi
17365 
17366   if test "x$path" != "x$new_path"; then
17367     DXSDK_LIB_PATH="$new_path"
17368     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DXSDK_LIB_PATH to \"$new_path\"" >&5
17369 $as_echo "$as_me: Rewriting DXSDK_LIB_PATH to \"$new_path\"" >&6;}
17370   fi
17371 
17372   # Save the first 10 bytes of this path to the storage, so fixpath can work.
17373   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17374 
17375   else
17376     # We're on a posix platform. Hooray! :)
17377     path="$DXSDK_LIB_PATH"
17378 
17379     if test ! -f "$path" && test ! -d "$path"; then
17380       as_fn_error $? "The path of DXSDK_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
17381     fi
17382 
17383     has_space=`$ECHO "$path" | $GREP " "`
17384     if test "x$has_space" != x; then
17385       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DXSDK_LIB_PATH, which resolves as \"$path\", is invalid." >&5
17386 $as_echo "$as_me: The path of DXSDK_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
17387       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
17388     fi
17389   fi
17390 
17391 
17392   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DirectX SDK include dir" >&5
17393 $as_echo_n "checking for DirectX SDK include dir... " >&6; }
17394   if test "x$with_dxsdk_include" != x; then
17395     DXSDK_INCLUDE_PATH="$with_dxsdk_include"
17396   else
17397     DXSDK_INCLUDE_PATH="$dxsdk_path/Include"
17398   fi
17399   # dsound.h is included in jsoundds
17400   if test ! -f "$DXSDK_INCLUDE_PATH/dsound.h"; then
17401     as_fn_error $? "Invalid DirectX SDK lib dir" "$LINENO" 5
17402   fi
17403   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DXSDK_INCLUDE_PATH" >&5
17404 $as_echo "$DXSDK_INCLUDE_PATH" >&6; }
17405 
17406   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17407 
17408   # Input might be given as Windows format, start by converting to
17409   # unix format.
17410   path="$DXSDK_INCLUDE_PATH"
17411   new_path=`$CYGPATH -u "$path"`
17412 
17413   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17414   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17415   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17416   # "foo.exe" is OK but "foo" is an error.
17417   #
17418   # This test is therefore slightly more accurate than "test -f" to check for file precense.
17419   # It is also a way to make sure we got the proper file name for the real test later on.
17420   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17421   if test "x$test_shortpath" = x; then
17422     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DXSDK_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
17423 $as_echo "$as_me: The path of DXSDK_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
17424     as_fn_error $? "Cannot locate the the path of DXSDK_INCLUDE_PATH" "$LINENO" 5
17425   fi
17426 
17427   # Call helper function which possibly converts this using DOS-style short mode.
17428   # If so, the updated path is stored in $new_path.
17429 
17430   input_path="$new_path"
17431   # Check if we need to convert this using DOS-style short mode. If the path
17432   # contains just simple characters, use it. Otherwise (spaces, weird characters),
17433   # take no chances and rewrite it.
17434   # Note: m4 eats our [], so we need to use [ and ] instead.
17435   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17436   if test "x$has_forbidden_chars" != x; then
17437     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17438     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17439     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17440     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17441       # Going to short mode and back again did indeed matter. Since short mode is
17442       # case insensitive, let's make it lowercase to improve readability.
17443       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17444       # Now convert it back to Unix-stile (cygpath)
17445       input_path=`$CYGPATH -u "$shortmode_path"`
17446       new_path="$input_path"
17447     fi
17448   fi
17449 
17450   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17451   if test "x$test_cygdrive_prefix" = x; then
17452     # As a simple fix, exclude /usr/bin since it's not a real path.
17453     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
17454       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17455       # a path prefixed by /cygdrive for fixpath to work.
17456       new_path="$CYGWIN_ROOT_PATH$input_path"
17457     fi
17458   fi
17459 
17460 
17461   if test "x$path" != "x$new_path"; then
17462     DXSDK_INCLUDE_PATH="$new_path"
17463     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DXSDK_INCLUDE_PATH to \"$new_path\"" >&5
17464 $as_echo "$as_me: Rewriting DXSDK_INCLUDE_PATH to \"$new_path\"" >&6;}
17465   fi
17466 
17467   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17468 
17469   path="$DXSDK_INCLUDE_PATH"
17470   has_colon=`$ECHO $path | $GREP ^.:`
17471   new_path="$path"
17472   if test "x$has_colon" = x; then
17473     # Not in mixed or Windows style, start by that.
17474     new_path=`cmd //c echo $path`
17475   fi
17476 
17477 
17478   input_path="$new_path"
17479   # Check if we need to convert this using DOS-style short mode. If the path
17480   # contains just simple characters, use it. Otherwise (spaces, weird characters),
17481   # take no chances and rewrite it.
17482   # Note: m4 eats our [], so we need to use [ and ] instead.
17483   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17484   if test "x$has_forbidden_chars" != x; then
17485     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17486     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17487   fi
17488 
17489 
17490   windows_path="$new_path"
17491   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17492     unix_path=`$CYGPATH -u "$windows_path"`
17493     new_path="$unix_path"
17494   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17495     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17496     new_path="$unix_path"
17497   fi
17498 
17499   if test "x$path" != "x$new_path"; then
17500     DXSDK_INCLUDE_PATH="$new_path"
17501     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DXSDK_INCLUDE_PATH to \"$new_path\"" >&5
17502 $as_echo "$as_me: Rewriting DXSDK_INCLUDE_PATH to \"$new_path\"" >&6;}
17503   fi
17504 
17505   # Save the first 10 bytes of this path to the storage, so fixpath can work.
17506   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17507 
17508   else
17509     # We're on a posix platform. Hooray! :)
17510     path="$DXSDK_INCLUDE_PATH"
17511 
17512     if test ! -f "$path" && test ! -d "$path"; then
17513       as_fn_error $? "The path of DXSDK_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
17514     fi
17515 
17516     has_space=`$ECHO "$path" | $GREP " "`
17517     if test "x$has_space" != x; then
17518       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DXSDK_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
17519 $as_echo "$as_me: The path of DXSDK_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
17520       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
17521     fi
17522   fi
17523 
17524 
17525 
17526 
17527   LDFLAGS_JDK="$LDFLAGS_JDK -libpath:$DXSDK_LIB_PATH"
17528 
17529 fi
17530 
17531 
17532 
17533 # If --build AND --host is set, then the configure script will find any
17534 # cross compilation tools in the PATH. Cross compilation tools
17535 # follows the cross compilation standard where they are prefixed with ${host}.
17536 # For example the binary i686-sun-solaris2.10-gcc
17537 # will cross compile for i686-sun-solaris2.10
17538 # If neither of build and host is not set, then build=host and the
17539 # default compiler found in the path will be used.
17540 # Setting only --host, does not seem to be really supported.
17541 # Please set both --build and --host if you want to cross compile.
17542 
17543 if test "x$COMPILE_TYPE" = "xcross"; then
17544     # Now we to find a C/C++ compiler that can build executables for the build
17545     # platform. We can't use the AC_PROG_CC macro, since it can only be used
17546     # once. Also, we need to do this before adding a tools dir to the path,
17547     # otherwise we might pick up cross-compilers which don't use standard naming.
17548     # Otherwise, we'll set the BUILD_tools to the native tools, but that'll have
17549     # to wait until they are properly discovered.
17550     for ac_prog in cl cc gcc
17551 do
17552   # Extract the first word of "$ac_prog", so it can be a program name with args.
17553 set dummy $ac_prog; ac_word=$2
17554 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17555 $as_echo_n "checking for $ac_word... " >&6; }
17556 if test "${ac_cv_path_BUILD_CC+set}" = set; then :
17557   $as_echo_n "(cached) " >&6
17558 else
17559   case $BUILD_CC in
17560   [\\/]* | ?:[\\/]*)
17561   ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
17562   ;;
17563   *)
17564   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17565 for as_dir in $PATH
17566 do
17567   IFS=$as_save_IFS
17568   test -z "$as_dir" && as_dir=.
17569     for ac_exec_ext in '' $ac_executable_extensions; do
17570   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
17571     ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
17572     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17573     break 2
17574   fi
17575 done
17576   done
17577 IFS=$as_save_IFS
17578 
17579   ;;
17580 esac
17581 fi
17582 BUILD_CC=$ac_cv_path_BUILD_CC
17583 if test -n "$BUILD_CC"; then
17584   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
17585 $as_echo "$BUILD_CC" >&6; }
17586 else
17587   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17588 $as_echo "no" >&6; }
17589 fi
17590 
17591 
17592   test -n "$BUILD_CC" && break
17593 done
17594 
17595 
17596   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17597 
17598   # First separate the path from the arguments. This will split at the first
17599   # space.
17600   complete="$BUILD_CC"
17601   path="${complete%% *}"
17602   tmp="$complete EOL"
17603   arguments="${tmp#* }"
17604 
17605   # Input might be given as Windows format, start by converting to
17606   # unix format.
17607   new_path=`$CYGPATH -u "$path"`
17608 
17609   # Now try to locate executable using which
17610   new_path=`$WHICH "$new_path" 2> /dev/null`
17611   # bat and cmd files are not always considered executable in cygwin causing which
17612   # to not find them
17613   if test "x$new_path" = x \
17614            && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17615            && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17616     new_path=`$CYGPATH -u "$path"`
17617   fi
17618   if test "x$new_path" = x; then
17619     # Oops. Which didn't find the executable.
17620     # The splitting of arguments from the executable at a space might have been incorrect,
17621     # since paths with space are more likely in Windows. Give it another try with the whole
17622     # argument.
17623     path="$complete"
17624     arguments="EOL"
17625     new_path=`$CYGPATH -u "$path"`
17626     new_path=`$WHICH "$new_path" 2> /dev/null`
17627     # bat and cmd files are not always considered executable in cygwin causing which
17628     # to not find them
17629     if test "x$new_path" = x \
17630              && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17631              && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17632       new_path=`$CYGPATH -u "$path"`
17633     fi
17634     if test "x$new_path" = x; then
17635       # It's still not found. Now this is an unrecoverable error.
17636       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
17637 $as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
17638       has_space=`$ECHO "$complete" | $GREP " "`
17639       if test "x$has_space" != x; then
17640         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17641 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17642       fi
17643       as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
17644     fi
17645   fi
17646 
17647   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17648   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17649   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17650   # "foo.exe" is OK but "foo" is an error.
17651   #
17652   # This test is therefore slightly more accurate than "test -f" to check for file precense.
17653   # It is also a way to make sure we got the proper file name for the real test later on.
17654   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17655   if test "x$test_shortpath" = x; then
17656     # Short path failed, file does not exist as specified.
17657     # Try adding .exe or .cmd
17658     if test -f "${new_path}.exe"; then
17659        input_to_shortpath="${new_path}.exe"
17660     elif test -f "${new_path}.cmd"; then
17661        input_to_shortpath="${new_path}.cmd"
17662     else
17663       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&5
17664 $as_echo "$as_me: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&6;}
17665       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
17666 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
17667       as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
17668     fi
17669   else
17670     input_to_shortpath="$new_path"
17671   fi
17672 
17673   # Call helper function which possibly converts this using DOS-style short mode.
17674   # If so, the updated path is stored in $new_path.
17675   new_path="$input_to_shortpath"
17676 
17677   input_path="$input_to_shortpath"
17678   # Check if we need to convert this using DOS-style short mode. If the path
17679   # contains just simple characters, use it. Otherwise (spaces, weird characters),
17680   # take no chances and rewrite it.
17681   # Note: m4 eats our [], so we need to use [ and ] instead.
17682   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17683   if test "x$has_forbidden_chars" != x; then
17684     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17685     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17686     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17687     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17688       # Going to short mode and back again did indeed matter. Since short mode is
17689       # case insensitive, let's make it lowercase to improve readability.
17690       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17691       # Now convert it back to Unix-stile (cygpath)
17692       input_path=`$CYGPATH -u "$shortmode_path"`
17693       new_path="$input_path"
17694     fi
17695   fi
17696 
17697   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17698   if test "x$test_cygdrive_prefix" = x; then
17699     # As a simple fix, exclude /usr/bin since it's not a real path.
17700     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
17701       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17702       # a path prefixed by /cygdrive for fixpath to work.
17703       new_path="$CYGWIN_ROOT_PATH$input_path"
17704     fi
17705   fi
17706 
17707   # remove trailing .exe if any
17708   new_path="${new_path/%.exe/}"
17709 
17710   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17711 
17712   # First separate the path from the arguments. This will split at the first
17713   # space.
17714   complete="$BUILD_CC"
17715   path="${complete%% *}"
17716   tmp="$complete EOL"
17717   arguments="${tmp#* }"
17718 
17719   # Input might be given as Windows format, start by converting to
17720   # unix format.
17721   new_path="$path"
17722 
17723   windows_path="$new_path"
17724   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17725     unix_path=`$CYGPATH -u "$windows_path"`
17726     new_path="$unix_path"
17727   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17728     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17729     new_path="$unix_path"
17730   fi
17731 
17732 
17733   # Now try to locate executable using which
17734   new_path=`$WHICH "$new_path" 2> /dev/null`
17735 
17736   if test "x$new_path" = x; then
17737     # Oops. Which didn't find the executable.
17738     # The splitting of arguments from the executable at a space might have been incorrect,
17739     # since paths with space are more likely in Windows. Give it another try with the whole
17740     # argument.
17741     path="$complete"
17742     arguments="EOL"
17743     new_path="$path"
17744 
17745   windows_path="$new_path"
17746   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17747     unix_path=`$CYGPATH -u "$windows_path"`
17748     new_path="$unix_path"
17749   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17750     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17751     new_path="$unix_path"
17752   fi
17753 
17754 
17755     new_path=`$WHICH "$new_path" 2> /dev/null`
17756 
17757     if test "x$new_path" = x; then
17758       # It's still not found. Now this is an unrecoverable error.
17759       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
17760 $as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
17761       has_space=`$ECHO "$complete" | $GREP " "`
17762       if test "x$has_space" != x; then
17763         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17764 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17765       fi
17766       as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
17767     fi
17768   fi
17769 
17770   # Now new_path has a complete unix path to the binary
17771   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
17772     # Keep paths in /bin as-is, but remove trailing .exe if any
17773     new_path="${new_path/%.exe/}"
17774     # Do not save /bin paths to all_fixpath_prefixes!
17775   else
17776     # Not in mixed or Windows style, start by that.
17777     new_path=`cmd //c echo $new_path`
17778 
17779   input_path="$new_path"
17780   # Check if we need to convert this using DOS-style short mode. If the path
17781   # contains just simple characters, use it. Otherwise (spaces, weird characters),
17782   # take no chances and rewrite it.
17783   # Note: m4 eats our [], so we need to use [ and ] instead.
17784   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17785   if test "x$has_forbidden_chars" != x; then
17786     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17787     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17788   fi
17789 
17790     # Output is in $new_path
17791 
17792   windows_path="$new_path"
17793   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17794     unix_path=`$CYGPATH -u "$windows_path"`
17795     new_path="$unix_path"
17796   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17797     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17798     new_path="$unix_path"
17799   fi
17800 
17801     # remove trailing .exe if any
17802     new_path="${new_path/%.exe/}"
17803 
17804     # Save the first 10 bytes of this path to the storage, so fixpath can work.
17805     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17806   fi
17807 
17808   else
17809     # We're on a posix platform. Hooray! :)
17810     # First separate the path from the arguments. This will split at the first
17811     # space.
17812     complete="$BUILD_CC"
17813     path="${complete%% *}"
17814     tmp="$complete EOL"
17815     arguments="${tmp#* }"
17816 
17817     # Cannot rely on the command "which" here since it doesn't always work.
17818     is_absolute_path=`$ECHO "$path" | $GREP ^/`
17819     if test -z "$is_absolute_path"; then
17820       # Path to executable is not absolute. Find it.
17821       IFS_save="$IFS"
17822       IFS=:
17823       for p in $PATH; do
17824         if test -f "$p/$path" && test -x "$p/$path"; then
17825           new_path="$p/$path"
17826           break
17827         fi
17828       done
17829       IFS="$IFS_save"
17830     else
17831       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving BUILD_CC (as $path) failed, using $path directly." >&5
17832 $as_echo "$as_me: Resolving BUILD_CC (as $path) failed, using $path directly." >&6;}
17833       new_path="$path"
17834     fi
17835 
17836     if test "x$new_path" = x; then
17837         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
17838 $as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
17839         has_space=`$ECHO "$complete" | $GREP " "`
17840         if test "x$has_space" != x; then
17841           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
17842 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
17843         fi
17844         as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
17845       fi
17846   fi
17847 
17848       # Now join together the path and the arguments once again
17849       if test "x$arguments" != xEOL; then
17850         new_complete="$new_path ${arguments% *}"
17851       else
17852         new_complete="$new_path"
17853       fi
17854 
17855   if test "x$complete" != "x$new_complete"; then
17856       BUILD_CC="$new_complete"
17857       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CC to \"$new_complete\"" >&5
17858 $as_echo "$as_me: Rewriting BUILD_CC to \"$new_complete\"" >&6;}
17859     fi
17860 
17861     for ac_prog in cl CC g++
17862 do
17863   # Extract the first word of "$ac_prog", so it can be a program name with args.
17864 set dummy $ac_prog; ac_word=$2
17865 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17866 $as_echo_n "checking for $ac_word... " >&6; }
17867 if test "${ac_cv_path_BUILD_CXX+set}" = set; then :
17868   $as_echo_n "(cached) " >&6
17869 else
17870   case $BUILD_CXX in
17871   [\\/]* | ?:[\\/]*)
17872   ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
17873   ;;
17874   *)
17875   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17876 for as_dir in $PATH
17877 do
17878   IFS=$as_save_IFS
17879   test -z "$as_dir" && as_dir=.
17880     for ac_exec_ext in '' $ac_executable_extensions; do
17881   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
17882     ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
17883     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17884     break 2
17885   fi
17886 done
17887   done
17888 IFS=$as_save_IFS
17889 
17890   ;;
17891 esac
17892 fi
17893 BUILD_CXX=$ac_cv_path_BUILD_CXX
17894 if test -n "$BUILD_CXX"; then
17895   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
17896 $as_echo "$BUILD_CXX" >&6; }
17897 else
17898   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17899 $as_echo "no" >&6; }
17900 fi
17901 
17902 
17903   test -n "$BUILD_CXX" && break
17904 done
17905 
17906 
17907   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17908 
17909   # First separate the path from the arguments. This will split at the first
17910   # space.
17911   complete="$BUILD_CXX"
17912   path="${complete%% *}"
17913   tmp="$complete EOL"
17914   arguments="${tmp#* }"
17915 
17916   # Input might be given as Windows format, start by converting to
17917   # unix format.
17918   new_path=`$CYGPATH -u "$path"`
17919 
17920   # Now try to locate executable using which
17921   new_path=`$WHICH "$new_path" 2> /dev/null`
17922   # bat and cmd files are not always considered executable in cygwin causing which
17923   # to not find them
17924   if test "x$new_path" = x \
17925            && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17926            && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17927     new_path=`$CYGPATH -u "$path"`
17928   fi
17929   if test "x$new_path" = x; then
17930     # Oops. Which didn't find the executable.
17931     # The splitting of arguments from the executable at a space might have been incorrect,
17932     # since paths with space are more likely in Windows. Give it another try with the whole
17933     # argument.
17934     path="$complete"
17935     arguments="EOL"
17936     new_path=`$CYGPATH -u "$path"`
17937     new_path=`$WHICH "$new_path" 2> /dev/null`
17938     # bat and cmd files are not always considered executable in cygwin causing which
17939     # to not find them
17940     if test "x$new_path" = x \
17941              && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17942              && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17943       new_path=`$CYGPATH -u "$path"`
17944     fi
17945     if test "x$new_path" = x; then
17946       # It's still not found. Now this is an unrecoverable error.
17947       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
17948 $as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
17949       has_space=`$ECHO "$complete" | $GREP " "`
17950       if test "x$has_space" != x; then
17951         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17952 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17953       fi
17954       as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
17955     fi
17956   fi
17957 
17958   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17959   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17960   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17961   # "foo.exe" is OK but "foo" is an error.
17962   #
17963   # This test is therefore slightly more accurate than "test -f" to check for file precense.
17964   # It is also a way to make sure we got the proper file name for the real test later on.
17965   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17966   if test "x$test_shortpath" = x; then
17967     # Short path failed, file does not exist as specified.
17968     # Try adding .exe or .cmd
17969     if test -f "${new_path}.exe"; then
17970        input_to_shortpath="${new_path}.exe"
17971     elif test -f "${new_path}.cmd"; then
17972        input_to_shortpath="${new_path}.cmd"
17973     else
17974       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&5
17975 $as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&6;}
17976       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
17977 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
17978       as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
17979     fi
17980   else
17981     input_to_shortpath="$new_path"
17982   fi
17983 
17984   # Call helper function which possibly converts this using DOS-style short mode.
17985   # If so, the updated path is stored in $new_path.
17986   new_path="$input_to_shortpath"
17987 
17988   input_path="$input_to_shortpath"
17989   # Check if we need to convert this using DOS-style short mode. If the path
17990   # contains just simple characters, use it. Otherwise (spaces, weird characters),
17991   # take no chances and rewrite it.
17992   # Note: m4 eats our [], so we need to use [ and ] instead.
17993   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17994   if test "x$has_forbidden_chars" != x; then
17995     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17996     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17997     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17998     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17999       # Going to short mode and back again did indeed matter. Since short mode is
18000       # case insensitive, let's make it lowercase to improve readability.
18001       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18002       # Now convert it back to Unix-stile (cygpath)
18003       input_path=`$CYGPATH -u "$shortmode_path"`
18004       new_path="$input_path"
18005     fi
18006   fi
18007 
18008   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18009   if test "x$test_cygdrive_prefix" = x; then
18010     # As a simple fix, exclude /usr/bin since it's not a real path.
18011     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18012       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18013       # a path prefixed by /cygdrive for fixpath to work.
18014       new_path="$CYGWIN_ROOT_PATH$input_path"
18015     fi
18016   fi
18017 
18018   # remove trailing .exe if any
18019   new_path="${new_path/%.exe/}"
18020 
18021   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18022 
18023   # First separate the path from the arguments. This will split at the first
18024   # space.
18025   complete="$BUILD_CXX"
18026   path="${complete%% *}"
18027   tmp="$complete EOL"
18028   arguments="${tmp#* }"
18029 
18030   # Input might be given as Windows format, start by converting to
18031   # unix format.
18032   new_path="$path"
18033 
18034   windows_path="$new_path"
18035   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18036     unix_path=`$CYGPATH -u "$windows_path"`
18037     new_path="$unix_path"
18038   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18039     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18040     new_path="$unix_path"
18041   fi
18042 
18043 
18044   # Now try to locate executable using which
18045   new_path=`$WHICH "$new_path" 2> /dev/null`
18046 
18047   if test "x$new_path" = x; then
18048     # Oops. Which didn't find the executable.
18049     # The splitting of arguments from the executable at a space might have been incorrect,
18050     # since paths with space are more likely in Windows. Give it another try with the whole
18051     # argument.
18052     path="$complete"
18053     arguments="EOL"
18054     new_path="$path"
18055 
18056   windows_path="$new_path"
18057   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18058     unix_path=`$CYGPATH -u "$windows_path"`
18059     new_path="$unix_path"
18060   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18061     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18062     new_path="$unix_path"
18063   fi
18064 
18065 
18066     new_path=`$WHICH "$new_path" 2> /dev/null`
18067 
18068     if test "x$new_path" = x; then
18069       # It's still not found. Now this is an unrecoverable error.
18070       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
18071 $as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
18072       has_space=`$ECHO "$complete" | $GREP " "`
18073       if test "x$has_space" != x; then
18074         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18075 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18076       fi
18077       as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
18078     fi
18079   fi
18080 
18081   # Now new_path has a complete unix path to the binary
18082   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18083     # Keep paths in /bin as-is, but remove trailing .exe if any
18084     new_path="${new_path/%.exe/}"
18085     # Do not save /bin paths to all_fixpath_prefixes!
18086   else
18087     # Not in mixed or Windows style, start by that.
18088     new_path=`cmd //c echo $new_path`
18089 
18090   input_path="$new_path"
18091   # Check if we need to convert this using DOS-style short mode. If the path
18092   # contains just simple characters, use it. Otherwise (spaces, weird characters),
18093   # take no chances and rewrite it.
18094   # Note: m4 eats our [], so we need to use [ and ] instead.
18095   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18096   if test "x$has_forbidden_chars" != x; then
18097     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18098     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18099   fi
18100 
18101     # Output is in $new_path
18102 
18103   windows_path="$new_path"
18104   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18105     unix_path=`$CYGPATH -u "$windows_path"`
18106     new_path="$unix_path"
18107   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18108     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18109     new_path="$unix_path"
18110   fi
18111 
18112     # remove trailing .exe if any
18113     new_path="${new_path/%.exe/}"
18114 
18115     # Save the first 10 bytes of this path to the storage, so fixpath can work.
18116     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18117   fi
18118 
18119   else
18120     # We're on a posix platform. Hooray! :)
18121     # First separate the path from the arguments. This will split at the first
18122     # space.
18123     complete="$BUILD_CXX"
18124     path="${complete%% *}"
18125     tmp="$complete EOL"
18126     arguments="${tmp#* }"
18127 
18128     # Cannot rely on the command "which" here since it doesn't always work.
18129     is_absolute_path=`$ECHO "$path" | $GREP ^/`
18130     if test -z "$is_absolute_path"; then
18131       # Path to executable is not absolute. Find it.
18132       IFS_save="$IFS"
18133       IFS=:
18134       for p in $PATH; do
18135         if test -f "$p/$path" && test -x "$p/$path"; then
18136           new_path="$p/$path"
18137           break
18138         fi
18139       done
18140       IFS="$IFS_save"
18141     else
18142       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving BUILD_CXX (as $path) failed, using $path directly." >&5
18143 $as_echo "$as_me: Resolving BUILD_CXX (as $path) failed, using $path directly." >&6;}
18144       new_path="$path"
18145     fi
18146 
18147     if test "x$new_path" = x; then
18148         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
18149 $as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
18150         has_space=`$ECHO "$complete" | $GREP " "`
18151         if test "x$has_space" != x; then
18152           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18153 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18154         fi
18155         as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
18156       fi
18157   fi
18158 
18159       # Now join together the path and the arguments once again
18160       if test "x$arguments" != xEOL; then
18161         new_complete="$new_path ${arguments% *}"
18162       else
18163         new_complete="$new_path"
18164       fi
18165 
18166   if test "x$complete" != "x$new_complete"; then
18167       BUILD_CXX="$new_complete"
18168       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CXX to \"$new_complete\"" >&5
18169 $as_echo "$as_me: Rewriting BUILD_CXX to \"$new_complete\"" >&6;}
18170     fi
18171 
18172     # Extract the first word of "ld", so it can be a program name with args.
18173 set dummy ld; ac_word=$2
18174 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18175 $as_echo_n "checking for $ac_word... " >&6; }
18176 if test "${ac_cv_path_BUILD_LD+set}" = set; then :
18177   $as_echo_n "(cached) " >&6
18178 else
18179   case $BUILD_LD in
18180   [\\/]* | ?:[\\/]*)
18181   ac_cv_path_BUILD_LD="$BUILD_LD" # Let the user override the test with a path.
18182   ;;
18183   *)
18184   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18185 for as_dir in $PATH
18186 do
18187   IFS=$as_save_IFS
18188   test -z "$as_dir" && as_dir=.
18189     for ac_exec_ext in '' $ac_executable_extensions; do
18190   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
18191     ac_cv_path_BUILD_LD="$as_dir/$ac_word$ac_exec_ext"
18192     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18193     break 2
18194   fi
18195 done
18196   done
18197 IFS=$as_save_IFS
18198 
18199   ;;
18200 esac
18201 fi
18202 BUILD_LD=$ac_cv_path_BUILD_LD
18203 if test -n "$BUILD_LD"; then
18204   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_LD" >&5
18205 $as_echo "$BUILD_LD" >&6; }
18206 else
18207   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18208 $as_echo "no" >&6; }
18209 fi
18210 
18211 
18212 
18213   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18214 
18215   # First separate the path from the arguments. This will split at the first
18216   # space.
18217   complete="$BUILD_LD"
18218   path="${complete%% *}"
18219   tmp="$complete EOL"
18220   arguments="${tmp#* }"
18221 
18222   # Input might be given as Windows format, start by converting to
18223   # unix format.
18224   new_path=`$CYGPATH -u "$path"`
18225 
18226   # Now try to locate executable using which
18227   new_path=`$WHICH "$new_path" 2> /dev/null`
18228   # bat and cmd files are not always considered executable in cygwin causing which
18229   # to not find them
18230   if test "x$new_path" = x \
18231            && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18232            && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18233     new_path=`$CYGPATH -u "$path"`
18234   fi
18235   if test "x$new_path" = x; then
18236     # Oops. Which didn't find the executable.
18237     # The splitting of arguments from the executable at a space might have been incorrect,
18238     # since paths with space are more likely in Windows. Give it another try with the whole
18239     # argument.
18240     path="$complete"
18241     arguments="EOL"
18242     new_path=`$CYGPATH -u "$path"`
18243     new_path=`$WHICH "$new_path" 2> /dev/null`
18244     # bat and cmd files are not always considered executable in cygwin causing which
18245     # to not find them
18246     if test "x$new_path" = x \
18247              && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18248              && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18249       new_path=`$CYGPATH -u "$path"`
18250     fi
18251     if test "x$new_path" = x; then
18252       # It's still not found. Now this is an unrecoverable error.
18253       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
18254 $as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
18255       has_space=`$ECHO "$complete" | $GREP " "`
18256       if test "x$has_space" != x; then
18257         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18258 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18259       fi
18260       as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
18261     fi
18262   fi
18263 
18264   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18265   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18266   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18267   # "foo.exe" is OK but "foo" is an error.
18268   #
18269   # This test is therefore slightly more accurate than "test -f" to check for file precense.
18270   # It is also a way to make sure we got the proper file name for the real test later on.
18271   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18272   if test "x$test_shortpath" = x; then
18273     # Short path failed, file does not exist as specified.
18274     # Try adding .exe or .cmd
18275     if test -f "${new_path}.exe"; then
18276        input_to_shortpath="${new_path}.exe"
18277     elif test -f "${new_path}.cmd"; then
18278        input_to_shortpath="${new_path}.cmd"
18279     else
18280       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$new_path\", is invalid." >&5
18281 $as_echo "$as_me: The path of BUILD_LD, which resolves as \"$new_path\", is invalid." >&6;}
18282       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18283 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18284       as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
18285     fi
18286   else
18287     input_to_shortpath="$new_path"
18288   fi
18289 
18290   # Call helper function which possibly converts this using DOS-style short mode.
18291   # If so, the updated path is stored in $new_path.
18292   new_path="$input_to_shortpath"
18293 
18294   input_path="$input_to_shortpath"
18295   # Check if we need to convert this using DOS-style short mode. If the path
18296   # contains just simple characters, use it. Otherwise (spaces, weird characters),
18297   # take no chances and rewrite it.
18298   # Note: m4 eats our [], so we need to use [ and ] instead.
18299   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18300   if test "x$has_forbidden_chars" != x; then
18301     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18302     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18303     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18304     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18305       # Going to short mode and back again did indeed matter. Since short mode is
18306       # case insensitive, let's make it lowercase to improve readability.
18307       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18308       # Now convert it back to Unix-stile (cygpath)
18309       input_path=`$CYGPATH -u "$shortmode_path"`
18310       new_path="$input_path"
18311     fi
18312   fi
18313 
18314   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18315   if test "x$test_cygdrive_prefix" = x; then
18316     # As a simple fix, exclude /usr/bin since it's not a real path.
18317     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18318       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18319       # a path prefixed by /cygdrive for fixpath to work.
18320       new_path="$CYGWIN_ROOT_PATH$input_path"
18321     fi
18322   fi
18323 
18324   # remove trailing .exe if any
18325   new_path="${new_path/%.exe/}"
18326 
18327   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18328 
18329   # First separate the path from the arguments. This will split at the first
18330   # space.
18331   complete="$BUILD_LD"
18332   path="${complete%% *}"
18333   tmp="$complete EOL"
18334   arguments="${tmp#* }"
18335 
18336   # Input might be given as Windows format, start by converting to
18337   # unix format.
18338   new_path="$path"
18339 
18340   windows_path="$new_path"
18341   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18342     unix_path=`$CYGPATH -u "$windows_path"`
18343     new_path="$unix_path"
18344   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18345     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18346     new_path="$unix_path"
18347   fi
18348 
18349 
18350   # Now try to locate executable using which
18351   new_path=`$WHICH "$new_path" 2> /dev/null`
18352 
18353   if test "x$new_path" = x; then
18354     # Oops. Which didn't find the executable.
18355     # The splitting of arguments from the executable at a space might have been incorrect,
18356     # since paths with space are more likely in Windows. Give it another try with the whole
18357     # argument.
18358     path="$complete"
18359     arguments="EOL"
18360     new_path="$path"
18361 
18362   windows_path="$new_path"
18363   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18364     unix_path=`$CYGPATH -u "$windows_path"`
18365     new_path="$unix_path"
18366   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18367     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18368     new_path="$unix_path"
18369   fi
18370 
18371 
18372     new_path=`$WHICH "$new_path" 2> /dev/null`
18373 
18374     if test "x$new_path" = x; then
18375       # It's still not found. Now this is an unrecoverable error.
18376       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
18377 $as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
18378       has_space=`$ECHO "$complete" | $GREP " "`
18379       if test "x$has_space" != x; then
18380         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18381 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18382       fi
18383       as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
18384     fi
18385   fi
18386 
18387   # Now new_path has a complete unix path to the binary
18388   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18389     # Keep paths in /bin as-is, but remove trailing .exe if any
18390     new_path="${new_path/%.exe/}"
18391     # Do not save /bin paths to all_fixpath_prefixes!
18392   else
18393     # Not in mixed or Windows style, start by that.
18394     new_path=`cmd //c echo $new_path`
18395 
18396   input_path="$new_path"
18397   # Check if we need to convert this using DOS-style short mode. If the path
18398   # contains just simple characters, use it. Otherwise (spaces, weird characters),
18399   # take no chances and rewrite it.
18400   # Note: m4 eats our [], so we need to use [ and ] instead.
18401   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18402   if test "x$has_forbidden_chars" != x; then
18403     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18404     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18405   fi
18406 
18407     # Output is in $new_path
18408 
18409   windows_path="$new_path"
18410   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18411     unix_path=`$CYGPATH -u "$windows_path"`
18412     new_path="$unix_path"
18413   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18414     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18415     new_path="$unix_path"
18416   fi
18417 
18418     # remove trailing .exe if any
18419     new_path="${new_path/%.exe/}"
18420 
18421     # Save the first 10 bytes of this path to the storage, so fixpath can work.
18422     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18423   fi
18424 
18425   else
18426     # We're on a posix platform. Hooray! :)
18427     # First separate the path from the arguments. This will split at the first
18428     # space.
18429     complete="$BUILD_LD"
18430     path="${complete%% *}"
18431     tmp="$complete EOL"
18432     arguments="${tmp#* }"
18433 
18434     # Cannot rely on the command "which" here since it doesn't always work.
18435     is_absolute_path=`$ECHO "$path" | $GREP ^/`
18436     if test -z "$is_absolute_path"; then
18437       # Path to executable is not absolute. Find it.
18438       IFS_save="$IFS"
18439       IFS=:
18440       for p in $PATH; do
18441         if test -f "$p/$path" && test -x "$p/$path"; then
18442           new_path="$p/$path"
18443           break
18444         fi
18445       done
18446       IFS="$IFS_save"
18447     else
18448       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving BUILD_LD (as $path) failed, using $path directly." >&5
18449 $as_echo "$as_me: Resolving BUILD_LD (as $path) failed, using $path directly." >&6;}
18450       new_path="$path"
18451     fi
18452 
18453     if test "x$new_path" = x; then
18454         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
18455 $as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
18456         has_space=`$ECHO "$complete" | $GREP " "`
18457         if test "x$has_space" != x; then
18458           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18459 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18460         fi
18461         as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
18462       fi
18463   fi
18464 
18465       # Now join together the path and the arguments once again
18466       if test "x$arguments" != xEOL; then
18467         new_complete="$new_path ${arguments% *}"
18468       else
18469         new_complete="$new_path"
18470       fi
18471 
18472   if test "x$complete" != "x$new_complete"; then
18473       BUILD_LD="$new_complete"
18474       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_LD to \"$new_complete\"" >&5
18475 $as_echo "$as_me: Rewriting BUILD_LD to \"$new_complete\"" >&6;}
18476     fi
18477 
18478 fi
18479 
18480 
18481 
18482 
18483 # If a devkit is found on the builddeps server, then prepend its path to the
18484 # PATH variable. If there are cross compilers available in the devkit, these
18485 # will be found by AC_PROG_CC et al.
18486 DEVKIT=
18487 
18488 
18489     if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
18490         # Source the builddeps file again, to make sure it uses the latest variables!
18491         . $builddepsfile
18492         # Look for a target and build machine specific resource!
18493         eval resource=\${builddep_devkit_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
18494         if test "x$resource" = x; then
18495             # Ok, lets instead look for a target specific resource
18496             eval resource=\${builddep_devkit_TARGET_${rewritten_target_var}}
18497         fi
18498         if test "x$resource" = x; then
18499             # Ok, lets instead look for a build specific resource
18500             eval resource=\${builddep_devkit_BUILD_${rewritten_build_var}}
18501         fi
18502         if test "x$resource" = x; then
18503             # Ok, lets instead look for a generic resource
18504             # (The devkit comes from M4 and not the shell, thus no need for eval here.)
18505             resource=${builddep_devkit}
18506         fi
18507         if test "x$resource" != x; then
18508             { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for devkit" >&5
18509 $as_echo "$as_me: Using builddeps $resource for devkit" >&6;}
18510             # If the resource in the builddeps.conf file is an existing directory,
18511             # for example /java/linux/cups
18512             if test -d ${resource}; then
18513                depdir=${resource}
18514             else
18515 
18516 # devkit is for example mymodule
18517 # $resource is for example libs/general/libmymod_1_2_3.zip
18518 # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
18519 # $with_builddeps_dir is for example /localhome/builddeps
18520 # depdir is the name of the variable into which we store the depdir, eg MYMOD
18521 # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
18522 # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
18523     filename=`basename $resource`
18524     filebase=`echo $filename | sed 's/\.[^\.]*$//'`
18525     filebase=${filename%%.*}
18526     extension=${filename#*.}
18527     installdir=$with_builddeps_dir/$filebase
18528     if test ! -f $installdir/$filename.unpacked; then
18529         { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency devkit from $with_builddeps_server/$resource and installing into $installdir" >&5
18530 $as_echo "$as_me: Downloading build dependency devkit from $with_builddeps_server/$resource and installing into $installdir" >&6;}
18531         if test ! -d $installdir; then
18532             mkdir -p $installdir
18533         fi
18534         if test ! -d $installdir; then
18535             as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
18536         fi
18537         tmpfile=`mktemp $installdir/devkit.XXXXXXXXX`
18538         touch $tmpfile
18539         if test ! -f $tmpfile; then
18540             as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
18541         fi
18542 
18543     # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
18544     # $tmpfile is the local file name for the downloaded file.
18545     VALID_TOOL=no
18546     if test "x$BDEPS_FTP" = xwget; then
18547        VALID_TOOL=yes
18548        wget -O $tmpfile $with_builddeps_server/$resource
18549     fi
18550     if test "x$BDEPS_FTP" = xlftp; then
18551        VALID_TOOL=yes
18552        lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
18553     fi
18554     if test "x$BDEPS_FTP" = xftp; then
18555         VALID_TOOL=yes
18556         FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
18557         FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
18558         FTPUSERPWD=${FTPSERVER%%@*}
18559         if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
18560             FTPUSER=${userpwd%%:*}
18561             FTPPWD=${userpwd#*@}
18562             FTPSERVER=${FTPSERVER#*@}
18563         else
18564             FTPUSER=ftp
18565             FTPPWD=ftp
18566         fi
18567         # the "pass" command does not work on some
18568         # ftp clients (read ftp.exe) but if it works,
18569         # passive mode is better!
18570         (\
18571             echo "user $FTPUSER $FTPPWD"        ;\
18572             echo "pass"                         ;\
18573             echo "bin"                          ;\
18574             echo "get $FTPPATH $tmpfile"              ;\
18575         ) | ftp -in $FTPSERVER
18576     fi
18577     if test "x$VALID_TOOL" != xyes; then
18578        as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
18579     fi
18580 
18581         mv $tmpfile $installdir/$filename
18582         if test ! -s $installdir/$filename; then
18583             as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
18584         fi
18585         case "$extension" in
18586             zip)  echo "Unzipping $installdir/$filename..."
18587                (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
18588             ;;
18589             tar.gz) echo "Untaring $installdir/$filename..."
18590                (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
18591             ;;
18592             tgz) echo "Untaring $installdir/$filename..."
18593                (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
18594             ;;
18595             *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
18596             ;;
18597         esac
18598     fi
18599     if test -f $installdir/$filename.unpacked; then
18600         depdir=$installdir
18601     fi
18602 
18603             fi
18604             # Source the builddeps file again, because in the previous command, the depdir
18605             # was updated to point at the current build dependency install directory.
18606             . $builddepsfile
18607             # Now extract variables from the builddeps.conf files.
18608             theroot=${builddep_devkit_ROOT}
18609             thecflags=${builddep_devkit_CFLAGS}
18610             thelibs=${builddep_devkit_LIBS}
18611             if test "x$depdir" = x; then
18612                 as_fn_error $? "Could not download build dependency devkit" "$LINENO" 5
18613             fi
18614             DEVKIT=$depdir
18615             if test "x$theroot" != x; then
18616                DEVKIT="$theroot"
18617             fi
18618             if test "x$thecflags" != x; then
18619                DEVKIT_CFLAGS="$thecflags"
18620             fi
18621             if test "x$thelibs" != x; then
18622                DEVKIT_LIBS="$thelibs"
18623             fi
18624             # Found devkit
18625                      PATH="$DEVKIT/bin:$PATH"
18626                      SYS_ROOT="$DEVKIT/${rewritten_target}/sys-root"
18627                      if test "x$x_includes" = "xNONE"; then
18628                          x_includes="$SYS_ROOT/usr/include/X11"
18629                      fi
18630                      if test "x$x_libraries" = "xNONE"; then
18631                          x_libraries="$SYS_ROOT/usr/lib"
18632                      fi
18633 
18634 
18635         fi
18636 
18637     fi
18638 
18639 
18640 if test "x$SYS_ROOT" != "x/" ; then
18641     CFLAGS="--sysroot=$SYS_ROOT $CFLAGS"
18642     CXXFLAGS="--sysroot=$SYS_ROOT $CXXFLAGS"
18643     OBJCFLAGS="--sysroot=$SYS_ROOT $OBJCFLAGS"
18644     OBJCXXFLAGS="--sysroot=$SYS_ROOT $OBJCFLAGS"
18645     CPPFLAGS="--sysroot=$SYS_ROOT $CPPFLAGS"
18646     LDFLAGS="--sysroot=$SYS_ROOT $LDFLAGS"
18647 fi
18648 
18649 # Store the CFLAGS etal passed to the configure script.
18650 ORG_CFLAGS="$CFLAGS"
18651 ORG_CXXFLAGS="$CXXFLAGS"
18652 ORG_OBJCFLAGS="$OBJCFLAGS"
18653 
18654 # autoconf magic only relies on PATH, so update it if tools dir is specified
18655 OLD_PATH="$PATH"
18656 if test "x$TOOLS_DIR" != x; then
18657   PATH=$TOOLS_DIR:$PATH
18658 fi
18659 
18660 
18661 ### Locate C compiler (CC)
18662 
18663 # On windows, only cl.exe is supported.
18664 # On Solaris, cc is preferred to gcc.
18665 # Elsewhere, gcc is preferred to cc.
18666 
18667 if test "x$CC" != x; then
18668   COMPILER_CHECK_LIST="$CC"
18669 elif test "x$OPENJDK_TARGET_OS" = "xwindows"; then
18670   COMPILER_CHECK_LIST="cl"
18671 elif test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
18672   COMPILER_CHECK_LIST="cc gcc"
18673 else
18674   COMPILER_CHECK_LIST="gcc cc"
18675 fi
18676 
18677 
18678   COMPILER_NAME=C
18679 
18680   CC=
18681   # If TOOLS_DIR is set, check for all compiler names in there first
18682   # before checking the rest of the PATH.
18683   if test -n "$TOOLS_DIR"; then
18684     PATH_save="$PATH"
18685     PATH="$TOOLS_DIR"
18686     for ac_prog in $COMPILER_CHECK_LIST
18687 do
18688   # Extract the first word of "$ac_prog", so it can be a program name with args.
18689 set dummy $ac_prog; ac_word=$2
18690 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18691 $as_echo_n "checking for $ac_word... " >&6; }
18692 if test "${ac_cv_path_TOOLS_DIR_CC+set}" = set; then :
18693   $as_echo_n "(cached) " >&6
18694 else
18695   case $TOOLS_DIR_CC in
18696   [\\/]* | ?:[\\/]*)
18697   ac_cv_path_TOOLS_DIR_CC="$TOOLS_DIR_CC" # Let the user override the test with a path.
18698   ;;
18699   *)
18700   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18701 for as_dir in $PATH
18702 do
18703   IFS=$as_save_IFS
18704   test -z "$as_dir" && as_dir=.
18705     for ac_exec_ext in '' $ac_executable_extensions; do
18706   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
18707     ac_cv_path_TOOLS_DIR_CC="$as_dir/$ac_word$ac_exec_ext"
18708     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18709     break 2
18710   fi
18711 done
18712   done
18713 IFS=$as_save_IFS
18714 
18715   ;;
18716 esac
18717 fi
18718 TOOLS_DIR_CC=$ac_cv_path_TOOLS_DIR_CC
18719 if test -n "$TOOLS_DIR_CC"; then
18720   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLS_DIR_CC" >&5
18721 $as_echo "$TOOLS_DIR_CC" >&6; }
18722 else
18723   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18724 $as_echo "no" >&6; }
18725 fi
18726 
18727 
18728   test -n "$TOOLS_DIR_CC" && break
18729 done
18730 
18731     CC=$TOOLS_DIR_CC
18732     PATH="$PATH_save"
18733   fi
18734 
18735   # AC_PATH_PROGS can't be run multiple times with the same variable,
18736   # so create a new name for this run.
18737   if test "x$CC" = x; then
18738     for ac_prog in $COMPILER_CHECK_LIST
18739 do
18740   # Extract the first word of "$ac_prog", so it can be a program name with args.
18741 set dummy $ac_prog; ac_word=$2
18742 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18743 $as_echo_n "checking for $ac_word... " >&6; }
18744 if test "${ac_cv_path_POTENTIAL_CC+set}" = set; then :
18745   $as_echo_n "(cached) " >&6
18746 else
18747   case $POTENTIAL_CC in
18748   [\\/]* | ?:[\\/]*)
18749   ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
18750   ;;
18751   *)
18752   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18753 for as_dir in $PATH
18754 do
18755   IFS=$as_save_IFS
18756   test -z "$as_dir" && as_dir=.
18757     for ac_exec_ext in '' $ac_executable_extensions; do
18758   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
18759     ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
18760     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18761     break 2
18762   fi
18763 done
18764   done
18765 IFS=$as_save_IFS
18766 
18767   ;;
18768 esac
18769 fi
18770 POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
18771 if test -n "$POTENTIAL_CC"; then
18772   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
18773 $as_echo "$POTENTIAL_CC" >&6; }
18774 else
18775   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18776 $as_echo "no" >&6; }
18777 fi
18778 
18779 
18780   test -n "$POTENTIAL_CC" && break
18781 done
18782 
18783     CC=$POTENTIAL_CC
18784   fi
18785 
18786   if test "x$CC" = x; then
18787 
18788     # Print a helpful message on how to acquire the necessary build dependency.
18789     # devkit is the help tag: freetyp2, cups, pulse, alsa etc
18790     MISSING_DEPENDENCY=devkit
18791     PKGHANDLER_COMMAND=
18792 
18793     case $PKGHANDLER in
18794         apt-get)
18795                 apt_help     $MISSING_DEPENDENCY ;;
18796     yum)
18797                 yum_help     $MISSING_DEPENDENCY ;;
18798         port)
18799                 port_help    $MISSING_DEPENDENCY ;;
18800         pkgutil)
18801                 pkgutil_help $MISSING_DEPENDENCY ;;
18802         pkgadd)
18803                 pkgadd_help  $MISSING_DEPENDENCY ;;
18804     * )
18805       break ;;
18806     esac
18807 
18808     if test "x$PKGHANDLER_COMMAND" != x; then
18809         HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
18810     fi
18811 
18812       as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
18813   fi
18814 
18815   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18816 
18817   # First separate the path from the arguments. This will split at the first
18818   # space.
18819   complete="$CC"
18820   path="${complete%% *}"
18821   tmp="$complete EOL"
18822   arguments="${tmp#* }"
18823 
18824   # Input might be given as Windows format, start by converting to
18825   # unix format.
18826   new_path=`$CYGPATH -u "$path"`
18827 
18828   # Now try to locate executable using which
18829   new_path=`$WHICH "$new_path" 2> /dev/null`
18830   # bat and cmd files are not always considered executable in cygwin causing which
18831   # to not find them
18832   if test "x$new_path" = x \
18833            && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18834            && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18835     new_path=`$CYGPATH -u "$path"`
18836   fi
18837   if test "x$new_path" = x; then
18838     # Oops. Which didn't find the executable.
18839     # The splitting of arguments from the executable at a space might have been incorrect,
18840     # since paths with space are more likely in Windows. Give it another try with the whole
18841     # argument.
18842     path="$complete"
18843     arguments="EOL"
18844     new_path=`$CYGPATH -u "$path"`
18845     new_path=`$WHICH "$new_path" 2> /dev/null`
18846     # bat and cmd files are not always considered executable in cygwin causing which
18847     # to not find them
18848     if test "x$new_path" = x \
18849              && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18850              && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18851       new_path=`$CYGPATH -u "$path"`
18852     fi
18853     if test "x$new_path" = x; then
18854       # It's still not found. Now this is an unrecoverable error.
18855       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
18856 $as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
18857       has_space=`$ECHO "$complete" | $GREP " "`
18858       if test "x$has_space" != x; then
18859         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18860 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18861       fi
18862       as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
18863     fi
18864   fi
18865 
18866   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18867   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18868   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18869   # "foo.exe" is OK but "foo" is an error.
18870   #
18871   # This test is therefore slightly more accurate than "test -f" to check for file precense.
18872   # It is also a way to make sure we got the proper file name for the real test later on.
18873   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18874   if test "x$test_shortpath" = x; then
18875     # Short path failed, file does not exist as specified.
18876     # Try adding .exe or .cmd
18877     if test -f "${new_path}.exe"; then
18878        input_to_shortpath="${new_path}.exe"
18879     elif test -f "${new_path}.cmd"; then
18880        input_to_shortpath="${new_path}.cmd"
18881     else
18882       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$new_path\", is invalid." >&5
18883 $as_echo "$as_me: The path of CC, which resolves as \"$new_path\", is invalid." >&6;}
18884       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18885 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18886       as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
18887     fi
18888   else
18889     input_to_shortpath="$new_path"
18890   fi
18891 
18892   # Call helper function which possibly converts this using DOS-style short mode.
18893   # If so, the updated path is stored in $new_path.
18894   new_path="$input_to_shortpath"
18895 
18896   input_path="$input_to_shortpath"
18897   # Check if we need to convert this using DOS-style short mode. If the path
18898   # contains just simple characters, use it. Otherwise (spaces, weird characters),
18899   # take no chances and rewrite it.
18900   # Note: m4 eats our [], so we need to use [ and ] instead.
18901   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18902   if test "x$has_forbidden_chars" != x; then
18903     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18904     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18905     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18906     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18907       # Going to short mode and back again did indeed matter. Since short mode is
18908       # case insensitive, let's make it lowercase to improve readability.
18909       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18910       # Now convert it back to Unix-stile (cygpath)
18911       input_path=`$CYGPATH -u "$shortmode_path"`
18912       new_path="$input_path"
18913     fi
18914   fi
18915 
18916   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18917   if test "x$test_cygdrive_prefix" = x; then
18918     # As a simple fix, exclude /usr/bin since it's not a real path.
18919     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18920       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18921       # a path prefixed by /cygdrive for fixpath to work.
18922       new_path="$CYGWIN_ROOT_PATH$input_path"
18923     fi
18924   fi
18925 
18926   # remove trailing .exe if any
18927   new_path="${new_path/%.exe/}"
18928 
18929   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18930 
18931   # First separate the path from the arguments. This will split at the first
18932   # space.
18933   complete="$CC"
18934   path="${complete%% *}"
18935   tmp="$complete EOL"
18936   arguments="${tmp#* }"
18937 
18938   # Input might be given as Windows format, start by converting to
18939   # unix format.
18940   new_path="$path"
18941 
18942   windows_path="$new_path"
18943   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18944     unix_path=`$CYGPATH -u "$windows_path"`
18945     new_path="$unix_path"
18946   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18947     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18948     new_path="$unix_path"
18949   fi
18950 
18951 
18952   # Now try to locate executable using which
18953   new_path=`$WHICH "$new_path" 2> /dev/null`
18954 
18955   if test "x$new_path" = x; then
18956     # Oops. Which didn't find the executable.
18957     # The splitting of arguments from the executable at a space might have been incorrect,
18958     # since paths with space are more likely in Windows. Give it another try with the whole
18959     # argument.
18960     path="$complete"
18961     arguments="EOL"
18962     new_path="$path"
18963 
18964   windows_path="$new_path"
18965   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18966     unix_path=`$CYGPATH -u "$windows_path"`
18967     new_path="$unix_path"
18968   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18969     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18970     new_path="$unix_path"
18971   fi
18972 
18973 
18974     new_path=`$WHICH "$new_path" 2> /dev/null`
18975 
18976     if test "x$new_path" = x; then
18977       # It's still not found. Now this is an unrecoverable error.
18978       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
18979 $as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
18980       has_space=`$ECHO "$complete" | $GREP " "`
18981       if test "x$has_space" != x; then
18982         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18983 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18984       fi
18985       as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
18986     fi
18987   fi
18988 
18989   # Now new_path has a complete unix path to the binary
18990   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18991     # Keep paths in /bin as-is, but remove trailing .exe if any
18992     new_path="${new_path/%.exe/}"
18993     # Do not save /bin paths to all_fixpath_prefixes!
18994   else
18995     # Not in mixed or Windows style, start by that.
18996     new_path=`cmd //c echo $new_path`
18997 
18998   input_path="$new_path"
18999   # Check if we need to convert this using DOS-style short mode. If the path
19000   # contains just simple characters, use it. Otherwise (spaces, weird characters),
19001   # take no chances and rewrite it.
19002   # Note: m4 eats our [], so we need to use [ and ] instead.
19003   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19004   if test "x$has_forbidden_chars" != x; then
19005     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19006     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19007   fi
19008 
19009     # Output is in $new_path
19010 
19011   windows_path="$new_path"
19012   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19013     unix_path=`$CYGPATH -u "$windows_path"`
19014     new_path="$unix_path"
19015   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19016     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19017     new_path="$unix_path"
19018   fi
19019 
19020     # remove trailing .exe if any
19021     new_path="${new_path/%.exe/}"
19022 
19023     # Save the first 10 bytes of this path to the storage, so fixpath can work.
19024     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19025   fi
19026 
19027   else
19028     # We're on a posix platform. Hooray! :)
19029     # First separate the path from the arguments. This will split at the first
19030     # space.
19031     complete="$CC"
19032     path="${complete%% *}"
19033     tmp="$complete EOL"
19034     arguments="${tmp#* }"
19035 
19036     # Cannot rely on the command "which" here since it doesn't always work.
19037     is_absolute_path=`$ECHO "$path" | $GREP ^/`
19038     if test -z "$is_absolute_path"; then
19039       # Path to executable is not absolute. Find it.
19040       IFS_save="$IFS"
19041       IFS=:
19042       for p in $PATH; do
19043         if test -f "$p/$path" && test -x "$p/$path"; then
19044           new_path="$p/$path"
19045           break
19046         fi
19047       done
19048       IFS="$IFS_save"
19049     else
19050       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CC (as $path) failed, using $path directly." >&5
19051 $as_echo "$as_me: Resolving CC (as $path) failed, using $path directly." >&6;}
19052       new_path="$path"
19053     fi
19054 
19055     if test "x$new_path" = x; then
19056         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
19057 $as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
19058         has_space=`$ECHO "$complete" | $GREP " "`
19059         if test "x$has_space" != x; then
19060           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19061 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19062         fi
19063         as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
19064       fi
19065   fi
19066 
19067       # Now join together the path and the arguments once again
19068       if test "x$arguments" != xEOL; then
19069         new_complete="$new_path ${arguments% *}"
19070       else
19071         new_complete="$new_path"
19072       fi
19073 
19074   if test "x$complete" != "x$new_complete"; then
19075       CC="$new_complete"
19076       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CC to \"$new_complete\"" >&5
19077 $as_echo "$as_me: Rewriting CC to \"$new_complete\"" >&6;}
19078     fi
19079 
19080   { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CC" >&5
19081 $as_echo_n "checking resolved symbolic links for CC... " >&6; }
19082   TEST_COMPILER="$CC"
19083 
19084     if test "x$OPENJDK_BUILD_OS" != xwindows; then
19085         # Follow a chain of symbolic links. Use readlink
19086         # where it exists, else fall back to horribly
19087         # complicated shell code.
19088         if test "x$READLINK_TESTED" != yes; then
19089             # On MacOSX there is a readlink tool with a different
19090             # purpose than the GNU readlink tool. Check the found readlink.
19091             ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
19092             if test "x$ISGNU" = x; then
19093                  # A readlink that we do not know how to use.
19094                  # Are there other non-GNU readlinks out there?
19095                  READLINK_TESTED=yes
19096                  READLINK=
19097             fi
19098         fi
19099 
19100         if test "x$READLINK" != x; then
19101             TEST_COMPILER=`$READLINK -f $TEST_COMPILER`
19102         else
19103             # Save the current directory for restoring afterwards
19104             STARTDIR=$PWD
19105             COUNTER=0
19106             sym_link_dir=`$DIRNAME $TEST_COMPILER`
19107             sym_link_file=`$BASENAME $TEST_COMPILER`
19108             # Use the system pwd and not the shell builtin to resolve directory symlinks
19109             cd $sym_link_dir
19110             cd `$THEPWDCMD`
19111             sym_link_dir=`$THEPWDCMD`
19112             # Resolve file symlinks
19113             while test $COUNTER -lt 20; do
19114                 ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
19115                 if test "x$ISLINK" == x; then
19116                     # This is not a symbolic link! We are done!
19117                     break
19118                 fi
19119                 # Again resolve directory symlinks since the target of the just found
19120                 # link could be in a different directory
19121                 cd `$DIRNAME $ISLINK`
19122                 sym_link_dir=`$THEPWDCMD`
19123                 sym_link_file=`$BASENAME $ISLINK`
19124                 let COUNTER=COUNTER+1
19125             done
19126             cd $STARTDIR
19127             TEST_COMPILER=$sym_link_dir/$sym_link_file
19128         fi
19129     fi
19130 
19131   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_COMPILER" >&5
19132 $as_echo "$TEST_COMPILER" >&6; }
19133   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CC is disguised ccache" >&5
19134 $as_echo_n "checking if CC is disguised ccache... " >&6; }
19135 
19136   COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"`
19137   if test "x$COMPILER_BASENAME" = "xccache"; then
19138     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5
19139 $as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; }
19140     # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache.
19141     # We want to control ccache invocation ourselves, so ignore this cc and try
19142     # searching again.
19143 
19144     # Remove the path to the fake ccache cc from the PATH
19145     RETRY_COMPILER_SAVED_PATH="$PATH"
19146     COMPILER_DIRNAME=`$DIRNAME $CC`
19147     PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`"
19148 
19149     # Try again looking for our compiler
19150     if test -n "$ac_tool_prefix"; then
19151   for ac_prog in $COMPILER_CHECK_LIST
19152   do
19153     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
19154 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
19155 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19156 $as_echo_n "checking for $ac_word... " >&6; }
19157 if test "${ac_cv_prog_PROPER_COMPILER_CC+set}" = set; then :
19158   $as_echo_n "(cached) " >&6
19159 else
19160   if test -n "$PROPER_COMPILER_CC"; then
19161   ac_cv_prog_PROPER_COMPILER_CC="$PROPER_COMPILER_CC" # Let the user override the test.
19162 else
19163 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19164 for as_dir in $PATH
19165 do
19166   IFS=$as_save_IFS
19167   test -z "$as_dir" && as_dir=.
19168     for ac_exec_ext in '' $ac_executable_extensions; do
19169   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
19170     ac_cv_prog_PROPER_COMPILER_CC="$ac_tool_prefix$ac_prog"
19171     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19172     break 2
19173   fi
19174 done
19175   done
19176 IFS=$as_save_IFS
19177 
19178 fi
19179 fi
19180 PROPER_COMPILER_CC=$ac_cv_prog_PROPER_COMPILER_CC
19181 if test -n "$PROPER_COMPILER_CC"; then
19182   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5
19183 $as_echo "$PROPER_COMPILER_CC" >&6; }
19184 else
19185   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19186 $as_echo "no" >&6; }
19187 fi
19188 
19189 
19190     test -n "$PROPER_COMPILER_CC" && break
19191   done
19192 fi
19193 if test -z "$PROPER_COMPILER_CC"; then
19194   ac_ct_PROPER_COMPILER_CC=$PROPER_COMPILER_CC
19195   for ac_prog in $COMPILER_CHECK_LIST
19196 do
19197   # Extract the first word of "$ac_prog", so it can be a program name with args.
19198 set dummy $ac_prog; ac_word=$2
19199 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19200 $as_echo_n "checking for $ac_word... " >&6; }
19201 if test "${ac_cv_prog_ac_ct_PROPER_COMPILER_CC+set}" = set; then :
19202   $as_echo_n "(cached) " >&6
19203 else
19204   if test -n "$ac_ct_PROPER_COMPILER_CC"; then
19205   ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_ct_PROPER_COMPILER_CC" # Let the user override the test.
19206 else
19207 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19208 for as_dir in $PATH
19209 do
19210   IFS=$as_save_IFS
19211   test -z "$as_dir" && as_dir=.
19212     for ac_exec_ext in '' $ac_executable_extensions; do
19213   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
19214     ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_prog"
19215     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19216     break 2
19217   fi
19218 done
19219   done
19220 IFS=$as_save_IFS
19221 
19222 fi
19223 fi
19224 ac_ct_PROPER_COMPILER_CC=$ac_cv_prog_ac_ct_PROPER_COMPILER_CC
19225 if test -n "$ac_ct_PROPER_COMPILER_CC"; then
19226   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CC" >&5
19227 $as_echo "$ac_ct_PROPER_COMPILER_CC" >&6; }
19228 else
19229   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19230 $as_echo "no" >&6; }
19231 fi
19232 
19233 
19234   test -n "$ac_ct_PROPER_COMPILER_CC" && break
19235 done
19236 
19237   if test "x$ac_ct_PROPER_COMPILER_CC" = x; then
19238     PROPER_COMPILER_CC=""
19239   else
19240     case $cross_compiling:$ac_tool_warned in
19241 yes:)
19242 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
19243 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
19244 ac_tool_warned=yes ;;
19245 esac
19246     PROPER_COMPILER_CC=$ac_ct_PROPER_COMPILER_CC
19247   fi
19248 fi
19249 
19250 
19251   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19252 
19253   # First separate the path from the arguments. This will split at the first
19254   # space.
19255   complete="$PROPER_COMPILER_CC"
19256   path="${complete%% *}"
19257   tmp="$complete EOL"
19258   arguments="${tmp#* }"
19259 
19260   # Input might be given as Windows format, start by converting to
19261   # unix format.
19262   new_path=`$CYGPATH -u "$path"`
19263 
19264   # Now try to locate executable using which
19265   new_path=`$WHICH "$new_path" 2> /dev/null`
19266   # bat and cmd files are not always considered executable in cygwin causing which
19267   # to not find them
19268   if test "x$new_path" = x \
19269            && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19270            && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19271     new_path=`$CYGPATH -u "$path"`
19272   fi
19273   if test "x$new_path" = x; then
19274     # Oops. Which didn't find the executable.
19275     # The splitting of arguments from the executable at a space might have been incorrect,
19276     # since paths with space are more likely in Windows. Give it another try with the whole
19277     # argument.
19278     path="$complete"
19279     arguments="EOL"
19280     new_path=`$CYGPATH -u "$path"`
19281     new_path=`$WHICH "$new_path" 2> /dev/null`
19282     # bat and cmd files are not always considered executable in cygwin causing which
19283     # to not find them
19284     if test "x$new_path" = x \
19285              && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19286              && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19287       new_path=`$CYGPATH -u "$path"`
19288     fi
19289     if test "x$new_path" = x; then
19290       # It's still not found. Now this is an unrecoverable error.
19291       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
19292 $as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
19293       has_space=`$ECHO "$complete" | $GREP " "`
19294       if test "x$has_space" != x; then
19295         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19296 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19297       fi
19298       as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
19299     fi
19300   fi
19301 
19302   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19303   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19304   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19305   # "foo.exe" is OK but "foo" is an error.
19306   #
19307   # This test is therefore slightly more accurate than "test -f" to check for file precense.
19308   # It is also a way to make sure we got the proper file name for the real test later on.
19309   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19310   if test "x$test_shortpath" = x; then
19311     # Short path failed, file does not exist as specified.
19312     # Try adding .exe or .cmd
19313     if test -f "${new_path}.exe"; then
19314        input_to_shortpath="${new_path}.exe"
19315     elif test -f "${new_path}.cmd"; then
19316        input_to_shortpath="${new_path}.cmd"
19317     else
19318       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&5
19319 $as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&6;}
19320       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19321 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19322       as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
19323     fi
19324   else
19325     input_to_shortpath="$new_path"
19326   fi
19327 
19328   # Call helper function which possibly converts this using DOS-style short mode.
19329   # If so, the updated path is stored in $new_path.
19330   new_path="$input_to_shortpath"
19331 
19332   input_path="$input_to_shortpath"
19333   # Check if we need to convert this using DOS-style short mode. If the path
19334   # contains just simple characters, use it. Otherwise (spaces, weird characters),
19335   # take no chances and rewrite it.
19336   # Note: m4 eats our [], so we need to use [ and ] instead.
19337   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19338   if test "x$has_forbidden_chars" != x; then
19339     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19340     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19341     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19342     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19343       # Going to short mode and back again did indeed matter. Since short mode is
19344       # case insensitive, let's make it lowercase to improve readability.
19345       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19346       # Now convert it back to Unix-stile (cygpath)
19347       input_path=`$CYGPATH -u "$shortmode_path"`
19348       new_path="$input_path"
19349     fi
19350   fi
19351 
19352   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19353   if test "x$test_cygdrive_prefix" = x; then
19354     # As a simple fix, exclude /usr/bin since it's not a real path.
19355     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19356       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19357       # a path prefixed by /cygdrive for fixpath to work.
19358       new_path="$CYGWIN_ROOT_PATH$input_path"
19359     fi
19360   fi
19361 
19362   # remove trailing .exe if any
19363   new_path="${new_path/%.exe/}"
19364 
19365   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19366 
19367   # First separate the path from the arguments. This will split at the first
19368   # space.
19369   complete="$PROPER_COMPILER_CC"
19370   path="${complete%% *}"
19371   tmp="$complete EOL"
19372   arguments="${tmp#* }"
19373 
19374   # Input might be given as Windows format, start by converting to
19375   # unix format.
19376   new_path="$path"
19377 
19378   windows_path="$new_path"
19379   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19380     unix_path=`$CYGPATH -u "$windows_path"`
19381     new_path="$unix_path"
19382   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19383     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19384     new_path="$unix_path"
19385   fi
19386 
19387 
19388   # Now try to locate executable using which
19389   new_path=`$WHICH "$new_path" 2> /dev/null`
19390 
19391   if test "x$new_path" = x; then
19392     # Oops. Which didn't find the executable.
19393     # The splitting of arguments from the executable at a space might have been incorrect,
19394     # since paths with space are more likely in Windows. Give it another try with the whole
19395     # argument.
19396     path="$complete"
19397     arguments="EOL"
19398     new_path="$path"
19399 
19400   windows_path="$new_path"
19401   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19402     unix_path=`$CYGPATH -u "$windows_path"`
19403     new_path="$unix_path"
19404   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19405     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19406     new_path="$unix_path"
19407   fi
19408 
19409 
19410     new_path=`$WHICH "$new_path" 2> /dev/null`
19411 
19412     if test "x$new_path" = x; then
19413       # It's still not found. Now this is an unrecoverable error.
19414       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
19415 $as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
19416       has_space=`$ECHO "$complete" | $GREP " "`
19417       if test "x$has_space" != x; then
19418         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19419 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19420       fi
19421       as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
19422     fi
19423   fi
19424 
19425   # Now new_path has a complete unix path to the binary
19426   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
19427     # Keep paths in /bin as-is, but remove trailing .exe if any
19428     new_path="${new_path/%.exe/}"
19429     # Do not save /bin paths to all_fixpath_prefixes!
19430   else
19431     # Not in mixed or Windows style, start by that.
19432     new_path=`cmd //c echo $new_path`
19433 
19434   input_path="$new_path"
19435   # Check if we need to convert this using DOS-style short mode. If the path
19436   # contains just simple characters, use it. Otherwise (spaces, weird characters),
19437   # take no chances and rewrite it.
19438   # Note: m4 eats our [], so we need to use [ and ] instead.
19439   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19440   if test "x$has_forbidden_chars" != x; then
19441     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19442     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19443   fi
19444 
19445     # Output is in $new_path
19446 
19447   windows_path="$new_path"
19448   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19449     unix_path=`$CYGPATH -u "$windows_path"`
19450     new_path="$unix_path"
19451   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19452     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19453     new_path="$unix_path"
19454   fi
19455 
19456     # remove trailing .exe if any
19457     new_path="${new_path/%.exe/}"
19458 
19459     # Save the first 10 bytes of this path to the storage, so fixpath can work.
19460     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19461   fi
19462 
19463   else
19464     # We're on a posix platform. Hooray! :)
19465     # First separate the path from the arguments. This will split at the first
19466     # space.
19467     complete="$PROPER_COMPILER_CC"
19468     path="${complete%% *}"
19469     tmp="$complete EOL"
19470     arguments="${tmp#* }"
19471 
19472     # Cannot rely on the command "which" here since it doesn't always work.
19473     is_absolute_path=`$ECHO "$path" | $GREP ^/`
19474     if test -z "$is_absolute_path"; then
19475       # Path to executable is not absolute. Find it.
19476       IFS_save="$IFS"
19477       IFS=:
19478       for p in $PATH; do
19479         if test -f "$p/$path" && test -x "$p/$path"; then
19480           new_path="$p/$path"
19481           break
19482         fi
19483       done
19484       IFS="$IFS_save"
19485     else
19486       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving PROPER_COMPILER_CC (as $path) failed, using $path directly." >&5
19487 $as_echo "$as_me: Resolving PROPER_COMPILER_CC (as $path) failed, using $path directly." >&6;}
19488       new_path="$path"
19489     fi
19490 
19491     if test "x$new_path" = x; then
19492         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
19493 $as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
19494         has_space=`$ECHO "$complete" | $GREP " "`
19495         if test "x$has_space" != x; then
19496           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19497 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19498         fi
19499         as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
19500       fi
19501   fi
19502 
19503       # Now join together the path and the arguments once again
19504       if test "x$arguments" != xEOL; then
19505         new_complete="$new_path ${arguments% *}"
19506       else
19507         new_complete="$new_path"
19508       fi
19509 
19510   if test "x$complete" != "x$new_complete"; then
19511       PROPER_COMPILER_CC="$new_complete"
19512       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&5
19513 $as_echo "$as_me: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&6;}
19514     fi
19515 
19516     PATH="$RETRY_COMPILER_SAVED_PATH"
19517 
19518     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CC" >&5
19519 $as_echo_n "checking for resolved symbolic links for CC... " >&6; }
19520 
19521     if test "x$OPENJDK_BUILD_OS" != xwindows; then
19522         # Follow a chain of symbolic links. Use readlink
19523         # where it exists, else fall back to horribly
19524         # complicated shell code.
19525         if test "x$READLINK_TESTED" != yes; then
19526             # On MacOSX there is a readlink tool with a different
19527             # purpose than the GNU readlink tool. Check the found readlink.
19528             ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
19529             if test "x$ISGNU" = x; then
19530                  # A readlink that we do not know how to use.
19531                  # Are there other non-GNU readlinks out there?
19532                  READLINK_TESTED=yes
19533                  READLINK=
19534             fi
19535         fi
19536 
19537         if test "x$READLINK" != x; then
19538             PROPER_COMPILER_CC=`$READLINK -f $PROPER_COMPILER_CC`
19539         else
19540             # Save the current directory for restoring afterwards
19541             STARTDIR=$PWD
19542             COUNTER=0
19543             sym_link_dir=`$DIRNAME $PROPER_COMPILER_CC`
19544             sym_link_file=`$BASENAME $PROPER_COMPILER_CC`
19545             # Use the system pwd and not the shell builtin to resolve directory symlinks
19546             cd $sym_link_dir
19547             cd `$THEPWDCMD`
19548             sym_link_dir=`$THEPWDCMD`
19549             # Resolve file symlinks
19550             while test $COUNTER -lt 20; do
19551                 ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
19552                 if test "x$ISLINK" == x; then
19553                     # This is not a symbolic link! We are done!
19554                     break
19555                 fi
19556                 # Again resolve directory symlinks since the target of the just found
19557                 # link could be in a different directory
19558                 cd `$DIRNAME $ISLINK`
19559                 sym_link_dir=`$THEPWDCMD`
19560                 sym_link_file=`$BASENAME $ISLINK`
19561                 let COUNTER=COUNTER+1
19562             done
19563             cd $STARTDIR
19564             PROPER_COMPILER_CC=$sym_link_dir/$sym_link_file
19565         fi
19566     fi
19567 
19568     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5
19569 $as_echo "$PROPER_COMPILER_CC" >&6; }
19570     CC="$PROPER_COMPILER_CC"
19571   else
19572     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CC" >&5
19573 $as_echo "no, keeping CC" >&6; }
19574     CC="$TEST_COMPILER"
19575   fi
19576 
19577   COMPILER=$CC
19578   COMPILER_NAME=$COMPILER_NAME
19579 
19580   if test "x$OPENJDK_TARGET_OS" = xsolaris; then
19581     # Make sure we use the Sun Studio compiler and not gcc on Solaris, which won't work
19582     COMPILER_VERSION_TEST=`$COMPILER -V 2>&1 | $HEAD -n 1`
19583     $ECHO $COMPILER_VERSION_TEST | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
19584     if test $? -ne 0; then
19585       GCC_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
19586 
19587       { $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
19588 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required Sun Studio compiler." >&6;}
19589       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&5
19590 $as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&6;}
19591       as_fn_error $? "Sun Studio compiler is required. Try setting --with-tools-dir." "$LINENO" 5
19592     else
19593       COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/p"`
19594       COMPILER_VENDOR="Sun Studio"
19595     fi
19596   elif test  "x$OPENJDK_TARGET_OS" = xwindows; then
19597     # First line typically looks something like:
19598     # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.30319.01 for 80x86
19599     COMPILER_VERSION_TEST=`$COMPILER 2>&1 | $HEAD -n 1`
19600     COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*Version \([1-9][0-9.]*\) .*/\1/p"`
19601     COMPILER_VENDOR="Microsoft CL.EXE"
19602     COMPILER_CPU_TEST=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* for \(.*\)$/\1/p"`
19603     if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
19604       if test "x$COMPILER_CPU_TEST" != "x80x86"; then
19605         as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"80x86\"." "$LINENO" 5
19606       fi
19607     elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
19608       if test "x$COMPILER_CPU_TEST" != "xx64"; then
19609         as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." "$LINENO" 5
19610       fi
19611     fi
19612   else
19613     COMPILER_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
19614     # Check that this is likely to be GCC.
19615     $COMPILER --version 2>&1 | $GREP "Free Software Foundation" > /dev/null
19616     if test $? -ne 0; then
19617       { $as_echo "$as_me:${as_lineno-$LINENO}: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&5
19618 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&6;}
19619       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&5
19620 $as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&6;}
19621       as_fn_error $? "GCC compiler is required. Try setting --with-tools-dir." "$LINENO" 5
19622     fi
19623 
19624     # First line typically looks something like:
19625     # gcc (Ubuntu/Linaro 4.5.2-8ubuntu4) 4.5.2
19626     COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* \([1-9][0-9.]*\)/\1/p"`
19627     COMPILER_VENDOR=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^\(.*\) [1-9][0-9.]*/\1/p"`
19628   fi
19629   # This sets CC_VERSION or CXX_VERSION. (This comment is a grep marker)
19630   CC_VERSION="$COMPILER_VERSION"
19631   # This sets CC_VENDOR or CXX_VENDOR. (This comment is a grep marker)
19632   CC_VENDOR="$COMPILER_VENDOR"
19633 
19634   { $as_echo "$as_me:${as_lineno-$LINENO}: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&5
19635 $as_echo "$as_me: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&6;}
19636 
19637 
19638 # Now that we have resolved CC ourself, let autoconf have its go at it
19639 ac_ext=c
19640 ac_cpp='$CPP $CPPFLAGS'
19641 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
19642 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
19643 ac_compiler_gnu=$ac_cv_c_compiler_gnu
19644 if test -n "$ac_tool_prefix"; then
19645   for ac_prog in $CC
19646   do
19647     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
19648 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
19649 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19650 $as_echo_n "checking for $ac_word... " >&6; }
19651 if test "${ac_cv_prog_CC+set}" = set; then :
19652   $as_echo_n "(cached) " >&6
19653 else
19654   if test -n "$CC"; then
19655   ac_cv_prog_CC="$CC" # Let the user override the test.
19656 else
19657 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19658 for as_dir in $PATH
19659 do
19660   IFS=$as_save_IFS
19661   test -z "$as_dir" && as_dir=.
19662     for ac_exec_ext in '' $ac_executable_extensions; do
19663   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
19664     ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
19665     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19666     break 2
19667   fi
19668 done
19669   done
19670 IFS=$as_save_IFS
19671 
19672 fi
19673 fi
19674 CC=$ac_cv_prog_CC
19675 if test -n "$CC"; then
19676   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
19677 $as_echo "$CC" >&6; }
19678 else
19679   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19680 $as_echo "no" >&6; }
19681 fi
19682 
19683 
19684     test -n "$CC" && break
19685   done
19686 fi
19687 if test -z "$CC"; then
19688   ac_ct_CC=$CC
19689   for ac_prog in $CC
19690 do
19691   # Extract the first word of "$ac_prog", so it can be a program name with args.
19692 set dummy $ac_prog; ac_word=$2
19693 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19694 $as_echo_n "checking for $ac_word... " >&6; }
19695 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
19696   $as_echo_n "(cached) " >&6
19697 else
19698   if test -n "$ac_ct_CC"; then
19699   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
19700 else
19701 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19702 for as_dir in $PATH
19703 do
19704   IFS=$as_save_IFS
19705   test -z "$as_dir" && as_dir=.
19706     for ac_exec_ext in '' $ac_executable_extensions; do
19707   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
19708     ac_cv_prog_ac_ct_CC="$ac_prog"
19709     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19710     break 2
19711   fi
19712 done
19713   done
19714 IFS=$as_save_IFS
19715 
19716 fi
19717 fi
19718 ac_ct_CC=$ac_cv_prog_ac_ct_CC
19719 if test -n "$ac_ct_CC"; then
19720   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
19721 $as_echo "$ac_ct_CC" >&6; }
19722 else
19723   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19724 $as_echo "no" >&6; }
19725 fi
19726 
19727 
19728   test -n "$ac_ct_CC" && break
19729 done
19730 
19731   if test "x$ac_ct_CC" = x; then
19732     CC=""
19733   else
19734     case $cross_compiling:$ac_tool_warned in
19735 yes:)
19736 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
19737 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
19738 ac_tool_warned=yes ;;
19739 esac
19740     CC=$ac_ct_CC
19741   fi
19742 fi
19743 
19744 
19745 test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
19746 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
19747 as_fn_error $? "no acceptable C compiler found in \$PATH
19748 See \`config.log' for more details" "$LINENO" 5 ; }
19749 
19750 # Provide some information about the compiler.
19751 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
19752 set X $ac_compile
19753 ac_compiler=$2
19754 for ac_option in --version -v -V -qversion; do
19755   { { ac_try="$ac_compiler $ac_option >&5"
19756 case "(($ac_try" in
19757   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19758   *) ac_try_echo=$ac_try;;
19759 esac
19760 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
19761 $as_echo "$ac_try_echo"; } >&5
19762   (eval "$ac_compiler $ac_option >&5") 2>conftest.err
19763   ac_status=$?
19764   if test -s conftest.err; then
19765     sed '10a\
19766 ... rest of stderr output deleted ...
19767          10q' conftest.err >conftest.er1
19768     cat conftest.er1 >&5
19769   fi
19770   rm -f conftest.er1 conftest.err
19771   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
19772   test $ac_status = 0; }
19773 done
19774 
19775 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19776 /* end confdefs.h.  */
19777 
19778 int
19779 main ()
19780 {
19781 
19782   ;
19783   return 0;
19784 }
19785 _ACEOF
19786 ac_clean_files_save=$ac_clean_files
19787 ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
19788 # Try to create an executable without -o first, disregard a.out.
19789 # It will help us diagnose broken compilers, and finding out an intuition
19790 # of exeext.
19791 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
19792 $as_echo_n "checking whether the C compiler works... " >&6; }
19793 ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
19794 
19795 # The possible output files:
19796 ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
19797 
19798 ac_rmfiles=
19799 for ac_file in $ac_files
19800 do
19801   case $ac_file in
19802     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
19803     * ) ac_rmfiles="$ac_rmfiles $ac_file";;
19804   esac
19805 done
19806 rm -f $ac_rmfiles
19807 
19808 if { { ac_try="$ac_link_default"
19809 case "(($ac_try" in
19810   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19811   *) ac_try_echo=$ac_try;;
19812 esac
19813 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
19814 $as_echo "$ac_try_echo"; } >&5
19815   (eval "$ac_link_default") 2>&5
19816   ac_status=$?
19817   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
19818   test $ac_status = 0; }; then :
19819   # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
19820 # So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
19821 # in a Makefile.  We should not override ac_cv_exeext if it was cached,
19822 # so that the user can short-circuit this test for compilers unknown to
19823 # Autoconf.
19824 for ac_file in $ac_files ''
19825 do
19826   test -f "$ac_file" || continue
19827   case $ac_file in
19828     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
19829         ;;
19830     [ab].out )
19831         # We found the default executable, but exeext='' is most
19832         # certainly right.
19833         break;;
19834     *.* )
19835         if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
19836         then :; else
19837            ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
19838         fi
19839         # We set ac_cv_exeext here because the later test for it is not
19840         # safe: cross compilers may not add the suffix if given an `-o'
19841         # argument, so we may need to know it at that point already.
19842         # Even if this section looks crufty: it has the advantage of
19843         # actually working.
19844         break;;
19845     * )
19846         break;;
19847   esac
19848 done
19849 test "$ac_cv_exeext" = no && ac_cv_exeext=
19850 
19851 else
19852   ac_file=''
19853 fi
19854 if test -z "$ac_file"; then :
19855   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19856 $as_echo "no" >&6; }
19857 $as_echo "$as_me: failed program was:" >&5
19858 sed 's/^/| /' conftest.$ac_ext >&5
19859 
19860 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
19861 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
19862 as_fn_error 77 "C compiler cannot create executables
19863 See \`config.log' for more details" "$LINENO" 5 ; }
19864 else
19865   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
19866 $as_echo "yes" >&6; }
19867 fi
19868 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
19869 $as_echo_n "checking for C compiler default output file name... " >&6; }
19870 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
19871 $as_echo "$ac_file" >&6; }
19872 ac_exeext=$ac_cv_exeext
19873 
19874 rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
19875 ac_clean_files=$ac_clean_files_save
19876 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
19877 $as_echo_n "checking for suffix of executables... " >&6; }
19878 if { { ac_try="$ac_link"
19879 case "(($ac_try" in
19880   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19881   *) ac_try_echo=$ac_try;;
19882 esac
19883 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
19884 $as_echo "$ac_try_echo"; } >&5
19885   (eval "$ac_link") 2>&5
19886   ac_status=$?
19887   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
19888   test $ac_status = 0; }; then :
19889   # If both `conftest.exe' and `conftest' are `present' (well, observable)
19890 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
19891 # work properly (i.e., refer to `conftest.exe'), while it won't with
19892 # `rm'.
19893 for ac_file in conftest.exe conftest conftest.*; do
19894   test -f "$ac_file" || continue
19895   case $ac_file in
19896     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
19897     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
19898           break;;
19899     * ) break;;
19900   esac
19901 done
19902 else
19903   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
19904 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
19905 as_fn_error $? "cannot compute suffix of executables: cannot compile and link
19906 See \`config.log' for more details" "$LINENO" 5 ; }
19907 fi
19908 rm -f conftest conftest$ac_cv_exeext
19909 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
19910 $as_echo "$ac_cv_exeext" >&6; }
19911 
19912 rm -f conftest.$ac_ext
19913 EXEEXT=$ac_cv_exeext
19914 ac_exeext=$EXEEXT
19915 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19916 /* end confdefs.h.  */
19917 #include <stdio.h>
19918 int
19919 main ()
19920 {
19921 FILE *f = fopen ("conftest.out", "w");
19922  return ferror (f) || fclose (f) != 0;
19923 
19924   ;
19925   return 0;
19926 }
19927 _ACEOF
19928 ac_clean_files="$ac_clean_files conftest.out"
19929 # Check that the compiler produces executables we can run.  If not, either
19930 # the compiler is broken, or we cross compile.
19931 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
19932 $as_echo_n "checking whether we are cross compiling... " >&6; }
19933 if test "$cross_compiling" != yes; then
19934   { { ac_try="$ac_link"
19935 case "(($ac_try" in
19936   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19937   *) ac_try_echo=$ac_try;;
19938 esac
19939 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
19940 $as_echo "$ac_try_echo"; } >&5
19941   (eval "$ac_link") 2>&5
19942   ac_status=$?
19943   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
19944   test $ac_status = 0; }
19945   if { ac_try='./conftest$ac_cv_exeext'
19946   { { case "(($ac_try" in
19947   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19948   *) ac_try_echo=$ac_try;;
19949 esac
19950 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
19951 $as_echo "$ac_try_echo"; } >&5
19952   (eval "$ac_try") 2>&5
19953   ac_status=$?
19954   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
19955   test $ac_status = 0; }; }; then
19956     cross_compiling=no
19957   else
19958     if test "$cross_compiling" = maybe; then
19959         cross_compiling=yes
19960     else
19961         { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
19962 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
19963 as_fn_error $? "cannot run C compiled programs.
19964 If you meant to cross compile, use \`--host'.
19965 See \`config.log' for more details" "$LINENO" 5 ; }
19966     fi
19967   fi
19968 fi
19969 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
19970 $as_echo "$cross_compiling" >&6; }
19971 
19972 rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
19973 ac_clean_files=$ac_clean_files_save
19974 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
19975 $as_echo_n "checking for suffix of object files... " >&6; }
19976 if test "${ac_cv_objext+set}" = set; then :
19977   $as_echo_n "(cached) " >&6
19978 else
19979   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19980 /* end confdefs.h.  */
19981 
19982 int
19983 main ()
19984 {
19985 
19986   ;
19987   return 0;
19988 }
19989 _ACEOF
19990 rm -f conftest.o conftest.obj
19991 if { { ac_try="$ac_compile"
19992 case "(($ac_try" in
19993   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19994   *) ac_try_echo=$ac_try;;
19995 esac
19996 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
19997 $as_echo "$ac_try_echo"; } >&5
19998   (eval "$ac_compile") 2>&5
19999   ac_status=$?
20000   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
20001   test $ac_status = 0; }; then :
20002   for ac_file in conftest.o conftest.obj conftest.*; do
20003   test -f "$ac_file" || continue;
20004   case $ac_file in
20005     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
20006     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
20007        break;;
20008   esac
20009 done
20010 else
20011   $as_echo "$as_me: failed program was:" >&5
20012 sed 's/^/| /' conftest.$ac_ext >&5
20013 
20014 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
20015 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
20016 as_fn_error $? "cannot compute suffix of object files: cannot compile
20017 See \`config.log' for more details" "$LINENO" 5 ; }
20018 fi
20019 rm -f conftest.$ac_cv_objext conftest.$ac_ext
20020 fi
20021 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
20022 $as_echo "$ac_cv_objext" >&6; }
20023 OBJEXT=$ac_cv_objext
20024 ac_objext=$OBJEXT
20025 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
20026 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
20027 if test "${ac_cv_c_compiler_gnu+set}" = set; then :
20028   $as_echo_n "(cached) " >&6
20029 else
20030   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20031 /* end confdefs.h.  */
20032 
20033 int
20034 main ()
20035 {
20036 #ifndef __GNUC__
20037        choke me
20038 #endif
20039 
20040   ;
20041   return 0;
20042 }
20043 _ACEOF
20044 if ac_fn_c_try_compile "$LINENO"; then :
20045   ac_compiler_gnu=yes
20046 else
20047   ac_compiler_gnu=no
20048 fi
20049 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20050 ac_cv_c_compiler_gnu=$ac_compiler_gnu
20051 
20052 fi
20053 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
20054 $as_echo "$ac_cv_c_compiler_gnu" >&6; }
20055 if test $ac_compiler_gnu = yes; then
20056   GCC=yes
20057 else
20058   GCC=
20059 fi
20060 ac_test_CFLAGS=${CFLAGS+set}
20061 ac_save_CFLAGS=$CFLAGS
20062 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
20063 $as_echo_n "checking whether $CC accepts -g... " >&6; }
20064 if test "${ac_cv_prog_cc_g+set}" = set; then :
20065   $as_echo_n "(cached) " >&6
20066 else
20067   ac_save_c_werror_flag=$ac_c_werror_flag
20068    ac_c_werror_flag=yes
20069    ac_cv_prog_cc_g=no
20070    CFLAGS="-g"
20071    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20072 /* end confdefs.h.  */
20073 
20074 int
20075 main ()
20076 {
20077 
20078   ;
20079   return 0;
20080 }
20081 _ACEOF
20082 if ac_fn_c_try_compile "$LINENO"; then :
20083   ac_cv_prog_cc_g=yes
20084 else
20085   CFLAGS=""
20086       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20087 /* end confdefs.h.  */
20088 
20089 int
20090 main ()
20091 {
20092 
20093   ;
20094   return 0;
20095 }
20096 _ACEOF
20097 if ac_fn_c_try_compile "$LINENO"; then :
20098 
20099 else
20100   ac_c_werror_flag=$ac_save_c_werror_flag
20101          CFLAGS="-g"
20102          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20103 /* end confdefs.h.  */
20104 
20105 int
20106 main ()
20107 {
20108 
20109   ;
20110   return 0;
20111 }
20112 _ACEOF
20113 if ac_fn_c_try_compile "$LINENO"; then :
20114   ac_cv_prog_cc_g=yes
20115 fi
20116 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
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    ac_c_werror_flag=$ac_save_c_werror_flag
20122 fi
20123 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
20124 $as_echo "$ac_cv_prog_cc_g" >&6; }
20125 if test "$ac_test_CFLAGS" = set; then
20126   CFLAGS=$ac_save_CFLAGS
20127 elif test $ac_cv_prog_cc_g = yes; then
20128   if test "$GCC" = yes; then
20129     CFLAGS="-g -O2"
20130   else
20131     CFLAGS="-g"
20132   fi
20133 else
20134   if test "$GCC" = yes; then
20135     CFLAGS="-O2"
20136   else
20137     CFLAGS=
20138   fi
20139 fi
20140 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
20141 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
20142 if test "${ac_cv_prog_cc_c89+set}" = set; then :
20143   $as_echo_n "(cached) " >&6
20144 else
20145   ac_cv_prog_cc_c89=no
20146 ac_save_CC=$CC
20147 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20148 /* end confdefs.h.  */
20149 #include <stdarg.h>
20150 #include <stdio.h>
20151 #include <sys/types.h>
20152 #include <sys/stat.h>
20153 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
20154 struct buf { int x; };
20155 FILE * (*rcsopen) (struct buf *, struct stat *, int);
20156 static char *e (p, i)
20157      char **p;
20158      int i;
20159 {
20160   return p[i];
20161 }
20162 static char *f (char * (*g) (char **, int), char **p, ...)
20163 {
20164   char *s;
20165   va_list v;
20166   va_start (v,p);
20167   s = g (p, va_arg (v,int));
20168   va_end (v);
20169   return s;
20170 }
20171 
20172 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
20173    function prototypes and stuff, but not '\xHH' hex character constants.
20174    These don't provoke an error unfortunately, instead are silently treated
20175    as 'x'.  The following induces an error, until -std is added to get
20176    proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
20177    array size at least.  It's necessary to write '\x00'==0 to get something
20178    that's true only with -std.  */
20179 int osf4_cc_array ['\x00' == 0 ? 1 : -1];
20180 
20181 /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
20182    inside strings and character constants.  */
20183 #define FOO(x) 'x'
20184 int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
20185 
20186 int test (int i, double x);
20187 struct s1 {int (*f) (int a);};
20188 struct s2 {int (*f) (double a);};
20189 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
20190 int argc;
20191 char **argv;
20192 int
20193 main ()
20194 {
20195 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
20196   ;
20197   return 0;
20198 }
20199 _ACEOF
20200 for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
20201         -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
20202 do
20203   CC="$ac_save_CC $ac_arg"
20204   if ac_fn_c_try_compile "$LINENO"; then :
20205   ac_cv_prog_cc_c89=$ac_arg
20206 fi
20207 rm -f core conftest.err conftest.$ac_objext
20208   test "x$ac_cv_prog_cc_c89" != "xno" && break
20209 done
20210 rm -f conftest.$ac_ext
20211 CC=$ac_save_CC
20212 
20213 fi
20214 # AC_CACHE_VAL
20215 case "x$ac_cv_prog_cc_c89" in
20216   x)
20217     { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
20218 $as_echo "none needed" >&6; } ;;
20219   xno)
20220     { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
20221 $as_echo "unsupported" >&6; } ;;
20222   *)
20223     CC="$CC $ac_cv_prog_cc_c89"
20224     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
20225 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
20226 esac
20227 if test "x$ac_cv_prog_cc_c89" != xno; then :
20228 
20229 fi
20230 
20231 ac_ext=cpp
20232 ac_cpp='$CXXCPP $CPPFLAGS'
20233 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
20234 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
20235 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
20236 
20237 
20238 ### Locate C++ compiler (CXX)
20239 
20240 if test "x$CXX" != x; then
20241   COMPILER_CHECK_LIST="$CXX"
20242 elif test "x$OPENJDK_TARGET_OS" = "xwindows"; then
20243   COMPILER_CHECK_LIST="cl"
20244 elif test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
20245   COMPILER_CHECK_LIST="CC g++"
20246 else
20247   COMPILER_CHECK_LIST="g++ CC"
20248 fi
20249 
20250 
20251   COMPILER_NAME=C++
20252 
20253   CXX=
20254   # If TOOLS_DIR is set, check for all compiler names in there first
20255   # before checking the rest of the PATH.
20256   if test -n "$TOOLS_DIR"; then
20257     PATH_save="$PATH"
20258     PATH="$TOOLS_DIR"
20259     for ac_prog in $COMPILER_CHECK_LIST
20260 do
20261   # Extract the first word of "$ac_prog", so it can be a program name with args.
20262 set dummy $ac_prog; ac_word=$2
20263 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20264 $as_echo_n "checking for $ac_word... " >&6; }
20265 if test "${ac_cv_path_TOOLS_DIR_CXX+set}" = set; then :
20266   $as_echo_n "(cached) " >&6
20267 else
20268   case $TOOLS_DIR_CXX in
20269   [\\/]* | ?:[\\/]*)
20270   ac_cv_path_TOOLS_DIR_CXX="$TOOLS_DIR_CXX" # Let the user override the test with a path.
20271   ;;
20272   *)
20273   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20274 for as_dir in $PATH
20275 do
20276   IFS=$as_save_IFS
20277   test -z "$as_dir" && as_dir=.
20278     for ac_exec_ext in '' $ac_executable_extensions; do
20279   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
20280     ac_cv_path_TOOLS_DIR_CXX="$as_dir/$ac_word$ac_exec_ext"
20281     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20282     break 2
20283   fi
20284 done
20285   done
20286 IFS=$as_save_IFS
20287 
20288   ;;
20289 esac
20290 fi
20291 TOOLS_DIR_CXX=$ac_cv_path_TOOLS_DIR_CXX
20292 if test -n "$TOOLS_DIR_CXX"; then
20293   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLS_DIR_CXX" >&5
20294 $as_echo "$TOOLS_DIR_CXX" >&6; }
20295 else
20296   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20297 $as_echo "no" >&6; }
20298 fi
20299 
20300 
20301   test -n "$TOOLS_DIR_CXX" && break
20302 done
20303 
20304     CXX=$TOOLS_DIR_CXX
20305     PATH="$PATH_save"
20306   fi
20307 
20308   # AC_PATH_PROGS can't be run multiple times with the same variable,
20309   # so create a new name for this run.
20310   if test "x$CXX" = x; then
20311     for ac_prog in $COMPILER_CHECK_LIST
20312 do
20313   # Extract the first word of "$ac_prog", so it can be a program name with args.
20314 set dummy $ac_prog; ac_word=$2
20315 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20316 $as_echo_n "checking for $ac_word... " >&6; }
20317 if test "${ac_cv_path_POTENTIAL_CXX+set}" = set; then :
20318   $as_echo_n "(cached) " >&6
20319 else
20320   case $POTENTIAL_CXX in
20321   [\\/]* | ?:[\\/]*)
20322   ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
20323   ;;
20324   *)
20325   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20326 for as_dir in $PATH
20327 do
20328   IFS=$as_save_IFS
20329   test -z "$as_dir" && as_dir=.
20330     for ac_exec_ext in '' $ac_executable_extensions; do
20331   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
20332     ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
20333     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20334     break 2
20335   fi
20336 done
20337   done
20338 IFS=$as_save_IFS
20339 
20340   ;;
20341 esac
20342 fi
20343 POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
20344 if test -n "$POTENTIAL_CXX"; then
20345   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
20346 $as_echo "$POTENTIAL_CXX" >&6; }
20347 else
20348   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20349 $as_echo "no" >&6; }
20350 fi
20351 
20352 
20353   test -n "$POTENTIAL_CXX" && break
20354 done
20355 
20356     CXX=$POTENTIAL_CXX
20357   fi
20358 
20359   if test "x$CXX" = x; then
20360 
20361     # Print a helpful message on how to acquire the necessary build dependency.
20362     # devkit is the help tag: freetyp2, cups, pulse, alsa etc
20363     MISSING_DEPENDENCY=devkit
20364     PKGHANDLER_COMMAND=
20365 
20366     case $PKGHANDLER in
20367         apt-get)
20368                 apt_help     $MISSING_DEPENDENCY ;;
20369     yum)
20370                 yum_help     $MISSING_DEPENDENCY ;;
20371         port)
20372                 port_help    $MISSING_DEPENDENCY ;;
20373         pkgutil)
20374                 pkgutil_help $MISSING_DEPENDENCY ;;
20375         pkgadd)
20376                 pkgadd_help  $MISSING_DEPENDENCY ;;
20377     * )
20378       break ;;
20379     esac
20380 
20381     if test "x$PKGHANDLER_COMMAND" != x; then
20382         HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
20383     fi
20384 
20385       as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
20386   fi
20387 
20388   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20389 
20390   # First separate the path from the arguments. This will split at the first
20391   # space.
20392   complete="$CXX"
20393   path="${complete%% *}"
20394   tmp="$complete EOL"
20395   arguments="${tmp#* }"
20396 
20397   # Input might be given as Windows format, start by converting to
20398   # unix format.
20399   new_path=`$CYGPATH -u "$path"`
20400 
20401   # Now try to locate executable using which
20402   new_path=`$WHICH "$new_path" 2> /dev/null`
20403   # bat and cmd files are not always considered executable in cygwin causing which
20404   # to not find them
20405   if test "x$new_path" = x \
20406            && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20407            && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20408     new_path=`$CYGPATH -u "$path"`
20409   fi
20410   if test "x$new_path" = x; then
20411     # Oops. Which didn't find the executable.
20412     # The splitting of arguments from the executable at a space might have been incorrect,
20413     # since paths with space are more likely in Windows. Give it another try with the whole
20414     # argument.
20415     path="$complete"
20416     arguments="EOL"
20417     new_path=`$CYGPATH -u "$path"`
20418     new_path=`$WHICH "$new_path" 2> /dev/null`
20419     # bat and cmd files are not always considered executable in cygwin causing which
20420     # to not find them
20421     if test "x$new_path" = x \
20422              && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20423              && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20424       new_path=`$CYGPATH -u "$path"`
20425     fi
20426     if test "x$new_path" = x; then
20427       # It's still not found. Now this is an unrecoverable error.
20428       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
20429 $as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
20430       has_space=`$ECHO "$complete" | $GREP " "`
20431       if test "x$has_space" != x; then
20432         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20433 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20434       fi
20435       as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
20436     fi
20437   fi
20438 
20439   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20440   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20441   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20442   # "foo.exe" is OK but "foo" is an error.
20443   #
20444   # This test is therefore slightly more accurate than "test -f" to check for file precense.
20445   # It is also a way to make sure we got the proper file name for the real test later on.
20446   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20447   if test "x$test_shortpath" = x; then
20448     # Short path failed, file does not exist as specified.
20449     # Try adding .exe or .cmd
20450     if test -f "${new_path}.exe"; then
20451        input_to_shortpath="${new_path}.exe"
20452     elif test -f "${new_path}.cmd"; then
20453        input_to_shortpath="${new_path}.cmd"
20454     else
20455       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$new_path\", is invalid." >&5
20456 $as_echo "$as_me: The path of CXX, which resolves as \"$new_path\", is invalid." >&6;}
20457       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
20458 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
20459       as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
20460     fi
20461   else
20462     input_to_shortpath="$new_path"
20463   fi
20464 
20465   # Call helper function which possibly converts this using DOS-style short mode.
20466   # If so, the updated path is stored in $new_path.
20467   new_path="$input_to_shortpath"
20468 
20469   input_path="$input_to_shortpath"
20470   # Check if we need to convert this using DOS-style short mode. If the path
20471   # contains just simple characters, use it. Otherwise (spaces, weird characters),
20472   # take no chances and rewrite it.
20473   # Note: m4 eats our [], so we need to use [ and ] instead.
20474   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20475   if test "x$has_forbidden_chars" != x; then
20476     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20477     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20478     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20479     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20480       # Going to short mode and back again did indeed matter. Since short mode is
20481       # case insensitive, let's make it lowercase to improve readability.
20482       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20483       # Now convert it back to Unix-stile (cygpath)
20484       input_path=`$CYGPATH -u "$shortmode_path"`
20485       new_path="$input_path"
20486     fi
20487   fi
20488 
20489   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20490   if test "x$test_cygdrive_prefix" = x; then
20491     # As a simple fix, exclude /usr/bin since it's not a real path.
20492     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
20493       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20494       # a path prefixed by /cygdrive for fixpath to work.
20495       new_path="$CYGWIN_ROOT_PATH$input_path"
20496     fi
20497   fi
20498 
20499   # remove trailing .exe if any
20500   new_path="${new_path/%.exe/}"
20501 
20502   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20503 
20504   # First separate the path from the arguments. This will split at the first
20505   # space.
20506   complete="$CXX"
20507   path="${complete%% *}"
20508   tmp="$complete EOL"
20509   arguments="${tmp#* }"
20510 
20511   # Input might be given as Windows format, start by converting to
20512   # unix format.
20513   new_path="$path"
20514 
20515   windows_path="$new_path"
20516   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20517     unix_path=`$CYGPATH -u "$windows_path"`
20518     new_path="$unix_path"
20519   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20520     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20521     new_path="$unix_path"
20522   fi
20523 
20524 
20525   # Now try to locate executable using which
20526   new_path=`$WHICH "$new_path" 2> /dev/null`
20527 
20528   if test "x$new_path" = x; then
20529     # Oops. Which didn't find the executable.
20530     # The splitting of arguments from the executable at a space might have been incorrect,
20531     # since paths with space are more likely in Windows. Give it another try with the whole
20532     # argument.
20533     path="$complete"
20534     arguments="EOL"
20535     new_path="$path"
20536 
20537   windows_path="$new_path"
20538   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20539     unix_path=`$CYGPATH -u "$windows_path"`
20540     new_path="$unix_path"
20541   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20542     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20543     new_path="$unix_path"
20544   fi
20545 
20546 
20547     new_path=`$WHICH "$new_path" 2> /dev/null`
20548 
20549     if test "x$new_path" = x; then
20550       # It's still not found. Now this is an unrecoverable error.
20551       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
20552 $as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
20553       has_space=`$ECHO "$complete" | $GREP " "`
20554       if test "x$has_space" != x; then
20555         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20556 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20557       fi
20558       as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
20559     fi
20560   fi
20561 
20562   # Now new_path has a complete unix path to the binary
20563   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
20564     # Keep paths in /bin as-is, but remove trailing .exe if any
20565     new_path="${new_path/%.exe/}"
20566     # Do not save /bin paths to all_fixpath_prefixes!
20567   else
20568     # Not in mixed or Windows style, start by that.
20569     new_path=`cmd //c echo $new_path`
20570 
20571   input_path="$new_path"
20572   # Check if we need to convert this using DOS-style short mode. If the path
20573   # contains just simple characters, use it. Otherwise (spaces, weird characters),
20574   # take no chances and rewrite it.
20575   # Note: m4 eats our [], so we need to use [ and ] instead.
20576   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20577   if test "x$has_forbidden_chars" != x; then
20578     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20579     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20580   fi
20581 
20582     # Output is in $new_path
20583 
20584   windows_path="$new_path"
20585   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20586     unix_path=`$CYGPATH -u "$windows_path"`
20587     new_path="$unix_path"
20588   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20589     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20590     new_path="$unix_path"
20591   fi
20592 
20593     # remove trailing .exe if any
20594     new_path="${new_path/%.exe/}"
20595 
20596     # Save the first 10 bytes of this path to the storage, so fixpath can work.
20597     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20598   fi
20599 
20600   else
20601     # We're on a posix platform. Hooray! :)
20602     # First separate the path from the arguments. This will split at the first
20603     # space.
20604     complete="$CXX"
20605     path="${complete%% *}"
20606     tmp="$complete EOL"
20607     arguments="${tmp#* }"
20608 
20609     # Cannot rely on the command "which" here since it doesn't always work.
20610     is_absolute_path=`$ECHO "$path" | $GREP ^/`
20611     if test -z "$is_absolute_path"; then
20612       # Path to executable is not absolute. Find it.
20613       IFS_save="$IFS"
20614       IFS=:
20615       for p in $PATH; do
20616         if test -f "$p/$path" && test -x "$p/$path"; then
20617           new_path="$p/$path"
20618           break
20619         fi
20620       done
20621       IFS="$IFS_save"
20622     else
20623       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CXX (as $path) failed, using $path directly." >&5
20624 $as_echo "$as_me: Resolving CXX (as $path) failed, using $path directly." >&6;}
20625       new_path="$path"
20626     fi
20627 
20628     if test "x$new_path" = x; then
20629         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
20630 $as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
20631         has_space=`$ECHO "$complete" | $GREP " "`
20632         if test "x$has_space" != x; then
20633           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
20634 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
20635         fi
20636         as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
20637       fi
20638   fi
20639 
20640       # Now join together the path and the arguments once again
20641       if test "x$arguments" != xEOL; then
20642         new_complete="$new_path ${arguments% *}"
20643       else
20644         new_complete="$new_path"
20645       fi
20646 
20647   if test "x$complete" != "x$new_complete"; then
20648       CXX="$new_complete"
20649       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXX to \"$new_complete\"" >&5
20650 $as_echo "$as_me: Rewriting CXX to \"$new_complete\"" >&6;}
20651     fi
20652 
20653   { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CXX" >&5
20654 $as_echo_n "checking resolved symbolic links for CXX... " >&6; }
20655   TEST_COMPILER="$CXX"
20656 
20657     if test "x$OPENJDK_BUILD_OS" != xwindows; then
20658         # Follow a chain of symbolic links. Use readlink
20659         # where it exists, else fall back to horribly
20660         # complicated shell code.
20661         if test "x$READLINK_TESTED" != yes; then
20662             # On MacOSX there is a readlink tool with a different
20663             # purpose than the GNU readlink tool. Check the found readlink.
20664             ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
20665             if test "x$ISGNU" = x; then
20666                  # A readlink that we do not know how to use.
20667                  # Are there other non-GNU readlinks out there?
20668                  READLINK_TESTED=yes
20669                  READLINK=
20670             fi
20671         fi
20672 
20673         if test "x$READLINK" != x; then
20674             TEST_COMPILER=`$READLINK -f $TEST_COMPILER`
20675         else
20676             # Save the current directory for restoring afterwards
20677             STARTDIR=$PWD
20678             COUNTER=0
20679             sym_link_dir=`$DIRNAME $TEST_COMPILER`
20680             sym_link_file=`$BASENAME $TEST_COMPILER`
20681             # Use the system pwd and not the shell builtin to resolve directory symlinks
20682             cd $sym_link_dir
20683             cd `$THEPWDCMD`
20684             sym_link_dir=`$THEPWDCMD`
20685             # Resolve file symlinks
20686             while test $COUNTER -lt 20; do
20687                 ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
20688                 if test "x$ISLINK" == x; then
20689                     # This is not a symbolic link! We are done!
20690                     break
20691                 fi
20692                 # Again resolve directory symlinks since the target of the just found
20693                 # link could be in a different directory
20694                 cd `$DIRNAME $ISLINK`
20695                 sym_link_dir=`$THEPWDCMD`
20696                 sym_link_file=`$BASENAME $ISLINK`
20697                 let COUNTER=COUNTER+1
20698             done
20699             cd $STARTDIR
20700             TEST_COMPILER=$sym_link_dir/$sym_link_file
20701         fi
20702     fi
20703 
20704   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_COMPILER" >&5
20705 $as_echo "$TEST_COMPILER" >&6; }
20706   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CXX is disguised ccache" >&5
20707 $as_echo_n "checking if CXX is disguised ccache... " >&6; }
20708 
20709   COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"`
20710   if test "x$COMPILER_BASENAME" = "xccache"; then
20711     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5
20712 $as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; }
20713     # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache.
20714     # We want to control ccache invocation ourselves, so ignore this cc and try
20715     # searching again.
20716 
20717     # Remove the path to the fake ccache cc from the PATH
20718     RETRY_COMPILER_SAVED_PATH="$PATH"
20719     COMPILER_DIRNAME=`$DIRNAME $CXX`
20720     PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`"
20721 
20722     # Try again looking for our compiler
20723     if test -n "$ac_tool_prefix"; then
20724   for ac_prog in $COMPILER_CHECK_LIST
20725   do
20726     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
20727 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
20728 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20729 $as_echo_n "checking for $ac_word... " >&6; }
20730 if test "${ac_cv_prog_PROPER_COMPILER_CXX+set}" = set; then :
20731   $as_echo_n "(cached) " >&6
20732 else
20733   if test -n "$PROPER_COMPILER_CXX"; then
20734   ac_cv_prog_PROPER_COMPILER_CXX="$PROPER_COMPILER_CXX" # Let the user override the test.
20735 else
20736 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20737 for as_dir in $PATH
20738 do
20739   IFS=$as_save_IFS
20740   test -z "$as_dir" && as_dir=.
20741     for ac_exec_ext in '' $ac_executable_extensions; do
20742   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
20743     ac_cv_prog_PROPER_COMPILER_CXX="$ac_tool_prefix$ac_prog"
20744     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20745     break 2
20746   fi
20747 done
20748   done
20749 IFS=$as_save_IFS
20750 
20751 fi
20752 fi
20753 PROPER_COMPILER_CXX=$ac_cv_prog_PROPER_COMPILER_CXX
20754 if test -n "$PROPER_COMPILER_CXX"; then
20755   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5
20756 $as_echo "$PROPER_COMPILER_CXX" >&6; }
20757 else
20758   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20759 $as_echo "no" >&6; }
20760 fi
20761 
20762 
20763     test -n "$PROPER_COMPILER_CXX" && break
20764   done
20765 fi
20766 if test -z "$PROPER_COMPILER_CXX"; then
20767   ac_ct_PROPER_COMPILER_CXX=$PROPER_COMPILER_CXX
20768   for ac_prog in $COMPILER_CHECK_LIST
20769 do
20770   # Extract the first word of "$ac_prog", so it can be a program name with args.
20771 set dummy $ac_prog; ac_word=$2
20772 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20773 $as_echo_n "checking for $ac_word... " >&6; }
20774 if test "${ac_cv_prog_ac_ct_PROPER_COMPILER_CXX+set}" = set; then :
20775   $as_echo_n "(cached) " >&6
20776 else
20777   if test -n "$ac_ct_PROPER_COMPILER_CXX"; then
20778   ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_ct_PROPER_COMPILER_CXX" # Let the user override the test.
20779 else
20780 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20781 for as_dir in $PATH
20782 do
20783   IFS=$as_save_IFS
20784   test -z "$as_dir" && as_dir=.
20785     for ac_exec_ext in '' $ac_executable_extensions; do
20786   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
20787     ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_prog"
20788     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20789     break 2
20790   fi
20791 done
20792   done
20793 IFS=$as_save_IFS
20794 
20795 fi
20796 fi
20797 ac_ct_PROPER_COMPILER_CXX=$ac_cv_prog_ac_ct_PROPER_COMPILER_CXX
20798 if test -n "$ac_ct_PROPER_COMPILER_CXX"; then
20799   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CXX" >&5
20800 $as_echo "$ac_ct_PROPER_COMPILER_CXX" >&6; }
20801 else
20802   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20803 $as_echo "no" >&6; }
20804 fi
20805 
20806 
20807   test -n "$ac_ct_PROPER_COMPILER_CXX" && break
20808 done
20809 
20810   if test "x$ac_ct_PROPER_COMPILER_CXX" = x; then
20811     PROPER_COMPILER_CXX=""
20812   else
20813     case $cross_compiling:$ac_tool_warned in
20814 yes:)
20815 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
20816 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
20817 ac_tool_warned=yes ;;
20818 esac
20819     PROPER_COMPILER_CXX=$ac_ct_PROPER_COMPILER_CXX
20820   fi
20821 fi
20822 
20823 
20824   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20825 
20826   # First separate the path from the arguments. This will split at the first
20827   # space.
20828   complete="$PROPER_COMPILER_CXX"
20829   path="${complete%% *}"
20830   tmp="$complete EOL"
20831   arguments="${tmp#* }"
20832 
20833   # Input might be given as Windows format, start by converting to
20834   # unix format.
20835   new_path=`$CYGPATH -u "$path"`
20836 
20837   # Now try to locate executable using which
20838   new_path=`$WHICH "$new_path" 2> /dev/null`
20839   # bat and cmd files are not always considered executable in cygwin causing which
20840   # to not find them
20841   if test "x$new_path" = x \
20842            && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20843            && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20844     new_path=`$CYGPATH -u "$path"`
20845   fi
20846   if test "x$new_path" = x; then
20847     # Oops. Which didn't find the executable.
20848     # The splitting of arguments from the executable at a space might have been incorrect,
20849     # since paths with space are more likely in Windows. Give it another try with the whole
20850     # argument.
20851     path="$complete"
20852     arguments="EOL"
20853     new_path=`$CYGPATH -u "$path"`
20854     new_path=`$WHICH "$new_path" 2> /dev/null`
20855     # bat and cmd files are not always considered executable in cygwin causing which
20856     # to not find them
20857     if test "x$new_path" = x \
20858              && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20859              && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20860       new_path=`$CYGPATH -u "$path"`
20861     fi
20862     if test "x$new_path" = x; then
20863       # It's still not found. Now this is an unrecoverable error.
20864       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
20865 $as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
20866       has_space=`$ECHO "$complete" | $GREP " "`
20867       if test "x$has_space" != x; then
20868         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20869 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20870       fi
20871       as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
20872     fi
20873   fi
20874 
20875   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20876   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20877   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20878   # "foo.exe" is OK but "foo" is an error.
20879   #
20880   # This test is therefore slightly more accurate than "test -f" to check for file precense.
20881   # It is also a way to make sure we got the proper file name for the real test later on.
20882   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20883   if test "x$test_shortpath" = x; then
20884     # Short path failed, file does not exist as specified.
20885     # Try adding .exe or .cmd
20886     if test -f "${new_path}.exe"; then
20887        input_to_shortpath="${new_path}.exe"
20888     elif test -f "${new_path}.cmd"; then
20889        input_to_shortpath="${new_path}.cmd"
20890     else
20891       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&5
20892 $as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&6;}
20893       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
20894 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
20895       as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
20896     fi
20897   else
20898     input_to_shortpath="$new_path"
20899   fi
20900 
20901   # Call helper function which possibly converts this using DOS-style short mode.
20902   # If so, the updated path is stored in $new_path.
20903   new_path="$input_to_shortpath"
20904 
20905   input_path="$input_to_shortpath"
20906   # Check if we need to convert this using DOS-style short mode. If the path
20907   # contains just simple characters, use it. Otherwise (spaces, weird characters),
20908   # take no chances and rewrite it.
20909   # Note: m4 eats our [], so we need to use [ and ] instead.
20910   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20911   if test "x$has_forbidden_chars" != x; then
20912     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20913     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20914     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20915     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20916       # Going to short mode and back again did indeed matter. Since short mode is
20917       # case insensitive, let's make it lowercase to improve readability.
20918       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20919       # Now convert it back to Unix-stile (cygpath)
20920       input_path=`$CYGPATH -u "$shortmode_path"`
20921       new_path="$input_path"
20922     fi
20923   fi
20924 
20925   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20926   if test "x$test_cygdrive_prefix" = x; then
20927     # As a simple fix, exclude /usr/bin since it's not a real path.
20928     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
20929       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20930       # a path prefixed by /cygdrive for fixpath to work.
20931       new_path="$CYGWIN_ROOT_PATH$input_path"
20932     fi
20933   fi
20934 
20935   # remove trailing .exe if any
20936   new_path="${new_path/%.exe/}"
20937 
20938   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20939 
20940   # First separate the path from the arguments. This will split at the first
20941   # space.
20942   complete="$PROPER_COMPILER_CXX"
20943   path="${complete%% *}"
20944   tmp="$complete EOL"
20945   arguments="${tmp#* }"
20946 
20947   # Input might be given as Windows format, start by converting to
20948   # unix format.
20949   new_path="$path"
20950 
20951   windows_path="$new_path"
20952   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20953     unix_path=`$CYGPATH -u "$windows_path"`
20954     new_path="$unix_path"
20955   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20956     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20957     new_path="$unix_path"
20958   fi
20959 
20960 
20961   # Now try to locate executable using which
20962   new_path=`$WHICH "$new_path" 2> /dev/null`
20963 
20964   if test "x$new_path" = x; then
20965     # Oops. Which didn't find the executable.
20966     # The splitting of arguments from the executable at a space might have been incorrect,
20967     # since paths with space are more likely in Windows. Give it another try with the whole
20968     # argument.
20969     path="$complete"
20970     arguments="EOL"
20971     new_path="$path"
20972 
20973   windows_path="$new_path"
20974   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20975     unix_path=`$CYGPATH -u "$windows_path"`
20976     new_path="$unix_path"
20977   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20978     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20979     new_path="$unix_path"
20980   fi
20981 
20982 
20983     new_path=`$WHICH "$new_path" 2> /dev/null`
20984 
20985     if test "x$new_path" = x; then
20986       # It's still not found. Now this is an unrecoverable error.
20987       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
20988 $as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
20989       has_space=`$ECHO "$complete" | $GREP " "`
20990       if test "x$has_space" != x; then
20991         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20992 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20993       fi
20994       as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
20995     fi
20996   fi
20997 
20998   # Now new_path has a complete unix path to the binary
20999   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
21000     # Keep paths in /bin as-is, but remove trailing .exe if any
21001     new_path="${new_path/%.exe/}"
21002     # Do not save /bin paths to all_fixpath_prefixes!
21003   else
21004     # Not in mixed or Windows style, start by that.
21005     new_path=`cmd //c echo $new_path`
21006 
21007   input_path="$new_path"
21008   # Check if we need to convert this using DOS-style short mode. If the path
21009   # contains just simple characters, use it. Otherwise (spaces, weird characters),
21010   # take no chances and rewrite it.
21011   # Note: m4 eats our [], so we need to use [ and ] instead.
21012   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21013   if test "x$has_forbidden_chars" != x; then
21014     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21015     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21016   fi
21017 
21018     # Output is in $new_path
21019 
21020   windows_path="$new_path"
21021   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21022     unix_path=`$CYGPATH -u "$windows_path"`
21023     new_path="$unix_path"
21024   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21025     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21026     new_path="$unix_path"
21027   fi
21028 
21029     # remove trailing .exe if any
21030     new_path="${new_path/%.exe/}"
21031 
21032     # Save the first 10 bytes of this path to the storage, so fixpath can work.
21033     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21034   fi
21035 
21036   else
21037     # We're on a posix platform. Hooray! :)
21038     # First separate the path from the arguments. This will split at the first
21039     # space.
21040     complete="$PROPER_COMPILER_CXX"
21041     path="${complete%% *}"
21042     tmp="$complete EOL"
21043     arguments="${tmp#* }"
21044 
21045     # Cannot rely on the command "which" here since it doesn't always work.
21046     is_absolute_path=`$ECHO "$path" | $GREP ^/`
21047     if test -z "$is_absolute_path"; then
21048       # Path to executable is not absolute. Find it.
21049       IFS_save="$IFS"
21050       IFS=:
21051       for p in $PATH; do
21052         if test -f "$p/$path" && test -x "$p/$path"; then
21053           new_path="$p/$path"
21054           break
21055         fi
21056       done
21057       IFS="$IFS_save"
21058     else
21059       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving PROPER_COMPILER_CXX (as $path) failed, using $path directly." >&5
21060 $as_echo "$as_me: Resolving PROPER_COMPILER_CXX (as $path) failed, using $path directly." >&6;}
21061       new_path="$path"
21062     fi
21063 
21064     if test "x$new_path" = x; then
21065         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
21066 $as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
21067         has_space=`$ECHO "$complete" | $GREP " "`
21068         if test "x$has_space" != x; then
21069           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
21070 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
21071         fi
21072         as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
21073       fi
21074   fi
21075 
21076       # Now join together the path and the arguments once again
21077       if test "x$arguments" != xEOL; then
21078         new_complete="$new_path ${arguments% *}"
21079       else
21080         new_complete="$new_path"
21081       fi
21082 
21083   if test "x$complete" != "x$new_complete"; then
21084       PROPER_COMPILER_CXX="$new_complete"
21085       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&5
21086 $as_echo "$as_me: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&6;}
21087     fi
21088 
21089     PATH="$RETRY_COMPILER_SAVED_PATH"
21090 
21091     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CXX" >&5
21092 $as_echo_n "checking for resolved symbolic links for CXX... " >&6; }
21093 
21094     if test "x$OPENJDK_BUILD_OS" != xwindows; then
21095         # Follow a chain of symbolic links. Use readlink
21096         # where it exists, else fall back to horribly
21097         # complicated shell code.
21098         if test "x$READLINK_TESTED" != yes; then
21099             # On MacOSX there is a readlink tool with a different
21100             # purpose than the GNU readlink tool. Check the found readlink.
21101             ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
21102             if test "x$ISGNU" = x; then
21103                  # A readlink that we do not know how to use.
21104                  # Are there other non-GNU readlinks out there?
21105                  READLINK_TESTED=yes
21106                  READLINK=
21107             fi
21108         fi
21109 
21110         if test "x$READLINK" != x; then
21111             PROPER_COMPILER_CXX=`$READLINK -f $PROPER_COMPILER_CXX`
21112         else
21113             # Save the current directory for restoring afterwards
21114             STARTDIR=$PWD
21115             COUNTER=0
21116             sym_link_dir=`$DIRNAME $PROPER_COMPILER_CXX`
21117             sym_link_file=`$BASENAME $PROPER_COMPILER_CXX`
21118             # Use the system pwd and not the shell builtin to resolve directory symlinks
21119             cd $sym_link_dir
21120             cd `$THEPWDCMD`
21121             sym_link_dir=`$THEPWDCMD`
21122             # Resolve file symlinks
21123             while test $COUNTER -lt 20; do
21124                 ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
21125                 if test "x$ISLINK" == x; then
21126                     # This is not a symbolic link! We are done!
21127                     break
21128                 fi
21129                 # Again resolve directory symlinks since the target of the just found
21130                 # link could be in a different directory
21131                 cd `$DIRNAME $ISLINK`
21132                 sym_link_dir=`$THEPWDCMD`
21133                 sym_link_file=`$BASENAME $ISLINK`
21134                 let COUNTER=COUNTER+1
21135             done
21136             cd $STARTDIR
21137             PROPER_COMPILER_CXX=$sym_link_dir/$sym_link_file
21138         fi
21139     fi
21140 
21141     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5
21142 $as_echo "$PROPER_COMPILER_CXX" >&6; }
21143     CXX="$PROPER_COMPILER_CXX"
21144   else
21145     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CXX" >&5
21146 $as_echo "no, keeping CXX" >&6; }
21147     CXX="$TEST_COMPILER"
21148   fi
21149 
21150   COMPILER=$CXX
21151   COMPILER_NAME=$COMPILER_NAME
21152 
21153   if test "x$OPENJDK_TARGET_OS" = xsolaris; then
21154     # Make sure we use the Sun Studio compiler and not gcc on Solaris, which won't work
21155     COMPILER_VERSION_TEST=`$COMPILER -V 2>&1 | $HEAD -n 1`
21156     $ECHO $COMPILER_VERSION_TEST | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
21157     if test $? -ne 0; then
21158       GCC_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
21159 
21160       { $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
21161 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required Sun Studio compiler." >&6;}
21162       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&5
21163 $as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&6;}
21164       as_fn_error $? "Sun Studio compiler is required. Try setting --with-tools-dir." "$LINENO" 5
21165     else
21166       COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/p"`
21167       COMPILER_VENDOR="Sun Studio"
21168     fi
21169   elif test  "x$OPENJDK_TARGET_OS" = xwindows; then
21170     # First line typically looks something like:
21171     # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.30319.01 for 80x86
21172     COMPILER_VERSION_TEST=`$COMPILER 2>&1 | $HEAD -n 1`
21173     COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*Version \([1-9][0-9.]*\) .*/\1/p"`
21174     COMPILER_VENDOR="Microsoft CL.EXE"
21175     COMPILER_CPU_TEST=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* for \(.*\)$/\1/p"`
21176     if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
21177       if test "x$COMPILER_CPU_TEST" != "x80x86"; then
21178         as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"80x86\"." "$LINENO" 5
21179       fi
21180     elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
21181       if test "x$COMPILER_CPU_TEST" != "xx64"; then
21182         as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." "$LINENO" 5
21183       fi
21184     fi
21185   else
21186     COMPILER_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
21187     # Check that this is likely to be GCC.
21188     $COMPILER --version 2>&1 | $GREP "Free Software Foundation" > /dev/null
21189     if test $? -ne 0; then
21190       { $as_echo "$as_me:${as_lineno-$LINENO}: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&5
21191 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&6;}
21192       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&5
21193 $as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&6;}
21194       as_fn_error $? "GCC compiler is required. Try setting --with-tools-dir." "$LINENO" 5
21195     fi
21196 
21197     # First line typically looks something like:
21198     # gcc (Ubuntu/Linaro 4.5.2-8ubuntu4) 4.5.2
21199     COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* \([1-9][0-9.]*\)/\1/p"`
21200     COMPILER_VENDOR=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^\(.*\) [1-9][0-9.]*/\1/p"`
21201   fi
21202   # This sets CC_VERSION or CXX_VERSION. (This comment is a grep marker)
21203   CXX_VERSION="$COMPILER_VERSION"
21204   # This sets CC_VENDOR or CXX_VENDOR. (This comment is a grep marker)
21205   CXX_VENDOR="$COMPILER_VENDOR"
21206 
21207   { $as_echo "$as_me:${as_lineno-$LINENO}: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&5
21208 $as_echo "$as_me: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&6;}
21209 
21210 
21211 # Now that we have resolved CXX ourself, let autoconf have its go at it
21212 ac_ext=cpp
21213 ac_cpp='$CXXCPP $CPPFLAGS'
21214 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
21215 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
21216 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
21217 if test -z "$CXX"; then
21218   if test -n "$CCC"; then
21219     CXX=$CCC
21220   else
21221     if test -n "$ac_tool_prefix"; then
21222   for ac_prog in $CXX
21223   do
21224     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
21225 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
21226 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21227 $as_echo_n "checking for $ac_word... " >&6; }
21228 if test "${ac_cv_prog_CXX+set}" = set; then :
21229   $as_echo_n "(cached) " >&6
21230 else
21231   if test -n "$CXX"; then
21232   ac_cv_prog_CXX="$CXX" # Let the user override the test.
21233 else
21234 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21235 for as_dir in $PATH
21236 do
21237   IFS=$as_save_IFS
21238   test -z "$as_dir" && as_dir=.
21239     for ac_exec_ext in '' $ac_executable_extensions; do
21240   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
21241     ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
21242     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21243     break 2
21244   fi
21245 done
21246   done
21247 IFS=$as_save_IFS
21248 
21249 fi
21250 fi
21251 CXX=$ac_cv_prog_CXX
21252 if test -n "$CXX"; then
21253   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
21254 $as_echo "$CXX" >&6; }
21255 else
21256   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21257 $as_echo "no" >&6; }
21258 fi
21259 
21260 
21261     test -n "$CXX" && break
21262   done
21263 fi
21264 if test -z "$CXX"; then
21265   ac_ct_CXX=$CXX
21266   for ac_prog in $CXX
21267 do
21268   # Extract the first word of "$ac_prog", so it can be a program name with args.
21269 set dummy $ac_prog; ac_word=$2
21270 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21271 $as_echo_n "checking for $ac_word... " >&6; }
21272 if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then :
21273   $as_echo_n "(cached) " >&6
21274 else
21275   if test -n "$ac_ct_CXX"; then
21276   ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
21277 else
21278 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21279 for as_dir in $PATH
21280 do
21281   IFS=$as_save_IFS
21282   test -z "$as_dir" && as_dir=.
21283     for ac_exec_ext in '' $ac_executable_extensions; do
21284   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
21285     ac_cv_prog_ac_ct_CXX="$ac_prog"
21286     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21287     break 2
21288   fi
21289 done
21290   done
21291 IFS=$as_save_IFS
21292 
21293 fi
21294 fi
21295 ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
21296 if test -n "$ac_ct_CXX"; then
21297   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
21298 $as_echo "$ac_ct_CXX" >&6; }
21299 else
21300   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21301 $as_echo "no" >&6; }
21302 fi
21303 
21304 
21305   test -n "$ac_ct_CXX" && break
21306 done
21307 
21308   if test "x$ac_ct_CXX" = x; then
21309     CXX="g++"
21310   else
21311     case $cross_compiling:$ac_tool_warned in
21312 yes:)
21313 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
21314 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
21315 ac_tool_warned=yes ;;
21316 esac
21317     CXX=$ac_ct_CXX
21318   fi
21319 fi
21320 
21321   fi
21322 fi
21323 # Provide some information about the compiler.
21324 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
21325 set X $ac_compile
21326 ac_compiler=$2
21327 for ac_option in --version -v -V -qversion; do
21328   { { ac_try="$ac_compiler $ac_option >&5"
21329 case "(($ac_try" in
21330   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21331   *) ac_try_echo=$ac_try;;
21332 esac
21333 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
21334 $as_echo "$ac_try_echo"; } >&5
21335   (eval "$ac_compiler $ac_option >&5") 2>conftest.err
21336   ac_status=$?
21337   if test -s conftest.err; then
21338     sed '10a\
21339 ... rest of stderr output deleted ...
21340          10q' conftest.err >conftest.er1
21341     cat conftest.er1 >&5
21342   fi
21343   rm -f conftest.er1 conftest.err
21344   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
21345   test $ac_status = 0; }
21346 done
21347 
21348 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
21349 $as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
21350 if test "${ac_cv_cxx_compiler_gnu+set}" = set; then :
21351   $as_echo_n "(cached) " >&6
21352 else
21353   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21354 /* end confdefs.h.  */
21355 
21356 int
21357 main ()
21358 {
21359 #ifndef __GNUC__
21360        choke me
21361 #endif
21362 
21363   ;
21364   return 0;
21365 }
21366 _ACEOF
21367 if ac_fn_cxx_try_compile "$LINENO"; then :
21368   ac_compiler_gnu=yes
21369 else
21370   ac_compiler_gnu=no
21371 fi
21372 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21373 ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
21374 
21375 fi
21376 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
21377 $as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
21378 if test $ac_compiler_gnu = yes; then
21379   GXX=yes
21380 else
21381   GXX=
21382 fi
21383 ac_test_CXXFLAGS=${CXXFLAGS+set}
21384 ac_save_CXXFLAGS=$CXXFLAGS
21385 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
21386 $as_echo_n "checking whether $CXX accepts -g... " >&6; }
21387 if test "${ac_cv_prog_cxx_g+set}" = set; then :
21388   $as_echo_n "(cached) " >&6
21389 else
21390   ac_save_cxx_werror_flag=$ac_cxx_werror_flag
21391    ac_cxx_werror_flag=yes
21392    ac_cv_prog_cxx_g=no
21393    CXXFLAGS="-g"
21394    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21395 /* end confdefs.h.  */
21396 
21397 int
21398 main ()
21399 {
21400 
21401   ;
21402   return 0;
21403 }
21404 _ACEOF
21405 if ac_fn_cxx_try_compile "$LINENO"; then :
21406   ac_cv_prog_cxx_g=yes
21407 else
21408   CXXFLAGS=""
21409       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21410 /* end confdefs.h.  */
21411 
21412 int
21413 main ()
21414 {
21415 
21416   ;
21417   return 0;
21418 }
21419 _ACEOF
21420 if ac_fn_cxx_try_compile "$LINENO"; then :
21421 
21422 else
21423   ac_cxx_werror_flag=$ac_save_cxx_werror_flag
21424          CXXFLAGS="-g"
21425          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21426 /* end confdefs.h.  */
21427 
21428 int
21429 main ()
21430 {
21431 
21432   ;
21433   return 0;
21434 }
21435 _ACEOF
21436 if ac_fn_cxx_try_compile "$LINENO"; then :
21437   ac_cv_prog_cxx_g=yes
21438 fi
21439 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
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    ac_cxx_werror_flag=$ac_save_cxx_werror_flag
21445 fi
21446 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
21447 $as_echo "$ac_cv_prog_cxx_g" >&6; }
21448 if test "$ac_test_CXXFLAGS" = set; then
21449   CXXFLAGS=$ac_save_CXXFLAGS
21450 elif test $ac_cv_prog_cxx_g = yes; then
21451   if test "$GXX" = yes; then
21452     CXXFLAGS="-g -O2"
21453   else
21454     CXXFLAGS="-g"
21455   fi
21456 else
21457   if test "$GXX" = yes; then
21458     CXXFLAGS="-O2"
21459   else
21460     CXXFLAGS=
21461   fi
21462 fi
21463 ac_ext=cpp
21464 ac_cpp='$CXXCPP $CPPFLAGS'
21465 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
21466 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
21467 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
21468 
21469 
21470 ### Locate other tools
21471 
21472 if test "x$OPENJDK_TARGET_OS" = xmacosx; then
21473     ac_ext=m
21474 ac_cpp='$OBJCPP $CPPFLAGS'
21475 ac_compile='$OBJC -c $OBJCFLAGS $CPPFLAGS conftest.$ac_ext >&5'
21476 ac_link='$OBJC -o conftest$ac_exeext $OBJCFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
21477 ac_compiler_gnu=$ac_cv_objc_compiler_gnu
21478 if test -n "$ac_tool_prefix"; then
21479   for ac_prog in gcc objcc objc cc CC
21480   do
21481     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
21482 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
21483 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21484 $as_echo_n "checking for $ac_word... " >&6; }
21485 if test "${ac_cv_prog_OBJC+set}" = set; then :
21486   $as_echo_n "(cached) " >&6
21487 else
21488   if test -n "$OBJC"; then
21489   ac_cv_prog_OBJC="$OBJC" # Let the user override the test.
21490 else
21491 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21492 for as_dir in $PATH
21493 do
21494   IFS=$as_save_IFS
21495   test -z "$as_dir" && as_dir=.
21496     for ac_exec_ext in '' $ac_executable_extensions; do
21497   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
21498     ac_cv_prog_OBJC="$ac_tool_prefix$ac_prog"
21499     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21500     break 2
21501   fi
21502 done
21503   done
21504 IFS=$as_save_IFS
21505 
21506 fi
21507 fi
21508 OBJC=$ac_cv_prog_OBJC
21509 if test -n "$OBJC"; then
21510   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJC" >&5
21511 $as_echo "$OBJC" >&6; }
21512 else
21513   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21514 $as_echo "no" >&6; }
21515 fi
21516 
21517 
21518     test -n "$OBJC" && break
21519   done
21520 fi
21521 if test -z "$OBJC"; then
21522   ac_ct_OBJC=$OBJC
21523   for ac_prog in gcc objcc objc cc CC
21524 do
21525   # Extract the first word of "$ac_prog", so it can be a program name with args.
21526 set dummy $ac_prog; ac_word=$2
21527 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21528 $as_echo_n "checking for $ac_word... " >&6; }
21529 if test "${ac_cv_prog_ac_ct_OBJC+set}" = set; then :
21530   $as_echo_n "(cached) " >&6
21531 else
21532   if test -n "$ac_ct_OBJC"; then
21533   ac_cv_prog_ac_ct_OBJC="$ac_ct_OBJC" # Let the user override the test.
21534 else
21535 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21536 for as_dir in $PATH
21537 do
21538   IFS=$as_save_IFS
21539   test -z "$as_dir" && as_dir=.
21540     for ac_exec_ext in '' $ac_executable_extensions; do
21541   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
21542     ac_cv_prog_ac_ct_OBJC="$ac_prog"
21543     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21544     break 2
21545   fi
21546 done
21547   done
21548 IFS=$as_save_IFS
21549 
21550 fi
21551 fi
21552 ac_ct_OBJC=$ac_cv_prog_ac_ct_OBJC
21553 if test -n "$ac_ct_OBJC"; then
21554   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJC" >&5
21555 $as_echo "$ac_ct_OBJC" >&6; }
21556 else
21557   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21558 $as_echo "no" >&6; }
21559 fi
21560 
21561 
21562   test -n "$ac_ct_OBJC" && break
21563 done
21564 
21565   if test "x$ac_ct_OBJC" = x; then
21566     OBJC="gcc"
21567   else
21568     case $cross_compiling:$ac_tool_warned in
21569 yes:)
21570 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
21571 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
21572 ac_tool_warned=yes ;;
21573 esac
21574     OBJC=$ac_ct_OBJC
21575   fi
21576 fi
21577 
21578 # Provide some information about the compiler.
21579 $as_echo "$as_me:${as_lineno-$LINENO}: checking for Objective C compiler version" >&5
21580 set X $ac_compile
21581 ac_compiler=$2
21582 for ac_option in --version -v -V -qversion; do
21583   { { ac_try="$ac_compiler $ac_option >&5"
21584 case "(($ac_try" in
21585   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21586   *) ac_try_echo=$ac_try;;
21587 esac
21588 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
21589 $as_echo "$ac_try_echo"; } >&5
21590   (eval "$ac_compiler $ac_option >&5") 2>conftest.err
21591   ac_status=$?
21592   if test -s conftest.err; then
21593     sed '10a\
21594 ... rest of stderr output deleted ...
21595          10q' conftest.err >conftest.er1
21596     cat conftest.er1 >&5
21597   fi
21598   rm -f conftest.er1 conftest.err
21599   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
21600   test $ac_status = 0; }
21601 done
21602 
21603 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU Objective C compiler" >&5
21604 $as_echo_n "checking whether we are using the GNU Objective C compiler... " >&6; }
21605 if test "${ac_cv_objc_compiler_gnu+set}" = set; then :
21606   $as_echo_n "(cached) " >&6
21607 else
21608   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21609 /* end confdefs.h.  */
21610 
21611 int
21612 main ()
21613 {
21614 #ifndef __GNUC__
21615        choke me
21616 #endif
21617 
21618   ;
21619   return 0;
21620 }
21621 _ACEOF
21622 if ac_fn_objc_try_compile "$LINENO"; then :
21623   ac_compiler_gnu=yes
21624 else
21625   ac_compiler_gnu=no
21626 fi
21627 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21628 ac_cv_objc_compiler_gnu=$ac_compiler_gnu
21629 
21630 fi
21631 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objc_compiler_gnu" >&5
21632 $as_echo "$ac_cv_objc_compiler_gnu" >&6; }
21633 if test $ac_compiler_gnu = yes; then
21634   GOBJC=yes
21635 else
21636   GOBJC=
21637 fi
21638 ac_test_OBJCFLAGS=${OBJCFLAGS+set}
21639 ac_save_OBJCFLAGS=$OBJCFLAGS
21640 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $OBJC accepts -g" >&5
21641 $as_echo_n "checking whether $OBJC accepts -g... " >&6; }
21642 if test "${ac_cv_prog_objc_g+set}" = set; then :
21643   $as_echo_n "(cached) " >&6
21644 else
21645   ac_save_objc_werror_flag=$ac_objc_werror_flag
21646    ac_objc_werror_flag=yes
21647    ac_cv_prog_objc_g=no
21648    OBJCFLAGS="-g"
21649    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21650 /* end confdefs.h.  */
21651 
21652 int
21653 main ()
21654 {
21655 
21656   ;
21657   return 0;
21658 }
21659 _ACEOF
21660 if ac_fn_objc_try_compile "$LINENO"; then :
21661   ac_cv_prog_objc_g=yes
21662 else
21663   OBJCFLAGS=""
21664       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21665 /* end confdefs.h.  */
21666 
21667 int
21668 main ()
21669 {
21670 
21671   ;
21672   return 0;
21673 }
21674 _ACEOF
21675 if ac_fn_objc_try_compile "$LINENO"; then :
21676 
21677 else
21678   ac_objc_werror_flag=$ac_save_objc_werror_flag
21679          OBJCFLAGS="-g"
21680          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21681 /* end confdefs.h.  */
21682 
21683 int
21684 main ()
21685 {
21686 
21687   ;
21688   return 0;
21689 }
21690 _ACEOF
21691 if ac_fn_objc_try_compile "$LINENO"; then :
21692   ac_cv_prog_objc_g=yes
21693 fi
21694 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
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    ac_objc_werror_flag=$ac_save_objc_werror_flag
21700 fi
21701 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_objc_g" >&5
21702 $as_echo "$ac_cv_prog_objc_g" >&6; }
21703 if test "$ac_test_OBJCFLAGS" = set; then
21704   OBJCFLAGS=$ac_save_OBJCFLAGS
21705 elif test $ac_cv_prog_objc_g = yes; then
21706   if test "$GOBJC" = yes; then
21707     OBJCFLAGS="-g -O2"
21708   else
21709     OBJCFLAGS="-g"
21710   fi
21711 else
21712   if test "$GOBJC" = yes; then
21713     OBJCFLAGS="-O2"
21714   else
21715     OBJCFLAGS=
21716   fi
21717 fi
21718 ac_ext=cpp
21719 ac_cpp='$CXXCPP $CPPFLAGS'
21720 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
21721 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
21722 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
21723 
21724 
21725   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21726 
21727   # First separate the path from the arguments. This will split at the first
21728   # space.
21729   complete="$OBJC"
21730   path="${complete%% *}"
21731   tmp="$complete EOL"
21732   arguments="${tmp#* }"
21733 
21734   # Input might be given as Windows format, start by converting to
21735   # unix format.
21736   new_path=`$CYGPATH -u "$path"`
21737 
21738   # Now try to locate executable using which
21739   new_path=`$WHICH "$new_path" 2> /dev/null`
21740   # bat and cmd files are not always considered executable in cygwin causing which
21741   # to not find them
21742   if test "x$new_path" = x \
21743            && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21744            && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21745     new_path=`$CYGPATH -u "$path"`
21746   fi
21747   if test "x$new_path" = x; then
21748     # Oops. Which didn't find the executable.
21749     # The splitting of arguments from the executable at a space might have been incorrect,
21750     # since paths with space are more likely in Windows. Give it another try with the whole
21751     # argument.
21752     path="$complete"
21753     arguments="EOL"
21754     new_path=`$CYGPATH -u "$path"`
21755     new_path=`$WHICH "$new_path" 2> /dev/null`
21756     # bat and cmd files are not always considered executable in cygwin causing which
21757     # to not find them
21758     if test "x$new_path" = x \
21759              && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21760              && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21761       new_path=`$CYGPATH -u "$path"`
21762     fi
21763     if test "x$new_path" = x; then
21764       # It's still not found. Now this is an unrecoverable error.
21765       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
21766 $as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
21767       has_space=`$ECHO "$complete" | $GREP " "`
21768       if test "x$has_space" != x; then
21769         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21770 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21771       fi
21772       as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
21773     fi
21774   fi
21775 
21776   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21777   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21778   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21779   # "foo.exe" is OK but "foo" is an error.
21780   #
21781   # This test is therefore slightly more accurate than "test -f" to check for file precense.
21782   # It is also a way to make sure we got the proper file name for the real test later on.
21783   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21784   if test "x$test_shortpath" = x; then
21785     # Short path failed, file does not exist as specified.
21786     # Try adding .exe or .cmd
21787     if test -f "${new_path}.exe"; then
21788        input_to_shortpath="${new_path}.exe"
21789     elif test -f "${new_path}.cmd"; then
21790        input_to_shortpath="${new_path}.cmd"
21791     else
21792       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$new_path\", is invalid." >&5
21793 $as_echo "$as_me: The path of OBJC, which resolves as \"$new_path\", is invalid." >&6;}
21794       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
21795 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
21796       as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
21797     fi
21798   else
21799     input_to_shortpath="$new_path"
21800   fi
21801 
21802   # Call helper function which possibly converts this using DOS-style short mode.
21803   # If so, the updated path is stored in $new_path.
21804   new_path="$input_to_shortpath"
21805 
21806   input_path="$input_to_shortpath"
21807   # Check if we need to convert this using DOS-style short mode. If the path
21808   # contains just simple characters, use it. Otherwise (spaces, weird characters),
21809   # take no chances and rewrite it.
21810   # Note: m4 eats our [], so we need to use [ and ] instead.
21811   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21812   if test "x$has_forbidden_chars" != x; then
21813     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21814     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21815     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21816     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21817       # Going to short mode and back again did indeed matter. Since short mode is
21818       # case insensitive, let's make it lowercase to improve readability.
21819       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21820       # Now convert it back to Unix-stile (cygpath)
21821       input_path=`$CYGPATH -u "$shortmode_path"`
21822       new_path="$input_path"
21823     fi
21824   fi
21825 
21826   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21827   if test "x$test_cygdrive_prefix" = x; then
21828     # As a simple fix, exclude /usr/bin since it's not a real path.
21829     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
21830       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21831       # a path prefixed by /cygdrive for fixpath to work.
21832       new_path="$CYGWIN_ROOT_PATH$input_path"
21833     fi
21834   fi
21835 
21836   # remove trailing .exe if any
21837   new_path="${new_path/%.exe/}"
21838 
21839   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21840 
21841   # First separate the path from the arguments. This will split at the first
21842   # space.
21843   complete="$OBJC"
21844   path="${complete%% *}"
21845   tmp="$complete EOL"
21846   arguments="${tmp#* }"
21847 
21848   # Input might be given as Windows format, start by converting to
21849   # unix format.
21850   new_path="$path"
21851 
21852   windows_path="$new_path"
21853   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21854     unix_path=`$CYGPATH -u "$windows_path"`
21855     new_path="$unix_path"
21856   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21857     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21858     new_path="$unix_path"
21859   fi
21860 
21861 
21862   # Now try to locate executable using which
21863   new_path=`$WHICH "$new_path" 2> /dev/null`
21864 
21865   if test "x$new_path" = x; then
21866     # Oops. Which didn't find the executable.
21867     # The splitting of arguments from the executable at a space might have been incorrect,
21868     # since paths with space are more likely in Windows. Give it another try with the whole
21869     # argument.
21870     path="$complete"
21871     arguments="EOL"
21872     new_path="$path"
21873 
21874   windows_path="$new_path"
21875   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21876     unix_path=`$CYGPATH -u "$windows_path"`
21877     new_path="$unix_path"
21878   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21879     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21880     new_path="$unix_path"
21881   fi
21882 
21883 
21884     new_path=`$WHICH "$new_path" 2> /dev/null`
21885 
21886     if test "x$new_path" = x; then
21887       # It's still not found. Now this is an unrecoverable error.
21888       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
21889 $as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
21890       has_space=`$ECHO "$complete" | $GREP " "`
21891       if test "x$has_space" != x; then
21892         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21893 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21894       fi
21895       as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
21896     fi
21897   fi
21898 
21899   # Now new_path has a complete unix path to the binary
21900   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
21901     # Keep paths in /bin as-is, but remove trailing .exe if any
21902     new_path="${new_path/%.exe/}"
21903     # Do not save /bin paths to all_fixpath_prefixes!
21904   else
21905     # Not in mixed or Windows style, start by that.
21906     new_path=`cmd //c echo $new_path`
21907 
21908   input_path="$new_path"
21909   # Check if we need to convert this using DOS-style short mode. If the path
21910   # contains just simple characters, use it. Otherwise (spaces, weird characters),
21911   # take no chances and rewrite it.
21912   # Note: m4 eats our [], so we need to use [ and ] instead.
21913   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21914   if test "x$has_forbidden_chars" != x; then
21915     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21916     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21917   fi
21918 
21919     # Output is in $new_path
21920 
21921   windows_path="$new_path"
21922   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21923     unix_path=`$CYGPATH -u "$windows_path"`
21924     new_path="$unix_path"
21925   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21926     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21927     new_path="$unix_path"
21928   fi
21929 
21930     # remove trailing .exe if any
21931     new_path="${new_path/%.exe/}"
21932 
21933     # Save the first 10 bytes of this path to the storage, so fixpath can work.
21934     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21935   fi
21936 
21937   else
21938     # We're on a posix platform. Hooray! :)
21939     # First separate the path from the arguments. This will split at the first
21940     # space.
21941     complete="$OBJC"
21942     path="${complete%% *}"
21943     tmp="$complete EOL"
21944     arguments="${tmp#* }"
21945 
21946     # Cannot rely on the command "which" here since it doesn't always work.
21947     is_absolute_path=`$ECHO "$path" | $GREP ^/`
21948     if test -z "$is_absolute_path"; then
21949       # Path to executable is not absolute. Find it.
21950       IFS_save="$IFS"
21951       IFS=:
21952       for p in $PATH; do
21953         if test -f "$p/$path" && test -x "$p/$path"; then
21954           new_path="$p/$path"
21955           break
21956         fi
21957       done
21958       IFS="$IFS_save"
21959     else
21960       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving OBJC (as $path) failed, using $path directly." >&5
21961 $as_echo "$as_me: Resolving OBJC (as $path) failed, using $path directly." >&6;}
21962       new_path="$path"
21963     fi
21964 
21965     if test "x$new_path" = x; then
21966         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
21967 $as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
21968         has_space=`$ECHO "$complete" | $GREP " "`
21969         if test "x$has_space" != x; then
21970           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
21971 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
21972         fi
21973         as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
21974       fi
21975   fi
21976 
21977       # Now join together the path and the arguments once again
21978       if test "x$arguments" != xEOL; then
21979         new_complete="$new_path ${arguments% *}"
21980       else
21981         new_complete="$new_path"
21982       fi
21983 
21984   if test "x$complete" != "x$new_complete"; then
21985       OBJC="$new_complete"
21986       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJC to \"$new_complete\"" >&5
21987 $as_echo "$as_me: Rewriting OBJC to \"$new_complete\"" >&6;}
21988     fi
21989 
21990 else
21991     OBJC=
21992 fi
21993 
21994 # Restore the flags to the user specified values.
21995 # This is necessary since AC_PROG_CC defaults CFLAGS to "-g -O2"
21996 CFLAGS="$ORG_CFLAGS"
21997 CXXFLAGS="$ORG_CXXFLAGS"
21998 OBJCFLAGS="$ORG_OBJCFLAGS"
21999 
22000 LD="$CC"
22001 LDEXE="$CC"
22002 LDCXX="$CXX"
22003 LDEXECXX="$CXX"
22004 
22005 # LDEXE is the linker to use, when creating executables.
22006 
22007 # Linking C++ libraries.
22008 
22009 # Linking C++ executables.
22010 
22011 
22012 if test "x$OPENJDK_TARGET_OS" != xwindows; then
22013     if test -n "$ac_tool_prefix"; then
22014   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
22015 set dummy ${ac_tool_prefix}ar; ac_word=$2
22016 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22017 $as_echo_n "checking for $ac_word... " >&6; }
22018 if test "${ac_cv_prog_AR+set}" = set; then :
22019   $as_echo_n "(cached) " >&6
22020 else
22021   if test -n "$AR"; then
22022   ac_cv_prog_AR="$AR" # Let the user override the test.
22023 else
22024 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22025 for as_dir in $PATH
22026 do
22027   IFS=$as_save_IFS
22028   test -z "$as_dir" && as_dir=.
22029     for ac_exec_ext in '' $ac_executable_extensions; do
22030   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
22031     ac_cv_prog_AR="${ac_tool_prefix}ar"
22032     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22033     break 2
22034   fi
22035 done
22036   done
22037 IFS=$as_save_IFS
22038 
22039 fi
22040 fi
22041 AR=$ac_cv_prog_AR
22042 if test -n "$AR"; then
22043   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
22044 $as_echo "$AR" >&6; }
22045 else
22046   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22047 $as_echo "no" >&6; }
22048 fi
22049 
22050 
22051 fi
22052 if test -z "$ac_cv_prog_AR"; then
22053   ac_ct_AR=$AR
22054   # Extract the first word of "ar", so it can be a program name with args.
22055 set dummy ar; ac_word=$2
22056 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22057 $as_echo_n "checking for $ac_word... " >&6; }
22058 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then :
22059   $as_echo_n "(cached) " >&6
22060 else
22061   if test -n "$ac_ct_AR"; then
22062   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
22063 else
22064 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22065 for as_dir in $PATH
22066 do
22067   IFS=$as_save_IFS
22068   test -z "$as_dir" && as_dir=.
22069     for ac_exec_ext in '' $ac_executable_extensions; do
22070   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
22071     ac_cv_prog_ac_ct_AR="ar"
22072     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22073     break 2
22074   fi
22075 done
22076   done
22077 IFS=$as_save_IFS
22078 
22079 fi
22080 fi
22081 ac_ct_AR=$ac_cv_prog_ac_ct_AR
22082 if test -n "$ac_ct_AR"; then
22083   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
22084 $as_echo "$ac_ct_AR" >&6; }
22085 else
22086   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22087 $as_echo "no" >&6; }
22088 fi
22089 
22090   if test "x$ac_ct_AR" = x; then
22091     AR=""
22092   else
22093     case $cross_compiling:$ac_tool_warned in
22094 yes:)
22095 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
22096 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
22097 ac_tool_warned=yes ;;
22098 esac
22099     AR=$ac_ct_AR
22100   fi
22101 else
22102   AR="$ac_cv_prog_AR"
22103 fi
22104 
22105 
22106   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22107 
22108   # First separate the path from the arguments. This will split at the first
22109   # space.
22110   complete="$AR"
22111   path="${complete%% *}"
22112   tmp="$complete EOL"
22113   arguments="${tmp#* }"
22114 
22115   # Input might be given as Windows format, start by converting to
22116   # unix format.
22117   new_path=`$CYGPATH -u "$path"`
22118 
22119   # Now try to locate executable using which
22120   new_path=`$WHICH "$new_path" 2> /dev/null`
22121   # bat and cmd files are not always considered executable in cygwin causing which
22122   # to not find them
22123   if test "x$new_path" = x \
22124            && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22125            && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22126     new_path=`$CYGPATH -u "$path"`
22127   fi
22128   if test "x$new_path" = x; then
22129     # Oops. Which didn't find the executable.
22130     # The splitting of arguments from the executable at a space might have been incorrect,
22131     # since paths with space are more likely in Windows. Give it another try with the whole
22132     # argument.
22133     path="$complete"
22134     arguments="EOL"
22135     new_path=`$CYGPATH -u "$path"`
22136     new_path=`$WHICH "$new_path" 2> /dev/null`
22137     # bat and cmd files are not always considered executable in cygwin causing which
22138     # to not find them
22139     if test "x$new_path" = x \
22140              && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22141              && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22142       new_path=`$CYGPATH -u "$path"`
22143     fi
22144     if test "x$new_path" = x; then
22145       # It's still not found. Now this is an unrecoverable error.
22146       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
22147 $as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
22148       has_space=`$ECHO "$complete" | $GREP " "`
22149       if test "x$has_space" != x; then
22150         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22151 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22152       fi
22153       as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
22154     fi
22155   fi
22156 
22157   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22158   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22159   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22160   # "foo.exe" is OK but "foo" is an error.
22161   #
22162   # This test is therefore slightly more accurate than "test -f" to check for file precense.
22163   # It is also a way to make sure we got the proper file name for the real test later on.
22164   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22165   if test "x$test_shortpath" = x; then
22166     # Short path failed, file does not exist as specified.
22167     # Try adding .exe or .cmd
22168     if test -f "${new_path}.exe"; then
22169        input_to_shortpath="${new_path}.exe"
22170     elif test -f "${new_path}.cmd"; then
22171        input_to_shortpath="${new_path}.cmd"
22172     else
22173       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$new_path\", is invalid." >&5
22174 $as_echo "$as_me: The path of AR, which resolves as \"$new_path\", is invalid." >&6;}
22175       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
22176 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
22177       as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
22178     fi
22179   else
22180     input_to_shortpath="$new_path"
22181   fi
22182 
22183   # Call helper function which possibly converts this using DOS-style short mode.
22184   # If so, the updated path is stored in $new_path.
22185   new_path="$input_to_shortpath"
22186 
22187   input_path="$input_to_shortpath"
22188   # Check if we need to convert this using DOS-style short mode. If the path
22189   # contains just simple characters, use it. Otherwise (spaces, weird characters),
22190   # take no chances and rewrite it.
22191   # Note: m4 eats our [], so we need to use [ and ] instead.
22192   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22193   if test "x$has_forbidden_chars" != x; then
22194     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22195     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22196     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22197     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22198       # Going to short mode and back again did indeed matter. Since short mode is
22199       # case insensitive, let's make it lowercase to improve readability.
22200       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22201       # Now convert it back to Unix-stile (cygpath)
22202       input_path=`$CYGPATH -u "$shortmode_path"`
22203       new_path="$input_path"
22204     fi
22205   fi
22206 
22207   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22208   if test "x$test_cygdrive_prefix" = x; then
22209     # As a simple fix, exclude /usr/bin since it's not a real path.
22210     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
22211       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22212       # a path prefixed by /cygdrive for fixpath to work.
22213       new_path="$CYGWIN_ROOT_PATH$input_path"
22214     fi
22215   fi
22216 
22217   # remove trailing .exe if any
22218   new_path="${new_path/%.exe/}"
22219 
22220   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22221 
22222   # First separate the path from the arguments. This will split at the first
22223   # space.
22224   complete="$AR"
22225   path="${complete%% *}"
22226   tmp="$complete EOL"
22227   arguments="${tmp#* }"
22228 
22229   # Input might be given as Windows format, start by converting to
22230   # unix format.
22231   new_path="$path"
22232 
22233   windows_path="$new_path"
22234   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22235     unix_path=`$CYGPATH -u "$windows_path"`
22236     new_path="$unix_path"
22237   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22238     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22239     new_path="$unix_path"
22240   fi
22241 
22242 
22243   # Now try to locate executable using which
22244   new_path=`$WHICH "$new_path" 2> /dev/null`
22245 
22246   if test "x$new_path" = x; then
22247     # Oops. Which didn't find the executable.
22248     # The splitting of arguments from the executable at a space might have been incorrect,
22249     # since paths with space are more likely in Windows. Give it another try with the whole
22250     # argument.
22251     path="$complete"
22252     arguments="EOL"
22253     new_path="$path"
22254 
22255   windows_path="$new_path"
22256   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22257     unix_path=`$CYGPATH -u "$windows_path"`
22258     new_path="$unix_path"
22259   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22260     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22261     new_path="$unix_path"
22262   fi
22263 
22264 
22265     new_path=`$WHICH "$new_path" 2> /dev/null`
22266 
22267     if test "x$new_path" = x; then
22268       # It's still not found. Now this is an unrecoverable error.
22269       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
22270 $as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
22271       has_space=`$ECHO "$complete" | $GREP " "`
22272       if test "x$has_space" != x; then
22273         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22274 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22275       fi
22276       as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
22277     fi
22278   fi
22279 
22280   # Now new_path has a complete unix path to the binary
22281   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
22282     # Keep paths in /bin as-is, but remove trailing .exe if any
22283     new_path="${new_path/%.exe/}"
22284     # Do not save /bin paths to all_fixpath_prefixes!
22285   else
22286     # Not in mixed or Windows style, start by that.
22287     new_path=`cmd //c echo $new_path`
22288 
22289   input_path="$new_path"
22290   # Check if we need to convert this using DOS-style short mode. If the path
22291   # contains just simple characters, use it. Otherwise (spaces, weird characters),
22292   # take no chances and rewrite it.
22293   # Note: m4 eats our [], so we need to use [ and ] instead.
22294   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22295   if test "x$has_forbidden_chars" != x; then
22296     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22297     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22298   fi
22299 
22300     # Output is in $new_path
22301 
22302   windows_path="$new_path"
22303   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22304     unix_path=`$CYGPATH -u "$windows_path"`
22305     new_path="$unix_path"
22306   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22307     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22308     new_path="$unix_path"
22309   fi
22310 
22311     # remove trailing .exe if any
22312     new_path="${new_path/%.exe/}"
22313 
22314     # Save the first 10 bytes of this path to the storage, so fixpath can work.
22315     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22316   fi
22317 
22318   else
22319     # We're on a posix platform. Hooray! :)
22320     # First separate the path from the arguments. This will split at the first
22321     # space.
22322     complete="$AR"
22323     path="${complete%% *}"
22324     tmp="$complete EOL"
22325     arguments="${tmp#* }"
22326 
22327     # Cannot rely on the command "which" here since it doesn't always work.
22328     is_absolute_path=`$ECHO "$path" | $GREP ^/`
22329     if test -z "$is_absolute_path"; then
22330       # Path to executable is not absolute. Find it.
22331       IFS_save="$IFS"
22332       IFS=:
22333       for p in $PATH; do
22334         if test -f "$p/$path" && test -x "$p/$path"; then
22335           new_path="$p/$path"
22336           break
22337         fi
22338       done
22339       IFS="$IFS_save"
22340     else
22341       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving AR (as $path) failed, using $path directly." >&5
22342 $as_echo "$as_me: Resolving AR (as $path) failed, using $path directly." >&6;}
22343       new_path="$path"
22344     fi
22345 
22346     if test "x$new_path" = x; then
22347         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
22348 $as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
22349         has_space=`$ECHO "$complete" | $GREP " "`
22350         if test "x$has_space" != x; then
22351           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
22352 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
22353         fi
22354         as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
22355       fi
22356   fi
22357 
22358       # Now join together the path and the arguments once again
22359       if test "x$arguments" != xEOL; then
22360         new_complete="$new_path ${arguments% *}"
22361       else
22362         new_complete="$new_path"
22363       fi
22364 
22365   if test "x$complete" != "x$new_complete"; then
22366       AR="$new_complete"
22367       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AR to \"$new_complete\"" >&5
22368 $as_echo "$as_me: Rewriting AR to \"$new_complete\"" >&6;}
22369     fi
22370 
22371 fi
22372 if test "x$OPENJDK_TARGET_OS" = xmacosx; then
22373     ARFLAGS="-r"
22374 else
22375     ARFLAGS=""
22376 fi
22377 
22378 
22379 # For hotspot, we need these in Windows mixed path; other platforms keep them the same
22380 HOTSPOT_CXX="$CXX"
22381 HOTSPOT_LD="$LD"
22382 
22383 
22384 
22385 COMPILER_NAME=gcc
22386 COMPILER_TYPE=CC
22387 if test "x$OPENJDK_TARGET_OS" = xwindows; then :
22388 
22389     # For now, assume that we are always compiling using cl.exe.
22390     CC_OUT_OPTION=-Fo
22391     EXE_OUT_OPTION=-out:
22392     LD_OUT_OPTION=-out:
22393     AR_OUT_OPTION=-out:
22394     # On Windows, reject /usr/bin/link (as determined in CYGWIN_LINK), which is a cygwin
22395     # program for something completely different.
22396     # Extract the first word of "link", so it can be a program name with args.
22397 set dummy link; ac_word=$2
22398 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22399 $as_echo_n "checking for $ac_word... " >&6; }
22400 if test "${ac_cv_prog_WINLD+set}" = set; then :
22401   $as_echo_n "(cached) " >&6
22402 else
22403   if test -n "$WINLD"; then
22404   ac_cv_prog_WINLD="$WINLD" # Let the user override the test.
22405 else
22406   ac_prog_rejected=no
22407 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22408 for as_dir in $PATH
22409 do
22410   IFS=$as_save_IFS
22411   test -z "$as_dir" && as_dir=.
22412     for ac_exec_ext in '' $ac_executable_extensions; do
22413   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
22414     if test "$as_dir/$ac_word$ac_exec_ext" = "$CYGWIN_LINK"; then
22415        ac_prog_rejected=yes
22416        continue
22417      fi
22418     ac_cv_prog_WINLD="link"
22419     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22420     break 2
22421   fi
22422 done
22423   done
22424 IFS=$as_save_IFS
22425 
22426 if test $ac_prog_rejected = yes; then
22427   # We found a bogon in the path, so make sure we never use it.
22428   set dummy $ac_cv_prog_WINLD
22429   shift
22430   if test $# != 0; then
22431     # We chose a different compiler from the bogus one.
22432     # However, it has the same basename, so the bogon will be chosen
22433     # first if we set WINLD to just the basename; use the full file name.
22434     shift
22435     ac_cv_prog_WINLD="$as_dir/$ac_word${1+' '}$@"
22436   fi
22437 fi
22438 fi
22439 fi
22440 WINLD=$ac_cv_prog_WINLD
22441 if test -n "$WINLD"; then
22442   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINLD" >&5
22443 $as_echo "$WINLD" >&6; }
22444 else
22445   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22446 $as_echo "no" >&6; }
22447 fi
22448 
22449 
22450     # Since we must ignore the first found link, WINLD will contain
22451     # the full path to the link.exe program.
22452 
22453   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22454 
22455   # First separate the path from the arguments. This will split at the first
22456   # space.
22457   complete="$WINLD"
22458   path="${complete%% *}"
22459   tmp="$complete EOL"
22460   arguments="${tmp#* }"
22461 
22462   # Input might be given as Windows format, start by converting to
22463   # unix format.
22464   new_path=`$CYGPATH -u "$path"`
22465 
22466   # Now try to locate executable using which
22467   new_path=`$WHICH "$new_path" 2> /dev/null`
22468   # bat and cmd files are not always considered executable in cygwin causing which
22469   # to not find them
22470   if test "x$new_path" = x \
22471            && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22472            && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22473     new_path=`$CYGPATH -u "$path"`
22474   fi
22475   if test "x$new_path" = x; then
22476     # Oops. Which didn't find the executable.
22477     # The splitting of arguments from the executable at a space might have been incorrect,
22478     # since paths with space are more likely in Windows. Give it another try with the whole
22479     # argument.
22480     path="$complete"
22481     arguments="EOL"
22482     new_path=`$CYGPATH -u "$path"`
22483     new_path=`$WHICH "$new_path" 2> /dev/null`
22484     # bat and cmd files are not always considered executable in cygwin causing which
22485     # to not find them
22486     if test "x$new_path" = x \
22487              && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22488              && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22489       new_path=`$CYGPATH -u "$path"`
22490     fi
22491     if test "x$new_path" = x; then
22492       # It's still not found. Now this is an unrecoverable error.
22493       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$complete\", is not found." >&5
22494 $as_echo "$as_me: The path of WINLD, which resolves as \"$complete\", is not found." >&6;}
22495       has_space=`$ECHO "$complete" | $GREP " "`
22496       if test "x$has_space" != x; then
22497         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22498 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22499       fi
22500       as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
22501     fi
22502   fi
22503 
22504   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22505   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22506   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22507   # "foo.exe" is OK but "foo" is an error.
22508   #
22509   # This test is therefore slightly more accurate than "test -f" to check for file precense.
22510   # It is also a way to make sure we got the proper file name for the real test later on.
22511   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22512   if test "x$test_shortpath" = x; then
22513     # Short path failed, file does not exist as specified.
22514     # Try adding .exe or .cmd
22515     if test -f "${new_path}.exe"; then
22516        input_to_shortpath="${new_path}.exe"
22517     elif test -f "${new_path}.cmd"; then
22518        input_to_shortpath="${new_path}.cmd"
22519     else
22520       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$new_path\", is invalid." >&5
22521 $as_echo "$as_me: The path of WINLD, which resolves as \"$new_path\", is invalid." >&6;}
22522       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
22523 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
22524       as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
22525     fi
22526   else
22527     input_to_shortpath="$new_path"
22528   fi
22529 
22530   # Call helper function which possibly converts this using DOS-style short mode.
22531   # If so, the updated path is stored in $new_path.
22532   new_path="$input_to_shortpath"
22533 
22534   input_path="$input_to_shortpath"
22535   # Check if we need to convert this using DOS-style short mode. If the path
22536   # contains just simple characters, use it. Otherwise (spaces, weird characters),
22537   # take no chances and rewrite it.
22538   # Note: m4 eats our [], so we need to use [ and ] instead.
22539   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22540   if test "x$has_forbidden_chars" != x; then
22541     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22542     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22543     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22544     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22545       # Going to short mode and back again did indeed matter. Since short mode is
22546       # case insensitive, let's make it lowercase to improve readability.
22547       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22548       # Now convert it back to Unix-stile (cygpath)
22549       input_path=`$CYGPATH -u "$shortmode_path"`
22550       new_path="$input_path"
22551     fi
22552   fi
22553 
22554   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22555   if test "x$test_cygdrive_prefix" = x; then
22556     # As a simple fix, exclude /usr/bin since it's not a real path.
22557     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
22558       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22559       # a path prefixed by /cygdrive for fixpath to work.
22560       new_path="$CYGWIN_ROOT_PATH$input_path"
22561     fi
22562   fi
22563 
22564   # remove trailing .exe if any
22565   new_path="${new_path/%.exe/}"
22566 
22567   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22568 
22569   # First separate the path from the arguments. This will split at the first
22570   # space.
22571   complete="$WINLD"
22572   path="${complete%% *}"
22573   tmp="$complete EOL"
22574   arguments="${tmp#* }"
22575 
22576   # Input might be given as Windows format, start by converting to
22577   # unix format.
22578   new_path="$path"
22579 
22580   windows_path="$new_path"
22581   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22582     unix_path=`$CYGPATH -u "$windows_path"`
22583     new_path="$unix_path"
22584   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22585     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22586     new_path="$unix_path"
22587   fi
22588 
22589 
22590   # Now try to locate executable using which
22591   new_path=`$WHICH "$new_path" 2> /dev/null`
22592 
22593   if test "x$new_path" = x; then
22594     # Oops. Which didn't find the executable.
22595     # The splitting of arguments from the executable at a space might have been incorrect,
22596     # since paths with space are more likely in Windows. Give it another try with the whole
22597     # argument.
22598     path="$complete"
22599     arguments="EOL"
22600     new_path="$path"
22601 
22602   windows_path="$new_path"
22603   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22604     unix_path=`$CYGPATH -u "$windows_path"`
22605     new_path="$unix_path"
22606   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22607     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22608     new_path="$unix_path"
22609   fi
22610 
22611 
22612     new_path=`$WHICH "$new_path" 2> /dev/null`
22613 
22614     if test "x$new_path" = x; then
22615       # It's still not found. Now this is an unrecoverable error.
22616       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$complete\", is not found." >&5
22617 $as_echo "$as_me: The path of WINLD, which resolves as \"$complete\", is not found." >&6;}
22618       has_space=`$ECHO "$complete" | $GREP " "`
22619       if test "x$has_space" != x; then
22620         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22621 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22622       fi
22623       as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
22624     fi
22625   fi
22626 
22627   # Now new_path has a complete unix path to the binary
22628   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
22629     # Keep paths in /bin as-is, but remove trailing .exe if any
22630     new_path="${new_path/%.exe/}"
22631     # Do not save /bin paths to all_fixpath_prefixes!
22632   else
22633     # Not in mixed or Windows style, start by that.
22634     new_path=`cmd //c echo $new_path`
22635 
22636   input_path="$new_path"
22637   # Check if we need to convert this using DOS-style short mode. If the path
22638   # contains just simple characters, use it. Otherwise (spaces, weird characters),
22639   # take no chances and rewrite it.
22640   # Note: m4 eats our [], so we need to use [ and ] instead.
22641   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22642   if test "x$has_forbidden_chars" != x; then
22643     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22644     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22645   fi
22646 
22647     # Output is in $new_path
22648 
22649   windows_path="$new_path"
22650   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22651     unix_path=`$CYGPATH -u "$windows_path"`
22652     new_path="$unix_path"
22653   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22654     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22655     new_path="$unix_path"
22656   fi
22657 
22658     # remove trailing .exe if any
22659     new_path="${new_path/%.exe/}"
22660 
22661     # Save the first 10 bytes of this path to the storage, so fixpath can work.
22662     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22663   fi
22664 
22665   else
22666     # We're on a posix platform. Hooray! :)
22667     # First separate the path from the arguments. This will split at the first
22668     # space.
22669     complete="$WINLD"
22670     path="${complete%% *}"
22671     tmp="$complete EOL"
22672     arguments="${tmp#* }"
22673 
22674     # Cannot rely on the command "which" here since it doesn't always work.
22675     is_absolute_path=`$ECHO "$path" | $GREP ^/`
22676     if test -z "$is_absolute_path"; then
22677       # Path to executable is not absolute. Find it.
22678       IFS_save="$IFS"
22679       IFS=:
22680       for p in $PATH; do
22681         if test -f "$p/$path" && test -x "$p/$path"; then
22682           new_path="$p/$path"
22683           break
22684         fi
22685       done
22686       IFS="$IFS_save"
22687     else
22688       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving WINLD (as $path) failed, using $path directly." >&5
22689 $as_echo "$as_me: Resolving WINLD (as $path) failed, using $path directly." >&6;}
22690       new_path="$path"
22691     fi
22692 
22693     if test "x$new_path" = x; then
22694         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$complete\", is not found." >&5
22695 $as_echo "$as_me: The path of WINLD, which resolves as \"$complete\", is not found." >&6;}
22696         has_space=`$ECHO "$complete" | $GREP " "`
22697         if test "x$has_space" != x; then
22698           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
22699 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
22700         fi
22701         as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
22702       fi
22703   fi
22704 
22705       # Now join together the path and the arguments once again
22706       if test "x$arguments" != xEOL; then
22707         new_complete="$new_path ${arguments% *}"
22708       else
22709         new_complete="$new_path"
22710       fi
22711 
22712   if test "x$complete" != "x$new_complete"; then
22713       WINLD="$new_complete"
22714       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting WINLD to \"$new_complete\"" >&5
22715 $as_echo "$as_me: Rewriting WINLD to \"$new_complete\"" >&6;}
22716     fi
22717 
22718     printf "Windows linker was found at $WINLD\n"
22719     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the found link.exe is actually the Visual Studio linker" >&5
22720 $as_echo_n "checking if the found link.exe is actually the Visual Studio linker... " >&6; }
22721     "$WINLD" --version > /dev/null
22722     if test $? -eq 0 ; then
22723       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22724 $as_echo "no" >&6; }
22725       as_fn_error $? "This is the Cygwin link tool. Please check your PATH and rerun configure." "$LINENO" 5
22726     else
22727       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
22728 $as_echo "yes" >&6; }
22729     fi
22730     LD="$WINLD"
22731     LDEXE="$WINLD"
22732     LDCXX="$WINLD"
22733     LDEXECXX="$WINLD"
22734 
22735     # Extract the first word of "mt", so it can be a program name with args.
22736 set dummy mt; ac_word=$2
22737 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22738 $as_echo_n "checking for $ac_word... " >&6; }
22739 if test "${ac_cv_prog_MT+set}" = set; then :
22740   $as_echo_n "(cached) " >&6
22741 else
22742   if test -n "$MT"; then
22743   ac_cv_prog_MT="$MT" # Let the user override the test.
22744 else
22745   ac_prog_rejected=no
22746 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22747 for as_dir in $PATH
22748 do
22749   IFS=$as_save_IFS
22750   test -z "$as_dir" && as_dir=.
22751     for ac_exec_ext in '' $ac_executable_extensions; do
22752   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
22753     if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/mt"; then
22754        ac_prog_rejected=yes
22755        continue
22756      fi
22757     ac_cv_prog_MT="mt"
22758     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22759     break 2
22760   fi
22761 done
22762   done
22763 IFS=$as_save_IFS
22764 
22765 if test $ac_prog_rejected = yes; then
22766   # We found a bogon in the path, so make sure we never use it.
22767   set dummy $ac_cv_prog_MT
22768   shift
22769   if test $# != 0; then
22770     # We chose a different compiler from the bogus one.
22771     # However, it has the same basename, so the bogon will be chosen
22772     # first if we set MT to just the basename; use the full file name.
22773     shift
22774     ac_cv_prog_MT="$as_dir/$ac_word${1+' '}$@"
22775   fi
22776 fi
22777 fi
22778 fi
22779 MT=$ac_cv_prog_MT
22780 if test -n "$MT"; then
22781   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MT" >&5
22782 $as_echo "$MT" >&6; }
22783 else
22784   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22785 $as_echo "no" >&6; }
22786 fi
22787 
22788 
22789 
22790   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22791 
22792   # First separate the path from the arguments. This will split at the first
22793   # space.
22794   complete="$MT"
22795   path="${complete%% *}"
22796   tmp="$complete EOL"
22797   arguments="${tmp#* }"
22798 
22799   # Input might be given as Windows format, start by converting to
22800   # unix format.
22801   new_path=`$CYGPATH -u "$path"`
22802 
22803   # Now try to locate executable using which
22804   new_path=`$WHICH "$new_path" 2> /dev/null`
22805   # bat and cmd files are not always considered executable in cygwin causing which
22806   # to not find them
22807   if test "x$new_path" = x \
22808            && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22809            && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22810     new_path=`$CYGPATH -u "$path"`
22811   fi
22812   if test "x$new_path" = x; then
22813     # Oops. Which didn't find the executable.
22814     # The splitting of arguments from the executable at a space might have been incorrect,
22815     # since paths with space are more likely in Windows. Give it another try with the whole
22816     # argument.
22817     path="$complete"
22818     arguments="EOL"
22819     new_path=`$CYGPATH -u "$path"`
22820     new_path=`$WHICH "$new_path" 2> /dev/null`
22821     # bat and cmd files are not always considered executable in cygwin causing which
22822     # to not find them
22823     if test "x$new_path" = x \
22824              && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22825              && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22826       new_path=`$CYGPATH -u "$path"`
22827     fi
22828     if test "x$new_path" = x; then
22829       # It's still not found. Now this is an unrecoverable error.
22830       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
22831 $as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
22832       has_space=`$ECHO "$complete" | $GREP " "`
22833       if test "x$has_space" != x; then
22834         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22835 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22836       fi
22837       as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
22838     fi
22839   fi
22840 
22841   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22842   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22843   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22844   # "foo.exe" is OK but "foo" is an error.
22845   #
22846   # This test is therefore slightly more accurate than "test -f" to check for file precense.
22847   # It is also a way to make sure we got the proper file name for the real test later on.
22848   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22849   if test "x$test_shortpath" = x; then
22850     # Short path failed, file does not exist as specified.
22851     # Try adding .exe or .cmd
22852     if test -f "${new_path}.exe"; then
22853        input_to_shortpath="${new_path}.exe"
22854     elif test -f "${new_path}.cmd"; then
22855        input_to_shortpath="${new_path}.cmd"
22856     else
22857       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$new_path\", is invalid." >&5
22858 $as_echo "$as_me: The path of MT, which resolves as \"$new_path\", is invalid." >&6;}
22859       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
22860 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
22861       as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
22862     fi
22863   else
22864     input_to_shortpath="$new_path"
22865   fi
22866 
22867   # Call helper function which possibly converts this using DOS-style short mode.
22868   # If so, the updated path is stored in $new_path.
22869   new_path="$input_to_shortpath"
22870 
22871   input_path="$input_to_shortpath"
22872   # Check if we need to convert this using DOS-style short mode. If the path
22873   # contains just simple characters, use it. Otherwise (spaces, weird characters),
22874   # take no chances and rewrite it.
22875   # Note: m4 eats our [], so we need to use [ and ] instead.
22876   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22877   if test "x$has_forbidden_chars" != x; then
22878     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22879     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22880     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22881     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22882       # Going to short mode and back again did indeed matter. Since short mode is
22883       # case insensitive, let's make it lowercase to improve readability.
22884       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22885       # Now convert it back to Unix-stile (cygpath)
22886       input_path=`$CYGPATH -u "$shortmode_path"`
22887       new_path="$input_path"
22888     fi
22889   fi
22890 
22891   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22892   if test "x$test_cygdrive_prefix" = x; then
22893     # As a simple fix, exclude /usr/bin since it's not a real path.
22894     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
22895       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22896       # a path prefixed by /cygdrive for fixpath to work.
22897       new_path="$CYGWIN_ROOT_PATH$input_path"
22898     fi
22899   fi
22900 
22901   # remove trailing .exe if any
22902   new_path="${new_path/%.exe/}"
22903 
22904   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22905 
22906   # First separate the path from the arguments. This will split at the first
22907   # space.
22908   complete="$MT"
22909   path="${complete%% *}"
22910   tmp="$complete EOL"
22911   arguments="${tmp#* }"
22912 
22913   # Input might be given as Windows format, start by converting to
22914   # unix format.
22915   new_path="$path"
22916 
22917   windows_path="$new_path"
22918   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22919     unix_path=`$CYGPATH -u "$windows_path"`
22920     new_path="$unix_path"
22921   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22922     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22923     new_path="$unix_path"
22924   fi
22925 
22926 
22927   # Now try to locate executable using which
22928   new_path=`$WHICH "$new_path" 2> /dev/null`
22929 
22930   if test "x$new_path" = x; then
22931     # Oops. Which didn't find the executable.
22932     # The splitting of arguments from the executable at a space might have been incorrect,
22933     # since paths with space are more likely in Windows. Give it another try with the whole
22934     # argument.
22935     path="$complete"
22936     arguments="EOL"
22937     new_path="$path"
22938 
22939   windows_path="$new_path"
22940   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22941     unix_path=`$CYGPATH -u "$windows_path"`
22942     new_path="$unix_path"
22943   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22944     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22945     new_path="$unix_path"
22946   fi
22947 
22948 
22949     new_path=`$WHICH "$new_path" 2> /dev/null`
22950 
22951     if test "x$new_path" = x; then
22952       # It's still not found. Now this is an unrecoverable error.
22953       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
22954 $as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
22955       has_space=`$ECHO "$complete" | $GREP " "`
22956       if test "x$has_space" != x; then
22957         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22958 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22959       fi
22960       as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
22961     fi
22962   fi
22963 
22964   # Now new_path has a complete unix path to the binary
22965   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
22966     # Keep paths in /bin as-is, but remove trailing .exe if any
22967     new_path="${new_path/%.exe/}"
22968     # Do not save /bin paths to all_fixpath_prefixes!
22969   else
22970     # Not in mixed or Windows style, start by that.
22971     new_path=`cmd //c echo $new_path`
22972 
22973   input_path="$new_path"
22974   # Check if we need to convert this using DOS-style short mode. If the path
22975   # contains just simple characters, use it. Otherwise (spaces, weird characters),
22976   # take no chances and rewrite it.
22977   # Note: m4 eats our [], so we need to use [ and ] instead.
22978   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22979   if test "x$has_forbidden_chars" != x; then
22980     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22981     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22982   fi
22983 
22984     # Output is in $new_path
22985 
22986   windows_path="$new_path"
22987   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22988     unix_path=`$CYGPATH -u "$windows_path"`
22989     new_path="$unix_path"
22990   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22991     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22992     new_path="$unix_path"
22993   fi
22994 
22995     # remove trailing .exe if any
22996     new_path="${new_path/%.exe/}"
22997 
22998     # Save the first 10 bytes of this path to the storage, so fixpath can work.
22999     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23000   fi
23001 
23002   else
23003     # We're on a posix platform. Hooray! :)
23004     # First separate the path from the arguments. This will split at the first
23005     # space.
23006     complete="$MT"
23007     path="${complete%% *}"
23008     tmp="$complete EOL"
23009     arguments="${tmp#* }"
23010 
23011     # Cannot rely on the command "which" here since it doesn't always work.
23012     is_absolute_path=`$ECHO "$path" | $GREP ^/`
23013     if test -z "$is_absolute_path"; then
23014       # Path to executable is not absolute. Find it.
23015       IFS_save="$IFS"
23016       IFS=:
23017       for p in $PATH; do
23018         if test -f "$p/$path" && test -x "$p/$path"; then
23019           new_path="$p/$path"
23020           break
23021         fi
23022       done
23023       IFS="$IFS_save"
23024     else
23025       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving MT (as $path) failed, using $path directly." >&5
23026 $as_echo "$as_me: Resolving MT (as $path) failed, using $path directly." >&6;}
23027       new_path="$path"
23028     fi
23029 
23030     if test "x$new_path" = x; then
23031         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
23032 $as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
23033         has_space=`$ECHO "$complete" | $GREP " "`
23034         if test "x$has_space" != x; then
23035           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
23036 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
23037         fi
23038         as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
23039       fi
23040   fi
23041 
23042       # Now join together the path and the arguments once again
23043       if test "x$arguments" != xEOL; then
23044         new_complete="$new_path ${arguments% *}"
23045       else
23046         new_complete="$new_path"
23047       fi
23048 
23049   if test "x$complete" != "x$new_complete"; then
23050       MT="$new_complete"
23051       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MT to \"$new_complete\"" >&5
23052 $as_echo "$as_me: Rewriting MT to \"$new_complete\"" >&6;}
23053     fi
23054 
23055     # The resource compiler
23056     # Extract the first word of "rc", so it can be a program name with args.
23057 set dummy rc; ac_word=$2
23058 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23059 $as_echo_n "checking for $ac_word... " >&6; }
23060 if test "${ac_cv_prog_RC+set}" = set; then :
23061   $as_echo_n "(cached) " >&6
23062 else
23063   if test -n "$RC"; then
23064   ac_cv_prog_RC="$RC" # Let the user override the test.
23065 else
23066   ac_prog_rejected=no
23067 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23068 for as_dir in $PATH
23069 do
23070   IFS=$as_save_IFS
23071   test -z "$as_dir" && as_dir=.
23072     for ac_exec_ext in '' $ac_executable_extensions; do
23073   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
23074     if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/rc"; then
23075        ac_prog_rejected=yes
23076        continue
23077      fi
23078     ac_cv_prog_RC="rc"
23079     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23080     break 2
23081   fi
23082 done
23083   done
23084 IFS=$as_save_IFS
23085 
23086 if test $ac_prog_rejected = yes; then
23087   # We found a bogon in the path, so make sure we never use it.
23088   set dummy $ac_cv_prog_RC
23089   shift
23090   if test $# != 0; then
23091     # We chose a different compiler from the bogus one.
23092     # However, it has the same basename, so the bogon will be chosen
23093     # first if we set RC to just the basename; use the full file name.
23094     shift
23095     ac_cv_prog_RC="$as_dir/$ac_word${1+' '}$@"
23096   fi
23097 fi
23098 fi
23099 fi
23100 RC=$ac_cv_prog_RC
23101 if test -n "$RC"; then
23102   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RC" >&5
23103 $as_echo "$RC" >&6; }
23104 else
23105   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23106 $as_echo "no" >&6; }
23107 fi
23108 
23109 
23110 
23111   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23112 
23113   # First separate the path from the arguments. This will split at the first
23114   # space.
23115   complete="$RC"
23116   path="${complete%% *}"
23117   tmp="$complete EOL"
23118   arguments="${tmp#* }"
23119 
23120   # Input might be given as Windows format, start by converting to
23121   # unix format.
23122   new_path=`$CYGPATH -u "$path"`
23123 
23124   # Now try to locate executable using which
23125   new_path=`$WHICH "$new_path" 2> /dev/null`
23126   # bat and cmd files are not always considered executable in cygwin causing which
23127   # to not find them
23128   if test "x$new_path" = x \
23129            && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23130            && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23131     new_path=`$CYGPATH -u "$path"`
23132   fi
23133   if test "x$new_path" = x; then
23134     # Oops. Which didn't find the executable.
23135     # The splitting of arguments from the executable at a space might have been incorrect,
23136     # since paths with space are more likely in Windows. Give it another try with the whole
23137     # argument.
23138     path="$complete"
23139     arguments="EOL"
23140     new_path=`$CYGPATH -u "$path"`
23141     new_path=`$WHICH "$new_path" 2> /dev/null`
23142     # bat and cmd files are not always considered executable in cygwin causing which
23143     # to not find them
23144     if test "x$new_path" = x \
23145              && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23146              && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23147       new_path=`$CYGPATH -u "$path"`
23148     fi
23149     if test "x$new_path" = x; then
23150       # It's still not found. Now this is an unrecoverable error.
23151       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
23152 $as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
23153       has_space=`$ECHO "$complete" | $GREP " "`
23154       if test "x$has_space" != x; then
23155         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23156 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23157       fi
23158       as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
23159     fi
23160   fi
23161 
23162   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23163   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23164   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23165   # "foo.exe" is OK but "foo" is an error.
23166   #
23167   # This test is therefore slightly more accurate than "test -f" to check for file precense.
23168   # It is also a way to make sure we got the proper file name for the real test later on.
23169   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23170   if test "x$test_shortpath" = x; then
23171     # Short path failed, file does not exist as specified.
23172     # Try adding .exe or .cmd
23173     if test -f "${new_path}.exe"; then
23174        input_to_shortpath="${new_path}.exe"
23175     elif test -f "${new_path}.cmd"; then
23176        input_to_shortpath="${new_path}.cmd"
23177     else
23178       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$new_path\", is invalid." >&5
23179 $as_echo "$as_me: The path of RC, which resolves as \"$new_path\", is invalid." >&6;}
23180       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
23181 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
23182       as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
23183     fi
23184   else
23185     input_to_shortpath="$new_path"
23186   fi
23187 
23188   # Call helper function which possibly converts this using DOS-style short mode.
23189   # If so, the updated path is stored in $new_path.
23190   new_path="$input_to_shortpath"
23191 
23192   input_path="$input_to_shortpath"
23193   # Check if we need to convert this using DOS-style short mode. If the path
23194   # contains just simple characters, use it. Otherwise (spaces, weird characters),
23195   # take no chances and rewrite it.
23196   # Note: m4 eats our [], so we need to use [ and ] instead.
23197   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23198   if test "x$has_forbidden_chars" != x; then
23199     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23200     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23201     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23202     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23203       # Going to short mode and back again did indeed matter. Since short mode is
23204       # case insensitive, let's make it lowercase to improve readability.
23205       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23206       # Now convert it back to Unix-stile (cygpath)
23207       input_path=`$CYGPATH -u "$shortmode_path"`
23208       new_path="$input_path"
23209     fi
23210   fi
23211 
23212   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23213   if test "x$test_cygdrive_prefix" = x; then
23214     # As a simple fix, exclude /usr/bin since it's not a real path.
23215     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
23216       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23217       # a path prefixed by /cygdrive for fixpath to work.
23218       new_path="$CYGWIN_ROOT_PATH$input_path"
23219     fi
23220   fi
23221 
23222   # remove trailing .exe if any
23223   new_path="${new_path/%.exe/}"
23224 
23225   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23226 
23227   # First separate the path from the arguments. This will split at the first
23228   # space.
23229   complete="$RC"
23230   path="${complete%% *}"
23231   tmp="$complete EOL"
23232   arguments="${tmp#* }"
23233 
23234   # Input might be given as Windows format, start by converting to
23235   # unix format.
23236   new_path="$path"
23237 
23238   windows_path="$new_path"
23239   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23240     unix_path=`$CYGPATH -u "$windows_path"`
23241     new_path="$unix_path"
23242   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23243     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23244     new_path="$unix_path"
23245   fi
23246 
23247 
23248   # Now try to locate executable using which
23249   new_path=`$WHICH "$new_path" 2> /dev/null`
23250 
23251   if test "x$new_path" = x; then
23252     # Oops. Which didn't find the executable.
23253     # The splitting of arguments from the executable at a space might have been incorrect,
23254     # since paths with space are more likely in Windows. Give it another try with the whole
23255     # argument.
23256     path="$complete"
23257     arguments="EOL"
23258     new_path="$path"
23259 
23260   windows_path="$new_path"
23261   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23262     unix_path=`$CYGPATH -u "$windows_path"`
23263     new_path="$unix_path"
23264   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23265     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23266     new_path="$unix_path"
23267   fi
23268 
23269 
23270     new_path=`$WHICH "$new_path" 2> /dev/null`
23271 
23272     if test "x$new_path" = x; then
23273       # It's still not found. Now this is an unrecoverable error.
23274       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
23275 $as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
23276       has_space=`$ECHO "$complete" | $GREP " "`
23277       if test "x$has_space" != x; then
23278         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23279 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23280       fi
23281       as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
23282     fi
23283   fi
23284 
23285   # Now new_path has a complete unix path to the binary
23286   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
23287     # Keep paths in /bin as-is, but remove trailing .exe if any
23288     new_path="${new_path/%.exe/}"
23289     # Do not save /bin paths to all_fixpath_prefixes!
23290   else
23291     # Not in mixed or Windows style, start by that.
23292     new_path=`cmd //c echo $new_path`
23293 
23294   input_path="$new_path"
23295   # Check if we need to convert this using DOS-style short mode. If the path
23296   # contains just simple characters, use it. Otherwise (spaces, weird characters),
23297   # take no chances and rewrite it.
23298   # Note: m4 eats our [], so we need to use [ and ] instead.
23299   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23300   if test "x$has_forbidden_chars" != x; then
23301     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23302     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23303   fi
23304 
23305     # Output is in $new_path
23306 
23307   windows_path="$new_path"
23308   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23309     unix_path=`$CYGPATH -u "$windows_path"`
23310     new_path="$unix_path"
23311   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23312     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23313     new_path="$unix_path"
23314   fi
23315 
23316     # remove trailing .exe if any
23317     new_path="${new_path/%.exe/}"
23318 
23319     # Save the first 10 bytes of this path to the storage, so fixpath can work.
23320     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23321   fi
23322 
23323   else
23324     # We're on a posix platform. Hooray! :)
23325     # First separate the path from the arguments. This will split at the first
23326     # space.
23327     complete="$RC"
23328     path="${complete%% *}"
23329     tmp="$complete EOL"
23330     arguments="${tmp#* }"
23331 
23332     # Cannot rely on the command "which" here since it doesn't always work.
23333     is_absolute_path=`$ECHO "$path" | $GREP ^/`
23334     if test -z "$is_absolute_path"; then
23335       # Path to executable is not absolute. Find it.
23336       IFS_save="$IFS"
23337       IFS=:
23338       for p in $PATH; do
23339         if test -f "$p/$path" && test -x "$p/$path"; then
23340           new_path="$p/$path"
23341           break
23342         fi
23343       done
23344       IFS="$IFS_save"
23345     else
23346       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving RC (as $path) failed, using $path directly." >&5
23347 $as_echo "$as_me: Resolving RC (as $path) failed, using $path directly." >&6;}
23348       new_path="$path"
23349     fi
23350 
23351     if test "x$new_path" = x; then
23352         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
23353 $as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
23354         has_space=`$ECHO "$complete" | $GREP " "`
23355         if test "x$has_space" != x; then
23356           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
23357 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
23358         fi
23359         as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
23360       fi
23361   fi
23362 
23363       # Now join together the path and the arguments once again
23364       if test "x$arguments" != xEOL; then
23365         new_complete="$new_path ${arguments% *}"
23366       else
23367         new_complete="$new_path"
23368       fi
23369 
23370   if test "x$complete" != "x$new_complete"; then
23371       RC="$new_complete"
23372       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting RC to \"$new_complete\"" >&5
23373 $as_echo "$as_me: Rewriting RC to \"$new_complete\"" >&6;}
23374     fi
23375 
23376 
23377     # For hotspot, we need these in Windows mixed path,
23378     # so rewrite them all. Need added .exe suffix.
23379     HOTSPOT_CXX="$CXX.exe"
23380     HOTSPOT_LD="$LD.exe"
23381     HOTSPOT_MT="$MT.exe"
23382     HOTSPOT_RC="$RC.exe"
23383 
23384   unix_path="$HOTSPOT_CXX"
23385   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23386     windows_path=`$CYGPATH -m "$unix_path"`
23387     HOTSPOT_CXX="$windows_path"
23388   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23389     windows_path=`cmd //c echo $unix_path`
23390     HOTSPOT_CXX="$windows_path"
23391   fi
23392 
23393 
23394   unix_path="$HOTSPOT_LD"
23395   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23396     windows_path=`$CYGPATH -m "$unix_path"`
23397     HOTSPOT_LD="$windows_path"
23398   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23399     windows_path=`cmd //c echo $unix_path`
23400     HOTSPOT_LD="$windows_path"
23401   fi
23402 
23403 
23404   unix_path="$HOTSPOT_MT"
23405   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23406     windows_path=`$CYGPATH -m "$unix_path"`
23407     HOTSPOT_MT="$windows_path"
23408   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23409     windows_path=`cmd //c echo $unix_path`
23410     HOTSPOT_MT="$windows_path"
23411   fi
23412 
23413 
23414   unix_path="$HOTSPOT_RC"
23415   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23416     windows_path=`$CYGPATH -m "$unix_path"`
23417     HOTSPOT_RC="$windows_path"
23418   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23419     windows_path=`cmd //c echo $unix_path`
23420     HOTSPOT_RC="$windows_path"
23421   fi
23422 
23423 
23424 
23425 
23426     RC_FLAGS="-nologo -l 0x409 -r"
23427     if test "x$VARIANT" = xOPT; then :
23428 
23429         RC_FLAGS="$RC_FLAGS -d NDEBUG"
23430 
23431 fi
23432     JDK_UPDATE_VERSION_NOTNULL=$JDK_UPDATE_VERSION
23433     if test "x$JDK_UPDATE_VERSION" = x; then :
23434 
23435         JDK_UPDATE_VERSION_NOTNULL=0
23436 
23437 fi
23438     RC_FLAGS="$RC_FLAGS -d \"JDK_BUILD_ID=$FULL_VERSION\""
23439     RC_FLAGS="$RC_FLAGS -d \"JDK_COMPANY=$COMPANY_NAME\""
23440     RC_FLAGS="$RC_FLAGS -d \"JDK_COMPONENT=$PRODUCT_NAME $JDK_RC_PLATFORM_NAME binary\""
23441     RC_FLAGS="$RC_FLAGS -d \"JDK_VER=$JDK_MINOR_VERSION.$JDK_MICRO_VERSION.$JDK_UPDATE_VERSION_NOTNULL.$COOKED_BUILD_NUMBER\""
23442     RC_FLAGS="$RC_FLAGS -d \"JDK_COPYRIGHT=Copyright \xA9 $COPYRIGHT_YEAR\""
23443     RC_FLAGS="$RC_FLAGS -d \"JDK_NAME=$PRODUCT_NAME $JDK_RC_PLATFORM_NAME $JDK_MINOR_VERSION $JDK_UPDATE_META_TAG\""
23444     RC_FLAGS="$RC_FLAGS -d \"JDK_FVER=$JDK_MINOR_VERSION,$JDK_MICRO_VERSION,$JDK_UPDATE_VERSION_NOTNULL,$COOKED_BUILD_NUMBER\""
23445 
23446     # lib.exe is used to create static libraries.
23447     # Extract the first word of "lib", so it can be a program name with args.
23448 set dummy lib; ac_word=$2
23449 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23450 $as_echo_n "checking for $ac_word... " >&6; }
23451 if test "${ac_cv_prog_WINAR+set}" = set; then :
23452   $as_echo_n "(cached) " >&6
23453 else
23454   if test -n "$WINAR"; then
23455   ac_cv_prog_WINAR="$WINAR" # Let the user override the test.
23456 else
23457 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23458 for as_dir in $PATH
23459 do
23460   IFS=$as_save_IFS
23461   test -z "$as_dir" && as_dir=.
23462     for ac_exec_ext in '' $ac_executable_extensions; do
23463   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
23464     ac_cv_prog_WINAR="lib"
23465     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23466     break 2
23467   fi
23468 done
23469   done
23470 IFS=$as_save_IFS
23471 
23472 fi
23473 fi
23474 WINAR=$ac_cv_prog_WINAR
23475 if test -n "$WINAR"; then
23476   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINAR" >&5
23477 $as_echo "$WINAR" >&6; }
23478 else
23479   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23480 $as_echo "no" >&6; }
23481 fi
23482 
23483 
23484 
23485   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23486 
23487   # First separate the path from the arguments. This will split at the first
23488   # space.
23489   complete="$WINAR"
23490   path="${complete%% *}"
23491   tmp="$complete EOL"
23492   arguments="${tmp#* }"
23493 
23494   # Input might be given as Windows format, start by converting to
23495   # unix format.
23496   new_path=`$CYGPATH -u "$path"`
23497 
23498   # Now try to locate executable using which
23499   new_path=`$WHICH "$new_path" 2> /dev/null`
23500   # bat and cmd files are not always considered executable in cygwin causing which
23501   # to not find them
23502   if test "x$new_path" = x \
23503            && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23504            && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23505     new_path=`$CYGPATH -u "$path"`
23506   fi
23507   if test "x$new_path" = x; then
23508     # Oops. Which didn't find the executable.
23509     # The splitting of arguments from the executable at a space might have been incorrect,
23510     # since paths with space are more likely in Windows. Give it another try with the whole
23511     # argument.
23512     path="$complete"
23513     arguments="EOL"
23514     new_path=`$CYGPATH -u "$path"`
23515     new_path=`$WHICH "$new_path" 2> /dev/null`
23516     # bat and cmd files are not always considered executable in cygwin causing which
23517     # to not find them
23518     if test "x$new_path" = x \
23519              && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23520              && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23521       new_path=`$CYGPATH -u "$path"`
23522     fi
23523     if test "x$new_path" = x; then
23524       # It's still not found. Now this is an unrecoverable error.
23525       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$complete\", is not found." >&5
23526 $as_echo "$as_me: The path of WINAR, which resolves as \"$complete\", is not found." >&6;}
23527       has_space=`$ECHO "$complete" | $GREP " "`
23528       if test "x$has_space" != x; then
23529         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23530 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23531       fi
23532       as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5
23533     fi
23534   fi
23535 
23536   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23537   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23538   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23539   # "foo.exe" is OK but "foo" is an error.
23540   #
23541   # This test is therefore slightly more accurate than "test -f" to check for file precense.
23542   # It is also a way to make sure we got the proper file name for the real test later on.
23543   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23544   if test "x$test_shortpath" = x; then
23545     # Short path failed, file does not exist as specified.
23546     # Try adding .exe or .cmd
23547     if test -f "${new_path}.exe"; then
23548        input_to_shortpath="${new_path}.exe"
23549     elif test -f "${new_path}.cmd"; then
23550        input_to_shortpath="${new_path}.cmd"
23551     else
23552       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$new_path\", is invalid." >&5
23553 $as_echo "$as_me: The path of WINAR, which resolves as \"$new_path\", is invalid." >&6;}
23554       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
23555 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
23556       as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5
23557     fi
23558   else
23559     input_to_shortpath="$new_path"
23560   fi
23561 
23562   # Call helper function which possibly converts this using DOS-style short mode.
23563   # If so, the updated path is stored in $new_path.
23564   new_path="$input_to_shortpath"
23565 
23566   input_path="$input_to_shortpath"
23567   # Check if we need to convert this using DOS-style short mode. If the path
23568   # contains just simple characters, use it. Otherwise (spaces, weird characters),
23569   # take no chances and rewrite it.
23570   # Note: m4 eats our [], so we need to use [ and ] instead.
23571   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23572   if test "x$has_forbidden_chars" != x; then
23573     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23574     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23575     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23576     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23577       # Going to short mode and back again did indeed matter. Since short mode is
23578       # case insensitive, let's make it lowercase to improve readability.
23579       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23580       # Now convert it back to Unix-stile (cygpath)
23581       input_path=`$CYGPATH -u "$shortmode_path"`
23582       new_path="$input_path"
23583     fi
23584   fi
23585 
23586   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23587   if test "x$test_cygdrive_prefix" = x; then
23588     # As a simple fix, exclude /usr/bin since it's not a real path.
23589     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
23590       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23591       # a path prefixed by /cygdrive for fixpath to work.
23592       new_path="$CYGWIN_ROOT_PATH$input_path"
23593     fi
23594   fi
23595 
23596   # remove trailing .exe if any
23597   new_path="${new_path/%.exe/}"
23598 
23599   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23600 
23601   # First separate the path from the arguments. This will split at the first
23602   # space.
23603   complete="$WINAR"
23604   path="${complete%% *}"
23605   tmp="$complete EOL"
23606   arguments="${tmp#* }"
23607 
23608   # Input might be given as Windows format, start by converting to
23609   # unix format.
23610   new_path="$path"
23611 
23612   windows_path="$new_path"
23613   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23614     unix_path=`$CYGPATH -u "$windows_path"`
23615     new_path="$unix_path"
23616   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23617     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23618     new_path="$unix_path"
23619   fi
23620 
23621 
23622   # Now try to locate executable using which
23623   new_path=`$WHICH "$new_path" 2> /dev/null`
23624 
23625   if test "x$new_path" = x; then
23626     # Oops. Which didn't find the executable.
23627     # The splitting of arguments from the executable at a space might have been incorrect,
23628     # since paths with space are more likely in Windows. Give it another try with the whole
23629     # argument.
23630     path="$complete"
23631     arguments="EOL"
23632     new_path="$path"
23633 
23634   windows_path="$new_path"
23635   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23636     unix_path=`$CYGPATH -u "$windows_path"`
23637     new_path="$unix_path"
23638   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23639     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23640     new_path="$unix_path"
23641   fi
23642 
23643 
23644     new_path=`$WHICH "$new_path" 2> /dev/null`
23645 
23646     if test "x$new_path" = x; then
23647       # It's still not found. Now this is an unrecoverable error.
23648       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$complete\", is not found." >&5
23649 $as_echo "$as_me: The path of WINAR, which resolves as \"$complete\", is not found." >&6;}
23650       has_space=`$ECHO "$complete" | $GREP " "`
23651       if test "x$has_space" != x; then
23652         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23653 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23654       fi
23655       as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5
23656     fi
23657   fi
23658 
23659   # Now new_path has a complete unix path to the binary
23660   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
23661     # Keep paths in /bin as-is, but remove trailing .exe if any
23662     new_path="${new_path/%.exe/}"
23663     # Do not save /bin paths to all_fixpath_prefixes!
23664   else
23665     # Not in mixed or Windows style, start by that.
23666     new_path=`cmd //c echo $new_path`
23667 
23668   input_path="$new_path"
23669   # Check if we need to convert this using DOS-style short mode. If the path
23670   # contains just simple characters, use it. Otherwise (spaces, weird characters),
23671   # take no chances and rewrite it.
23672   # Note: m4 eats our [], so we need to use [ and ] instead.
23673   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23674   if test "x$has_forbidden_chars" != x; then
23675     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23676     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23677   fi
23678 
23679     # Output is in $new_path
23680 
23681   windows_path="$new_path"
23682   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23683     unix_path=`$CYGPATH -u "$windows_path"`
23684     new_path="$unix_path"
23685   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23686     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23687     new_path="$unix_path"
23688   fi
23689 
23690     # remove trailing .exe if any
23691     new_path="${new_path/%.exe/}"
23692 
23693     # Save the first 10 bytes of this path to the storage, so fixpath can work.
23694     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23695   fi
23696 
23697   else
23698     # We're on a posix platform. Hooray! :)
23699     # First separate the path from the arguments. This will split at the first
23700     # space.
23701     complete="$WINAR"
23702     path="${complete%% *}"
23703     tmp="$complete EOL"
23704     arguments="${tmp#* }"
23705 
23706     # Cannot rely on the command "which" here since it doesn't always work.
23707     is_absolute_path=`$ECHO "$path" | $GREP ^/`
23708     if test -z "$is_absolute_path"; then
23709       # Path to executable is not absolute. Find it.
23710       IFS_save="$IFS"
23711       IFS=:
23712       for p in $PATH; do
23713         if test -f "$p/$path" && test -x "$p/$path"; then
23714           new_path="$p/$path"
23715           break
23716         fi
23717       done
23718       IFS="$IFS_save"
23719     else
23720       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving WINAR (as $path) failed, using $path directly." >&5
23721 $as_echo "$as_me: Resolving WINAR (as $path) failed, using $path directly." >&6;}
23722       new_path="$path"
23723     fi
23724 
23725     if test "x$new_path" = x; then
23726         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$complete\", is not found." >&5
23727 $as_echo "$as_me: The path of WINAR, which resolves as \"$complete\", is not found." >&6;}
23728         has_space=`$ECHO "$complete" | $GREP " "`
23729         if test "x$has_space" != x; then
23730           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
23731 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
23732         fi
23733         as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5
23734       fi
23735   fi
23736 
23737       # Now join together the path and the arguments once again
23738       if test "x$arguments" != xEOL; then
23739         new_complete="$new_path ${arguments% *}"
23740       else
23741         new_complete="$new_path"
23742       fi
23743 
23744   if test "x$complete" != "x$new_complete"; then
23745       WINAR="$new_complete"
23746       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting WINAR to \"$new_complete\"" >&5
23747 $as_echo "$as_me: Rewriting WINAR to \"$new_complete\"" >&6;}
23748     fi
23749 
23750     AR="$WINAR"
23751     ARFLAGS="-nologo -NODEFAULTLIB:MSVCRT"
23752 
23753     # Extract the first word of "dumpbin", so it can be a program name with args.
23754 set dummy dumpbin; ac_word=$2
23755 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23756 $as_echo_n "checking for $ac_word... " >&6; }
23757 if test "${ac_cv_prog_DUMPBIN+set}" = set; then :
23758   $as_echo_n "(cached) " >&6
23759 else
23760   if test -n "$DUMPBIN"; then
23761   ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test.
23762 else
23763 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23764 for as_dir in $PATH
23765 do
23766   IFS=$as_save_IFS
23767   test -z "$as_dir" && as_dir=.
23768     for ac_exec_ext in '' $ac_executable_extensions; do
23769   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
23770     ac_cv_prog_DUMPBIN="dumpbin"
23771     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23772     break 2
23773   fi
23774 done
23775   done
23776 IFS=$as_save_IFS
23777 
23778 fi
23779 fi
23780 DUMPBIN=$ac_cv_prog_DUMPBIN
23781 if test -n "$DUMPBIN"; then
23782   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5
23783 $as_echo "$DUMPBIN" >&6; }
23784 else
23785   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23786 $as_echo "no" >&6; }
23787 fi
23788 
23789 
23790 
23791   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23792 
23793   # First separate the path from the arguments. This will split at the first
23794   # space.
23795   complete="$DUMPBIN"
23796   path="${complete%% *}"
23797   tmp="$complete EOL"
23798   arguments="${tmp#* }"
23799 
23800   # Input might be given as Windows format, start by converting to
23801   # unix format.
23802   new_path=`$CYGPATH -u "$path"`
23803 
23804   # Now try to locate executable using which
23805   new_path=`$WHICH "$new_path" 2> /dev/null`
23806   # bat and cmd files are not always considered executable in cygwin causing which
23807   # to not find them
23808   if test "x$new_path" = x \
23809            && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23810            && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23811     new_path=`$CYGPATH -u "$path"`
23812   fi
23813   if test "x$new_path" = x; then
23814     # Oops. Which didn't find the executable.
23815     # The splitting of arguments from the executable at a space might have been incorrect,
23816     # since paths with space are more likely in Windows. Give it another try with the whole
23817     # argument.
23818     path="$complete"
23819     arguments="EOL"
23820     new_path=`$CYGPATH -u "$path"`
23821     new_path=`$WHICH "$new_path" 2> /dev/null`
23822     # bat and cmd files are not always considered executable in cygwin causing which
23823     # to not find them
23824     if test "x$new_path" = x \
23825              && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23826              && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23827       new_path=`$CYGPATH -u "$path"`
23828     fi
23829     if test "x$new_path" = x; then
23830       # It's still not found. Now this is an unrecoverable error.
23831       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
23832 $as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
23833       has_space=`$ECHO "$complete" | $GREP " "`
23834       if test "x$has_space" != x; then
23835         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23836 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed."