1 #! /bin/sh
   2 # Guess values for system-dependent variables and create Makefiles.
   3 # Generated by GNU Autoconf 2.68 for OpenJDK jdk8.
   4 #
   5 # Report bugs to <build-dev@openjdk.java.net>.
   6 #
   7 #
   8 # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
   9 # 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software
  10 # Foundation, Inc.
  11 #
  12 #
  13 # This configure script is free software; the Free Software Foundation
  14 # gives unlimited permission to copy, distribute and modify it.
  15 ## -------------------- ##
  16 ## M4sh Initialization. ##
  17 ## -------------------- ##
  18 
  19 # Be more Bourne compatible
  20 DUALCASE=1; export DUALCASE # for MKS sh
  21 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
  22   emulate sh
  23   NULLCMD=:
  24   # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
  25   # is contrary to our usage.  Disable this feature.
  26   alias -g '${1+"$@"}'='"$@"'
  27   setopt NO_GLOB_SUBST
  28 else
  29   case `(set -o) 2>/dev/null` in #(
  30   *posix*) :
  31     set -o posix ;; #(
  32   *) :
  33      ;;
  34 esac
  35 fi
  36 
  37 
  38 as_nl='
  39 '
  40 export as_nl
  41 # Printing a long string crashes Solaris 7 /usr/bin/printf.
  42 as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
  43 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
  44 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
  45 # Prefer a ksh shell builtin over an external printf program on Solaris,
  46 # but without wasting forks for bash or zsh.
  47 if test -z "$BASH_VERSION$ZSH_VERSION" \
  48     && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
  49   as_echo='print -r --'
  50   as_echo_n='print -rn --'
  51 elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
  52   as_echo='printf %s\n'
  53   as_echo_n='printf %s'
  54 else
  55   if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
  56     as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
  57     as_echo_n='/usr/ucb/echo -n'
  58   else
  59     as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
  60     as_echo_n_body='eval
  61       arg=$1;
  62       case $arg in #(
  63       *"$as_nl"*)
  64         expr "X$arg" : "X\\(.*\\)$as_nl";
  65         arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
  66       esac;
  67       expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
  68     '
  69     export as_echo_n_body
  70     as_echo_n='sh -c $as_echo_n_body as_echo'
  71   fi
  72   export as_echo_body
  73   as_echo='sh -c $as_echo_body as_echo'
  74 fi
  75 
  76 # The user is always right.
  77 if test "${PATH_SEPARATOR+set}" != set; then
  78   PATH_SEPARATOR=:
  79   (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
  80     (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
  81       PATH_SEPARATOR=';'
  82   }
  83 fi
  84 
  85 
  86 # IFS
  87 # We need space, tab and new line, in precisely that order.  Quoting is
  88 # there to prevent editors from complaining about space-tab.
  89 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
  90 # splitting by setting IFS to empty value.)
  91 IFS=" ""        $as_nl"
  92 
  93 # Find who we are.  Look in the path if we contain no directory separator.
  94 as_myself=
  95 case $0 in #((
  96   *[\\/]* ) as_myself=$0 ;;
  97   *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
  98 for as_dir in $PATH
  99 do
 100   IFS=$as_save_IFS
 101   test -z "$as_dir" && as_dir=.
 102     test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
 103   done
 104 IFS=$as_save_IFS
 105 
 106      ;;
 107 esac
 108 # We did not find ourselves, most probably we were run as `sh COMMAND'
 109 # in which case we are not to be found in the path.
 110 if test "x$as_myself" = x; then
 111   as_myself=$0
 112 fi
 113 if test ! -f "$as_myself"; then
 114   $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
 115   exit 1
 116 fi
 117 
 118 # Unset variables that we do not need and which cause bugs (e.g. in
 119 # pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
 120 # suppresses any "Segmentation fault" message there.  '((' could
 121 # trigger a bug in pdksh 5.2.14.
 122 for as_var in BASH_ENV ENV MAIL MAILPATH
 123 do eval test x\${$as_var+set} = xset \
 124   && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
 125 done
 126 PS1='$ '
 127 PS2='> '
 128 PS4='+ '
 129 
 130 # NLS nuisances.
 131 LC_ALL=C
 132 export LC_ALL
 133 LANGUAGE=C
 134 export LANGUAGE
 135 
 136 # CDPATH.
 137 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
 138 
 139 if test "x$CONFIG_SHELL" = x; then
 140   as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
 141   emulate sh
 142   NULLCMD=:
 143   # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
 144   # is contrary to our usage.  Disable this feature.
 145   alias -g '\${1+\"\$@\"}'='\"\$@\"'
 146   setopt NO_GLOB_SUBST
 147 else
 148   case \`(set -o) 2>/dev/null\` in #(
 149   *posix*) :
 150     set -o posix ;; #(
 151   *) :
 152      ;;
 153 esac
 154 fi
 155 "
 156   as_required="as_fn_return () { (exit \$1); }
 157 as_fn_success () { as_fn_return 0; }
 158 as_fn_failure () { as_fn_return 1; }
 159 as_fn_ret_success () { return 0; }
 160 as_fn_ret_failure () { return 1; }
 161 
 162 exitcode=0
 163 as_fn_success || { exitcode=1; echo as_fn_success failed.; }
 164 as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
 165 as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
 166 as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
 167 if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
 168 
 169 else
 170   exitcode=1; echo positional parameters were not saved.
 171 fi
 172 test x\$exitcode = x0 || exit 1"
 173   as_suggested="  as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
 174   as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
 175   eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
 176   test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
 177 test \$(( 1 + 1 )) = 2 || exit 1"
 178   if (eval "$as_required") 2>/dev/null; then :
 179   as_have_required=yes
 180 else
 181   as_have_required=no
 182 fi
 183   if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
 184 
 185 else
 186   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
 187 as_found=false
 188 for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
 189 do
 190   IFS=$as_save_IFS
 191   test -z "$as_dir" && as_dir=.
 192   as_found=:
 193   case $as_dir in #(
 194          /*)
 195            for as_base in sh bash ksh sh5; do
 196              # Try only shells that exist, to save several forks.
 197              as_shell=$as_dir/$as_base
 198              if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
 199                     { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
 200   CONFIG_SHELL=$as_shell as_have_required=yes
 201                    if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
 202   break 2
 203 fi
 204 fi
 205            done;;
 206        esac
 207   as_found=false
 208 done
 209 $as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
 210               { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
 211   CONFIG_SHELL=$SHELL as_have_required=yes
 212 fi; }
 213 IFS=$as_save_IFS
 214 
 215 
 216       if test "x$CONFIG_SHELL" != x; then :
 217   # We cannot yet assume a decent shell, so we have to provide a
 218         # neutralization value for shells without unset; and this also
 219         # works around shells that cannot unset nonexistent variables.
 220         # Preserve -v and -x to the replacement shell.
 221         BASH_ENV=/dev/null
 222         ENV=/dev/null
 223         (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
 224         export CONFIG_SHELL
 225         case $- in # ((((
 226           *v*x* | *x*v* ) as_opts=-vx ;;
 227           *v* ) as_opts=-v ;;
 228           *x* ) as_opts=-x ;;
 229           * ) as_opts= ;;
 230         esac
 231         exec "$CONFIG_SHELL" $as_opts "$as_myself" ${1+"$@"}
 232 fi
 233 
 234     if test x$as_have_required = xno; then :
 235   $as_echo "$0: This script requires a shell more modern than all"
 236   $as_echo "$0: the shells that I found on your system."
 237   if test x${ZSH_VERSION+set} = xset ; then
 238     $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
 239     $as_echo "$0: be upgraded to zsh 4.3.4 or later."
 240   else
 241     $as_echo "$0: Please tell bug-autoconf@gnu.org and
 242 $0: build-dev@openjdk.java.net about your system, including
 243 $0: any error possibly output before this message. Then
 244 $0: install a modern shell, or manually run the script
 245 $0: under such a shell if you do have one."
 246   fi
 247   exit 1
 248 fi
 249 fi
 250 fi
 251 SHELL=${CONFIG_SHELL-/bin/sh}
 252 export SHELL
 253 # Unset more variables known to interfere with behavior of common tools.
 254 CLICOLOR_FORCE= GREP_OPTIONS=
 255 unset CLICOLOR_FORCE GREP_OPTIONS
 256 
 257 ## --------------------- ##
 258 ## M4sh Shell Functions. ##
 259 ## --------------------- ##
 260 # as_fn_unset VAR
 261 # ---------------
 262 # Portably unset VAR.
 263 as_fn_unset ()
 264 {
 265   { eval $1=; unset $1;}
 266 }
 267 as_unset=as_fn_unset
 268 
 269 # as_fn_set_status STATUS
 270 # -----------------------
 271 # Set $? to STATUS, without forking.
 272 as_fn_set_status ()
 273 {
 274   return $1
 275 } # as_fn_set_status
 276 
 277 # as_fn_exit STATUS
 278 # -----------------
 279 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
 280 as_fn_exit ()
 281 {
 282   set +e
 283   as_fn_set_status $1
 284   exit $1
 285 } # as_fn_exit
 286 
 287 # as_fn_mkdir_p
 288 # -------------
 289 # Create "$as_dir" as a directory, including parents if necessary.
 290 as_fn_mkdir_p ()
 291 {
 292 
 293   case $as_dir in #(
 294   -*) as_dir=./$as_dir;;
 295   esac
 296   test -d "$as_dir" || eval $as_mkdir_p || {
 297     as_dirs=
 298     while :; do
 299       case $as_dir in #(
 300       *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
 301       *) as_qdir=$as_dir;;
 302       esac
 303       as_dirs="'$as_qdir' $as_dirs"
 304       as_dir=`$as_dirname -- "$as_dir" ||
 305 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
 306          X"$as_dir" : 'X\(//\)[^/]' \| \
 307          X"$as_dir" : 'X\(//\)$' \| \
 308          X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
 309 $as_echo X"$as_dir" |
 310     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
 311             s//\1/
 312             q
 313           }
 314           /^X\(\/\/\)[^/].*/{
 315             s//\1/
 316             q
 317           }
 318           /^X\(\/\/\)$/{
 319             s//\1/
 320             q
 321           }
 322           /^X\(\/\).*/{
 323             s//\1/
 324             q
 325           }
 326           s/.*/./; q'`
 327       test -d "$as_dir" && break
 328     done
 329     test -z "$as_dirs" || eval "mkdir $as_dirs"
 330   } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
 331 
 332 
 333 } # as_fn_mkdir_p
 334 # as_fn_append VAR VALUE
 335 # ----------------------
 336 # Append the text in VALUE to the end of the definition contained in VAR. Take
 337 # advantage of any shell optimizations that allow amortized linear growth over
 338 # repeated appends, instead of the typical quadratic growth present in naive
 339 # implementations.
 340 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
 341   eval 'as_fn_append ()
 342   {
 343     eval $1+=\$2
 344   }'
 345 else
 346   as_fn_append ()
 347   {
 348     eval $1=\$$1\$2
 349   }
 350 fi # as_fn_append
 351 
 352 # as_fn_arith ARG...
 353 # ------------------
 354 # Perform arithmetic evaluation on the ARGs, and store the result in the
 355 # global $as_val. Take advantage of shells that can avoid forks. The arguments
 356 # must be portable across $(()) and expr.
 357 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
 358   eval 'as_fn_arith ()
 359   {
 360     as_val=$(( $* ))
 361   }'
 362 else
 363   as_fn_arith ()
 364   {
 365     as_val=`expr "$@" || test $? -eq 1`
 366   }
 367 fi # as_fn_arith
 368 
 369 
 370 # as_fn_error STATUS ERROR [LINENO LOG_FD]
 371 # ----------------------------------------
 372 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
 373 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
 374 # script with STATUS, using 1 if that was 0.
 375 as_fn_error ()
 376 {
 377   as_status=$1; test $as_status -eq 0 && as_status=1
 378   if test "$4"; then
 379     as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
 380     $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
 381   fi
 382   $as_echo "$as_me: error: $2" >&2
 383   as_fn_exit $as_status
 384 } # as_fn_error
 385 
 386 if expr a : '\(a\)' >/dev/null 2>&1 &&
 387    test "X`expr 00001 : '.*\(...\)'`" = X001; then
 388   as_expr=expr
 389 else
 390   as_expr=false
 391 fi
 392 
 393 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
 394   as_basename=basename
 395 else
 396   as_basename=false
 397 fi
 398 
 399 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
 400   as_dirname=dirname
 401 else
 402   as_dirname=false
 403 fi
 404 
 405 as_me=`$as_basename -- "$0" ||
 406 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
 407          X"$0" : 'X\(//\)$' \| \
 408          X"$0" : 'X\(/\)' \| . 2>/dev/null ||
 409 $as_echo X/"$0" |
 410     sed '/^.*\/\([^/][^/]*\)\/*$/{
 411             s//\1/
 412             q
 413           }
 414           /^X\/\(\/\/\)$/{
 415             s//\1/
 416             q
 417           }
 418           /^X\/\(\/\).*/{
 419             s//\1/
 420             q
 421           }
 422           s/.*/./; q'`
 423 
 424 # Avoid depending upon Character Ranges.
 425 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
 426 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
 427 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
 428 as_cr_digits='0123456789'
 429 as_cr_alnum=$as_cr_Letters$as_cr_digits
 430 
 431 
 432   as_lineno_1=$LINENO as_lineno_1a=$LINENO
 433   as_lineno_2=$LINENO as_lineno_2a=$LINENO
 434   eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
 435   test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
 436   # Blame Lee E. McMahon (1931-1989) for sed's syntax.  :-)
 437   sed -n '
 438     p
 439     /[$]LINENO/=
 440   ' <$as_myself |
 441     sed '
 442       s/[$]LINENO.*/&-/
 443       t lineno
 444       b
 445       :lineno
 446       N
 447       :loop
 448       s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
 449       t loop
 450       s/-\n.*//
 451     ' >$as_me.lineno &&
 452   chmod +x "$as_me.lineno" ||
 453     { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
 454 
 455   # Don't try to exec as it changes $[0], causing all sort of problems
 456   # (the dirname of $[0] is not the place where we might find the
 457   # original and so on.  Autoconf is especially sensitive to this).
 458   . "./$as_me.lineno"
 459   # Exit status is that of the last command.
 460   exit
 461 }
 462 
 463 ECHO_C= ECHO_N= ECHO_T=
 464 case `echo -n x` in #(((((
 465 -n*)
 466   case `echo 'xy\c'` in
 467   *c*) ECHO_T=' ';;     # ECHO_T is single tab character.
 468   xy)  ECHO_C='\c';;
 469   *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
 470        ECHO_T=' ';;
 471   esac;;
 472 *)
 473   ECHO_N='-n';;
 474 esac
 475 
 476 rm -f conf$$ conf$$.exe conf$$.file
 477 if test -d conf$$.dir; then
 478   rm -f conf$$.dir/conf$$.file
 479 else
 480   rm -f conf$$.dir
 481   mkdir conf$$.dir 2>/dev/null
 482 fi
 483 if (echo >conf$$.file) 2>/dev/null; then
 484   if ln -s conf$$.file conf$$ 2>/dev/null; then
 485     as_ln_s='ln -s'
 486     # ... but there are two gotchas:
 487     # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
 488     # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
 489     # In both cases, we have to default to `cp -p'.
 490     ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
 491       as_ln_s='cp -p'
 492   elif ln conf$$.file conf$$ 2>/dev/null; then
 493     as_ln_s=ln
 494   else
 495     as_ln_s='cp -p'
 496   fi
 497 else
 498   as_ln_s='cp -p'
 499 fi
 500 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
 501 rmdir conf$$.dir 2>/dev/null
 502 
 503 if mkdir -p . 2>/dev/null; then
 504   as_mkdir_p='mkdir -p "$as_dir"'
 505 else
 506   test -d ./-p && rmdir ./-p
 507   as_mkdir_p=false
 508 fi
 509 
 510 if test -x / >/dev/null 2>&1; then
 511   as_test_x='test -x'
 512 else
 513   if ls -dL / >/dev/null 2>&1; then
 514     as_ls_L_option=L
 515   else
 516     as_ls_L_option=
 517   fi
 518   as_test_x='
 519     eval sh -c '\''
 520       if test -d "$1"; then
 521         test -d "$1/.";
 522       else
 523         case $1 in #(
 524         -*)set "./$1";;
 525         esac;
 526         case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
 527         ???[sx]*):;;*)false;;esac;fi
 528     '\'' sh
 529   '
 530 fi
 531 as_executable_p=$as_test_x
 532 
 533 # Sed expression to map a string onto a valid CPP name.
 534 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
 535 
 536 # Sed expression to map a string onto a valid variable name.
 537 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
 538 
 539 
 540 test -n "$DJDIR" || exec 7<&0 </dev/null
 541 exec 6>&1
 542 
 543 # Name of the host.
 544 # hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
 545 # so uname gets run too.
 546 ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
 547 
 548 #
 549 # Initializations.
 550 #
 551 ac_default_prefix=/usr/local
 552 ac_clean_files=
 553 ac_config_libobj_dir=.
 554 LIBOBJS=
 555 cross_compiling=no
 556 subdirs=
 557 MFLAGS=
 558 MAKEFLAGS=
 559 
 560 # Identity of this package.
 561 PACKAGE_NAME='OpenJDK'
 562 PACKAGE_TARNAME='openjdk'
 563 PACKAGE_VERSION='jdk8'
 564 PACKAGE_STRING='OpenJDK jdk8'
 565 PACKAGE_BUGREPORT='build-dev@openjdk.java.net'
 566 PACKAGE_URL='http://openjdk.java.net'
 567 
 568 # Factoring default headers for most tests.
 569 ac_includes_default="\
 570 #include <stdio.h>
 571 #ifdef HAVE_SYS_TYPES_H
 572 # include <sys/types.h>
 573 #endif
 574 #ifdef HAVE_SYS_STAT_H
 575 # include <sys/stat.h>
 576 #endif
 577 #ifdef STDC_HEADERS
 578 # include <stdlib.h>
 579 # include <stddef.h>
 580 #else
 581 # ifdef HAVE_STDLIB_H
 582 #  include <stdlib.h>
 583 # endif
 584 #endif
 585 #ifdef HAVE_STRING_H
 586 # if !defined STDC_HEADERS && defined HAVE_MEMORY_H
 587 #  include <memory.h>
 588 # endif
 589 # include <string.h>
 590 #endif
 591 #ifdef HAVE_STRINGS_H
 592 # include <strings.h>
 593 #endif
 594 #ifdef HAVE_INTTYPES_H
 595 # include <inttypes.h>
 596 #endif
 597 #ifdef HAVE_STDINT_H
 598 # include <stdint.h>
 599 #endif
 600 #ifdef HAVE_UNISTD_H
 601 # include <unistd.h>
 602 #endif"
 603 
 604 ac_subst_vars='LTLIBOBJS
 605 LIBOBJS
 606 CCACHE
 607 USE_PRECOMPILED_HEADER
 608 SJAVAC_SERVER_DIR
 609 ENABLE_SJAVAC
 610 SJAVAC_SERVER_CORES
 611 SJAVAC_SERVER_JAVA
 612 JOBS
 613 MEMORY_SIZE
 614 NUM_CORES
 615 ENABLE_INTREE_EC
 616 SALIB_NAME
 617 HOTSPOT_MAKE_ARGS
 618 FIXPATH
 619 LIBCXX
 620 STATIC_CXX_SETTING
 621 LIBDL
 622 LIBM
 623 LIBZIP_CAN_USE_MMAP
 624 USE_EXTERNAL_LIBZ
 625 USE_EXTERNAL_LIBGIF
 626 USE_EXTERNAL_LIBJPEG
 627 ALSA_LIBS
 628 ALSA_CFLAGS
 629 FREETYPE2_LIB_PATH
 630 USING_SYSTEM_FT_LIB
 631 FREETYPE2_LIBS
 632 FREETYPE2_CFLAGS
 633 CUPS_CFLAGS
 634 OPENWIN_HOME
 635 X_EXTRA_LIBS
 636 X_LIBS
 637 X_PRE_LIBS
 638 X_CFLAGS
 639 XMKMF
 640 CXXFLAGS_DEBUG_SYMBOLS
 641 CFLAGS_DEBUG_SYMBOLS
 642 ZIP_DEBUGINFO_FILES
 643 ENABLE_DEBUG_SYMBOLS
 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 LIPO
 685 ac_ct_OBJDUMP
 686 OBJDUMP
 687 ac_ct_OBJCOPY
 688 OBJCOPY
 689 MCS
 690 STRIP
 691 NM
 692 AS
 693 CXXCPP
 694 CPP
 695 COMPILER_TYPE
 696 RC_FLAGS
 697 DUMPBIN
 698 WINAR
 699 HOTSPOT_RC
 700 HOTSPOT_MT
 701 RC
 702 MT
 703 WINLD
 704 HOTSPOT_LD
 705 HOTSPOT_CXX
 706 ARFLAGS
 707 AR
 708 LDEXECXX
 709 LDCXX
 710 LDEXE
 711 LD
 712 ac_ct_OBJC
 713 OBJCFLAGS
 714 OBJC
 715 ac_ct_CXX
 716 CXXFLAGS
 717 CXX
 718 ac_ct_PROPER_COMPILER_CXX
 719 PROPER_COMPILER_CXX
 720 POTENTIAL_CXX
 721 TOOLS_DIR_CXX
 722 OBJEXT
 723 EXEEXT
 724 ac_ct_CC
 725 CPPFLAGS
 726 LDFLAGS
 727 CFLAGS
 728 CC
 729 ac_ct_PROPER_COMPILER_CC
 730 PROPER_COMPILER_CC
 731 POTENTIAL_CC
 732 TOOLS_DIR_CC
 733 BUILD_LD
 734 BUILD_CXX
 735 BUILD_CC
 736 MSVCR_DLL
 737 DXSDK_INCLUDE_PATH
 738 DXSDK_LIB_PATH
 739 VS_PATH
 740 VS_LIB
 741 VS_INCLUDE
 742 CYGWIN_LINK
 743 AR_OUT_OPTION
 744 LD_OUT_OPTION
 745 EXE_OUT_OPTION
 746 CC_OUT_OPTION
 747 BUILD_HOTSPOT
 748 HOTSPOT_DIST
 749 BUILD_OUTPUT
 750 OVERRIDE_SRC_ROOT
 751 ADD_SRC_ROOT
 752 JDK_TOPDIR
 753 NASHORN_TOPDIR
 754 HOTSPOT_TOPDIR
 755 JAXWS_TOPDIR
 756 JAXP_TOPDIR
 757 CORBA_TOPDIR
 758 LANGTOOLS_TOPDIR
 759 BOOT_JDK_JVMARGS
 760 JAVAC_FLAGS
 761 BOOT_JDK_SOURCETARGET
 762 BOOT_JDK
 763 BOOT_TOOLSJAR
 764 BOOT_RTJAR
 765 JAVA_CHECK
 766 JAVAC_CHECK
 767 COOKED_BUILD_NUMBER
 768 JDK_VERSION
 769 COPYRIGHT_YEAR
 770 MACOSX_BUNDLE_ID_BASE
 771 MACOSX_BUNDLE_NAME_BASE
 772 COMPANY_NAME
 773 JDK_RC_PLATFORM_NAME
 774 PRODUCT_SUFFIX
 775 PRODUCT_NAME
 776 LAUNCHER_NAME
 777 MILESTONE
 778 JDK_BUILD_NUMBER
 779 JDK_UPDATE_VERSION
 780 JDK_MICRO_VERSION
 781 JDK_MINOR_VERSION
 782 JDK_MAJOR_VERSION
 783 USER_RELEASE_SUFFIX
 784 COMPRESS_JARS
 785 UNLIMITED_CRYPTO
 786 CACERTS_FILE
 787 TEST_IN_BUILD
 788 BUILD_HEADLESS
 789 SUPPORT_HEADFUL
 790 SUPPORT_HEADLESS
 791 BDEPS_FTP
 792 BDEPS_UNZIP
 793 OS_VERSION_MICRO
 794 OS_VERSION_MINOR
 795 OS_VERSION_MAJOR
 796 PKG_CONFIG
 797 TIME
 798 STAT
 799 HG
 800 READELF
 801 OTOOL
 802 LDD
 803 ZIP
 804 UNZIP
 805 FIND_DELETE
 806 MAKE
 807 CHECK_TOOLSDIR_MAKE
 808 CHECK_TOOLSDIR_GMAKE
 809 CHECK_MAKE
 810 CHECK_GMAKE
 811 PKGHANDLER
 812 OUTPUT_ROOT
 813 CONF_NAME
 814 SPEC
 815 BUILD_VARIANT_RELEASE
 816 DEBUG_CLASSFILES
 817 FASTDEBUG
 818 VARIANT
 819 DEBUG_LEVEL
 820 MACOSX_UNIVERSAL
 821 JVM_VARIANT_ZEROSHARK
 822 JVM_VARIANT_ZERO
 823 JVM_VARIANT_KERNEL
 824 JVM_VARIANT_MINIMAL1
 825 JVM_VARIANT_CLIENT
 826 JVM_VARIANT_SERVER
 827 JVM_VARIANTS
 828 JDK_VARIANT
 829 SET_OPENJDK
 830 BUILD_LOG_WRAPPER
 831 BUILD_LOG_PREVIOUS
 832 BUILD_LOG
 833 SYS_ROOT
 834 PATH_SEP
 835 SRC_ROOT
 836 DEFINE_CROSS_COMPILE_ARCH
 837 LP64
 838 OPENJDK_TARGET_OS_API_DIR
 839 OPENJDK_TARGET_CPU_JLI_CFLAGS
 840 OPENJDK_TARGET_CPU_OSARCH
 841 OPENJDK_TARGET_CPU_ISADIR
 842 OPENJDK_TARGET_CPU_LIBDIR
 843 OPENJDK_TARGET_CPU_LEGACY_LIB
 844 OPENJDK_TARGET_CPU_LEGACY
 845 REQUIRED_OS_VERSION
 846 REQUIRED_OS_NAME
 847 COMPILE_TYPE
 848 OPENJDK_TARGET_CPU_ENDIAN
 849 OPENJDK_TARGET_CPU_BITS
 850 OPENJDK_TARGET_CPU_ARCH
 851 OPENJDK_TARGET_CPU
 852 OPENJDK_TARGET_OS_API
 853 OPENJDK_TARGET_OS
 854 OPENJDK_BUILD_CPU_ENDIAN
 855 OPENJDK_BUILD_CPU_BITS
 856 OPENJDK_BUILD_CPU_ARCH
 857 OPENJDK_BUILD_CPU
 858 OPENJDK_BUILD_OS_API
 859 OPENJDK_BUILD_OS
 860 OPENJDK_BUILD_AUTOCONF_NAME
 861 OPENJDK_TARGET_AUTOCONF_NAME
 862 target_os
 863 target_vendor
 864 target_cpu
 865 target
 866 host_os
 867 host_vendor
 868 host_cpu
 869 host
 870 build_os
 871 build_vendor
 872 build_cpu
 873 build
 874 SETFILE
 875 DF
 876 READLINK
 877 CYGPATH
 878 NAWK
 879 SED
 880 FGREP
 881 EGREP
 882 GREP
 883 AWK
 884 XARGS
 885 WHICH
 886 WC
 887 UNIQ
 888 UNAME
 889 TR
 890 TOUCH
 891 TEE
 892 TAR
 893 TAIL
 894 SORT
 895 SH
 896 RM
 897 THEPWDCMD
 898 PRINTF
 899 MV
 900 MKTEMP
 901 MKDIR
 902 LS
 903 LN
 904 HEAD
 905 FIND
 906 FILE
 907 EXPR
 908 ECHO
 909 DIRNAME
 910 DIFF
 911 DATE
 912 CUT
 913 CPIO
 914 CP
 915 COMM
 916 CMP
 917 CHMOD
 918 CAT
 919 BASH
 920 BASENAME
 921 DATE_WHEN_CONFIGURED
 922 CONFIGURE_COMMAND_LINE
 923 CUSTOM_MAKE_DIR
 924 target_alias
 925 host_alias
 926 build_alias
 927 LIBS
 928 ECHO_T
 929 ECHO_N
 930 ECHO_C
 931 DEFS
 932 mandir
 933 localedir
 934 libdir
 935 psdir
 936 pdfdir
 937 dvidir
 938 htmldir
 939 infodir
 940 docdir
 941 oldincludedir
 942 includedir
 943 localstatedir
 944 sharedstatedir
 945 sysconfdir
 946 datadir
 947 datarootdir
 948 libexecdir
 949 sbindir
 950 bindir
 951 program_transform_name
 952 prefix
 953 exec_prefix
 954 PACKAGE_URL
 955 PACKAGE_BUGREPORT
 956 PACKAGE_STRING
 957 PACKAGE_VERSION
 958 PACKAGE_TARNAME
 959 PACKAGE_NAME
 960 PATH_SEPARATOR
 961 SHELL'
 962 ac_subst_files=''
 963 ac_user_opts='
 964 enable_option_checking
 965 with_custom_make_dir
 966 with_target_bits
 967 with_sys_root
 968 with_tools_dir
 969 with_devkit
 970 enable_openjdk_only
 971 with_jdk_variant
 972 with_jvm_variants
 973 enable_debug
 974 with_debug_level
 975 with_conf_name
 976 with_builddeps_conf
 977 with_builddeps_server
 978 with_builddeps_dir
 979 with_builddeps_group
 980 enable_headful
 981 enable_hotspot_test_in_build
 982 with_cacerts_file
 983 enable_unlimited_crypto
 984 with_milestone
 985 with_build_number
 986 with_user_release_suffix
 987 with_boot_jdk
 988 with_boot_jdk_jvmargs
 989 with_add_source_root
 990 with_override_source_root
 991 with_adds_and_overrides
 992 with_override_langtools
 993 with_override_corba
 994 with_override_jaxp
 995 with_override_jaxws
 996 with_override_hotspot
 997 with_override_jdk
 998 with_import_hotspot
 999 with_msvcr_dll
1000 with_dxsdk
1001 with_dxsdk_lib
1002 with_dxsdk_include
1003 with_extra_cflags
1004 with_extra_cxxflags
1005 with_extra_ldflags
1006 enable_debug_symbols
1007 enable_zip_debug_info
1008 enable_macosx_runtime_support
1009 with_x
1010 with_cups
1011 with_cups_include
1012 with_freetype
1013 with_alsa
1014 with_alsa_include
1015 with_alsa_lib
1016 with_zlib
1017 with_stdc__lib
1018 with_num_cores
1019 with_memory_size
1020 with_jobs
1021 with_sjavac_server_java
1022 with_sjavac_server_cores
1023 enable_sjavac
1024 enable_precompiled_headers
1025 enable_ccache
1026 with_ccache_dir
1027 '
1028       ac_precious_vars='build_alias
1029 host_alias
1030 target_alias
1031 PKG_CONFIG
1032 CC
1033 CFLAGS
1034 LDFLAGS
1035 LIBS
1036 CPPFLAGS
1037 CXX
1038 CXXFLAGS
1039 CCC
1040 OBJC
1041 OBJCFLAGS
1042 CPP
1043 CXXCPP
1044 XMKMF
1045 FREETYPE2_CFLAGS
1046 FREETYPE2_LIBS
1047 ALSA_CFLAGS
1048 ALSA_LIBS'
1049 
1050 
1051 # Initialize some variables set by options.
1052 ac_init_help=
1053 ac_init_version=false
1054 ac_unrecognized_opts=
1055 ac_unrecognized_sep=
1056 # The variables have the same names as the options, with
1057 # dashes changed to underlines.
1058 cache_file=/dev/null
1059 exec_prefix=NONE
1060 no_create=
1061 no_recursion=
1062 prefix=NONE
1063 program_prefix=NONE
1064 program_suffix=NONE
1065 program_transform_name=s,x,x,
1066 silent=
1067 site=
1068 srcdir=
1069 verbose=
1070 x_includes=NONE
1071 x_libraries=NONE
1072 
1073 # Installation directory options.
1074 # These are left unexpanded so users can "make install exec_prefix=/foo"
1075 # and all the variables that are supposed to be based on exec_prefix
1076 # by default will actually change.
1077 # Use braces instead of parens because sh, perl, etc. also accept them.
1078 # (The list follows the same order as the GNU Coding Standards.)
1079 bindir='${exec_prefix}/bin'
1080 sbindir='${exec_prefix}/sbin'
1081 libexecdir='${exec_prefix}/libexec'
1082 datarootdir='${prefix}/share'
1083 datadir='${datarootdir}'
1084 sysconfdir='${prefix}/etc'
1085 sharedstatedir='${prefix}/com'
1086 localstatedir='${prefix}/var'
1087 includedir='${prefix}/include'
1088 oldincludedir='/usr/include'
1089 docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
1090 infodir='${datarootdir}/info'
1091 htmldir='${docdir}'
1092 dvidir='${docdir}'
1093 pdfdir='${docdir}'
1094 psdir='${docdir}'
1095 libdir='${exec_prefix}/lib'
1096 localedir='${datarootdir}/locale'
1097 mandir='${datarootdir}/man'
1098 
1099 ac_prev=
1100 ac_dashdash=
1101 for ac_option
1102 do
1103   # If the previous option needs an argument, assign it.
1104   if test -n "$ac_prev"; then
1105     eval $ac_prev=\$ac_option
1106     ac_prev=
1107     continue
1108   fi
1109 
1110   case $ac_option in
1111   *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
1112   *=)   ac_optarg= ;;
1113   *)    ac_optarg=yes ;;
1114   esac
1115 
1116   # Accept the important Cygnus configure options, so we can diagnose typos.
1117 
1118   case $ac_dashdash$ac_option in
1119   --)
1120     ac_dashdash=yes ;;
1121 
1122   -bindir | --bindir | --bindi | --bind | --bin | --bi)
1123     ac_prev=bindir ;;
1124   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
1125     bindir=$ac_optarg ;;
1126 
1127   -build | --build | --buil | --bui | --bu)
1128     ac_prev=build_alias ;;
1129   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
1130     build_alias=$ac_optarg ;;
1131 
1132   -cache-file | --cache-file | --cache-fil | --cache-fi \
1133   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1134     ac_prev=cache_file ;;
1135   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1136   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
1137     cache_file=$ac_optarg ;;
1138 
1139   --config-cache | -C)
1140     cache_file=config.cache ;;
1141 
1142   -datadir | --datadir | --datadi | --datad)
1143     ac_prev=datadir ;;
1144   -datadir=* | --datadir=* | --datadi=* | --datad=*)
1145     datadir=$ac_optarg ;;
1146 
1147   -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1148   | --dataroo | --dataro | --datar)
1149     ac_prev=datarootdir ;;
1150   -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1151   | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1152     datarootdir=$ac_optarg ;;
1153 
1154   -disable-* | --disable-*)
1155     ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1156     # Reject names that are not valid shell variable names.
1157     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1158       as_fn_error $? "invalid feature name: $ac_useropt"
1159     ac_useropt_orig=$ac_useropt
1160     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1161     case $ac_user_opts in
1162       *"
1163 "enable_$ac_useropt"
1164 "*) ;;
1165       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1166          ac_unrecognized_sep=', ';;
1167     esac
1168     eval enable_$ac_useropt=no ;;
1169 
1170   -docdir | --docdir | --docdi | --doc | --do)
1171     ac_prev=docdir ;;
1172   -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1173     docdir=$ac_optarg ;;
1174 
1175   -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1176     ac_prev=dvidir ;;
1177   -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1178     dvidir=$ac_optarg ;;
1179 
1180   -enable-* | --enable-*)
1181     ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1182     # Reject names that are not valid shell variable names.
1183     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1184       as_fn_error $? "invalid feature name: $ac_useropt"
1185     ac_useropt_orig=$ac_useropt
1186     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1187     case $ac_user_opts in
1188       *"
1189 "enable_$ac_useropt"
1190 "*) ;;
1191       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1192          ac_unrecognized_sep=', ';;
1193     esac
1194     eval enable_$ac_useropt=\$ac_optarg ;;
1195 
1196   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1197   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1198   | --exec | --exe | --ex)
1199     ac_prev=exec_prefix ;;
1200   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1201   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1202   | --exec=* | --exe=* | --ex=*)
1203     exec_prefix=$ac_optarg ;;
1204 
1205   -gas | --gas | --ga | --g)
1206     # Obsolete; use --with-gas.
1207     with_gas=yes ;;
1208 
1209   -help | --help | --hel | --he | -h)
1210     ac_init_help=long ;;
1211   -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1212     ac_init_help=recursive ;;
1213   -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1214     ac_init_help=short ;;
1215 
1216   -host | --host | --hos | --ho)
1217     ac_prev=host_alias ;;
1218   -host=* | --host=* | --hos=* | --ho=*)
1219     host_alias=$ac_optarg ;;
1220 
1221   -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1222     ac_prev=htmldir ;;
1223   -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1224   | --ht=*)
1225     htmldir=$ac_optarg ;;
1226 
1227   -includedir | --includedir | --includedi | --included | --include \
1228   | --includ | --inclu | --incl | --inc)
1229     ac_prev=includedir ;;
1230   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1231   | --includ=* | --inclu=* | --incl=* | --inc=*)
1232     includedir=$ac_optarg ;;
1233 
1234   -infodir | --infodir | --infodi | --infod | --info | --inf)
1235     ac_prev=infodir ;;
1236   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1237     infodir=$ac_optarg ;;
1238 
1239   -libdir | --libdir | --libdi | --libd)
1240     ac_prev=libdir ;;
1241   -libdir=* | --libdir=* | --libdi=* | --libd=*)
1242     libdir=$ac_optarg ;;
1243 
1244   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1245   | --libexe | --libex | --libe)
1246     ac_prev=libexecdir ;;
1247   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1248   | --libexe=* | --libex=* | --libe=*)
1249     libexecdir=$ac_optarg ;;
1250 
1251   -localedir | --localedir | --localedi | --localed | --locale)
1252     ac_prev=localedir ;;
1253   -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1254     localedir=$ac_optarg ;;
1255 
1256   -localstatedir | --localstatedir | --localstatedi | --localstated \
1257   | --localstate | --localstat | --localsta | --localst | --locals)
1258     ac_prev=localstatedir ;;
1259   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1260   | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1261     localstatedir=$ac_optarg ;;
1262 
1263   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1264     ac_prev=mandir ;;
1265   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1266     mandir=$ac_optarg ;;
1267 
1268   -nfp | --nfp | --nf)
1269     # Obsolete; use --without-fp.
1270     with_fp=no ;;
1271 
1272   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1273   | --no-cr | --no-c | -n)
1274     no_create=yes ;;
1275 
1276   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1277   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1278     no_recursion=yes ;;
1279 
1280   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1281   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1282   | --oldin | --oldi | --old | --ol | --o)
1283     ac_prev=oldincludedir ;;
1284   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1285   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1286   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1287     oldincludedir=$ac_optarg ;;
1288 
1289   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1290     ac_prev=prefix ;;
1291   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1292     prefix=$ac_optarg ;;
1293 
1294   -program-prefix | --program-prefix | --program-prefi | --program-pref \
1295   | --program-pre | --program-pr | --program-p)
1296     ac_prev=program_prefix ;;
1297   -program-prefix=* | --program-prefix=* | --program-prefi=* \
1298   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1299     program_prefix=$ac_optarg ;;
1300 
1301   -program-suffix | --program-suffix | --program-suffi | --program-suff \
1302   | --program-suf | --program-su | --program-s)
1303     ac_prev=program_suffix ;;
1304   -program-suffix=* | --program-suffix=* | --program-suffi=* \
1305   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1306     program_suffix=$ac_optarg ;;
1307 
1308   -program-transform-name | --program-transform-name \
1309   | --program-transform-nam | --program-transform-na \
1310   | --program-transform-n | --program-transform- \
1311   | --program-transform | --program-transfor \
1312   | --program-transfo | --program-transf \
1313   | --program-trans | --program-tran \
1314   | --progr-tra | --program-tr | --program-t)
1315     ac_prev=program_transform_name ;;
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     program_transform_name=$ac_optarg ;;
1324 
1325   -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1326     ac_prev=pdfdir ;;
1327   -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1328     pdfdir=$ac_optarg ;;
1329 
1330   -psdir | --psdir | --psdi | --psd | --ps)
1331     ac_prev=psdir ;;
1332   -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1333     psdir=$ac_optarg ;;
1334 
1335   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1336   | -silent | --silent | --silen | --sile | --sil)
1337     silent=yes ;;
1338 
1339   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1340     ac_prev=sbindir ;;
1341   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1342   | --sbi=* | --sb=*)
1343     sbindir=$ac_optarg ;;
1344 
1345   -sharedstatedir | --sharedstatedir | --sharedstatedi \
1346   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1347   | --sharedst | --shareds | --shared | --share | --shar \
1348   | --sha | --sh)
1349     ac_prev=sharedstatedir ;;
1350   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1351   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1352   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1353   | --sha=* | --sh=*)
1354     sharedstatedir=$ac_optarg ;;
1355 
1356   -site | --site | --sit)
1357     ac_prev=site ;;
1358   -site=* | --site=* | --sit=*)
1359     site=$ac_optarg ;;
1360 
1361   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1362     ac_prev=srcdir ;;
1363   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1364     srcdir=$ac_optarg ;;
1365 
1366   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1367   | --syscon | --sysco | --sysc | --sys | --sy)
1368     ac_prev=sysconfdir ;;
1369   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1370   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1371     sysconfdir=$ac_optarg ;;
1372 
1373   -target | --target | --targe | --targ | --tar | --ta | --t)
1374     ac_prev=target_alias ;;
1375   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1376     target_alias=$ac_optarg ;;
1377 
1378   -v | -verbose | --verbose | --verbos | --verbo | --verb)
1379     verbose=yes ;;
1380 
1381   -version | --version | --versio | --versi | --vers | -V)
1382     ac_init_version=: ;;
1383 
1384   -with-* | --with-*)
1385     ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1386     # Reject names that are not valid shell variable names.
1387     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1388       as_fn_error $? "invalid package name: $ac_useropt"
1389     ac_useropt_orig=$ac_useropt
1390     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1391     case $ac_user_opts in
1392       *"
1393 "with_$ac_useropt"
1394 "*) ;;
1395       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1396          ac_unrecognized_sep=', ';;
1397     esac
1398     eval with_$ac_useropt=\$ac_optarg ;;
1399 
1400   -without-* | --without-*)
1401     ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1402     # Reject names that are not valid shell variable names.
1403     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1404       as_fn_error $? "invalid package name: $ac_useropt"
1405     ac_useropt_orig=$ac_useropt
1406     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1407     case $ac_user_opts in
1408       *"
1409 "with_$ac_useropt"
1410 "*) ;;
1411       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1412          ac_unrecognized_sep=', ';;
1413     esac
1414     eval with_$ac_useropt=no ;;
1415 
1416   --x)
1417     # Obsolete; use --with-x.
1418     with_x=yes ;;
1419 
1420   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1421   | --x-incl | --x-inc | --x-in | --x-i)
1422     ac_prev=x_includes ;;
1423   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1424   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1425     x_includes=$ac_optarg ;;
1426 
1427   -x-libraries | --x-libraries | --x-librarie | --x-librari \
1428   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1429     ac_prev=x_libraries ;;
1430   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1431   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1432     x_libraries=$ac_optarg ;;
1433 
1434   -*) as_fn_error $? "unrecognized option: \`$ac_option'
1435 Try \`$0 --help' for more information"
1436     ;;
1437 
1438   *=*)
1439     ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1440     # Reject names that are not valid shell variable names.
1441     case $ac_envvar in #(
1442       '' | [0-9]* | *[!_$as_cr_alnum]* )
1443       as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1444     esac
1445     eval $ac_envvar=\$ac_optarg
1446     export $ac_envvar ;;
1447 
1448   *)
1449     # FIXME: should be removed in autoconf 3.0.
1450     $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1451     expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1452       $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1453     : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1454     ;;
1455 
1456   esac
1457 done
1458 
1459 if test -n "$ac_prev"; then
1460   ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1461   as_fn_error $? "missing argument to $ac_option"
1462 fi
1463 
1464 if test -n "$ac_unrecognized_opts"; then
1465   case $enable_option_checking in
1466     no) ;;
1467     fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1468     *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1469   esac
1470 fi
1471 
1472 # Check all directory arguments for consistency.
1473 for ac_var in   exec_prefix prefix bindir sbindir libexecdir datarootdir \
1474                 datadir sysconfdir sharedstatedir localstatedir includedir \
1475                 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1476                 libdir localedir mandir
1477 do
1478   eval ac_val=\$$ac_var
1479   # Remove trailing slashes.
1480   case $ac_val in
1481     */ )
1482       ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1483       eval $ac_var=\$ac_val;;
1484   esac
1485   # Be sure to have absolute directory names.
1486   case $ac_val in
1487     [\\/$]* | ?:[\\/]* )  continue;;
1488     NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1489   esac
1490   as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1491 done
1492 
1493 # There might be people who depend on the old broken behavior: `$host'
1494 # used to hold the argument of --host etc.
1495 # FIXME: To remove some day.
1496 build=$build_alias
1497 host=$host_alias
1498 target=$target_alias
1499 
1500 # FIXME: To remove some day.
1501 if test "x$host_alias" != x; then
1502   if test "x$build_alias" = x; then
1503     cross_compiling=maybe
1504     $as_echo "$as_me: WARNING: if you wanted to set the --build type, don't use --host.
1505     If a cross compiler is detected then cross compile mode will be used" >&2
1506   elif test "x$build_alias" != "x$host_alias"; then
1507     cross_compiling=yes
1508   fi
1509 fi
1510 
1511 ac_tool_prefix=
1512 test -n "$host_alias" && ac_tool_prefix=$host_alias-
1513 
1514 test "$silent" = yes && exec 6>/dev/null
1515 
1516 
1517 ac_pwd=`pwd` && test -n "$ac_pwd" &&
1518 ac_ls_di=`ls -di .` &&
1519 ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1520   as_fn_error $? "working directory cannot be determined"
1521 test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1522   as_fn_error $? "pwd does not report name of working directory"
1523 
1524 
1525 # Find the source files, if location was not specified.
1526 if test -z "$srcdir"; then
1527   ac_srcdir_defaulted=yes
1528   # Try the directory containing this script, then the parent directory.
1529   ac_confdir=`$as_dirname -- "$as_myself" ||
1530 $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1531          X"$as_myself" : 'X\(//\)[^/]' \| \
1532          X"$as_myself" : 'X\(//\)$' \| \
1533          X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1534 $as_echo X"$as_myself" |
1535     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1536             s//\1/
1537             q
1538           }
1539           /^X\(\/\/\)[^/].*/{
1540             s//\1/
1541             q
1542           }
1543           /^X\(\/\/\)$/{
1544             s//\1/
1545             q
1546           }
1547           /^X\(\/\).*/{
1548             s//\1/
1549             q
1550           }
1551           s/.*/./; q'`
1552   srcdir=$ac_confdir
1553   if test ! -r "$srcdir/$ac_unique_file"; then
1554     srcdir=..
1555   fi
1556 else
1557   ac_srcdir_defaulted=no
1558 fi
1559 if test ! -r "$srcdir/$ac_unique_file"; then
1560   test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1561   as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1562 fi
1563 ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1564 ac_abs_confdir=`(
1565         cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1566         pwd)`
1567 # When building in place, set srcdir=.
1568 if test "$ac_abs_confdir" = "$ac_pwd"; then
1569   srcdir=.
1570 fi
1571 # Remove unnecessary trailing slashes from srcdir.
1572 # Double slashes in file names in object file debugging info
1573 # mess up M-x gdb in Emacs.
1574 case $srcdir in
1575 */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1576 esac
1577 for ac_var in $ac_precious_vars; do
1578   eval ac_env_${ac_var}_set=\${${ac_var}+set}
1579   eval ac_env_${ac_var}_value=\$${ac_var}
1580   eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1581   eval ac_cv_env_${ac_var}_value=\$${ac_var}
1582 done
1583 
1584 #
1585 # Report the --help message.
1586 #
1587 if test "$ac_init_help" = "long"; then
1588   # Omit some internal or obsolete options to make the list less imposing.
1589   # This message is too long to be a string in the A/UX 3.1 sh.
1590   cat <<_ACEOF
1591 \`configure' configures OpenJDK jdk8 to adapt to many kinds of systems.
1592 
1593 Usage: $0 [OPTION]... [VAR=VALUE]...
1594 
1595 To assign environment variables (e.g., CC, CFLAGS...), specify them as
1596 VAR=VALUE.  See below for descriptions of some of the useful variables.
1597 
1598 Defaults for the options are specified in brackets.
1599 
1600 Configuration:
1601   -h, --help              display this help and exit
1602       --help=short        display options specific to this package
1603       --help=recursive    display the short help of all the included packages
1604   -V, --version           display version information and exit
1605   -q, --quiet, --silent   do not print \`checking ...' messages
1606       --cache-file=FILE   cache test results in FILE [disabled]
1607   -C, --config-cache      alias for \`--cache-file=config.cache'
1608   -n, --no-create         do not create output files
1609       --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1610 
1611 Installation directories:
1612   --prefix=PREFIX         install architecture-independent files in PREFIX
1613                           [$ac_default_prefix]
1614   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1615                           [PREFIX]
1616 
1617 By default, \`make install' will install all the files in
1618 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1619 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1620 for instance \`--prefix=\$HOME'.
1621 
1622 For better control, use the options below.
1623 
1624 Fine tuning of the installation directories:
1625   --bindir=DIR            user executables [EPREFIX/bin]
1626   --sbindir=DIR           system admin executables [EPREFIX/sbin]
1627   --libexecdir=DIR        program executables [EPREFIX/libexec]
1628   --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
1629   --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
1630   --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
1631   --libdir=DIR            object code libraries [EPREFIX/lib]
1632   --includedir=DIR        C header files [PREFIX/include]
1633   --oldincludedir=DIR     C header files for non-gcc [/usr/include]
1634   --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
1635   --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
1636   --infodir=DIR           info documentation [DATAROOTDIR/info]
1637   --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
1638   --mandir=DIR            man documentation [DATAROOTDIR/man]
1639   --docdir=DIR            documentation root [DATAROOTDIR/doc/openjdk]
1640   --htmldir=DIR           html documentation [DOCDIR]
1641   --dvidir=DIR            dvi documentation [DOCDIR]
1642   --pdfdir=DIR            pdf documentation [DOCDIR]
1643   --psdir=DIR             ps documentation [DOCDIR]
1644 _ACEOF
1645 
1646   cat <<\_ACEOF
1647 
1648 X features:
1649   --x-includes=DIR    X include files are in DIR
1650   --x-libraries=DIR   X library files are in DIR
1651 
1652 System types:
1653   --build=BUILD     configure for building on BUILD [guessed]
1654   --host=HOST       cross-compile to build programs to run on HOST [BUILD]
1655   --target=TARGET   configure for building compilers for TARGET [HOST]
1656 _ACEOF
1657 fi
1658 
1659 if test -n "$ac_init_help"; then
1660   case $ac_init_help in
1661      short | recursive ) echo "Configuration of OpenJDK jdk8:";;
1662    esac
1663   cat <<\_ACEOF
1664 
1665 Optional Features:
1666   --disable-option-checking  ignore unrecognized --enable/--with options
1667   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1668   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1669   --enable-openjdk-only   suppress building custom source even if present
1670                           [disabled]
1671   --enable-debug          set the debug level to fastdebug (shorthand for
1672                           --with-debug-level=fastdebug) [disabled]
1673   --disable-headful       disable building headful support (graphical UI
1674                           support) [enabled]
1675   --enable-hotspot-test-in-build
1676                           run the Queens test after Hotspot build [disabled]
1677   --enable-unlimited-crypto
1678                           Enable unlimited crypto policy [disabled]
1679   --disable-debug-symbols disable generation of debug symbols [enabled]
1680   --disable-zip-debug-info
1681                           disable zipping of debug-info files [enabled]
1682   --disable-macosx-runtime-support
1683                           disable the use of MacOSX Java runtime support
1684                           framework [enabled]
1685   --enable-sjavac         use sjavac to do fast incremental compiles
1686                           [disabled]
1687   --disable-precompiled-headers
1688                           disable using precompiled headers when compiling C++
1689                           [enabled]
1690   --disable-ccache        disable using ccache to speed up recompilations
1691                           [enabled]
1692 
1693 Optional Packages:
1694   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
1695   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
1696   --with-custom-make-dir  use this directory for custom build/make files
1697   --with-target-bits      build 32-bit or 64-bit binaries (for platforms that
1698                           support it), e.g. --with-target-bits=32 [guessed]
1699   --with-sys-root         pass this sys-root to the compilers and tools (for
1700                           cross-compiling)
1701   --with-tools-dir        search this directory for compilers and tools (for
1702                           cross-compiling)
1703   --with-devkit           use this directory as base for tools-dir and
1704                           sys-root (for cross-compiling)
1705   --with-jdk-variant      JDK variant to build (normal) [normal]
1706   --with-jvm-variants     JVM variants (separated by commas) to build (server,
1707                           client, minimal1, kernel, zero, zeroshark) [server]
1708   --with-debug-level      set the debug level (release, fastdebug, slowdebug)
1709                           [release]
1710   --with-conf-name        use this as the name of the configuration [generated
1711                           from important configuration options]
1712   --with-builddeps-conf   use this configuration file for the builddeps
1713   --with-builddeps-server download and use build dependencies from this server
1714                           url
1715   --with-builddeps-dir    store downloaded build dependencies here
1716                           [/localhome/builddeps]
1717   --with-builddeps-group  chgrp the downloaded build dependencies to this
1718                           group
1719   --with-cacerts-file     specify alternative cacerts file
1720   --with-milestone        Set milestone value for build [internal]
1721   --with-build-number     Set build number value for build [b00]
1722   --with-user-release-suffix
1723                           Add a custom string to the version string if build
1724                           number isn't set.[username_builddateb00]
1725   --with-boot-jdk         path to Boot JDK (used to bootstrap build) [probed]
1726   --with-boot-jdk-jvmargs specify JVM arguments to be passed to all
1727                           invocations of the Boot JDK, overriding the default
1728                           values, e.g --with-boot-jdk-jvmargs="-Xmx8G
1729                           -enableassertions"
1730   --with-add-source-root  for each and every source directory, look in this
1731                           additional source root for the same directory; if it
1732                           exists and have files in it, include it in the build
1733   --with-override-source-root
1734                           for each and every source directory, look in this
1735                           override source root for the same directory; if it
1736                           exists, use that directory instead and ignore the
1737                           directory in the original source root
1738   --with-adds-and-overrides
1739                           use the subdirs 'adds' and 'overrides' in the
1740                           specified directory as add-source-root and
1741                           override-source-root
1742   --with-override-langtools
1743                           use this langtools dir for the build
1744   --with-override-corba   use this corba dir for the build
1745   --with-override-jaxp    use this jaxp dir for the build
1746   --with-override-jaxws   use this jaxws dir for the build
1747   --with-override-hotspot use this hotspot dir for the build
1748   --with-override-jdk     use this jdk dir for the build
1749   --with-import-hotspot   import hotspot binaries from this jdk image or
1750                           hotspot build dist dir instead of building from
1751                           source
1752   --with-msvcr-dll        copy this msvcr100.dll into the built JDK (Windows
1753                           only) [probed]
1754   --with-dxsdk            the DirectX SDK (Windows only) [probed]
1755   --with-dxsdk-lib        the DirectX SDK lib directory (Windows only)
1756                           [probed]
1757   --with-dxsdk-include    the DirectX SDK include directory (Windows only)
1758                           [probed]
1759   --with-extra-cflags     extra flags to be used when compiling jdk c-files
1760   --with-extra-cxxflags   extra flags to be used when compiling jdk c++-files
1761   --with-extra-ldflags    extra flags to be used when linking jdk
1762   --with-x                use the X Window System
1763   --with-cups             specify prefix directory for the cups package
1764                           (expecting the headers under PATH/include)
1765   --with-cups-include     specify directory for the cups include files
1766   --with-freetype         specify prefix directory for the freetype2 package
1767                           (expecting the libraries under PATH/lib and the
1768                           headers under PATH/include)
1769   --with-alsa             specify prefix directory for the alsa package
1770                           (expecting the libraries under PATH/lib and the
1771                           headers under PATH/include)
1772   --with-alsa-include     specify directory for the alsa include files
1773   --with-alsa-lib         specify directory for the alsa library
1774   --with-zlib             use zlib from build system or OpenJDK source
1775                           (system, bundled) [bundled]
1776   --with-stdc++lib=<static>,<dynamic>,<default>
1777                           force linking of the C++ runtime on Linux to either
1778                           static or dynamic, default is static with dynamic as
1779                           fallback
1780   --with-num-cores        number of cores in the build system, e.g.
1781                           --with-num-cores=8 [probed]
1782   --with-memory-size      memory (in MB) available in the build system, e.g.
1783                           --with-memory-size=1024 [probed]
1784   --with-jobs             number of parallel jobs to let make run [calculated
1785                           based on cores and memory]
1786   --with-sjavac-server-java
1787                           use this java binary for running the sjavac
1788                           background server [Boot JDK java]
1789   --with-sjavac-server-cores
1790                           use at most this number of concurrent threads on the
1791                           sjavac server [probed]
1792   --with-ccache-dir       where to store ccache files [~/.ccache]
1793 
1794 Some influential environment variables:
1795   PKG_CONFIG  path to pkg-config utility
1796   CC          C compiler command
1797   CFLAGS      C compiler flags
1798   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
1799               nonstandard directory <lib dir>
1800   LIBS        libraries to pass to the linker, e.g. -l<library>
1801   CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
1802               you have headers in a nonstandard directory <include dir>
1803   CXX         C++ compiler command
1804   CXXFLAGS    C++ compiler flags
1805   OBJC        Objective C compiler command
1806   OBJCFLAGS   Objective C compiler flags
1807   CPP         C preprocessor
1808   CXXCPP      C++ preprocessor
1809   XMKMF       Path to xmkmf, Makefile generator for X Window System
1810   FREETYPE2_CFLAGS
1811               C compiler flags for FREETYPE2, overriding pkg-config
1812   FREETYPE2_LIBS
1813               linker flags for FREETYPE2, overriding pkg-config
1814   ALSA_CFLAGS C compiler flags for ALSA, overriding pkg-config
1815   ALSA_LIBS   linker flags for ALSA, overriding pkg-config
1816 
1817 Use these variables to override the choices made by `configure' or to help
1818 it to find libraries and programs with nonstandard names/locations.
1819 
1820 Report bugs to <build-dev@openjdk.java.net>.
1821 OpenJDK home page: <http://openjdk.java.net>.
1822 _ACEOF
1823 ac_status=$?
1824 fi
1825 
1826 if test "$ac_init_help" = "recursive"; then
1827   # If there are subdirs, report their specific --help.
1828   for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
1829     test -d "$ac_dir" ||
1830       { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1831       continue
1832     ac_builddir=.
1833 
1834 case "$ac_dir" in
1835 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1836 *)
1837   ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
1838   # A ".." for each directory in $ac_dir_suffix.
1839   ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
1840   case $ac_top_builddir_sub in
1841   "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1842   *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1843   esac ;;
1844 esac
1845 ac_abs_top_builddir=$ac_pwd
1846 ac_abs_builddir=$ac_pwd$ac_dir_suffix
1847 # for backward compatibility:
1848 ac_top_builddir=$ac_top_build_prefix
1849 
1850 case $srcdir in
1851   .)  # We are building in place.
1852     ac_srcdir=.
1853     ac_top_srcdir=$ac_top_builddir_sub
1854     ac_abs_top_srcdir=$ac_pwd ;;
1855   [\\/]* | ?:[\\/]* )  # Absolute name.
1856     ac_srcdir=$srcdir$ac_dir_suffix;
1857     ac_top_srcdir=$srcdir
1858     ac_abs_top_srcdir=$srcdir ;;
1859   *) # Relative name.
1860     ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1861     ac_top_srcdir=$ac_top_build_prefix$srcdir
1862     ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
1863 esac
1864 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
1865 
1866     cd "$ac_dir" || { ac_status=$?; continue; }
1867     # Check for guested configure.
1868     if test -f "$ac_srcdir/configure.gnu"; then
1869       echo &&
1870       $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1871     elif test -f "$ac_srcdir/configure"; then
1872       echo &&
1873       $SHELL "$ac_srcdir/configure" --help=recursive
1874     else
1875       $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1876     fi || ac_status=$?
1877     cd "$ac_pwd" || { ac_status=$?; break; }
1878   done
1879 fi
1880 
1881 test -n "$ac_init_help" && exit $ac_status
1882 if $ac_init_version; then
1883   cat <<\_ACEOF
1884 OpenJDK configure jdk8
1885 generated by GNU Autoconf 2.68
1886 
1887 Copyright (C) 2010 Free Software Foundation, Inc.
1888 This configure script is free software; the Free Software Foundation
1889 gives unlimited permission to copy, distribute and modify it.
1890 _ACEOF
1891   exit
1892 fi
1893 
1894 ## ------------------------ ##
1895 ## Autoconf initialization. ##
1896 ## ------------------------ ##
1897 
1898 # ac_fn_c_try_compile LINENO
1899 # --------------------------
1900 # Try to compile conftest.$ac_ext, and return whether this succeeded.
1901 ac_fn_c_try_compile ()
1902 {
1903   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1904   rm -f conftest.$ac_objext
1905   if { { ac_try="$ac_compile"
1906 case "(($ac_try" in
1907   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1908   *) ac_try_echo=$ac_try;;
1909 esac
1910 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1911 $as_echo "$ac_try_echo"; } >&5
1912   (eval "$ac_compile") 2>conftest.err
1913   ac_status=$?
1914   if test -s conftest.err; then
1915     grep -v '^ *+' conftest.err >conftest.er1
1916     cat conftest.er1 >&5
1917     mv -f conftest.er1 conftest.err
1918   fi
1919   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1920   test $ac_status = 0; } && {
1921          test -z "$ac_c_werror_flag" ||
1922          test ! -s conftest.err
1923        } && test -s conftest.$ac_objext; then :
1924   ac_retval=0
1925 else
1926   $as_echo "$as_me: failed program was:" >&5
1927 sed 's/^/| /' conftest.$ac_ext >&5
1928 
1929         ac_retval=1
1930 fi
1931   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1932   as_fn_set_status $ac_retval
1933 
1934 } # ac_fn_c_try_compile
1935 
1936 # ac_fn_cxx_try_compile LINENO
1937 # ----------------------------
1938 # Try to compile conftest.$ac_ext, and return whether this succeeded.
1939 ac_fn_cxx_try_compile ()
1940 {
1941   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1942   rm -f conftest.$ac_objext
1943   if { { ac_try="$ac_compile"
1944 case "(($ac_try" in
1945   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1946   *) ac_try_echo=$ac_try;;
1947 esac
1948 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1949 $as_echo "$ac_try_echo"; } >&5
1950   (eval "$ac_compile") 2>conftest.err
1951   ac_status=$?
1952   if test -s conftest.err; then
1953     grep -v '^ *+' conftest.err >conftest.er1
1954     cat conftest.er1 >&5
1955     mv -f conftest.er1 conftest.err
1956   fi
1957   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1958   test $ac_status = 0; } && {
1959          test -z "$ac_cxx_werror_flag" ||
1960          test ! -s conftest.err
1961        } && test -s conftest.$ac_objext; then :
1962   ac_retval=0
1963 else
1964   $as_echo "$as_me: failed program was:" >&5
1965 sed 's/^/| /' conftest.$ac_ext >&5
1966 
1967         ac_retval=1
1968 fi
1969   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1970   as_fn_set_status $ac_retval
1971 
1972 } # ac_fn_cxx_try_compile
1973 
1974 # ac_fn_objc_try_compile LINENO
1975 # -----------------------------
1976 # Try to compile conftest.$ac_ext, and return whether this succeeded.
1977 ac_fn_objc_try_compile ()
1978 {
1979   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1980   rm -f conftest.$ac_objext
1981   if { { ac_try="$ac_compile"
1982 case "(($ac_try" in
1983   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1984   *) ac_try_echo=$ac_try;;
1985 esac
1986 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1987 $as_echo "$ac_try_echo"; } >&5
1988   (eval "$ac_compile") 2>conftest.err
1989   ac_status=$?
1990   if test -s conftest.err; then
1991     grep -v '^ *+' conftest.err >conftest.er1
1992     cat conftest.er1 >&5
1993     mv -f conftest.er1 conftest.err
1994   fi
1995   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1996   test $ac_status = 0; } && {
1997          test -z "$ac_objc_werror_flag" ||
1998          test ! -s conftest.err
1999        } && test -s conftest.$ac_objext; then :
2000   ac_retval=0
2001 else
2002   $as_echo "$as_me: failed program was:" >&5
2003 sed 's/^/| /' conftest.$ac_ext >&5
2004 
2005         ac_retval=1
2006 fi
2007   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2008   as_fn_set_status $ac_retval
2009 
2010 } # ac_fn_objc_try_compile
2011 
2012 # ac_fn_c_try_cpp LINENO
2013 # ----------------------
2014 # Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2015 ac_fn_c_try_cpp ()
2016 {
2017   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2018   if { { ac_try="$ac_cpp conftest.$ac_ext"
2019 case "(($ac_try" in
2020   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2021   *) ac_try_echo=$ac_try;;
2022 esac
2023 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2024 $as_echo "$ac_try_echo"; } >&5
2025   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2026   ac_status=$?
2027   if test -s conftest.err; then
2028     grep -v '^ *+' conftest.err >conftest.er1
2029     cat conftest.er1 >&5
2030     mv -f conftest.er1 conftest.err
2031   fi
2032   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2033   test $ac_status = 0; } > conftest.i && {
2034          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
2035          test ! -s conftest.err
2036        }; then :
2037   ac_retval=0
2038 else
2039   $as_echo "$as_me: failed program was:" >&5
2040 sed 's/^/| /' conftest.$ac_ext >&5
2041 
2042     ac_retval=1
2043 fi
2044   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2045   as_fn_set_status $ac_retval
2046 
2047 } # ac_fn_c_try_cpp
2048 
2049 # ac_fn_cxx_try_cpp LINENO
2050 # ------------------------
2051 # Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2052 ac_fn_cxx_try_cpp ()
2053 {
2054   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2055   if { { ac_try="$ac_cpp conftest.$ac_ext"
2056 case "(($ac_try" in
2057   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2058   *) ac_try_echo=$ac_try;;
2059 esac
2060 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2061 $as_echo "$ac_try_echo"; } >&5
2062   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2063   ac_status=$?
2064   if test -s conftest.err; then
2065     grep -v '^ *+' conftest.err >conftest.er1
2066     cat conftest.er1 >&5
2067     mv -f conftest.er1 conftest.err
2068   fi
2069   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2070   test $ac_status = 0; } > conftest.i && {
2071          test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
2072          test ! -s conftest.err
2073        }; then :
2074   ac_retval=0
2075 else
2076   $as_echo "$as_me: failed program was:" >&5
2077 sed 's/^/| /' conftest.$ac_ext >&5
2078 
2079     ac_retval=1
2080 fi
2081   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2082   as_fn_set_status $ac_retval
2083 
2084 } # ac_fn_cxx_try_cpp
2085 
2086 # ac_fn_cxx_check_header_mongrel LINENO HEADER VAR INCLUDES
2087 # ---------------------------------------------------------
2088 # Tests whether HEADER exists, giving a warning if it cannot be compiled using
2089 # the include files in INCLUDES and setting the cache variable VAR
2090 # accordingly.
2091 ac_fn_cxx_check_header_mongrel ()
2092 {
2093   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2094   if eval \${$3+:} false; then :
2095   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2096 $as_echo_n "checking for $2... " >&6; }
2097 if eval \${$3+:} false; then :
2098   $as_echo_n "(cached) " >&6
2099 fi
2100 eval ac_res=\$$3
2101                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2102 $as_echo "$ac_res" >&6; }
2103 else
2104   # Is the header compilable?
2105 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
2106 $as_echo_n "checking $2 usability... " >&6; }
2107 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2108 /* end confdefs.h.  */
2109 $4
2110 #include <$2>
2111 _ACEOF
2112 if ac_fn_cxx_try_compile "$LINENO"; then :
2113   ac_header_compiler=yes
2114 else
2115   ac_header_compiler=no
2116 fi
2117 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2118 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
2119 $as_echo "$ac_header_compiler" >&6; }
2120 
2121 # Is the header present?
2122 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
2123 $as_echo_n "checking $2 presence... " >&6; }
2124 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2125 /* end confdefs.h.  */
2126 #include <$2>
2127 _ACEOF
2128 if ac_fn_cxx_try_cpp "$LINENO"; then :
2129   ac_header_preproc=yes
2130 else
2131   ac_header_preproc=no
2132 fi
2133 rm -f conftest.err conftest.i conftest.$ac_ext
2134 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
2135 $as_echo "$ac_header_preproc" >&6; }
2136 
2137 # So?  What about this header?
2138 case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in #((
2139   yes:no: )
2140     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
2141 $as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
2142     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2143 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2144     ;;
2145   no:yes:* )
2146     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
2147 $as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
2148     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
2149 $as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
2150     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
2151 $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
2152     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
2153 $as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
2154     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2155 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2156 ( $as_echo "## ----------------------------------------- ##
2157 ## Report this to build-dev@openjdk.java.net ##
2158 ## ----------------------------------------- ##"
2159      ) | sed "s/^/$as_me: WARNING:     /" >&2
2160     ;;
2161 esac
2162   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2163 $as_echo_n "checking for $2... " >&6; }
2164 if eval \${$3+:} false; then :
2165   $as_echo_n "(cached) " >&6
2166 else
2167   eval "$3=\$ac_header_compiler"
2168 fi
2169 eval ac_res=\$$3
2170                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2171 $as_echo "$ac_res" >&6; }
2172 fi
2173   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2174 
2175 } # ac_fn_cxx_check_header_mongrel
2176 
2177 # ac_fn_cxx_try_run LINENO
2178 # ------------------------
2179 # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
2180 # that executables *can* be run.
2181 ac_fn_cxx_try_run ()
2182 {
2183   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2184   if { { ac_try="$ac_link"
2185 case "(($ac_try" in
2186   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2187   *) ac_try_echo=$ac_try;;
2188 esac
2189 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2190 $as_echo "$ac_try_echo"; } >&5
2191   (eval "$ac_link") 2>&5
2192   ac_status=$?
2193   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2194   test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
2195   { { case "(($ac_try" in
2196   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2197   *) ac_try_echo=$ac_try;;
2198 esac
2199 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2200 $as_echo "$ac_try_echo"; } >&5
2201   (eval "$ac_try") 2>&5
2202   ac_status=$?
2203   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2204   test $ac_status = 0; }; }; then :
2205   ac_retval=0
2206 else
2207   $as_echo "$as_me: program exited with status $ac_status" >&5
2208        $as_echo "$as_me: failed program was:" >&5
2209 sed 's/^/| /' conftest.$ac_ext >&5
2210 
2211        ac_retval=$ac_status
2212 fi
2213   rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2214   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2215   as_fn_set_status $ac_retval
2216 
2217 } # ac_fn_cxx_try_run
2218 
2219 # ac_fn_cxx_check_header_compile LINENO HEADER VAR INCLUDES
2220 # ---------------------------------------------------------
2221 # Tests whether HEADER exists and can be compiled using the include files in
2222 # INCLUDES, setting the cache variable VAR accordingly.
2223 ac_fn_cxx_check_header_compile ()
2224 {
2225   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2226   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2227 $as_echo_n "checking for $2... " >&6; }
2228 if eval \${$3+:} false; then :
2229   $as_echo_n "(cached) " >&6
2230 else
2231   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2232 /* end confdefs.h.  */
2233 $4
2234 #include <$2>
2235 _ACEOF
2236 if ac_fn_cxx_try_compile "$LINENO"; then :
2237   eval "$3=yes"
2238 else
2239   eval "$3=no"
2240 fi
2241 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2242 fi
2243 eval ac_res=\$$3
2244                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2245 $as_echo "$ac_res" >&6; }
2246   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2247 
2248 } # ac_fn_cxx_check_header_compile
2249 
2250 # ac_fn_cxx_compute_int LINENO EXPR VAR INCLUDES
2251 # ----------------------------------------------
2252 # Tries to find the compile-time value of EXPR in a program that includes
2253 # INCLUDES, setting VAR accordingly. Returns whether the value could be
2254 # computed
2255 ac_fn_cxx_compute_int ()
2256 {
2257   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2258   if test "$cross_compiling" = yes; then
2259     # Depending upon the size, compute the lo and hi bounds.
2260 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2261 /* end confdefs.h.  */
2262 $4
2263 int
2264 main ()
2265 {
2266 static int test_array [1 - 2 * !(($2) >= 0)];
2267 test_array [0] = 0
2268 
2269   ;
2270   return 0;
2271 }
2272 _ACEOF
2273 if ac_fn_cxx_try_compile "$LINENO"; then :
2274   ac_lo=0 ac_mid=0
2275   while :; do
2276     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2277 /* end confdefs.h.  */
2278 $4
2279 int
2280 main ()
2281 {
2282 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2283 test_array [0] = 0
2284 
2285   ;
2286   return 0;
2287 }
2288 _ACEOF
2289 if ac_fn_cxx_try_compile "$LINENO"; then :
2290   ac_hi=$ac_mid; break
2291 else
2292   as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2293                         if test $ac_lo -le $ac_mid; then
2294                           ac_lo= ac_hi=
2295                           break
2296                         fi
2297                         as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2298 fi
2299 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2300   done
2301 else
2302   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2303 /* end confdefs.h.  */
2304 $4
2305 int
2306 main ()
2307 {
2308 static int test_array [1 - 2 * !(($2) < 0)];
2309 test_array [0] = 0
2310 
2311   ;
2312   return 0;
2313 }
2314 _ACEOF
2315 if ac_fn_cxx_try_compile "$LINENO"; then :
2316   ac_hi=-1 ac_mid=-1
2317   while :; do
2318     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2319 /* end confdefs.h.  */
2320 $4
2321 int
2322 main ()
2323 {
2324 static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2325 test_array [0] = 0
2326 
2327   ;
2328   return 0;
2329 }
2330 _ACEOF
2331 if ac_fn_cxx_try_compile "$LINENO"; then :
2332   ac_lo=$ac_mid; break
2333 else
2334   as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2335                         if test $ac_mid -le $ac_hi; then
2336                           ac_lo= ac_hi=
2337                           break
2338                         fi
2339                         as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2340 fi
2341 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2342   done
2343 else
2344   ac_lo= ac_hi=
2345 fi
2346 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2347 fi
2348 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2349 # Binary search between lo and hi bounds.
2350 while test "x$ac_lo" != "x$ac_hi"; do
2351   as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2352   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2353 /* end confdefs.h.  */
2354 $4
2355 int
2356 main ()
2357 {
2358 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2359 test_array [0] = 0
2360 
2361   ;
2362   return 0;
2363 }
2364 _ACEOF
2365 if ac_fn_cxx_try_compile "$LINENO"; then :
2366   ac_hi=$ac_mid
2367 else
2368   as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2369 fi
2370 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2371 done
2372 case $ac_lo in #((
2373 ?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2374 '') ac_retval=1 ;;
2375 esac
2376   else
2377     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2378 /* end confdefs.h.  */
2379 $4
2380 static long int longval () { return $2; }
2381 static unsigned long int ulongval () { return $2; }
2382 #include <stdio.h>
2383 #include <stdlib.h>
2384 int
2385 main ()
2386 {
2387 
2388   FILE *f = fopen ("conftest.val", "w");
2389   if (! f)
2390     return 1;
2391   if (($2) < 0)
2392     {
2393       long int i = longval ();
2394       if (i != ($2))
2395         return 1;
2396       fprintf (f, "%ld", i);
2397     }
2398   else
2399     {
2400       unsigned long int i = ulongval ();
2401       if (i != ($2))
2402         return 1;
2403       fprintf (f, "%lu", i);
2404     }
2405   /* Do not output a trailing newline, as this causes \r\n confusion
2406      on some platforms.  */
2407   return ferror (f) || fclose (f) != 0;
2408 
2409   ;
2410   return 0;
2411 }
2412 _ACEOF
2413 if ac_fn_cxx_try_run "$LINENO"; then :
2414   echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2415 else
2416   ac_retval=1
2417 fi
2418 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2419   conftest.$ac_objext conftest.beam conftest.$ac_ext
2420 rm -f conftest.val
2421 
2422   fi
2423   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2424   as_fn_set_status $ac_retval
2425 
2426 } # ac_fn_cxx_compute_int
2427 
2428 # ac_fn_cxx_try_link LINENO
2429 # -------------------------
2430 # Try to link conftest.$ac_ext, and return whether this succeeded.
2431 ac_fn_cxx_try_link ()
2432 {
2433   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2434   rm -f conftest.$ac_objext conftest$ac_exeext
2435   if { { ac_try="$ac_link"
2436 case "(($ac_try" in
2437   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2438   *) ac_try_echo=$ac_try;;
2439 esac
2440 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2441 $as_echo "$ac_try_echo"; } >&5
2442   (eval "$ac_link") 2>conftest.err
2443   ac_status=$?
2444   if test -s conftest.err; then
2445     grep -v '^ *+' conftest.err >conftest.er1
2446     cat conftest.er1 >&5
2447     mv -f conftest.er1 conftest.err
2448   fi
2449   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2450   test $ac_status = 0; } && {
2451          test -z "$ac_cxx_werror_flag" ||
2452          test ! -s conftest.err
2453        } && test -s conftest$ac_exeext && {
2454          test "$cross_compiling" = yes ||
2455          $as_test_x conftest$ac_exeext
2456        }; then :
2457   ac_retval=0
2458 else
2459   $as_echo "$as_me: failed program was:" >&5
2460 sed 's/^/| /' conftest.$ac_ext >&5
2461 
2462         ac_retval=1
2463 fi
2464   # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2465   # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2466   # interfere with the next link command; also delete a directory that is
2467   # left behind by Apple's compiler.  We do this before executing the actions.
2468   rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2469   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2470   as_fn_set_status $ac_retval
2471 
2472 } # ac_fn_cxx_try_link
2473 
2474 # ac_fn_cxx_check_func LINENO FUNC VAR
2475 # ------------------------------------
2476 # Tests whether FUNC exists, setting the cache variable VAR accordingly
2477 ac_fn_cxx_check_func ()
2478 {
2479   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2480   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2481 $as_echo_n "checking for $2... " >&6; }
2482 if eval \${$3+:} false; then :
2483   $as_echo_n "(cached) " >&6
2484 else
2485   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2486 /* end confdefs.h.  */
2487 /* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2488    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
2489 #define $2 innocuous_$2
2490 
2491 /* System header to define __stub macros and hopefully few prototypes,
2492     which can conflict with char $2 (); below.
2493     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2494     <limits.h> exists even on freestanding compilers.  */
2495 
2496 #ifdef __STDC__
2497 # include <limits.h>
2498 #else
2499 # include <assert.h>
2500 #endif
2501 
2502 #undef $2
2503 
2504 /* Override any GCC internal prototype to avoid an error.
2505    Use char because int might match the return type of a GCC
2506    builtin and then its argument prototype would still apply.  */
2507 #ifdef __cplusplus
2508 extern "C"
2509 #endif
2510 char $2 ();
2511 /* The GNU C library defines this for functions which it implements
2512     to always fail with ENOSYS.  Some functions are actually named
2513     something starting with __ and the normal name is an alias.  */
2514 #if defined __stub_$2 || defined __stub___$2
2515 choke me
2516 #endif
2517 
2518 int
2519 main ()
2520 {
2521 return $2 ();
2522   ;
2523   return 0;
2524 }
2525 _ACEOF
2526 if ac_fn_cxx_try_link "$LINENO"; then :
2527   eval "$3=yes"
2528 else
2529   eval "$3=no"
2530 fi
2531 rm -f core conftest.err conftest.$ac_objext \
2532     conftest$ac_exeext conftest.$ac_ext
2533 fi
2534 eval ac_res=\$$3
2535                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2536 $as_echo "$ac_res" >&6; }
2537   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2538 
2539 } # ac_fn_cxx_check_func
2540 
2541 # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
2542 # -------------------------------------------------------
2543 # Tests whether HEADER exists and can be compiled using the include files in
2544 # INCLUDES, setting the cache variable VAR accordingly.
2545 ac_fn_c_check_header_compile ()
2546 {
2547   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2548   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2549 $as_echo_n "checking for $2... " >&6; }
2550 if eval \${$3+:} false; then :
2551   $as_echo_n "(cached) " >&6
2552 else
2553   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2554 /* end confdefs.h.  */
2555 $4
2556 #include <$2>
2557 _ACEOF
2558 if ac_fn_c_try_compile "$LINENO"; then :
2559   eval "$3=yes"
2560 else
2561   eval "$3=no"
2562 fi
2563 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2564 fi
2565 eval ac_res=\$$3
2566                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2567 $as_echo "$ac_res" >&6; }
2568   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2569 
2570 } # ac_fn_c_check_header_compile
2571 cat >config.log <<_ACEOF
2572 This file contains any messages produced by compilers while
2573 running configure, to aid debugging if configure makes a mistake.
2574 
2575 It was created by OpenJDK $as_me jdk8, which was
2576 generated by GNU Autoconf 2.68.  Invocation command line was
2577 
2578   $ $0 $@
2579 
2580 _ACEOF
2581 exec 5>>config.log
2582 {
2583 cat <<_ASUNAME
2584 ## --------- ##
2585 ## Platform. ##
2586 ## --------- ##
2587 
2588 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2589 uname -m = `(uname -m) 2>/dev/null || echo unknown`
2590 uname -r = `(uname -r) 2>/dev/null || echo unknown`
2591 uname -s = `(uname -s) 2>/dev/null || echo unknown`
2592 uname -v = `(uname -v) 2>/dev/null || echo unknown`
2593 
2594 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2595 /bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
2596 
2597 /bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
2598 /usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
2599 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2600 /usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
2601 /bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
2602 /usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
2603 /bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
2604 
2605 _ASUNAME
2606 
2607 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2608 for as_dir in $PATH
2609 do
2610   IFS=$as_save_IFS
2611   test -z "$as_dir" && as_dir=.
2612     $as_echo "PATH: $as_dir"
2613   done
2614 IFS=$as_save_IFS
2615 
2616 } >&5
2617 
2618 cat >&5 <<_ACEOF
2619 
2620 
2621 ## ----------- ##
2622 ## Core tests. ##
2623 ## ----------- ##
2624 
2625 _ACEOF
2626 
2627 
2628 # Keep a trace of the command line.
2629 # Strip out --no-create and --no-recursion so they do not pile up.
2630 # Strip out --silent because we don't want to record it for future runs.
2631 # Also quote any args containing shell meta-characters.
2632 # Make two passes to allow for proper duplicate-argument suppression.
2633 ac_configure_args=
2634 ac_configure_args0=
2635 ac_configure_args1=
2636 ac_must_keep_next=false
2637 for ac_pass in 1 2
2638 do
2639   for ac_arg
2640   do
2641     case $ac_arg in
2642     -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2643     -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2644     | -silent | --silent | --silen | --sile | --sil)
2645       continue ;;
2646     *\'*)
2647       ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2648     esac
2649     case $ac_pass in
2650     1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2651     2)
2652       as_fn_append ac_configure_args1 " '$ac_arg'"
2653       if test $ac_must_keep_next = true; then
2654         ac_must_keep_next=false # Got value, back to normal.
2655       else
2656         case $ac_arg in
2657           *=* | --config-cache | -C | -disable-* | --disable-* \
2658           | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2659           | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2660           | -with-* | --with-* | -without-* | --without-* | --x)
2661             case "$ac_configure_args0 " in
2662               "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2663             esac
2664             ;;
2665           -* ) ac_must_keep_next=true ;;
2666         esac
2667       fi
2668       as_fn_append ac_configure_args " '$ac_arg'"
2669       ;;
2670     esac
2671   done
2672 done
2673 { ac_configure_args0=; unset ac_configure_args0;}
2674 { ac_configure_args1=; unset ac_configure_args1;}
2675 
2676 # When interrupted or exit'd, cleanup temporary files, and complete
2677 # config.log.  We remove comments because anyway the quotes in there
2678 # would cause problems or look ugly.
2679 # WARNING: Use '\'' to represent an apostrophe within the trap.
2680 # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2681 trap 'exit_status=$?
2682   # Save into config.log some information that might help in debugging.
2683   {
2684     echo
2685 
2686     $as_echo "## ---------------- ##
2687 ## Cache variables. ##
2688 ## ---------------- ##"
2689     echo
2690     # The following way of writing the cache mishandles newlines in values,
2691 (
2692   for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2693     eval ac_val=\$$ac_var
2694     case $ac_val in #(
2695     *${as_nl}*)
2696       case $ac_var in #(
2697       *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2698 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
2699       esac
2700       case $ac_var in #(
2701       _ | IFS | as_nl) ;; #(
2702       BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2703       *) { eval $ac_var=; unset $ac_var;} ;;
2704       esac ;;
2705     esac
2706   done
2707   (set) 2>&1 |
2708     case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2709     *${as_nl}ac_space=\ *)
2710       sed -n \
2711         "s/'\''/'\''\\\\'\'''\''/g;
2712           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2713       ;; #(
2714     *)
2715       sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
2716       ;;
2717     esac |
2718     sort
2719 )
2720     echo
2721 
2722     $as_echo "## ----------------- ##
2723 ## Output variables. ##
2724 ## ----------------- ##"
2725     echo
2726     for ac_var in $ac_subst_vars
2727     do
2728       eval ac_val=\$$ac_var
2729       case $ac_val in
2730       *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2731       esac
2732       $as_echo "$ac_var='\''$ac_val'\''"
2733     done | sort
2734     echo
2735 
2736     if test -n "$ac_subst_files"; then
2737       $as_echo "## ------------------- ##
2738 ## File substitutions. ##
2739 ## ------------------- ##"
2740       echo
2741       for ac_var in $ac_subst_files
2742       do
2743         eval ac_val=\$$ac_var
2744         case $ac_val in
2745         *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2746         esac
2747         $as_echo "$ac_var='\''$ac_val'\''"
2748       done | sort
2749       echo
2750     fi
2751 
2752     if test -s confdefs.h; then
2753       $as_echo "## ----------- ##
2754 ## confdefs.h. ##
2755 ## ----------- ##"
2756       echo
2757       cat confdefs.h
2758       echo
2759     fi
2760     test "$ac_signal" != 0 &&
2761       $as_echo "$as_me: caught signal $ac_signal"
2762     $as_echo "$as_me: exit $exit_status"
2763   } >&5
2764   rm -f core *.core core.conftest.* &&
2765     rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
2766     exit $exit_status
2767 ' 0
2768 for ac_signal in 1 2 13 15; do
2769   trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
2770 done
2771 ac_signal=0
2772 
2773 # confdefs.h avoids OS command line length limits that DEFS can exceed.
2774 rm -f -r conftest* confdefs.h
2775 
2776 $as_echo "/* confdefs.h */" > confdefs.h
2777 
2778 # Predefined preprocessor variables.
2779 
2780 cat >>confdefs.h <<_ACEOF
2781 #define PACKAGE_NAME "$PACKAGE_NAME"
2782 _ACEOF
2783 
2784 cat >>confdefs.h <<_ACEOF
2785 #define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2786 _ACEOF
2787 
2788 cat >>confdefs.h <<_ACEOF
2789 #define PACKAGE_VERSION "$PACKAGE_VERSION"
2790 _ACEOF
2791 
2792 cat >>confdefs.h <<_ACEOF
2793 #define PACKAGE_STRING "$PACKAGE_STRING"
2794 _ACEOF
2795 
2796 cat >>confdefs.h <<_ACEOF
2797 #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2798 _ACEOF
2799 
2800 cat >>confdefs.h <<_ACEOF
2801 #define PACKAGE_URL "$PACKAGE_URL"
2802 _ACEOF
2803 
2804 
2805 # Let the site file select an alternate cache file if it wants to.
2806 # Prefer an explicitly selected file to automatically selected ones.
2807 ac_site_file1=NONE
2808 ac_site_file2=NONE
2809 if test -n "$CONFIG_SITE"; then
2810   # We do not want a PATH search for config.site.
2811   case $CONFIG_SITE in #((
2812     -*)  ac_site_file1=./$CONFIG_SITE;;
2813     */*) ac_site_file1=$CONFIG_SITE;;
2814     *)   ac_site_file1=./$CONFIG_SITE;;
2815   esac
2816 elif test "x$prefix" != xNONE; then
2817   ac_site_file1=$prefix/share/config.site
2818   ac_site_file2=$prefix/etc/config.site
2819 else
2820   ac_site_file1=$ac_default_prefix/share/config.site
2821   ac_site_file2=$ac_default_prefix/etc/config.site
2822 fi
2823 for ac_site_file in "$ac_site_file1" "$ac_site_file2"
2824 do
2825   test "x$ac_site_file" = xNONE && continue
2826   if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2827     { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2828 $as_echo "$as_me: loading site script $ac_site_file" >&6;}
2829     sed 's/^/| /' "$ac_site_file" >&5
2830     . "$ac_site_file" \
2831       || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2832 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2833 as_fn_error $? "failed to load site script $ac_site_file
2834 See \`config.log' for more details" "$LINENO" 5; }
2835   fi
2836 done
2837 
2838 if test -r "$cache_file"; then
2839   # Some versions of bash will fail to source /dev/null (special files
2840   # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
2841   if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2842     { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2843 $as_echo "$as_me: loading cache $cache_file" >&6;}
2844     case $cache_file in
2845       [\\/]* | ?:[\\/]* ) . "$cache_file";;
2846       *)                      . "./$cache_file";;
2847     esac
2848   fi
2849 else
2850   { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2851 $as_echo "$as_me: creating cache $cache_file" >&6;}
2852   >$cache_file
2853 fi
2854 
2855 # Check that the precious variables saved in the cache have kept the same
2856 # value.
2857 ac_cache_corrupted=false
2858 for ac_var in $ac_precious_vars; do
2859   eval ac_old_set=\$ac_cv_env_${ac_var}_set
2860   eval ac_new_set=\$ac_env_${ac_var}_set
2861   eval ac_old_val=\$ac_cv_env_${ac_var}_value
2862   eval ac_new_val=\$ac_env_${ac_var}_value
2863   case $ac_old_set,$ac_new_set in
2864     set,)
2865       { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2866 $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
2867       ac_cache_corrupted=: ;;
2868     ,set)
2869       { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2870 $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
2871       ac_cache_corrupted=: ;;
2872     ,);;
2873     *)
2874       if test "x$ac_old_val" != "x$ac_new_val"; then
2875         # differences in whitespace do not lead to failure.
2876         ac_old_val_w=`echo x $ac_old_val`
2877         ac_new_val_w=`echo x $ac_new_val`
2878         if test "$ac_old_val_w" != "$ac_new_val_w"; then
2879           { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2880 $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2881           ac_cache_corrupted=:
2882         else
2883           { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2884 $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2885           eval $ac_var=\$ac_old_val
2886         fi
2887         { $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
2888 $as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
2889         { $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
2890 $as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
2891       fi;;
2892   esac
2893   # Pass precious variables to config.status.
2894   if test "$ac_new_set" = set; then
2895     case $ac_new_val in
2896     *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
2897     *) ac_arg=$ac_var=$ac_new_val ;;
2898     esac
2899     case " $ac_configure_args " in
2900       *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
2901       *) as_fn_append ac_configure_args " '$ac_arg'" ;;
2902     esac
2903   fi
2904 done
2905 if $ac_cache_corrupted; then
2906   { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2907 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2908   { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2909 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
2910   as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
2911 fi
2912 ## -------------------- ##
2913 ## Main body of script. ##
2914 ## -------------------- ##
2915 
2916 ac_ext=c
2917 ac_cpp='$CPP $CPPFLAGS'
2918 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2919 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2920 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2921 
2922 
2923 
2924 ac_aux_dir=
2925 for ac_dir in build-aux "$srcdir"/build-aux; do
2926   if test -f "$ac_dir/install-sh"; then
2927     ac_aux_dir=$ac_dir
2928     ac_install_sh="$ac_aux_dir/install-sh -c"
2929     break
2930   elif test -f "$ac_dir/install.sh"; then
2931     ac_aux_dir=$ac_dir
2932     ac_install_sh="$ac_aux_dir/install.sh -c"
2933     break
2934   elif test -f "$ac_dir/shtool"; then
2935     ac_aux_dir=$ac_dir
2936     ac_install_sh="$ac_aux_dir/shtool install -c"
2937     break
2938   fi
2939 done
2940 if test -z "$ac_aux_dir"; then
2941   as_fn_error $? "cannot find install-sh, install.sh, or shtool in build-aux \"$srcdir\"/build-aux" "$LINENO" 5
2942 fi
2943 
2944 # These three variables are undocumented and unsupported,
2945 # and are intended to be withdrawn in a future Autoconf release.
2946 # They can cause serious problems if a builder's source tree is in a directory
2947 # whose full name contains unusual characters.
2948 ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
2949 ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
2950 ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
2951 
2952 
2953 # pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
2954 
2955 #
2956 # Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
2957 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
2958 #
2959 # This code is free software; you can redistribute it and/or modify it
2960 # under the terms of the GNU General Public License version 2 only, as
2961 # published by the Free Software Foundation.  Oracle designates this
2962 # particular file as subject to the "Classpath" exception as provided
2963 # by Oracle in the LICENSE file that accompanied this code.
2964 #
2965 # This code is distributed in the hope that it will be useful, but WITHOUT
2966 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
2967 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
2968 # version 2 for more details (a copy is included in the LICENSE file that
2969 # accompanied this code).
2970 #
2971 # You should have received a copy of the GNU General Public License version
2972 # 2 along with this work; if not, write to the Free Software Foundation,
2973 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
2974 #
2975 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
2976 # or visit www.oracle.com if you need additional information or have any
2977 # questions.
2978 #
2979 
2980 #
2981 # Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
2982 #
2983 # This program is free software; you can redistribute it and/or modify
2984 # it under the terms of the GNU General Public License as published by
2985 # the Free Software Foundation; either version 2 of the License, or
2986 # (at your option) any later version.
2987 #
2988 # This program is distributed in the hope that it will be useful, but
2989 # WITHOUT ANY WARRANTY; without even the implied warranty of
2990 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
2991 # General Public License for more details.
2992 #
2993 # You should have received a copy of the GNU General Public License
2994 # along with this program; if not, write to the Free Software
2995 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
2996 #
2997 # As a special exception to the GNU General Public License, if you
2998 # distribute this file as part of a program that contains a
2999 # configuration script generated by Autoconf, you may include it under
3000 # the same distribution terms that you use for the rest of that program.
3001 
3002 # PKG_PROG_PKG_CONFIG([MIN-VERSION])
3003 # ----------------------------------
3004 # PKG_PROG_PKG_CONFIG
3005 
3006 # PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
3007 #
3008 # Check to see whether a particular set of modules exists.  Similar
3009 # to PKG_CHECK_MODULES(), but does not set variables or print errors.
3010 #
3011 #
3012 # Similar to PKG_CHECK_MODULES, make sure that the first instance of
3013 # this or PKG_CHECK_MODULES is called, or make sure to call
3014 # PKG_CHECK_EXISTS manually
3015 # --------------------------------------------------------------
3016 
3017 
3018 
3019 # _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
3020 # ---------------------------------------------
3021 # _PKG_CONFIG
3022 
3023 # _PKG_SHORT_ERRORS_SUPPORTED
3024 # -----------------------------
3025 # _PKG_SHORT_ERRORS_SUPPORTED
3026 
3027 
3028 # PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
3029 # [ACTION-IF-NOT-FOUND])
3030 #
3031 #
3032 # Note that if there is a possibility the first call to
3033 # PKG_CHECK_MODULES might not happen, you should be sure to include an
3034 # explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
3035 #
3036 #
3037 # --------------------------------------------------------------
3038 # PKG_CHECK_MODULES
3039 
3040 
3041 # Include these first...
3042 #
3043 # Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
3044 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3045 #
3046 # This code is free software; you can redistribute it and/or modify it
3047 # under the terms of the GNU General Public License version 2 only, as
3048 # published by the Free Software Foundation.  Oracle designates this
3049 # particular file as subject to the "Classpath" exception as provided
3050 # by Oracle in the LICENSE file that accompanied this code.
3051 #
3052 # This code is distributed in the hope that it will be useful, but WITHOUT
3053 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3054 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3055 # version 2 for more details (a copy is included in the LICENSE file that
3056 # accompanied this code).
3057 #
3058 # You should have received a copy of the GNU General Public License version
3059 # 2 along with this work; if not, write to the Free Software Foundation,
3060 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3061 #
3062 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3063 # or visit www.oracle.com if you need additional information or have any
3064 # questions.
3065 #
3066 
3067 
3068 
3069 # This will make sure the given variable points to a full and proper
3070 # path. This means:
3071 # 1) There will be no spaces in the path. On posix platforms,
3072 #    spaces in the path will result in an error. On Windows,
3073 #    the path will be rewritten using short-style to be space-free.
3074 # 2) The path will be absolute, and it will be in unix-style (on
3075 #     cygwin).
3076 # $1: The name of the variable to fix
3077 
3078 
3079 # This will make sure the given variable points to a executable
3080 # with a full and proper path. This means:
3081 # 1) There will be no spaces in the path. On posix platforms,
3082 #    spaces in the path will result in an error. On Windows,
3083 #    the path will be rewritten using short-style to be space-free.
3084 # 2) The path will be absolute, and it will be in unix-style (on
3085 #     cygwin).
3086 # Any arguments given to the executable is preserved.
3087 # If the input variable does not have a directory specification, then
3088 # it need to be in the PATH.
3089 # $1: The name of the variable to fix
3090 
3091 
3092 
3093 
3094 
3095 
3096 # Test that variable $1 denoting a program is not empty. If empty, exit with an error.
3097 # $1: variable to check
3098 # $2: executable name to print in warning (optional)
3099 
3100 
3101 # Does AC_PATH_PROG followed by BASIC_CHECK_NONEMPTY.
3102 # Arguments as AC_PATH_PROG:
3103 # $1: variable to set
3104 # $2: executable name to look for
3105 
3106 
3107 # Setup the most fundamental tools that relies on not much else to set up,
3108 # but is used by much of the early bootstrap code.
3109 
3110 
3111 # Setup basic configuration paths, and platform-specific stuff related to PATHs.
3112 
3113 
3114 
3115 
3116 
3117 
3118 
3119 #%%% Simple tools %%%
3120 
3121 # Check if we have found a usable version of make
3122 # $1: the path to a potential make binary (or empty)
3123 # $2: the description on how we found this
3124 
3125 
3126 # Goes looking for a usable version of GNU make.
3127 
3128 
3129 
3130 
3131 
3132 
3133 # Check if build directory is on local disk. If not possible to determine,
3134 # we prefer to claim it's local.
3135 # Argument 1: directory to test
3136 # Argument 2: what to do if it is on local disk
3137 # Argument 3: what to do otherwise (remote disk or failure)
3138 
3139 
3140 # Check that source files have basic read permissions set. This might
3141 # not be the case in cygwin in certain conditions.
3142 
3143 
3144 
3145 
3146 #
3147 # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3148 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3149 #
3150 # This code is free software; you can redistribute it and/or modify it
3151 # under the terms of the GNU General Public License version 2 only, as
3152 # published by the Free Software Foundation.  Oracle designates this
3153 # particular file as subject to the "Classpath" exception as provided
3154 # by Oracle in the LICENSE file that accompanied this code.
3155 #
3156 # This code is distributed in the hope that it will be useful, but WITHOUT
3157 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3158 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3159 # version 2 for more details (a copy is included in the LICENSE file that
3160 # accompanied this code).
3161 #
3162 # You should have received a copy of the GNU General Public License version
3163 # 2 along with this work; if not, write to the Free Software Foundation,
3164 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3165 #
3166 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3167 # or visit www.oracle.com if you need additional information or have any
3168 # questions.
3169 #
3170 
3171 
3172 
3173 
3174 
3175 # Helper function which possibly converts a path using DOS-style short mode.
3176 # If so, the updated path is stored in $new_path.
3177 # $1: The path to check
3178 
3179 
3180 # Helper function which possibly converts a path using DOS-style short mode.
3181 # If so, the updated path is stored in $new_path.
3182 # $1: The path to check
3183 
3184 
3185 # FIXME: The BASIC_FIXUP_*_CYGWIN/MSYS is most likely too convoluted
3186 # and could probably be heavily simplified. However, all changes in this
3187 # area tend to need lot of testing in different scenarios, and in lack of
3188 # proper unit testing, cleaning this up has not been deemed worth the effort
3189 # at the moment.
3190 
3191 
3192 
3193 
3194 
3195 
3196 
3197 
3198 
3199 # Setup basic configuration paths, and platform-specific stuff related to PATHs.
3200 
3201 
3202 
3203 
3204 #
3205 # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3206 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3207 #
3208 # This code is free software; you can redistribute it and/or modify it
3209 # under the terms of the GNU General Public License version 2 only, as
3210 # published by the Free Software Foundation.  Oracle designates this
3211 # particular file as subject to the "Classpath" exception as provided
3212 # by Oracle in the LICENSE file that accompanied this code.
3213 #
3214 # This code is distributed in the hope that it will be useful, but WITHOUT
3215 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3216 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3217 # version 2 for more details (a copy is included in the LICENSE file that
3218 # accompanied this code).
3219 #
3220 # You should have received a copy of the GNU General Public License version
3221 # 2 along with this work; if not, write to the Free Software Foundation,
3222 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3223 #
3224 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3225 # or visit www.oracle.com if you need additional information or have any
3226 # questions.
3227 #
3228 
3229 
3230 
3231 
3232 
3233 
3234 
3235 
3236 
3237 
3238 
3239 # ... then the rest
3240 #
3241 # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3242 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3243 #
3244 # This code is free software; you can redistribute it and/or modify it
3245 # under the terms of the GNU General Public License version 2 only, as
3246 # published by the Free Software Foundation.  Oracle designates this
3247 # particular file as subject to the "Classpath" exception as provided
3248 # by Oracle in the LICENSE file that accompanied this code.
3249 #
3250 # This code is distributed in the hope that it will be useful, but WITHOUT
3251 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3252 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3253 # version 2 for more details (a copy is included in the LICENSE file that
3254 # accompanied this code).
3255 #
3256 # You should have received a copy of the GNU General Public License version
3257 # 2 along with this work; if not, write to the Free Software Foundation,
3258 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3259 #
3260 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3261 # or visit www.oracle.com if you need additional information or have any
3262 # questions.
3263 #
3264 
3265 # Execute the check given as argument, and verify the result
3266 # If the Boot JDK was previously found, do nothing
3267 # $1 A command line (typically autoconf macro) to execute
3268 
3269 
3270 # Test: Is bootjdk explicitely set by command line arguments?
3271 
3272 
3273 # Test: Is bootjdk available from builddeps?
3274 
3275 
3276 # Test: Is $JAVA_HOME set?
3277 
3278 
3279 # Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
3280 
3281 
3282 # Test: Is there a /usr/libexec/java_home? (Typically on MacOSX)
3283 
3284 
3285 # Look for a jdk in the given path. If there are multiple, try to select the newest.
3286 # If found, set BOOT_JDK and BOOT_JDK_FOUND.
3287 # $1 = Path to directory containing jdk installations.
3288 # $2 = String to append to the found JDK directory to get the proper JDK home
3289 
3290 
3291 # Call BOOTJDK_FIND_BEST_JDK_IN_DIRECTORY, but use the given
3292 # environmental variable as base for where to look.
3293 # $1 Name of an environmal variable, assumed to point to the Program Files directory.
3294 
3295 
3296 # Test: Is there a JDK installed in default, well-known locations?
3297 
3298 
3299 # Check that a command-line tool in the Boot JDK is correct
3300 # $1 = name of variable to assign
3301 # $2 = name of binary
3302 
3303 
3304 ###############################################################################
3305 #
3306 # We need a Boot JDK to bootstrap the build.
3307 #
3308 
3309 
3310 
3311 
3312 
3313 #
3314 # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3315 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3316 #
3317 # This code is free software; you can redistribute it and/or modify it
3318 # under the terms of the GNU General Public License version 2 only, as
3319 # published by the Free Software Foundation.  Oracle designates this
3320 # particular file as subject to the "Classpath" exception as provided
3321 # by Oracle in the LICENSE file that accompanied this code.
3322 #
3323 # This code is distributed in the hope that it will be useful, but WITHOUT
3324 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3325 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3326 # version 2 for more details (a copy is included in the LICENSE file that
3327 # accompanied this code).
3328 #
3329 # You should have received a copy of the GNU General Public License version
3330 # 2 along with this work; if not, write to the Free Software Foundation,
3331 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3332 #
3333 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3334 # or visit www.oracle.com if you need additional information or have any
3335 # questions.
3336 #
3337 
3338 
3339 
3340 
3341 
3342 
3343 
3344 
3345 
3346 
3347 
3348 
3349 
3350 
3351 
3352 
3353 
3354 
3355 
3356 
3357 #
3358 # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3359 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3360 #
3361 # This code is free software; you can redistribute it and/or modify it
3362 # under the terms of the GNU General Public License version 2 only, as
3363 # published by the Free Software Foundation.  Oracle designates this
3364 # particular file as subject to the "Classpath" exception as provided
3365 # by Oracle in the LICENSE file that accompanied this code.
3366 #
3367 # This code is distributed in the hope that it will be useful, but WITHOUT
3368 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3369 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3370 # version 2 for more details (a copy is included in the LICENSE file that
3371 # accompanied this code).
3372 #
3373 # You should have received a copy of the GNU General Public License version
3374 # 2 along with this work; if not, write to the Free Software Foundation,
3375 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3376 #
3377 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3378 # or visit www.oracle.com if you need additional information or have any
3379 # questions.
3380 #
3381 
3382 
3383 
3384 
3385 
3386 cygwin_help() {
3387     case $1 in
3388     unzip)
3389         PKGHANDLER_COMMAND="cd <location of cygwin setup.exe> && cmd /c setup -q -P unzip" ;;
3390     zip)
3391         PKGHANDLER_COMMAND="cd <location of cygwin setup.exe> && cmd /c setup -q -P zip" ;;
3392     make)
3393         PKGHANDLER_COMMAND="cd <location of cygwin setup.exe> && cmd /c setup -q -P make" ;;
3394     * )
3395        break ;;
3396     esac
3397 }
3398 
3399 apt_help() {
3400     case $1 in
3401     devkit)
3402         PKGHANDLER_COMMAND="sudo apt-get install build-essential" ;;
3403     openjdk)
3404         PKGHANDLER_COMMAND="sudo apt-get install openjdk-7-jdk" ;;
3405     alsa)
3406         PKGHANDLER_COMMAND="sudo apt-get install libasound2-dev" ;;
3407     cups)
3408         PKGHANDLER_COMMAND="sudo apt-get install libcups2-dev" ;;
3409     freetype2)
3410         PKGHANDLER_COMMAND="sudo apt-get install libfreetype6-dev" ;;
3411     pulse)
3412         PKGHANDLER_COMMAND="sudo apt-get install libpulse-dev" ;;
3413     x11)
3414         PKGHANDLER_COMMAND="sudo apt-get install libX11-dev libxext-dev libxrender-dev libxtst-dev" ;;
3415     ccache)
3416         PKGHANDLER_COMMAND="sudo apt-get install ccache" ;;
3417     * )
3418        break ;;
3419     esac
3420 }
3421 
3422 yum_help() {
3423     case $1 in
3424     devkit)
3425         PKGHANDLER_COMMAND="sudo yum groupinstall \"Development Tools\"" ;;
3426     openjdk)
3427         PKGHANDLER_COMMAND="sudo yum install java-1.7.0-openjdk" ;;
3428     alsa)
3429         PKGHANDLER_COMMAND="sudo yum install alsa-lib-devel" ;;
3430     cups)
3431         PKGHANDLER_COMMAND="sudo yum install cups-devel" ;;
3432     freetype2)
3433         PKGHANDLER_COMMAND="sudo yum install freetype2-devel" ;;
3434     pulse)
3435         PKGHANDLER_COMMAND="sudo yum install pulseaudio-libs-devel" ;;
3436     x11)
3437         PKGHANDLER_COMMAND="sudo yum install libXtst-devel" ;;
3438     ccache)
3439         PKGHANDLER_COMMAND="sudo yum install ccache" ;;
3440     * )
3441        break ;;
3442     esac
3443 }
3444 
3445 port_help() {
3446     PKGHANDLER_COMMAND=""
3447 }
3448 
3449 pkgutil_help() {
3450     PKGHANDLER_COMMAND=""
3451 }
3452 
3453 pkgadd_help() {
3454     PKGHANDLER_COMMAND=""
3455 }
3456 
3457 
3458 
3459 #
3460 # Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
3461 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3462 #
3463 # This code is free software; you can redistribute it and/or modify it
3464 # under the terms of the GNU General Public License version 2 only, as
3465 # published by the Free Software Foundation.  Oracle designates this
3466 # particular file as subject to the "Classpath" exception as provided
3467 # by Oracle in the LICENSE file that accompanied this code.
3468 #
3469 # This code is distributed in the hope that it will be useful, but WITHOUT
3470 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3471 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3472 # version 2 for more details (a copy is included in the LICENSE file that
3473 # accompanied this code).
3474 #
3475 # You should have received a copy of the GNU General Public License version
3476 # 2 along with this work; if not, write to the Free Software Foundation,
3477 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3478 #
3479 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3480 # or visit www.oracle.com if you need additional information or have any
3481 # questions.
3482 #
3483 
3484 
3485 
3486 
3487 
3488 
3489 
3490 
3491 ###############################################################################
3492 #
3493 # Should we build only OpenJDK even if closed sources are present?
3494 #
3495 
3496 
3497 
3498 
3499 ###############################################################################
3500 #
3501 # Setup version numbers
3502 #
3503 
3504 
3505 
3506 
3507 
3508 
3509 # Support for customization of the build process. Some build files
3510 # will include counterparts from this location, if they exist. This allows
3511 # for a degree of customization of the build targets and the rules/recipes
3512 # to create them
3513 
3514 # Check whether --with-custom-make-dir was given.
3515 if test "${with_custom_make_dir+set}" = set; then :
3516   withval=$with_custom_make_dir; CUSTOM_MAKE_DIR=$with_custom_make_dir
3517 fi
3518 
3519 
3520 
3521 #
3522 # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3523 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3524 #
3525 # This code is free software; you can redistribute it and/or modify it
3526 # under the terms of the GNU General Public License version 2 only, as
3527 # published by the Free Software Foundation.  Oracle designates this
3528 # particular file as subject to the "Classpath" exception as provided
3529 # by Oracle in the LICENSE file that accompanied this code.
3530 #
3531 # This code is distributed in the hope that it will be useful, but WITHOUT
3532 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3533 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3534 # version 2 for more details (a copy is included in the LICENSE file that
3535 # accompanied this code).
3536 #
3537 # You should have received a copy of the GNU General Public License version
3538 # 2 along with this work; if not, write to the Free Software Foundation,
3539 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3540 #
3541 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3542 # or visit www.oracle.com if you need additional information or have any
3543 # questions.
3544 #
3545 
3546 
3547 
3548 
3549 
3550 
3551 
3552 
3553 
3554 
3555 
3556 
3557 
3558 
3559 
3560 #
3561 # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3562 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3563 #
3564 # This code is free software; you can redistribute it and/or modify it
3565 # under the terms of the GNU General Public License version 2 only, as
3566 # published by the Free Software Foundation.  Oracle designates this
3567 # particular file as subject to the "Classpath" exception as provided
3568 # by Oracle in the LICENSE file that accompanied this code.
3569 #
3570 # This code is distributed in the hope that it will be useful, but WITHOUT
3571 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3572 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3573 # version 2 for more details (a copy is included in the LICENSE file that
3574 # accompanied this code).
3575 #
3576 # You should have received a copy of the GNU General Public License version
3577 # 2 along with this work; if not, write to the Free Software Foundation,
3578 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3579 #
3580 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3581 # or visit www.oracle.com if you need additional information or have any
3582 # questions.
3583 #
3584 
3585 # Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
3586 # Converts autoconf style CPU name to OpenJDK style, into
3587 # VAR_CPU, VAR_CPU_ARCH, VAR_CPU_BITS and VAR_CPU_ENDIAN.
3588 
3589 
3590 # Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
3591 # Converts autoconf style OS name to OpenJDK style, into
3592 # VAR_OS and VAR_OS_API.
3593 
3594 
3595 # Expects $host_os $host_cpu $build_os and $build_cpu
3596 # and $with_target_bits to have been setup!
3597 #
3598 # Translate the standard triplet(quadruplet) definition
3599 # of the target/build system into OPENJDK_TARGET_OS, OPENJDK_TARGET_CPU,
3600 # OPENJDK_BUILD_OS, etc.
3601 
3602 
3603 # Check if a reduced build (32-bit on 64-bit platforms) is requested, and modify behaviour
3604 # accordingly. Must be done after setting up build and target system, but before
3605 # doing anything else with these values.
3606 
3607 
3608     # Setup the legacy variables, for controlling the old makefiles.
3609     #
3610 
3611 
3612 
3613 
3614 #%%% Build and target systems %%%
3615 
3616 
3617 
3618 
3619 # Support macro for PLATFORM_SETUP_OPENJDK_TARGET_BITS.
3620 # Add -mX to various FLAGS variables.
3621 
3622 
3623 
3624 
3625 
3626 
3627 #
3628 # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3629 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3630 #
3631 # This code is free software; you can redistribute it and/or modify it
3632 # under the terms of the GNU General Public License version 2 only, as
3633 # published by the Free Software Foundation.  Oracle designates this
3634 # particular file as subject to the "Classpath" exception as provided
3635 # by Oracle in the LICENSE file that accompanied this code.
3636 #
3637 # This code is distributed in the hope that it will be useful, but WITHOUT
3638 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3639 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3640 # version 2 for more details (a copy is included in the LICENSE file that
3641 # accompanied this code).
3642 #
3643 # You should have received a copy of the GNU General Public License version
3644 # 2 along with this work; if not, write to the Free Software Foundation,
3645 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3646 #
3647 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3648 # or visit www.oracle.com if you need additional information or have any
3649 # questions.
3650 #
3651 
3652 
3653 
3654 
3655 
3656 
3657 
3658 
3659 #
3660 # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3661 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3662 #
3663 # This code is free software; you can redistribute it and/or modify it
3664 # under the terms of the GNU General Public License version 2 only, as
3665 # published by the Free Software Foundation.  Oracle designates this
3666 # particular file as subject to the "Classpath" exception as provided
3667 # by Oracle in the LICENSE file that accompanied this code.
3668 #
3669 # This code is distributed in the hope that it will be useful, but WITHOUT
3670 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3671 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3672 # version 2 for more details (a copy is included in the LICENSE file that
3673 # accompanied this code).
3674 #
3675 # You should have received a copy of the GNU General Public License version
3676 # 2 along with this work; if not, write to the Free Software Foundation,
3677 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3678 #
3679 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3680 # or visit www.oracle.com if you need additional information or have any
3681 # questions.
3682 #
3683 
3684 # $1 = compiler to test (CC or CXX)
3685 # $2 = human readable name of compiler (C or C++)
3686 
3687 
3688 
3689 
3690 
3691 # $1 = compiler to test (CC or CXX)
3692 # $2 = human readable name of compiler (C or C++)
3693 # $3 = list of compiler names to search for
3694 
3695 
3696 
3697 
3698 
3699 
3700 
3701 
3702 
3703 
3704 
3705 
3706 #
3707 # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3708 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3709 #
3710 # This code is free software; you can redistribute it and/or modify it
3711 # under the terms of the GNU General Public License version 2 only, as
3712 # published by the Free Software Foundation.  Oracle designates this
3713 # particular file as subject to the "Classpath" exception as provided
3714 # by Oracle in the LICENSE file that accompanied this code.
3715 #
3716 # This code is distributed in the hope that it will be useful, but WITHOUT
3717 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3718 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3719 # version 2 for more details (a copy is included in the LICENSE file that
3720 # accompanied this code).
3721 #
3722 # You should have received a copy of the GNU General Public License version
3723 # 2 along with this work; if not, write to the Free Software Foundation,
3724 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3725 #
3726 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3727 # or visit www.oracle.com if you need additional information or have any
3728 # questions.
3729 #
3730 
3731 
3732 
3733 
3734 
3735 
3736 
3737 # Check if the VS env variables were setup prior to running configure.
3738 # If not, then find vcvarsall.bat and run it automatically, and integrate
3739 # the set env variables into the spec file.
3740 
3741 
3742 
3743 # Setup the DXSDK paths
3744 
3745 
3746 
3747 
3748 
3749 
3750 # This line needs to be here, verbatim, after all includes and the dummy hook
3751 # definitions. It is replaced with custom functionality when building
3752 # custom sources.
3753 #CUSTOM_AUTOCONF_INCLUDE
3754 
3755 # Do not change or remove the following line, it is needed for consistency checks:
3756 DATE_WHEN_GENERATED=1363617192
3757 
3758 ###############################################################################
3759 #
3760 # Initialization / Boot-strapping
3761 #
3762 # The bootstrapping process needs to solve the "chicken or the egg" problem,
3763 # thus it jumps back and forth, each time gaining something needed later on.
3764 #
3765 ###############################################################################
3766 
3767 # Basic initialization that must happen first of all
3768 
3769 # Save the original command line. This is passed to us by the wrapper configure script.
3770 
3771 DATE_WHEN_CONFIGURED=`LANG=C date`
3772 
3773 { $as_echo "$as_me:${as_lineno-$LINENO}: Configuration created at $DATE_WHEN_CONFIGURED." >&5
3774 $as_echo "$as_me: Configuration created at $DATE_WHEN_CONFIGURED." >&6;}
3775 { $as_echo "$as_me:${as_lineno-$LINENO}: configure script generated at timestamp $DATE_WHEN_GENERATED." >&5
3776 $as_echo "$as_me: configure script generated at timestamp $DATE_WHEN_GENERATED." >&6;}
3777 
3778 
3779 
3780 # Start with tools that do not need have cross compilation support
3781 # and can be expected to be found in the default PATH. These tools are
3782 # used by configure. Nor are these tools expected to be found in the
3783 # devkit from the builddeps server either, since they are
3784 # needed to download the devkit.
3785 
3786 # First are all the simple required tools.
3787 
3788     for ac_prog in basename
3789 do
3790   # Extract the first word of "$ac_prog", so it can be a program name with args.
3791 set dummy $ac_prog; ac_word=$2
3792 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3793 $as_echo_n "checking for $ac_word... " >&6; }
3794 if ${ac_cv_path_BASENAME+:} false; then :
3795   $as_echo_n "(cached) " >&6
3796 else
3797   case $BASENAME in
3798   [\\/]* | ?:[\\/]*)
3799   ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
3800   ;;
3801   *)
3802   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3803 for as_dir in $PATH
3804 do
3805   IFS=$as_save_IFS
3806   test -z "$as_dir" && as_dir=.
3807     for ac_exec_ext in '' $ac_executable_extensions; do
3808   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3809     ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
3810     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3811     break 2
3812   fi
3813 done
3814   done
3815 IFS=$as_save_IFS
3816 
3817   ;;
3818 esac
3819 fi
3820 BASENAME=$ac_cv_path_BASENAME
3821 if test -n "$BASENAME"; then
3822   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
3823 $as_echo "$BASENAME" >&6; }
3824 else
3825   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3826 $as_echo "no" >&6; }
3827 fi
3828 
3829 
3830   test -n "$BASENAME" && break
3831 done
3832 
3833 
3834     if test "x$BASENAME" = x; then
3835         if test "xbasename" = x; then
3836           PROG_NAME=basename
3837         else
3838           PROG_NAME=basename
3839         fi
3840         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
3841 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
3842         as_fn_error $? "Cannot continue" "$LINENO" 5
3843     fi
3844 
3845 
3846 
3847     for ac_prog in bash
3848 do
3849   # Extract the first word of "$ac_prog", so it can be a program name with args.
3850 set dummy $ac_prog; ac_word=$2
3851 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3852 $as_echo_n "checking for $ac_word... " >&6; }
3853 if ${ac_cv_path_BASH+:} false; then :
3854   $as_echo_n "(cached) " >&6
3855 else
3856   case $BASH in
3857   [\\/]* | ?:[\\/]*)
3858   ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
3859   ;;
3860   *)
3861   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3862 for as_dir in $PATH
3863 do
3864   IFS=$as_save_IFS
3865   test -z "$as_dir" && as_dir=.
3866     for ac_exec_ext in '' $ac_executable_extensions; do
3867   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3868     ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
3869     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3870     break 2
3871   fi
3872 done
3873   done
3874 IFS=$as_save_IFS
3875 
3876   ;;
3877 esac
3878 fi
3879 BASH=$ac_cv_path_BASH
3880 if test -n "$BASH"; then
3881   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
3882 $as_echo "$BASH" >&6; }
3883 else
3884   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3885 $as_echo "no" >&6; }
3886 fi
3887 
3888 
3889   test -n "$BASH" && break
3890 done
3891 
3892 
3893     if test "x$BASH" = x; then
3894         if test "xbash" = x; then
3895           PROG_NAME=bash
3896         else
3897           PROG_NAME=bash
3898         fi
3899         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
3900 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
3901         as_fn_error $? "Cannot continue" "$LINENO" 5
3902     fi
3903 
3904 
3905 
3906     for ac_prog in cat
3907 do
3908   # Extract the first word of "$ac_prog", so it can be a program name with args.
3909 set dummy $ac_prog; ac_word=$2
3910 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3911 $as_echo_n "checking for $ac_word... " >&6; }
3912 if ${ac_cv_path_CAT+:} false; then :
3913   $as_echo_n "(cached) " >&6
3914 else
3915   case $CAT in
3916   [\\/]* | ?:[\\/]*)
3917   ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
3918   ;;
3919   *)
3920   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3921 for as_dir in $PATH
3922 do
3923   IFS=$as_save_IFS
3924   test -z "$as_dir" && as_dir=.
3925     for ac_exec_ext in '' $ac_executable_extensions; do
3926   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3927     ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
3928     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3929     break 2
3930   fi
3931 done
3932   done
3933 IFS=$as_save_IFS
3934 
3935   ;;
3936 esac
3937 fi
3938 CAT=$ac_cv_path_CAT
3939 if test -n "$CAT"; then
3940   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
3941 $as_echo "$CAT" >&6; }
3942 else
3943   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3944 $as_echo "no" >&6; }
3945 fi
3946 
3947 
3948   test -n "$CAT" && break
3949 done
3950 
3951 
3952     if test "x$CAT" = x; then
3953         if test "xcat" = x; then
3954           PROG_NAME=cat
3955         else
3956           PROG_NAME=cat
3957         fi
3958         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
3959 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
3960         as_fn_error $? "Cannot continue" "$LINENO" 5
3961     fi
3962 
3963 
3964 
3965     for ac_prog in chmod
3966 do
3967   # Extract the first word of "$ac_prog", so it can be a program name with args.
3968 set dummy $ac_prog; ac_word=$2
3969 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3970 $as_echo_n "checking for $ac_word... " >&6; }
3971 if ${ac_cv_path_CHMOD+:} false; then :
3972   $as_echo_n "(cached) " >&6
3973 else
3974   case $CHMOD in
3975   [\\/]* | ?:[\\/]*)
3976   ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
3977   ;;
3978   *)
3979   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3980 for as_dir in $PATH
3981 do
3982   IFS=$as_save_IFS
3983   test -z "$as_dir" && as_dir=.
3984     for ac_exec_ext in '' $ac_executable_extensions; do
3985   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3986     ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
3987     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3988     break 2
3989   fi
3990 done
3991   done
3992 IFS=$as_save_IFS
3993 
3994   ;;
3995 esac
3996 fi
3997 CHMOD=$ac_cv_path_CHMOD
3998 if test -n "$CHMOD"; then
3999   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
4000 $as_echo "$CHMOD" >&6; }
4001 else
4002   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4003 $as_echo "no" >&6; }
4004 fi
4005 
4006 
4007   test -n "$CHMOD" && break
4008 done
4009 
4010 
4011     if test "x$CHMOD" = x; then
4012         if test "xchmod" = x; then
4013           PROG_NAME=chmod
4014         else
4015           PROG_NAME=chmod
4016         fi
4017         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4018 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4019         as_fn_error $? "Cannot continue" "$LINENO" 5
4020     fi
4021 
4022 
4023 
4024     for ac_prog in cmp
4025 do
4026   # Extract the first word of "$ac_prog", so it can be a program name with args.
4027 set dummy $ac_prog; ac_word=$2
4028 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4029 $as_echo_n "checking for $ac_word... " >&6; }
4030 if ${ac_cv_path_CMP+:} false; then :
4031   $as_echo_n "(cached) " >&6
4032 else
4033   case $CMP in
4034   [\\/]* | ?:[\\/]*)
4035   ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
4036   ;;
4037   *)
4038   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4039 for as_dir in $PATH
4040 do
4041   IFS=$as_save_IFS
4042   test -z "$as_dir" && as_dir=.
4043     for ac_exec_ext in '' $ac_executable_extensions; do
4044   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4045     ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
4046     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4047     break 2
4048   fi
4049 done
4050   done
4051 IFS=$as_save_IFS
4052 
4053   ;;
4054 esac
4055 fi
4056 CMP=$ac_cv_path_CMP
4057 if test -n "$CMP"; then
4058   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
4059 $as_echo "$CMP" >&6; }
4060 else
4061   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4062 $as_echo "no" >&6; }
4063 fi
4064 
4065 
4066   test -n "$CMP" && break
4067 done
4068 
4069 
4070     if test "x$CMP" = x; then
4071         if test "xcmp" = x; then
4072           PROG_NAME=cmp
4073         else
4074           PROG_NAME=cmp
4075         fi
4076         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4077 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4078         as_fn_error $? "Cannot continue" "$LINENO" 5
4079     fi
4080 
4081 
4082 
4083     for ac_prog in comm
4084 do
4085   # Extract the first word of "$ac_prog", so it can be a program name with args.
4086 set dummy $ac_prog; ac_word=$2
4087 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4088 $as_echo_n "checking for $ac_word... " >&6; }
4089 if ${ac_cv_path_COMM+:} false; then :
4090   $as_echo_n "(cached) " >&6
4091 else
4092   case $COMM in
4093   [\\/]* | ?:[\\/]*)
4094   ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
4095   ;;
4096   *)
4097   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4098 for as_dir in $PATH
4099 do
4100   IFS=$as_save_IFS
4101   test -z "$as_dir" && as_dir=.
4102     for ac_exec_ext in '' $ac_executable_extensions; do
4103   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4104     ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
4105     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4106     break 2
4107   fi
4108 done
4109   done
4110 IFS=$as_save_IFS
4111 
4112   ;;
4113 esac
4114 fi
4115 COMM=$ac_cv_path_COMM
4116 if test -n "$COMM"; then
4117   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
4118 $as_echo "$COMM" >&6; }
4119 else
4120   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4121 $as_echo "no" >&6; }
4122 fi
4123 
4124 
4125   test -n "$COMM" && break
4126 done
4127 
4128 
4129     if test "x$COMM" = x; then
4130         if test "xcomm" = x; then
4131           PROG_NAME=comm
4132         else
4133           PROG_NAME=comm
4134         fi
4135         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4136 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4137         as_fn_error $? "Cannot continue" "$LINENO" 5
4138     fi
4139 
4140 
4141 
4142     for ac_prog in cp
4143 do
4144   # Extract the first word of "$ac_prog", so it can be a program name with args.
4145 set dummy $ac_prog; ac_word=$2
4146 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4147 $as_echo_n "checking for $ac_word... " >&6; }
4148 if ${ac_cv_path_CP+:} false; then :
4149   $as_echo_n "(cached) " >&6
4150 else
4151   case $CP in
4152   [\\/]* | ?:[\\/]*)
4153   ac_cv_path_CP="$CP" # Let the user override the test with a path.
4154   ;;
4155   *)
4156   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4157 for as_dir in $PATH
4158 do
4159   IFS=$as_save_IFS
4160   test -z "$as_dir" && as_dir=.
4161     for ac_exec_ext in '' $ac_executable_extensions; do
4162   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4163     ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
4164     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4165     break 2
4166   fi
4167 done
4168   done
4169 IFS=$as_save_IFS
4170 
4171   ;;
4172 esac
4173 fi
4174 CP=$ac_cv_path_CP
4175 if test -n "$CP"; then
4176   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
4177 $as_echo "$CP" >&6; }
4178 else
4179   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4180 $as_echo "no" >&6; }
4181 fi
4182 
4183 
4184   test -n "$CP" && break
4185 done
4186 
4187 
4188     if test "x$CP" = x; then
4189         if test "xcp" = x; then
4190           PROG_NAME=cp
4191         else
4192           PROG_NAME=cp
4193         fi
4194         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4195 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4196         as_fn_error $? "Cannot continue" "$LINENO" 5
4197     fi
4198 
4199 
4200 
4201     for ac_prog in cpio
4202 do
4203   # Extract the first word of "$ac_prog", so it can be a program name with args.
4204 set dummy $ac_prog; ac_word=$2
4205 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4206 $as_echo_n "checking for $ac_word... " >&6; }
4207 if ${ac_cv_path_CPIO+:} false; then :
4208   $as_echo_n "(cached) " >&6
4209 else
4210   case $CPIO in
4211   [\\/]* | ?:[\\/]*)
4212   ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
4213   ;;
4214   *)
4215   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4216 for as_dir in $PATH
4217 do
4218   IFS=$as_save_IFS
4219   test -z "$as_dir" && as_dir=.
4220     for ac_exec_ext in '' $ac_executable_extensions; do
4221   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4222     ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
4223     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4224     break 2
4225   fi
4226 done
4227   done
4228 IFS=$as_save_IFS
4229 
4230   ;;
4231 esac
4232 fi
4233 CPIO=$ac_cv_path_CPIO
4234 if test -n "$CPIO"; then
4235   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
4236 $as_echo "$CPIO" >&6; }
4237 else
4238   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4239 $as_echo "no" >&6; }
4240 fi
4241 
4242 
4243   test -n "$CPIO" && break
4244 done
4245 
4246 
4247     if test "x$CPIO" = x; then
4248         if test "xcpio" = x; then
4249           PROG_NAME=cpio
4250         else
4251           PROG_NAME=cpio
4252         fi
4253         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4254 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4255         as_fn_error $? "Cannot continue" "$LINENO" 5
4256     fi
4257 
4258 
4259 
4260     for ac_prog in cut
4261 do
4262   # Extract the first word of "$ac_prog", so it can be a program name with args.
4263 set dummy $ac_prog; ac_word=$2
4264 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4265 $as_echo_n "checking for $ac_word... " >&6; }
4266 if ${ac_cv_path_CUT+:} false; then :
4267   $as_echo_n "(cached) " >&6
4268 else
4269   case $CUT in
4270   [\\/]* | ?:[\\/]*)
4271   ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
4272   ;;
4273   *)
4274   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4275 for as_dir in $PATH
4276 do
4277   IFS=$as_save_IFS
4278   test -z "$as_dir" && as_dir=.
4279     for ac_exec_ext in '' $ac_executable_extensions; do
4280   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4281     ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
4282     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4283     break 2
4284   fi
4285 done
4286   done
4287 IFS=$as_save_IFS
4288 
4289   ;;
4290 esac
4291 fi
4292 CUT=$ac_cv_path_CUT
4293 if test -n "$CUT"; then
4294   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
4295 $as_echo "$CUT" >&6; }
4296 else
4297   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4298 $as_echo "no" >&6; }
4299 fi
4300 
4301 
4302   test -n "$CUT" && break
4303 done
4304 
4305 
4306     if test "x$CUT" = x; then
4307         if test "xcut" = x; then
4308           PROG_NAME=cut
4309         else
4310           PROG_NAME=cut
4311         fi
4312         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4313 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4314         as_fn_error $? "Cannot continue" "$LINENO" 5
4315     fi
4316 
4317 
4318 
4319     for ac_prog in date
4320 do
4321   # Extract the first word of "$ac_prog", so it can be a program name with args.
4322 set dummy $ac_prog; ac_word=$2
4323 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4324 $as_echo_n "checking for $ac_word... " >&6; }
4325 if ${ac_cv_path_DATE+:} false; then :
4326   $as_echo_n "(cached) " >&6
4327 else
4328   case $DATE in
4329   [\\/]* | ?:[\\/]*)
4330   ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
4331   ;;
4332   *)
4333   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4334 for as_dir in $PATH
4335 do
4336   IFS=$as_save_IFS
4337   test -z "$as_dir" && as_dir=.
4338     for ac_exec_ext in '' $ac_executable_extensions; do
4339   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4340     ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
4341     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4342     break 2
4343   fi
4344 done
4345   done
4346 IFS=$as_save_IFS
4347 
4348   ;;
4349 esac
4350 fi
4351 DATE=$ac_cv_path_DATE
4352 if test -n "$DATE"; then
4353   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
4354 $as_echo "$DATE" >&6; }
4355 else
4356   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4357 $as_echo "no" >&6; }
4358 fi
4359 
4360 
4361   test -n "$DATE" && break
4362 done
4363 
4364 
4365     if test "x$DATE" = x; then
4366         if test "xdate" = x; then
4367           PROG_NAME=date
4368         else
4369           PROG_NAME=date
4370         fi
4371         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4372 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4373         as_fn_error $? "Cannot continue" "$LINENO" 5
4374     fi
4375 
4376 
4377 
4378     for ac_prog in gdiff diff
4379 do
4380   # Extract the first word of "$ac_prog", so it can be a program name with args.
4381 set dummy $ac_prog; ac_word=$2
4382 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4383 $as_echo_n "checking for $ac_word... " >&6; }
4384 if ${ac_cv_path_DIFF+:} false; then :
4385   $as_echo_n "(cached) " >&6
4386 else
4387   case $DIFF in
4388   [\\/]* | ?:[\\/]*)
4389   ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
4390   ;;
4391   *)
4392   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4393 for as_dir in $PATH
4394 do
4395   IFS=$as_save_IFS
4396   test -z "$as_dir" && as_dir=.
4397     for ac_exec_ext in '' $ac_executable_extensions; do
4398   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4399     ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
4400     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4401     break 2
4402   fi
4403 done
4404   done
4405 IFS=$as_save_IFS
4406 
4407   ;;
4408 esac
4409 fi
4410 DIFF=$ac_cv_path_DIFF
4411 if test -n "$DIFF"; then
4412   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
4413 $as_echo "$DIFF" >&6; }
4414 else
4415   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4416 $as_echo "no" >&6; }
4417 fi
4418 
4419 
4420   test -n "$DIFF" && break
4421 done
4422 
4423 
4424     if test "x$DIFF" = x; then
4425         if test "xgdiff diff" = x; then
4426           PROG_NAME=diff
4427         else
4428           PROG_NAME=gdiff diff
4429         fi
4430         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4431 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4432         as_fn_error $? "Cannot continue" "$LINENO" 5
4433     fi
4434 
4435 
4436 
4437     for ac_prog in dirname
4438 do
4439   # Extract the first word of "$ac_prog", so it can be a program name with args.
4440 set dummy $ac_prog; ac_word=$2
4441 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4442 $as_echo_n "checking for $ac_word... " >&6; }
4443 if ${ac_cv_path_DIRNAME+:} false; then :
4444   $as_echo_n "(cached) " >&6
4445 else
4446   case $DIRNAME in
4447   [\\/]* | ?:[\\/]*)
4448   ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
4449   ;;
4450   *)
4451   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4452 for as_dir in $PATH
4453 do
4454   IFS=$as_save_IFS
4455   test -z "$as_dir" && as_dir=.
4456     for ac_exec_ext in '' $ac_executable_extensions; do
4457   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4458     ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
4459     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4460     break 2
4461   fi
4462 done
4463   done
4464 IFS=$as_save_IFS
4465 
4466   ;;
4467 esac
4468 fi
4469 DIRNAME=$ac_cv_path_DIRNAME
4470 if test -n "$DIRNAME"; then
4471   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
4472 $as_echo "$DIRNAME" >&6; }
4473 else
4474   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4475 $as_echo "no" >&6; }
4476 fi
4477 
4478 
4479   test -n "$DIRNAME" && break
4480 done
4481 
4482 
4483     if test "x$DIRNAME" = x; then
4484         if test "xdirname" = x; then
4485           PROG_NAME=dirname
4486         else
4487           PROG_NAME=dirname
4488         fi
4489         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4490 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4491         as_fn_error $? "Cannot continue" "$LINENO" 5
4492     fi
4493 
4494 
4495 
4496     for ac_prog in echo
4497 do
4498   # Extract the first word of "$ac_prog", so it can be a program name with args.
4499 set dummy $ac_prog; ac_word=$2
4500 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4501 $as_echo_n "checking for $ac_word... " >&6; }
4502 if ${ac_cv_path_ECHO+:} false; then :
4503   $as_echo_n "(cached) " >&6
4504 else
4505   case $ECHO in
4506   [\\/]* | ?:[\\/]*)
4507   ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
4508   ;;
4509   *)
4510   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4511 for as_dir in $PATH
4512 do
4513   IFS=$as_save_IFS
4514   test -z "$as_dir" && as_dir=.
4515     for ac_exec_ext in '' $ac_executable_extensions; do
4516   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4517     ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
4518     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4519     break 2
4520   fi
4521 done
4522   done
4523 IFS=$as_save_IFS
4524 
4525   ;;
4526 esac
4527 fi
4528 ECHO=$ac_cv_path_ECHO
4529 if test -n "$ECHO"; then
4530   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
4531 $as_echo "$ECHO" >&6; }
4532 else
4533   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4534 $as_echo "no" >&6; }
4535 fi
4536 
4537 
4538   test -n "$ECHO" && break
4539 done
4540 
4541 
4542     if test "x$ECHO" = x; then
4543         if test "xecho" = x; then
4544           PROG_NAME=echo
4545         else
4546           PROG_NAME=echo
4547         fi
4548         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4549 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4550         as_fn_error $? "Cannot continue" "$LINENO" 5
4551     fi
4552 
4553 
4554 
4555     for ac_prog in expr
4556 do
4557   # Extract the first word of "$ac_prog", so it can be a program name with args.
4558 set dummy $ac_prog; ac_word=$2
4559 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4560 $as_echo_n "checking for $ac_word... " >&6; }
4561 if ${ac_cv_path_EXPR+:} false; then :
4562   $as_echo_n "(cached) " >&6
4563 else
4564   case $EXPR in
4565   [\\/]* | ?:[\\/]*)
4566   ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
4567   ;;
4568   *)
4569   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4570 for as_dir in $PATH
4571 do
4572   IFS=$as_save_IFS
4573   test -z "$as_dir" && as_dir=.
4574     for ac_exec_ext in '' $ac_executable_extensions; do
4575   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4576     ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
4577     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4578     break 2
4579   fi
4580 done
4581   done
4582 IFS=$as_save_IFS
4583 
4584   ;;
4585 esac
4586 fi
4587 EXPR=$ac_cv_path_EXPR
4588 if test -n "$EXPR"; then
4589   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
4590 $as_echo "$EXPR" >&6; }
4591 else
4592   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4593 $as_echo "no" >&6; }
4594 fi
4595 
4596 
4597   test -n "$EXPR" && break
4598 done
4599 
4600 
4601     if test "x$EXPR" = x; then
4602         if test "xexpr" = x; then
4603           PROG_NAME=expr
4604         else
4605           PROG_NAME=expr
4606         fi
4607         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4608 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4609         as_fn_error $? "Cannot continue" "$LINENO" 5
4610     fi
4611 
4612 
4613 
4614     for ac_prog in file
4615 do
4616   # Extract the first word of "$ac_prog", so it can be a program name with args.
4617 set dummy $ac_prog; ac_word=$2
4618 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4619 $as_echo_n "checking for $ac_word... " >&6; }
4620 if ${ac_cv_path_FILE+:} false; then :
4621   $as_echo_n "(cached) " >&6
4622 else
4623   case $FILE in
4624   [\\/]* | ?:[\\/]*)
4625   ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
4626   ;;
4627   *)
4628   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4629 for as_dir in $PATH
4630 do
4631   IFS=$as_save_IFS
4632   test -z "$as_dir" && as_dir=.
4633     for ac_exec_ext in '' $ac_executable_extensions; do
4634   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4635     ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
4636     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4637     break 2
4638   fi
4639 done
4640   done
4641 IFS=$as_save_IFS
4642 
4643   ;;
4644 esac
4645 fi
4646 FILE=$ac_cv_path_FILE
4647 if test -n "$FILE"; then
4648   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
4649 $as_echo "$FILE" >&6; }
4650 else
4651   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4652 $as_echo "no" >&6; }
4653 fi
4654 
4655 
4656   test -n "$FILE" && break
4657 done
4658 
4659 
4660     if test "x$FILE" = x; then
4661         if test "xfile" = x; then
4662           PROG_NAME=file
4663         else
4664           PROG_NAME=file
4665         fi
4666         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4667 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4668         as_fn_error $? "Cannot continue" "$LINENO" 5
4669     fi
4670 
4671 
4672 
4673     for ac_prog in find
4674 do
4675   # Extract the first word of "$ac_prog", so it can be a program name with args.
4676 set dummy $ac_prog; ac_word=$2
4677 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4678 $as_echo_n "checking for $ac_word... " >&6; }
4679 if ${ac_cv_path_FIND+:} false; then :
4680   $as_echo_n "(cached) " >&6
4681 else
4682   case $FIND in
4683   [\\/]* | ?:[\\/]*)
4684   ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
4685   ;;
4686   *)
4687   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4688 for as_dir in $PATH
4689 do
4690   IFS=$as_save_IFS
4691   test -z "$as_dir" && as_dir=.
4692     for ac_exec_ext in '' $ac_executable_extensions; do
4693   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4694     ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
4695     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4696     break 2
4697   fi
4698 done
4699   done
4700 IFS=$as_save_IFS
4701 
4702   ;;
4703 esac
4704 fi
4705 FIND=$ac_cv_path_FIND
4706 if test -n "$FIND"; then
4707   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
4708 $as_echo "$FIND" >&6; }
4709 else
4710   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4711 $as_echo "no" >&6; }
4712 fi
4713 
4714 
4715   test -n "$FIND" && break
4716 done
4717 
4718 
4719     if test "x$FIND" = x; then
4720         if test "xfind" = x; then
4721           PROG_NAME=find
4722         else
4723           PROG_NAME=find
4724         fi
4725         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4726 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4727         as_fn_error $? "Cannot continue" "$LINENO" 5
4728     fi
4729 
4730 
4731 
4732     for ac_prog in head
4733 do
4734   # Extract the first word of "$ac_prog", so it can be a program name with args.
4735 set dummy $ac_prog; ac_word=$2
4736 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4737 $as_echo_n "checking for $ac_word... " >&6; }
4738 if ${ac_cv_path_HEAD+:} false; then :
4739   $as_echo_n "(cached) " >&6
4740 else
4741   case $HEAD in
4742   [\\/]* | ?:[\\/]*)
4743   ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
4744   ;;
4745   *)
4746   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4747 for as_dir in $PATH
4748 do
4749   IFS=$as_save_IFS
4750   test -z "$as_dir" && as_dir=.
4751     for ac_exec_ext in '' $ac_executable_extensions; do
4752   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4753     ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
4754     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4755     break 2
4756   fi
4757 done
4758   done
4759 IFS=$as_save_IFS
4760 
4761   ;;
4762 esac
4763 fi
4764 HEAD=$ac_cv_path_HEAD
4765 if test -n "$HEAD"; then
4766   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
4767 $as_echo "$HEAD" >&6; }
4768 else
4769   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4770 $as_echo "no" >&6; }
4771 fi
4772 
4773 
4774   test -n "$HEAD" && break
4775 done
4776 
4777 
4778     if test "x$HEAD" = x; then
4779         if test "xhead" = x; then
4780           PROG_NAME=head
4781         else
4782           PROG_NAME=head
4783         fi
4784         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4785 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4786         as_fn_error $? "Cannot continue" "$LINENO" 5
4787     fi
4788 
4789 
4790 
4791     for ac_prog in ln
4792 do
4793   # Extract the first word of "$ac_prog", so it can be a program name with args.
4794 set dummy $ac_prog; ac_word=$2
4795 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4796 $as_echo_n "checking for $ac_word... " >&6; }
4797 if ${ac_cv_path_LN+:} false; then :
4798   $as_echo_n "(cached) " >&6
4799 else
4800   case $LN in
4801   [\\/]* | ?:[\\/]*)
4802   ac_cv_path_LN="$LN" # Let the user override the test with a path.
4803   ;;
4804   *)
4805   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4806 for as_dir in $PATH
4807 do
4808   IFS=$as_save_IFS
4809   test -z "$as_dir" && as_dir=.
4810     for ac_exec_ext in '' $ac_executable_extensions; do
4811   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4812     ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
4813     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4814     break 2
4815   fi
4816 done
4817   done
4818 IFS=$as_save_IFS
4819 
4820   ;;
4821 esac
4822 fi
4823 LN=$ac_cv_path_LN
4824 if test -n "$LN"; then
4825   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
4826 $as_echo "$LN" >&6; }
4827 else
4828   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4829 $as_echo "no" >&6; }
4830 fi
4831 
4832 
4833   test -n "$LN" && break
4834 done
4835 
4836 
4837     if test "x$LN" = x; then
4838         if test "xln" = x; then
4839           PROG_NAME=ln
4840         else
4841           PROG_NAME=ln
4842         fi
4843         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4844 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4845         as_fn_error $? "Cannot continue" "$LINENO" 5
4846     fi
4847 
4848 
4849 
4850     for ac_prog in ls
4851 do
4852   # Extract the first word of "$ac_prog", so it can be a program name with args.
4853 set dummy $ac_prog; ac_word=$2
4854 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4855 $as_echo_n "checking for $ac_word... " >&6; }
4856 if ${ac_cv_path_LS+:} false; then :
4857   $as_echo_n "(cached) " >&6
4858 else
4859   case $LS in
4860   [\\/]* | ?:[\\/]*)
4861   ac_cv_path_LS="$LS" # Let the user override the test with a path.
4862   ;;
4863   *)
4864   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4865 for as_dir in $PATH
4866 do
4867   IFS=$as_save_IFS
4868   test -z "$as_dir" && as_dir=.
4869     for ac_exec_ext in '' $ac_executable_extensions; do
4870   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4871     ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
4872     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4873     break 2
4874   fi
4875 done
4876   done
4877 IFS=$as_save_IFS
4878 
4879   ;;
4880 esac
4881 fi
4882 LS=$ac_cv_path_LS
4883 if test -n "$LS"; then
4884   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
4885 $as_echo "$LS" >&6; }
4886 else
4887   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4888 $as_echo "no" >&6; }
4889 fi
4890 
4891 
4892   test -n "$LS" && break
4893 done
4894 
4895 
4896     if test "x$LS" = x; then
4897         if test "xls" = x; then
4898           PROG_NAME=ls
4899         else
4900           PROG_NAME=ls
4901         fi
4902         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4903 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4904         as_fn_error $? "Cannot continue" "$LINENO" 5
4905     fi
4906 
4907 
4908 
4909     for ac_prog in mkdir
4910 do
4911   # Extract the first word of "$ac_prog", so it can be a program name with args.
4912 set dummy $ac_prog; ac_word=$2
4913 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4914 $as_echo_n "checking for $ac_word... " >&6; }
4915 if ${ac_cv_path_MKDIR+:} false; then :
4916   $as_echo_n "(cached) " >&6
4917 else
4918   case $MKDIR in
4919   [\\/]* | ?:[\\/]*)
4920   ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
4921   ;;
4922   *)
4923   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4924 for as_dir in $PATH
4925 do
4926   IFS=$as_save_IFS
4927   test -z "$as_dir" && as_dir=.
4928     for ac_exec_ext in '' $ac_executable_extensions; do
4929   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4930     ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
4931     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4932     break 2
4933   fi
4934 done
4935   done
4936 IFS=$as_save_IFS
4937 
4938   ;;
4939 esac
4940 fi
4941 MKDIR=$ac_cv_path_MKDIR
4942 if test -n "$MKDIR"; then
4943   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
4944 $as_echo "$MKDIR" >&6; }
4945 else
4946   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4947 $as_echo "no" >&6; }
4948 fi
4949 
4950 
4951   test -n "$MKDIR" && break
4952 done
4953 
4954 
4955     if test "x$MKDIR" = x; then
4956         if test "xmkdir" = x; then
4957           PROG_NAME=mkdir
4958         else
4959           PROG_NAME=mkdir
4960         fi
4961         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4962 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4963         as_fn_error $? "Cannot continue" "$LINENO" 5
4964     fi
4965 
4966 
4967 
4968     for ac_prog in mktemp
4969 do
4970   # Extract the first word of "$ac_prog", so it can be a program name with args.
4971 set dummy $ac_prog; ac_word=$2
4972 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4973 $as_echo_n "checking for $ac_word... " >&6; }
4974 if ${ac_cv_path_MKTEMP+:} false; then :
4975   $as_echo_n "(cached) " >&6
4976 else
4977   case $MKTEMP in
4978   [\\/]* | ?:[\\/]*)
4979   ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
4980   ;;
4981   *)
4982   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4983 for as_dir in $PATH
4984 do
4985   IFS=$as_save_IFS
4986   test -z "$as_dir" && as_dir=.
4987     for ac_exec_ext in '' $ac_executable_extensions; do
4988   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4989     ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
4990     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4991     break 2
4992   fi
4993 done
4994   done
4995 IFS=$as_save_IFS
4996 
4997   ;;
4998 esac
4999 fi
5000 MKTEMP=$ac_cv_path_MKTEMP
5001 if test -n "$MKTEMP"; then
5002   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
5003 $as_echo "$MKTEMP" >&6; }
5004 else
5005   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5006 $as_echo "no" >&6; }
5007 fi
5008 
5009 
5010   test -n "$MKTEMP" && break
5011 done
5012 
5013 
5014     if test "x$MKTEMP" = x; then
5015         if test "xmktemp" = x; then
5016           PROG_NAME=mktemp
5017         else
5018           PROG_NAME=mktemp
5019         fi
5020         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5021 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5022         as_fn_error $? "Cannot continue" "$LINENO" 5
5023     fi
5024 
5025 
5026 
5027     for ac_prog in mv
5028 do
5029   # Extract the first word of "$ac_prog", so it can be a program name with args.
5030 set dummy $ac_prog; ac_word=$2
5031 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5032 $as_echo_n "checking for $ac_word... " >&6; }
5033 if ${ac_cv_path_MV+:} false; then :
5034   $as_echo_n "(cached) " >&6
5035 else
5036   case $MV in
5037   [\\/]* | ?:[\\/]*)
5038   ac_cv_path_MV="$MV" # Let the user override the test with a path.
5039   ;;
5040   *)
5041   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5042 for as_dir in $PATH
5043 do
5044   IFS=$as_save_IFS
5045   test -z "$as_dir" && as_dir=.
5046     for ac_exec_ext in '' $ac_executable_extensions; do
5047   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5048     ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
5049     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5050     break 2
5051   fi
5052 done
5053   done
5054 IFS=$as_save_IFS
5055 
5056   ;;
5057 esac
5058 fi
5059 MV=$ac_cv_path_MV
5060 if test -n "$MV"; then
5061   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
5062 $as_echo "$MV" >&6; }
5063 else
5064   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5065 $as_echo "no" >&6; }
5066 fi
5067 
5068 
5069   test -n "$MV" && break
5070 done
5071 
5072 
5073     if test "x$MV" = x; then
5074         if test "xmv" = x; then
5075           PROG_NAME=mv
5076         else
5077           PROG_NAME=mv
5078         fi
5079         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5080 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5081         as_fn_error $? "Cannot continue" "$LINENO" 5
5082     fi
5083 
5084 
5085 
5086     for ac_prog in printf
5087 do
5088   # Extract the first word of "$ac_prog", so it can be a program name with args.
5089 set dummy $ac_prog; ac_word=$2
5090 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5091 $as_echo_n "checking for $ac_word... " >&6; }
5092 if ${ac_cv_path_PRINTF+:} false; then :
5093   $as_echo_n "(cached) " >&6
5094 else
5095   case $PRINTF in
5096   [\\/]* | ?:[\\/]*)
5097   ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
5098   ;;
5099   *)
5100   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5101 for as_dir in $PATH
5102 do
5103   IFS=$as_save_IFS
5104   test -z "$as_dir" && as_dir=.
5105     for ac_exec_ext in '' $ac_executable_extensions; do
5106   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5107     ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
5108     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5109     break 2
5110   fi
5111 done
5112   done
5113 IFS=$as_save_IFS
5114 
5115   ;;
5116 esac
5117 fi
5118 PRINTF=$ac_cv_path_PRINTF
5119 if test -n "$PRINTF"; then
5120   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
5121 $as_echo "$PRINTF" >&6; }
5122 else
5123   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5124 $as_echo "no" >&6; }
5125 fi
5126 
5127 
5128   test -n "$PRINTF" && break
5129 done
5130 
5131 
5132     if test "x$PRINTF" = x; then
5133         if test "xprintf" = x; then
5134           PROG_NAME=printf
5135         else
5136           PROG_NAME=printf
5137         fi
5138         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5139 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5140         as_fn_error $? "Cannot continue" "$LINENO" 5
5141     fi
5142 
5143 
5144 
5145     for ac_prog in pwd
5146 do
5147   # Extract the first word of "$ac_prog", so it can be a program name with args.
5148 set dummy $ac_prog; ac_word=$2
5149 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5150 $as_echo_n "checking for $ac_word... " >&6; }
5151 if ${ac_cv_path_THEPWDCMD+:} false; then :
5152   $as_echo_n "(cached) " >&6
5153 else
5154   case $THEPWDCMD in
5155   [\\/]* | ?:[\\/]*)
5156   ac_cv_path_THEPWDCMD="$THEPWDCMD" # Let the user override the test with a path.
5157   ;;
5158   *)
5159   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5160 for as_dir in $PATH
5161 do
5162   IFS=$as_save_IFS
5163   test -z "$as_dir" && as_dir=.
5164     for ac_exec_ext in '' $ac_executable_extensions; do
5165   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5166     ac_cv_path_THEPWDCMD="$as_dir/$ac_word$ac_exec_ext"
5167     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5168     break 2
5169   fi
5170 done
5171   done
5172 IFS=$as_save_IFS
5173 
5174   ;;
5175 esac
5176 fi
5177 THEPWDCMD=$ac_cv_path_THEPWDCMD
5178 if test -n "$THEPWDCMD"; then
5179   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $THEPWDCMD" >&5
5180 $as_echo "$THEPWDCMD" >&6; }
5181 else
5182   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5183 $as_echo "no" >&6; }
5184 fi
5185 
5186 
5187   test -n "$THEPWDCMD" && break
5188 done
5189 
5190 
5191     if test "x$THEPWDCMD" = x; then
5192         if test "xpwd" = x; then
5193           PROG_NAME=thepwdcmd
5194         else
5195           PROG_NAME=pwd
5196         fi
5197         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5198 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5199         as_fn_error $? "Cannot continue" "$LINENO" 5
5200     fi
5201 
5202 
5203 
5204     for ac_prog in rm
5205 do
5206   # Extract the first word of "$ac_prog", so it can be a program name with args.
5207 set dummy $ac_prog; ac_word=$2
5208 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5209 $as_echo_n "checking for $ac_word... " >&6; }
5210 if ${ac_cv_path_RM+:} false; then :
5211   $as_echo_n "(cached) " >&6
5212 else
5213   case $RM in
5214   [\\/]* | ?:[\\/]*)
5215   ac_cv_path_RM="$RM" # Let the user override the test with a path.
5216   ;;
5217   *)
5218   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5219 for as_dir in $PATH
5220 do
5221   IFS=$as_save_IFS
5222   test -z "$as_dir" && as_dir=.
5223     for ac_exec_ext in '' $ac_executable_extensions; do
5224   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5225     ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
5226     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5227     break 2
5228   fi
5229 done
5230   done
5231 IFS=$as_save_IFS
5232 
5233   ;;
5234 esac
5235 fi
5236 RM=$ac_cv_path_RM
5237 if test -n "$RM"; then
5238   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
5239 $as_echo "$RM" >&6; }
5240 else
5241   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5242 $as_echo "no" >&6; }
5243 fi
5244 
5245 
5246   test -n "$RM" && break
5247 done
5248 
5249 
5250     if test "x$RM" = x; then
5251         if test "xrm" = x; then
5252           PROG_NAME=rm
5253         else
5254           PROG_NAME=rm
5255         fi
5256         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5257 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5258         as_fn_error $? "Cannot continue" "$LINENO" 5
5259     fi
5260 
5261 
5262 
5263     for ac_prog in sh
5264 do
5265   # Extract the first word of "$ac_prog", so it can be a program name with args.
5266 set dummy $ac_prog; ac_word=$2
5267 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5268 $as_echo_n "checking for $ac_word... " >&6; }
5269 if ${ac_cv_path_SH+:} false; then :
5270   $as_echo_n "(cached) " >&6
5271 else
5272   case $SH in
5273   [\\/]* | ?:[\\/]*)
5274   ac_cv_path_SH="$SH" # Let the user override the test with a path.
5275   ;;
5276   *)
5277   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5278 for as_dir in $PATH
5279 do
5280   IFS=$as_save_IFS
5281   test -z "$as_dir" && as_dir=.
5282     for ac_exec_ext in '' $ac_executable_extensions; do
5283   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5284     ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
5285     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5286     break 2
5287   fi
5288 done
5289   done
5290 IFS=$as_save_IFS
5291 
5292   ;;
5293 esac
5294 fi
5295 SH=$ac_cv_path_SH
5296 if test -n "$SH"; then
5297   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
5298 $as_echo "$SH" >&6; }
5299 else
5300   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5301 $as_echo "no" >&6; }
5302 fi
5303 
5304 
5305   test -n "$SH" && break
5306 done
5307 
5308 
5309     if test "x$SH" = x; then
5310         if test "xsh" = x; then
5311           PROG_NAME=sh
5312         else
5313           PROG_NAME=sh
5314         fi
5315         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5316 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5317         as_fn_error $? "Cannot continue" "$LINENO" 5
5318     fi
5319 
5320 
5321 
5322     for ac_prog in sort
5323 do
5324   # Extract the first word of "$ac_prog", so it can be a program name with args.
5325 set dummy $ac_prog; ac_word=$2
5326 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5327 $as_echo_n "checking for $ac_word... " >&6; }
5328 if ${ac_cv_path_SORT+:} false; then :
5329   $as_echo_n "(cached) " >&6
5330 else
5331   case $SORT in
5332   [\\/]* | ?:[\\/]*)
5333   ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
5334   ;;
5335   *)
5336   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5337 for as_dir in $PATH
5338 do
5339   IFS=$as_save_IFS
5340   test -z "$as_dir" && as_dir=.
5341     for ac_exec_ext in '' $ac_executable_extensions; do
5342   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5343     ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
5344     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5345     break 2
5346   fi
5347 done
5348   done
5349 IFS=$as_save_IFS
5350 
5351   ;;
5352 esac
5353 fi
5354 SORT=$ac_cv_path_SORT
5355 if test -n "$SORT"; then
5356   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
5357 $as_echo "$SORT" >&6; }
5358 else
5359   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5360 $as_echo "no" >&6; }
5361 fi
5362 
5363 
5364   test -n "$SORT" && break
5365 done
5366 
5367 
5368     if test "x$SORT" = x; then
5369         if test "xsort" = x; then
5370           PROG_NAME=sort
5371         else
5372           PROG_NAME=sort
5373         fi
5374         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5375 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5376         as_fn_error $? "Cannot continue" "$LINENO" 5
5377     fi
5378 
5379 
5380 
5381     for ac_prog in tail
5382 do
5383   # Extract the first word of "$ac_prog", so it can be a program name with args.
5384 set dummy $ac_prog; ac_word=$2
5385 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5386 $as_echo_n "checking for $ac_word... " >&6; }
5387 if ${ac_cv_path_TAIL+:} false; then :
5388   $as_echo_n "(cached) " >&6
5389 else
5390   case $TAIL in
5391   [\\/]* | ?:[\\/]*)
5392   ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
5393   ;;
5394   *)
5395   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5396 for as_dir in $PATH
5397 do
5398   IFS=$as_save_IFS
5399   test -z "$as_dir" && as_dir=.
5400     for ac_exec_ext in '' $ac_executable_extensions; do
5401   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5402     ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
5403     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5404     break 2
5405   fi
5406 done
5407   done
5408 IFS=$as_save_IFS
5409 
5410   ;;
5411 esac
5412 fi
5413 TAIL=$ac_cv_path_TAIL
5414 if test -n "$TAIL"; then
5415   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
5416 $as_echo "$TAIL" >&6; }
5417 else
5418   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5419 $as_echo "no" >&6; }
5420 fi
5421 
5422 
5423   test -n "$TAIL" && break
5424 done
5425 
5426 
5427     if test "x$TAIL" = x; then
5428         if test "xtail" = x; then
5429           PROG_NAME=tail
5430         else
5431           PROG_NAME=tail
5432         fi
5433         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5434 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5435         as_fn_error $? "Cannot continue" "$LINENO" 5
5436     fi
5437 
5438 
5439 
5440     for ac_prog in tar
5441 do
5442   # Extract the first word of "$ac_prog", so it can be a program name with args.
5443 set dummy $ac_prog; ac_word=$2
5444 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5445 $as_echo_n "checking for $ac_word... " >&6; }
5446 if ${ac_cv_path_TAR+:} false; then :
5447   $as_echo_n "(cached) " >&6
5448 else
5449   case $TAR in
5450   [\\/]* | ?:[\\/]*)
5451   ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
5452   ;;
5453   *)
5454   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5455 for as_dir in $PATH
5456 do
5457   IFS=$as_save_IFS
5458   test -z "$as_dir" && as_dir=.
5459     for ac_exec_ext in '' $ac_executable_extensions; do
5460   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5461     ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
5462     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5463     break 2
5464   fi
5465 done
5466   done
5467 IFS=$as_save_IFS
5468 
5469   ;;
5470 esac
5471 fi
5472 TAR=$ac_cv_path_TAR
5473 if test -n "$TAR"; then
5474   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
5475 $as_echo "$TAR" >&6; }
5476 else
5477   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5478 $as_echo "no" >&6; }
5479 fi
5480 
5481 
5482   test -n "$TAR" && break
5483 done
5484 
5485 
5486     if test "x$TAR" = x; then
5487         if test "xtar" = x; then
5488           PROG_NAME=tar
5489         else
5490           PROG_NAME=tar
5491         fi
5492         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5493 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5494         as_fn_error $? "Cannot continue" "$LINENO" 5
5495     fi
5496 
5497 
5498 
5499     for ac_prog in tee
5500 do
5501   # Extract the first word of "$ac_prog", so it can be a program name with args.
5502 set dummy $ac_prog; ac_word=$2
5503 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5504 $as_echo_n "checking for $ac_word... " >&6; }
5505 if ${ac_cv_path_TEE+:} false; then :
5506   $as_echo_n "(cached) " >&6
5507 else
5508   case $TEE in
5509   [\\/]* | ?:[\\/]*)
5510   ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
5511   ;;
5512   *)
5513   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5514 for as_dir in $PATH
5515 do
5516   IFS=$as_save_IFS
5517   test -z "$as_dir" && as_dir=.
5518     for ac_exec_ext in '' $ac_executable_extensions; do
5519   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5520     ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
5521     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5522     break 2
5523   fi
5524 done
5525   done
5526 IFS=$as_save_IFS
5527 
5528   ;;
5529 esac
5530 fi
5531 TEE=$ac_cv_path_TEE
5532 if test -n "$TEE"; then
5533   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
5534 $as_echo "$TEE" >&6; }
5535 else
5536   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5537 $as_echo "no" >&6; }
5538 fi
5539 
5540 
5541   test -n "$TEE" && break
5542 done
5543 
5544 
5545     if test "x$TEE" = x; then
5546         if test "xtee" = x; then
5547           PROG_NAME=tee
5548         else
5549           PROG_NAME=tee
5550         fi
5551         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5552 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5553         as_fn_error $? "Cannot continue" "$LINENO" 5
5554     fi
5555 
5556 
5557 
5558     for ac_prog in touch
5559 do
5560   # Extract the first word of "$ac_prog", so it can be a program name with args.
5561 set dummy $ac_prog; ac_word=$2
5562 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5563 $as_echo_n "checking for $ac_word... " >&6; }
5564 if ${ac_cv_path_TOUCH+:} false; then :
5565   $as_echo_n "(cached) " >&6
5566 else
5567   case $TOUCH in
5568   [\\/]* | ?:[\\/]*)
5569   ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
5570   ;;
5571   *)
5572   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5573 for as_dir in $PATH
5574 do
5575   IFS=$as_save_IFS
5576   test -z "$as_dir" && as_dir=.
5577     for ac_exec_ext in '' $ac_executable_extensions; do
5578   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5579     ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
5580     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5581     break 2
5582   fi
5583 done
5584   done
5585 IFS=$as_save_IFS
5586 
5587   ;;
5588 esac
5589 fi
5590 TOUCH=$ac_cv_path_TOUCH
5591 if test -n "$TOUCH"; then
5592   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
5593 $as_echo "$TOUCH" >&6; }
5594 else
5595   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5596 $as_echo "no" >&6; }
5597 fi
5598 
5599 
5600   test -n "$TOUCH" && break
5601 done
5602 
5603 
5604     if test "x$TOUCH" = x; then
5605         if test "xtouch" = x; then
5606           PROG_NAME=touch
5607         else
5608           PROG_NAME=touch
5609         fi
5610         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5611 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5612         as_fn_error $? "Cannot continue" "$LINENO" 5
5613     fi
5614 
5615 
5616 
5617     for ac_prog in tr
5618 do
5619   # Extract the first word of "$ac_prog", so it can be a program name with args.
5620 set dummy $ac_prog; ac_word=$2
5621 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5622 $as_echo_n "checking for $ac_word... " >&6; }
5623 if ${ac_cv_path_TR+:} false; then :
5624   $as_echo_n "(cached) " >&6
5625 else
5626   case $TR in
5627   [\\/]* | ?:[\\/]*)
5628   ac_cv_path_TR="$TR" # Let the user override the test with a path.
5629   ;;
5630   *)
5631   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5632 for as_dir in $PATH
5633 do
5634   IFS=$as_save_IFS
5635   test -z "$as_dir" && as_dir=.
5636     for ac_exec_ext in '' $ac_executable_extensions; do
5637   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5638     ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
5639     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5640     break 2
5641   fi
5642 done
5643   done
5644 IFS=$as_save_IFS
5645 
5646   ;;
5647 esac
5648 fi
5649 TR=$ac_cv_path_TR
5650 if test -n "$TR"; then
5651   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
5652 $as_echo "$TR" >&6; }
5653 else
5654   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5655 $as_echo "no" >&6; }
5656 fi
5657 
5658 
5659   test -n "$TR" && break
5660 done
5661 
5662 
5663     if test "x$TR" = x; then
5664         if test "xtr" = x; then
5665           PROG_NAME=tr
5666         else
5667           PROG_NAME=tr
5668         fi
5669         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5670 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5671         as_fn_error $? "Cannot continue" "$LINENO" 5
5672     fi
5673 
5674 
5675 
5676     for ac_prog in uname
5677 do
5678   # Extract the first word of "$ac_prog", so it can be a program name with args.
5679 set dummy $ac_prog; ac_word=$2
5680 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5681 $as_echo_n "checking for $ac_word... " >&6; }
5682 if ${ac_cv_path_UNAME+:} false; then :
5683   $as_echo_n "(cached) " >&6
5684 else
5685   case $UNAME in
5686   [\\/]* | ?:[\\/]*)
5687   ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
5688   ;;
5689   *)
5690   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5691 for as_dir in $PATH
5692 do
5693   IFS=$as_save_IFS
5694   test -z "$as_dir" && as_dir=.
5695     for ac_exec_ext in '' $ac_executable_extensions; do
5696   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5697     ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
5698     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5699     break 2
5700   fi
5701 done
5702   done
5703 IFS=$as_save_IFS
5704 
5705   ;;
5706 esac
5707 fi
5708 UNAME=$ac_cv_path_UNAME
5709 if test -n "$UNAME"; then
5710   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
5711 $as_echo "$UNAME" >&6; }
5712 else
5713   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5714 $as_echo "no" >&6; }
5715 fi
5716 
5717 
5718   test -n "$UNAME" && break
5719 done
5720 
5721 
5722     if test "x$UNAME" = x; then
5723         if test "xuname" = x; then
5724           PROG_NAME=uname
5725         else
5726           PROG_NAME=uname
5727         fi
5728         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5729 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5730         as_fn_error $? "Cannot continue" "$LINENO" 5
5731     fi
5732 
5733 
5734 
5735     for ac_prog in uniq
5736 do
5737   # Extract the first word of "$ac_prog", so it can be a program name with args.
5738 set dummy $ac_prog; ac_word=$2
5739 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5740 $as_echo_n "checking for $ac_word... " >&6; }
5741 if ${ac_cv_path_UNIQ+:} false; then :
5742   $as_echo_n "(cached) " >&6
5743 else
5744   case $UNIQ in
5745   [\\/]* | ?:[\\/]*)
5746   ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
5747   ;;
5748   *)
5749   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5750 for as_dir in $PATH
5751 do
5752   IFS=$as_save_IFS
5753   test -z "$as_dir" && as_dir=.
5754     for ac_exec_ext in '' $ac_executable_extensions; do
5755   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5756     ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
5757     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5758     break 2
5759   fi
5760 done
5761   done
5762 IFS=$as_save_IFS
5763 
5764   ;;
5765 esac
5766 fi
5767 UNIQ=$ac_cv_path_UNIQ
5768 if test -n "$UNIQ"; then
5769   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
5770 $as_echo "$UNIQ" >&6; }
5771 else
5772   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5773 $as_echo "no" >&6; }
5774 fi
5775 
5776 
5777   test -n "$UNIQ" && break
5778 done
5779 
5780 
5781     if test "x$UNIQ" = x; then
5782         if test "xuniq" = x; then
5783           PROG_NAME=uniq
5784         else
5785           PROG_NAME=uniq
5786         fi
5787         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5788 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5789         as_fn_error $? "Cannot continue" "$LINENO" 5
5790     fi
5791 
5792 
5793 
5794     for ac_prog in wc
5795 do
5796   # Extract the first word of "$ac_prog", so it can be a program name with args.
5797 set dummy $ac_prog; ac_word=$2
5798 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5799 $as_echo_n "checking for $ac_word... " >&6; }
5800 if ${ac_cv_path_WC+:} false; then :
5801   $as_echo_n "(cached) " >&6
5802 else
5803   case $WC in
5804   [\\/]* | ?:[\\/]*)
5805   ac_cv_path_WC="$WC" # Let the user override the test with a path.
5806   ;;
5807   *)
5808   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5809 for as_dir in $PATH
5810 do
5811   IFS=$as_save_IFS
5812   test -z "$as_dir" && as_dir=.
5813     for ac_exec_ext in '' $ac_executable_extensions; do
5814   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5815     ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
5816     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5817     break 2
5818   fi
5819 done
5820   done
5821 IFS=$as_save_IFS
5822 
5823   ;;
5824 esac
5825 fi
5826 WC=$ac_cv_path_WC
5827 if test -n "$WC"; then
5828   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
5829 $as_echo "$WC" >&6; }
5830 else
5831   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5832 $as_echo "no" >&6; }
5833 fi
5834 
5835 
5836   test -n "$WC" && break
5837 done
5838 
5839 
5840     if test "x$WC" = x; then
5841         if test "xwc" = x; then
5842           PROG_NAME=wc
5843         else
5844           PROG_NAME=wc
5845         fi
5846         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5847 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5848         as_fn_error $? "Cannot continue" "$LINENO" 5
5849     fi
5850 
5851 
5852 
5853     for ac_prog in which
5854 do
5855   # Extract the first word of "$ac_prog", so it can be a program name with args.
5856 set dummy $ac_prog; ac_word=$2
5857 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5858 $as_echo_n "checking for $ac_word... " >&6; }
5859 if ${ac_cv_path_WHICH+:} false; then :
5860   $as_echo_n "(cached) " >&6
5861 else
5862   case $WHICH in
5863   [\\/]* | ?:[\\/]*)
5864   ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
5865   ;;
5866   *)
5867   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5868 for as_dir in $PATH
5869 do
5870   IFS=$as_save_IFS
5871   test -z "$as_dir" && as_dir=.
5872     for ac_exec_ext in '' $ac_executable_extensions; do
5873   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5874     ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
5875     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5876     break 2
5877   fi
5878 done
5879   done
5880 IFS=$as_save_IFS
5881 
5882   ;;
5883 esac
5884 fi
5885 WHICH=$ac_cv_path_WHICH
5886 if test -n "$WHICH"; then
5887   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
5888 $as_echo "$WHICH" >&6; }
5889 else
5890   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5891 $as_echo "no" >&6; }
5892 fi
5893 
5894 
5895   test -n "$WHICH" && break
5896 done
5897 
5898 
5899     if test "x$WHICH" = x; then
5900         if test "xwhich" = x; then
5901           PROG_NAME=which
5902         else
5903           PROG_NAME=which
5904         fi
5905         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5906 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5907         as_fn_error $? "Cannot continue" "$LINENO" 5
5908     fi
5909 
5910 
5911 
5912     for ac_prog in xargs
5913 do
5914   # Extract the first word of "$ac_prog", so it can be a program name with args.
5915 set dummy $ac_prog; ac_word=$2
5916 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5917 $as_echo_n "checking for $ac_word... " >&6; }
5918 if ${ac_cv_path_XARGS+:} false; then :
5919   $as_echo_n "(cached) " >&6
5920 else
5921   case $XARGS in
5922   [\\/]* | ?:[\\/]*)
5923   ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
5924   ;;
5925   *)
5926   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5927 for as_dir in $PATH
5928 do
5929   IFS=$as_save_IFS
5930   test -z "$as_dir" && as_dir=.
5931     for ac_exec_ext in '' $ac_executable_extensions; do
5932   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5933     ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
5934     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5935     break 2
5936   fi
5937 done
5938   done
5939 IFS=$as_save_IFS
5940 
5941   ;;
5942 esac
5943 fi
5944 XARGS=$ac_cv_path_XARGS
5945 if test -n "$XARGS"; then
5946   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
5947 $as_echo "$XARGS" >&6; }
5948 else
5949   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5950 $as_echo "no" >&6; }
5951 fi
5952 
5953 
5954   test -n "$XARGS" && break
5955 done
5956 
5957 
5958     if test "x$XARGS" = x; then
5959         if test "xxargs" = x; then
5960           PROG_NAME=xargs
5961         else
5962           PROG_NAME=xargs
5963         fi
5964         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5965 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5966         as_fn_error $? "Cannot continue" "$LINENO" 5
5967     fi
5968 
5969 
5970 
5971 # Then required tools that require some special treatment.
5972 for ac_prog in gawk mawk nawk awk
5973 do
5974   # Extract the first word of "$ac_prog", so it can be a program name with args.
5975 set dummy $ac_prog; ac_word=$2
5976 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5977 $as_echo_n "checking for $ac_word... " >&6; }
5978 if ${ac_cv_prog_AWK+:} false; then :
5979   $as_echo_n "(cached) " >&6
5980 else
5981   if test -n "$AWK"; then
5982   ac_cv_prog_AWK="$AWK" # Let the user override the test.
5983 else
5984 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5985 for as_dir in $PATH
5986 do
5987   IFS=$as_save_IFS
5988   test -z "$as_dir" && as_dir=.
5989     for ac_exec_ext in '' $ac_executable_extensions; do
5990   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5991     ac_cv_prog_AWK="$ac_prog"
5992     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5993     break 2
5994   fi
5995 done
5996   done
5997 IFS=$as_save_IFS
5998 
5999 fi
6000 fi
6001 AWK=$ac_cv_prog_AWK
6002 if test -n "$AWK"; then
6003   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
6004 $as_echo "$AWK" >&6; }
6005 else
6006   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6007 $as_echo "no" >&6; }
6008 fi
6009 
6010 
6011   test -n "$AWK" && break
6012 done
6013 
6014 
6015     if test "x$AWK" = x; then
6016         if test "x" = x; then
6017           PROG_NAME=awk
6018         else
6019           PROG_NAME=
6020         fi
6021         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6022 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6023         as_fn_error $? "Cannot continue" "$LINENO" 5
6024     fi
6025 
6026 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
6027 $as_echo_n "checking for grep that handles long lines and -e... " >&6; }
6028 if ${ac_cv_path_GREP+:} false; then :
6029   $as_echo_n "(cached) " >&6
6030 else
6031   if test -z "$GREP"; then
6032   ac_path_GREP_found=false
6033   # Loop through the user's path and test for each of PROGNAME-LIST
6034   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6035 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
6036 do
6037   IFS=$as_save_IFS
6038   test -z "$as_dir" && as_dir=.
6039     for ac_prog in grep ggrep; do
6040     for ac_exec_ext in '' $ac_executable_extensions; do
6041       ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
6042       { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
6043 # Check for GNU ac_path_GREP and select it if it is found.
6044   # Check for GNU $ac_path_GREP
6045 case `"$ac_path_GREP" --version 2>&1` in
6046 *GNU*)
6047   ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
6048 *)
6049   ac_count=0
6050   $as_echo_n 0123456789 >"conftest.in"
6051   while :
6052   do
6053     cat "conftest.in" "conftest.in" >"conftest.tmp"
6054     mv "conftest.tmp" "conftest.in"
6055     cp "conftest.in" "conftest.nl"
6056     $as_echo 'GREP' >> "conftest.nl"
6057     "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
6058     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6059     as_fn_arith $ac_count + 1 && ac_count=$as_val
6060     if test $ac_count -gt ${ac_path_GREP_max-0}; then
6061       # Best one so far, save it but keep looking for a better one
6062       ac_cv_path_GREP="$ac_path_GREP"
6063       ac_path_GREP_max=$ac_count
6064     fi
6065     # 10*(2^10) chars as input seems more than enough
6066     test $ac_count -gt 10 && break
6067   done
6068   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6069 esac
6070 
6071       $ac_path_GREP_found && break 3
6072     done
6073   done
6074   done
6075 IFS=$as_save_IFS
6076   if test -z "$ac_cv_path_GREP"; then
6077     as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
6078   fi
6079 else
6080   ac_cv_path_GREP=$GREP
6081 fi
6082 
6083 fi
6084 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
6085 $as_echo "$ac_cv_path_GREP" >&6; }
6086  GREP="$ac_cv_path_GREP"
6087 
6088 
6089 
6090     if test "x$GREP" = x; then
6091         if test "x" = x; then
6092           PROG_NAME=grep
6093         else
6094           PROG_NAME=
6095         fi
6096         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6097 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6098         as_fn_error $? "Cannot continue" "$LINENO" 5
6099     fi
6100 
6101 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
6102 $as_echo_n "checking for egrep... " >&6; }
6103 if ${ac_cv_path_EGREP+:} false; then :
6104   $as_echo_n "(cached) " >&6
6105 else
6106   if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
6107    then ac_cv_path_EGREP="$GREP -E"
6108    else
6109      if test -z "$EGREP"; then
6110   ac_path_EGREP_found=false
6111   # Loop through the user's path and test for each of PROGNAME-LIST
6112   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6113 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
6114 do
6115   IFS=$as_save_IFS
6116   test -z "$as_dir" && as_dir=.
6117     for ac_prog in egrep; do
6118     for ac_exec_ext in '' $ac_executable_extensions; do
6119       ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
6120       { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
6121 # Check for GNU ac_path_EGREP and select it if it is found.
6122   # Check for GNU $ac_path_EGREP
6123 case `"$ac_path_EGREP" --version 2>&1` in
6124 *GNU*)
6125   ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
6126 *)
6127   ac_count=0
6128   $as_echo_n 0123456789 >"conftest.in"
6129   while :
6130   do
6131     cat "conftest.in" "conftest.in" >"conftest.tmp"
6132     mv "conftest.tmp" "conftest.in"
6133     cp "conftest.in" "conftest.nl"
6134     $as_echo 'EGREP' >> "conftest.nl"
6135     "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
6136     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6137     as_fn_arith $ac_count + 1 && ac_count=$as_val
6138     if test $ac_count -gt ${ac_path_EGREP_max-0}; then
6139       # Best one so far, save it but keep looking for a better one
6140       ac_cv_path_EGREP="$ac_path_EGREP"
6141       ac_path_EGREP_max=$ac_count
6142     fi
6143     # 10*(2^10) chars as input seems more than enough
6144     test $ac_count -gt 10 && break
6145   done
6146   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6147 esac
6148 
6149       $ac_path_EGREP_found && break 3
6150     done
6151   done
6152   done
6153 IFS=$as_save_IFS
6154   if test -z "$ac_cv_path_EGREP"; then
6155     as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
6156   fi
6157 else
6158   ac_cv_path_EGREP=$EGREP
6159 fi
6160 
6161    fi
6162 fi
6163 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
6164 $as_echo "$ac_cv_path_EGREP" >&6; }
6165  EGREP="$ac_cv_path_EGREP"
6166 
6167 
6168 
6169     if test "x$EGREP" = x; then
6170         if test "x" = x; then
6171           PROG_NAME=egrep
6172         else
6173           PROG_NAME=
6174         fi
6175         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6176 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6177         as_fn_error $? "Cannot continue" "$LINENO" 5
6178     fi
6179 
6180 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
6181 $as_echo_n "checking for fgrep... " >&6; }
6182 if ${ac_cv_path_FGREP+:} false; then :
6183   $as_echo_n "(cached) " >&6
6184 else
6185   if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
6186    then ac_cv_path_FGREP="$GREP -F"
6187    else
6188      if test -z "$FGREP"; then
6189   ac_path_FGREP_found=false
6190   # Loop through the user's path and test for each of PROGNAME-LIST
6191   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6192 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
6193 do
6194   IFS=$as_save_IFS
6195   test -z "$as_dir" && as_dir=.
6196     for ac_prog in fgrep; do
6197     for ac_exec_ext in '' $ac_executable_extensions; do
6198       ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
6199       { test -f "$ac_path_FGREP" && $as_test_x "$ac_path_FGREP"; } || continue
6200 # Check for GNU ac_path_FGREP and select it if it is found.
6201   # Check for GNU $ac_path_FGREP
6202 case `"$ac_path_FGREP" --version 2>&1` in
6203 *GNU*)
6204   ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
6205 *)
6206   ac_count=0
6207   $as_echo_n 0123456789 >"conftest.in"
6208   while :
6209   do
6210     cat "conftest.in" "conftest.in" >"conftest.tmp"
6211     mv "conftest.tmp" "conftest.in"
6212     cp "conftest.in" "conftest.nl"
6213     $as_echo 'FGREP' >> "conftest.nl"
6214     "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
6215     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6216     as_fn_arith $ac_count + 1 && ac_count=$as_val
6217     if test $ac_count -gt ${ac_path_FGREP_max-0}; then
6218       # Best one so far, save it but keep looking for a better one
6219       ac_cv_path_FGREP="$ac_path_FGREP"
6220       ac_path_FGREP_max=$ac_count
6221     fi
6222     # 10*(2^10) chars as input seems more than enough
6223     test $ac_count -gt 10 && break
6224   done
6225   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6226 esac
6227 
6228       $ac_path_FGREP_found && break 3
6229     done
6230   done
6231   done
6232 IFS=$as_save_IFS
6233   if test -z "$ac_cv_path_FGREP"; then
6234     as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
6235   fi
6236 else
6237   ac_cv_path_FGREP=$FGREP
6238 fi
6239 
6240    fi
6241 fi
6242 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
6243 $as_echo "$ac_cv_path_FGREP" >&6; }
6244  FGREP="$ac_cv_path_FGREP"
6245 
6246 
6247 
6248     if test "x$FGREP" = x; then
6249         if test "x" = x; then
6250           PROG_NAME=fgrep
6251         else
6252           PROG_NAME=
6253         fi
6254         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6255 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6256         as_fn_error $? "Cannot continue" "$LINENO" 5
6257     fi
6258 
6259 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
6260 $as_echo_n "checking for a sed that does not truncate output... " >&6; }
6261 if ${ac_cv_path_SED+:} false; then :
6262   $as_echo_n "(cached) " >&6
6263 else
6264             ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
6265      for ac_i in 1 2 3 4 5 6 7; do
6266        ac_script="$ac_script$as_nl$ac_script"
6267      done
6268      echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
6269      { ac_script=; unset ac_script;}
6270      if test -z "$SED"; then
6271   ac_path_SED_found=false
6272   # Loop through the user's path and test for each of PROGNAME-LIST
6273   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6274 for as_dir in $PATH
6275 do
6276   IFS=$as_save_IFS
6277   test -z "$as_dir" && as_dir=.
6278     for ac_prog in sed gsed; do
6279     for ac_exec_ext in '' $ac_executable_extensions; do
6280       ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
6281       { test -f "$ac_path_SED" && $as_test_x "$ac_path_SED"; } || continue
6282 # Check for GNU ac_path_SED and select it if it is found.
6283   # Check for GNU $ac_path_SED
6284 case `"$ac_path_SED" --version 2>&1` in
6285 *GNU*)
6286   ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
6287 *)
6288   ac_count=0
6289   $as_echo_n 0123456789 >"conftest.in"
6290   while :
6291   do
6292     cat "conftest.in" "conftest.in" >"conftest.tmp"
6293     mv "conftest.tmp" "conftest.in"
6294     cp "conftest.in" "conftest.nl"
6295     $as_echo '' >> "conftest.nl"
6296     "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
6297     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6298     as_fn_arith $ac_count + 1 && ac_count=$as_val
6299     if test $ac_count -gt ${ac_path_SED_max-0}; then
6300       # Best one so far, save it but keep looking for a better one
6301       ac_cv_path_SED="$ac_path_SED"
6302       ac_path_SED_max=$ac_count
6303     fi
6304     # 10*(2^10) chars as input seems more than enough
6305     test $ac_count -gt 10 && break
6306   done
6307   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6308 esac
6309 
6310       $ac_path_SED_found && break 3
6311     done
6312   done
6313   done
6314 IFS=$as_save_IFS
6315   if test -z "$ac_cv_path_SED"; then
6316     as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
6317   fi
6318 else
6319   ac_cv_path_SED=$SED
6320 fi
6321 
6322 fi
6323 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
6324 $as_echo "$ac_cv_path_SED" >&6; }
6325  SED="$ac_cv_path_SED"
6326   rm -f conftest.sed
6327 
6328 
6329     if test "x$SED" = x; then
6330         if test "x" = x; then
6331           PROG_NAME=sed
6332         else
6333           PROG_NAME=
6334         fi
6335         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6336 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6337         as_fn_error $? "Cannot continue" "$LINENO" 5
6338     fi
6339 
6340 
6341 for ac_prog in nawk gawk awk
6342 do
6343   # Extract the first word of "$ac_prog", so it can be a program name with args.
6344 set dummy $ac_prog; ac_word=$2
6345 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6346 $as_echo_n "checking for $ac_word... " >&6; }
6347 if ${ac_cv_path_NAWK+:} false; then :
6348   $as_echo_n "(cached) " >&6
6349 else
6350   case $NAWK in
6351   [\\/]* | ?:[\\/]*)
6352   ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
6353   ;;
6354   *)
6355   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6356 for as_dir in $PATH
6357 do
6358   IFS=$as_save_IFS
6359   test -z "$as_dir" && as_dir=.
6360     for ac_exec_ext in '' $ac_executable_extensions; do
6361   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6362     ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
6363     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6364     break 2
6365   fi
6366 done
6367   done
6368 IFS=$as_save_IFS
6369 
6370   ;;
6371 esac
6372 fi
6373 NAWK=$ac_cv_path_NAWK
6374 if test -n "$NAWK"; then
6375   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
6376 $as_echo "$NAWK" >&6; }
6377 else
6378   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6379 $as_echo "no" >&6; }
6380 fi
6381 
6382 
6383   test -n "$NAWK" && break
6384 done
6385 
6386 
6387     if test "x$NAWK" = x; then
6388         if test "x" = x; then
6389           PROG_NAME=nawk
6390         else
6391           PROG_NAME=
6392         fi
6393         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6394 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6395         as_fn_error $? "Cannot continue" "$LINENO" 5
6396     fi
6397 
6398 
6399 # Always force rm.
6400 RM="$RM -f"
6401 
6402 # These are not required on all platforms
6403 # Extract the first word of "cygpath", so it can be a program name with args.
6404 set dummy cygpath; ac_word=$2
6405 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6406 $as_echo_n "checking for $ac_word... " >&6; }
6407 if ${ac_cv_path_CYGPATH+:} false; then :
6408   $as_echo_n "(cached) " >&6
6409 else
6410   case $CYGPATH in
6411   [\\/]* | ?:[\\/]*)
6412   ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
6413   ;;
6414   *)
6415   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6416 for as_dir in $PATH
6417 do
6418   IFS=$as_save_IFS
6419   test -z "$as_dir" && as_dir=.
6420     for ac_exec_ext in '' $ac_executable_extensions; do
6421   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6422     ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
6423     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6424     break 2
6425   fi
6426 done
6427   done
6428 IFS=$as_save_IFS
6429 
6430   ;;
6431 esac
6432 fi
6433 CYGPATH=$ac_cv_path_CYGPATH
6434 if test -n "$CYGPATH"; then
6435   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
6436 $as_echo "$CYGPATH" >&6; }
6437 else
6438   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6439 $as_echo "no" >&6; }
6440 fi
6441 
6442 
6443 # Extract the first word of "readlink", so it can be a program name with args.
6444 set dummy readlink; ac_word=$2
6445 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6446 $as_echo_n "checking for $ac_word... " >&6; }
6447 if ${ac_cv_path_READLINK+:} false; then :
6448   $as_echo_n "(cached) " >&6
6449 else
6450   case $READLINK in
6451   [\\/]* | ?:[\\/]*)
6452   ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
6453   ;;
6454   *)
6455   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6456 for as_dir in $PATH
6457 do
6458   IFS=$as_save_IFS
6459   test -z "$as_dir" && as_dir=.
6460     for ac_exec_ext in '' $ac_executable_extensions; do
6461   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6462     ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
6463     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6464     break 2
6465   fi
6466 done
6467   done
6468 IFS=$as_save_IFS
6469 
6470   ;;
6471 esac
6472 fi
6473 READLINK=$ac_cv_path_READLINK
6474 if test -n "$READLINK"; then
6475   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
6476 $as_echo "$READLINK" >&6; }
6477 else
6478   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6479 $as_echo "no" >&6; }
6480 fi
6481 
6482 
6483 # Extract the first word of "df", so it can be a program name with args.
6484 set dummy df; ac_word=$2
6485 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6486 $as_echo_n "checking for $ac_word... " >&6; }
6487 if ${ac_cv_path_DF+:} false; then :
6488   $as_echo_n "(cached) " >&6
6489 else
6490   case $DF in
6491   [\\/]* | ?:[\\/]*)
6492   ac_cv_path_DF="$DF" # Let the user override the test with a path.
6493   ;;
6494   *)
6495   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6496 for as_dir in $PATH
6497 do
6498   IFS=$as_save_IFS
6499   test -z "$as_dir" && as_dir=.
6500     for ac_exec_ext in '' $ac_executable_extensions; do
6501   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6502     ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
6503     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6504     break 2
6505   fi
6506 done
6507   done
6508 IFS=$as_save_IFS
6509 
6510   ;;
6511 esac
6512 fi
6513 DF=$ac_cv_path_DF
6514 if test -n "$DF"; then
6515   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
6516 $as_echo "$DF" >&6; }
6517 else
6518   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6519 $as_echo "no" >&6; }
6520 fi
6521 
6522 
6523 # Extract the first word of "SetFile", so it can be a program name with args.
6524 set dummy SetFile; ac_word=$2
6525 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6526 $as_echo_n "checking for $ac_word... " >&6; }
6527 if ${ac_cv_path_SETFILE+:} false; then :
6528   $as_echo_n "(cached) " >&6
6529 else
6530   case $SETFILE in
6531   [\\/]* | ?:[\\/]*)
6532   ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
6533   ;;
6534   *)
6535   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6536 for as_dir in $PATH
6537 do
6538   IFS=$as_save_IFS
6539   test -z "$as_dir" && as_dir=.
6540     for ac_exec_ext in '' $ac_executable_extensions; do
6541   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6542     ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
6543     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6544     break 2
6545   fi
6546 done
6547   done
6548 IFS=$as_save_IFS
6549 
6550   ;;
6551 esac
6552 fi
6553 SETFILE=$ac_cv_path_SETFILE
6554 if test -n "$SETFILE"; then
6555   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
6556 $as_echo "$SETFILE" >&6; }
6557 else
6558   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6559 $as_echo "no" >&6; }
6560 fi
6561 
6562 
6563 
6564 
6565 # Now we can determine OpenJDK build and target platforms. This is required to
6566 # have early on.
6567 # Make sure we can run config.sub.
6568 $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
6569   as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
6570 
6571 { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
6572 $as_echo_n "checking build system type... " >&6; }
6573 if ${ac_cv_build+:} false; then :
6574   $as_echo_n "(cached) " >&6
6575 else
6576   ac_build_alias=$build_alias
6577 test "x$ac_build_alias" = x &&
6578   ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
6579 test "x$ac_build_alias" = x &&
6580   as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
6581 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
6582   as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
6583 
6584 fi
6585 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
6586 $as_echo "$ac_cv_build" >&6; }
6587 case $ac_cv_build in
6588 *-*-*) ;;
6589 *) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
6590 esac
6591 build=$ac_cv_build
6592 ac_save_IFS=$IFS; IFS='-'
6593 set x $ac_cv_build
6594 shift
6595 build_cpu=$1
6596 build_vendor=$2
6597 shift; shift
6598 # Remember, the first character of IFS is used to create $*,
6599 # except with old shells:
6600 build_os=$*
6601 IFS=$ac_save_IFS
6602 case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
6603 
6604 
6605 { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
6606 $as_echo_n "checking host system type... " >&6; }
6607 if ${ac_cv_host+:} false; then :
6608   $as_echo_n "(cached) " >&6
6609 else
6610   if test "x$host_alias" = x; then
6611   ac_cv_host=$ac_cv_build
6612 else
6613   ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
6614     as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
6615 fi
6616 
6617 fi
6618 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
6619 $as_echo "$ac_cv_host" >&6; }
6620 case $ac_cv_host in
6621 *-*-*) ;;
6622 *) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
6623 esac
6624 host=$ac_cv_host
6625 ac_save_IFS=$IFS; IFS='-'
6626 set x $ac_cv_host
6627 shift
6628 host_cpu=$1
6629 host_vendor=$2
6630 shift; shift
6631 # Remember, the first character of IFS is used to create $*,
6632 # except with old shells:
6633 host_os=$*
6634 IFS=$ac_save_IFS
6635 case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
6636 
6637 
6638 { $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
6639 $as_echo_n "checking target system type... " >&6; }
6640 if ${ac_cv_target+:} false; then :
6641   $as_echo_n "(cached) " >&6
6642 else
6643   if test "x$target_alias" = x; then
6644   ac_cv_target=$ac_cv_host
6645 else
6646   ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
6647     as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
6648 fi
6649 
6650 fi
6651 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
6652 $as_echo "$ac_cv_target" >&6; }
6653 case $ac_cv_target in
6654 *-*-*) ;;
6655 *) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
6656 esac
6657 target=$ac_cv_target
6658 ac_save_IFS=$IFS; IFS='-'
6659 set x $ac_cv_target
6660 shift
6661 target_cpu=$1
6662 target_vendor=$2
6663 shift; shift
6664 # Remember, the first character of IFS is used to create $*,
6665 # except with old shells:
6666 target_os=$*
6667 IFS=$ac_save_IFS
6668 case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
6669 
6670 
6671 # The aliases save the names the user supplied, while $host etc.
6672 # will get canonicalized.
6673 test -n "$target_alias" &&
6674   test "$program_prefix$program_suffix$program_transform_name" = \
6675     NONENONEs,x,x, &&
6676   program_prefix=${target_alias}-
6677 
6678 # Figure out the build and target systems. # Note that in autoconf terminology, "build" is obvious, but "target"
6679 # is confusing; it assumes you are cross-compiling a cross-compiler (!)  and "target" is thus the target of the
6680 # product you're building. The target of this build is called "host". Since this is confusing to most people, we
6681 # have not adopted that system, but use "target" as the platform we are building for. In some places though we need
6682 # to use the configure naming style.
6683 
6684 
6685 
6686 
6687 
6688     # Copy the autoconf trip/quadruplet verbatim to OPENJDK_TARGET_AUTOCONF_NAME
6689     # (from the autoconf "host") and OPENJDK_BUILD_AUTOCONF_NAME
6690     # Note that we might later on rewrite e.g. OPENJDK_TARGET_CPU due to reduced build,
6691     # but this will not change the value of OPENJDK_TARGET_AUTOCONF_NAME.
6692     OPENJDK_TARGET_AUTOCONF_NAME="$host"
6693     OPENJDK_BUILD_AUTOCONF_NAME="$build"
6694 
6695 
6696 
6697     # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
6698 
6699   case "$build_os" in
6700     *linux*)
6701       VAR_OS=linux
6702       VAR_OS_API=posix
6703       VAR_OS_ENV=linux
6704       ;;
6705     *solaris*)
6706       VAR_OS=solaris
6707       VAR_OS_API=posix
6708       VAR_OS_ENV=solaris
6709       ;;
6710     *darwin*)
6711       VAR_OS=macosx
6712       VAR_OS_API=posix
6713       VAR_OS_ENV=macosx
6714       ;;
6715     *bsd*)
6716       VAR_OS=bsd
6717       VAR_OS_API=posix
6718       VAR_OS_ENV=bsd
6719       ;;
6720     *cygwin*)
6721       VAR_OS=windows
6722       VAR_OS_API=winapi
6723       VAR_OS_ENV=windows.cygwin
6724       ;;
6725     *mingw*)
6726       VAR_OS=windows
6727       VAR_OS_API=winapi
6728       VAR_OS_ENV=windows.msys
6729       ;;
6730     *)
6731       as_fn_error $? "unsupported operating system $build_os" "$LINENO" 5
6732       ;;
6733   esac
6734 
6735 
6736   # First argument is the cpu name from the trip/quad
6737   case "$build_cpu" in
6738     x86_64)
6739       VAR_CPU=x86_64
6740       VAR_CPU_ARCH=x86
6741       VAR_CPU_BITS=64
6742       VAR_CPU_ENDIAN=little
6743       ;;
6744     i?86)
6745       VAR_CPU=x86
6746       VAR_CPU_ARCH=x86
6747       VAR_CPU_BITS=32
6748       VAR_CPU_ENDIAN=little
6749       ;;
6750     arm*)
6751       VAR_CPU=arm
6752       VAR_CPU_ARCH=arm
6753       VAR_CPU_BITS=32
6754       VAR_CPU_ENDIAN=little
6755       ;;
6756     powerpc)
6757       VAR_CPU=ppc
6758       VAR_CPU_ARCH=ppc
6759       VAR_CPU_BITS=32
6760       VAR_CPU_ENDIAN=big
6761        ;;
6762     powerpc64)
6763       VAR_CPU=ppc64
6764       VAR_CPU_ARCH=ppc
6765       VAR_CPU_BITS=64
6766       VAR_CPU_ENDIAN=big
6767        ;;
6768     sparc)
6769       VAR_CPU=sparc
6770       VAR_CPU_ARCH=sparc
6771       VAR_CPU_BITS=32
6772       VAR_CPU_ENDIAN=big
6773        ;;
6774     sparcv9)
6775       VAR_CPU=sparcv9
6776       VAR_CPU_ARCH=sparc
6777       VAR_CPU_BITS=64
6778       VAR_CPU_ENDIAN=big
6779        ;;
6780     *)
6781       as_fn_error $? "unsupported cpu $build_cpu" "$LINENO" 5
6782       ;;
6783   esac
6784 
6785     # ..and setup our own variables. (Do this explicitely to facilitate searching)
6786     OPENJDK_BUILD_OS="$VAR_OS"
6787     OPENJDK_BUILD_OS_API="$VAR_OS_API"
6788     OPENJDK_BUILD_OS_ENV="$VAR_OS_ENV"
6789     OPENJDK_BUILD_CPU="$VAR_CPU"
6790     OPENJDK_BUILD_CPU_ARCH="$VAR_CPU_ARCH"
6791     OPENJDK_BUILD_CPU_BITS="$VAR_CPU_BITS"
6792     OPENJDK_BUILD_CPU_ENDIAN="$VAR_CPU_ENDIAN"
6793 
6794 
6795 
6796 
6797 
6798 
6799 
6800     { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-build os-cpu" >&5
6801 $as_echo_n "checking openjdk-build os-cpu... " >&6; }
6802     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&5
6803 $as_echo "$OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&6; }
6804 
6805     # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
6806 
6807   case "$host_os" in
6808     *linux*)
6809       VAR_OS=linux
6810       VAR_OS_API=posix
6811       VAR_OS_ENV=linux
6812       ;;
6813     *solaris*)
6814       VAR_OS=solaris
6815       VAR_OS_API=posix
6816       VAR_OS_ENV=solaris
6817       ;;
6818     *darwin*)
6819       VAR_OS=macosx
6820       VAR_OS_API=posix
6821       VAR_OS_ENV=macosx
6822       ;;
6823     *bsd*)
6824       VAR_OS=bsd
6825       VAR_OS_API=posix
6826       VAR_OS_ENV=bsd
6827       ;;
6828     *cygwin*)
6829       VAR_OS=windows
6830       VAR_OS_API=winapi
6831       VAR_OS_ENV=windows.cygwin
6832       ;;
6833     *mingw*)
6834       VAR_OS=windows
6835       VAR_OS_API=winapi
6836       VAR_OS_ENV=windows.msys
6837       ;;
6838     *)
6839       as_fn_error $? "unsupported operating system $host_os" "$LINENO" 5
6840       ;;
6841   esac
6842 
6843 
6844   # First argument is the cpu name from the trip/quad
6845   case "$host_cpu" in
6846     x86_64)
6847       VAR_CPU=x86_64
6848       VAR_CPU_ARCH=x86
6849       VAR_CPU_BITS=64
6850       VAR_CPU_ENDIAN=little
6851       ;;
6852     i?86)
6853       VAR_CPU=x86
6854       VAR_CPU_ARCH=x86
6855       VAR_CPU_BITS=32
6856       VAR_CPU_ENDIAN=little
6857       ;;
6858     arm*)
6859       VAR_CPU=arm
6860       VAR_CPU_ARCH=arm
6861       VAR_CPU_BITS=32
6862       VAR_CPU_ENDIAN=little
6863       ;;
6864     powerpc)
6865       VAR_CPU=ppc
6866       VAR_CPU_ARCH=ppc
6867       VAR_CPU_BITS=32
6868       VAR_CPU_ENDIAN=big
6869        ;;
6870     powerpc64)
6871       VAR_CPU=ppc64
6872       VAR_CPU_ARCH=ppc
6873       VAR_CPU_BITS=64
6874       VAR_CPU_ENDIAN=big
6875        ;;
6876     sparc)
6877       VAR_CPU=sparc
6878       VAR_CPU_ARCH=sparc
6879       VAR_CPU_BITS=32
6880       VAR_CPU_ENDIAN=big
6881        ;;
6882     sparcv9)
6883       VAR_CPU=sparcv9
6884       VAR_CPU_ARCH=sparc
6885       VAR_CPU_BITS=64
6886       VAR_CPU_ENDIAN=big
6887        ;;
6888     *)
6889       as_fn_error $? "unsupported cpu $host_cpu" "$LINENO" 5
6890       ;;
6891   esac
6892 
6893     # ... and setup our own variables. (Do this explicitely to facilitate searching)
6894     OPENJDK_TARGET_OS="$VAR_OS"
6895     OPENJDK_TARGET_OS_API="$VAR_OS_API"
6896     OPENJDK_TARGET_OS_ENV="$VAR_OS_ENV"
6897     OPENJDK_TARGET_CPU="$VAR_CPU"
6898     OPENJDK_TARGET_CPU_ARCH="$VAR_CPU_ARCH"
6899     OPENJDK_TARGET_CPU_BITS="$VAR_CPU_BITS"
6900     OPENJDK_TARGET_CPU_ENDIAN="$VAR_CPU_ENDIAN"
6901 
6902 
6903 
6904 
6905 
6906 
6907 
6908     { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-target os-cpu" >&5
6909 $as_echo_n "checking openjdk-target os-cpu... " >&6; }
6910     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&5
6911 $as_echo "$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&6; }
6912 
6913 
6914 
6915 # Check whether --with-target-bits was given.
6916 if test "${with_target_bits+set}" = set; then :
6917   withval=$with_target_bits;
6918 fi
6919 
6920 
6921   # We have three types of compiles:
6922   # native  == normal compilation, target system == build system
6923   # cross   == traditional cross compilation, target system != build system; special toolchain needed
6924   # reduced == using native compilers, but with special flags (e.g. -m32) to produce 32-bit builds on 64-bit machines
6925   #
6926   if test "x$OPENJDK_BUILD_AUTOCONF_NAME" != "x$OPENJDK_TARGET_AUTOCONF_NAME"; then
6927     # We're doing a proper cross-compilation
6928     COMPILE_TYPE="cross"
6929   else
6930     COMPILE_TYPE="native"
6931   fi
6932 
6933   if test "x$with_target_bits" != x; then
6934     if test "x$COMPILE_TYPE" = "xcross"; then
6935       as_fn_error $? "It is not possible to combine --with-target-bits=X and proper cross-compilation. Choose either." "$LINENO" 5
6936     fi
6937 
6938     if test "x$with_target_bits" = x32 && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
6939       # A reduced build is requested
6940       COMPILE_TYPE="reduced"
6941       OPENJDK_TARGET_CPU_BITS=32
6942       if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
6943         OPENJDK_TARGET_CPU=x86
6944       elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
6945         OPENJDK_TARGET_CPU=sparc
6946       else
6947         as_fn_error $? "Reduced build (--with-target-bits=32) is only supported on x86_64 and sparcv9" "$LINENO" 5
6948       fi
6949     elif test "x$with_target_bits" = x64 && test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
6950       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
6951     elif test "x$with_target_bits" = "x$OPENJDK_TARGET_CPU_BITS"; then
6952       { $as_echo "$as_me:${as_lineno-$LINENO}: --with-target-bits are set to build platform address size; argument has no meaning" >&5
6953 $as_echo "$as_me: --with-target-bits are set to build platform address size; argument has no meaning" >&6;}
6954     else
6955       as_fn_error $? "--with-target-bits can only be 32 or 64, you specified $with_target_bits!" "$LINENO" 5
6956     fi
6957   fi
6958 
6959 
6960 { $as_echo "$as_me:${as_lineno-$LINENO}: checking compilation type" >&5
6961 $as_echo_n "checking compilation type... " >&6; }
6962 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMPILE_TYPE" >&5
6963 $as_echo "$COMPILE_TYPE" >&6; }
6964 
6965 
6966     if test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
6967        REQUIRED_OS_NAME=SunOS
6968        REQUIRED_OS_VERSION=5.10
6969     fi
6970     if test "x$OPENJDK_TARGET_OS" = "xlinux"; then
6971        REQUIRED_OS_NAME=Linux
6972        REQUIRED_OS_VERSION=2.6
6973     fi
6974     if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
6975         REQUIRED_OS_NAME=Windows
6976         if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
6977             REQUIRED_OS_VERSION=5.2
6978         else
6979             REQUIRED_OS_VERSION=5.1
6980         fi
6981     fi
6982     if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
6983         REQUIRED_OS_NAME=Darwin
6984         REQUIRED_OS_VERSION=11.2
6985     fi
6986 
6987 
6988 
6989 
6990 
6991     # Also store the legacy naming of the cpu.
6992     # Ie i586 and amd64 instead of x86 and x86_64
6993     OPENJDK_TARGET_CPU_LEGACY="$OPENJDK_TARGET_CPU"
6994     if test "x$OPENJDK_TARGET_CPU" = xx86; then
6995       OPENJDK_TARGET_CPU_LEGACY="i586"
6996     elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
6997       # On all platforms except MacOSX replace x86_64 with amd64.
6998       OPENJDK_TARGET_CPU_LEGACY="amd64"
6999     fi
7000 
7001 
7002     # And the second legacy naming of the cpu.
7003     # Ie i386 and amd64 instead of x86 and x86_64.
7004     OPENJDK_TARGET_CPU_LEGACY_LIB="$OPENJDK_TARGET_CPU"
7005     if test "x$OPENJDK_TARGET_CPU" = xx86; then
7006       OPENJDK_TARGET_CPU_LEGACY_LIB="i386"
7007     elif test "x$OPENJDK_TARGET_CPU" = xx86_64; then
7008       OPENJDK_TARGET_CPU_LEGACY_LIB="amd64"
7009     fi
7010 
7011 
7012     # This is the name of the cpu (but using i386 and amd64 instead of
7013     # x86 and x86_64, respectively), preceeded by a /, to be used when
7014     # locating libraries. On macosx, it's empty, though.
7015     OPENJDK_TARGET_CPU_LIBDIR="/$OPENJDK_TARGET_CPU_LEGACY_LIB"
7016     if test "x$OPENJDK_TARGET_OS" = xmacosx; then
7017         OPENJDK_TARGET_CPU_LIBDIR=""
7018     fi
7019 
7020 
7021     # OPENJDK_TARGET_CPU_ISADIR is normally empty. On 64-bit Solaris systems, it is set to
7022     # /amd64 or /sparcv9. This string is appended to some library paths, like this:
7023     # /usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libexample.so
7024     OPENJDK_TARGET_CPU_ISADIR=""
7025     if test "x$OPENJDK_TARGET_OS" = xsolaris; then
7026       if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
7027           OPENJDK_TARGET_CPU_ISADIR="/amd64"
7028       elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
7029           OPENJDK_TARGET_CPU_ISADIR="/sparcv9"
7030       fi
7031     fi
7032 
7033 
7034     # Setup OPENJDK_TARGET_CPU_OSARCH, which is used to set the os.arch Java system property
7035     OPENJDK_TARGET_CPU_OSARCH="$OPENJDK_TARGET_CPU"
7036     if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$OPENJDK_TARGET_CPU" = xx86; then
7037       # On linux only, we replace x86 with i386.
7038       OPENJDK_TARGET_CPU_OSARCH="i386"
7039     elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
7040       # On all platforms except macosx, we replace x86_64 with amd64.
7041       OPENJDK_TARGET_CPU_OSARCH="amd64"
7042     fi
7043 
7044 
7045     OPENJDK_TARGET_CPU_JLI="$OPENJDK_TARGET_CPU"
7046     if test "x$OPENJDK_TARGET_CPU" = xx86; then
7047       OPENJDK_TARGET_CPU_JLI="i386"
7048     elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
7049       # On all platforms except macosx, we replace x86_64 with amd64.
7050       OPENJDK_TARGET_CPU_JLI="amd64"
7051     fi
7052     # Now setup the -D flags for building libjli.
7053     OPENJDK_TARGET_CPU_JLI_CFLAGS="-DLIBARCHNAME='\"$OPENJDK_TARGET_CPU_JLI\"'"
7054     if test "x$OPENJDK_TARGET_OS" = xsolaris; then
7055       if test "x$OPENJDK_TARGET_CPU_ARCH" = xsparc; then
7056         OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"sparc\"' -DLIBARCH64NAME='\"sparcv9\"'"
7057       elif test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
7058         OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"i386\"' -DLIBARCH64NAME='\"amd64\"'"
7059       fi
7060     fi
7061 
7062 
7063     # Setup OPENJDK_TARGET_OS_API_DIR, used in source paths.
7064     if test "x$OPENJDK_TARGET_OS_API" = xposix; then
7065         OPENJDK_TARGET_OS_API_DIR="solaris"
7066     fi
7067     if test "x$OPENJDK_TARGET_OS_API" = xwinapi; then
7068         OPENJDK_TARGET_OS_API_DIR="windows"
7069     fi
7070 
7071 
7072     if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
7073         A_LP64="LP64:="
7074         # -D_LP64=1 is only set on linux and mac. Setting on windows causes diff in
7075         # unpack200.exe
7076         if test "x$OPENJDK_TARGET_OS" = xlinux || test "x$OPENJDK_TARGET_OS" = xmacosx; then
7077             ADD_LP64="-D_LP64=1"
7078         fi
7079     fi
7080     LP64=$A_LP64
7081 
7082 
7083     if test "x$COMPILE_TYPE" = "xcross"; then
7084       # FIXME: ... or should this include reduced builds..?
7085       DEFINE_CROSS_COMPILE_ARCH="CROSS_COMPILE_ARCH:=$OPENJDK_TARGET_CPU_LEGACY"
7086     else
7087       DEFINE_CROSS_COMPILE_ARCH=""
7088     fi
7089 
7090 
7091 
7092 
7093 # Continue setting up basic stuff. Most remaining code require fundamental tools.
7094 
7095 # Locate the directory of this script.
7096 SCRIPT="$0"
7097 
7098     if test "x$OPENJDK_BUILD_OS" != xwindows; then
7099         # Follow a chain of symbolic links. Use readlink
7100         # where it exists, else fall back to horribly
7101         # complicated shell code.
7102         if test "x$READLINK_TESTED" != yes; then
7103             # On MacOSX there is a readlink tool with a different
7104             # purpose than the GNU readlink tool. Check the found readlink.
7105             ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
7106             if test "x$ISGNU" = x; then
7107                  # A readlink that we do not know how to use.
7108                  # Are there other non-GNU readlinks out there?
7109                  READLINK_TESTED=yes
7110                  READLINK=
7111             fi
7112         fi
7113 
7114         if test "x$READLINK" != x; then
7115             SCRIPT=`$READLINK -f $SCRIPT`
7116         else
7117             # Save the current directory for restoring afterwards
7118             STARTDIR=$PWD
7119             COUNTER=0
7120             sym_link_dir=`$DIRNAME $SCRIPT`
7121             sym_link_file=`$BASENAME $SCRIPT`
7122             # Use the system pwd and not the shell builtin to resolve directory symlinks
7123             cd $sym_link_dir
7124             cd `$THEPWDCMD`
7125             sym_link_dir=`$THEPWDCMD`
7126             # Resolve file symlinks
7127             while test $COUNTER -lt 20; do
7128                 ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
7129                 if test "x$ISLINK" == x; then
7130                     # This is not a symbolic link! We are done!
7131                     break
7132                 fi
7133                 # Again resolve directory symlinks since the target of the just found
7134                 # link could be in a different directory
7135                 cd `$DIRNAME $ISLINK`
7136                 sym_link_dir=`$THEPWDCMD`
7137                 sym_link_file=`$BASENAME $ISLINK`
7138                 let COUNTER=COUNTER+1
7139             done
7140             cd $STARTDIR
7141             SCRIPT=$sym_link_dir/$sym_link_file
7142         fi
7143     fi
7144 
7145 AUTOCONF_DIR=`cd \`$DIRNAME $SCRIPT\`; $THEPWDCMD`
7146 
7147 # Where is the source? It is located two levels above the configure script.
7148 CURDIR="$PWD"
7149 cd "$AUTOCONF_DIR/../.."
7150 SRC_ROOT="`$THEPWDCMD`"
7151 
7152 if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
7153   PATH_SEP=";"
7154 
7155   SRC_ROOT_LENGTH=`$THEPWDCMD|$WC -m`
7156   if test $SRC_ROOT_LENGTH -gt 100; then
7157       as_fn_error $? "Your base path is too long. It is $SRC_ROOT_LENGTH characters long, but only 100 is supported" "$LINENO" 5
7158   fi
7159 
7160   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7161     { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin release" >&5
7162 $as_echo_n "checking cygwin release... " >&6; }
7163     CYGWIN_VERSION=`$UNAME -r`
7164     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_VERSION" >&5
7165 $as_echo "$CYGWIN_VERSION" >&6; }
7166     WINDOWS_ENV_VENDOR='cygwin'
7167     WINDOWS_ENV_VERSION="$CYGWIN_VERSION"
7168 
7169     CYGWIN_VERSION_OK=`$ECHO $CYGWIN_VERSION | $GREP ^1.7.`
7170     if test "x$CYGWIN_VERSION_OK" = x; then
7171       { $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
7172 $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;}
7173       as_fn_error $? "Cannot continue" "$LINENO" 5
7174     fi
7175     if test "x$CYGPATH" = x; then
7176         as_fn_error $? "Something is wrong with your cygwin installation since I cannot find cygpath.exe in your path" "$LINENO" 5
7177     fi
7178     { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin root directory as unix-style path" >&5
7179 $as_echo_n "checking cygwin root directory as unix-style path... " >&6; }
7180     # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
7181     cygwin_winpath_root=`cd / ; cmd /c cd | grep ".*"`
7182     # Force cygpath to report the proper root by including a trailing space, and then stripping it off again.
7183     CYGWIN_ROOT_PATH=`$CYGPATH -u "$cygwin_winpath_root " | $CUT -f 1 -d " "`
7184     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_ROOT_PATH" >&5
7185 $as_echo "$CYGWIN_ROOT_PATH" >&6; }
7186     WINDOWS_ENV_ROOT_PATH="$CYGWIN_ROOT_PATH"
7187     test_cygdrive_prefix=`$ECHO $CYGWIN_ROOT_PATH | $GREP ^/cygdrive/`
7188     if test "x$test_cygdrive_prefix" = x; then
7189         as_fn_error $? "Your cygdrive prefix is not /cygdrive. This is currently not supported. Change with mount -c." "$LINENO" 5
7190     fi
7191   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7192     { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys release" >&5
7193 $as_echo_n "checking msys release... " >&6; }
7194     MSYS_VERSION=`$UNAME -r`
7195     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_VERSION" >&5
7196 $as_echo "$MSYS_VERSION" >&6; }
7197 
7198     WINDOWS_ENV_VENDOR='msys'
7199     WINDOWS_ENV_VERSION="$MSYS_VERSION"
7200 
7201     { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys root directory as unix-style path" >&5
7202 $as_echo_n "checking msys root directory as unix-style path... " >&6; }
7203     # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
7204     MSYS_ROOT_PATH=`cd / ; cmd /c cd | grep ".*"`
7205 
7206   windows_path="$MSYS_ROOT_PATH"
7207   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7208     unix_path=`$CYGPATH -u "$windows_path"`
7209     MSYS_ROOT_PATH="$unix_path"
7210   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7211     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
7212     MSYS_ROOT_PATH="$unix_path"
7213   fi
7214 
7215     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_ROOT_PATH" >&5
7216 $as_echo "$MSYS_ROOT_PATH" >&6; }
7217     WINDOWS_ENV_ROOT_PATH="$MSYS_ROOT_PATH"
7218   else
7219     as_fn_error $? "Unknown Windows environment. Neither cygwin nor msys was detected." "$LINENO" 5
7220   fi
7221 
7222   # Test if windows or unix (cygwin/msys) find is first in path.
7223   { $as_echo "$as_me:${as_lineno-$LINENO}: checking what kind of 'find' is first on the PATH" >&5
7224 $as_echo_n "checking what kind of 'find' is first on the PATH... " >&6; }
7225   FIND_BINARY_OUTPUT=`find --version 2>&1`
7226   if test "x`echo $FIND_BINARY_OUTPUT | $GREP GNU`" != x; then
7227     { $as_echo "$as_me:${as_lineno-$LINENO}: result: unix style" >&5
7228 $as_echo "unix style" >&6; }
7229   elif test "x`echo $FIND_BINARY_OUTPUT | $GREP FIND`" != x; then
7230     { $as_echo "$as_me:${as_lineno-$LINENO}: result: Windows" >&5
7231 $as_echo "Windows" >&6; }
7232     { $as_echo "$as_me:${as_lineno-$LINENO}: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&5
7233 $as_echo "$as_me: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&6;}
7234     { $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
7235 $as_echo "$as_me: This will not work. Please correct and make sure /usr/bin (or similar) is first in path." >&6;}
7236     as_fn_error $? "Cannot continue" "$LINENO" 5
7237   else
7238     { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
7239 $as_echo "unknown" >&6; }
7240     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: It seems that your find utility is non-standard." >&5
7241 $as_echo "$as_me: WARNING: It seems that your find utility is non-standard." >&2;}
7242   fi
7243 
7244 else
7245   PATH_SEP=":"
7246 fi
7247 
7248 
7249 
7250 cd "$CURDIR"
7251 
7252 
7253   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7254 
7255   # Input might be given as Windows format, start by converting to
7256   # unix format.
7257   path="$SRC_ROOT"
7258   new_path=`$CYGPATH -u "$path"`
7259 
7260   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
7261   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
7262   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
7263   # "foo.exe" is OK but "foo" is an error.
7264   #
7265   # This test is therefore slightly more accurate than "test -f" to check for file precense.
7266   # It is also a way to make sure we got the proper file name for the real test later on.
7267   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
7268   if test "x$test_shortpath" = x; then
7269     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&5
7270 $as_echo "$as_me: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&6;}
7271     as_fn_error $? "Cannot locate the the path of SRC_ROOT" "$LINENO" 5
7272   fi
7273 
7274   # Call helper function which possibly converts this using DOS-style short mode.
7275   # If so, the updated path is stored in $new_path.
7276 
7277   input_path="$new_path"
7278   # Check if we need to convert this using DOS-style short mode. If the path
7279   # contains just simple characters, use it. Otherwise (spaces, weird characters),
7280   # take no chances and rewrite it.
7281   # Note: m4 eats our [], so we need to use [ and ] instead.
7282   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
7283   if test "x$has_forbidden_chars" != x; then
7284     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7285     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
7286     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
7287     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
7288       # Going to short mode and back again did indeed matter. Since short mode is
7289       # case insensitive, let's make it lowercase to improve readability.
7290       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7291       # Now convert it back to Unix-stile (cygpath)
7292       input_path=`$CYGPATH -u "$shortmode_path"`
7293       new_path="$input_path"
7294     fi
7295   fi
7296 
7297   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
7298   if test "x$test_cygdrive_prefix" = x; then
7299     # As a simple fix, exclude /usr/bin since it's not a real path.
7300     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
7301       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
7302       # a path prefixed by /cygdrive for fixpath to work.
7303       new_path="$CYGWIN_ROOT_PATH$input_path"
7304     fi
7305   fi
7306 
7307 
7308   if test "x$path" != "x$new_path"; then
7309     SRC_ROOT="$new_path"
7310     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting SRC_ROOT to \"$new_path\"" >&5
7311 $as_echo "$as_me: Rewriting SRC_ROOT to \"$new_path\"" >&6;}
7312   fi
7313 
7314   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7315 
7316   path="$SRC_ROOT"
7317   has_colon=`$ECHO $path | $GREP ^.:`
7318   new_path="$path"
7319   if test "x$has_colon" = x; then
7320     # Not in mixed or Windows style, start by that.
7321     new_path=`cmd //c echo $path`
7322   fi
7323 
7324 
7325   input_path="$new_path"
7326   # Check if we need to convert this using DOS-style short mode. If the path
7327   # contains just simple characters, use it. Otherwise (spaces, weird characters),
7328   # take no chances and rewrite it.
7329   # Note: m4 eats our [], so we need to use [ and ] instead.
7330   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
7331   if test "x$has_forbidden_chars" != x; then
7332     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7333     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7334   fi
7335 
7336 
7337   windows_path="$new_path"
7338   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7339     unix_path=`$CYGPATH -u "$windows_path"`
7340     new_path="$unix_path"
7341   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7342     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
7343     new_path="$unix_path"
7344   fi
7345 
7346   if test "x$path" != "x$new_path"; then
7347     SRC_ROOT="$new_path"
7348     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting SRC_ROOT to \"$new_path\"" >&5
7349 $as_echo "$as_me: Rewriting SRC_ROOT to \"$new_path\"" >&6;}
7350   fi
7351 
7352   # Save the first 10 bytes of this path to the storage, so fixpath can work.
7353   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
7354 
7355   else
7356     # We're on a posix platform. Hooray! :)
7357     path="$SRC_ROOT"
7358 
7359     if test ! -f "$path" && test ! -d "$path"; then
7360       as_fn_error $? "The path of SRC_ROOT, which resolves as \"$path\", is not found." "$LINENO" 5
7361     fi
7362 
7363     has_space=`$ECHO "$path" | $GREP " "`
7364     if test "x$has_space" != x; then
7365       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&5
7366 $as_echo "$as_me: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&6;}
7367       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
7368     fi
7369   fi
7370 
7371 
7372   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7373 
7374   # Input might be given as Windows format, start by converting to
7375   # unix format.
7376   path="$CURDIR"
7377   new_path=`$CYGPATH -u "$path"`
7378 
7379   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
7380   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
7381   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
7382   # "foo.exe" is OK but "foo" is an error.
7383   #
7384   # This test is therefore slightly more accurate than "test -f" to check for file precense.
7385   # It is also a way to make sure we got the proper file name for the real test later on.
7386   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
7387   if test "x$test_shortpath" = x; then
7388     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
7389 $as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
7390     as_fn_error $? "Cannot locate the the path of CURDIR" "$LINENO" 5
7391   fi
7392 
7393   # Call helper function which possibly converts this using DOS-style short mode.
7394   # If so, the updated path is stored in $new_path.
7395 
7396   input_path="$new_path"
7397   # Check if we need to convert this using DOS-style short mode. If the path
7398   # contains just simple characters, use it. Otherwise (spaces, weird characters),
7399   # take no chances and rewrite it.
7400   # Note: m4 eats our [], so we need to use [ and ] instead.
7401   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
7402   if test "x$has_forbidden_chars" != x; then
7403     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7404     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
7405     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
7406     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
7407       # Going to short mode and back again did indeed matter. Since short mode is
7408       # case insensitive, let's make it lowercase to improve readability.
7409       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7410       # Now convert it back to Unix-stile (cygpath)
7411       input_path=`$CYGPATH -u "$shortmode_path"`
7412       new_path="$input_path"
7413     fi
7414   fi
7415 
7416   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
7417   if test "x$test_cygdrive_prefix" = x; then
7418     # As a simple fix, exclude /usr/bin since it's not a real path.
7419     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
7420       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
7421       # a path prefixed by /cygdrive for fixpath to work.
7422       new_path="$CYGWIN_ROOT_PATH$input_path"
7423     fi
7424   fi
7425 
7426 
7427   if test "x$path" != "x$new_path"; then
7428     CURDIR="$new_path"
7429     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
7430 $as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
7431   fi
7432 
7433   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7434 
7435   path="$CURDIR"
7436   has_colon=`$ECHO $path | $GREP ^.:`
7437   new_path="$path"
7438   if test "x$has_colon" = x; then
7439     # Not in mixed or Windows style, start by that.
7440     new_path=`cmd //c echo $path`
7441   fi
7442 
7443 
7444   input_path="$new_path"
7445   # Check if we need to convert this using DOS-style short mode. If the path
7446   # contains just simple characters, use it. Otherwise (spaces, weird characters),
7447   # take no chances and rewrite it.
7448   # Note: m4 eats our [], so we need to use [ and ] instead.
7449   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
7450   if test "x$has_forbidden_chars" != x; then
7451     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7452     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7453   fi
7454 
7455 
7456   windows_path="$new_path"
7457   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7458     unix_path=`$CYGPATH -u "$windows_path"`
7459     new_path="$unix_path"
7460   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7461     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
7462     new_path="$unix_path"
7463   fi
7464 
7465   if test "x$path" != "x$new_path"; then
7466     CURDIR="$new_path"
7467     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
7468 $as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
7469   fi
7470 
7471   # Save the first 10 bytes of this path to the storage, so fixpath can work.
7472   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
7473 
7474   else
7475     # We're on a posix platform. Hooray! :)
7476     path="$CURDIR"
7477 
7478     if test ! -f "$path" && test ! -d "$path"; then
7479       as_fn_error $? "The path of CURDIR, which resolves as \"$path\", is not found." "$LINENO" 5
7480     fi
7481 
7482     has_space=`$ECHO "$path" | $GREP " "`
7483     if test "x$has_space" != x; then
7484       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
7485 $as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
7486       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
7487     fi
7488   fi
7489 
7490 
7491 if test "x$OPENJDK_BUILD_OS" = "xsolaris"; then
7492     # Add extra search paths on solaris for utilities like ar and as etc...
7493     PATH="$PATH:/usr/ccs/bin:/usr/sfw/bin:/opt/csw/bin"
7494 fi
7495 
7496 # You can force the sys-root if the sys-root encoded into the cross compiler tools
7497 # is not correct.
7498 
7499 # Check whether --with-sys-root was given.
7500 if test "${with_sys_root+set}" = set; then :
7501   withval=$with_sys_root;
7502 fi
7503 
7504 
7505 if test "x$with_sys_root" != x; then
7506   SYS_ROOT=$with_sys_root
7507 else
7508   SYS_ROOT=/
7509 fi
7510 
7511 
7512 
7513 # Check whether --with-tools-dir was given.
7514 if test "${with_tools_dir+set}" = set; then :
7515   withval=$with_tools_dir; TOOLS_DIR=$with_tools_dir
7516 fi
7517 
7518 
7519 
7520 # Check whether --with-devkit was given.
7521 if test "${with_devkit+set}" = set; then :
7522   withval=$with_devkit;
7523     if test "x$with_sys_root" != x; then
7524       as_fn_error $? "Cannot specify both --with-devkit and --with-sys-root at the same time" "$LINENO" 5
7525     fi
7526     if test "x$with_tools_dir" != x; then
7527       as_fn_error $? "Cannot specify both --with-devkit and --with-tools-dir at the same time" "$LINENO" 5
7528     fi
7529     TOOLS_DIR=$with_devkit/bin
7530     SYS_ROOT=$with_devkit/$host_alias/libc
7531 
7532 fi
7533 
7534 
7535 
7536 
7537 # Setup default logging of stdout and stderr to build.log in the output root.
7538 BUILD_LOG='$(OUTPUT_ROOT)/build.log'
7539 BUILD_LOG_PREVIOUS='$(OUTPUT_ROOT)/build.log.old'
7540 BUILD_LOG_WRAPPER='$(BASH) $(SRC_ROOT)/common/bin/logger.sh $(BUILD_LOG)'
7541 
7542 
7543 
7544 
7545 
7546 # Check if it's a pure open build or if custom sources are to be used.
7547 
7548   # Check whether --enable-openjdk-only was given.
7549 if test "${enable_openjdk_only+set}" = set; then :
7550   enableval=$enable_openjdk_only;
7551 else
7552   enable_openjdk_only="no"
7553 fi
7554 
7555 
7556   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for presence of closed sources" >&5
7557 $as_echo_n "checking for presence of closed sources... " >&6; }
7558   if test -d "$SRC_ROOT/jdk/src/closed"; then
7559     CLOSED_SOURCE_PRESENT=yes
7560   else
7561     CLOSED_SOURCE_PRESENT=no
7562   fi
7563   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CLOSED_SOURCE_PRESENT" >&5
7564 $as_echo "$CLOSED_SOURCE_PRESENT" >&6; }
7565 
7566   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if closed source is suppressed (openjdk-only)" >&5
7567 $as_echo_n "checking if closed source is suppressed (openjdk-only)... " >&6; }
7568   SUPPRESS_CLOSED_SOURCE="$enable_openjdk_only"
7569   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SUPPRESS_CLOSED_SOURCE" >&5
7570 $as_echo "$SUPPRESS_CLOSED_SOURCE" >&6; }
7571 
7572   if test "x$CLOSED_SOURCE_PRESENT" = xno; then
7573     OPENJDK=true
7574     if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then
7575       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&5
7576 $as_echo "$as_me: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&2;}
7577     fi
7578   else
7579     if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then
7580       OPENJDK=true
7581     else
7582       OPENJDK=false
7583     fi
7584   fi
7585 
7586   if test "x$OPENJDK" = "xtrue"; then
7587     SET_OPENJDK="OPENJDK=true"
7588   fi
7589 
7590 
7591 
7592 
7593 # These are needed to be able to create a configuration name (and thus the output directory)
7594 
7595 ###############################################################################
7596 #
7597 # Check which variant of the JDK that we want to build.
7598 # Currently we have:
7599 #    normal:   standard edition
7600 # but the custom make system may add other variants
7601 #
7602 # Effectively the JDK variant gives a name to a specific set of
7603 # modules to compile into the JDK. In the future, these modules
7604 # might even be Jigsaw modules.
7605 #
7606 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variant of the JDK to build" >&5
7607 $as_echo_n "checking which variant of the JDK to build... " >&6; }
7608 
7609 # Check whether --with-jdk-variant was given.
7610 if test "${with_jdk_variant+set}" = set; then :
7611   withval=$with_jdk_variant;
7612 fi
7613 
7614 
7615 if test "x$with_jdk_variant" = xnormal || test "x$with_jdk_variant" = x; then
7616     JDK_VARIANT="normal"
7617 else
7618     as_fn_error $? "The available JDK variants are: normal" "$LINENO" 5
7619 fi
7620 
7621 
7622 
7623 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JDK_VARIANT" >&5
7624 $as_echo "$JDK_VARIANT" >&6; }
7625 
7626 
7627 
7628 ###############################################################################
7629 #
7630 # Check which variants of the JVM that we want to build.
7631 # Currently we have:
7632 #    server: normal interpreter and a tiered C1/C2 compiler
7633 #    client: normal interpreter and C1 (no C2 compiler) (only 32-bit platforms)
7634 #    minimal1: reduced form of client with optional VM services and features stripped out
7635 #    kernel: kernel footprint JVM that passes the TCK without major performance problems,
7636 #             ie normal interpreter and C1, only the serial GC, kernel jvmti etc
7637 #    zero: no machine code interpreter, no compiler
7638 #    zeroshark: zero interpreter and shark/llvm compiler backend
7639 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variants of the JVM to build" >&5
7640 $as_echo_n "checking which variants of the JVM to build... " >&6; }
7641 
7642 # Check whether --with-jvm-variants was given.
7643 if test "${with_jvm_variants+set}" = set; then :
7644   withval=$with_jvm_variants;
7645 fi
7646 
7647 
7648 if test "x$with_jvm_variants" = x; then
7649      with_jvm_variants="server"
7650 fi
7651 
7652 JVM_VARIANTS=",$with_jvm_variants,"
7653 TEST_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/server,//' -e 's/client,//'  -e 's/minimal1,//' -e 's/kernel,//' -e 's/zero,//' -e 's/zeroshark,//'`
7654 
7655 if test "x$TEST_VARIANTS" != "x,"; then
7656    as_fn_error $? "The available JVM variants are: server, client, minimal1, kernel, zero, zeroshark" "$LINENO" 5
7657 fi
7658 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_jvm_variants" >&5
7659 $as_echo "$with_jvm_variants" >&6; }
7660 
7661 JVM_VARIANT_SERVER=`$ECHO "$JVM_VARIANTS" | $SED -e '/,server,/!s/.*/false/g' -e '/,server,/s/.*/true/g'`
7662 JVM_VARIANT_CLIENT=`$ECHO "$JVM_VARIANTS" | $SED -e '/,client,/!s/.*/false/g' -e '/,client,/s/.*/true/g'`
7663 JVM_VARIANT_MINIMAL1=`$ECHO "$JVM_VARIANTS" | $SED -e '/,minimal1,/!s/.*/false/g' -e '/,minimal1,/s/.*/true/g'`
7664 JVM_VARIANT_KERNEL=`$ECHO "$JVM_VARIANTS" | $SED -e '/,kernel,/!s/.*/false/g' -e '/,kernel,/s/.*/true/g'`
7665 JVM_VARIANT_ZERO=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zero,/!s/.*/false/g' -e '/,zero,/s/.*/true/g'`
7666 JVM_VARIANT_ZEROSHARK=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zeroshark,/!s/.*/false/g' -e '/,zeroshark,/s/.*/true/g'`
7667 
7668 if test "x$JVM_VARIANT_CLIENT" = xtrue; then
7669     if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
7670         as_fn_error $? "You cannot build a client JVM for a 64-bit machine." "$LINENO" 5
7671     fi
7672 fi
7673 if test "x$JVM_VARIANT_KERNEL" = xtrue; then
7674     if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
7675         as_fn_error $? "You cannot build a kernel JVM for a 64-bit machine." "$LINENO" 5
7676     fi
7677 fi
7678 if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
7679     if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
7680         as_fn_error $? "You cannot build a minimal JVM for a 64-bit machine." "$LINENO" 5
7681     fi
7682 fi
7683 
7684 # Replace the commas with AND for use in the build directory name.
7685 ANDED_JVM_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/^,//' -e 's/,$//' -e 's/,/AND/'`
7686 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/'`
7687 if test "x$COUNT_VARIANTS" != "x,1"; then
7688     BUILDING_MULTIPLE_JVM_VARIANTS=yes
7689 else
7690     BUILDING_MULTIPLE_JVM_VARIANTS=no
7691 fi
7692 
7693 
7694 
7695 
7696 
7697 
7698 
7699 
7700 
7701 if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
7702    MACOSX_UNIVERSAL="true"
7703 fi
7704 
7705 
7706 
7707 
7708 
7709 ###############################################################################
7710 #
7711 # Set the debug level
7712 #    release: no debug information, all optimizations, no asserts.
7713 #    fastdebug: debug information (-g), all optimizations, all asserts
7714 #    slowdebug: debug information (-g), no optimizations, all asserts
7715 #
7716 DEBUG_LEVEL="release"
7717 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which debug level to use" >&5
7718 $as_echo_n "checking which debug level to use... " >&6; }
7719 # Check whether --enable-debug was given.
7720 if test "${enable_debug+set}" = set; then :
7721   enableval=$enable_debug;
7722         ENABLE_DEBUG="${enableval}"
7723         DEBUG_LEVEL="fastdebug"
7724 
7725 else
7726   ENABLE_DEBUG="no"
7727 fi
7728 
7729 
7730 
7731 # Check whether --with-debug-level was given.
7732 if test "${with_debug_level+set}" = set; then :
7733   withval=$with_debug_level;
7734         DEBUG_LEVEL="${withval}"
7735         if test "x$ENABLE_DEBUG" = xyes; then
7736                         as_fn_error $? "You cannot use both --enable-debug and --with-debug-level at the same time." "$LINENO" 5
7737         fi
7738 
7739 fi
7740 
7741 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEBUG_LEVEL" >&5
7742 $as_echo "$DEBUG_LEVEL" >&6; }
7743 
7744 if test "x$DEBUG_LEVEL" != xrelease && \
7745    test "x$DEBUG_LEVEL" != xfastdebug && \
7746    test "x$DEBUG_LEVEL" != xslowdebug; then
7747    as_fn_error $? "Allowed debug levels are: release, fastdebug and slowdebug" "$LINENO" 5
7748 fi
7749 
7750 
7751 ###############################################################################
7752 #
7753 # Setup legacy vars/targets and new vars to deal with different debug levels.
7754 #
7755 
7756 case $DEBUG_LEVEL in
7757       release )
7758           VARIANT="OPT"
7759           FASTDEBUG="false"
7760           DEBUG_CLASSFILES="false"
7761           BUILD_VARIANT_RELEASE=""
7762           HOTSPOT_DEBUG_LEVEL="product"
7763           HOTSPOT_EXPORT="product"
7764            ;;
7765       fastdebug )
7766           VARIANT="DBG"
7767           FASTDEBUG="true"
7768           DEBUG_CLASSFILES="true"
7769           BUILD_VARIANT_RELEASE="-fastdebug"
7770           HOTSPOT_DEBUG_LEVEL="fastdebug"
7771           HOTSPOT_EXPORT="fastdebug"
7772            ;;
7773       slowdebug )
7774           VARIANT="DBG"
7775           FASTDEBUG="false"
7776           DEBUG_CLASSFILES="true"
7777           BUILD_VARIANT_RELEASE="-debug"
7778           HOTSPOT_DEBUG_LEVEL="jvmg"
7779           HOTSPOT_EXPORT="debug"
7780            ;;
7781 esac
7782 
7783 #####
7784 # Generate the legacy makefile targets for hotspot.
7785 # The hotspot api for selecting the build artifacts, really, needs to be improved.
7786 # JDK-7195896 will fix this on the hotspot side by using the JVM_VARIANT_* variables to
7787 # determine what needs to be built. All we will need to set here is all_product, all_fastdebug etc
7788 # But until then ...
7789 HOTSPOT_TARGET=""
7790 
7791 if test "x$JVM_VARIANT_SERVER" = xtrue; then
7792     HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL} "
7793 fi
7794 
7795 if test "x$JVM_VARIANT_CLIENT" = xtrue; then
7796     HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}1 "
7797 fi
7798 
7799 if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
7800     HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}minimal1 "
7801 fi
7802 
7803 if test "x$JVM_VARIANT_KERNEL" = xtrue; then
7804     HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}kernel "
7805 fi
7806 
7807 if test "x$JVM_VARIANT_ZERO" = xtrue; then
7808     HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}zero "
7809 fi
7810 
7811 if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
7812     HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}shark "
7813 fi
7814 
7815 HOTSPOT_TARGET="$HOTSPOT_TARGET docs export_$HOTSPOT_EXPORT"
7816 
7817 # On Macosx universal binaries are produced, but they only contain
7818 # 64 bit intel. This invalidates control of which jvms are built
7819 # from configure, but only server is valid anyway. Fix this
7820 # when hotspot makefiles are rewritten.
7821 if test "x$MACOSX_UNIVERSAL" = xtrue; then
7822     HOTSPOT_TARGET=universal_${HOTSPOT_EXPORT}
7823 fi
7824 
7825 #####
7826 
7827 
7828 
7829 
7830 
7831 
7832 
7833 
7834 # With basic setup done, call the custom early hook.
7835 
7836 
7837 # To properly create a configuration name, we need to have the OpenJDK target
7838 # and options (variants and debug level) parsed.
7839 
7840 
7841 
7842 # Check whether --with-conf-name was given.
7843 if test "${with_conf_name+set}" = set; then :
7844   withval=$with_conf_name;  CONF_NAME=${with_conf_name}
7845 fi
7846 
7847 
7848 # Test from where we are running configure, in or outside of src root.
7849 # To enable comparison of directories, CURDIR needs to be symlink free
7850 # just like SRC_ROOT already is
7851 NOSYM_CURDIR="$CURDIR"
7852 
7853     if test "x$OPENJDK_BUILD_OS" != xwindows; then
7854         # Follow a chain of symbolic links. Use readlink
7855         # where it exists, else fall back to horribly
7856         # complicated shell code.
7857         if test "x$READLINK_TESTED" != yes; then
7858             # On MacOSX there is a readlink tool with a different
7859             # purpose than the GNU readlink tool. Check the found readlink.
7860             ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
7861             if test "x$ISGNU" = x; then
7862                  # A readlink that we do not know how to use.
7863                  # Are there other non-GNU readlinks out there?
7864                  READLINK_TESTED=yes
7865                  READLINK=
7866             fi
7867         fi
7868 
7869         if test "x$READLINK" != x; then
7870             NOSYM_CURDIR=`$READLINK -f $NOSYM_CURDIR`
7871         else
7872             # Save the current directory for restoring afterwards
7873             STARTDIR=$PWD
7874             COUNTER=0
7875             sym_link_dir=`$DIRNAME $NOSYM_CURDIR`
7876             sym_link_file=`$BASENAME $NOSYM_CURDIR`
7877             # Use the system pwd and not the shell builtin to resolve directory symlinks
7878             cd $sym_link_dir
7879             cd `$THEPWDCMD`
7880             sym_link_dir=`$THEPWDCMD`
7881             # Resolve file symlinks
7882             while test $COUNTER -lt 20; do
7883                 ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
7884                 if test "x$ISLINK" == x; then
7885                     # This is not a symbolic link! We are done!
7886                     break
7887                 fi
7888                 # Again resolve directory symlinks since the target of the just found
7889                 # link could be in a different directory
7890                 cd `$DIRNAME $ISLINK`
7891                 sym_link_dir=`$THEPWDCMD`
7892                 sym_link_file=`$BASENAME $ISLINK`
7893                 let COUNTER=COUNTER+1
7894             done
7895             cd $STARTDIR
7896             NOSYM_CURDIR=$sym_link_dir/$sym_link_file
7897         fi
7898     fi
7899 
7900 if test "x$NOSYM_CURDIR" = "x$SRC_ROOT" || test "x$NOSYM_CURDIR" = "x$SRC_ROOT/common" \
7901         || test "x$NOSYM_CURDIR" = "x$SRC_ROOT/common/autoconf" \
7902         || test "x$NOSYM_CURDIR" = "x$SRC_ROOT/common/makefiles" ; then
7903     # We are running configure from the src root.
7904     # Create a default ./build/target-variant-debuglevel output root.
7905     if test "x${CONF_NAME}" = x; then
7906         CONF_NAME="${OPENJDK_TARGET_OS}-${OPENJDK_TARGET_CPU}-${JDK_VARIANT}-${ANDED_JVM_VARIANTS}-${DEBUG_LEVEL}"
7907     fi
7908     OUTPUT_ROOT="$SRC_ROOT/build/${CONF_NAME}"
7909     $MKDIR -p "$OUTPUT_ROOT"
7910     if test ! -d "$OUTPUT_ROOT"; then
7911         as_fn_error $? "Could not create build directory $OUTPUT_ROOT" "$LINENO" 5
7912     fi
7913 else
7914     # We are running configure from outside of the src dir.
7915     # Then use the current directory as output dir!
7916     # If configuration is situated in normal build directory, just use the build
7917     # directory name as configuration name, otherwise use the complete path.
7918     if test "x${CONF_NAME}" = x; then
7919         CONF_NAME=`$ECHO $CURDIR | $SED -e "s!^${SRC_ROOT}/build/!!"`
7920     fi
7921     OUTPUT_ROOT="$CURDIR"
7922 
7923     # WARNING: This might be a bad thing to do. You need to be sure you want to
7924     # have a configuration in this directory. Do some sanity checks!
7925 
7926     if test ! -e "$OUTPUT_ROOT/spec.gmk"; then
7927       # If we have a spec.gmk, we have run here before and we are OK. Otherwise, check for
7928       # other files
7929       files_present=`$LS $OUTPUT_ROOT`
7930       # Configure has already touched config.log and confdefs.h in the current dir when this check
7931       # is performed.
7932       filtered_files=`$ECHO "$files_present" | $SED -e 's/config.log//g' -e 's/confdefs.h//g' -e 's/ //g' \
7933                                              | $TR -d '\n'`
7934       if test "x$filtered_files" != x; then
7935         { $as_echo "$as_me:${as_lineno-$LINENO}: Current directory is $CURDIR." >&5
7936 $as_echo "$as_me: Current directory is $CURDIR." >&6;}
7937         { $as_echo "$as_me:${as_lineno-$LINENO}: Since this is not the source root, configure will output the configuration here" >&5
7938 $as_echo "$as_me: Since this is not the source root, configure will output the configuration here" >&6;}
7939         { $as_echo "$as_me:${as_lineno-$LINENO}: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&5
7940 $as_echo "$as_me: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&6;}
7941         { $as_echo "$as_me:${as_lineno-$LINENO}: However, this directory is not empty. This is not allowed, since it could" >&5
7942 $as_echo "$as_me: However, this directory is not empty. This is not allowed, since it could" >&6;}
7943         { $as_echo "$as_me:${as_lineno-$LINENO}: seriously mess up just about everything." >&5
7944 $as_echo "$as_me: seriously mess up just about everything." >&6;}
7945         { $as_echo "$as_me:${as_lineno-$LINENO}: Try 'cd $SRC_ROOT' and restart configure" >&5
7946 $as_echo "$as_me: Try 'cd $SRC_ROOT' and restart configure" >&6;}
7947         { $as_echo "$as_me:${as_lineno-$LINENO}: (or create a new empty directory and cd to it)." >&5
7948 $as_echo "$as_me: (or create a new empty directory and cd to it)." >&6;}
7949         as_fn_error $? "Will not continue creating configuration in $CURDIR" "$LINENO" 5
7950       fi
7951     fi
7952 fi
7953 { $as_echo "$as_me:${as_lineno-$LINENO}: checking what configuration name to use" >&5
7954 $as_echo_n "checking what configuration name to use... " >&6; }
7955 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CONF_NAME" >&5
7956 $as_echo "$CONF_NAME" >&6; }
7957 
7958 
7959   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7960 
7961   # Input might be given as Windows format, start by converting to
7962   # unix format.
7963   path="$OUTPUT_ROOT"
7964   new_path=`$CYGPATH -u "$path"`
7965 
7966   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
7967   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
7968   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
7969   # "foo.exe" is OK but "foo" is an error.
7970   #
7971   # This test is therefore slightly more accurate than "test -f" to check for file precense.
7972   # It is also a way to make sure we got the proper file name for the real test later on.
7973   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
7974   if test "x$test_shortpath" = x; then
7975     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
7976 $as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
7977     as_fn_error $? "Cannot locate the the path of OUTPUT_ROOT" "$LINENO" 5
7978   fi
7979 
7980   # Call helper function which possibly converts this using DOS-style short mode.
7981   # If so, the updated path is stored in $new_path.
7982 
7983   input_path="$new_path"
7984   # Check if we need to convert this using DOS-style short mode. If the path
7985   # contains just simple characters, use it. Otherwise (spaces, weird characters),
7986   # take no chances and rewrite it.
7987   # Note: m4 eats our [], so we need to use [ and ] instead.
7988   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
7989   if test "x$has_forbidden_chars" != x; then
7990     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7991     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
7992     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
7993     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
7994       # Going to short mode and back again did indeed matter. Since short mode is
7995       # case insensitive, let's make it lowercase to improve readability.
7996       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7997       # Now convert it back to Unix-stile (cygpath)
7998       input_path=`$CYGPATH -u "$shortmode_path"`
7999       new_path="$input_path"
8000     fi
8001   fi
8002 
8003   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
8004   if test "x$test_cygdrive_prefix" = x; then
8005     # As a simple fix, exclude /usr/bin since it's not a real path.
8006     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
8007       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
8008       # a path prefixed by /cygdrive for fixpath to work.
8009       new_path="$CYGWIN_ROOT_PATH$input_path"
8010     fi
8011   fi
8012 
8013 
8014   if test "x$path" != "x$new_path"; then
8015     OUTPUT_ROOT="$new_path"
8016     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
8017 $as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
8018   fi
8019 
8020   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8021 
8022   path="$OUTPUT_ROOT"
8023   has_colon=`$ECHO $path | $GREP ^.:`
8024   new_path="$path"
8025   if test "x$has_colon" = x; then
8026     # Not in mixed or Windows style, start by that.
8027     new_path=`cmd //c echo $path`
8028   fi
8029 
8030 
8031   input_path="$new_path"
8032   # Check if we need to convert this using DOS-style short mode. If the path
8033   # contains just simple characters, use it. Otherwise (spaces, weird characters),
8034   # take no chances and rewrite it.
8035   # Note: m4 eats our [], so we need to use [ and ] instead.
8036   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
8037   if test "x$has_forbidden_chars" != x; then
8038     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8039     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8040   fi
8041 
8042 
8043   windows_path="$new_path"
8044   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8045     unix_path=`$CYGPATH -u "$windows_path"`
8046     new_path="$unix_path"
8047   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8048     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8049     new_path="$unix_path"
8050   fi
8051 
8052   if test "x$path" != "x$new_path"; then
8053     OUTPUT_ROOT="$new_path"
8054     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
8055 $as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
8056   fi
8057 
8058   # Save the first 10 bytes of this path to the storage, so fixpath can work.
8059   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
8060 
8061   else
8062     # We're on a posix platform. Hooray! :)
8063     path="$OUTPUT_ROOT"
8064 
8065     if test ! -f "$path" && test ! -d "$path"; then
8066       as_fn_error $? "The path of OUTPUT_ROOT, which resolves as \"$path\", is not found." "$LINENO" 5
8067     fi
8068 
8069     has_space=`$ECHO "$path" | $GREP " "`
8070     if test "x$has_space" != x; then
8071       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
8072 $as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
8073       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
8074     fi
8075   fi
8076 
8077 
8078 SPEC=$OUTPUT_ROOT/spec.gmk
8079 
8080 CONF_NAME=$CONF_NAME
8081 
8082 OUTPUT_ROOT=$OUTPUT_ROOT
8083 
8084 
8085 # Most of the probed defines are put into config.h
8086 ac_config_headers="$ac_config_headers $OUTPUT_ROOT/config.h:$AUTOCONF_DIR/config.h.in"
8087 
8088 # The spec.gmk file contains all variables for the make system.
8089 ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in"
8090 
8091 # The hotspot-spec.gmk file contains legacy variables for the hotspot make system.
8092 ac_config_files="$ac_config_files $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in"
8093 
8094 # The bootcycle-spec.gmk file contains support for boot cycle builds.
8095 ac_config_files="$ac_config_files $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in"
8096 
8097 # The compare.sh is used to compare the build output to other builds.
8098 ac_config_files="$ac_config_files $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in"
8099 
8100 # Spec.sh is currently used by compare-objects.sh
8101 ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.sh:$AUTOCONF_DIR/spec.sh.in"
8102 
8103 # The generated Makefile knows where the spec.gmk is and where the source is.
8104 # You can run make from the OUTPUT_ROOT, or from the top-level Makefile
8105 # which will look for generated configurations
8106 ac_config_files="$ac_config_files $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in"
8107 
8108 
8109 # Save the arguments given to us
8110 echo "$CONFIGURE_COMMAND_LINE" > $OUTPUT_ROOT/configure-arguments
8111 
8112 
8113 # Must be done before we can call HELP_MSG_MISSING_DEPENDENCY.
8114 
8115     for ac_prog in apt-get yum port pkgutil pkgadd
8116 do
8117   # Extract the first word of "$ac_prog", so it can be a program name with args.
8118 set dummy $ac_prog; ac_word=$2
8119 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8120 $as_echo_n "checking for $ac_word... " >&6; }
8121 if ${ac_cv_prog_PKGHANDLER+:} false; then :
8122   $as_echo_n "(cached) " >&6
8123 else
8124   if test -n "$PKGHANDLER"; then
8125   ac_cv_prog_PKGHANDLER="$PKGHANDLER" # Let the user override the test.
8126 else
8127 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8128 for as_dir in $PATH
8129 do
8130   IFS=$as_save_IFS
8131   test -z "$as_dir" && as_dir=.
8132     for ac_exec_ext in '' $ac_executable_extensions; do
8133   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8134     ac_cv_prog_PKGHANDLER="$ac_prog"
8135     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8136     break 2
8137   fi
8138 done
8139   done
8140 IFS=$as_save_IFS
8141 
8142 fi
8143 fi
8144 PKGHANDLER=$ac_cv_prog_PKGHANDLER
8145 if test -n "$PKGHANDLER"; then
8146   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKGHANDLER" >&5
8147 $as_echo "$PKGHANDLER" >&6; }
8148 else
8149   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8150 $as_echo "no" >&6; }
8151 fi
8152 
8153 
8154   test -n "$PKGHANDLER" && break
8155 done
8156 
8157 
8158 
8159 # Setup tools that requires more complex handling, or that is not needed by the configure script.
8160 
8161 
8162   # We need to find a recent version of GNU make. Especially on Solaris, this can be tricky.
8163   if test "x$MAKE" != x; then
8164     # User has supplied a make, test it.
8165     if test ! -f "$MAKE"; then
8166       as_fn_error $? "The specified make (by MAKE=$MAKE) is not found." "$LINENO" 5
8167     fi
8168 
8169   MAKE_CANDIDATE=""$MAKE""
8170   DESCRIPTION="user supplied MAKE=$MAKE"
8171   if test "x$MAKE_CANDIDATE" != x; then
8172     { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
8173 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
8174     MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
8175     IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
8176     if test "x$IS_GNU_MAKE" = x; then
8177       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
8178 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
8179     else
8180       IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'`
8181       if test "x$IS_MODERN_MAKE" = x; then
8182         { $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
8183 $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;}
8184       else
8185         if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
8186           if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8187             MAKE_EXPECTED_ENV='cygwin'
8188           elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8189             MAKE_EXPECTED_ENV='msys'
8190           else
8191             as_fn_error $? "Unknown Windows environment" "$LINENO" 5
8192           fi
8193           MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
8194           IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
8195         else
8196           # Not relevant for non-Windows
8197           IS_MAKE_CORRECT_ENV=true
8198         fi
8199         if test "x$IS_MAKE_CORRECT_ENV" = x; then
8200           { $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
8201 $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;}
8202         else
8203           FOUND_MAKE=$MAKE_CANDIDATE
8204 
8205   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8206 
8207   # First separate the path from the arguments. This will split at the first
8208   # space.
8209   complete="$FOUND_MAKE"
8210   path="${complete%% *}"
8211   tmp="$complete EOL"
8212   arguments="${tmp#* }"
8213 
8214   # Input might be given as Windows format, start by converting to
8215   # unix format.
8216   new_path=`$CYGPATH -u "$path"`
8217 
8218   # Now try to locate executable using which
8219   new_path=`$WHICH "$new_path" 2> /dev/null`
8220   # bat and cmd files are not always considered executable in cygwin causing which
8221   # to not find them
8222   if test "x$new_path" = x \
8223            && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8224            && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8225     new_path=`$CYGPATH -u "$path"`
8226   fi
8227   if test "x$new_path" = x; then
8228     # Oops. Which didn't find the executable.
8229     # The splitting of arguments from the executable at a space might have been incorrect,
8230     # since paths with space are more likely in Windows. Give it another try with the whole
8231     # argument.
8232     path="$complete"
8233     arguments="EOL"
8234     new_path=`$CYGPATH -u "$path"`
8235     new_path=`$WHICH "$new_path" 2> /dev/null`
8236     # bat and cmd files are not always considered executable in cygwin causing which
8237     # to not find them
8238     if test "x$new_path" = x \
8239              && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8240              && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8241       new_path=`$CYGPATH -u "$path"`
8242     fi
8243     if test "x$new_path" = x; then
8244       # It's still not found. Now this is an unrecoverable error.
8245       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8246 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8247       has_space=`$ECHO "$complete" | $GREP " "`
8248       if test "x$has_space" != x; then
8249         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8250 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8251       fi
8252       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8253     fi
8254   fi
8255 
8256   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
8257   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
8258   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
8259   # "foo.exe" is OK but "foo" is an error.
8260   #
8261   # This test is therefore slightly more accurate than "test -f" to check for file precense.
8262   # It is also a way to make sure we got the proper file name for the real test later on.
8263   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
8264   if test "x$test_shortpath" = x; then
8265     # Short path failed, file does not exist as specified.
8266     # Try adding .exe or .cmd
8267     if test -f "${new_path}.exe"; then
8268        input_to_shortpath="${new_path}.exe"
8269     elif test -f "${new_path}.cmd"; then
8270        input_to_shortpath="${new_path}.cmd"
8271     else
8272       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
8273 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
8274       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
8275 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
8276       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8277     fi
8278   else
8279     input_to_shortpath="$new_path"
8280   fi
8281 
8282   # Call helper function which possibly converts this using DOS-style short mode.
8283   # If so, the updated path is stored in $new_path.
8284   new_path="$input_to_shortpath"
8285 
8286   input_path="$input_to_shortpath"
8287   # Check if we need to convert this using DOS-style short mode. If the path
8288   # contains just simple characters, use it. Otherwise (spaces, weird characters),
8289   # take no chances and rewrite it.
8290   # Note: m4 eats our [], so we need to use [ and ] instead.
8291   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
8292   if test "x$has_forbidden_chars" != x; then
8293     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8294     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
8295     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
8296     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
8297       # Going to short mode and back again did indeed matter. Since short mode is
8298       # case insensitive, let's make it lowercase to improve readability.
8299       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8300       # Now convert it back to Unix-stile (cygpath)
8301       input_path=`$CYGPATH -u "$shortmode_path"`
8302       new_path="$input_path"
8303     fi
8304   fi
8305 
8306   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
8307   if test "x$test_cygdrive_prefix" = x; then
8308     # As a simple fix, exclude /usr/bin since it's not a real path.
8309     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
8310       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
8311       # a path prefixed by /cygdrive for fixpath to work.
8312       new_path="$CYGWIN_ROOT_PATH$input_path"
8313     fi
8314   fi
8315 
8316   # remove trailing .exe if any
8317   new_path="${new_path/%.exe/}"
8318 
8319   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8320 
8321   # First separate the path from the arguments. This will split at the first
8322   # space.
8323   complete="$FOUND_MAKE"
8324   path="${complete%% *}"
8325   tmp="$complete EOL"
8326   arguments="${tmp#* }"
8327 
8328   # Input might be given as Windows format, start by converting to
8329   # unix format.
8330   new_path="$path"
8331 
8332   windows_path="$new_path"
8333   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8334     unix_path=`$CYGPATH -u "$windows_path"`
8335     new_path="$unix_path"
8336   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8337     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8338     new_path="$unix_path"
8339   fi
8340 
8341 
8342   # Now try to locate executable using which
8343   new_path=`$WHICH "$new_path" 2> /dev/null`
8344 
8345   if test "x$new_path" = x; then
8346     # Oops. Which didn't find the executable.
8347     # The splitting of arguments from the executable at a space might have been incorrect,
8348     # since paths with space are more likely in Windows. Give it another try with the whole
8349     # argument.
8350     path="$complete"
8351     arguments="EOL"
8352     new_path="$path"
8353 
8354   windows_path="$new_path"
8355   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8356     unix_path=`$CYGPATH -u "$windows_path"`
8357     new_path="$unix_path"
8358   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8359     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8360     new_path="$unix_path"
8361   fi
8362 
8363 
8364     new_path=`$WHICH "$new_path" 2> /dev/null`
8365 
8366     if test "x$new_path" = x; then
8367       # It's still not found. Now this is an unrecoverable error.
8368       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8369 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8370       has_space=`$ECHO "$complete" | $GREP " "`
8371       if test "x$has_space" != x; then
8372         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8373 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8374       fi
8375       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8376     fi
8377   fi
8378 
8379   # Now new_path has a complete unix path to the binary
8380   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
8381     # Keep paths in /bin as-is, but remove trailing .exe if any
8382     new_path="${new_path/%.exe/}"
8383     # Do not save /bin paths to all_fixpath_prefixes!
8384   else
8385     # Not in mixed or Windows style, start by that.
8386     new_path=`cmd //c echo $new_path`
8387 
8388   input_path="$new_path"
8389   # Check if we need to convert this using DOS-style short mode. If the path
8390   # contains just simple characters, use it. Otherwise (spaces, weird characters),
8391   # take no chances and rewrite it.
8392   # Note: m4 eats our [], so we need to use [ and ] instead.
8393   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
8394   if test "x$has_forbidden_chars" != x; then
8395     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8396     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8397   fi
8398 
8399     # Output is in $new_path
8400 
8401   windows_path="$new_path"
8402   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8403     unix_path=`$CYGPATH -u "$windows_path"`
8404     new_path="$unix_path"
8405   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8406     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8407     new_path="$unix_path"
8408   fi
8409 
8410     # remove trailing .exe if any
8411     new_path="${new_path/%.exe/}"
8412 
8413     # Save the first 10 bytes of this path to the storage, so fixpath can work.
8414     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
8415   fi
8416 
8417   else
8418     # We're on a posix platform. Hooray! :)
8419     # First separate the path from the arguments. This will split at the first
8420     # space.
8421     complete="$FOUND_MAKE"
8422     path="${complete%% *}"
8423     tmp="$complete EOL"
8424     arguments="${tmp#* }"
8425 
8426     # Cannot rely on the command "which" here since it doesn't always work.
8427     is_absolute_path=`$ECHO "$path" | $GREP ^/`
8428     if test -z "$is_absolute_path"; then
8429       # Path to executable is not absolute. Find it.
8430       IFS_save="$IFS"
8431       IFS=:
8432       for p in $PATH; do
8433         if test -f "$p/$path" && test -x "$p/$path"; then
8434           new_path="$p/$path"
8435           break
8436         fi
8437       done
8438       IFS="$IFS_save"
8439     else
8440       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
8441 $as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
8442       new_path="$path"
8443     fi
8444 
8445     if test "x$new_path" = x; then
8446         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8447 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8448         has_space=`$ECHO "$complete" | $GREP " "`
8449         if test "x$has_space" != x; then
8450           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
8451 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
8452         fi
8453         as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8454       fi
8455   fi
8456 
8457       # Now join together the path and the arguments once again
8458       if test "x$arguments" != xEOL; then
8459         new_complete="$new_path ${arguments% *}"
8460       else
8461         new_complete="$new_path"
8462       fi
8463 
8464   if test "x$complete" != "x$new_complete"; then
8465       FOUND_MAKE="$new_complete"
8466       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
8467 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
8468     fi
8469 
8470         fi
8471       fi
8472     fi
8473   fi
8474 
8475     if test "x$FOUND_MAKE" = x; then
8476       as_fn_error $? "The specified make (by MAKE=$MAKE) is not GNU make 3.81 or newer." "$LINENO" 5
8477     fi
8478   else
8479     # Try our hardest to locate a correct version of GNU make
8480     for ac_prog in gmake
8481 do
8482   # Extract the first word of "$ac_prog", so it can be a program name with args.
8483 set dummy $ac_prog; ac_word=$2
8484 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8485 $as_echo_n "checking for $ac_word... " >&6; }
8486 if ${ac_cv_path_CHECK_GMAKE+:} false; then :
8487   $as_echo_n "(cached) " >&6
8488 else
8489   case $CHECK_GMAKE in
8490   [\\/]* | ?:[\\/]*)
8491   ac_cv_path_CHECK_GMAKE="$CHECK_GMAKE" # Let the user override the test with a path.
8492   ;;
8493   *)
8494   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8495 for as_dir in $PATH
8496 do
8497   IFS=$as_save_IFS
8498   test -z "$as_dir" && as_dir=.
8499     for ac_exec_ext in '' $ac_executable_extensions; do
8500   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8501     ac_cv_path_CHECK_GMAKE="$as_dir/$ac_word$ac_exec_ext"
8502     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8503     break 2
8504   fi
8505 done
8506   done
8507 IFS=$as_save_IFS
8508 
8509   ;;
8510 esac
8511 fi
8512 CHECK_GMAKE=$ac_cv_path_CHECK_GMAKE
8513 if test -n "$CHECK_GMAKE"; then
8514   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_GMAKE" >&5
8515 $as_echo "$CHECK_GMAKE" >&6; }
8516 else
8517   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8518 $as_echo "no" >&6; }
8519 fi
8520 
8521 
8522   test -n "$CHECK_GMAKE" && break
8523 done
8524 
8525 
8526   MAKE_CANDIDATE=""$CHECK_GMAKE""
8527   DESCRIPTION="gmake in PATH"
8528   if test "x$MAKE_CANDIDATE" != x; then
8529     { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
8530 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
8531     MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
8532     IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
8533     if test "x$IS_GNU_MAKE" = x; then
8534       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
8535 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
8536     else
8537       IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'`
8538       if test "x$IS_MODERN_MAKE" = x; then
8539         { $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
8540 $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;}
8541       else
8542         if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
8543           if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8544             MAKE_EXPECTED_ENV='cygwin'
8545           elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8546             MAKE_EXPECTED_ENV='msys'
8547           else
8548             as_fn_error $? "Unknown Windows environment" "$LINENO" 5
8549           fi
8550           MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
8551           IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
8552         else
8553           # Not relevant for non-Windows
8554           IS_MAKE_CORRECT_ENV=true
8555         fi
8556         if test "x$IS_MAKE_CORRECT_ENV" = x; then
8557           { $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
8558 $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;}
8559         else
8560           FOUND_MAKE=$MAKE_CANDIDATE
8561 
8562   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8563 
8564   # First separate the path from the arguments. This will split at the first
8565   # space.
8566   complete="$FOUND_MAKE"
8567   path="${complete%% *}"
8568   tmp="$complete EOL"
8569   arguments="${tmp#* }"
8570 
8571   # Input might be given as Windows format, start by converting to
8572   # unix format.
8573   new_path=`$CYGPATH -u "$path"`
8574 
8575   # Now try to locate executable using which
8576   new_path=`$WHICH "$new_path" 2> /dev/null`
8577   # bat and cmd files are not always considered executable in cygwin causing which
8578   # to not find them
8579   if test "x$new_path" = x \
8580            && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8581            && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8582     new_path=`$CYGPATH -u "$path"`
8583   fi
8584   if test "x$new_path" = x; then
8585     # Oops. Which didn't find the executable.
8586     # The splitting of arguments from the executable at a space might have been incorrect,
8587     # since paths with space are more likely in Windows. Give it another try with the whole
8588     # argument.
8589     path="$complete"
8590     arguments="EOL"
8591     new_path=`$CYGPATH -u "$path"`
8592     new_path=`$WHICH "$new_path" 2> /dev/null`
8593     # bat and cmd files are not always considered executable in cygwin causing which
8594     # to not find them
8595     if test "x$new_path" = x \
8596              && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8597              && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8598       new_path=`$CYGPATH -u "$path"`
8599     fi
8600     if test "x$new_path" = x; then
8601       # It's still not found. Now this is an unrecoverable error.
8602       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8603 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8604       has_space=`$ECHO "$complete" | $GREP " "`
8605       if test "x$has_space" != x; then
8606         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8607 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8608       fi
8609       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8610     fi
8611   fi
8612 
8613   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
8614   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
8615   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
8616   # "foo.exe" is OK but "foo" is an error.
8617   #
8618   # This test is therefore slightly more accurate than "test -f" to check for file precense.
8619   # It is also a way to make sure we got the proper file name for the real test later on.
8620   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
8621   if test "x$test_shortpath" = x; then
8622     # Short path failed, file does not exist as specified.
8623     # Try adding .exe or .cmd
8624     if test -f "${new_path}.exe"; then
8625        input_to_shortpath="${new_path}.exe"
8626     elif test -f "${new_path}.cmd"; then
8627        input_to_shortpath="${new_path}.cmd"
8628     else
8629       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
8630 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
8631       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
8632 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
8633       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8634     fi
8635   else
8636     input_to_shortpath="$new_path"
8637   fi
8638 
8639   # Call helper function which possibly converts this using DOS-style short mode.
8640   # If so, the updated path is stored in $new_path.
8641   new_path="$input_to_shortpath"
8642 
8643   input_path="$input_to_shortpath"
8644   # Check if we need to convert this using DOS-style short mode. If the path
8645   # contains just simple characters, use it. Otherwise (spaces, weird characters),
8646   # take no chances and rewrite it.
8647   # Note: m4 eats our [], so we need to use [ and ] instead.
8648   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
8649   if test "x$has_forbidden_chars" != x; then
8650     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8651     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
8652     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
8653     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
8654       # Going to short mode and back again did indeed matter. Since short mode is
8655       # case insensitive, let's make it lowercase to improve readability.
8656       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8657       # Now convert it back to Unix-stile (cygpath)
8658       input_path=`$CYGPATH -u "$shortmode_path"`
8659       new_path="$input_path"
8660     fi
8661   fi
8662 
8663   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
8664   if test "x$test_cygdrive_prefix" = x; then
8665     # As a simple fix, exclude /usr/bin since it's not a real path.
8666     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
8667       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
8668       # a path prefixed by /cygdrive for fixpath to work.
8669       new_path="$CYGWIN_ROOT_PATH$input_path"
8670     fi
8671   fi
8672 
8673   # remove trailing .exe if any
8674   new_path="${new_path/%.exe/}"
8675 
8676   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8677 
8678   # First separate the path from the arguments. This will split at the first
8679   # space.
8680   complete="$FOUND_MAKE"
8681   path="${complete%% *}"
8682   tmp="$complete EOL"
8683   arguments="${tmp#* }"
8684 
8685   # Input might be given as Windows format, start by converting to
8686   # unix format.
8687   new_path="$path"
8688 
8689   windows_path="$new_path"
8690   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8691     unix_path=`$CYGPATH -u "$windows_path"`
8692     new_path="$unix_path"
8693   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8694     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8695     new_path="$unix_path"
8696   fi
8697 
8698 
8699   # Now try to locate executable using which
8700   new_path=`$WHICH "$new_path" 2> /dev/null`
8701 
8702   if test "x$new_path" = x; then
8703     # Oops. Which didn't find the executable.
8704     # The splitting of arguments from the executable at a space might have been incorrect,
8705     # since paths with space are more likely in Windows. Give it another try with the whole
8706     # argument.
8707     path="$complete"
8708     arguments="EOL"
8709     new_path="$path"
8710 
8711   windows_path="$new_path"
8712   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8713     unix_path=`$CYGPATH -u "$windows_path"`
8714     new_path="$unix_path"
8715   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8716     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8717     new_path="$unix_path"
8718   fi
8719 
8720 
8721     new_path=`$WHICH "$new_path" 2> /dev/null`
8722 
8723     if test "x$new_path" = x; then
8724       # It's still not found. Now this is an unrecoverable error.
8725       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8726 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8727       has_space=`$ECHO "$complete" | $GREP " "`
8728       if test "x$has_space" != x; then
8729         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8730 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8731       fi
8732       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8733     fi
8734   fi
8735 
8736   # Now new_path has a complete unix path to the binary
8737   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
8738     # Keep paths in /bin as-is, but remove trailing .exe if any
8739     new_path="${new_path/%.exe/}"
8740     # Do not save /bin paths to all_fixpath_prefixes!
8741   else
8742     # Not in mixed or Windows style, start by that.
8743     new_path=`cmd //c echo $new_path`
8744 
8745   input_path="$new_path"
8746   # Check if we need to convert this using DOS-style short mode. If the path
8747   # contains just simple characters, use it. Otherwise (spaces, weird characters),
8748   # take no chances and rewrite it.
8749   # Note: m4 eats our [], so we need to use [ and ] instead.
8750   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
8751   if test "x$has_forbidden_chars" != x; then
8752     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8753     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8754   fi
8755 
8756     # Output is in $new_path
8757 
8758   windows_path="$new_path"
8759   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8760     unix_path=`$CYGPATH -u "$windows_path"`
8761     new_path="$unix_path"
8762   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8763     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8764     new_path="$unix_path"
8765   fi
8766 
8767     # remove trailing .exe if any
8768     new_path="${new_path/%.exe/}"
8769 
8770     # Save the first 10 bytes of this path to the storage, so fixpath can work.
8771     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
8772   fi
8773 
8774   else
8775     # We're on a posix platform. Hooray! :)
8776     # First separate the path from the arguments. This will split at the first
8777     # space.
8778     complete="$FOUND_MAKE"
8779     path="${complete%% *}"
8780     tmp="$complete EOL"
8781     arguments="${tmp#* }"
8782 
8783     # Cannot rely on the command "which" here since it doesn't always work.
8784     is_absolute_path=`$ECHO "$path" | $GREP ^/`
8785     if test -z "$is_absolute_path"; then
8786       # Path to executable is not absolute. Find it.
8787       IFS_save="$IFS"
8788       IFS=:
8789       for p in $PATH; do
8790         if test -f "$p/$path" && test -x "$p/$path"; then
8791           new_path="$p/$path"
8792           break
8793         fi
8794       done
8795       IFS="$IFS_save"
8796     else
8797       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
8798 $as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
8799       new_path="$path"
8800     fi
8801 
8802     if test "x$new_path" = x; then
8803         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8804 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8805         has_space=`$ECHO "$complete" | $GREP " "`
8806         if test "x$has_space" != x; then
8807           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
8808 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
8809         fi
8810         as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8811       fi
8812   fi
8813 
8814       # Now join together the path and the arguments once again
8815       if test "x$arguments" != xEOL; then
8816         new_complete="$new_path ${arguments% *}"
8817       else
8818         new_complete="$new_path"
8819       fi
8820 
8821   if test "x$complete" != "x$new_complete"; then
8822       FOUND_MAKE="$new_complete"
8823       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
8824 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
8825     fi
8826 
8827         fi
8828       fi
8829     fi
8830   fi
8831 
8832 
8833     if test "x$FOUND_MAKE" = x; then
8834       for ac_prog in make
8835 do
8836   # Extract the first word of "$ac_prog", so it can be a program name with args.
8837 set dummy $ac_prog; ac_word=$2
8838 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8839 $as_echo_n "checking for $ac_word... " >&6; }
8840 if ${ac_cv_path_CHECK_MAKE+:} false; then :
8841   $as_echo_n "(cached) " >&6
8842 else
8843   case $CHECK_MAKE in
8844   [\\/]* | ?:[\\/]*)
8845   ac_cv_path_CHECK_MAKE="$CHECK_MAKE" # Let the user override the test with a path.
8846   ;;
8847   *)
8848   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8849 for as_dir in $PATH
8850 do
8851   IFS=$as_save_IFS
8852   test -z "$as_dir" && as_dir=.
8853     for ac_exec_ext in '' $ac_executable_extensions; do
8854   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8855     ac_cv_path_CHECK_MAKE="$as_dir/$ac_word$ac_exec_ext"
8856     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8857     break 2
8858   fi
8859 done
8860   done
8861 IFS=$as_save_IFS
8862 
8863   ;;
8864 esac
8865 fi
8866 CHECK_MAKE=$ac_cv_path_CHECK_MAKE
8867 if test -n "$CHECK_MAKE"; then
8868   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_MAKE" >&5
8869 $as_echo "$CHECK_MAKE" >&6; }
8870 else
8871   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8872 $as_echo "no" >&6; }
8873 fi
8874 
8875 
8876   test -n "$CHECK_MAKE" && break
8877 done
8878 
8879 
8880   MAKE_CANDIDATE=""$CHECK_MAKE""
8881   DESCRIPTION="make in PATH"
8882   if test "x$MAKE_CANDIDATE" != x; then
8883     { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
8884 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
8885     MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
8886     IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
8887     if test "x$IS_GNU_MAKE" = x; then
8888       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
8889 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
8890     else
8891       IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'`
8892       if test "x$IS_MODERN_MAKE" = x; then
8893         { $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
8894 $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;}
8895       else
8896         if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
8897           if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8898             MAKE_EXPECTED_ENV='cygwin'
8899           elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8900             MAKE_EXPECTED_ENV='msys'
8901           else
8902             as_fn_error $? "Unknown Windows environment" "$LINENO" 5
8903           fi
8904           MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
8905           IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
8906         else
8907           # Not relevant for non-Windows
8908           IS_MAKE_CORRECT_ENV=true
8909         fi
8910         if test "x$IS_MAKE_CORRECT_ENV" = x; then
8911           { $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
8912 $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;}
8913         else
8914           FOUND_MAKE=$MAKE_CANDIDATE
8915 
8916   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8917 
8918   # First separate the path from the arguments. This will split at the first
8919   # space.
8920   complete="$FOUND_MAKE"
8921   path="${complete%% *}"
8922   tmp="$complete EOL"
8923   arguments="${tmp#* }"
8924 
8925   # Input might be given as Windows format, start by converting to
8926   # unix format.
8927   new_path=`$CYGPATH -u "$path"`
8928 
8929   # Now try to locate executable using which
8930   new_path=`$WHICH "$new_path" 2> /dev/null`
8931   # bat and cmd files are not always considered executable in cygwin causing which
8932   # to not find them
8933   if test "x$new_path" = x \
8934            && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8935            && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8936     new_path=`$CYGPATH -u "$path"`
8937   fi
8938   if test "x$new_path" = x; then
8939     # Oops. Which didn't find the executable.
8940     # The splitting of arguments from the executable at a space might have been incorrect,
8941     # since paths with space are more likely in Windows. Give it another try with the whole
8942     # argument.
8943     path="$complete"
8944     arguments="EOL"
8945     new_path=`$CYGPATH -u "$path"`
8946     new_path=`$WHICH "$new_path" 2> /dev/null`
8947     # bat and cmd files are not always considered executable in cygwin causing which
8948     # to not find them
8949     if test "x$new_path" = x \
8950              && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8951              && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8952       new_path=`$CYGPATH -u "$path"`
8953     fi
8954     if test "x$new_path" = x; then
8955       # It's still not found. Now this is an unrecoverable error.
8956       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8957 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8958       has_space=`$ECHO "$complete" | $GREP " "`
8959       if test "x$has_space" != x; then
8960         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8961 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8962       fi
8963       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8964     fi
8965   fi
8966 
8967   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
8968   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
8969   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
8970   # "foo.exe" is OK but "foo" is an error.
8971   #
8972   # This test is therefore slightly more accurate than "test -f" to check for file precense.
8973   # It is also a way to make sure we got the proper file name for the real test later on.
8974   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
8975   if test "x$test_shortpath" = x; then
8976     # Short path failed, file does not exist as specified.
8977     # Try adding .exe or .cmd
8978     if test -f "${new_path}.exe"; then
8979        input_to_shortpath="${new_path}.exe"
8980     elif test -f "${new_path}.cmd"; then
8981        input_to_shortpath="${new_path}.cmd"
8982     else
8983       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
8984 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
8985       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
8986 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
8987       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8988     fi
8989   else
8990     input_to_shortpath="$new_path"
8991   fi
8992 
8993   # Call helper function which possibly converts this using DOS-style short mode.
8994   # If so, the updated path is stored in $new_path.
8995   new_path="$input_to_shortpath"
8996 
8997   input_path="$input_to_shortpath"
8998   # Check if we need to convert this using DOS-style short mode. If the path
8999   # contains just simple characters, use it. Otherwise (spaces, weird characters),
9000   # take no chances and rewrite it.
9001   # Note: m4 eats our [], so we need to use [ and ] instead.
9002   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
9003   if test "x$has_forbidden_chars" != x; then
9004     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9005     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
9006     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
9007     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
9008       # Going to short mode and back again did indeed matter. Since short mode is
9009       # case insensitive, let's make it lowercase to improve readability.
9010       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9011       # Now convert it back to Unix-stile (cygpath)
9012       input_path=`$CYGPATH -u "$shortmode_path"`
9013       new_path="$input_path"
9014     fi
9015   fi
9016 
9017   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
9018   if test "x$test_cygdrive_prefix" = x; then
9019     # As a simple fix, exclude /usr/bin since it's not a real path.
9020     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
9021       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
9022       # a path prefixed by /cygdrive for fixpath to work.
9023       new_path="$CYGWIN_ROOT_PATH$input_path"
9024     fi
9025   fi
9026 
9027   # remove trailing .exe if any
9028   new_path="${new_path/%.exe/}"
9029 
9030   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9031 
9032   # First separate the path from the arguments. This will split at the first
9033   # space.
9034   complete="$FOUND_MAKE"
9035   path="${complete%% *}"
9036   tmp="$complete EOL"
9037   arguments="${tmp#* }"
9038 
9039   # Input might be given as Windows format, start by converting to
9040   # unix format.
9041   new_path="$path"
9042 
9043   windows_path="$new_path"
9044   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9045     unix_path=`$CYGPATH -u "$windows_path"`
9046     new_path="$unix_path"
9047   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9048     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9049     new_path="$unix_path"
9050   fi
9051 
9052 
9053   # Now try to locate executable using which
9054   new_path=`$WHICH "$new_path" 2> /dev/null`
9055 
9056   if test "x$new_path" = x; then
9057     # Oops. Which didn't find the executable.
9058     # The splitting of arguments from the executable at a space might have been incorrect,
9059     # since paths with space are more likely in Windows. Give it another try with the whole
9060     # argument.
9061     path="$complete"
9062     arguments="EOL"
9063     new_path="$path"
9064 
9065   windows_path="$new_path"
9066   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9067     unix_path=`$CYGPATH -u "$windows_path"`
9068     new_path="$unix_path"
9069   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9070     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9071     new_path="$unix_path"
9072   fi
9073 
9074 
9075     new_path=`$WHICH "$new_path" 2> /dev/null`
9076 
9077     if test "x$new_path" = x; then
9078       # It's still not found. Now this is an unrecoverable error.
9079       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9080 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9081       has_space=`$ECHO "$complete" | $GREP " "`
9082       if test "x$has_space" != x; then
9083         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9084 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9085       fi
9086       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9087     fi
9088   fi
9089 
9090   # Now new_path has a complete unix path to the binary
9091   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
9092     # Keep paths in /bin as-is, but remove trailing .exe if any
9093     new_path="${new_path/%.exe/}"
9094     # Do not save /bin paths to all_fixpath_prefixes!
9095   else
9096     # Not in mixed or Windows style, start by that.
9097     new_path=`cmd //c echo $new_path`
9098 
9099   input_path="$new_path"
9100   # Check if we need to convert this using DOS-style short mode. If the path
9101   # contains just simple characters, use it. Otherwise (spaces, weird characters),
9102   # take no chances and rewrite it.
9103   # Note: m4 eats our [], so we need to use [ and ] instead.
9104   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
9105   if test "x$has_forbidden_chars" != x; then
9106     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9107     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9108   fi
9109 
9110     # Output is in $new_path
9111 
9112   windows_path="$new_path"
9113   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9114     unix_path=`$CYGPATH -u "$windows_path"`
9115     new_path="$unix_path"
9116   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9117     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9118     new_path="$unix_path"
9119   fi
9120 
9121     # remove trailing .exe if any
9122     new_path="${new_path/%.exe/}"
9123 
9124     # Save the first 10 bytes of this path to the storage, so fixpath can work.
9125     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
9126   fi
9127 
9128   else
9129     # We're on a posix platform. Hooray! :)
9130     # First separate the path from the arguments. This will split at the first
9131     # space.
9132     complete="$FOUND_MAKE"
9133     path="${complete%% *}"
9134     tmp="$complete EOL"
9135     arguments="${tmp#* }"
9136 
9137     # Cannot rely on the command "which" here since it doesn't always work.
9138     is_absolute_path=`$ECHO "$path" | $GREP ^/`
9139     if test -z "$is_absolute_path"; then
9140       # Path to executable is not absolute. Find it.
9141       IFS_save="$IFS"
9142       IFS=:
9143       for p in $PATH; do
9144         if test -f "$p/$path" && test -x "$p/$path"; then
9145           new_path="$p/$path"
9146           break
9147         fi
9148       done
9149       IFS="$IFS_save"
9150     else
9151       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
9152 $as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
9153       new_path="$path"
9154     fi
9155 
9156     if test "x$new_path" = x; then
9157         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9158 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9159         has_space=`$ECHO "$complete" | $GREP " "`
9160         if test "x$has_space" != x; then
9161           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
9162 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
9163         fi
9164         as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9165       fi
9166   fi
9167 
9168       # Now join together the path and the arguments once again
9169       if test "x$arguments" != xEOL; then
9170         new_complete="$new_path ${arguments% *}"
9171       else
9172         new_complete="$new_path"
9173       fi
9174 
9175   if test "x$complete" != "x$new_complete"; then
9176       FOUND_MAKE="$new_complete"
9177       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
9178 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
9179     fi
9180 
9181         fi
9182       fi
9183     fi
9184   fi
9185 
9186     fi
9187 
9188     if test "x$FOUND_MAKE" = x; then
9189       if test "x$TOOLS_DIR" != x; then
9190         # We have a tools-dir, check that as well before giving up.
9191         OLD_PATH=$PATH
9192         PATH=$TOOLS_DIR:$PATH
9193         for ac_prog in gmake
9194 do
9195   # Extract the first word of "$ac_prog", so it can be a program name with args.
9196 set dummy $ac_prog; ac_word=$2
9197 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9198 $as_echo_n "checking for $ac_word... " >&6; }
9199 if ${ac_cv_path_CHECK_TOOLSDIR_GMAKE+:} false; then :
9200   $as_echo_n "(cached) " >&6
9201 else
9202   case $CHECK_TOOLSDIR_GMAKE in
9203   [\\/]* | ?:[\\/]*)
9204   ac_cv_path_CHECK_TOOLSDIR_GMAKE="$CHECK_TOOLSDIR_GMAKE" # Let the user override the test with a path.
9205   ;;
9206   *)
9207   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9208 for as_dir in $PATH
9209 do
9210   IFS=$as_save_IFS
9211   test -z "$as_dir" && as_dir=.
9212     for ac_exec_ext in '' $ac_executable_extensions; do
9213   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9214     ac_cv_path_CHECK_TOOLSDIR_GMAKE="$as_dir/$ac_word$ac_exec_ext"
9215     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9216     break 2
9217   fi
9218 done
9219   done
9220 IFS=$as_save_IFS
9221 
9222   ;;
9223 esac
9224 fi
9225 CHECK_TOOLSDIR_GMAKE=$ac_cv_path_CHECK_TOOLSDIR_GMAKE
9226 if test -n "$CHECK_TOOLSDIR_GMAKE"; then
9227   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_GMAKE" >&5
9228 $as_echo "$CHECK_TOOLSDIR_GMAKE" >&6; }
9229 else
9230   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9231 $as_echo "no" >&6; }
9232 fi
9233 
9234 
9235   test -n "$CHECK_TOOLSDIR_GMAKE" && break
9236 done
9237 
9238 
9239   MAKE_CANDIDATE=""$CHECK_TOOLSDIR_GMAKE""
9240   DESCRIPTION="gmake in tools-dir"
9241   if test "x$MAKE_CANDIDATE" != x; then
9242     { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
9243 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
9244     MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
9245     IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
9246     if test "x$IS_GNU_MAKE" = x; then
9247       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
9248 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
9249     else
9250       IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'`
9251       if test "x$IS_MODERN_MAKE" = x; then
9252         { $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
9253 $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;}
9254       else
9255         if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
9256           if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9257             MAKE_EXPECTED_ENV='cygwin'
9258           elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9259             MAKE_EXPECTED_ENV='msys'
9260           else
9261             as_fn_error $? "Unknown Windows environment" "$LINENO" 5
9262           fi
9263           MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
9264           IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
9265         else
9266           # Not relevant for non-Windows
9267           IS_MAKE_CORRECT_ENV=true
9268         fi
9269         if test "x$IS_MAKE_CORRECT_ENV" = x; then
9270           { $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
9271 $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;}
9272         else
9273           FOUND_MAKE=$MAKE_CANDIDATE
9274 
9275   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9276 
9277   # First separate the path from the arguments. This will split at the first
9278   # space.
9279   complete="$FOUND_MAKE"
9280   path="${complete%% *}"
9281   tmp="$complete EOL"
9282   arguments="${tmp#* }"
9283 
9284   # Input might be given as Windows format, start by converting to
9285   # unix format.
9286   new_path=`$CYGPATH -u "$path"`
9287 
9288   # Now try to locate executable using which
9289   new_path=`$WHICH "$new_path" 2> /dev/null`
9290   # bat and cmd files are not always considered executable in cygwin causing which
9291   # to not find them
9292   if test "x$new_path" = x \
9293            && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
9294            && test "x`$LS \"$path\" 2>/dev/null`" != x; then
9295     new_path=`$CYGPATH -u "$path"`
9296   fi
9297   if test "x$new_path" = x; then
9298     # Oops. Which didn't find the executable.
9299     # The splitting of arguments from the executable at a space might have been incorrect,
9300     # since paths with space are more likely in Windows. Give it another try with the whole
9301     # argument.
9302     path="$complete"
9303     arguments="EOL"
9304     new_path=`$CYGPATH -u "$path"`
9305     new_path=`$WHICH "$new_path" 2> /dev/null`
9306     # bat and cmd files are not always considered executable in cygwin causing which
9307     # to not find them
9308     if test "x$new_path" = x \
9309              && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
9310              && test "x`$LS \"$path\" 2>/dev/null`" != x; then
9311       new_path=`$CYGPATH -u "$path"`
9312     fi
9313     if test "x$new_path" = x; then
9314       # It's still not found. Now this is an unrecoverable error.
9315       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9316 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9317       has_space=`$ECHO "$complete" | $GREP " "`
9318       if test "x$has_space" != x; then
9319         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9320 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9321       fi
9322       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9323     fi
9324   fi
9325 
9326   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
9327   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
9328   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
9329   # "foo.exe" is OK but "foo" is an error.
9330   #
9331   # This test is therefore slightly more accurate than "test -f" to check for file precense.
9332   # It is also a way to make sure we got the proper file name for the real test later on.
9333   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
9334   if test "x$test_shortpath" = x; then
9335     # Short path failed, file does not exist as specified.
9336     # Try adding .exe or .cmd
9337     if test -f "${new_path}.exe"; then
9338        input_to_shortpath="${new_path}.exe"
9339     elif test -f "${new_path}.cmd"; then
9340        input_to_shortpath="${new_path}.cmd"
9341     else
9342       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
9343 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
9344       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
9345 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
9346       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9347     fi
9348   else
9349     input_to_shortpath="$new_path"
9350   fi
9351 
9352   # Call helper function which possibly converts this using DOS-style short mode.
9353   # If so, the updated path is stored in $new_path.
9354   new_path="$input_to_shortpath"
9355 
9356   input_path="$input_to_shortpath"
9357   # Check if we need to convert this using DOS-style short mode. If the path
9358   # contains just simple characters, use it. Otherwise (spaces, weird characters),
9359   # take no chances and rewrite it.
9360   # Note: m4 eats our [], so we need to use [ and ] instead.
9361   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
9362   if test "x$has_forbidden_chars" != x; then
9363     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9364     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
9365     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
9366     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
9367       # Going to short mode and back again did indeed matter. Since short mode is
9368       # case insensitive, let's make it lowercase to improve readability.
9369       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9370       # Now convert it back to Unix-stile (cygpath)
9371       input_path=`$CYGPATH -u "$shortmode_path"`
9372       new_path="$input_path"
9373     fi
9374   fi
9375 
9376   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
9377   if test "x$test_cygdrive_prefix" = x; then
9378     # As a simple fix, exclude /usr/bin since it's not a real path.
9379     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
9380       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
9381       # a path prefixed by /cygdrive for fixpath to work.
9382       new_path="$CYGWIN_ROOT_PATH$input_path"
9383     fi
9384   fi
9385 
9386   # remove trailing .exe if any
9387   new_path="${new_path/%.exe/}"
9388 
9389   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9390 
9391   # First separate the path from the arguments. This will split at the first
9392   # space.
9393   complete="$FOUND_MAKE"
9394   path="${complete%% *}"
9395   tmp="$complete EOL"
9396   arguments="${tmp#* }"
9397 
9398   # Input might be given as Windows format, start by converting to
9399   # unix format.
9400   new_path="$path"
9401 
9402   windows_path="$new_path"
9403   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9404     unix_path=`$CYGPATH -u "$windows_path"`
9405     new_path="$unix_path"
9406   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9407     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9408     new_path="$unix_path"
9409   fi
9410 
9411 
9412   # Now try to locate executable using which
9413   new_path=`$WHICH "$new_path" 2> /dev/null`
9414 
9415   if test "x$new_path" = x; then
9416     # Oops. Which didn't find the executable.
9417     # The splitting of arguments from the executable at a space might have been incorrect,
9418     # since paths with space are more likely in Windows. Give it another try with the whole
9419     # argument.
9420     path="$complete"
9421     arguments="EOL"
9422     new_path="$path"
9423 
9424   windows_path="$new_path"
9425   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9426     unix_path=`$CYGPATH -u "$windows_path"`
9427     new_path="$unix_path"
9428   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9429     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9430     new_path="$unix_path"
9431   fi
9432 
9433 
9434     new_path=`$WHICH "$new_path" 2> /dev/null`
9435 
9436     if test "x$new_path" = x; then
9437       # It's still not found. Now this is an unrecoverable error.
9438       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9439 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9440       has_space=`$ECHO "$complete" | $GREP " "`
9441       if test "x$has_space" != x; then
9442         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9443 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9444       fi
9445       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9446     fi
9447   fi
9448 
9449   # Now new_path has a complete unix path to the binary
9450   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
9451     # Keep paths in /bin as-is, but remove trailing .exe if any
9452     new_path="${new_path/%.exe/}"
9453     # Do not save /bin paths to all_fixpath_prefixes!
9454   else
9455     # Not in mixed or Windows style, start by that.
9456     new_path=`cmd //c echo $new_path`
9457 
9458   input_path="$new_path"
9459   # Check if we need to convert this using DOS-style short mode. If the path
9460   # contains just simple characters, use it. Otherwise (spaces, weird characters),
9461   # take no chances and rewrite it.
9462   # Note: m4 eats our [], so we need to use [ and ] instead.
9463   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
9464   if test "x$has_forbidden_chars" != x; then
9465     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9466     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9467   fi
9468 
9469     # Output is in $new_path
9470 
9471   windows_path="$new_path"
9472   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9473     unix_path=`$CYGPATH -u "$windows_path"`
9474     new_path="$unix_path"
9475   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9476     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9477     new_path="$unix_path"
9478   fi
9479 
9480     # remove trailing .exe if any
9481     new_path="${new_path/%.exe/}"
9482 
9483     # Save the first 10 bytes of this path to the storage, so fixpath can work.
9484     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
9485   fi
9486 
9487   else
9488     # We're on a posix platform. Hooray! :)
9489     # First separate the path from the arguments. This will split at the first
9490     # space.
9491     complete="$FOUND_MAKE"
9492     path="${complete%% *}"
9493     tmp="$complete EOL"
9494     arguments="${tmp#* }"
9495 
9496     # Cannot rely on the command "which" here since it doesn't always work.
9497     is_absolute_path=`$ECHO "$path" | $GREP ^/`
9498     if test -z "$is_absolute_path"; then
9499       # Path to executable is not absolute. Find it.
9500       IFS_save="$IFS"
9501       IFS=:
9502       for p in $PATH; do
9503         if test -f "$p/$path" && test -x "$p/$path"; then
9504           new_path="$p/$path"
9505           break
9506         fi
9507       done
9508       IFS="$IFS_save"
9509     else
9510       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
9511 $as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
9512       new_path="$path"
9513     fi
9514 
9515     if test "x$new_path" = x; then
9516         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9517 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9518         has_space=`$ECHO "$complete" | $GREP " "`
9519         if test "x$has_space" != x; then
9520           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
9521 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
9522         fi
9523         as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9524       fi
9525   fi
9526 
9527       # Now join together the path and the arguments once again
9528       if test "x$arguments" != xEOL; then
9529         new_complete="$new_path ${arguments% *}"
9530       else
9531         new_complete="$new_path"
9532       fi
9533 
9534   if test "x$complete" != "x$new_complete"; then
9535       FOUND_MAKE="$new_complete"
9536       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
9537 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
9538     fi
9539 
9540         fi
9541       fi
9542     fi
9543   fi
9544 
9545         if test "x$FOUND_MAKE" = x; then
9546           for ac_prog in make
9547 do
9548   # Extract the first word of "$ac_prog", so it can be a program name with args.
9549 set dummy $ac_prog; ac_word=$2
9550 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9551 $as_echo_n "checking for $ac_word... " >&6; }
9552 if ${ac_cv_path_CHECK_TOOLSDIR_MAKE+:} false; then :
9553   $as_echo_n "(cached) " >&6
9554 else
9555   case $CHECK_TOOLSDIR_MAKE in
9556   [\\/]* | ?:[\\/]*)
9557   ac_cv_path_CHECK_TOOLSDIR_MAKE="$CHECK_TOOLSDIR_MAKE" # Let the user override the test with a path.
9558   ;;
9559   *)
9560   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9561 for as_dir in $PATH
9562 do
9563   IFS=$as_save_IFS
9564   test -z "$as_dir" && as_dir=.
9565     for ac_exec_ext in '' $ac_executable_extensions; do
9566   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9567     ac_cv_path_CHECK_TOOLSDIR_MAKE="$as_dir/$ac_word$ac_exec_ext"
9568     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9569     break 2
9570   fi
9571 done
9572   done
9573 IFS=$as_save_IFS
9574 
9575   ;;
9576 esac
9577 fi
9578 CHECK_TOOLSDIR_MAKE=$ac_cv_path_CHECK_TOOLSDIR_MAKE
9579 if test -n "$CHECK_TOOLSDIR_MAKE"; then
9580   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_MAKE" >&5
9581 $as_echo "$CHECK_TOOLSDIR_MAKE" >&6; }
9582 else
9583   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9584 $as_echo "no" >&6; }
9585 fi
9586 
9587 
9588   test -n "$CHECK_TOOLSDIR_MAKE" && break
9589 done
9590 
9591 
9592   MAKE_CANDIDATE=""$CHECK_TOOLSDIR_MAKE""
9593   DESCRIPTION="make in tools-dir"
9594   if test "x$MAKE_CANDIDATE" != x; then
9595     { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
9596 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
9597     MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
9598     IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
9599     if test "x$IS_GNU_MAKE" = x; then
9600       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
9601 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
9602     else
9603       IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'`
9604       if test "x$IS_MODERN_MAKE" = x; then
9605         { $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
9606 $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;}
9607       else
9608         if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
9609           if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9610             MAKE_EXPECTED_ENV='cygwin'
9611           elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9612             MAKE_EXPECTED_ENV='msys'
9613           else
9614             as_fn_error $? "Unknown Windows environment" "$LINENO" 5
9615           fi
9616           MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
9617           IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
9618         else
9619           # Not relevant for non-Windows
9620           IS_MAKE_CORRECT_ENV=true
9621         fi
9622         if test "x$IS_MAKE_CORRECT_ENV" = x; then
9623           { $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
9624 $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;}
9625         else
9626           FOUND_MAKE=$MAKE_CANDIDATE
9627 
9628   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9629 
9630   # First separate the path from the arguments. This will split at the first
9631   # space.
9632   complete="$FOUND_MAKE"
9633   path="${complete%% *}"
9634   tmp="$complete EOL"
9635   arguments="${tmp#* }"
9636 
9637   # Input might be given as Windows format, start by converting to
9638   # unix format.
9639   new_path=`$CYGPATH -u "$path"`
9640 
9641   # Now try to locate executable using which
9642   new_path=`$WHICH "$new_path" 2> /dev/null`
9643   # bat and cmd files are not always considered executable in cygwin causing which
9644   # to not find them
9645   if test "x$new_path" = x \
9646            && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
9647            && test "x`$LS \"$path\" 2>/dev/null`" != x; then
9648     new_path=`$CYGPATH -u "$path"`
9649   fi
9650   if test "x$new_path" = x; then
9651     # Oops. Which didn't find the executable.
9652     # The splitting of arguments from the executable at a space might have been incorrect,
9653     # since paths with space are more likely in Windows. Give it another try with the whole
9654     # argument.
9655     path="$complete"
9656     arguments="EOL"
9657     new_path=`$CYGPATH -u "$path"`
9658     new_path=`$WHICH "$new_path" 2> /dev/null`
9659     # bat and cmd files are not always considered executable in cygwin causing which
9660     # to not find them
9661     if test "x$new_path" = x \
9662              && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
9663              && test "x`$LS \"$path\" 2>/dev/null`" != x; then
9664       new_path=`$CYGPATH -u "$path"`
9665     fi
9666     if test "x$new_path" = x; then
9667       # It's still not found. Now this is an unrecoverable error.
9668       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9669 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9670       has_space=`$ECHO "$complete" | $GREP " "`
9671       if test "x$has_space" != x; then
9672         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9673 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9674       fi
9675       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9676     fi
9677   fi
9678 
9679   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
9680   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
9681   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
9682   # "foo.exe" is OK but "foo" is an error.
9683   #
9684   # This test is therefore slightly more accurate than "test -f" to check for file precense.
9685   # It is also a way to make sure we got the proper file name for the real test later on.
9686   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
9687   if test "x$test_shortpath" = x; then
9688     # Short path failed, file does not exist as specified.
9689     # Try adding .exe or .cmd
9690     if test -f "${new_path}.exe"; then
9691        input_to_shortpath="${new_path}.exe"
9692     elif test -f "${new_path}.cmd"; then
9693        input_to_shortpath="${new_path}.cmd"
9694     else
9695       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
9696 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
9697       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
9698 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
9699       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9700     fi
9701   else
9702     input_to_shortpath="$new_path"
9703   fi
9704 
9705   # Call helper function which possibly converts this using DOS-style short mode.
9706   # If so, the updated path is stored in $new_path.
9707   new_path="$input_to_shortpath"
9708 
9709   input_path="$input_to_shortpath"
9710   # Check if we need to convert this using DOS-style short mode. If the path
9711   # contains just simple characters, use it. Otherwise (spaces, weird characters),
9712   # take no chances and rewrite it.
9713   # Note: m4 eats our [], so we need to use [ and ] instead.
9714   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
9715   if test "x$has_forbidden_chars" != x; then
9716     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9717     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
9718     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
9719     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
9720       # Going to short mode and back again did indeed matter. Since short mode is
9721       # case insensitive, let's make it lowercase to improve readability.
9722       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9723       # Now convert it back to Unix-stile (cygpath)
9724       input_path=`$CYGPATH -u "$shortmode_path"`
9725       new_path="$input_path"
9726     fi
9727   fi
9728 
9729   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
9730   if test "x$test_cygdrive_prefix" = x; then
9731     # As a simple fix, exclude /usr/bin since it's not a real path.
9732     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
9733       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
9734       # a path prefixed by /cygdrive for fixpath to work.
9735       new_path="$CYGWIN_ROOT_PATH$input_path"
9736     fi
9737   fi
9738 
9739   # remove trailing .exe if any
9740   new_path="${new_path/%.exe/}"
9741 
9742   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9743 
9744   # First separate the path from the arguments. This will split at the first
9745   # space.
9746   complete="$FOUND_MAKE"
9747   path="${complete%% *}"
9748   tmp="$complete EOL"
9749   arguments="${tmp#* }"
9750 
9751   # Input might be given as Windows format, start by converting to
9752   # unix format.
9753   new_path="$path"
9754 
9755   windows_path="$new_path"
9756   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9757     unix_path=`$CYGPATH -u "$windows_path"`
9758     new_path="$unix_path"
9759   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9760     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9761     new_path="$unix_path"
9762   fi
9763 
9764 
9765   # Now try to locate executable using which
9766   new_path=`$WHICH "$new_path" 2> /dev/null`
9767 
9768   if test "x$new_path" = x; then
9769     # Oops. Which didn't find the executable.
9770     # The splitting of arguments from the executable at a space might have been incorrect,
9771     # since paths with space are more likely in Windows. Give it another try with the whole
9772     # argument.
9773     path="$complete"
9774     arguments="EOL"
9775     new_path="$path"
9776 
9777   windows_path="$new_path"
9778   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9779     unix_path=`$CYGPATH -u "$windows_path"`
9780     new_path="$unix_path"
9781   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9782     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9783     new_path="$unix_path"
9784   fi
9785 
9786 
9787     new_path=`$WHICH "$new_path" 2> /dev/null`
9788 
9789     if test "x$new_path" = x; then
9790       # It's still not found. Now this is an unrecoverable error.
9791       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9792 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9793       has_space=`$ECHO "$complete" | $GREP " "`
9794       if test "x$has_space" != x; then
9795         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9796 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9797       fi
9798       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9799     fi
9800   fi
9801 
9802   # Now new_path has a complete unix path to the binary
9803   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
9804     # Keep paths in /bin as-is, but remove trailing .exe if any
9805     new_path="${new_path/%.exe/}"
9806     # Do not save /bin paths to all_fixpath_prefixes!
9807   else
9808     # Not in mixed or Windows style, start by that.
9809     new_path=`cmd //c echo $new_path`
9810 
9811   input_path="$new_path"
9812   # Check if we need to convert this using DOS-style short mode. If the path
9813   # contains just simple characters, use it. Otherwise (spaces, weird characters),
9814   # take no chances and rewrite it.
9815   # Note: m4 eats our [], so we need to use [ and ] instead.
9816   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
9817   if test "x$has_forbidden_chars" != x; then
9818     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9819     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9820   fi
9821 
9822     # Output is in $new_path
9823 
9824   windows_path="$new_path"
9825   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9826     unix_path=`$CYGPATH -u "$windows_path"`
9827     new_path="$unix_path"
9828   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9829     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9830     new_path="$unix_path"
9831   fi
9832 
9833     # remove trailing .exe if any
9834     new_path="${new_path/%.exe/}"
9835 
9836     # Save the first 10 bytes of this path to the storage, so fixpath can work.
9837     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
9838   fi
9839 
9840   else
9841     # We're on a posix platform. Hooray! :)
9842     # First separate the path from the arguments. This will split at the first
9843     # space.
9844     complete="$FOUND_MAKE"
9845     path="${complete%% *}"
9846     tmp="$complete EOL"
9847     arguments="${tmp#* }"
9848 
9849     # Cannot rely on the command "which" here since it doesn't always work.
9850     is_absolute_path=`$ECHO "$path" | $GREP ^/`
9851     if test -z "$is_absolute_path"; then
9852       # Path to executable is not absolute. Find it.
9853       IFS_save="$IFS"
9854       IFS=:
9855       for p in $PATH; do
9856         if test -f "$p/$path" && test -x "$p/$path"; then
9857           new_path="$p/$path"
9858           break
9859         fi
9860       done
9861       IFS="$IFS_save"
9862     else
9863       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
9864 $as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
9865       new_path="$path"
9866     fi
9867 
9868     if test "x$new_path" = x; then
9869         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9870 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9871         has_space=`$ECHO "$complete" | $GREP " "`
9872         if test "x$has_space" != x; then
9873           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
9874 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
9875         fi
9876         as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9877       fi
9878   fi
9879 
9880       # Now join together the path and the arguments once again
9881       if test "x$arguments" != xEOL; then
9882         new_complete="$new_path ${arguments% *}"
9883       else
9884         new_complete="$new_path"
9885       fi
9886 
9887   if test "x$complete" != "x$new_complete"; then
9888       FOUND_MAKE="$new_complete"
9889       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
9890 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
9891     fi
9892 
9893         fi
9894       fi
9895     fi
9896   fi
9897 
9898         fi
9899         PATH=$OLD_PATH
9900       fi
9901     fi
9902 
9903     if test "x$FOUND_MAKE" = x; then
9904       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
9905     fi
9906   fi
9907 
9908   MAKE=$FOUND_MAKE
9909 
9910   { $as_echo "$as_me:${as_lineno-$LINENO}: Using GNU make 3.81 (or later) at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&5
9911 $as_echo "$as_me: Using GNU make 3.81 (or later) at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&6;}
9912 
9913 
9914 
9915     # Test if find supports -delete
9916     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if find supports -delete" >&5
9917 $as_echo_n "checking if find supports -delete... " >&6; }
9918     FIND_DELETE="-delete"
9919 
9920     DELETEDIR=`$MKTEMP -d tmp.XXXXXXXXXX` || (echo Could not create temporary directory!; exit $?)
9921 
9922     echo Hejsan > $DELETEDIR/TestIfFindSupportsDelete
9923 
9924     TEST_DELETE=`$FIND "$DELETEDIR" -name TestIfFindSupportsDelete $FIND_DELETE 2>&1`
9925     if test -f $DELETEDIR/TestIfFindSupportsDelete; then
9926         # No, it does not.
9927         rm $DELETEDIR/TestIfFindSupportsDelete
9928         FIND_DELETE="-exec rm \{\} \+"
9929         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9930 $as_echo "no" >&6; }
9931     else
9932         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9933 $as_echo "yes" >&6; }
9934     fi
9935     rmdir $DELETEDIR
9936 
9937 
9938 
9939 # These tools might not be installed by default,
9940 # need hint on how to install them.
9941 
9942     for ac_prog in unzip
9943 do
9944   # Extract the first word of "$ac_prog", so it can be a program name with args.
9945 set dummy $ac_prog; ac_word=$2
9946 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9947 $as_echo_n "checking for $ac_word... " >&6; }
9948 if ${ac_cv_path_UNZIP+:} false; then :
9949   $as_echo_n "(cached) " >&6
9950 else
9951   case $UNZIP in
9952   [\\/]* | ?:[\\/]*)
9953   ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
9954   ;;
9955   *)
9956   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9957 for as_dir in $PATH
9958 do
9959   IFS=$as_save_IFS
9960   test -z "$as_dir" && as_dir=.
9961     for ac_exec_ext in '' $ac_executable_extensions; do
9962   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9963     ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
9964     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9965     break 2
9966   fi
9967 done
9968   done
9969 IFS=$as_save_IFS
9970 
9971   ;;
9972 esac
9973 fi
9974 UNZIP=$ac_cv_path_UNZIP
9975 if test -n "$UNZIP"; then
9976   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
9977 $as_echo "$UNZIP" >&6; }
9978 else
9979   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9980 $as_echo "no" >&6; }
9981 fi
9982 
9983 
9984   test -n "$UNZIP" && break
9985 done
9986 
9987 
9988     if test "x$UNZIP" = x; then
9989         if test "xunzip" = x; then
9990           PROG_NAME=unzip
9991         else
9992           PROG_NAME=unzip
9993         fi
9994         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
9995 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
9996         as_fn_error $? "Cannot continue" "$LINENO" 5
9997     fi
9998 
9999 
10000 
10001     for ac_prog in zip
10002 do
10003   # Extract the first word of "$ac_prog", so it can be a program name with args.
10004 set dummy $ac_prog; ac_word=$2
10005 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10006 $as_echo_n "checking for $ac_word... " >&6; }
10007 if ${ac_cv_path_ZIP+:} false; then :
10008   $as_echo_n "(cached) " >&6
10009 else
10010   case $ZIP in
10011   [\\/]* | ?:[\\/]*)
10012   ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
10013   ;;
10014   *)
10015   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10016 for as_dir in $PATH
10017 do
10018   IFS=$as_save_IFS
10019   test -z "$as_dir" && as_dir=.
10020     for ac_exec_ext in '' $ac_executable_extensions; do
10021   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10022     ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
10023     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10024     break 2
10025   fi
10026 done
10027   done
10028 IFS=$as_save_IFS
10029 
10030   ;;
10031 esac
10032 fi
10033 ZIP=$ac_cv_path_ZIP
10034 if test -n "$ZIP"; then
10035   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
10036 $as_echo "$ZIP" >&6; }
10037 else
10038   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10039 $as_echo "no" >&6; }
10040 fi
10041 
10042 
10043   test -n "$ZIP" && break
10044 done
10045 
10046 
10047     if test "x$ZIP" = x; then
10048         if test "xzip" = x; then
10049           PROG_NAME=zip
10050         else
10051           PROG_NAME=zip
10052         fi
10053         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
10054 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
10055         as_fn_error $? "Cannot continue" "$LINENO" 5
10056     fi
10057 
10058 
10059 
10060 # Non-required basic tools
10061 
10062 # Extract the first word of "ldd", so it can be a program name with args.
10063 set dummy ldd; ac_word=$2
10064 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10065 $as_echo_n "checking for $ac_word... " >&6; }
10066 if ${ac_cv_path_LDD+:} false; then :
10067   $as_echo_n "(cached) " >&6
10068 else
10069   case $LDD in
10070   [\\/]* | ?:[\\/]*)
10071   ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
10072   ;;
10073   *)
10074   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10075 for as_dir in $PATH
10076 do
10077   IFS=$as_save_IFS
10078   test -z "$as_dir" && as_dir=.
10079     for ac_exec_ext in '' $ac_executable_extensions; do
10080   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10081     ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
10082     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10083     break 2
10084   fi
10085 done
10086   done
10087 IFS=$as_save_IFS
10088 
10089   ;;
10090 esac
10091 fi
10092 LDD=$ac_cv_path_LDD
10093 if test -n "$LDD"; then
10094   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
10095 $as_echo "$LDD" >&6; }
10096 else
10097   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10098 $as_echo "no" >&6; }
10099 fi
10100 
10101 
10102 if test "x$LDD" = "x"; then
10103     # List shared lib dependencies is used for
10104     # debug output and checking for forbidden dependencies.
10105     # We can build without it.
10106     LDD="true"
10107 fi
10108 # Extract the first word of "otool", so it can be a program name with args.
10109 set dummy otool; ac_word=$2
10110 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10111 $as_echo_n "checking for $ac_word... " >&6; }
10112 if ${ac_cv_path_OTOOL+:} false; then :
10113   $as_echo_n "(cached) " >&6
10114 else
10115   case $OTOOL in
10116   [\\/]* | ?:[\\/]*)
10117   ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
10118   ;;
10119   *)
10120   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10121 for as_dir in $PATH
10122 do
10123   IFS=$as_save_IFS
10124   test -z "$as_dir" && as_dir=.
10125     for ac_exec_ext in '' $ac_executable_extensions; do
10126   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10127     ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
10128     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10129     break 2
10130   fi
10131 done
10132   done
10133 IFS=$as_save_IFS
10134 
10135   ;;
10136 esac
10137 fi
10138 OTOOL=$ac_cv_path_OTOOL
10139 if test -n "$OTOOL"; then
10140   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
10141 $as_echo "$OTOOL" >&6; }
10142 else
10143   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10144 $as_echo "no" >&6; }
10145 fi
10146 
10147 
10148 if test "x$OTOOL" = "x"; then
10149    OTOOL="true"
10150 fi
10151 for ac_prog in readelf greadelf
10152 do
10153   # Extract the first word of "$ac_prog", so it can be a program name with args.
10154 set dummy $ac_prog; ac_word=$2
10155 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10156 $as_echo_n "checking for $ac_word... " >&6; }
10157 if ${ac_cv_path_READELF+:} false; then :
10158   $as_echo_n "(cached) " >&6
10159 else
10160   case $READELF in
10161   [\\/]* | ?:[\\/]*)
10162   ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
10163   ;;
10164   *)
10165   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10166 for as_dir in $PATH
10167 do
10168   IFS=$as_save_IFS
10169   test -z "$as_dir" && as_dir=.
10170     for ac_exec_ext in '' $ac_executable_extensions; do
10171   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10172     ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
10173     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10174     break 2
10175   fi
10176 done
10177   done
10178 IFS=$as_save_IFS
10179 
10180   ;;
10181 esac
10182 fi
10183 READELF=$ac_cv_path_READELF
10184 if test -n "$READELF"; then
10185   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
10186 $as_echo "$READELF" >&6; }
10187 else
10188   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10189 $as_echo "no" >&6; }
10190 fi
10191 
10192 
10193   test -n "$READELF" && break
10194 done
10195 
10196 # Extract the first word of "hg", so it can be a program name with args.
10197 set dummy hg; ac_word=$2
10198 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10199 $as_echo_n "checking for $ac_word... " >&6; }
10200 if ${ac_cv_path_HG+:} false; then :
10201   $as_echo_n "(cached) " >&6
10202 else
10203   case $HG in
10204   [\\/]* | ?:[\\/]*)
10205   ac_cv_path_HG="$HG" # Let the user override the test with a path.
10206   ;;
10207   *)
10208   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10209 for as_dir in $PATH
10210 do
10211   IFS=$as_save_IFS
10212   test -z "$as_dir" && as_dir=.
10213     for ac_exec_ext in '' $ac_executable_extensions; do
10214   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10215     ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
10216     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10217     break 2
10218   fi
10219 done
10220   done
10221 IFS=$as_save_IFS
10222 
10223   ;;
10224 esac
10225 fi
10226 HG=$ac_cv_path_HG
10227 if test -n "$HG"; then
10228   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
10229 $as_echo "$HG" >&6; }
10230 else
10231   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10232 $as_echo "no" >&6; }
10233 fi
10234 
10235 
10236 # Extract the first word of "stat", so it can be a program name with args.
10237 set dummy stat; ac_word=$2
10238 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10239 $as_echo_n "checking for $ac_word... " >&6; }
10240 if ${ac_cv_path_STAT+:} false; then :
10241   $as_echo_n "(cached) " >&6
10242 else
10243   case $STAT in
10244   [\\/]* | ?:[\\/]*)
10245   ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
10246   ;;
10247   *)
10248   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10249 for as_dir in $PATH
10250 do
10251   IFS=$as_save_IFS
10252   test -z "$as_dir" && as_dir=.
10253     for ac_exec_ext in '' $ac_executable_extensions; do
10254   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10255     ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
10256     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10257     break 2
10258   fi
10259 done
10260   done
10261 IFS=$as_save_IFS
10262 
10263   ;;
10264 esac
10265 fi
10266 STAT=$ac_cv_path_STAT
10267 if test -n "$STAT"; then
10268   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
10269 $as_echo "$STAT" >&6; }
10270 else
10271   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10272 $as_echo "no" >&6; }
10273 fi
10274 
10275 
10276 # Extract the first word of "time", so it can be a program name with args.
10277 set dummy time; ac_word=$2
10278 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10279 $as_echo_n "checking for $ac_word... " >&6; }
10280 if ${ac_cv_path_TIME+:} false; then :
10281   $as_echo_n "(cached) " >&6
10282 else
10283   case $TIME in
10284   [\\/]* | ?:[\\/]*)
10285   ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
10286   ;;
10287   *)
10288   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10289 for as_dir in $PATH
10290 do
10291   IFS=$as_save_IFS
10292   test -z "$as_dir" && as_dir=.
10293     for ac_exec_ext in '' $ac_executable_extensions; do
10294   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10295     ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
10296     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10297     break 2
10298   fi
10299 done
10300   done
10301 IFS=$as_save_IFS
10302 
10303   ;;
10304 esac
10305 fi
10306 TIME=$ac_cv_path_TIME
10307 if test -n "$TIME"; then
10308   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
10309 $as_echo "$TIME" >&6; }
10310 else
10311   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10312 $as_echo "no" >&6; }
10313 fi
10314 
10315 
10316 
10317 if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
10318 
10319     for ac_prog in comm
10320 do
10321   # Extract the first word of "$ac_prog", so it can be a program name with args.
10322 set dummy $ac_prog; ac_word=$2
10323 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10324 $as_echo_n "checking for $ac_word... " >&6; }
10325 if ${ac_cv_path_COMM+:} false; then :
10326   $as_echo_n "(cached) " >&6
10327 else
10328   case $COMM in
10329   [\\/]* | ?:[\\/]*)
10330   ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
10331   ;;
10332   *)
10333   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10334 for as_dir in $PATH
10335 do
10336   IFS=$as_save_IFS
10337   test -z "$as_dir" && as_dir=.
10338     for ac_exec_ext in '' $ac_executable_extensions; do
10339   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10340     ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
10341     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10342     break 2
10343   fi
10344 done
10345   done
10346 IFS=$as_save_IFS
10347 
10348   ;;
10349 esac
10350 fi
10351 COMM=$ac_cv_path_COMM
10352 if test -n "$COMM"; then
10353   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
10354 $as_echo "$COMM" >&6; }
10355 else
10356   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10357 $as_echo "no" >&6; }
10358 fi
10359 
10360 
10361   test -n "$COMM" && break
10362 done
10363 
10364 
10365     if test "x$COMM" = x; then
10366         if test "xcomm" = x; then
10367           PROG_NAME=comm
10368         else
10369           PROG_NAME=comm
10370         fi
10371         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
10372 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
10373         as_fn_error $? "Cannot continue" "$LINENO" 5
10374     fi
10375 
10376 
10377 fi
10378 
10379 
10380 # Check if pkg-config is available.
10381 
10382 
10383 if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
10384         if test -n "$ac_tool_prefix"; then
10385   # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
10386 set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
10387 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10388 $as_echo_n "checking for $ac_word... " >&6; }
10389 if ${ac_cv_path_PKG_CONFIG+:} false; then :
10390   $as_echo_n "(cached) " >&6
10391 else
10392   case $PKG_CONFIG in
10393   [\\/]* | ?:[\\/]*)
10394   ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
10395   ;;
10396   *)
10397   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10398 for as_dir in $PATH
10399 do
10400   IFS=$as_save_IFS
10401   test -z "$as_dir" && as_dir=.
10402     for ac_exec_ext in '' $ac_executable_extensions; do
10403   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10404     ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
10405     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10406     break 2
10407   fi
10408 done
10409   done
10410 IFS=$as_save_IFS
10411 
10412   ;;
10413 esac
10414 fi
10415 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
10416 if test -n "$PKG_CONFIG"; then
10417   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
10418 $as_echo "$PKG_CONFIG" >&6; }
10419 else
10420   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10421 $as_echo "no" >&6; }
10422 fi
10423 
10424 
10425 fi
10426 if test -z "$ac_cv_path_PKG_CONFIG"; then
10427   ac_pt_PKG_CONFIG=$PKG_CONFIG
10428   # Extract the first word of "pkg-config", so it can be a program name with args.
10429 set dummy pkg-config; ac_word=$2
10430 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10431 $as_echo_n "checking for $ac_word... " >&6; }
10432 if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
10433   $as_echo_n "(cached) " >&6
10434 else
10435   case $ac_pt_PKG_CONFIG in
10436   [\\/]* | ?:[\\/]*)
10437   ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
10438   ;;
10439   *)
10440   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10441 for as_dir in $PATH
10442 do
10443   IFS=$as_save_IFS
10444   test -z "$as_dir" && as_dir=.
10445     for ac_exec_ext in '' $ac_executable_extensions; do
10446   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10447     ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
10448     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10449     break 2
10450   fi
10451 done
10452   done
10453 IFS=$as_save_IFS
10454 
10455   ;;
10456 esac
10457 fi
10458 ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
10459 if test -n "$ac_pt_PKG_CONFIG"; then
10460   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
10461 $as_echo "$ac_pt_PKG_CONFIG" >&6; }
10462 else
10463   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10464 $as_echo "no" >&6; }
10465 fi
10466 
10467   if test "x$ac_pt_PKG_CONFIG" = x; then
10468     PKG_CONFIG=""
10469   else
10470     case $cross_compiling:$ac_tool_warned in
10471 yes:)
10472 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
10473 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
10474 ac_tool_warned=yes ;;
10475 esac
10476     PKG_CONFIG=$ac_pt_PKG_CONFIG
10477   fi
10478 else
10479   PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
10480 fi
10481 
10482 fi
10483 if test -n "$PKG_CONFIG"; then
10484         _pkg_min_version=0.9.0
10485         { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
10486 $as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
10487         if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
10488                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10489 $as_echo "yes" >&6; }
10490         else
10491                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10492 $as_echo "no" >&6; }
10493                 PKG_CONFIG=""
10494         fi
10495 
10496 fi
10497 
10498 # After basic tools have been setup, we can check build os specific details.
10499 
10500 ###############################################################################
10501 
10502 # Note that this is the build platform OS version!
10503 
10504 OS_VERSION="`uname -r | ${SED} 's!\.! !g' | ${SED} 's!-! !g'`"
10505 OS_VERSION_MAJOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 1 -d ' '`"
10506 OS_VERSION_MINOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 2 -d ' '`"
10507 OS_VERSION_MICRO="`${ECHO} ${OS_VERSION} | ${CUT} -f 3 -d ' '`"
10508 
10509 
10510 
10511 
10512 
10513 # Setup builddeps, for automatic downloading of tools we need.
10514 # This is needed before we can call BDEPS_CHECK_MODULE, which is done in
10515 # boot-jdk setup, but we need to have basic tools setup first.
10516 
10517 
10518 # Check whether --with-builddeps-conf was given.
10519 if test "${with_builddeps_conf+set}" = set; then :
10520   withval=$with_builddeps_conf;
10521 fi
10522 
10523 
10524 
10525 # Check whether --with-builddeps-server was given.
10526 if test "${with_builddeps_server+set}" = set; then :
10527   withval=$with_builddeps_server;
10528 fi
10529 
10530 
10531 
10532 # Check whether --with-builddeps-dir was given.
10533 if test "${with_builddeps_dir+set}" = set; then :
10534   withval=$with_builddeps_dir;
10535 else
10536   with_builddeps_dir=/localhome/builddeps
10537 fi
10538 
10539 
10540 
10541 # Check whether --with-builddeps-group was given.
10542 if test "${with_builddeps_group+set}" = set; then :
10543   withval=$with_builddeps_group;
10544 fi
10545 
10546 
10547 
10548 
10549     if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
10550         if test "x$with_builddeps_conf" != x; then
10551             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for supplied builddeps configuration file" >&5
10552 $as_echo_n "checking for supplied builddeps configuration file... " >&6; }
10553             builddepsfile=$with_builddeps_conf
10554             if test -s $builddepsfile; then
10555                 . $builddepsfile
10556                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: loaded!" >&5
10557 $as_echo "loaded!" >&6; }
10558             else
10559                as_fn_error $? "The given builddeps conf file $with_builddeps_conf could not be loaded!" "$LINENO" 5
10560            fi
10561         else
10562             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builddeps.conf files in sources..." >&5
10563 $as_echo_n "checking for builddeps.conf files in sources...... " >&6; }
10564             builddepsfile=`mktemp`
10565             touch $builddepsfile
10566             # Put all found confs into a single file.
10567             find ${SRC_ROOT} -name builddeps.conf -exec cat \{\} \; >> $builddepsfile
10568             # Source the file to acquire the variables
10569             if test -s $builddepsfile; then
10570                 . $builddepsfile
10571                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: found at least one!" >&5
10572 $as_echo "found at least one!" >&6; }
10573             else
10574                as_fn_error $? "Could not find any builddeps.conf at all!" "$LINENO" 5
10575            fi
10576         fi
10577         # Create build and target names that use _ instead of "-" and ".".
10578         # This is necessary to use them in variable names.
10579         build_var=`echo ${OPENJDK_BUILD_AUTOCONF_NAME} | tr '-' '_' | tr '.' '_'`
10580         target_var=`echo ${OPENJDK_TARGET_AUTOCONF_NAME} | tr '-' '_' | tr '.' '_'`
10581         # Extract rewrite information for build and target
10582         eval rewritten_build=\${REWRITE_${build_var}}
10583         if test "x$rewritten_build" = x; then
10584             rewritten_build=${OPENJDK_BUILD_AUTOCONF_NAME}
10585             echo Build stays the same $rewritten_build
10586         else
10587             echo Rewriting build for builddeps into $rewritten_build
10588         fi
10589         eval rewritten_target=\${REWRITE_${target_var}}
10590         if test "x$rewritten_target" = x; then
10591             rewritten_target=${OPENJDK_TARGET_AUTOCONF_NAME}
10592             echo Target stays the same $rewritten_target
10593         else
10594             echo Rewriting target for builddeps into $rewritten_target
10595         fi
10596         rewritten_build_var=`echo ${rewritten_build} | tr '-' '_' | tr '.' '_'`
10597         rewritten_target_var=`echo ${rewritten_target} | tr '-' '_' | tr '.' '_'`
10598     fi
10599     for ac_prog in 7z unzip
10600 do
10601   # Extract the first word of "$ac_prog", so it can be a program name with args.
10602 set dummy $ac_prog; ac_word=$2
10603 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10604 $as_echo_n "checking for $ac_word... " >&6; }
10605 if ${ac_cv_prog_BDEPS_UNZIP+:} false; then :
10606   $as_echo_n "(cached) " >&6
10607 else
10608   if test -n "$BDEPS_UNZIP"; then
10609   ac_cv_prog_BDEPS_UNZIP="$BDEPS_UNZIP" # Let the user override the test.
10610 else
10611 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10612 for as_dir in $PATH
10613 do
10614   IFS=$as_save_IFS
10615   test -z "$as_dir" && as_dir=.
10616     for ac_exec_ext in '' $ac_executable_extensions; do
10617   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10618     ac_cv_prog_BDEPS_UNZIP="$ac_prog"
10619     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10620     break 2
10621   fi
10622 done
10623   done
10624 IFS=$as_save_IFS
10625 
10626 fi
10627 fi
10628 BDEPS_UNZIP=$ac_cv_prog_BDEPS_UNZIP
10629 if test -n "$BDEPS_UNZIP"; then
10630   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BDEPS_UNZIP" >&5
10631 $as_echo "$BDEPS_UNZIP" >&6; }
10632 else
10633   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10634 $as_echo "no" >&6; }
10635 fi
10636 
10637 
10638   test -n "$BDEPS_UNZIP" && break
10639 done
10640 
10641     if test "x$BDEPS_UNZIP" = x7z; then
10642         BDEPS_UNZIP="7z x"
10643     fi
10644 
10645     for ac_prog in wget lftp ftp
10646 do
10647   # Extract the first word of "$ac_prog", so it can be a program name with args.
10648 set dummy $ac_prog; ac_word=$2
10649 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10650 $as_echo_n "checking for $ac_word... " >&6; }
10651 if ${ac_cv_prog_BDEPS_FTP+:} false; then :
10652   $as_echo_n "(cached) " >&6
10653 else
10654   if test -n "$BDEPS_FTP"; then
10655   ac_cv_prog_BDEPS_FTP="$BDEPS_FTP" # Let the user override the test.
10656 else
10657 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10658 for as_dir in $PATH
10659 do
10660   IFS=$as_save_IFS
10661   test -z "$as_dir" && as_dir=.
10662     for ac_exec_ext in '' $ac_executable_extensions; do
10663   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10664     ac_cv_prog_BDEPS_FTP="$ac_prog"
10665     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10666     break 2
10667   fi
10668 done
10669   done
10670 IFS=$as_save_IFS
10671 
10672 fi
10673 fi
10674 BDEPS_FTP=$ac_cv_prog_BDEPS_FTP
10675 if test -n "$BDEPS_FTP"; then
10676   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BDEPS_FTP" >&5
10677 $as_echo "$BDEPS_FTP" >&6; }
10678 else
10679   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10680 $as_echo "no" >&6; }
10681 fi
10682 
10683 
10684   test -n "$BDEPS_FTP" && break
10685 done
10686 
10687 
10688 
10689 ###############################################################################
10690 #
10691 # Determine OpenJDK variants, options and version numbers.
10692 #
10693 ###############################################################################
10694 
10695 # We need build & target for this.
10696 
10697 
10698 ###############################################################################
10699 #
10700 # Should we build a JDK/JVM with headful support (ie a graphical ui)?
10701 # We always build headless support.
10702 #
10703 { $as_echo "$as_me:${as_lineno-$LINENO}: checking headful support" >&5
10704 $as_echo_n "checking headful support... " >&6; }
10705 # Check whether --enable-headful was given.
10706 if test "${enable_headful+set}" = set; then :
10707   enableval=$enable_headful; SUPPORT_HEADFUL=${enable_headful}
10708 else
10709   SUPPORT_HEADFUL=yes
10710 fi
10711 
10712 
10713 SUPPORT_HEADLESS=yes
10714 BUILD_HEADLESS="BUILD_HEADLESS:=true"
10715 
10716 if test "x$SUPPORT_HEADFUL" = xyes; then
10717     # We are building both headful and headless.
10718     headful_msg="inlude support for both headful and headless"
10719 fi
10720 
10721 if test "x$SUPPORT_HEADFUL" = xno; then
10722     # Thus we are building headless only.
10723     BUILD_HEADLESS="BUILD_HEADLESS:=true"
10724     headful_msg="headless only"
10725 fi
10726 
10727 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $headful_msg" >&5
10728 $as_echo "$headful_msg" >&6; }
10729 
10730 
10731 
10732 
10733 
10734 # Control wether Hotspot runs Queens test after build.
10735 # Check whether --enable-hotspot-test-in-build was given.
10736 if test "${enable_hotspot_test_in_build+set}" = set; then :
10737   enableval=$enable_hotspot_test_in_build;
10738 else
10739   enable_hotspot_test_in_build=no
10740 fi
10741 
10742 if test "x$enable_hotspot_test_in_build" = "xyes"; then
10743     TEST_IN_BUILD=true
10744 else
10745     TEST_IN_BUILD=false
10746 fi
10747 
10748 
10749 ###############################################################################
10750 #
10751 # Choose cacerts source file
10752 #
10753 
10754 # Check whether --with-cacerts-file was given.
10755 if test "${with_cacerts_file+set}" = set; then :
10756   withval=$with_cacerts_file;
10757 fi
10758 
10759 if test "x$with_cacerts_file" != x; then
10760     CACERTS_FILE=$with_cacerts_file
10761 else
10762     if test "x$OPENJDK" = "xtrue"; then
10763         CACERTS_FILE=${SRC_ROOT}/jdk/src/share/lib/security/cacerts
10764     else
10765         CACERTS_FILE=${SRC_ROOT}/jdk/src/closed/share/lib/security/cacerts.internal
10766     fi
10767 fi
10768 
10769 
10770 ###############################################################################
10771 #
10772 # Enable or disable unlimited crypto
10773 #
10774 # Check whether --enable-unlimited-crypto was given.
10775 if test "${enable_unlimited_crypto+set}" = set; then :
10776   enableval=$enable_unlimited_crypto;
10777 else
10778   enable_unlimited_crypto=no
10779 fi
10780 
10781 if test "x$enable_unlimited_crypto" = "xyes"; then
10782     UNLIMITED_CRYPTO=true
10783 else
10784     UNLIMITED_CRYPTO=false
10785 fi
10786 
10787 
10788 ###############################################################################
10789 #
10790 # Enable or disable the elliptic curve crypto implementation
10791 #
10792 
10793 
10794 ###############################################################################
10795 #
10796 # Compress jars
10797 #
10798 COMPRESS_JARS=false
10799 
10800 
10801 
10802 
10803 # Source the version numbers
10804 . $AUTOCONF_DIR/version-numbers
10805 
10806 # Get the settings from parameters
10807 
10808 # Check whether --with-milestone was given.
10809 if test "${with_milestone+set}" = set; then :
10810   withval=$with_milestone;
10811 fi
10812 
10813 if test "x$with_milestone" = xyes; then
10814   as_fn_error $? "Milestone must have a value" "$LINENO" 5
10815 elif test "x$with_milestone" != x; then
10816     MILESTONE="$with_milestone"
10817 fi
10818 if test "x$MILESTONE" = x; then
10819   MILESTONE=internal
10820 fi
10821 
10822 
10823 # Check whether --with-build-number was given.
10824 if test "${with_build_number+set}" = set; then :
10825   withval=$with_build_number;
10826 fi
10827 
10828 if test "x$with_build_number" = xyes; then
10829   as_fn_error $? "Build number must have a value" "$LINENO" 5
10830 elif test "x$with_build_number" != x; then
10831   JDK_BUILD_NUMBER="$with_build_number"
10832 fi
10833 if test "x$JDK_BUILD_NUMBER" = x; then
10834   JDK_BUILD_NUMBER=b00
10835 fi
10836 
10837 
10838 # Check whether --with-user-release-suffix was given.
10839 if test "${with_user_release_suffix+set}" = set; then :
10840   withval=$with_user_release_suffix;
10841 fi
10842 
10843 if test "x$with_user_release_suffix" = xyes; then
10844   as_fn_error $? "Release suffix must have a value" "$LINENO" 5
10845 elif test "x$with_user_release_suffix" != x; then
10846   USER_RELEASE_SUFFIX="$with_user_release_suffix"
10847 else
10848   BUILD_DATE=`date '+%Y_%m_%d_%H_%M'`
10849   # Avoid [:alnum:] since it depends on the locale.
10850   CLEAN_USERNAME=`echo "$USER" | $TR -d -c 'abcdefghijklmnopqrstuvqxyz0123456789'`
10851   USER_RELEASE_SUFFIX=`echo "${CLEAN_USERNAME}_${BUILD_DATE}" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
10852 fi
10853 
10854 
10855 # Now set the JDK version, milestone, build number etc.
10856 
10857 
10858 
10859 
10860 
10861 
10862 
10863 
10864 
10865 
10866 
10867 
10868 
10869 
10870 COPYRIGHT_YEAR=`date +'%Y'`
10871 
10872 
10873 if test "x$JDK_UPDATE_VERSION" != x; then
10874   JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}_${JDK_UPDATE_VERSION}"
10875 else
10876   JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}"
10877 fi
10878 
10879 
10880 COOKED_BUILD_NUMBER=`$ECHO $JDK_BUILD_NUMBER | $SED -e 's/^b//' -e 's/^0//'`
10881 
10882 
10883 
10884 ###############################################################################
10885 #
10886 # Setup BootJDK, used to bootstrap the build.
10887 #
10888 ###############################################################################
10889 
10890 
10891 BOOT_JDK_FOUND=no
10892 
10893 # Check whether --with-boot-jdk was given.
10894 if test "${with_boot_jdk+set}" = set; then :
10895   withval=$with_boot_jdk;
10896 fi
10897 
10898 
10899 # We look for the Boot JDK through various means, going from more certain to
10900 # more of a guess-work. After each test, BOOT_JDK_FOUND is set to "yes" if
10901 # we detected something (if so, the path to the jdk is in BOOT_JDK). But we
10902 # must check if this is indeed valid; otherwise we'll continue looking.
10903 
10904 # Test: Is bootjdk explicitely set by command line arguments?
10905 
10906   if test "x$BOOT_JDK_FOUND" = xno; then
10907     # Now execute the test
10908 
10909 if test "x$with_boot_jdk" != x; then
10910     BOOT_JDK=$with_boot_jdk
10911     BOOT_JDK_FOUND=maybe
10912     { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using configure arguments" >&5
10913 $as_echo "$as_me: Found potential Boot JDK using configure arguments" >&6;}
10914 fi
10915 
10916 
10917     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
10918     if test "x$BOOT_JDK_FOUND" = xmaybe; then
10919       # Do we have a bin/java?
10920       if test ! -x "$BOOT_JDK/bin/java"; then
10921         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
10922 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
10923         BOOT_JDK_FOUND=no
10924       else
10925         # Do we have a bin/javac?
10926         if test ! -x "$BOOT_JDK/bin/javac"; then
10927           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
10928 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
10929           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
10930 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
10931           BOOT_JDK_FOUND=no
10932         else
10933           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
10934           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
10935             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
10936 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
10937             BOOT_JDK_FOUND=no
10938           else
10939             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
10940             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
10941 
10942             # Extra M4 quote needed to protect [] in grep expression.
10943             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
10944             if test "x$FOUND_VERSION_78" = x; then
10945               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
10946 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
10947               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
10948 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
10949               BOOT_JDK_FOUND=no
10950             else
10951               # We're done! :-)
10952               BOOT_JDK_FOUND=yes
10953 
10954   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
10955 
10956   # Input might be given as Windows format, start by converting to
10957   # unix format.
10958   path="$BOOT_JDK"
10959   new_path=`$CYGPATH -u "$path"`
10960 
10961   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
10962   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
10963   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
10964   # "foo.exe" is OK but "foo" is an error.
10965   #
10966   # This test is therefore slightly more accurate than "test -f" to check for file precense.
10967   # It is also a way to make sure we got the proper file name for the real test later on.
10968   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
10969   if test "x$test_shortpath" = x; then
10970     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
10971 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
10972     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
10973   fi
10974 
10975   # Call helper function which possibly converts this using DOS-style short mode.
10976   # If so, the updated path is stored in $new_path.
10977 
10978   input_path="$new_path"
10979   # Check if we need to convert this using DOS-style short mode. If the path
10980   # contains just simple characters, use it. Otherwise (spaces, weird characters),
10981   # take no chances and rewrite it.
10982   # Note: m4 eats our [], so we need to use [ and ] instead.
10983   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
10984   if test "x$has_forbidden_chars" != x; then
10985     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
10986     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
10987     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
10988     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
10989       # Going to short mode and back again did indeed matter. Since short mode is
10990       # case insensitive, let's make it lowercase to improve readability.
10991       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
10992       # Now convert it back to Unix-stile (cygpath)
10993       input_path=`$CYGPATH -u "$shortmode_path"`
10994       new_path="$input_path"
10995     fi
10996   fi
10997 
10998   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
10999   if test "x$test_cygdrive_prefix" = x; then
11000     # As a simple fix, exclude /usr/bin since it's not a real path.
11001     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
11002       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
11003       # a path prefixed by /cygdrive for fixpath to work.
11004       new_path="$CYGWIN_ROOT_PATH$input_path"
11005     fi
11006   fi
11007 
11008 
11009   if test "x$path" != "x$new_path"; then
11010     BOOT_JDK="$new_path"
11011     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11012 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11013   fi
11014 
11015   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11016 
11017   path="$BOOT_JDK"
11018   has_colon=`$ECHO $path | $GREP ^.:`
11019   new_path="$path"
11020   if test "x$has_colon" = x; then
11021     # Not in mixed or Windows style, start by that.
11022     new_path=`cmd //c echo $path`
11023   fi
11024 
11025 
11026   input_path="$new_path"
11027   # Check if we need to convert this using DOS-style short mode. If the path
11028   # contains just simple characters, use it. Otherwise (spaces, weird characters),
11029   # take no chances and rewrite it.
11030   # Note: m4 eats our [], so we need to use [ and ] instead.
11031   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
11032   if test "x$has_forbidden_chars" != x; then
11033     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11034     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11035   fi
11036 
11037 
11038   windows_path="$new_path"
11039   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11040     unix_path=`$CYGPATH -u "$windows_path"`
11041     new_path="$unix_path"
11042   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11043     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11044     new_path="$unix_path"
11045   fi
11046 
11047   if test "x$path" != "x$new_path"; then
11048     BOOT_JDK="$new_path"
11049     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11050 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11051   fi
11052 
11053   # Save the first 10 bytes of this path to the storage, so fixpath can work.
11054   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
11055 
11056   else
11057     # We're on a posix platform. Hooray! :)
11058     path="$BOOT_JDK"
11059 
11060     if test ! -f "$path" && test ! -d "$path"; then
11061       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
11062     fi
11063 
11064     has_space=`$ECHO "$path" | $GREP " "`
11065     if test "x$has_space" != x; then
11066       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11067 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11068       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
11069     fi
11070   fi
11071 
11072               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
11073 $as_echo_n "checking for Boot JDK... " >&6; }
11074               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
11075 $as_echo "$BOOT_JDK" >&6; }
11076               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
11077 $as_echo_n "checking Boot JDK version... " >&6; }
11078               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
11079               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
11080 $as_echo "$BOOT_JDK_VERSION" >&6; }
11081             fi # end check jdk version
11082           fi # end check rt.jar
11083         fi # end check javac
11084       fi # end check java
11085     fi # end check boot jdk found
11086   fi
11087 
11088 if test "x$with_boot_jdk" != x && test "x$BOOT_JDK_FOUND" = xno; then
11089   # Having specified an argument which is incorrect will produce an instant failure;
11090   # we should not go on looking
11091   as_fn_error $? "The path given by --with-boot-jdk does not contain a valid Boot JDK" "$LINENO" 5
11092 fi
11093 
11094 # Test: Is bootjdk available from builddeps?
11095 
11096   if test "x$BOOT_JDK_FOUND" = xno; then
11097     # Now execute the test
11098 
11099 
11100 
11101     if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
11102         # Source the builddeps file again, to make sure it uses the latest variables!
11103         . $builddepsfile
11104         # Look for a target and build machine specific resource!
11105         eval resource=\${builddep_bootjdk_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
11106         if test "x$resource" = x; then
11107             # Ok, lets instead look for a target specific resource
11108             eval resource=\${builddep_bootjdk_TARGET_${rewritten_target_var}}
11109         fi
11110         if test "x$resource" = x; then
11111             # Ok, lets instead look for a build specific resource
11112             eval resource=\${builddep_bootjdk_BUILD_${rewritten_build_var}}
11113         fi
11114         if test "x$resource" = x; then
11115             # Ok, lets instead look for a generic resource
11116             # (The bootjdk comes from M4 and not the shell, thus no need for eval here.)
11117             resource=${builddep_bootjdk}
11118         fi
11119         if test "x$resource" != x; then
11120             { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for bootjdk" >&5
11121 $as_echo "$as_me: Using builddeps $resource for bootjdk" >&6;}
11122             # If the resource in the builddeps.conf file is an existing directory,
11123             # for example /java/linux/cups
11124             if test -d ${resource}; then
11125                depdir=${resource}
11126             else
11127 
11128 # bootjdk is for example mymodule
11129 # $resource is for example libs/general/libmymod_1_2_3.zip
11130 # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
11131 # $with_builddeps_dir is for example /localhome/builddeps
11132 # depdir is the name of the variable into which we store the depdir, eg MYMOD
11133 # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
11134 # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
11135     filename=`basename $resource`
11136     filebase=`echo $filename | sed 's/\.[^\.]*$//'`
11137     filebase=${filename%%.*}
11138     extension=${filename#*.}
11139     installdir=$with_builddeps_dir/$filebase
11140     if test ! -f $installdir/$filename.unpacked; then
11141         { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency bootjdk from $with_builddeps_server/$resource and installing into $installdir" >&5
11142 $as_echo "$as_me: Downloading build dependency bootjdk from $with_builddeps_server/$resource and installing into $installdir" >&6;}
11143         if test ! -d $installdir; then
11144             mkdir -p $installdir
11145         fi
11146         if test ! -d $installdir; then
11147             as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
11148         fi
11149         tmpfile=`mktemp $installdir/bootjdk.XXXXXXXXX`
11150         touch $tmpfile
11151         if test ! -f $tmpfile; then
11152             as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
11153         fi
11154 
11155     # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
11156     # $tmpfile is the local file name for the downloaded file.
11157     VALID_TOOL=no
11158     if test "x$BDEPS_FTP" = xwget; then
11159        VALID_TOOL=yes
11160        wget -O $tmpfile $with_builddeps_server/$resource
11161     fi
11162     if test "x$BDEPS_FTP" = xlftp; then
11163        VALID_TOOL=yes
11164        lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
11165     fi
11166     if test "x$BDEPS_FTP" = xftp; then
11167         VALID_TOOL=yes
11168         FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
11169         FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
11170         FTPUSERPWD=${FTPSERVER%%@*}
11171         if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
11172             FTPUSER=${userpwd%%:*}
11173             FTPPWD=${userpwd#*@}
11174             FTPSERVER=${FTPSERVER#*@}
11175         else
11176             FTPUSER=ftp
11177             FTPPWD=ftp
11178         fi
11179         # the "pass" command does not work on some
11180         # ftp clients (read ftp.exe) but if it works,
11181         # passive mode is better!
11182         (\
11183             echo "user $FTPUSER $FTPPWD"        ;\
11184             echo "pass"                         ;\
11185             echo "bin"                          ;\
11186             echo "get $FTPPATH $tmpfile"              ;\
11187         ) | ftp -in $FTPSERVER
11188     fi
11189     if test "x$VALID_TOOL" != xyes; then
11190        as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
11191     fi
11192 
11193         mv $tmpfile $installdir/$filename
11194         if test ! -s $installdir/$filename; then
11195             as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
11196         fi
11197         case "$extension" in
11198             zip)  echo "Unzipping $installdir/$filename..."
11199                (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
11200             ;;
11201             tar.gz) echo "Untaring $installdir/$filename..."
11202                (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
11203             ;;
11204             tgz) echo "Untaring $installdir/$filename..."
11205                (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
11206             ;;
11207             *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
11208             ;;
11209         esac
11210     fi
11211     if test -f $installdir/$filename.unpacked; then
11212         depdir=$installdir
11213     fi
11214 
11215             fi
11216             # Source the builddeps file again, because in the previous command, the depdir
11217             # was updated to point at the current build dependency install directory.
11218             . $builddepsfile
11219             # Now extract variables from the builddeps.conf files.
11220             theroot=${builddep_bootjdk_ROOT}
11221             thecflags=${builddep_bootjdk_CFLAGS}
11222             thelibs=${builddep_bootjdk_LIBS}
11223             if test "x$depdir" = x; then
11224                 as_fn_error $? "Could not download build dependency bootjdk" "$LINENO" 5
11225             fi
11226             BOOT_JDK=$depdir
11227             if test "x$theroot" != x; then
11228                BOOT_JDK="$theroot"
11229             fi
11230             if test "x$thecflags" != x; then
11231                BOOT_JDK_CFLAGS="$thecflags"
11232             fi
11233             if test "x$thelibs" != x; then
11234                BOOT_JDK_LIBS="$thelibs"
11235             fi
11236             BOOT_JDK_FOUND=maybe
11237             else BOOT_JDK_FOUND=no
11238 
11239         fi
11240         else BOOT_JDK_FOUND=no
11241 
11242     fi
11243 
11244 
11245 
11246     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
11247     if test "x$BOOT_JDK_FOUND" = xmaybe; then
11248       # Do we have a bin/java?
11249       if test ! -x "$BOOT_JDK/bin/java"; then
11250         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
11251 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
11252         BOOT_JDK_FOUND=no
11253       else
11254         # Do we have a bin/javac?
11255         if test ! -x "$BOOT_JDK/bin/javac"; then
11256           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
11257 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
11258           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
11259 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
11260           BOOT_JDK_FOUND=no
11261         else
11262           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
11263           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
11264             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
11265 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
11266             BOOT_JDK_FOUND=no
11267           else
11268             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
11269             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
11270 
11271             # Extra M4 quote needed to protect [] in grep expression.
11272             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
11273             if test "x$FOUND_VERSION_78" = x; then
11274               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
11275 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
11276               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
11277 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
11278               BOOT_JDK_FOUND=no
11279             else
11280               # We're done! :-)
11281               BOOT_JDK_FOUND=yes
11282 
11283   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11284 
11285   # Input might be given as Windows format, start by converting to
11286   # unix format.
11287   path="$BOOT_JDK"
11288   new_path=`$CYGPATH -u "$path"`
11289 
11290   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
11291   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
11292   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
11293   # "foo.exe" is OK but "foo" is an error.
11294   #
11295   # This test is therefore slightly more accurate than "test -f" to check for file precense.
11296   # It is also a way to make sure we got the proper file name for the real test later on.
11297   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
11298   if test "x$test_shortpath" = x; then
11299     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11300 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11301     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
11302   fi
11303 
11304   # Call helper function which possibly converts this using DOS-style short mode.
11305   # If so, the updated path is stored in $new_path.
11306 
11307   input_path="$new_path"
11308   # Check if we need to convert this using DOS-style short mode. If the path
11309   # contains just simple characters, use it. Otherwise (spaces, weird characters),
11310   # take no chances and rewrite it.
11311   # Note: m4 eats our [], so we need to use [ and ] instead.
11312   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
11313   if test "x$has_forbidden_chars" != x; then
11314     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11315     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
11316     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
11317     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
11318       # Going to short mode and back again did indeed matter. Since short mode is
11319       # case insensitive, let's make it lowercase to improve readability.
11320       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11321       # Now convert it back to Unix-stile (cygpath)
11322       input_path=`$CYGPATH -u "$shortmode_path"`
11323       new_path="$input_path"
11324     fi
11325   fi
11326 
11327   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
11328   if test "x$test_cygdrive_prefix" = x; then
11329     # As a simple fix, exclude /usr/bin since it's not a real path.
11330     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
11331       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
11332       # a path prefixed by /cygdrive for fixpath to work.
11333       new_path="$CYGWIN_ROOT_PATH$input_path"
11334     fi
11335   fi
11336 
11337 
11338   if test "x$path" != "x$new_path"; then
11339     BOOT_JDK="$new_path"
11340     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11341 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11342   fi
11343 
11344   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11345 
11346   path="$BOOT_JDK"
11347   has_colon=`$ECHO $path | $GREP ^.:`
11348   new_path="$path"
11349   if test "x$has_colon" = x; then
11350     # Not in mixed or Windows style, start by that.
11351     new_path=`cmd //c echo $path`
11352   fi
11353 
11354 
11355   input_path="$new_path"
11356   # Check if we need to convert this using DOS-style short mode. If the path
11357   # contains just simple characters, use it. Otherwise (spaces, weird characters),
11358   # take no chances and rewrite it.
11359   # Note: m4 eats our [], so we need to use [ and ] instead.
11360   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
11361   if test "x$has_forbidden_chars" != x; then
11362     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11363     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11364   fi
11365 
11366 
11367   windows_path="$new_path"
11368   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11369     unix_path=`$CYGPATH -u "$windows_path"`
11370     new_path="$unix_path"
11371   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11372     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11373     new_path="$unix_path"
11374   fi
11375 
11376   if test "x$path" != "x$new_path"; then
11377     BOOT_JDK="$new_path"
11378     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11379 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11380   fi
11381 
11382   # Save the first 10 bytes of this path to the storage, so fixpath can work.
11383   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
11384 
11385   else
11386     # We're on a posix platform. Hooray! :)
11387     path="$BOOT_JDK"
11388 
11389     if test ! -f "$path" && test ! -d "$path"; then
11390       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
11391     fi
11392 
11393     has_space=`$ECHO "$path" | $GREP " "`
11394     if test "x$has_space" != x; then
11395       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11396 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11397       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
11398     fi
11399   fi
11400 
11401               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
11402 $as_echo_n "checking for Boot JDK... " >&6; }
11403               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
11404 $as_echo "$BOOT_JDK" >&6; }
11405               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
11406 $as_echo_n "checking Boot JDK version... " >&6; }
11407               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
11408               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
11409 $as_echo "$BOOT_JDK_VERSION" >&6; }
11410             fi # end check jdk version
11411           fi # end check rt.jar
11412         fi # end check javac
11413       fi # end check java
11414     fi # end check boot jdk found
11415   fi
11416 
11417 
11418 # Test: Is $JAVA_HOME set?
11419 
11420   if test "x$BOOT_JDK_FOUND" = xno; then
11421     # Now execute the test
11422 
11423     if test "x$JAVA_HOME" != x; then
11424         JAVA_HOME_PROCESSED="$JAVA_HOME"
11425 
11426   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11427 
11428   # Input might be given as Windows format, start by converting to
11429   # unix format.
11430   path="$JAVA_HOME_PROCESSED"
11431   new_path=`$CYGPATH -u "$path"`
11432 
11433   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
11434   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
11435   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
11436   # "foo.exe" is OK but "foo" is an error.
11437   #
11438   # This test is therefore slightly more accurate than "test -f" to check for file precense.
11439   # It is also a way to make sure we got the proper file name for the real test later on.
11440   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
11441   if test "x$test_shortpath" = x; then
11442     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
11443 $as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
11444     as_fn_error $? "Cannot locate the the path of JAVA_HOME_PROCESSED" "$LINENO" 5
11445   fi
11446 
11447   # Call helper function which possibly converts this using DOS-style short mode.
11448   # If so, the updated path is stored in $new_path.
11449 
11450   input_path="$new_path"
11451   # Check if we need to convert this using DOS-style short mode. If the path
11452   # contains just simple characters, use it. Otherwise (spaces, weird characters),
11453   # take no chances and rewrite it.
11454   # Note: m4 eats our [], so we need to use [ and ] instead.
11455   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
11456   if test "x$has_forbidden_chars" != x; then
11457     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11458     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
11459     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
11460     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
11461       # Going to short mode and back again did indeed matter. Since short mode is
11462       # case insensitive, let's make it lowercase to improve readability.
11463       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11464       # Now convert it back to Unix-stile (cygpath)
11465       input_path=`$CYGPATH -u "$shortmode_path"`
11466       new_path="$input_path"
11467     fi
11468   fi
11469 
11470   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
11471   if test "x$test_cygdrive_prefix" = x; then
11472     # As a simple fix, exclude /usr/bin since it's not a real path.
11473     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
11474       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
11475       # a path prefixed by /cygdrive for fixpath to work.
11476       new_path="$CYGWIN_ROOT_PATH$input_path"
11477     fi
11478   fi
11479 
11480 
11481   if test "x$path" != "x$new_path"; then
11482     JAVA_HOME_PROCESSED="$new_path"
11483     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
11484 $as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
11485   fi
11486 
11487   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11488 
11489   path="$JAVA_HOME_PROCESSED"
11490   has_colon=`$ECHO $path | $GREP ^.:`
11491   new_path="$path"
11492   if test "x$has_colon" = x; then
11493     # Not in mixed or Windows style, start by that.
11494     new_path=`cmd //c echo $path`
11495   fi
11496 
11497 
11498   input_path="$new_path"
11499   # Check if we need to convert this using DOS-style short mode. If the path
11500   # contains just simple characters, use it. Otherwise (spaces, weird characters),
11501   # take no chances and rewrite it.
11502   # Note: m4 eats our [], so we need to use [ and ] instead.
11503   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
11504   if test "x$has_forbidden_chars" != x; then
11505     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11506     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11507   fi
11508 
11509 
11510   windows_path="$new_path"
11511   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11512     unix_path=`$CYGPATH -u "$windows_path"`
11513     new_path="$unix_path"
11514   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11515     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11516     new_path="$unix_path"
11517   fi
11518 
11519   if test "x$path" != "x$new_path"; then
11520     JAVA_HOME_PROCESSED="$new_path"
11521     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
11522 $as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
11523   fi
11524 
11525   # Save the first 10 bytes of this path to the storage, so fixpath can work.
11526   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
11527 
11528   else
11529     # We're on a posix platform. Hooray! :)
11530     path="$JAVA_HOME_PROCESSED"
11531 
11532     if test ! -f "$path" && test ! -d "$path"; then
11533       as_fn_error $? "The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is not found." "$LINENO" 5
11534     fi
11535 
11536     has_space=`$ECHO "$path" | $GREP " "`
11537     if test "x$has_space" != x; then
11538       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
11539 $as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
11540       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
11541     fi
11542   fi
11543 
11544         if test ! -d "$JAVA_HOME_PROCESSED"; then
11545             { $as_echo "$as_me:${as_lineno-$LINENO}: Your JAVA_HOME points to a non-existing directory!" >&5
11546 $as_echo "$as_me: Your JAVA_HOME points to a non-existing directory!" >&6;}
11547         else
11548           # Aha, the user has set a JAVA_HOME
11549           # let us use that as the Boot JDK.
11550           BOOT_JDK="$JAVA_HOME_PROCESSED"
11551           BOOT_JDK_FOUND=maybe
11552           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using JAVA_HOME" >&5
11553 $as_echo "$as_me: Found potential Boot JDK using JAVA_HOME" >&6;}
11554         fi
11555     fi
11556 
11557 
11558     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
11559     if test "x$BOOT_JDK_FOUND" = xmaybe; then
11560       # Do we have a bin/java?
11561       if test ! -x "$BOOT_JDK/bin/java"; then
11562         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
11563 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
11564         BOOT_JDK_FOUND=no
11565       else
11566         # Do we have a bin/javac?
11567         if test ! -x "$BOOT_JDK/bin/javac"; then
11568           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
11569 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
11570           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
11571 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
11572           BOOT_JDK_FOUND=no
11573         else
11574           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
11575           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
11576             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
11577 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
11578             BOOT_JDK_FOUND=no
11579           else
11580             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
11581             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
11582 
11583             # Extra M4 quote needed to protect [] in grep expression.
11584             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
11585             if test "x$FOUND_VERSION_78" = x; then
11586               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
11587 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
11588               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
11589 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
11590               BOOT_JDK_FOUND=no
11591             else
11592               # We're done! :-)
11593               BOOT_JDK_FOUND=yes
11594 
11595   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11596 
11597   # Input might be given as Windows format, start by converting to
11598   # unix format.
11599   path="$BOOT_JDK"
11600   new_path=`$CYGPATH -u "$path"`
11601 
11602   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
11603   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
11604   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
11605   # "foo.exe" is OK but "foo" is an error.
11606   #
11607   # This test is therefore slightly more accurate than "test -f" to check for file precense.
11608   # It is also a way to make sure we got the proper file name for the real test later on.
11609   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
11610   if test "x$test_shortpath" = x; then
11611     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11612 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11613     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
11614   fi
11615 
11616   # Call helper function which possibly converts this using DOS-style short mode.
11617   # If so, the updated path is stored in $new_path.
11618 
11619   input_path="$new_path"
11620   # Check if we need to convert this using DOS-style short mode. If the path
11621   # contains just simple characters, use it. Otherwise (spaces, weird characters),
11622   # take no chances and rewrite it.
11623   # Note: m4 eats our [], so we need to use [ and ] instead.
11624   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
11625   if test "x$has_forbidden_chars" != x; then
11626     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11627     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
11628     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
11629     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
11630       # Going to short mode and back again did indeed matter. Since short mode is
11631       # case insensitive, let's make it lowercase to improve readability.
11632       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11633       # Now convert it back to Unix-stile (cygpath)
11634       input_path=`$CYGPATH -u "$shortmode_path"`
11635       new_path="$input_path"
11636     fi
11637   fi
11638 
11639   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
11640   if test "x$test_cygdrive_prefix" = x; then
11641     # As a simple fix, exclude /usr/bin since it's not a real path.
11642     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
11643       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
11644       # a path prefixed by /cygdrive for fixpath to work.
11645       new_path="$CYGWIN_ROOT_PATH$input_path"
11646     fi
11647   fi
11648 
11649 
11650   if test "x$path" != "x$new_path"; then
11651     BOOT_JDK="$new_path"
11652     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11653 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11654   fi
11655 
11656   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11657 
11658   path="$BOOT_JDK"
11659   has_colon=`$ECHO $path | $GREP ^.:`
11660   new_path="$path"
11661   if test "x$has_colon" = x; then
11662     # Not in mixed or Windows style, start by that.
11663     new_path=`cmd //c echo $path`
11664   fi
11665 
11666 
11667   input_path="$new_path"
11668   # Check if we need to convert this using DOS-style short mode. If the path
11669   # contains just simple characters, use it. Otherwise (spaces, weird characters),
11670   # take no chances and rewrite it.
11671   # Note: m4 eats our [], so we need to use [ and ] instead.
11672   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
11673   if test "x$has_forbidden_chars" != x; then
11674     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11675     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11676   fi
11677 
11678 
11679   windows_path="$new_path"
11680   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11681     unix_path=`$CYGPATH -u "$windows_path"`
11682     new_path="$unix_path"
11683   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11684     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11685     new_path="$unix_path"
11686   fi
11687 
11688   if test "x$path" != "x$new_path"; then
11689     BOOT_JDK="$new_path"
11690     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11691 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11692   fi
11693 
11694   # Save the first 10 bytes of this path to the storage, so fixpath can work.
11695   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
11696 
11697   else
11698     # We're on a posix platform. Hooray! :)
11699     path="$BOOT_JDK"
11700 
11701     if test ! -f "$path" && test ! -d "$path"; then
11702       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
11703     fi
11704 
11705     has_space=`$ECHO "$path" | $GREP " "`
11706     if test "x$has_space" != x; then
11707       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11708 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11709       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
11710     fi
11711   fi
11712 
11713               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
11714 $as_echo_n "checking for Boot JDK... " >&6; }
11715               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
11716 $as_echo "$BOOT_JDK" >&6; }
11717               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
11718 $as_echo_n "checking Boot JDK version... " >&6; }
11719               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
11720               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
11721 $as_echo "$BOOT_JDK_VERSION" >&6; }
11722             fi # end check jdk version
11723           fi # end check rt.jar
11724         fi # end check javac
11725       fi # end check java
11726     fi # end check boot jdk found
11727   fi
11728 
11729 
11730 # Test: Is there a /usr/libexec/java_home? (Typically on MacOSX)
11731 
11732   if test "x$BOOT_JDK_FOUND" = xno; then
11733     # Now execute the test
11734 
11735     if test -x /usr/libexec/java_home; then
11736         BOOT_JDK=`/usr/libexec/java_home`
11737         BOOT_JDK_FOUND=maybe
11738         { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home" >&5
11739 $as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home" >&6;}
11740     fi
11741 
11742 
11743     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
11744     if test "x$BOOT_JDK_FOUND" = xmaybe; then
11745       # Do we have a bin/java?
11746       if test ! -x "$BOOT_JDK/bin/java"; then
11747         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
11748 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
11749         BOOT_JDK_FOUND=no
11750       else
11751         # Do we have a bin/javac?
11752         if test ! -x "$BOOT_JDK/bin/javac"; then
11753           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
11754 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
11755           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
11756 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
11757           BOOT_JDK_FOUND=no
11758         else
11759           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
11760           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
11761             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
11762 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
11763             BOOT_JDK_FOUND=no
11764           else
11765             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
11766             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
11767 
11768             # Extra M4 quote needed to protect [] in grep expression.
11769             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
11770             if test "x$FOUND_VERSION_78" = x; then
11771               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
11772 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
11773               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
11774 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
11775               BOOT_JDK_FOUND=no
11776             else
11777               # We're done! :-)
11778               BOOT_JDK_FOUND=yes
11779 
11780   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11781 
11782   # Input might be given as Windows format, start by converting to
11783   # unix format.
11784   path="$BOOT_JDK"
11785   new_path=`$CYGPATH -u "$path"`
11786 
11787   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
11788   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
11789   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
11790   # "foo.exe" is OK but "foo" is an error.
11791   #
11792   # This test is therefore slightly more accurate than "test -f" to check for file precense.
11793   # It is also a way to make sure we got the proper file name for the real test later on.
11794   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
11795   if test "x$test_shortpath" = x; then
11796     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11797 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11798     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
11799   fi
11800 
11801   # Call helper function which possibly converts this using DOS-style short mode.
11802   # If so, the updated path is stored in $new_path.
11803 
11804   input_path="$new_path"
11805   # Check if we need to convert this using DOS-style short mode. If the path
11806   # contains just simple characters, use it. Otherwise (spaces, weird characters),
11807   # take no chances and rewrite it.
11808   # Note: m4 eats our [], so we need to use [ and ] instead.
11809   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
11810   if test "x$has_forbidden_chars" != x; then
11811     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11812     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
11813     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
11814     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
11815       # Going to short mode and back again did indeed matter. Since short mode is
11816       # case insensitive, let's make it lowercase to improve readability.
11817       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11818       # Now convert it back to Unix-stile (cygpath)
11819       input_path=`$CYGPATH -u "$shortmode_path"`
11820       new_path="$input_path"
11821     fi
11822   fi
11823 
11824   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
11825   if test "x$test_cygdrive_prefix" = x; then
11826     # As a simple fix, exclude /usr/bin since it's not a real path.
11827     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
11828       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
11829       # a path prefixed by /cygdrive for fixpath to work.
11830       new_path="$CYGWIN_ROOT_PATH$input_path"
11831     fi
11832   fi
11833 
11834 
11835   if test "x$path" != "x$new_path"; then
11836     BOOT_JDK="$new_path"
11837     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11838 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11839   fi
11840 
11841   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11842 
11843   path="$BOOT_JDK"
11844   has_colon=`$ECHO $path | $GREP ^.:`
11845   new_path="$path"
11846   if test "x$has_colon" = x; then
11847     # Not in mixed or Windows style, start by that.
11848     new_path=`cmd //c echo $path`
11849   fi
11850 
11851 
11852   input_path="$new_path"
11853   # Check if we need to convert this using DOS-style short mode. If the path
11854   # contains just simple characters, use it. Otherwise (spaces, weird characters),
11855   # take no chances and rewrite it.
11856   # Note: m4 eats our [], so we need to use [ and ] instead.
11857   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
11858   if test "x$has_forbidden_chars" != x; then
11859     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11860     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11861   fi
11862 
11863 
11864   windows_path="$new_path"
11865   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11866     unix_path=`$CYGPATH -u "$windows_path"`
11867     new_path="$unix_path"
11868   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11869     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11870     new_path="$unix_path"
11871   fi
11872 
11873   if test "x$path" != "x$new_path"; then
11874     BOOT_JDK="$new_path"
11875     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11876 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11877   fi
11878 
11879   # Save the first 10 bytes of this path to the storage, so fixpath can work.
11880   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
11881 
11882   else
11883     # We're on a posix platform. Hooray! :)
11884     path="$BOOT_JDK"
11885 
11886     if test ! -f "$path" && test ! -d "$path"; then
11887       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
11888     fi
11889 
11890     has_space=`$ECHO "$path" | $GREP " "`
11891     if test "x$has_space" != x; then
11892       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11893 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11894       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
11895     fi
11896   fi
11897 
11898               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
11899 $as_echo_n "checking for Boot JDK... " >&6; }
11900               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
11901 $as_echo "$BOOT_JDK" >&6; }
11902               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
11903 $as_echo_n "checking Boot JDK version... " >&6; }
11904               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
11905               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
11906 $as_echo "$BOOT_JDK_VERSION" >&6; }
11907             fi # end check jdk version
11908           fi # end check rt.jar
11909         fi # end check javac
11910       fi # end check java
11911     fi # end check boot jdk found
11912   fi
11913 
11914 
11915 # Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
11916 
11917   if test "x$BOOT_JDK_FOUND" = xno; then
11918     # Now execute the test
11919 
11920     # Extract the first word of "javac", so it can be a program name with args.
11921 set dummy javac; ac_word=$2
11922 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11923 $as_echo_n "checking for $ac_word... " >&6; }
11924 if ${ac_cv_path_JAVAC_CHECK+:} false; then :
11925   $as_echo_n "(cached) " >&6
11926 else
11927   case $JAVAC_CHECK in
11928   [\\/]* | ?:[\\/]*)
11929   ac_cv_path_JAVAC_CHECK="$JAVAC_CHECK" # Let the user override the test with a path.
11930   ;;
11931   *)
11932   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11933 for as_dir in $PATH
11934 do
11935   IFS=$as_save_IFS
11936   test -z "$as_dir" && as_dir=.
11937     for ac_exec_ext in '' $ac_executable_extensions; do
11938   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
11939     ac_cv_path_JAVAC_CHECK="$as_dir/$ac_word$ac_exec_ext"
11940     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11941     break 2
11942   fi
11943 done
11944   done
11945 IFS=$as_save_IFS
11946 
11947   ;;
11948 esac
11949 fi
11950 JAVAC_CHECK=$ac_cv_path_JAVAC_CHECK
11951 if test -n "$JAVAC_CHECK"; then
11952   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC_CHECK" >&5
11953 $as_echo "$JAVAC_CHECK" >&6; }
11954 else
11955   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11956 $as_echo "no" >&6; }
11957 fi
11958 
11959 
11960     # Extract the first word of "java", so it can be a program name with args.
11961 set dummy java; ac_word=$2
11962 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11963 $as_echo_n "checking for $ac_word... " >&6; }
11964 if ${ac_cv_path_JAVA_CHECK+:} false; then :
11965   $as_echo_n "(cached) " >&6
11966 else
11967   case $JAVA_CHECK in
11968   [\\/]* | ?:[\\/]*)
11969   ac_cv_path_JAVA_CHECK="$JAVA_CHECK" # Let the user override the test with a path.
11970   ;;
11971   *)
11972   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11973 for as_dir in $PATH
11974 do
11975   IFS=$as_save_IFS
11976   test -z "$as_dir" && as_dir=.
11977     for ac_exec_ext in '' $ac_executable_extensions; do
11978   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
11979     ac_cv_path_JAVA_CHECK="$as_dir/$ac_word$ac_exec_ext"
11980     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11981     break 2
11982   fi
11983 done
11984   done
11985 IFS=$as_save_IFS
11986 
11987   ;;
11988 esac
11989 fi
11990 JAVA_CHECK=$ac_cv_path_JAVA_CHECK
11991 if test -n "$JAVA_CHECK"; then
11992   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA_CHECK" >&5
11993 $as_echo "$JAVA_CHECK" >&6; }
11994 else
11995   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11996 $as_echo "no" >&6; }
11997 fi
11998 
11999 
12000     BINARY="$JAVAC_CHECK"
12001     if test "x$JAVAC_CHECK" = x; then
12002         BINARY="$JAVA_CHECK"
12003     fi
12004     if test "x$BINARY" != x; then
12005         # So there is a java(c) binary, it might be part of a JDK.
12006         # Lets find the JDK/JRE directory by following symbolic links.
12007         # Linux/GNU systems often have links from /usr/bin/java to
12008         # /etc/alternatives/java to the real JDK binary.
12009 
12010     if test "x$OPENJDK_BUILD_OS" != xwindows; then
12011         # Follow a chain of symbolic links. Use readlink
12012         # where it exists, else fall back to horribly
12013         # complicated shell code.
12014         if test "x$READLINK_TESTED" != yes; then
12015             # On MacOSX there is a readlink tool with a different
12016             # purpose than the GNU readlink tool. Check the found readlink.
12017             ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
12018             if test "x$ISGNU" = x; then
12019                  # A readlink that we do not know how to use.
12020                  # Are there other non-GNU readlinks out there?
12021                  READLINK_TESTED=yes
12022                  READLINK=
12023             fi
12024         fi
12025 
12026         if test "x$READLINK" != x; then
12027             BINARY=`$READLINK -f $BINARY`
12028         else
12029             # Save the current directory for restoring afterwards
12030             STARTDIR=$PWD
12031             COUNTER=0
12032             sym_link_dir=`$DIRNAME $BINARY`
12033             sym_link_file=`$BASENAME $BINARY`
12034             # Use the system pwd and not the shell builtin to resolve directory symlinks
12035             cd $sym_link_dir
12036             cd `$THEPWDCMD`
12037             sym_link_dir=`$THEPWDCMD`
12038             # Resolve file symlinks
12039             while test $COUNTER -lt 20; do
12040                 ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
12041                 if test "x$ISLINK" == x; then
12042                     # This is not a symbolic link! We are done!
12043                     break
12044                 fi
12045                 # Again resolve directory symlinks since the target of the just found
12046                 # link could be in a different directory
12047                 cd `$DIRNAME $ISLINK`
12048                 sym_link_dir=`$THEPWDCMD`
12049                 sym_link_file=`$BASENAME $ISLINK`
12050                 let COUNTER=COUNTER+1
12051             done
12052             cd $STARTDIR
12053             BINARY=$sym_link_dir/$sym_link_file
12054         fi
12055     fi
12056 
12057         BOOT_JDK=`dirname "$BINARY"`
12058         BOOT_JDK=`cd "$BOOT_JDK/.."; pwd`
12059         if test -x "$BOOT_JDK/bin/javac" && test -x "$BOOT_JDK/bin/java"; then
12060             # Looks like we found ourselves an JDK
12061             BOOT_JDK_FOUND=maybe
12062             { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using java(c) in PATH" >&5
12063 $as_echo "$as_me: Found potential Boot JDK using java(c) in PATH" >&6;}
12064         fi
12065     fi
12066 
12067 
12068     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12069     if test "x$BOOT_JDK_FOUND" = xmaybe; then
12070       # Do we have a bin/java?
12071       if test ! -x "$BOOT_JDK/bin/java"; then
12072         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12073 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12074         BOOT_JDK_FOUND=no
12075       else
12076         # Do we have a bin/javac?
12077         if test ! -x "$BOOT_JDK/bin/javac"; then
12078           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12079 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12080           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12081 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12082           BOOT_JDK_FOUND=no
12083         else
12084           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12085           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12086             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12087 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12088             BOOT_JDK_FOUND=no
12089           else
12090             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12091             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12092 
12093             # Extra M4 quote needed to protect [] in grep expression.
12094             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12095             if test "x$FOUND_VERSION_78" = x; then
12096               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12097 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12098               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12099 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12100               BOOT_JDK_FOUND=no
12101             else
12102               # We're done! :-)
12103               BOOT_JDK_FOUND=yes
12104 
12105   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12106 
12107   # Input might be given as Windows format, start by converting to
12108   # unix format.
12109   path="$BOOT_JDK"
12110   new_path=`$CYGPATH -u "$path"`
12111 
12112   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12113   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12114   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12115   # "foo.exe" is OK but "foo" is an error.
12116   #
12117   # This test is therefore slightly more accurate than "test -f" to check for file precense.
12118   # It is also a way to make sure we got the proper file name for the real test later on.
12119   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12120   if test "x$test_shortpath" = x; then
12121     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12122 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12123     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12124   fi
12125 
12126   # Call helper function which possibly converts this using DOS-style short mode.
12127   # If so, the updated path is stored in $new_path.
12128 
12129   input_path="$new_path"
12130   # Check if we need to convert this using DOS-style short mode. If the path
12131   # contains just simple characters, use it. Otherwise (spaces, weird characters),
12132   # take no chances and rewrite it.
12133   # Note: m4 eats our [], so we need to use [ and ] instead.
12134   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12135   if test "x$has_forbidden_chars" != x; then
12136     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12137     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12138     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12139     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12140       # Going to short mode and back again did indeed matter. Since short mode is
12141       # case insensitive, let's make it lowercase to improve readability.
12142       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12143       # Now convert it back to Unix-stile (cygpath)
12144       input_path=`$CYGPATH -u "$shortmode_path"`
12145       new_path="$input_path"
12146     fi
12147   fi
12148 
12149   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12150   if test "x$test_cygdrive_prefix" = x; then
12151     # As a simple fix, exclude /usr/bin since it's not a real path.
12152     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12153       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12154       # a path prefixed by /cygdrive for fixpath to work.
12155       new_path="$CYGWIN_ROOT_PATH$input_path"
12156     fi
12157   fi
12158 
12159 
12160   if test "x$path" != "x$new_path"; then
12161     BOOT_JDK="$new_path"
12162     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12163 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12164   fi
12165 
12166   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12167 
12168   path="$BOOT_JDK"
12169   has_colon=`$ECHO $path | $GREP ^.:`
12170   new_path="$path"
12171   if test "x$has_colon" = x; then
12172     # Not in mixed or Windows style, start by that.
12173     new_path=`cmd //c echo $path`
12174   fi
12175 
12176 
12177   input_path="$new_path"
12178   # Check if we need to convert this using DOS-style short mode. If the path
12179   # contains just simple characters, use it. Otherwise (spaces, weird characters),
12180   # take no chances and rewrite it.
12181   # Note: m4 eats our [], so we need to use [ and ] instead.
12182   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12183   if test "x$has_forbidden_chars" != x; then
12184     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12185     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12186   fi
12187 
12188 
12189   windows_path="$new_path"
12190   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12191     unix_path=`$CYGPATH -u "$windows_path"`
12192     new_path="$unix_path"
12193   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12194     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12195     new_path="$unix_path"
12196   fi
12197 
12198   if test "x$path" != "x$new_path"; then
12199     BOOT_JDK="$new_path"
12200     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12201 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12202   fi
12203 
12204   # Save the first 10 bytes of this path to the storage, so fixpath can work.
12205   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12206 
12207   else
12208     # We're on a posix platform. Hooray! :)
12209     path="$BOOT_JDK"
12210 
12211     if test ! -f "$path" && test ! -d "$path"; then
12212       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
12213     fi
12214 
12215     has_space=`$ECHO "$path" | $GREP " "`
12216     if test "x$has_space" != x; then
12217       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12218 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12219       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
12220     fi
12221   fi
12222 
12223               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12224 $as_echo_n "checking for Boot JDK... " >&6; }
12225               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12226 $as_echo "$BOOT_JDK" >&6; }
12227               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12228 $as_echo_n "checking Boot JDK version... " >&6; }
12229               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12230               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12231 $as_echo "$BOOT_JDK_VERSION" >&6; }
12232             fi # end check jdk version
12233           fi # end check rt.jar
12234         fi # end check javac
12235       fi # end check java
12236     fi # end check boot jdk found
12237   fi
12238 
12239 
12240 # Test: Is there a JDK installed in default, well-known locations?
12241 
12242   if test "x$BOOT_JDK_FOUND" = xno; then
12243     # Now execute the test
12244 
12245   if test "x$OPENJDK_TARGET_OS" = xwindows; then
12246 
12247   if test "x$BOOT_JDK_FOUND" = xno; then
12248     # Now execute the test
12249 
12250   if test "x$ProgramW6432" != x; then
12251     VIRTUAL_DIR="$ProgramW6432/Java"
12252 
12253   windows_path="$VIRTUAL_DIR"
12254   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12255     unix_path=`$CYGPATH -u "$windows_path"`
12256     VIRTUAL_DIR="$unix_path"
12257   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12258     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12259     VIRTUAL_DIR="$unix_path"
12260   fi
12261 
12262 
12263   BOOT_JDK_PREFIX="$VIRTUAL_DIR"
12264   BOOT_JDK_SUFFIX=""
12265   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
12266   if test "x$ALL_JDKS_FOUND" != x; then
12267     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
12268 
12269   if test "x$BOOT_JDK_FOUND" = xno; then
12270     # Now execute the test
12271 
12272         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
12273         if test -d "$BOOT_JDK"; then
12274           BOOT_JDK_FOUND=maybe
12275           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
12276 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
12277         fi
12278 
12279 
12280     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12281     if test "x$BOOT_JDK_FOUND" = xmaybe; then
12282       # Do we have a bin/java?
12283       if test ! -x "$BOOT_JDK/bin/java"; then
12284         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12285 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12286         BOOT_JDK_FOUND=no
12287       else
12288         # Do we have a bin/javac?
12289         if test ! -x "$BOOT_JDK/bin/javac"; then
12290           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12291 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12292           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12293 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12294           BOOT_JDK_FOUND=no
12295         else
12296           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12297           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12298             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12299 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12300             BOOT_JDK_FOUND=no
12301           else
12302             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12303             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12304 
12305             # Extra M4 quote needed to protect [] in grep expression.
12306             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12307             if test "x$FOUND_VERSION_78" = x; then
12308               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12309 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12310               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12311 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12312               BOOT_JDK_FOUND=no
12313             else
12314               # We're done! :-)
12315               BOOT_JDK_FOUND=yes
12316 
12317   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12318 
12319   # Input might be given as Windows format, start by converting to
12320   # unix format.
12321   path="$BOOT_JDK"
12322   new_path=`$CYGPATH -u "$path"`
12323 
12324   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12325   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12326   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12327   # "foo.exe" is OK but "foo" is an error.
12328   #
12329   # This test is therefore slightly more accurate than "test -f" to check for file precense.
12330   # It is also a way to make sure we got the proper file name for the real test later on.
12331   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12332   if test "x$test_shortpath" = x; then
12333     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12334 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12335     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12336   fi
12337 
12338   # Call helper function which possibly converts this using DOS-style short mode.
12339   # If so, the updated path is stored in $new_path.
12340 
12341   input_path="$new_path"
12342   # Check if we need to convert this using DOS-style short mode. If the path
12343   # contains just simple characters, use it. Otherwise (spaces, weird characters),
12344   # take no chances and rewrite it.
12345   # Note: m4 eats our [], so we need to use [ and ] instead.
12346   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12347   if test "x$has_forbidden_chars" != x; then
12348     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12349     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12350     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12351     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12352       # Going to short mode and back again did indeed matter. Since short mode is
12353       # case insensitive, let's make it lowercase to improve readability.
12354       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12355       # Now convert it back to Unix-stile (cygpath)
12356       input_path=`$CYGPATH -u "$shortmode_path"`
12357       new_path="$input_path"
12358     fi
12359   fi
12360 
12361   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12362   if test "x$test_cygdrive_prefix" = x; then
12363     # As a simple fix, exclude /usr/bin since it's not a real path.
12364     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12365       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12366       # a path prefixed by /cygdrive for fixpath to work.
12367       new_path="$CYGWIN_ROOT_PATH$input_path"
12368     fi
12369   fi
12370 
12371 
12372   if test "x$path" != "x$new_path"; then
12373     BOOT_JDK="$new_path"
12374     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12375 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12376   fi
12377 
12378   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12379 
12380   path="$BOOT_JDK"
12381   has_colon=`$ECHO $path | $GREP ^.:`
12382   new_path="$path"
12383   if test "x$has_colon" = x; then
12384     # Not in mixed or Windows style, start by that.
12385     new_path=`cmd //c echo $path`
12386   fi
12387 
12388 
12389   input_path="$new_path"
12390   # Check if we need to convert this using DOS-style short mode. If the path
12391   # contains just simple characters, use it. Otherwise (spaces, weird characters),
12392   # take no chances and rewrite it.
12393   # Note: m4 eats our [], so we need to use [ and ] instead.
12394   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12395   if test "x$has_forbidden_chars" != x; then
12396     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12397     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12398   fi
12399 
12400 
12401   windows_path="$new_path"
12402   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12403     unix_path=`$CYGPATH -u "$windows_path"`
12404     new_path="$unix_path"
12405   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12406     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12407     new_path="$unix_path"
12408   fi
12409 
12410   if test "x$path" != "x$new_path"; then
12411     BOOT_JDK="$new_path"
12412     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12413 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12414   fi
12415 
12416   # Save the first 10 bytes of this path to the storage, so fixpath can work.
12417   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12418 
12419   else
12420     # We're on a posix platform. Hooray! :)
12421     path="$BOOT_JDK"
12422 
12423     if test ! -f "$path" && test ! -d "$path"; then
12424       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
12425     fi
12426 
12427     has_space=`$ECHO "$path" | $GREP " "`
12428     if test "x$has_space" != x; then
12429       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12430 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12431       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
12432     fi
12433   fi
12434 
12435               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12436 $as_echo_n "checking for Boot JDK... " >&6; }
12437               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12438 $as_echo "$BOOT_JDK" >&6; }
12439               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12440 $as_echo_n "checking Boot JDK version... " >&6; }
12441               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12442               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12443 $as_echo "$BOOT_JDK_VERSION" >&6; }
12444             fi # end check jdk version
12445           fi # end check rt.jar
12446         fi # end check javac
12447       fi # end check java
12448     fi # end check boot jdk found
12449   fi
12450 
12451     done
12452   fi
12453 
12454   fi
12455 
12456 
12457     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12458     if test "x$BOOT_JDK_FOUND" = xmaybe; then
12459       # Do we have a bin/java?
12460       if test ! -x "$BOOT_JDK/bin/java"; then
12461         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12462 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12463         BOOT_JDK_FOUND=no
12464       else
12465         # Do we have a bin/javac?
12466         if test ! -x "$BOOT_JDK/bin/javac"; then
12467           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12468 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12469           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12470 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12471           BOOT_JDK_FOUND=no
12472         else
12473           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12474           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12475             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12476 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12477             BOOT_JDK_FOUND=no
12478           else
12479             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12480             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12481 
12482             # Extra M4 quote needed to protect [] in grep expression.
12483             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12484             if test "x$FOUND_VERSION_78" = x; then
12485               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12486 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12487               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12488 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12489               BOOT_JDK_FOUND=no
12490             else
12491               # We're done! :-)
12492               BOOT_JDK_FOUND=yes
12493 
12494   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12495 
12496   # Input might be given as Windows format, start by converting to
12497   # unix format.
12498   path="$BOOT_JDK"
12499   new_path=`$CYGPATH -u "$path"`
12500 
12501   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12502   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12503   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12504   # "foo.exe" is OK but "foo" is an error.
12505   #
12506   # This test is therefore slightly more accurate than "test -f" to check for file precense.
12507   # It is also a way to make sure we got the proper file name for the real test later on.
12508   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12509   if test "x$test_shortpath" = x; then
12510     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12511 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12512     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12513   fi
12514 
12515   # Call helper function which possibly converts this using DOS-style short mode.
12516   # If so, the updated path is stored in $new_path.
12517 
12518   input_path="$new_path"
12519   # Check if we need to convert this using DOS-style short mode. If the path
12520   # contains just simple characters, use it. Otherwise (spaces, weird characters),
12521   # take no chances and rewrite it.
12522   # Note: m4 eats our [], so we need to use [ and ] instead.
12523   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12524   if test "x$has_forbidden_chars" != x; then
12525     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12526     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12527     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12528     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12529       # Going to short mode and back again did indeed matter. Since short mode is
12530       # case insensitive, let's make it lowercase to improve readability.
12531       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12532       # Now convert it back to Unix-stile (cygpath)
12533       input_path=`$CYGPATH -u "$shortmode_path"`
12534       new_path="$input_path"
12535     fi
12536   fi
12537 
12538   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12539   if test "x$test_cygdrive_prefix" = x; then
12540     # As a simple fix, exclude /usr/bin since it's not a real path.
12541     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12542       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12543       # a path prefixed by /cygdrive for fixpath to work.
12544       new_path="$CYGWIN_ROOT_PATH$input_path"
12545     fi
12546   fi
12547 
12548 
12549   if test "x$path" != "x$new_path"; then
12550     BOOT_JDK="$new_path"
12551     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12552 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12553   fi
12554 
12555   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12556 
12557   path="$BOOT_JDK"
12558   has_colon=`$ECHO $path | $GREP ^.:`
12559   new_path="$path"
12560   if test "x$has_colon" = x; then
12561     # Not in mixed or Windows style, start by that.
12562     new_path=`cmd //c echo $path`
12563   fi
12564 
12565 
12566   input_path="$new_path"
12567   # Check if we need to convert this using DOS-style short mode. If the path
12568   # contains just simple characters, use it. Otherwise (spaces, weird characters),
12569   # take no chances and rewrite it.
12570   # Note: m4 eats our [], so we need to use [ and ] instead.
12571   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12572   if test "x$has_forbidden_chars" != x; then
12573     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12574     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12575   fi
12576 
12577 
12578   windows_path="$new_path"
12579   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12580     unix_path=`$CYGPATH -u "$windows_path"`
12581     new_path="$unix_path"
12582   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12583     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12584     new_path="$unix_path"
12585   fi
12586 
12587   if test "x$path" != "x$new_path"; then
12588     BOOT_JDK="$new_path"
12589     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12590 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12591   fi
12592 
12593   # Save the first 10 bytes of this path to the storage, so fixpath can work.
12594   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12595 
12596   else
12597     # We're on a posix platform. Hooray! :)
12598     path="$BOOT_JDK"
12599 
12600     if test ! -f "$path" && test ! -d "$path"; then
12601       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
12602     fi
12603 
12604     has_space=`$ECHO "$path" | $GREP " "`
12605     if test "x$has_space" != x; then
12606       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12607 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12608       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
12609     fi
12610   fi
12611 
12612               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12613 $as_echo_n "checking for Boot JDK... " >&6; }
12614               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12615 $as_echo "$BOOT_JDK" >&6; }
12616               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12617 $as_echo_n "checking Boot JDK version... " >&6; }
12618               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12619               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12620 $as_echo "$BOOT_JDK_VERSION" >&6; }
12621             fi # end check jdk version
12622           fi # end check rt.jar
12623         fi # end check javac
12624       fi # end check java
12625     fi # end check boot jdk found
12626   fi
12627 
12628 
12629   if test "x$BOOT_JDK_FOUND" = xno; then
12630     # Now execute the test
12631 
12632   if test "x$PROGRAMW6432" != x; then
12633     VIRTUAL_DIR="$PROGRAMW6432/Java"
12634 
12635   windows_path="$VIRTUAL_DIR"
12636   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12637     unix_path=`$CYGPATH -u "$windows_path"`
12638     VIRTUAL_DIR="$unix_path"
12639   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12640     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12641     VIRTUAL_DIR="$unix_path"
12642   fi
12643 
12644 
12645   BOOT_JDK_PREFIX="$VIRTUAL_DIR"
12646   BOOT_JDK_SUFFIX=""
12647   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
12648   if test "x$ALL_JDKS_FOUND" != x; then
12649     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
12650 
12651   if test "x$BOOT_JDK_FOUND" = xno; then
12652     # Now execute the test
12653 
12654         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
12655         if test -d "$BOOT_JDK"; then
12656           BOOT_JDK_FOUND=maybe
12657           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
12658 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
12659         fi
12660 
12661 
12662     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12663     if test "x$BOOT_JDK_FOUND" = xmaybe; then
12664       # Do we have a bin/java?
12665       if test ! -x "$BOOT_JDK/bin/java"; then
12666         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12667 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12668         BOOT_JDK_FOUND=no
12669       else
12670         # Do we have a bin/javac?
12671         if test ! -x "$BOOT_JDK/bin/javac"; then
12672           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12673 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12674           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12675 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12676           BOOT_JDK_FOUND=no
12677         else
12678           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12679           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12680             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12681 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12682             BOOT_JDK_FOUND=no
12683           else
12684             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12685             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12686 
12687             # Extra M4 quote needed to protect [] in grep expression.
12688             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12689             if test "x$FOUND_VERSION_78" = x; then
12690               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12691 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12692               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12693 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12694               BOOT_JDK_FOUND=no
12695             else
12696               # We're done! :-)
12697               BOOT_JDK_FOUND=yes
12698 
12699   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12700 
12701   # Input might be given as Windows format, start by converting to
12702   # unix format.
12703   path="$BOOT_JDK"
12704   new_path=`$CYGPATH -u "$path"`
12705 
12706   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12707   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12708   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12709   # "foo.exe" is OK but "foo" is an error.
12710   #
12711   # This test is therefore slightly more accurate than "test -f" to check for file precense.
12712   # It is also a way to make sure we got the proper file name for the real test later on.
12713   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12714   if test "x$test_shortpath" = x; then
12715     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12716 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12717     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12718   fi
12719 
12720   # Call helper function which possibly converts this using DOS-style short mode.
12721   # If so, the updated path is stored in $new_path.
12722 
12723   input_path="$new_path"
12724   # Check if we need to convert this using DOS-style short mode. If the path
12725   # contains just simple characters, use it. Otherwise (spaces, weird characters),
12726   # take no chances and rewrite it.
12727   # Note: m4 eats our [], so we need to use [ and ] instead.
12728   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12729   if test "x$has_forbidden_chars" != x; then
12730     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12731     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12732     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12733     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12734       # Going to short mode and back again did indeed matter. Since short mode is
12735       # case insensitive, let's make it lowercase to improve readability.
12736       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12737       # Now convert it back to Unix-stile (cygpath)
12738       input_path=`$CYGPATH -u "$shortmode_path"`
12739       new_path="$input_path"
12740     fi
12741   fi
12742 
12743   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12744   if test "x$test_cygdrive_prefix" = x; then
12745     # As a simple fix, exclude /usr/bin since it's not a real path.
12746     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12747       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12748       # a path prefixed by /cygdrive for fixpath to work.
12749       new_path="$CYGWIN_ROOT_PATH$input_path"
12750     fi
12751   fi
12752 
12753 
12754   if test "x$path" != "x$new_path"; then
12755     BOOT_JDK="$new_path"
12756     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12757 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12758   fi
12759 
12760   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12761 
12762   path="$BOOT_JDK"
12763   has_colon=`$ECHO $path | $GREP ^.:`
12764   new_path="$path"
12765   if test "x$has_colon" = x; then
12766     # Not in mixed or Windows style, start by that.
12767     new_path=`cmd //c echo $path`
12768   fi
12769 
12770 
12771   input_path="$new_path"
12772   # Check if we need to convert this using DOS-style short mode. If the path
12773   # contains just simple characters, use it. Otherwise (spaces, weird characters),
12774   # take no chances and rewrite it.
12775   # Note: m4 eats our [], so we need to use [ and ] instead.
12776   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12777   if test "x$has_forbidden_chars" != x; then
12778     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12779     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12780   fi
12781 
12782 
12783   windows_path="$new_path"
12784   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12785     unix_path=`$CYGPATH -u "$windows_path"`
12786     new_path="$unix_path"
12787   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12788     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12789     new_path="$unix_path"
12790   fi
12791 
12792   if test "x$path" != "x$new_path"; then
12793     BOOT_JDK="$new_path"
12794     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12795 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12796   fi
12797 
12798   # Save the first 10 bytes of this path to the storage, so fixpath can work.
12799   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12800 
12801   else
12802     # We're on a posix platform. Hooray! :)
12803     path="$BOOT_JDK"
12804 
12805     if test ! -f "$path" && test ! -d "$path"; then
12806       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
12807     fi
12808 
12809     has_space=`$ECHO "$path" | $GREP " "`
12810     if test "x$has_space" != x; then
12811       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12812 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12813       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
12814     fi
12815   fi
12816 
12817               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12818 $as_echo_n "checking for Boot JDK... " >&6; }
12819               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12820 $as_echo "$BOOT_JDK" >&6; }
12821               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12822 $as_echo_n "checking Boot JDK version... " >&6; }
12823               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12824               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12825 $as_echo "$BOOT_JDK_VERSION" >&6; }
12826             fi # end check jdk version
12827           fi # end check rt.jar
12828         fi # end check javac
12829       fi # end check java
12830     fi # end check boot jdk found
12831   fi
12832 
12833     done
12834   fi
12835 
12836   fi
12837 
12838 
12839     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12840     if test "x$BOOT_JDK_FOUND" = xmaybe; then
12841       # Do we have a bin/java?
12842       if test ! -x "$BOOT_JDK/bin/java"; then
12843         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12844 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12845         BOOT_JDK_FOUND=no
12846       else
12847         # Do we have a bin/javac?
12848         if test ! -x "$BOOT_JDK/bin/javac"; then
12849           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12850 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12851           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12852 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12853           BOOT_JDK_FOUND=no
12854         else
12855           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12856           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12857             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12858 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12859             BOOT_JDK_FOUND=no
12860           else
12861             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12862             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12863 
12864             # Extra M4 quote needed to protect [] in grep expression.
12865             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12866             if test "x$FOUND_VERSION_78" = x; then
12867               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12868 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12869               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12870 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12871               BOOT_JDK_FOUND=no
12872             else
12873               # We're done! :-)
12874               BOOT_JDK_FOUND=yes
12875 
12876   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12877 
12878   # Input might be given as Windows format, start by converting to
12879   # unix format.
12880   path="$BOOT_JDK"
12881   new_path=`$CYGPATH -u "$path"`
12882 
12883   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12884   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12885   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12886   # "foo.exe" is OK but "foo" is an error.
12887   #
12888   # This test is therefore slightly more accurate than "test -f" to check for file precense.
12889   # It is also a way to make sure we got the proper file name for the real test later on.
12890   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12891   if test "x$test_shortpath" = x; then
12892     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12893 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12894     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12895   fi
12896 
12897   # Call helper function which possibly converts this using DOS-style short mode.
12898   # If so, the updated path is stored in $new_path.
12899 
12900   input_path="$new_path"
12901   # Check if we need to convert this using DOS-style short mode. If the path
12902   # contains just simple characters, use it. Otherwise (spaces, weird characters),
12903   # take no chances and rewrite it.
12904   # Note: m4 eats our [], so we need to use [ and ] instead.
12905   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12906   if test "x$has_forbidden_chars" != x; then
12907     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12908     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12909     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12910     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12911       # Going to short mode and back again did indeed matter. Since short mode is
12912       # case insensitive, let's make it lowercase to improve readability.
12913       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12914       # Now convert it back to Unix-stile (cygpath)
12915       input_path=`$CYGPATH -u "$shortmode_path"`
12916       new_path="$input_path"
12917     fi
12918   fi
12919 
12920   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12921   if test "x$test_cygdrive_prefix" = x; then
12922     # As a simple fix, exclude /usr/bin since it's not a real path.
12923     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12924       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12925       # a path prefixed by /cygdrive for fixpath to work.
12926       new_path="$CYGWIN_ROOT_PATH$input_path"
12927     fi
12928   fi
12929 
12930 
12931   if test "x$path" != "x$new_path"; then
12932     BOOT_JDK="$new_path"
12933     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12934 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12935   fi
12936 
12937   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12938 
12939   path="$BOOT_JDK"
12940   has_colon=`$ECHO $path | $GREP ^.:`
12941   new_path="$path"
12942   if test "x$has_colon" = x; then
12943     # Not in mixed or Windows style, start by that.
12944     new_path=`cmd //c echo $path`
12945   fi
12946 
12947 
12948   input_path="$new_path"
12949   # Check if we need to convert this using DOS-style short mode. If the path
12950   # contains just simple characters, use it. Otherwise (spaces, weird characters),
12951   # take no chances and rewrite it.
12952   # Note: m4 eats our [], so we need to use [ and ] instead.
12953   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12954   if test "x$has_forbidden_chars" != x; then
12955     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12956     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12957   fi
12958 
12959 
12960   windows_path="$new_path"
12961   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12962     unix_path=`$CYGPATH -u "$windows_path"`
12963     new_path="$unix_path"
12964   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12965     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12966     new_path="$unix_path"
12967   fi
12968 
12969   if test "x$path" != "x$new_path"; then
12970     BOOT_JDK="$new_path"
12971     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12972 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12973   fi
12974 
12975   # Save the first 10 bytes of this path to the storage, so fixpath can work.
12976   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12977 
12978   else
12979     # We're on a posix platform. Hooray! :)
12980     path="$BOOT_JDK"
12981 
12982     if test ! -f "$path" && test ! -d "$path"; then
12983       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
12984     fi
12985 
12986     has_space=`$ECHO "$path" | $GREP " "`
12987     if test "x$has_space" != x; then
12988       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12989 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12990       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
12991     fi
12992   fi
12993 
12994               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12995 $as_echo_n "checking for Boot JDK... " >&6; }
12996               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12997 $as_echo "$BOOT_JDK" >&6; }
12998               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12999 $as_echo_n "checking Boot JDK version... " >&6; }
13000               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13001               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13002 $as_echo "$BOOT_JDK_VERSION" >&6; }
13003             fi # end check jdk version
13004           fi # end check rt.jar
13005         fi # end check javac
13006       fi # end check java
13007     fi # end check boot jdk found
13008   fi
13009 
13010 
13011   if test "x$BOOT_JDK_FOUND" = xno; then
13012     # Now execute the test
13013 
13014   if test "x$PROGRAMFILES" != x; then
13015     VIRTUAL_DIR="$PROGRAMFILES/Java"
13016 
13017   windows_path="$VIRTUAL_DIR"
13018   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13019     unix_path=`$CYGPATH -u "$windows_path"`
13020     VIRTUAL_DIR="$unix_path"
13021   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13022     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13023     VIRTUAL_DIR="$unix_path"
13024   fi
13025 
13026 
13027   BOOT_JDK_PREFIX="$VIRTUAL_DIR"
13028   BOOT_JDK_SUFFIX=""
13029   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
13030   if test "x$ALL_JDKS_FOUND" != x; then
13031     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
13032 
13033   if test "x$BOOT_JDK_FOUND" = xno; then
13034     # Now execute the test
13035 
13036         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
13037         if test -d "$BOOT_JDK"; then
13038           BOOT_JDK_FOUND=maybe
13039           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
13040 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
13041         fi
13042 
13043 
13044     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13045     if test "x$BOOT_JDK_FOUND" = xmaybe; then
13046       # Do we have a bin/java?
13047       if test ! -x "$BOOT_JDK/bin/java"; then
13048         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13049 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13050         BOOT_JDK_FOUND=no
13051       else
13052         # Do we have a bin/javac?
13053         if test ! -x "$BOOT_JDK/bin/javac"; then
13054           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13055 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13056           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13057 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13058           BOOT_JDK_FOUND=no
13059         else
13060           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13061           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13062             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13063 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13064             BOOT_JDK_FOUND=no
13065           else
13066             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13067             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13068 
13069             # Extra M4 quote needed to protect [] in grep expression.
13070             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13071             if test "x$FOUND_VERSION_78" = x; then
13072               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13073 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13074               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13075 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13076               BOOT_JDK_FOUND=no
13077             else
13078               # We're done! :-)
13079               BOOT_JDK_FOUND=yes
13080 
13081   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13082 
13083   # Input might be given as Windows format, start by converting to
13084   # unix format.
13085   path="$BOOT_JDK"
13086   new_path=`$CYGPATH -u "$path"`
13087 
13088   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13089   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13090   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13091   # "foo.exe" is OK but "foo" is an error.
13092   #
13093   # This test is therefore slightly more accurate than "test -f" to check for file precense.
13094   # It is also a way to make sure we got the proper file name for the real test later on.
13095   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13096   if test "x$test_shortpath" = x; then
13097     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13098 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13099     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13100   fi
13101 
13102   # Call helper function which possibly converts this using DOS-style short mode.
13103   # If so, the updated path is stored in $new_path.
13104 
13105   input_path="$new_path"
13106   # Check if we need to convert this using DOS-style short mode. If the path
13107   # contains just simple characters, use it. Otherwise (spaces, weird characters),
13108   # take no chances and rewrite it.
13109   # Note: m4 eats our [], so we need to use [ and ] instead.
13110   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13111   if test "x$has_forbidden_chars" != x; then
13112     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13113     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13114     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13115     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13116       # Going to short mode and back again did indeed matter. Since short mode is
13117       # case insensitive, let's make it lowercase to improve readability.
13118       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13119       # Now convert it back to Unix-stile (cygpath)
13120       input_path=`$CYGPATH -u "$shortmode_path"`
13121       new_path="$input_path"
13122     fi
13123   fi
13124 
13125   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13126   if test "x$test_cygdrive_prefix" = x; then
13127     # As a simple fix, exclude /usr/bin since it's not a real path.
13128     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13129       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13130       # a path prefixed by /cygdrive for fixpath to work.
13131       new_path="$CYGWIN_ROOT_PATH$input_path"
13132     fi
13133   fi
13134 
13135 
13136   if test "x$path" != "x$new_path"; then
13137     BOOT_JDK="$new_path"
13138     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13139 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13140   fi
13141 
13142   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13143 
13144   path="$BOOT_JDK"
13145   has_colon=`$ECHO $path | $GREP ^.:`
13146   new_path="$path"
13147   if test "x$has_colon" = x; then
13148     # Not in mixed or Windows style, start by that.
13149     new_path=`cmd //c echo $path`
13150   fi
13151 
13152 
13153   input_path="$new_path"
13154   # Check if we need to convert this using DOS-style short mode. If the path
13155   # contains just simple characters, use it. Otherwise (spaces, weird characters),
13156   # take no chances and rewrite it.
13157   # Note: m4 eats our [], so we need to use [ and ] instead.
13158   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13159   if test "x$has_forbidden_chars" != x; then
13160     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13161     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13162   fi
13163 
13164 
13165   windows_path="$new_path"
13166   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13167     unix_path=`$CYGPATH -u "$windows_path"`
13168     new_path="$unix_path"
13169   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13170     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13171     new_path="$unix_path"
13172   fi
13173 
13174   if test "x$path" != "x$new_path"; then
13175     BOOT_JDK="$new_path"
13176     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13177 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13178   fi
13179 
13180   # Save the first 10 bytes of this path to the storage, so fixpath can work.
13181   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13182 
13183   else
13184     # We're on a posix platform. Hooray! :)
13185     path="$BOOT_JDK"
13186 
13187     if test ! -f "$path" && test ! -d "$path"; then
13188       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13189     fi
13190 
13191     has_space=`$ECHO "$path" | $GREP " "`
13192     if test "x$has_space" != x; then
13193       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13194 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13195       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13196     fi
13197   fi
13198 
13199               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13200 $as_echo_n "checking for Boot JDK... " >&6; }
13201               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13202 $as_echo "$BOOT_JDK" >&6; }
13203               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13204 $as_echo_n "checking Boot JDK version... " >&6; }
13205               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13206               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13207 $as_echo "$BOOT_JDK_VERSION" >&6; }
13208             fi # end check jdk version
13209           fi # end check rt.jar
13210         fi # end check javac
13211       fi # end check java
13212     fi # end check boot jdk found
13213   fi
13214 
13215     done
13216   fi
13217 
13218   fi
13219 
13220 
13221     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13222     if test "x$BOOT_JDK_FOUND" = xmaybe; then
13223       # Do we have a bin/java?
13224       if test ! -x "$BOOT_JDK/bin/java"; then
13225         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13226 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13227         BOOT_JDK_FOUND=no
13228       else
13229         # Do we have a bin/javac?
13230         if test ! -x "$BOOT_JDK/bin/javac"; then
13231           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13232 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13233           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13234 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13235           BOOT_JDK_FOUND=no
13236         else
13237           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13238           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13239             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13240 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13241             BOOT_JDK_FOUND=no
13242           else
13243             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13244             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13245 
13246             # Extra M4 quote needed to protect [] in grep expression.
13247             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13248             if test "x$FOUND_VERSION_78" = x; then
13249               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13250 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13251               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13252 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13253               BOOT_JDK_FOUND=no
13254             else
13255               # We're done! :-)
13256               BOOT_JDK_FOUND=yes
13257 
13258   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13259 
13260   # Input might be given as Windows format, start by converting to
13261   # unix format.
13262   path="$BOOT_JDK"
13263   new_path=`$CYGPATH -u "$path"`
13264 
13265   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13266   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13267   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13268   # "foo.exe" is OK but "foo" is an error.
13269   #
13270   # This test is therefore slightly more accurate than "test -f" to check for file precense.
13271   # It is also a way to make sure we got the proper file name for the real test later on.
13272   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13273   if test "x$test_shortpath" = x; then
13274     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13275 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13276     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13277   fi
13278 
13279   # Call helper function which possibly converts this using DOS-style short mode.
13280   # If so, the updated path is stored in $new_path.
13281 
13282   input_path="$new_path"
13283   # Check if we need to convert this using DOS-style short mode. If the path
13284   # contains just simple characters, use it. Otherwise (spaces, weird characters),
13285   # take no chances and rewrite it.
13286   # Note: m4 eats our [], so we need to use [ and ] instead.
13287   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13288   if test "x$has_forbidden_chars" != x; then
13289     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13290     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13291     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13292     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13293       # Going to short mode and back again did indeed matter. Since short mode is
13294       # case insensitive, let's make it lowercase to improve readability.
13295       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13296       # Now convert it back to Unix-stile (cygpath)
13297       input_path=`$CYGPATH -u "$shortmode_path"`
13298       new_path="$input_path"
13299     fi
13300   fi
13301 
13302   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13303   if test "x$test_cygdrive_prefix" = x; then
13304     # As a simple fix, exclude /usr/bin since it's not a real path.
13305     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13306       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13307       # a path prefixed by /cygdrive for fixpath to work.
13308       new_path="$CYGWIN_ROOT_PATH$input_path"
13309     fi
13310   fi
13311 
13312 
13313   if test "x$path" != "x$new_path"; then
13314     BOOT_JDK="$new_path"
13315     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13316 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13317   fi
13318 
13319   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13320 
13321   path="$BOOT_JDK"
13322   has_colon=`$ECHO $path | $GREP ^.:`
13323   new_path="$path"
13324   if test "x$has_colon" = x; then
13325     # Not in mixed or Windows style, start by that.
13326     new_path=`cmd //c echo $path`
13327   fi
13328 
13329 
13330   input_path="$new_path"
13331   # Check if we need to convert this using DOS-style short mode. If the path
13332   # contains just simple characters, use it. Otherwise (spaces, weird characters),
13333   # take no chances and rewrite it.
13334   # Note: m4 eats our [], so we need to use [ and ] instead.
13335   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13336   if test "x$has_forbidden_chars" != x; then
13337     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13338     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13339   fi
13340 
13341 
13342   windows_path="$new_path"
13343   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13344     unix_path=`$CYGPATH -u "$windows_path"`
13345     new_path="$unix_path"
13346   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13347     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13348     new_path="$unix_path"
13349   fi
13350 
13351   if test "x$path" != "x$new_path"; then
13352     BOOT_JDK="$new_path"
13353     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13354 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13355   fi
13356 
13357   # Save the first 10 bytes of this path to the storage, so fixpath can work.
13358   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13359 
13360   else
13361     # We're on a posix platform. Hooray! :)
13362     path="$BOOT_JDK"
13363 
13364     if test ! -f "$path" && test ! -d "$path"; then
13365       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13366     fi
13367 
13368     has_space=`$ECHO "$path" | $GREP " "`
13369     if test "x$has_space" != x; then
13370       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13371 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13372       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13373     fi
13374   fi
13375 
13376               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13377 $as_echo_n "checking for Boot JDK... " >&6; }
13378               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13379 $as_echo "$BOOT_JDK" >&6; }
13380               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13381 $as_echo_n "checking Boot JDK version... " >&6; }
13382               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13383               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13384 $as_echo "$BOOT_JDK_VERSION" >&6; }
13385             fi # end check jdk version
13386           fi # end check rt.jar
13387         fi # end check javac
13388       fi # end check java
13389     fi # end check boot jdk found
13390   fi
13391 
13392 
13393   if test "x$BOOT_JDK_FOUND" = xno; then
13394     # Now execute the test
13395 
13396   if test "x$ProgramFiles" != x; then
13397     VIRTUAL_DIR="$ProgramFiles/Java"
13398 
13399   windows_path="$VIRTUAL_DIR"
13400   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13401     unix_path=`$CYGPATH -u "$windows_path"`
13402     VIRTUAL_DIR="$unix_path"
13403   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13404     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13405     VIRTUAL_DIR="$unix_path"
13406   fi
13407 
13408 
13409   BOOT_JDK_PREFIX="$VIRTUAL_DIR"
13410   BOOT_JDK_SUFFIX=""
13411   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
13412   if test "x$ALL_JDKS_FOUND" != x; then
13413     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
13414 
13415   if test "x$BOOT_JDK_FOUND" = xno; then
13416     # Now execute the test
13417 
13418         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
13419         if test -d "$BOOT_JDK"; then
13420           BOOT_JDK_FOUND=maybe
13421           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
13422 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
13423         fi
13424 
13425 
13426     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13427     if test "x$BOOT_JDK_FOUND" = xmaybe; then
13428       # Do we have a bin/java?
13429       if test ! -x "$BOOT_JDK/bin/java"; then
13430         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13431 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13432         BOOT_JDK_FOUND=no
13433       else
13434         # Do we have a bin/javac?
13435         if test ! -x "$BOOT_JDK/bin/javac"; then
13436           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13437 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13438           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13439 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13440           BOOT_JDK_FOUND=no
13441         else
13442           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13443           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13444             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13445 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13446             BOOT_JDK_FOUND=no
13447           else
13448             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13449             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13450 
13451             # Extra M4 quote needed to protect [] in grep expression.
13452             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13453             if test "x$FOUND_VERSION_78" = x; then
13454               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13455 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13456               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13457 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13458               BOOT_JDK_FOUND=no
13459             else
13460               # We're done! :-)
13461               BOOT_JDK_FOUND=yes
13462 
13463   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13464 
13465   # Input might be given as Windows format, start by converting to
13466   # unix format.
13467   path="$BOOT_JDK"
13468   new_path=`$CYGPATH -u "$path"`
13469 
13470   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13471   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13472   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13473   # "foo.exe" is OK but "foo" is an error.
13474   #
13475   # This test is therefore slightly more accurate than "test -f" to check for file precense.
13476   # It is also a way to make sure we got the proper file name for the real test later on.
13477   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13478   if test "x$test_shortpath" = x; then
13479     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13480 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13481     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13482   fi
13483 
13484   # Call helper function which possibly converts this using DOS-style short mode.
13485   # If so, the updated path is stored in $new_path.
13486 
13487   input_path="$new_path"
13488   # Check if we need to convert this using DOS-style short mode. If the path
13489   # contains just simple characters, use it. Otherwise (spaces, weird characters),
13490   # take no chances and rewrite it.
13491   # Note: m4 eats our [], so we need to use [ and ] instead.
13492   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13493   if test "x$has_forbidden_chars" != x; then
13494     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13495     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13496     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13497     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13498       # Going to short mode and back again did indeed matter. Since short mode is
13499       # case insensitive, let's make it lowercase to improve readability.
13500       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13501       # Now convert it back to Unix-stile (cygpath)
13502       input_path=`$CYGPATH -u "$shortmode_path"`
13503       new_path="$input_path"
13504     fi
13505   fi
13506 
13507   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13508   if test "x$test_cygdrive_prefix" = x; then
13509     # As a simple fix, exclude /usr/bin since it's not a real path.
13510     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13511       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13512       # a path prefixed by /cygdrive for fixpath to work.
13513       new_path="$CYGWIN_ROOT_PATH$input_path"
13514     fi
13515   fi
13516 
13517 
13518   if test "x$path" != "x$new_path"; then
13519     BOOT_JDK="$new_path"
13520     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13521 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13522   fi
13523 
13524   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13525 
13526   path="$BOOT_JDK"
13527   has_colon=`$ECHO $path | $GREP ^.:`
13528   new_path="$path"
13529   if test "x$has_colon" = x; then
13530     # Not in mixed or Windows style, start by that.
13531     new_path=`cmd //c echo $path`
13532   fi
13533 
13534 
13535   input_path="$new_path"
13536   # Check if we need to convert this using DOS-style short mode. If the path
13537   # contains just simple characters, use it. Otherwise (spaces, weird characters),
13538   # take no chances and rewrite it.
13539   # Note: m4 eats our [], so we need to use [ and ] instead.
13540   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13541   if test "x$has_forbidden_chars" != x; then
13542     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13543     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13544   fi
13545 
13546 
13547   windows_path="$new_path"
13548   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13549     unix_path=`$CYGPATH -u "$windows_path"`
13550     new_path="$unix_path"
13551   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13552     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13553     new_path="$unix_path"
13554   fi
13555 
13556   if test "x$path" != "x$new_path"; then
13557     BOOT_JDK="$new_path"
13558     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13559 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13560   fi
13561 
13562   # Save the first 10 bytes of this path to the storage, so fixpath can work.
13563   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13564 
13565   else
13566     # We're on a posix platform. Hooray! :)
13567     path="$BOOT_JDK"
13568 
13569     if test ! -f "$path" && test ! -d "$path"; then
13570       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13571     fi
13572 
13573     has_space=`$ECHO "$path" | $GREP " "`
13574     if test "x$has_space" != x; then
13575       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13576 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13577       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13578     fi
13579   fi
13580 
13581               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13582 $as_echo_n "checking for Boot JDK... " >&6; }
13583               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13584 $as_echo "$BOOT_JDK" >&6; }
13585               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13586 $as_echo_n "checking Boot JDK version... " >&6; }
13587               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13588               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13589 $as_echo "$BOOT_JDK_VERSION" >&6; }
13590             fi # end check jdk version
13591           fi # end check rt.jar
13592         fi # end check javac
13593       fi # end check java
13594     fi # end check boot jdk found
13595   fi
13596 
13597     done
13598   fi
13599 
13600   fi
13601 
13602 
13603     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13604     if test "x$BOOT_JDK_FOUND" = xmaybe; then
13605       # Do we have a bin/java?
13606       if test ! -x "$BOOT_JDK/bin/java"; then
13607         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13608 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13609         BOOT_JDK_FOUND=no
13610       else
13611         # Do we have a bin/javac?
13612         if test ! -x "$BOOT_JDK/bin/javac"; then
13613           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13614 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13615           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13616 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13617           BOOT_JDK_FOUND=no
13618         else
13619           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13620           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13621             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13622 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13623             BOOT_JDK_FOUND=no
13624           else
13625             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13626             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13627 
13628             # Extra M4 quote needed to protect [] in grep expression.
13629             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13630             if test "x$FOUND_VERSION_78" = x; then
13631               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13632 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13633               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13634 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13635               BOOT_JDK_FOUND=no
13636             else
13637               # We're done! :-)
13638               BOOT_JDK_FOUND=yes
13639 
13640   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13641 
13642   # Input might be given as Windows format, start by converting to
13643   # unix format.
13644   path="$BOOT_JDK"
13645   new_path=`$CYGPATH -u "$path"`
13646 
13647   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13648   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13649   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13650   # "foo.exe" is OK but "foo" is an error.
13651   #
13652   # This test is therefore slightly more accurate than "test -f" to check for file precense.
13653   # It is also a way to make sure we got the proper file name for the real test later on.
13654   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13655   if test "x$test_shortpath" = x; then
13656     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13657 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13658     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13659   fi
13660 
13661   # Call helper function which possibly converts this using DOS-style short mode.
13662   # If so, the updated path is stored in $new_path.
13663 
13664   input_path="$new_path"
13665   # Check if we need to convert this using DOS-style short mode. If the path
13666   # contains just simple characters, use it. Otherwise (spaces, weird characters),
13667   # take no chances and rewrite it.
13668   # Note: m4 eats our [], so we need to use [ and ] instead.
13669   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13670   if test "x$has_forbidden_chars" != x; then
13671     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13672     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13673     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13674     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13675       # Going to short mode and back again did indeed matter. Since short mode is
13676       # case insensitive, let's make it lowercase to improve readability.
13677       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13678       # Now convert it back to Unix-stile (cygpath)
13679       input_path=`$CYGPATH -u "$shortmode_path"`
13680       new_path="$input_path"
13681     fi
13682   fi
13683 
13684   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13685   if test "x$test_cygdrive_prefix" = x; then
13686     # As a simple fix, exclude /usr/bin since it's not a real path.
13687     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13688       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13689       # a path prefixed by /cygdrive for fixpath to work.
13690       new_path="$CYGWIN_ROOT_PATH$input_path"
13691     fi
13692   fi
13693 
13694 
13695   if test "x$path" != "x$new_path"; then
13696     BOOT_JDK="$new_path"
13697     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13698 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13699   fi
13700 
13701   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13702 
13703   path="$BOOT_JDK"
13704   has_colon=`$ECHO $path | $GREP ^.:`
13705   new_path="$path"
13706   if test "x$has_colon" = x; then
13707     # Not in mixed or Windows style, start by that.
13708     new_path=`cmd //c echo $path`
13709   fi
13710 
13711 
13712   input_path="$new_path"
13713   # Check if we need to convert this using DOS-style short mode. If the path
13714   # contains just simple characters, use it. Otherwise (spaces, weird characters),
13715   # take no chances and rewrite it.
13716   # Note: m4 eats our [], so we need to use [ and ] instead.
13717   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13718   if test "x$has_forbidden_chars" != x; then
13719     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13720     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13721   fi
13722 
13723 
13724   windows_path="$new_path"
13725   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13726     unix_path=`$CYGPATH -u "$windows_path"`
13727     new_path="$unix_path"
13728   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13729     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13730     new_path="$unix_path"
13731   fi
13732 
13733   if test "x$path" != "x$new_path"; then
13734     BOOT_JDK="$new_path"
13735     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13736 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13737   fi
13738 
13739   # Save the first 10 bytes of this path to the storage, so fixpath can work.
13740   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13741 
13742   else
13743     # We're on a posix platform. Hooray! :)
13744     path="$BOOT_JDK"
13745 
13746     if test ! -f "$path" && test ! -d "$path"; then
13747       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13748     fi
13749 
13750     has_space=`$ECHO "$path" | $GREP " "`
13751     if test "x$has_space" != x; then
13752       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13753 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13754       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13755     fi
13756   fi
13757 
13758               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13759 $as_echo_n "checking for Boot JDK... " >&6; }
13760               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13761 $as_echo "$BOOT_JDK" >&6; }
13762               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13763 $as_echo_n "checking Boot JDK version... " >&6; }
13764               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13765               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13766 $as_echo "$BOOT_JDK_VERSION" >&6; }
13767             fi # end check jdk version
13768           fi # end check rt.jar
13769         fi # end check javac
13770       fi # end check java
13771     fi # end check boot jdk found
13772   fi
13773 
13774 
13775   if test "x$BOOT_JDK_FOUND" = xno; then
13776     # Now execute the test
13777 
13778   BOOT_JDK_PREFIX="/cygdrive/c/Program Files/Java"
13779   BOOT_JDK_SUFFIX=""
13780   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
13781   if test "x$ALL_JDKS_FOUND" != x; then
13782     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
13783 
13784   if test "x$BOOT_JDK_FOUND" = xno; then
13785     # Now execute the test
13786 
13787         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
13788         if test -d "$BOOT_JDK"; then
13789           BOOT_JDK_FOUND=maybe
13790           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
13791 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
13792         fi
13793 
13794 
13795     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13796     if test "x$BOOT_JDK_FOUND" = xmaybe; then
13797       # Do we have a bin/java?
13798       if test ! -x "$BOOT_JDK/bin/java"; then
13799         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13800 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13801         BOOT_JDK_FOUND=no
13802       else
13803         # Do we have a bin/javac?
13804         if test ! -x "$BOOT_JDK/bin/javac"; then
13805           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13806 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13807           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13808 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13809           BOOT_JDK_FOUND=no
13810         else
13811           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13812           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13813             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13814 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13815             BOOT_JDK_FOUND=no
13816           else
13817             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13818             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13819 
13820             # Extra M4 quote needed to protect [] in grep expression.
13821             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13822             if test "x$FOUND_VERSION_78" = x; then
13823               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13824 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13825               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13826 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13827               BOOT_JDK_FOUND=no
13828             else
13829               # We're done! :-)
13830               BOOT_JDK_FOUND=yes
13831 
13832   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13833 
13834   # Input might be given as Windows format, start by converting to
13835   # unix format.
13836   path="$BOOT_JDK"
13837   new_path=`$CYGPATH -u "$path"`
13838 
13839   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13840   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13841   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13842   # "foo.exe" is OK but "foo" is an error.
13843   #
13844   # This test is therefore slightly more accurate than "test -f" to check for file precense.
13845   # It is also a way to make sure we got the proper file name for the real test later on.
13846   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13847   if test "x$test_shortpath" = x; then
13848     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13849 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13850     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13851   fi
13852 
13853   # Call helper function which possibly converts this using DOS-style short mode.
13854   # If so, the updated path is stored in $new_path.
13855 
13856   input_path="$new_path"
13857   # Check if we need to convert this using DOS-style short mode. If the path
13858   # contains just simple characters, use it. Otherwise (spaces, weird characters),
13859   # take no chances and rewrite it.
13860   # Note: m4 eats our [], so we need to use [ and ] instead.
13861   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13862   if test "x$has_forbidden_chars" != x; then
13863     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13864     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13865     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13866     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13867       # Going to short mode and back again did indeed matter. Since short mode is
13868       # case insensitive, let's make it lowercase to improve readability.
13869       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13870       # Now convert it back to Unix-stile (cygpath)
13871       input_path=`$CYGPATH -u "$shortmode_path"`
13872       new_path="$input_path"
13873     fi
13874   fi
13875 
13876   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13877   if test "x$test_cygdrive_prefix" = x; then
13878     # As a simple fix, exclude /usr/bin since it's not a real path.
13879     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13880       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13881       # a path prefixed by /cygdrive for fixpath to work.
13882       new_path="$CYGWIN_ROOT_PATH$input_path"
13883     fi
13884   fi
13885 
13886 
13887   if test "x$path" != "x$new_path"; then
13888     BOOT_JDK="$new_path"
13889     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13890 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13891   fi
13892 
13893   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13894 
13895   path="$BOOT_JDK"
13896   has_colon=`$ECHO $path | $GREP ^.:`
13897   new_path="$path"
13898   if test "x$has_colon" = x; then
13899     # Not in mixed or Windows style, start by that.
13900     new_path=`cmd //c echo $path`
13901   fi
13902 
13903 
13904   input_path="$new_path"
13905   # Check if we need to convert this using DOS-style short mode. If the path
13906   # contains just simple characters, use it. Otherwise (spaces, weird characters),
13907   # take no chances and rewrite it.
13908   # Note: m4 eats our [], so we need to use [ and ] instead.
13909   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13910   if test "x$has_forbidden_chars" != x; then
13911     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13912     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13913   fi
13914 
13915 
13916   windows_path="$new_path"
13917   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13918     unix_path=`$CYGPATH -u "$windows_path"`
13919     new_path="$unix_path"
13920   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13921     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13922     new_path="$unix_path"
13923   fi
13924 
13925   if test "x$path" != "x$new_path"; then
13926     BOOT_JDK="$new_path"
13927     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13928 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13929   fi
13930 
13931   # Save the first 10 bytes of this path to the storage, so fixpath can work.
13932   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13933 
13934   else
13935     # We're on a posix platform. Hooray! :)
13936     path="$BOOT_JDK"
13937 
13938     if test ! -f "$path" && test ! -d "$path"; then
13939       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13940     fi
13941 
13942     has_space=`$ECHO "$path" | $GREP " "`
13943     if test "x$has_space" != x; then
13944       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13945 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13946       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13947     fi
13948   fi
13949 
13950               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13951 $as_echo_n "checking for Boot JDK... " >&6; }
13952               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13953 $as_echo "$BOOT_JDK" >&6; }
13954               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13955 $as_echo_n "checking Boot JDK version... " >&6; }
13956               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13957               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13958 $as_echo "$BOOT_JDK_VERSION" >&6; }
13959             fi # end check jdk version
13960           fi # end check rt.jar
13961         fi # end check javac
13962       fi # end check java
13963     fi # end check boot jdk found
13964   fi
13965 
13966     done
13967   fi
13968 
13969 
13970     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13971     if test "x$BOOT_JDK_FOUND" = xmaybe; then
13972       # Do we have a bin/java?
13973       if test ! -x "$BOOT_JDK/bin/java"; then
13974         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13975 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13976         BOOT_JDK_FOUND=no
13977       else
13978         # Do we have a bin/javac?
13979         if test ! -x "$BOOT_JDK/bin/javac"; then
13980           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13981 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13982           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13983 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13984           BOOT_JDK_FOUND=no
13985         else
13986           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13987           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13988             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13989 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13990             BOOT_JDK_FOUND=no
13991           else
13992             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13993             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13994 
13995             # Extra M4 quote needed to protect [] in grep expression.
13996             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13997             if test "x$FOUND_VERSION_78" = x; then
13998               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13999 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14000               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14001 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14002               BOOT_JDK_FOUND=no
14003             else
14004               # We're done! :-)
14005               BOOT_JDK_FOUND=yes
14006 
14007   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14008 
14009   # Input might be given as Windows format, start by converting to
14010   # unix format.
14011   path="$BOOT_JDK"
14012   new_path=`$CYGPATH -u "$path"`
14013 
14014   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14015   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14016   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14017   # "foo.exe" is OK but "foo" is an error.
14018   #
14019   # This test is therefore slightly more accurate than "test -f" to check for file precense.
14020   # It is also a way to make sure we got the proper file name for the real test later on.
14021   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14022   if test "x$test_shortpath" = x; then
14023     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14024 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14025     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14026   fi
14027 
14028   # Call helper function which possibly converts this using DOS-style short mode.
14029   # If so, the updated path is stored in $new_path.
14030 
14031   input_path="$new_path"
14032   # Check if we need to convert this using DOS-style short mode. If the path
14033   # contains just simple characters, use it. Otherwise (spaces, weird characters),
14034   # take no chances and rewrite it.
14035   # Note: m4 eats our [], so we need to use [ and ] instead.
14036   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14037   if test "x$has_forbidden_chars" != x; then
14038     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14039     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14040     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14041     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14042       # Going to short mode and back again did indeed matter. Since short mode is
14043       # case insensitive, let's make it lowercase to improve readability.
14044       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14045       # Now convert it back to Unix-stile (cygpath)
14046       input_path=`$CYGPATH -u "$shortmode_path"`
14047       new_path="$input_path"
14048     fi
14049   fi
14050 
14051   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14052   if test "x$test_cygdrive_prefix" = x; then
14053     # As a simple fix, exclude /usr/bin since it's not a real path.
14054     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14055       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14056       # a path prefixed by /cygdrive for fixpath to work.
14057       new_path="$CYGWIN_ROOT_PATH$input_path"
14058     fi
14059   fi
14060 
14061 
14062   if test "x$path" != "x$new_path"; then
14063     BOOT_JDK="$new_path"
14064     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14065 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14066   fi
14067 
14068   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14069 
14070   path="$BOOT_JDK"
14071   has_colon=`$ECHO $path | $GREP ^.:`
14072   new_path="$path"
14073   if test "x$has_colon" = x; then
14074     # Not in mixed or Windows style, start by that.
14075     new_path=`cmd //c echo $path`
14076   fi
14077 
14078 
14079   input_path="$new_path"
14080   # Check if we need to convert this using DOS-style short mode. If the path
14081   # contains just simple characters, use it. Otherwise (spaces, weird characters),
14082   # take no chances and rewrite it.
14083   # Note: m4 eats our [], so we need to use [ and ] instead.
14084   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14085   if test "x$has_forbidden_chars" != x; then
14086     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14087     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14088   fi
14089 
14090 
14091   windows_path="$new_path"
14092   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14093     unix_path=`$CYGPATH -u "$windows_path"`
14094     new_path="$unix_path"
14095   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14096     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14097     new_path="$unix_path"
14098   fi
14099 
14100   if test "x$path" != "x$new_path"; then
14101     BOOT_JDK="$new_path"
14102     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14103 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14104   fi
14105 
14106   # Save the first 10 bytes of this path to the storage, so fixpath can work.
14107   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14108 
14109   else
14110     # We're on a posix platform. Hooray! :)
14111     path="$BOOT_JDK"
14112 
14113     if test ! -f "$path" && test ! -d "$path"; then
14114       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14115     fi
14116 
14117     has_space=`$ECHO "$path" | $GREP " "`
14118     if test "x$has_space" != x; then
14119       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14120 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14121       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14122     fi
14123   fi
14124 
14125               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14126 $as_echo_n "checking for Boot JDK... " >&6; }
14127               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14128 $as_echo "$BOOT_JDK" >&6; }
14129               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14130 $as_echo_n "checking Boot JDK version... " >&6; }
14131               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14132               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14133 $as_echo "$BOOT_JDK_VERSION" >&6; }
14134             fi # end check jdk version
14135           fi # end check rt.jar
14136         fi # end check javac
14137       fi # end check java
14138     fi # end check boot jdk found
14139   fi
14140 
14141   elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
14142 
14143   if test "x$BOOT_JDK_FOUND" = xno; then
14144     # Now execute the test
14145 
14146   BOOT_JDK_PREFIX="/Library/Java/JavaVirtualMachines"
14147   BOOT_JDK_SUFFIX="/Contents/Home"
14148   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
14149   if test "x$ALL_JDKS_FOUND" != x; then
14150     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
14151 
14152   if test "x$BOOT_JDK_FOUND" = xno; then
14153     # Now execute the test
14154 
14155         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
14156         if test -d "$BOOT_JDK"; then
14157           BOOT_JDK_FOUND=maybe
14158           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
14159 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
14160         fi
14161 
14162 
14163     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14164     if test "x$BOOT_JDK_FOUND" = xmaybe; then
14165       # Do we have a bin/java?
14166       if test ! -x "$BOOT_JDK/bin/java"; then
14167         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14168 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14169         BOOT_JDK_FOUND=no
14170       else
14171         # Do we have a bin/javac?
14172         if test ! -x "$BOOT_JDK/bin/javac"; then
14173           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14174 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14175           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14176 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14177           BOOT_JDK_FOUND=no
14178         else
14179           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14180           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14181             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14182 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14183             BOOT_JDK_FOUND=no
14184           else
14185             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14186             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14187 
14188             # Extra M4 quote needed to protect [] in grep expression.
14189             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14190             if test "x$FOUND_VERSION_78" = x; then
14191               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14192 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14193               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14194 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14195               BOOT_JDK_FOUND=no
14196             else
14197               # We're done! :-)
14198               BOOT_JDK_FOUND=yes
14199 
14200   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14201 
14202   # Input might be given as Windows format, start by converting to
14203   # unix format.
14204   path="$BOOT_JDK"
14205   new_path=`$CYGPATH -u "$path"`
14206 
14207   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14208   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14209   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14210   # "foo.exe" is OK but "foo" is an error.
14211   #
14212   # This test is therefore slightly more accurate than "test -f" to check for file precense.
14213   # It is also a way to make sure we got the proper file name for the real test later on.
14214   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14215   if test "x$test_shortpath" = x; then
14216     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14217 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14218     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14219   fi
14220 
14221   # Call helper function which possibly converts this using DOS-style short mode.
14222   # If so, the updated path is stored in $new_path.
14223 
14224   input_path="$new_path"
14225   # Check if we need to convert this using DOS-style short mode. If the path
14226   # contains just simple characters, use it. Otherwise (spaces, weird characters),
14227   # take no chances and rewrite it.
14228   # Note: m4 eats our [], so we need to use [ and ] instead.
14229   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14230   if test "x$has_forbidden_chars" != x; then
14231     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14232     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14233     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14234     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14235       # Going to short mode and back again did indeed matter. Since short mode is
14236       # case insensitive, let's make it lowercase to improve readability.
14237       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14238       # Now convert it back to Unix-stile (cygpath)
14239       input_path=`$CYGPATH -u "$shortmode_path"`
14240       new_path="$input_path"
14241     fi
14242   fi
14243 
14244   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14245   if test "x$test_cygdrive_prefix" = x; then
14246     # As a simple fix, exclude /usr/bin since it's not a real path.
14247     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14248       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14249       # a path prefixed by /cygdrive for fixpath to work.
14250       new_path="$CYGWIN_ROOT_PATH$input_path"
14251     fi
14252   fi
14253 
14254 
14255   if test "x$path" != "x$new_path"; then
14256     BOOT_JDK="$new_path"
14257     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14258 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14259   fi
14260 
14261   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14262 
14263   path="$BOOT_JDK"
14264   has_colon=`$ECHO $path | $GREP ^.:`
14265   new_path="$path"
14266   if test "x$has_colon" = x; then
14267     # Not in mixed or Windows style, start by that.
14268     new_path=`cmd //c echo $path`
14269   fi
14270 
14271 
14272   input_path="$new_path"
14273   # Check if we need to convert this using DOS-style short mode. If the path
14274   # contains just simple characters, use it. Otherwise (spaces, weird characters),
14275   # take no chances and rewrite it.
14276   # Note: m4 eats our [], so we need to use [ and ] instead.
14277   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14278   if test "x$has_forbidden_chars" != x; then
14279     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14280     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14281   fi
14282 
14283 
14284   windows_path="$new_path"
14285   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14286     unix_path=`$CYGPATH -u "$windows_path"`
14287     new_path="$unix_path"
14288   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14289     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14290     new_path="$unix_path"
14291   fi
14292 
14293   if test "x$path" != "x$new_path"; then
14294     BOOT_JDK="$new_path"
14295     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14296 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14297   fi
14298 
14299   # Save the first 10 bytes of this path to the storage, so fixpath can work.
14300   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14301 
14302   else
14303     # We're on a posix platform. Hooray! :)
14304     path="$BOOT_JDK"
14305 
14306     if test ! -f "$path" && test ! -d "$path"; then
14307       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14308     fi
14309 
14310     has_space=`$ECHO "$path" | $GREP " "`
14311     if test "x$has_space" != x; then
14312       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14313 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14314       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14315     fi
14316   fi
14317 
14318               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14319 $as_echo_n "checking for Boot JDK... " >&6; }
14320               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14321 $as_echo "$BOOT_JDK" >&6; }
14322               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14323 $as_echo_n "checking Boot JDK version... " >&6; }
14324               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14325               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14326 $as_echo "$BOOT_JDK_VERSION" >&6; }
14327             fi # end check jdk version
14328           fi # end check rt.jar
14329         fi # end check javac
14330       fi # end check java
14331     fi # end check boot jdk found
14332   fi
14333 
14334     done
14335   fi
14336 
14337 
14338     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14339     if test "x$BOOT_JDK_FOUND" = xmaybe; then
14340       # Do we have a bin/java?
14341       if test ! -x "$BOOT_JDK/bin/java"; then
14342         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14343 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14344         BOOT_JDK_FOUND=no
14345       else
14346         # Do we have a bin/javac?
14347         if test ! -x "$BOOT_JDK/bin/javac"; then
14348           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14349 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14350           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14351 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14352           BOOT_JDK_FOUND=no
14353         else
14354           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14355           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14356             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14357 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14358             BOOT_JDK_FOUND=no
14359           else
14360             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14361             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14362 
14363             # Extra M4 quote needed to protect [] in grep expression.
14364             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14365             if test "x$FOUND_VERSION_78" = x; then
14366               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14367 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14368               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14369 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14370               BOOT_JDK_FOUND=no
14371             else
14372               # We're done! :-)
14373               BOOT_JDK_FOUND=yes
14374 
14375   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14376 
14377   # Input might be given as Windows format, start by converting to
14378   # unix format.
14379   path="$BOOT_JDK"
14380   new_path=`$CYGPATH -u "$path"`
14381 
14382   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14383   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14384   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14385   # "foo.exe" is OK but "foo" is an error.
14386   #
14387   # This test is therefore slightly more accurate than "test -f" to check for file precense.
14388   # It is also a way to make sure we got the proper file name for the real test later on.
14389   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14390   if test "x$test_shortpath" = x; then
14391     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14392 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14393     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14394   fi
14395 
14396   # Call helper function which possibly converts this using DOS-style short mode.
14397   # If so, the updated path is stored in $new_path.
14398 
14399   input_path="$new_path"
14400   # Check if we need to convert this using DOS-style short mode. If the path
14401   # contains just simple characters, use it. Otherwise (spaces, weird characters),
14402   # take no chances and rewrite it.
14403   # Note: m4 eats our [], so we need to use [ and ] instead.
14404   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14405   if test "x$has_forbidden_chars" != x; then
14406     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14407     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14408     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14409     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14410       # Going to short mode and back again did indeed matter. Since short mode is
14411       # case insensitive, let's make it lowercase to improve readability.
14412       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14413       # Now convert it back to Unix-stile (cygpath)
14414       input_path=`$CYGPATH -u "$shortmode_path"`
14415       new_path="$input_path"
14416     fi
14417   fi
14418 
14419   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14420   if test "x$test_cygdrive_prefix" = x; then
14421     # As a simple fix, exclude /usr/bin since it's not a real path.
14422     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14423       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14424       # a path prefixed by /cygdrive for fixpath to work.
14425       new_path="$CYGWIN_ROOT_PATH$input_path"
14426     fi
14427   fi
14428 
14429 
14430   if test "x$path" != "x$new_path"; then
14431     BOOT_JDK="$new_path"
14432     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14433 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14434   fi
14435 
14436   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14437 
14438   path="$BOOT_JDK"
14439   has_colon=`$ECHO $path | $GREP ^.:`
14440   new_path="$path"
14441   if test "x$has_colon" = x; then
14442     # Not in mixed or Windows style, start by that.
14443     new_path=`cmd //c echo $path`
14444   fi
14445 
14446 
14447   input_path="$new_path"
14448   # Check if we need to convert this using DOS-style short mode. If the path
14449   # contains just simple characters, use it. Otherwise (spaces, weird characters),
14450   # take no chances and rewrite it.
14451   # Note: m4 eats our [], so we need to use [ and ] instead.
14452   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14453   if test "x$has_forbidden_chars" != x; then
14454     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14455     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14456   fi
14457 
14458 
14459   windows_path="$new_path"
14460   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14461     unix_path=`$CYGPATH -u "$windows_path"`
14462     new_path="$unix_path"
14463   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14464     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14465     new_path="$unix_path"
14466   fi
14467 
14468   if test "x$path" != "x$new_path"; then
14469     BOOT_JDK="$new_path"
14470     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14471 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14472   fi
14473 
14474   # Save the first 10 bytes of this path to the storage, so fixpath can work.
14475   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14476 
14477   else
14478     # We're on a posix platform. Hooray! :)
14479     path="$BOOT_JDK"
14480 
14481     if test ! -f "$path" && test ! -d "$path"; then
14482       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14483     fi
14484 
14485     has_space=`$ECHO "$path" | $GREP " "`
14486     if test "x$has_space" != x; then
14487       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14488 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14489       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14490     fi
14491   fi
14492 
14493               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14494 $as_echo_n "checking for Boot JDK... " >&6; }
14495               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14496 $as_echo "$BOOT_JDK" >&6; }
14497               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14498 $as_echo_n "checking Boot JDK version... " >&6; }
14499               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14500               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14501 $as_echo "$BOOT_JDK_VERSION" >&6; }
14502             fi # end check jdk version
14503           fi # end check rt.jar
14504         fi # end check javac
14505       fi # end check java
14506     fi # end check boot jdk found
14507   fi
14508 
14509 
14510   if test "x$BOOT_JDK_FOUND" = xno; then
14511     # Now execute the test
14512 
14513   BOOT_JDK_PREFIX="/System/Library/Java/JavaVirtualMachines"
14514   BOOT_JDK_SUFFIX="/Contents/Home"
14515   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
14516   if test "x$ALL_JDKS_FOUND" != x; then
14517     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
14518 
14519   if test "x$BOOT_JDK_FOUND" = xno; then
14520     # Now execute the test
14521 
14522         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
14523         if test -d "$BOOT_JDK"; then
14524           BOOT_JDK_FOUND=maybe
14525           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
14526 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
14527         fi
14528 
14529 
14530     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14531     if test "x$BOOT_JDK_FOUND" = xmaybe; then
14532       # Do we have a bin/java?
14533       if test ! -x "$BOOT_JDK/bin/java"; then
14534         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14535 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14536         BOOT_JDK_FOUND=no
14537       else
14538         # Do we have a bin/javac?
14539         if test ! -x "$BOOT_JDK/bin/javac"; then
14540           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14541 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14542           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14543 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14544           BOOT_JDK_FOUND=no
14545         else
14546           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14547           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14548             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14549 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14550             BOOT_JDK_FOUND=no
14551           else
14552             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14553             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14554 
14555             # Extra M4 quote needed to protect [] in grep expression.
14556             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14557             if test "x$FOUND_VERSION_78" = x; then
14558               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14559 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14560               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14561 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14562               BOOT_JDK_FOUND=no
14563             else
14564               # We're done! :-)
14565               BOOT_JDK_FOUND=yes
14566 
14567   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14568 
14569   # Input might be given as Windows format, start by converting to
14570   # unix format.
14571   path="$BOOT_JDK"
14572   new_path=`$CYGPATH -u "$path"`
14573 
14574   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14575   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14576   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14577   # "foo.exe" is OK but "foo" is an error.
14578   #
14579   # This test is therefore slightly more accurate than "test -f" to check for file precense.
14580   # It is also a way to make sure we got the proper file name for the real test later on.
14581   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14582   if test "x$test_shortpath" = x; then
14583     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14584 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14585     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14586   fi
14587 
14588   # Call helper function which possibly converts this using DOS-style short mode.
14589   # If so, the updated path is stored in $new_path.
14590 
14591   input_path="$new_path"
14592   # Check if we need to convert this using DOS-style short mode. If the path
14593   # contains just simple characters, use it. Otherwise (spaces, weird characters),
14594   # take no chances and rewrite it.
14595   # Note: m4 eats our [], so we need to use [ and ] instead.
14596   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14597   if test "x$has_forbidden_chars" != x; then
14598     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14599     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14600     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14601     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14602       # Going to short mode and back again did indeed matter. Since short mode is
14603       # case insensitive, let's make it lowercase to improve readability.
14604       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14605       # Now convert it back to Unix-stile (cygpath)
14606       input_path=`$CYGPATH -u "$shortmode_path"`
14607       new_path="$input_path"
14608     fi
14609   fi
14610 
14611   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14612   if test "x$test_cygdrive_prefix" = x; then
14613     # As a simple fix, exclude /usr/bin since it's not a real path.
14614     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14615       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14616       # a path prefixed by /cygdrive for fixpath to work.
14617       new_path="$CYGWIN_ROOT_PATH$input_path"
14618     fi
14619   fi
14620 
14621 
14622   if test "x$path" != "x$new_path"; then
14623     BOOT_JDK="$new_path"
14624     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14625 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14626   fi
14627 
14628   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14629 
14630   path="$BOOT_JDK"
14631   has_colon=`$ECHO $path | $GREP ^.:`
14632   new_path="$path"
14633   if test "x$has_colon" = x; then
14634     # Not in mixed or Windows style, start by that.
14635     new_path=`cmd //c echo $path`
14636   fi
14637 
14638 
14639   input_path="$new_path"
14640   # Check if we need to convert this using DOS-style short mode. If the path
14641   # contains just simple characters, use it. Otherwise (spaces, weird characters),
14642   # take no chances and rewrite it.
14643   # Note: m4 eats our [], so we need to use [ and ] instead.
14644   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14645   if test "x$has_forbidden_chars" != x; then
14646     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14647     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14648   fi
14649 
14650 
14651   windows_path="$new_path"
14652   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14653     unix_path=`$CYGPATH -u "$windows_path"`
14654     new_path="$unix_path"
14655   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14656     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14657     new_path="$unix_path"
14658   fi
14659 
14660   if test "x$path" != "x$new_path"; then
14661     BOOT_JDK="$new_path"
14662     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14663 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14664   fi
14665 
14666   # Save the first 10 bytes of this path to the storage, so fixpath can work.
14667   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14668 
14669   else
14670     # We're on a posix platform. Hooray! :)
14671     path="$BOOT_JDK"
14672 
14673     if test ! -f "$path" && test ! -d "$path"; then
14674       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14675     fi
14676 
14677     has_space=`$ECHO "$path" | $GREP " "`
14678     if test "x$has_space" != x; then
14679       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14680 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14681       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14682     fi
14683   fi
14684 
14685               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14686 $as_echo_n "checking for Boot JDK... " >&6; }
14687               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14688 $as_echo "$BOOT_JDK" >&6; }
14689               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14690 $as_echo_n "checking Boot JDK version... " >&6; }
14691               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14692               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14693 $as_echo "$BOOT_JDK_VERSION" >&6; }
14694             fi # end check jdk version
14695           fi # end check rt.jar
14696         fi # end check javac
14697       fi # end check java
14698     fi # end check boot jdk found
14699   fi
14700 
14701     done
14702   fi
14703 
14704 
14705     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14706     if test "x$BOOT_JDK_FOUND" = xmaybe; then
14707       # Do we have a bin/java?
14708       if test ! -x "$BOOT_JDK/bin/java"; then
14709         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14710 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14711         BOOT_JDK_FOUND=no
14712       else
14713         # Do we have a bin/javac?
14714         if test ! -x "$BOOT_JDK/bin/javac"; then
14715           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14716 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14717           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14718 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14719           BOOT_JDK_FOUND=no
14720         else
14721           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14722           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14723             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14724 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14725             BOOT_JDK_FOUND=no
14726           else
14727             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14728             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14729 
14730             # Extra M4 quote needed to protect [] in grep expression.
14731             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14732             if test "x$FOUND_VERSION_78" = x; then
14733               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14734 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14735               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14736 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14737               BOOT_JDK_FOUND=no
14738             else
14739               # We're done! :-)
14740               BOOT_JDK_FOUND=yes
14741 
14742   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14743 
14744   # Input might be given as Windows format, start by converting to
14745   # unix format.
14746   path="$BOOT_JDK"
14747   new_path=`$CYGPATH -u "$path"`
14748 
14749   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14750   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14751   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14752   # "foo.exe" is OK but "foo" is an error.
14753   #
14754   # This test is therefore slightly more accurate than "test -f" to check for file precense.
14755   # It is also a way to make sure we got the proper file name for the real test later on.
14756   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14757   if test "x$test_shortpath" = x; then
14758     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14759 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14760     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14761   fi
14762 
14763   # Call helper function which possibly converts this using DOS-style short mode.
14764   # If so, the updated path is stored in $new_path.
14765 
14766   input_path="$new_path"
14767   # Check if we need to convert this using DOS-style short mode. If the path
14768   # contains just simple characters, use it. Otherwise (spaces, weird characters),
14769   # take no chances and rewrite it.
14770   # Note: m4 eats our [], so we need to use [ and ] instead.
14771   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14772   if test "x$has_forbidden_chars" != x; then
14773     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14774     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14775     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14776     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14777       # Going to short mode and back again did indeed matter. Since short mode is
14778       # case insensitive, let's make it lowercase to improve readability.
14779       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14780       # Now convert it back to Unix-stile (cygpath)
14781       input_path=`$CYGPATH -u "$shortmode_path"`
14782       new_path="$input_path"
14783     fi
14784   fi
14785 
14786   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14787   if test "x$test_cygdrive_prefix" = x; then
14788     # As a simple fix, exclude /usr/bin since it's not a real path.
14789     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14790       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14791       # a path prefixed by /cygdrive for fixpath to work.
14792       new_path="$CYGWIN_ROOT_PATH$input_path"
14793     fi
14794   fi
14795 
14796 
14797   if test "x$path" != "x$new_path"; then
14798     BOOT_JDK="$new_path"
14799     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14800 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14801   fi
14802 
14803   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14804 
14805   path="$BOOT_JDK"
14806   has_colon=`$ECHO $path | $GREP ^.:`
14807   new_path="$path"
14808   if test "x$has_colon" = x; then
14809     # Not in mixed or Windows style, start by that.
14810     new_path=`cmd //c echo $path`
14811   fi
14812 
14813 
14814   input_path="$new_path"
14815   # Check if we need to convert this using DOS-style short mode. If the path
14816   # contains just simple characters, use it. Otherwise (spaces, weird characters),
14817   # take no chances and rewrite it.
14818   # Note: m4 eats our [], so we need to use [ and ] instead.
14819   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14820   if test "x$has_forbidden_chars" != x; then
14821     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14822     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14823   fi
14824 
14825 
14826   windows_path="$new_path"
14827   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14828     unix_path=`$CYGPATH -u "$windows_path"`
14829     new_path="$unix_path"
14830   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14831     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14832     new_path="$unix_path"
14833   fi
14834 
14835   if test "x$path" != "x$new_path"; then
14836     BOOT_JDK="$new_path"
14837     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14838 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14839   fi
14840 
14841   # Save the first 10 bytes of this path to the storage, so fixpath can work.
14842   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14843 
14844   else
14845     # We're on a posix platform. Hooray! :)
14846     path="$BOOT_JDK"
14847 
14848     if test ! -f "$path" && test ! -d "$path"; then
14849       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14850     fi
14851 
14852     has_space=`$ECHO "$path" | $GREP " "`
14853     if test "x$has_space" != x; then
14854       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14855 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14856       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14857     fi
14858   fi
14859 
14860               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14861 $as_echo_n "checking for Boot JDK... " >&6; }
14862               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14863 $as_echo "$BOOT_JDK" >&6; }
14864               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14865 $as_echo_n "checking Boot JDK version... " >&6; }
14866               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14867               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14868 $as_echo "$BOOT_JDK_VERSION" >&6; }
14869             fi # end check jdk version
14870           fi # end check rt.jar
14871         fi # end check javac
14872       fi # end check java
14873     fi # end check boot jdk found
14874   fi
14875 
14876   elif test "x$OPENJDK_TARGET_OS" = xlinux; then
14877 
14878   if test "x$BOOT_JDK_FOUND" = xno; then
14879     # Now execute the test
14880 
14881   BOOT_JDK_PREFIX="/usr/lib/jvm"
14882   BOOT_JDK_SUFFIX=""
14883   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
14884   if test "x$ALL_JDKS_FOUND" != x; then
14885     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
14886 
14887   if test "x$BOOT_JDK_FOUND" = xno; then
14888     # Now execute the test
14889 
14890         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
14891         if test -d "$BOOT_JDK"; then
14892           BOOT_JDK_FOUND=maybe
14893           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
14894 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
14895         fi
14896 
14897 
14898     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14899     if test "x$BOOT_JDK_FOUND" = xmaybe; then
14900       # Do we have a bin/java?
14901       if test ! -x "$BOOT_JDK/bin/java"; then
14902         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14903 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14904         BOOT_JDK_FOUND=no
14905       else
14906         # Do we have a bin/javac?
14907         if test ! -x "$BOOT_JDK/bin/javac"; then
14908           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14909 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14910           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14911 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14912           BOOT_JDK_FOUND=no
14913         else
14914           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14915           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14916             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14917 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14918             BOOT_JDK_FOUND=no
14919           else
14920             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14921             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14922 
14923             # Extra M4 quote needed to protect [] in grep expression.
14924             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14925             if test "x$FOUND_VERSION_78" = x; then
14926               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14927 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14928               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14929 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14930               BOOT_JDK_FOUND=no
14931             else
14932               # We're done! :-)
14933               BOOT_JDK_FOUND=yes
14934 
14935   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14936 
14937   # Input might be given as Windows format, start by converting to
14938   # unix format.
14939   path="$BOOT_JDK"
14940   new_path=`$CYGPATH -u "$path"`
14941 
14942   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14943   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14944   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14945   # "foo.exe" is OK but "foo" is an error.
14946   #
14947   # This test is therefore slightly more accurate than "test -f" to check for file precense.
14948   # It is also a way to make sure we got the proper file name for the real test later on.
14949   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14950   if test "x$test_shortpath" = x; then
14951     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14952 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14953     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14954   fi
14955 
14956   # Call helper function which possibly converts this using DOS-style short mode.
14957   # If so, the updated path is stored in $new_path.
14958 
14959   input_path="$new_path"
14960   # Check if we need to convert this using DOS-style short mode. If the path
14961   # contains just simple characters, use it. Otherwise (spaces, weird characters),
14962   # take no chances and rewrite it.
14963   # Note: m4 eats our [], so we need to use [ and ] instead.
14964   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14965   if test "x$has_forbidden_chars" != x; then
14966     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14967     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14968     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14969     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14970       # Going to short mode and back again did indeed matter. Since short mode is
14971       # case insensitive, let's make it lowercase to improve readability.
14972       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14973       # Now convert it back to Unix-stile (cygpath)
14974       input_path=`$CYGPATH -u "$shortmode_path"`
14975       new_path="$input_path"
14976     fi
14977   fi
14978 
14979   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14980   if test "x$test_cygdrive_prefix" = x; then
14981     # As a simple fix, exclude /usr/bin since it's not a real path.
14982     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14983       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14984       # a path prefixed by /cygdrive for fixpath to work.
14985       new_path="$CYGWIN_ROOT_PATH$input_path"
14986     fi
14987   fi
14988 
14989 
14990   if test "x$path" != "x$new_path"; then
14991     BOOT_JDK="$new_path"
14992     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14993 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14994   fi
14995 
14996   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14997 
14998   path="$BOOT_JDK"
14999   has_colon=`$ECHO $path | $GREP ^.:`
15000   new_path="$path"
15001   if test "x$has_colon" = x; then
15002     # Not in mixed or Windows style, start by that.
15003     new_path=`cmd //c echo $path`
15004   fi
15005 
15006 
15007   input_path="$new_path"
15008   # Check if we need to convert this using DOS-style short mode. If the path
15009   # contains just simple characters, use it. Otherwise (spaces, weird characters),
15010   # take no chances and rewrite it.
15011   # Note: m4 eats our [], so we need to use [ and ] instead.
15012   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15013   if test "x$has_forbidden_chars" != x; then
15014     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15015     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15016   fi
15017 
15018 
15019   windows_path="$new_path"
15020   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15021     unix_path=`$CYGPATH -u "$windows_path"`
15022     new_path="$unix_path"
15023   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15024     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15025     new_path="$unix_path"
15026   fi
15027 
15028   if test "x$path" != "x$new_path"; then
15029     BOOT_JDK="$new_path"
15030     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15031 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15032   fi
15033 
15034   # Save the first 10 bytes of this path to the storage, so fixpath can work.
15035   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15036 
15037   else
15038     # We're on a posix platform. Hooray! :)
15039     path="$BOOT_JDK"
15040 
15041     if test ! -f "$path" && test ! -d "$path"; then
15042       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
15043     fi
15044 
15045     has_space=`$ECHO "$path" | $GREP " "`
15046     if test "x$has_space" != x; then
15047       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15048 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15049       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15050     fi
15051   fi
15052 
15053               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
15054 $as_echo_n "checking for Boot JDK... " >&6; }
15055               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
15056 $as_echo "$BOOT_JDK" >&6; }
15057               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
15058 $as_echo_n "checking Boot JDK version... " >&6; }
15059               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
15060               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
15061 $as_echo "$BOOT_JDK_VERSION" >&6; }
15062             fi # end check jdk version
15063           fi # end check rt.jar
15064         fi # end check javac
15065       fi # end check java
15066     fi # end check boot jdk found
15067   fi
15068 
15069     done
15070   fi
15071 
15072 
15073     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
15074     if test "x$BOOT_JDK_FOUND" = xmaybe; then
15075       # Do we have a bin/java?
15076       if test ! -x "$BOOT_JDK/bin/java"; then
15077         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
15078 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
15079         BOOT_JDK_FOUND=no
15080       else
15081         # Do we have a bin/javac?
15082         if test ! -x "$BOOT_JDK/bin/javac"; then
15083           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
15084 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
15085           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
15086 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
15087           BOOT_JDK_FOUND=no
15088         else
15089           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
15090           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
15091             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
15092 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
15093             BOOT_JDK_FOUND=no
15094           else
15095             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
15096             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
15097 
15098             # Extra M4 quote needed to protect [] in grep expression.
15099             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
15100             if test "x$FOUND_VERSION_78" = x; then
15101               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
15102 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
15103               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
15104 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
15105               BOOT_JDK_FOUND=no
15106             else
15107               # We're done! :-)
15108               BOOT_JDK_FOUND=yes
15109 
15110   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15111 
15112   # Input might be given as Windows format, start by converting to
15113   # unix format.
15114   path="$BOOT_JDK"
15115   new_path=`$CYGPATH -u "$path"`
15116 
15117   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15118   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15119   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15120   # "foo.exe" is OK but "foo" is an error.
15121   #
15122   # This test is therefore slightly more accurate than "test -f" to check for file precense.
15123   # It is also a way to make sure we got the proper file name for the real test later on.
15124   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15125   if test "x$test_shortpath" = x; then
15126     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15127 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15128     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
15129   fi
15130 
15131   # Call helper function which possibly converts this using DOS-style short mode.
15132   # If so, the updated path is stored in $new_path.
15133 
15134   input_path="$new_path"
15135   # Check if we need to convert this using DOS-style short mode. If the path
15136   # contains just simple characters, use it. Otherwise (spaces, weird characters),
15137   # take no chances and rewrite it.
15138   # Note: m4 eats our [], so we need to use [ and ] instead.
15139   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15140   if test "x$has_forbidden_chars" != x; then
15141     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15142     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15143     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15144     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15145       # Going to short mode and back again did indeed matter. Since short mode is
15146       # case insensitive, let's make it lowercase to improve readability.
15147       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15148       # Now convert it back to Unix-stile (cygpath)
15149       input_path=`$CYGPATH -u "$shortmode_path"`
15150       new_path="$input_path"
15151     fi
15152   fi
15153 
15154   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15155   if test "x$test_cygdrive_prefix" = x; then
15156     # As a simple fix, exclude /usr/bin since it's not a real path.
15157     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15158       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15159       # a path prefixed by /cygdrive for fixpath to work.
15160       new_path="$CYGWIN_ROOT_PATH$input_path"
15161     fi
15162   fi
15163 
15164 
15165   if test "x$path" != "x$new_path"; then
15166     BOOT_JDK="$new_path"
15167     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15168 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15169   fi
15170 
15171   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15172 
15173   path="$BOOT_JDK"
15174   has_colon=`$ECHO $path | $GREP ^.:`
15175   new_path="$path"
15176   if test "x$has_colon" = x; then
15177     # Not in mixed or Windows style, start by that.
15178     new_path=`cmd //c echo $path`
15179   fi
15180 
15181 
15182   input_path="$new_path"
15183   # Check if we need to convert this using DOS-style short mode. If the path
15184   # contains just simple characters, use it. Otherwise (spaces, weird characters),
15185   # take no chances and rewrite it.
15186   # Note: m4 eats our [], so we need to use [ and ] instead.
15187   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15188   if test "x$has_forbidden_chars" != x; then
15189     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15190     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15191   fi
15192 
15193 
15194   windows_path="$new_path"
15195   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15196     unix_path=`$CYGPATH -u "$windows_path"`
15197     new_path="$unix_path"
15198   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15199     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15200     new_path="$unix_path"
15201   fi
15202 
15203   if test "x$path" != "x$new_path"; then
15204     BOOT_JDK="$new_path"
15205     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15206 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15207   fi
15208 
15209   # Save the first 10 bytes of this path to the storage, so fixpath can work.
15210   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15211 
15212   else
15213     # We're on a posix platform. Hooray! :)
15214     path="$BOOT_JDK"
15215 
15216     if test ! -f "$path" && test ! -d "$path"; then
15217       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
15218     fi
15219 
15220     has_space=`$ECHO "$path" | $GREP " "`
15221     if test "x$has_space" != x; then
15222       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15223 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15224       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15225     fi
15226   fi
15227 
15228               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
15229 $as_echo_n "checking for Boot JDK... " >&6; }
15230               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
15231 $as_echo "$BOOT_JDK" >&6; }
15232               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
15233 $as_echo_n "checking Boot JDK version... " >&6; }
15234               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
15235               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
15236 $as_echo "$BOOT_JDK_VERSION" >&6; }
15237             fi # end check jdk version
15238           fi # end check rt.jar
15239         fi # end check javac
15240       fi # end check java
15241     fi # end check boot jdk found
15242   fi
15243 
15244   fi
15245 
15246 
15247     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
15248     if test "x$BOOT_JDK_FOUND" = xmaybe; then
15249       # Do we have a bin/java?
15250       if test ! -x "$BOOT_JDK/bin/java"; then
15251         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
15252 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
15253         BOOT_JDK_FOUND=no
15254       else
15255         # Do we have a bin/javac?
15256         if test ! -x "$BOOT_JDK/bin/javac"; then
15257           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
15258 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
15259           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
15260 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
15261           BOOT_JDK_FOUND=no
15262         else
15263           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
15264           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
15265             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
15266 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
15267             BOOT_JDK_FOUND=no
15268           else
15269             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
15270             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
15271 
15272             # Extra M4 quote needed to protect [] in grep expression.
15273             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
15274             if test "x$FOUND_VERSION_78" = x; then
15275               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
15276 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
15277               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
15278 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
15279               BOOT_JDK_FOUND=no
15280             else
15281               # We're done! :-)
15282               BOOT_JDK_FOUND=yes
15283 
15284   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15285 
15286   # Input might be given as Windows format, start by converting to
15287   # unix format.
15288   path="$BOOT_JDK"
15289   new_path=`$CYGPATH -u "$path"`
15290 
15291   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15292   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15293   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15294   # "foo.exe" is OK but "foo" is an error.
15295   #
15296   # This test is therefore slightly more accurate than "test -f" to check for file precense.
15297   # It is also a way to make sure we got the proper file name for the real test later on.
15298   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15299   if test "x$test_shortpath" = x; then
15300     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15301 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15302     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
15303   fi
15304 
15305   # Call helper function which possibly converts this using DOS-style short mode.
15306   # If so, the updated path is stored in $new_path.
15307 
15308   input_path="$new_path"
15309   # Check if we need to convert this using DOS-style short mode. If the path
15310   # contains just simple characters, use it. Otherwise (spaces, weird characters),
15311   # take no chances and rewrite it.
15312   # Note: m4 eats our [], so we need to use [ and ] instead.
15313   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15314   if test "x$has_forbidden_chars" != x; then
15315     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15316     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15317     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15318     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15319       # Going to short mode and back again did indeed matter. Since short mode is
15320       # case insensitive, let's make it lowercase to improve readability.
15321       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15322       # Now convert it back to Unix-stile (cygpath)
15323       input_path=`$CYGPATH -u "$shortmode_path"`
15324       new_path="$input_path"
15325     fi
15326   fi
15327 
15328   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15329   if test "x$test_cygdrive_prefix" = x; then
15330     # As a simple fix, exclude /usr/bin since it's not a real path.
15331     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15332       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15333       # a path prefixed by /cygdrive for fixpath to work.
15334       new_path="$CYGWIN_ROOT_PATH$input_path"
15335     fi
15336   fi
15337 
15338 
15339   if test "x$path" != "x$new_path"; then
15340     BOOT_JDK="$new_path"
15341     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15342 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15343   fi
15344 
15345   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15346 
15347   path="$BOOT_JDK"
15348   has_colon=`$ECHO $path | $GREP ^.:`
15349   new_path="$path"
15350   if test "x$has_colon" = x; then
15351     # Not in mixed or Windows style, start by that.
15352     new_path=`cmd //c echo $path`
15353   fi
15354 
15355 
15356   input_path="$new_path"
15357   # Check if we need to convert this using DOS-style short mode. If the path
15358   # contains just simple characters, use it. Otherwise (spaces, weird characters),
15359   # take no chances and rewrite it.
15360   # Note: m4 eats our [], so we need to use [ and ] instead.
15361   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15362   if test "x$has_forbidden_chars" != x; then
15363     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15364     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15365   fi
15366 
15367 
15368   windows_path="$new_path"
15369   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15370     unix_path=`$CYGPATH -u "$windows_path"`
15371     new_path="$unix_path"
15372   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15373     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15374     new_path="$unix_path"
15375   fi
15376 
15377   if test "x$path" != "x$new_path"; then
15378     BOOT_JDK="$new_path"
15379     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15380 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15381   fi
15382 
15383   # Save the first 10 bytes of this path to the storage, so fixpath can work.
15384   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15385 
15386   else
15387     # We're on a posix platform. Hooray! :)
15388     path="$BOOT_JDK"
15389 
15390     if test ! -f "$path" && test ! -d "$path"; then
15391       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
15392     fi
15393 
15394     has_space=`$ECHO "$path" | $GREP " "`
15395     if test "x$has_space" != x; then
15396       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15397 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15398       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15399     fi
15400   fi
15401 
15402               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
15403 $as_echo_n "checking for Boot JDK... " >&6; }
15404               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
15405 $as_echo "$BOOT_JDK" >&6; }
15406               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
15407 $as_echo_n "checking Boot JDK version... " >&6; }
15408               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
15409               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
15410 $as_echo "$BOOT_JDK_VERSION" >&6; }
15411             fi # end check jdk version
15412           fi # end check rt.jar
15413         fi # end check javac
15414       fi # end check java
15415     fi # end check boot jdk found
15416   fi
15417 
15418 
15419 # If we haven't found anything yet, we've truly lost. Give up.
15420 if test "x$BOOT_JDK_FOUND" = xno; then
15421 
15422     # Print a helpful message on how to acquire the necessary build dependency.
15423     # openjdk is the help tag: freetyp2, cups, pulse, alsa etc
15424     MISSING_DEPENDENCY=openjdk
15425     PKGHANDLER_COMMAND=
15426 
15427     case $PKGHANDLER in
15428         apt-get)
15429                 apt_help     $MISSING_DEPENDENCY ;;
15430     yum)
15431                 yum_help     $MISSING_DEPENDENCY ;;
15432         port)
15433                 port_help    $MISSING_DEPENDENCY ;;
15434         pkgutil)
15435                 pkgutil_help $MISSING_DEPENDENCY ;;
15436         pkgadd)
15437                 pkgadd_help  $MISSING_DEPENDENCY ;;
15438     * )
15439       break ;;
15440     esac
15441 
15442     if test "x$PKGHANDLER_COMMAND" != x; then
15443         HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
15444     fi
15445 
15446   { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find a valid Boot JDK. $HELP_MSG" >&5
15447 $as_echo "$as_me: Could not find a valid Boot JDK. $HELP_MSG" >&6;}
15448   { $as_echo "$as_me:${as_lineno-$LINENO}: This might be fixed by explicitely setting --with-boot-jdk" >&5
15449 $as_echo "$as_me: This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15450   as_fn_error $? "Cannot continue" "$LINENO" 5
15451 fi
15452 
15453 # Setup proper paths for what we found
15454 BOOT_RTJAR="$BOOT_JDK/jre/lib/rt.jar"
15455 if test ! -f "$BOOT_RTJAR"; then
15456     # On MacOSX it is called classes.jar
15457     BOOT_RTJAR="$BOOT_JDK/../Classes/classes.jar"
15458     if test -f "$BOOT_RTJAR"; then
15459       # Remove the ..
15460       BOOT_RTJAR="`cd ${BOOT_RTJAR%/*} && pwd`/${BOOT_RTJAR##*/}"
15461     fi
15462 fi
15463 BOOT_TOOLSJAR="$BOOT_JDK/lib/tools.jar"
15464 BOOT_JDK="$BOOT_JDK"
15465 
15466 
15467 
15468 
15469 # Setup tools from the Boot JDK.
15470 
15471   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
15472 $as_echo_n "checking for java in Boot JDK... " >&6; }
15473   JAVA=$BOOT_JDK/bin/java
15474   if test ! -x $JAVA; then
15475       { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15476 $as_echo "not found" >&6; }
15477       { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15478 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15479       as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
15480   fi
15481   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15482 $as_echo "ok" >&6; }
15483 
15484 
15485   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
15486 $as_echo_n "checking for javac in Boot JDK... " >&6; }
15487   JAVAC=$BOOT_JDK/bin/javac
15488   if test ! -x $JAVAC; then
15489       { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15490 $as_echo "not found" >&6; }
15491       { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15492 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15493       as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
15494   fi
15495   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15496 $as_echo "ok" >&6; }
15497 
15498 
15499   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
15500 $as_echo_n "checking for javah in Boot JDK... " >&6; }
15501   JAVAH=$BOOT_JDK/bin/javah
15502   if test ! -x $JAVAH; then
15503       { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15504 $as_echo "not found" >&6; }
15505       { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15506 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15507       as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
15508   fi
15509   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15510 $as_echo "ok" >&6; }
15511 
15512 
15513   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javap in Boot JDK" >&5
15514 $as_echo_n "checking for javap in Boot JDK... " >&6; }
15515   JAVAP=$BOOT_JDK/bin/javap
15516   if test ! -x $JAVAP; then
15517       { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15518 $as_echo "not found" >&6; }
15519       { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15520 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15521       as_fn_error $? "Could not find javap in the Boot JDK" "$LINENO" 5
15522   fi
15523   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15524 $as_echo "ok" >&6; }
15525 
15526 
15527   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
15528 $as_echo_n "checking for jar in Boot JDK... " >&6; }
15529   JAR=$BOOT_JDK/bin/jar
15530   if test ! -x $JAR; then
15531       { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15532 $as_echo "not found" >&6; }
15533       { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15534 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15535       as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
15536   fi
15537   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15538 $as_echo "ok" >&6; }
15539 
15540 
15541   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for rmic in Boot JDK" >&5
15542 $as_echo_n "checking for rmic in Boot JDK... " >&6; }
15543   RMIC=$BOOT_JDK/bin/rmic
15544   if test ! -x $RMIC; then
15545       { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15546 $as_echo "not found" >&6; }
15547       { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15548 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15549       as_fn_error $? "Could not find rmic in the Boot JDK" "$LINENO" 5
15550   fi
15551   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15552 $as_echo "ok" >&6; }
15553 
15554 
15555   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for native2ascii in Boot JDK" >&5
15556 $as_echo_n "checking for native2ascii in Boot JDK... " >&6; }
15557   NATIVE2ASCII=$BOOT_JDK/bin/native2ascii
15558   if test ! -x $NATIVE2ASCII; then
15559       { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15560 $as_echo "not found" >&6; }
15561       { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15562 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15563       as_fn_error $? "Could not find native2ascii in the Boot JDK" "$LINENO" 5
15564   fi
15565   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15566 $as_echo "ok" >&6; }
15567 
15568 
15569 # Finally, set some other options...
15570 
15571 # When compiling code to be executed by the Boot JDK, force jdk7 compatibility.
15572 BOOT_JDK_SOURCETARGET="-source 7 -target 7"
15573 
15574 
15575 
15576 
15577 ##############################################################################
15578 #
15579 # Specify options for anything that is run with the Boot JDK.
15580 #
15581 
15582 # Check whether --with-boot-jdk-jvmargs was given.
15583 if test "${with_boot_jdk_jvmargs+set}" = set; then :
15584   withval=$with_boot_jdk_jvmargs;
15585 fi
15586 
15587 
15588 if test "x$with_boot_jdk_jvmargs" = x; then
15589     # Not all JVM:s accept the same arguments on the command line.
15590     # OpenJDK specific increase in thread stack for JDK build,
15591     # well more specifically, when running javac.
15592     if test "x$BUILD_NUM_BITS" = x32; then
15593        STACK_SIZE=768
15594     else
15595        # Running Javac on a JVM on a 64-bit machine, the stack takes more space
15596        # since 64-bit pointers are pushed on the stach. Apparently, we need
15597        # to increase the stack space when javacing the JDK....
15598        STACK_SIZE=1536
15599     fi
15600 
15601     # Minimum amount of heap memory.
15602 
15603     # Test if -Xms64M is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
15604     # If so, then append -Xms64M to boot_jdk_jvmargs
15605     FOUND_WARN=`$JAVA -Xms64M -version 2>&1 | grep -i warn`
15606     FOUND_VERSION=`$JAVA -Xms64M -version 2>&1 | grep " version \""`
15607     if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15608         boot_jdk_jvmargs="$boot_jdk_jvmargs -Xms64M"
15609     fi
15610 
15611     if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
15612         # Why does macosx need more heap? Its the huge JDK batch.
15613 
15614     # Test if -Xmx1600M is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
15615     # If so, then append -Xmx1600M to boot_jdk_jvmargs
15616     FOUND_WARN=`$JAVA -Xmx1600M -version 2>&1 | grep -i warn`
15617     FOUND_VERSION=`$JAVA -Xmx1600M -version 2>&1 | grep " version \""`
15618     if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15619         boot_jdk_jvmargs="$boot_jdk_jvmargs -Xmx1600M"
15620     fi
15621 
15622     else
15623 
15624     # Test if -Xmx1100M is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
15625     # If so, then append -Xmx1100M to boot_jdk_jvmargs
15626     FOUND_WARN=`$JAVA -Xmx1100M -version 2>&1 | grep -i warn`
15627     FOUND_VERSION=`$JAVA -Xmx1100M -version 2>&1 | grep " version \""`
15628     if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15629         boot_jdk_jvmargs="$boot_jdk_jvmargs -Xmx1100M"
15630     fi
15631 
15632     fi
15633     # When is adding -client something that speeds up the JVM?
15634     # ADD_JVM_ARG_IF_OK([-client],boot_jdk_jvmargs,[$JAVA])
15635 
15636     # Test if -XX:PermSize=32m is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
15637     # If so, then append -XX:PermSize=32m to boot_jdk_jvmargs
15638     FOUND_WARN=`$JAVA -XX:PermSize=32m -version 2>&1 | grep -i warn`
15639     FOUND_VERSION=`$JAVA -XX:PermSize=32m -version 2>&1 | grep " version \""`
15640     if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15641         boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:PermSize=32m"
15642     fi
15643 
15644 
15645     # Test if -XX:MaxPermSize=160m is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
15646     # If so, then append -XX:MaxPermSize=160m to boot_jdk_jvmargs
15647     FOUND_WARN=`$JAVA -XX:MaxPermSize=160m -version 2>&1 | grep -i warn`
15648     FOUND_VERSION=`$JAVA -XX:MaxPermSize=160m -version 2>&1 | grep " version \""`
15649     if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15650         boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:MaxPermSize=160m"
15651     fi
15652 
15653 
15654     # Test if -XX:ThreadStackSize=$STACK_SIZE is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
15655     # If so, then append -XX:ThreadStackSize=$STACK_SIZE to boot_jdk_jvmargs
15656     FOUND_WARN=`$JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1 | grep -i warn`
15657     FOUND_VERSION=`$JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1 | grep " version \""`
15658     if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15659         boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:ThreadStackSize=$STACK_SIZE"
15660     fi
15661 
15662     # Disable special log output when a debug build is used as Boot JDK...
15663 
15664     # Test if -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
15665     # If so, then append -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput to boot_jdk_jvmargs
15666     FOUND_WARN=`$JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version 2>&1 | grep -i warn`
15667     FOUND_VERSION=`$JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version 2>&1 | grep " version \""`
15668     if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15669         boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput"
15670     fi
15671 
15672 fi
15673 
15674 BOOT_JDK_JVMARGS=$boot_jdk_jvmargs
15675 
15676 
15677 
15678 ###############################################################################
15679 #
15680 # Configure the sources to use. We can add or override individual directories.
15681 #
15682 ###############################################################################
15683 
15684 
15685 
15686 # Where are the sources. Any of these can be overridden
15687 # using --with-override-corba and the likes.
15688 LANGTOOLS_TOPDIR="$SRC_ROOT/langtools"
15689 CORBA_TOPDIR="$SRC_ROOT/corba"
15690 JAXP_TOPDIR="$SRC_ROOT/jaxp"
15691 JAXWS_TOPDIR="$SRC_ROOT/jaxws"
15692 HOTSPOT_TOPDIR="$SRC_ROOT/hotspot"
15693 NASHORN_TOPDIR="$SRC_ROOT/nashorn"
15694 JDK_TOPDIR="$SRC_ROOT/jdk"
15695 
15696 
15697 
15698 
15699 
15700 
15701 
15702 
15703 
15704 
15705 ###############################################################################
15706 #
15707 # Pickup additional source for a component from outside of the source root
15708 # or override source for a component.
15709 #
15710 
15711 # Check whether --with-add-source-root was given.
15712 if test "${with_add_source_root+set}" = set; then :
15713   withval=$with_add_source_root;
15714 fi
15715 
15716 
15717 
15718 # Check whether --with-override-source-root was given.
15719 if test "${with_override_source_root+set}" = set; then :
15720   withval=$with_override_source_root;
15721 fi
15722 
15723 
15724 
15725 # Check whether --with-adds-and-overrides was given.
15726 if test "${with_adds_and_overrides+set}" = set; then :
15727   withval=$with_adds_and_overrides;
15728 fi
15729 
15730 
15731 if test "x$with_adds_and_overrides" != x; then
15732     with_add_source_root="$with_adds_and_overrides/adds"
15733     with_override_source_root="$with_adds_and_overrides/overrides"
15734 fi
15735 
15736 if test "x$with_add_source_root" != x; then
15737     if ! test -d $with_add_source_root; then
15738        as_fn_error $? "Trying to use a non-existant add-source-root $with_add_source_root" "$LINENO" 5
15739     fi
15740     CURDIR="$PWD"
15741     cd "$with_add_source_root"
15742     ADD_SRC_ROOT="`pwd`"
15743     cd "$CURDIR"
15744     # Verify that the addon source root does not have any root makefiles.
15745     # If it does, then it is usually an error, prevent this.
15746     if test -f $with_add_source_root/langtools/makefiles/Makefile || \
15747        test -f $with_add_source_root/langtools/make/Makefile; then
15748         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
15749     fi
15750     if test -f $with_add_source_root/corba/makefiles/Makefile || \
15751        test -f $with_add_source_root/corba/make/Makefile; then
15752         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
15753     fi
15754     if test -f $with_add_source_root/jaxp/makefiles/Makefile || \
15755        test -f $with_add_source_root/jaxp/make/Makefile; then
15756         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
15757     fi
15758     if test -f $with_add_source_root/jaxws/makefiles/Makefile || \
15759        test -f $with_add_source_root/jaxws/make/Makefile; then
15760         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
15761     fi
15762     if test -f $with_add_source_root/hotspot/makefiles/Makefile || \
15763        test -f $with_add_source_root/hotspot/make/Makefile; then
15764         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
15765     fi
15766     if test -f $with_add_source_root/jdk/makefiles/Makefile || \
15767        test -f $with_add_source_root/jdk/make/Makefile; then
15768         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
15769     fi
15770 fi
15771 
15772 
15773 if test "x$with_override_source_root" != x; then
15774     if ! test -d $with_override_source_root; then
15775        as_fn_error $? "Trying to use a non-existant override-source-root $with_override_source_root" "$LINENO" 5
15776     fi
15777     CURDIR="$PWD"
15778     cd "$with_override_source_root"
15779     OVERRIDE_SRC_ROOT="`pwd`"
15780     cd "$CURDIR"
15781     if test -f $with_override_source_root/langtools/makefiles/Makefile || \
15782        test -f $with_override_source_root/langtools/make/Makefile; then
15783         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
15784     fi
15785     if test -f $with_override_source_root/corba/makefiles/Makefile || \
15786        test -f $with_override_source_root/corba/make/Makefile; then
15787         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
15788     fi
15789     if test -f $with_override_source_root/jaxp/makefiles/Makefile || \
15790        test -f $with_override_source_root/jaxp/make/Makefile; then
15791         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
15792     fi
15793     if test -f $with_override_source_root/jaxws/makefiles/Makefile || \
15794        test -f $with_override_source_root/jaxws/make/Makefile; then
15795         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
15796     fi
15797     if test -f $with_override_source_root/hotspot/makefiles/Makefile || \
15798        test -f $with_override_source_root/hotspot/make/Makefile; then
15799         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
15800     fi
15801     if test -f $with_override_source_root/jdk/makefiles/Makefile || \
15802        test -f $with_override_source_root/jdk/make/Makefile; then
15803         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
15804     fi
15805 fi
15806 
15807 
15808 ###############################################################################
15809 #
15810 # Override a repo completely, this is used for example when you have 3 small
15811 # development sandboxes of the langtools sources and want to avoid having 3 full
15812 # OpenJDK sources checked out on disk.
15813 #
15814 # Assuming that the 3 langtools sandboxes are located here:
15815 # /home/fredrik/sandbox1/langtools
15816 # /home/fredrik/sandbox2/langtools
15817 # /home/fredrik/sandbox3/langtools
15818 #
15819 # From the source root you create build subdirs manually:
15820 #     mkdir -p build1 build2 build3
15821 # in each build directory run:
15822 #     (cd build1 && ../configure --with-override-langtools=/home/fredrik/sandbox1 && make)
15823 #     (cd build2 && ../configure --with-override-langtools=/home/fredrik/sandbox2 && make)
15824 #     (cd build3 && ../configure --with-override-langtools=/home/fredrik/sandbox3 && make)
15825 #
15826 
15827 
15828 # Check whether --with-override-langtools was given.
15829 if test "${with_override_langtools+set}" = set; then :
15830   withval=$with_override_langtools;
15831 fi
15832 
15833 
15834 
15835 # Check whether --with-override-corba was given.
15836 if test "${with_override_corba+set}" = set; then :
15837   withval=$with_override_corba;
15838 fi
15839 
15840 
15841 
15842 # Check whether --with-override-jaxp was given.
15843 if test "${with_override_jaxp+set}" = set; then :
15844   withval=$with_override_jaxp;
15845 fi
15846 
15847 
15848 
15849 # Check whether --with-override-jaxws was given.
15850 if test "${with_override_jaxws+set}" = set; then :
15851   withval=$with_override_jaxws;
15852 fi
15853 
15854 
15855 
15856 # Check whether --with-override-hotspot was given.
15857 if test "${with_override_hotspot+set}" = set; then :
15858   withval=$with_override_hotspot;
15859 fi
15860 
15861 
15862 
15863 # Check whether --with-override-jdk was given.
15864 if test "${with_override_jdk+set}" = set; then :
15865   withval=$with_override_jdk;
15866 fi
15867 
15868 
15869 if test "x$with_override_langtools" != x; then
15870     CURDIR="$PWD"
15871     cd "$with_override_langtools"
15872     LANGTOOLS_TOPDIR="`pwd`"
15873     cd "$CURDIR"
15874     if ! test -f $LANGTOOLS_TOPDIR/makefiles/Makefile; then
15875         as_fn_error $? "You have to override langtools with a full langtools repo!" "$LINENO" 5
15876     fi
15877     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if langtools should be overridden" >&5
15878 $as_echo_n "checking if langtools should be overridden... " >&6; }
15879     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $LANGTOOLS_TOPDIR" >&5
15880 $as_echo "yes with $LANGTOOLS_TOPDIR" >&6; }
15881 fi
15882 if test "x$with_override_corba" != x; then
15883     CURDIR="$PWD"
15884     cd "$with_override_corba"
15885     CORBA_TOPDIR="`pwd`"
15886     cd "$CURDIR"
15887     if ! test -f $CORBA_TOPDIR/makefiles/Makefile; then
15888         as_fn_error $? "You have to override corba with a full corba repo!" "$LINENO" 5
15889     fi
15890     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if corba should be overridden" >&5
15891 $as_echo_n "checking if corba should be overridden... " >&6; }
15892     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $CORBA_TOPDIR" >&5
15893 $as_echo "yes with $CORBA_TOPDIR" >&6; }
15894 fi
15895 if test "x$with_override_jaxp" != x; then
15896     CURDIR="$PWD"
15897     cd "$with_override_jaxp"
15898     JAXP_TOPDIR="`pwd`"
15899     cd "$CURDIR"
15900     if ! test -f $JAXP_TOPDIR/makefiles/Makefile; then
15901         as_fn_error $? "You have to override jaxp with a full jaxp repo!" "$LINENO" 5
15902     fi
15903     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jaxp should be overridden" >&5
15904 $as_echo_n "checking if jaxp should be overridden... " >&6; }
15905     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JAXP_TOPDIR" >&5
15906 $as_echo "yes with $JAXP_TOPDIR" >&6; }
15907 fi
15908 if test "x$with_override_jaxws" != x; then
15909     CURDIR="$PWD"
15910     cd "$with_override_jaxws"
15911     JAXWS_TOPDIR="`pwd`"
15912     cd "$CURDIR"
15913     if ! test -f $JAXWS_TOPDIR/makefiles/Makefile; then
15914         as_fn_error $? "You have to override jaxws with a full jaxws repo!" "$LINENO" 5
15915     fi
15916     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jaxws should be overridden" >&5
15917 $as_echo_n "checking if jaxws should be overridden... " >&6; }
15918     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JAXWS_TOPDIR" >&5
15919 $as_echo "yes with $JAXWS_TOPDIR" >&6; }
15920 fi
15921 if test "x$with_override_hotspot" != x; then
15922     CURDIR="$PWD"
15923     cd "$with_override_hotspot"
15924     HOTSPOT_TOPDIR="`pwd`"
15925     cd "$CURDIR"
15926     if ! test -f $HOTSPOT_TOPDIR/make/Makefile && \
15927        ! test -f $HOTSPOT_TOPDIR/makefiles/Makefile; then
15928         as_fn_error $? "You have to override hotspot with a full hotspot repo!" "$LINENO" 5
15929     fi
15930     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be overridden" >&5
15931 $as_echo_n "checking if hotspot should be overridden... " >&6; }
15932     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $HOTSPOT_TOPDIR" >&5
15933 $as_echo "yes with $HOTSPOT_TOPDIR" >&6; }
15934 fi
15935 if test "x$with_override_nashorn" != x; then
15936     CURDIR="$PWD"
15937     cd "$with_override_nashorn"
15938     NASHORN_TOPDIR="`pwd`"
15939     cd "$CURDIR"
15940     if ! test -f $NASHORN_TOPDIR/makefiles/BuildNashorn.gmk; then
15941         as_fn_error $? "You have to override nashorn with a full nashorn repo!" "$LINENO" 5
15942     fi
15943     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if nashorn should be overridden" >&5
15944 $as_echo_n "checking if nashorn should be overridden... " >&6; }
15945     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $NASHORN_TOPDIR" >&5
15946 $as_echo "yes with $NASHORN_TOPDIR" >&6; }
15947 fi
15948 if test "x$with_override_jdk" != x; then
15949     CURDIR="$PWD"
15950     cd "$with_override_jdk"
15951     JDK_TOPDIR="`pwd`"
15952     cd "$CURDIR"
15953     if ! test -f $JDK_TOPDIR/makefiles/Makefile; then
15954         as_fn_error $? "You have to override JDK with a full JDK repo!" "$LINENO" 5
15955     fi
15956     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if JDK should be overridden" >&5
15957 $as_echo_n "checking if JDK should be overridden... " >&6; }
15958     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JDK_TOPDIR" >&5
15959 $as_echo "yes with $JDK_TOPDIR" >&6; }
15960 fi
15961 
15962 
15963 
15964 BUILD_OUTPUT="$OUTPUT_ROOT"
15965 
15966 
15967 HOTSPOT_DIST="$OUTPUT_ROOT/hotspot/dist"
15968 BUILD_HOTSPOT=true
15969 
15970 
15971 
15972 # Check whether --with-import-hotspot was given.
15973 if test "${with_import_hotspot+set}" = set; then :
15974   withval=$with_import_hotspot;
15975 fi
15976 
15977 if test "x$with_import_hotspot" != x; then
15978     CURDIR="$PWD"
15979     cd "$with_import_hotspot"
15980     HOTSPOT_DIST="`pwd`"
15981     cd "$CURDIR"
15982     if ! (test -d $HOTSPOT_DIST/lib && test -d $HOTSPOT_DIST/jre/lib); then
15983         as_fn_error $? "You have to import hotspot from a full jdk image or hotspot build dist dir!" "$LINENO" 5
15984     fi
15985     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be imported" >&5
15986 $as_echo_n "checking if hotspot should be imported... " >&6; }
15987     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes from $HOTSPOT_DIST" >&5
15988 $as_echo "yes from $HOTSPOT_DIST" >&6; }
15989     BUILD_HOTSPOT=false
15990 fi
15991 
15992 JDK_OUTPUTDIR="$OUTPUT_ROOT/jdk"
15993 
15994 
15995 ###############################################################################
15996 #
15997 # Setup the toolchain (compilers etc), i.e. the tools that need to be
15998 # cross-compilation aware.
15999 #
16000 ###############################################################################
16001 
16002 
16003 ###############################################################################
16004 #
16005 # Configure the development tool paths and potential sysroot.
16006 #
16007 ac_ext=cpp
16008 ac_cpp='$CXXCPP $CPPFLAGS'
16009 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
16010 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
16011 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
16012 
16013 
16014 # The option used to specify the target .o,.a or .so file.
16015 # When compiling, how to specify the to be created object file.
16016 CC_OUT_OPTION='-o$(SPACE)'
16017 # When linking, how to specify the to be created executable.
16018 EXE_OUT_OPTION='-o$(SPACE)'
16019 # When linking, how to specify the to be created dynamically linkable library.
16020 LD_OUT_OPTION='-o$(SPACE)'
16021 # When archiving, how to specify the to be create static archive for object files.
16022 AR_OUT_OPTION='rcs$(SPACE)'
16023 
16024 
16025 
16026 
16027 
16028 # Locate the actual tools
16029 
16030 if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
16031 
16032   # Store path to cygwin link.exe to help excluding it when searching for
16033   # VS linker. This must be done before changing the PATH when looking for VS.
16034   # Extract the first word of "link", so it can be a program name with args.
16035 set dummy link; ac_word=$2
16036 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16037 $as_echo_n "checking for $ac_word... " >&6; }
16038 if ${ac_cv_path_CYGWIN_LINK+:} false; then :
16039   $as_echo_n "(cached) " >&6
16040 else
16041   case $CYGWIN_LINK in
16042   [\\/]* | ?:[\\/]*)
16043   ac_cv_path_CYGWIN_LINK="$CYGWIN_LINK" # Let the user override the test with a path.
16044   ;;
16045   *)
16046   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16047 for as_dir in $PATH
16048 do
16049   IFS=$as_save_IFS
16050   test -z "$as_dir" && as_dir=.
16051     for ac_exec_ext in '' $ac_executable_extensions; do
16052   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
16053     ac_cv_path_CYGWIN_LINK="$as_dir/$ac_word$ac_exec_ext"
16054     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16055     break 2
16056   fi
16057 done
16058   done
16059 IFS=$as_save_IFS
16060 
16061   ;;
16062 esac
16063 fi
16064 CYGWIN_LINK=$ac_cv_path_CYGWIN_LINK
16065 if test -n "$CYGWIN_LINK"; then
16066   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_LINK" >&5
16067 $as_echo "$CYGWIN_LINK" >&6; }
16068 else
16069   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16070 $as_echo "no" >&6; }
16071 fi
16072 
16073 
16074   if test "x$CYGWIN_LINK" != x; then
16075     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the first found link.exe is actually the Cygwin link tool" >&5
16076 $as_echo_n "checking if the first found link.exe is actually the Cygwin link tool... " >&6; }
16077     "$CYGWIN_LINK" --version > /dev/null
16078     if test $? -eq 0 ; then
16079       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16080 $as_echo "yes" >&6; }
16081     else
16082       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16083 $as_echo "no" >&6; }
16084       # This might be the VS linker. Don't exclude it later on.
16085       CYGWIN_LINK=""
16086     fi
16087   fi
16088 
16089   # First-hand choice is to locate and run the vsvars bat file.
16090 
16091   if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
16092     VCVARSFILE="vc/bin/vcvars32.bat"
16093   else
16094     VCVARSFILE="vc/bin/amd64/vcvars64.bat"
16095   fi
16096 
16097   VS_ENV_CMD=""
16098   VS_ENV_ARGS=""
16099   if test "x$with_toolsdir" != x; then
16100 
16101   if test "x$VS_ENV_CMD" = x; then
16102     VS100BASE="$with_toolsdir/../.."
16103     METHOD="--with-tools-dir"
16104 
16105   windows_path="$VS100BASE"
16106   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16107     unix_path=`$CYGPATH -u "$windows_path"`
16108     VS100BASE="$unix_path"
16109   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16110     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16111     VS100BASE="$unix_path"
16112   fi
16113 
16114     if test -d "$VS100BASE"; then
16115       if test -f "$VS100BASE/$VCVARSFILE"; then
16116         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16117 $as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16118         VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16119       else
16120         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16121 $as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16122         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16123 $as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16124       fi
16125     fi
16126   fi
16127 
16128   fi
16129 
16130   if test "x$with_toolsdir" != x && test "x$VS_ENV_CMD" = x; then
16131     # Having specified an argument which is incorrect will produce an instant failure;
16132     # we should not go on looking
16133     { $as_echo "$as_me:${as_lineno-$LINENO}: The path given by --with-tools-dir does not contain a valid Visual Studio installation" >&5
16134 $as_echo "$as_me: The path given by --with-tools-dir does not contain a valid Visual Studio installation" >&6;}
16135     { $as_echo "$as_me:${as_lineno-$LINENO}: Please point to the VC/bin directory within the Visual Studio installation" >&5
16136 $as_echo "$as_me: Please point to the VC/bin directory within the Visual Studio installation" >&6;}
16137     as_fn_error $? "Cannot locate a valid Visual Studio installation" "$LINENO" 5
16138   fi
16139 
16140   if test "x$ProgramW6432" != x; then
16141 
16142   if test "x$VS_ENV_CMD" = x; then
16143     WIN_SDK_BASE="$ProgramW6432/Microsoft SDKs/Windows/v7.1/Bin"
16144     METHOD="well-known name"
16145 
16146   windows_path="$WIN_SDK_BASE"
16147   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16148     unix_path=`$CYGPATH -u "$windows_path"`
16149     WIN_SDK_BASE="$unix_path"
16150   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16151     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16152     WIN_SDK_BASE="$unix_path"
16153   fi
16154 
16155     if test -d "$WIN_SDK_BASE"; then
16156       # There have been cases of partial or broken SDK installations. A missing
16157       # lib dir is not going to work.
16158       if test ! -d "$WIN_SDK_BASE/../lib"; then
16159         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16160 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16161         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
16162 $as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
16163       elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
16164         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16165 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16166         VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
16167         if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
16168           VS_ENV_ARGS="/x86"
16169         else
16170           VS_ENV_ARGS="/x64"
16171         fi
16172       else
16173         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16174 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16175         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
16176 $as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
16177       fi
16178     fi
16179   fi
16180 
16181   fi
16182   if test "x$PROGRAMW6432" != x; then
16183 
16184   if test "x$VS_ENV_CMD" = x; then
16185     WIN_SDK_BASE="$PROGRAMW6432/Microsoft SDKs/Windows/v7.1/Bin"
16186     METHOD="well-known name"
16187 
16188   windows_path="$WIN_SDK_BASE"
16189   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16190     unix_path=`$CYGPATH -u "$windows_path"`
16191     WIN_SDK_BASE="$unix_path"
16192   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16193     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16194     WIN_SDK_BASE="$unix_path"
16195   fi
16196 
16197     if test -d "$WIN_SDK_BASE"; then
16198       # There have been cases of partial or broken SDK installations. A missing
16199       # lib dir is not going to work.
16200       if test ! -d "$WIN_SDK_BASE/../lib"; then
16201         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16202 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16203         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
16204 $as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
16205       elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
16206         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16207 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16208         VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
16209         if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
16210           VS_ENV_ARGS="/x86"
16211         else
16212           VS_ENV_ARGS="/x64"
16213         fi
16214       else
16215         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16216 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16217         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
16218 $as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
16219       fi
16220     fi
16221   fi
16222 
16223   fi
16224   if test "x$PROGRAMFILES" != x; then
16225 
16226   if test "x$VS_ENV_CMD" = x; then
16227     WIN_SDK_BASE="$PROGRAMFILES/Microsoft SDKs/Windows/v7.1/Bin"
16228     METHOD="well-known name"
16229 
16230   windows_path="$WIN_SDK_BASE"
16231   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16232     unix_path=`$CYGPATH -u "$windows_path"`
16233     WIN_SDK_BASE="$unix_path"
16234   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16235     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16236     WIN_SDK_BASE="$unix_path"
16237   fi
16238 
16239     if test -d "$WIN_SDK_BASE"; then
16240       # There have been cases of partial or broken SDK installations. A missing
16241       # lib dir is not going to work.
16242       if test ! -d "$WIN_SDK_BASE/../lib"; then
16243         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16244 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16245         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
16246 $as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
16247       elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
16248         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16249 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16250         VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
16251         if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
16252           VS_ENV_ARGS="/x86"
16253         else
16254           VS_ENV_ARGS="/x64"
16255         fi
16256       else
16257         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16258 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16259         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
16260 $as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
16261       fi
16262     fi
16263   fi
16264 
16265   fi
16266 
16267   if test "x$VS_ENV_CMD" = x; then
16268     WIN_SDK_BASE="C:/Program Files/Microsoft SDKs/Windows/v7.1/Bin"
16269     METHOD="well-known name"
16270 
16271   windows_path="$WIN_SDK_BASE"
16272   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16273     unix_path=`$CYGPATH -u "$windows_path"`
16274     WIN_SDK_BASE="$unix_path"
16275   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16276     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16277     WIN_SDK_BASE="$unix_path"
16278   fi
16279 
16280     if test -d "$WIN_SDK_BASE"; then
16281       # There have been cases of partial or broken SDK installations. A missing
16282       # lib dir is not going to work.
16283       if test ! -d "$WIN_SDK_BASE/../lib"; then
16284         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16285 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16286         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
16287 $as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
16288       elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
16289         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16290 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16291         VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
16292         if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
16293           VS_ENV_ARGS="/x86"
16294         else
16295           VS_ENV_ARGS="/x64"
16296         fi
16297       else
16298         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16299 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16300         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
16301 $as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
16302       fi
16303     fi
16304   fi
16305 
16306 
16307   if test "x$VS_ENV_CMD" = x; then
16308     WIN_SDK_BASE="C:/Program Files (x86)/Microsoft SDKs/Windows/v7.1/Bin"
16309     METHOD="well-known name"
16310 
16311   windows_path="$WIN_SDK_BASE"
16312   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16313     unix_path=`$CYGPATH -u "$windows_path"`
16314     WIN_SDK_BASE="$unix_path"
16315   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16316     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16317     WIN_SDK_BASE="$unix_path"
16318   fi
16319 
16320     if test -d "$WIN_SDK_BASE"; then
16321       # There have been cases of partial or broken SDK installations. A missing
16322       # lib dir is not going to work.
16323       if test ! -d "$WIN_SDK_BASE/../lib"; then
16324         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16325 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16326         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
16327 $as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
16328       elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
16329         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16330 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16331         VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
16332         if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
16333           VS_ENV_ARGS="/x86"
16334         else
16335           VS_ENV_ARGS="/x64"
16336         fi
16337       else
16338         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16339 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16340         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
16341 $as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
16342       fi
16343     fi
16344   fi
16345 
16346 
16347   if test "x$VS100COMNTOOLS" != x; then
16348 
16349   if test "x$VS_ENV_CMD" = x; then
16350     VS100BASE="$VS100COMNTOOLS/../.."
16351     METHOD="VS100COMNTOOLS variable"
16352 
16353   windows_path="$VS100BASE"
16354   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16355     unix_path=`$CYGPATH -u "$windows_path"`
16356     VS100BASE="$unix_path"
16357   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16358     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16359     VS100BASE="$unix_path"
16360   fi
16361 
16362     if test -d "$VS100BASE"; then
16363       if test -f "$VS100BASE/$VCVARSFILE"; then
16364         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16365 $as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16366         VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16367       else
16368         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16369 $as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16370         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16371 $as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16372       fi
16373     fi
16374   fi
16375 
16376   fi
16377   if test "x$PROGRAMFILES" != x; then
16378 
16379   if test "x$VS_ENV_CMD" = x; then
16380     VS100BASE="$PROGRAMFILES/Microsoft Visual Studio 10.0"
16381     METHOD="well-known name"
16382 
16383   windows_path="$VS100BASE"
16384   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16385     unix_path=`$CYGPATH -u "$windows_path"`
16386     VS100BASE="$unix_path"
16387   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16388     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16389     VS100BASE="$unix_path"
16390   fi
16391 
16392     if test -d "$VS100BASE"; then
16393       if test -f "$VS100BASE/$VCVARSFILE"; then
16394         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16395 $as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16396         VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16397       else
16398         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16399 $as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16400         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16401 $as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16402       fi
16403     fi
16404   fi
16405 
16406   fi
16407 
16408   if test "x$VS_ENV_CMD" = x; then
16409     VS100BASE="C:/Program Files/Microsoft Visual Studio 10.0"
16410     METHOD="well-known name"
16411 
16412   windows_path="$VS100BASE"
16413   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16414     unix_path=`$CYGPATH -u "$windows_path"`
16415     VS100BASE="$unix_path"
16416   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16417     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16418     VS100BASE="$unix_path"
16419   fi
16420 
16421     if test -d "$VS100BASE"; then
16422       if test -f "$VS100BASE/$VCVARSFILE"; then
16423         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16424 $as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16425         VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16426       else
16427         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16428 $as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16429         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16430 $as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16431       fi
16432     fi
16433   fi
16434 
16435 
16436   if test "x$VS_ENV_CMD" = x; then
16437     VS100BASE="C:/Program Files (x86)/Microsoft Visual Studio 10.0"
16438     METHOD="well-known name"
16439 
16440   windows_path="$VS100BASE"
16441   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16442     unix_path=`$CYGPATH -u "$windows_path"`
16443     VS100BASE="$unix_path"
16444   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16445     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16446     VS100BASE="$unix_path"
16447   fi
16448 
16449     if test -d "$VS100BASE"; then
16450       if test -f "$VS100BASE/$VCVARSFILE"; then
16451         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16452 $as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16453         VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16454       else
16455         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16456 $as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16457         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16458 $as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16459       fi
16460     fi
16461   fi
16462 
16463 
16464   if test "x$VS_ENV_CMD" != x; then
16465     # We have found a Visual Studio environment on disk, let's extract variables from the vsvars bat file.
16466 
16467   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16468 
16469   # First separate the path from the arguments. This will split at the first
16470   # space.
16471   complete="$VS_ENV_CMD"
16472   path="${complete%% *}"
16473   tmp="$complete EOL"
16474   arguments="${tmp#* }"
16475 
16476   # Input might be given as Windows format, start by converting to
16477   # unix format.
16478   new_path=`$CYGPATH -u "$path"`
16479 
16480   # Now try to locate executable using which
16481   new_path=`$WHICH "$new_path" 2> /dev/null`
16482   # bat and cmd files are not always considered executable in cygwin causing which
16483   # to not find them
16484   if test "x$new_path" = x \
16485            && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16486            && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16487     new_path=`$CYGPATH -u "$path"`
16488   fi
16489   if test "x$new_path" = x; then
16490     # Oops. Which didn't find the executable.
16491     # The splitting of arguments from the executable at a space might have been incorrect,
16492     # since paths with space are more likely in Windows. Give it another try with the whole
16493     # argument.
16494     path="$complete"
16495     arguments="EOL"
16496     new_path=`$CYGPATH -u "$path"`
16497     new_path=`$WHICH "$new_path" 2> /dev/null`
16498     # bat and cmd files are not always considered executable in cygwin causing which
16499     # to not find them
16500     if test "x$new_path" = x \
16501              && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16502              && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16503       new_path=`$CYGPATH -u "$path"`
16504     fi
16505     if test "x$new_path" = x; then
16506       # It's still not found. Now this is an unrecoverable error.
16507       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
16508 $as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
16509       has_space=`$ECHO "$complete" | $GREP " "`
16510       if test "x$has_space" != x; then
16511         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16512 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16513       fi
16514       as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
16515     fi
16516   fi
16517 
16518   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16519   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16520   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16521   # "foo.exe" is OK but "foo" is an error.
16522   #
16523   # This test is therefore slightly more accurate than "test -f" to check for file precense.
16524   # It is also a way to make sure we got the proper file name for the real test later on.
16525   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16526   if test "x$test_shortpath" = x; then
16527     # Short path failed, file does not exist as specified.
16528     # Try adding .exe or .cmd
16529     if test -f "${new_path}.exe"; then
16530        input_to_shortpath="${new_path}.exe"
16531     elif test -f "${new_path}.cmd"; then
16532        input_to_shortpath="${new_path}.cmd"
16533     else
16534       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&5
16535 $as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&6;}
16536       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
16537 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
16538       as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
16539     fi
16540   else
16541     input_to_shortpath="$new_path"
16542   fi
16543 
16544   # Call helper function which possibly converts this using DOS-style short mode.
16545   # If so, the updated path is stored in $new_path.
16546   new_path="$input_to_shortpath"
16547 
16548   input_path="$input_to_shortpath"
16549   # Check if we need to convert this using DOS-style short mode. If the path
16550   # contains just simple characters, use it. Otherwise (spaces, weird characters),
16551   # take no chances and rewrite it.
16552   # Note: m4 eats our [], so we need to use [ and ] instead.
16553   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16554   if test "x$has_forbidden_chars" != x; then
16555     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16556     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16557     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16558     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16559       # Going to short mode and back again did indeed matter. Since short mode is
16560       # case insensitive, let's make it lowercase to improve readability.
16561       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16562       # Now convert it back to Unix-stile (cygpath)
16563       input_path=`$CYGPATH -u "$shortmode_path"`
16564       new_path="$input_path"
16565     fi
16566   fi
16567 
16568   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16569   if test "x$test_cygdrive_prefix" = x; then
16570     # As a simple fix, exclude /usr/bin since it's not a real path.
16571     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
16572       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16573       # a path prefixed by /cygdrive for fixpath to work.
16574       new_path="$CYGWIN_ROOT_PATH$input_path"
16575     fi
16576   fi
16577 
16578   # remove trailing .exe if any
16579   new_path="${new_path/%.exe/}"
16580 
16581   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16582 
16583   # First separate the path from the arguments. This will split at the first
16584   # space.
16585   complete="$VS_ENV_CMD"
16586   path="${complete%% *}"
16587   tmp="$complete EOL"
16588   arguments="${tmp#* }"
16589 
16590   # Input might be given as Windows format, start by converting to
16591   # unix format.
16592   new_path="$path"
16593 
16594   windows_path="$new_path"
16595   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16596     unix_path=`$CYGPATH -u "$windows_path"`
16597     new_path="$unix_path"
16598   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16599     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16600     new_path="$unix_path"
16601   fi
16602 
16603 
16604   # Now try to locate executable using which
16605   new_path=`$WHICH "$new_path" 2> /dev/null`
16606 
16607   if test "x$new_path" = x; then
16608     # Oops. Which didn't find the executable.
16609     # The splitting of arguments from the executable at a space might have been incorrect,
16610     # since paths with space are more likely in Windows. Give it another try with the whole
16611     # argument.
16612     path="$complete"
16613     arguments="EOL"
16614     new_path="$path"
16615 
16616   windows_path="$new_path"
16617   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16618     unix_path=`$CYGPATH -u "$windows_path"`
16619     new_path="$unix_path"
16620   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16621     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16622     new_path="$unix_path"
16623   fi
16624 
16625 
16626     new_path=`$WHICH "$new_path" 2> /dev/null`
16627 
16628     if test "x$new_path" = x; then
16629       # It's still not found. Now this is an unrecoverable error.
16630       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
16631 $as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
16632       has_space=`$ECHO "$complete" | $GREP " "`
16633       if test "x$has_space" != x; then
16634         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16635 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16636       fi
16637       as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
16638     fi
16639   fi
16640 
16641   # Now new_path has a complete unix path to the binary
16642   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
16643     # Keep paths in /bin as-is, but remove trailing .exe if any
16644     new_path="${new_path/%.exe/}"
16645     # Do not save /bin paths to all_fixpath_prefixes!
16646   else
16647     # Not in mixed or Windows style, start by that.
16648     new_path=`cmd //c echo $new_path`
16649 
16650   input_path="$new_path"
16651   # Check if we need to convert this using DOS-style short mode. If the path
16652   # contains just simple characters, use it. Otherwise (spaces, weird characters),
16653   # take no chances and rewrite it.
16654   # Note: m4 eats our [], so we need to use [ and ] instead.
16655   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16656   if test "x$has_forbidden_chars" != x; then
16657     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16658     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16659   fi
16660 
16661     # Output is in $new_path
16662 
16663   windows_path="$new_path"
16664   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16665     unix_path=`$CYGPATH -u "$windows_path"`
16666     new_path="$unix_path"
16667   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16668     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16669     new_path="$unix_path"
16670   fi
16671 
16672     # remove trailing .exe if any
16673     new_path="${new_path/%.exe/}"
16674 
16675     # Save the first 10 bytes of this path to the storage, so fixpath can work.
16676     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16677   fi
16678 
16679   else
16680     # We're on a posix platform. Hooray! :)
16681     # First separate the path from the arguments. This will split at the first
16682     # space.
16683     complete="$VS_ENV_CMD"
16684     path="${complete%% *}"
16685     tmp="$complete EOL"
16686     arguments="${tmp#* }"
16687 
16688     # Cannot rely on the command "which" here since it doesn't always work.
16689     is_absolute_path=`$ECHO "$path" | $GREP ^/`
16690     if test -z "$is_absolute_path"; then
16691       # Path to executable is not absolute. Find it.
16692       IFS_save="$IFS"
16693       IFS=:
16694       for p in $PATH; do
16695         if test -f "$p/$path" && test -x "$p/$path"; then
16696           new_path="$p/$path"
16697           break
16698         fi
16699       done
16700       IFS="$IFS_save"
16701     else
16702       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving VS_ENV_CMD (as $path) failed, using $path directly." >&5
16703 $as_echo "$as_me: Resolving VS_ENV_CMD (as $path) failed, using $path directly." >&6;}
16704       new_path="$path"
16705     fi
16706 
16707     if test "x$new_path" = x; then
16708         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
16709 $as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
16710         has_space=`$ECHO "$complete" | $GREP " "`
16711         if test "x$has_space" != x; then
16712           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
16713 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
16714         fi
16715         as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
16716       fi
16717   fi
16718 
16719       # Now join together the path and the arguments once again
16720       if test "x$arguments" != xEOL; then
16721         new_complete="$new_path ${arguments% *}"
16722       else
16723         new_complete="$new_path"
16724       fi
16725 
16726   if test "x$complete" != "x$new_complete"; then
16727       VS_ENV_CMD="$new_complete"
16728       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting VS_ENV_CMD to \"$new_complete\"" >&5
16729 $as_echo "$as_me: Rewriting VS_ENV_CMD to \"$new_complete\"" >&6;}
16730     fi
16731 
16732 
16733     # Lets extract the variables that are set by vcvarsall.bat/vsvars32.bat/vsvars64.bat
16734     { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to extract Visual Studio environment variables" >&5
16735 $as_echo "$as_me: Trying to extract Visual Studio environment variables" >&6;}
16736     cd $OUTPUT_ROOT
16737     # FIXME: The code betweeen ---- was inlined from a separate script and is not properly adapted
16738     # to autoconf standards.
16739 
16740     #----
16741 
16742     # Cannot use the VS10 setup script directly (since it only updates the DOS subshell environment)
16743     # but calculate the difference in Cygwin environment before/after running it and then
16744     # apply the diff.
16745 
16746     if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
16747       _vs10varsall=`cygpath -a -m -s "$VS_ENV_CMD"`
16748       _dosvs10varsall=`cygpath -a -w -s $_vs10varsall`
16749       _dosbash=`cygpath -a -w -s \`which bash\`.*`
16750     else
16751       _dosvs10varsall=`cmd //c echo $VS_ENV_CMD`
16752       _dosbash=`cmd //c echo \`which bash\``
16753     fi
16754 
16755     # generate the set of exported vars before/after the vs10 setup
16756     $ECHO "@echo off"                                           >  localdevenvtmp.bat
16757     $ECHO "$_dosbash -c \"export -p\" > localdevenvtmp.export0" >> localdevenvtmp.bat
16758     $ECHO "call $_dosvs10varsall $VS_ENV_ARGS"                  >> localdevenvtmp.bat
16759     $ECHO "$_dosbash -c \"export -p\" > localdevenvtmp.export1" >> localdevenvtmp.bat
16760 
16761     # Now execute the newly created bat file.
16762     # The | cat is to stop SetEnv.Cmd to mess with system colors on msys
16763     cmd /c localdevenvtmp.bat | cat
16764 
16765     # apply the diff (less some non-vs10 vars named by "!")
16766     $SORT localdevenvtmp.export0 | $GREP -v "!" > localdevenvtmp.export0.sort
16767     $SORT localdevenvtmp.export1 | $GREP -v "!" > localdevenvtmp.export1.sort
16768     $COMM -1 -3 localdevenvtmp.export0.sort localdevenvtmp.export1.sort > localdevenv.sh
16769 
16770     # cleanup
16771     $RM localdevenvtmp*
16772     #----
16773     cd $CURDIR
16774     if test ! -s $OUTPUT_ROOT/localdevenv.sh; then
16775       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16776 $as_echo "no" >&6; }
16777       { $as_echo "$as_me:${as_lineno-$LINENO}: Could not succesfully extract the envionment variables needed for the VS setup." >&5
16778 $as_echo "$as_me: Could not succesfully extract the envionment variables needed for the VS setup." >&6;}
16779       { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
16780 $as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
16781       { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
16782 $as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
16783       as_fn_error $? "Cannot continue" "$LINENO" 5
16784     fi
16785 
16786     # Now set all paths and other env variables. This will allow the rest of
16787     # the configure script to find and run the compiler in the proper way.
16788     { $as_echo "$as_me:${as_lineno-$LINENO}: Setting extracted environment variables" >&5
16789 $as_echo "$as_me: Setting extracted environment variables" >&6;}
16790     . $OUTPUT_ROOT/localdevenv.sh
16791   else
16792     # We did not find a vsvars bat file, let's hope we are run from a VS command prompt.
16793     { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio installation, checking current environment" >&5
16794 $as_echo "$as_me: Cannot locate a valid Visual Studio installation, checking current environment" >&6;}
16795   fi
16796 
16797   # At this point, we should have corrent variables in the environment, or we can't continue.
16798   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Visual Studio variables" >&5
16799 $as_echo_n "checking for Visual Studio variables... " >&6; }
16800 
16801   if test "x$VCINSTALLDIR" != x || test "x$WindowsSDKDir" != x || test "x$WINDOWSSDKDIR" != x; then
16802     if test "x$INCLUDE" = x || test "x$LIB" = x; then
16803       { $as_echo "$as_me:${as_lineno-$LINENO}: result: present but broken" >&5
16804 $as_echo "present but broken" >&6; }
16805       as_fn_error $? "Your VC command prompt seems broken, INCLUDE and/or LIB is missing." "$LINENO" 5
16806     else
16807       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
16808 $as_echo "ok" >&6; }
16809       # Remove any trailing \ from INCLUDE and LIB to avoid trouble in spec.gmk.
16810       VS_INCLUDE=`$ECHO "$INCLUDE" | $SED 's/\\\\$//'`
16811       VS_LIB=`$ECHO "$LIB" | $SED 's/\\\\$//'`
16812       VS_PATH="$PATH"
16813 
16814 
16815 
16816     fi
16817   else
16818     { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
16819 $as_echo "not found" >&6; }
16820 
16821     if test "x$VS_ENV_CMD" = x; then
16822       { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&5
16823 $as_echo "$as_me: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&6;}
16824       { $as_echo "$as_me:${as_lineno-$LINENO}: nor is this script run from a Visual Studio command prompt." >&5
16825 $as_echo "$as_me: nor is this script run from a Visual Studio command prompt." >&6;}
16826     else
16827       { $as_echo "$as_me:${as_lineno-$LINENO}: Running the extraction script failed." >&5
16828 $as_echo "$as_me: Running the extraction script failed." >&6;}
16829     fi
16830     { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
16831 $as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
16832     { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
16833 $as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
16834     as_fn_error $? "Cannot continue" "$LINENO" 5
16835   fi
16836 
16837   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
16838 $as_echo_n "checking for msvcr100.dll... " >&6; }
16839 
16840 # Check whether --with-msvcr-dll was given.
16841 if test "${with_msvcr_dll+set}" = set; then :
16842   withval=$with_msvcr_dll;
16843 fi
16844 
16845   if test "x$with_msvcr_dll" != x; then
16846     MSVCR_DLL="$with_msvcr_dll"
16847   else
16848     if test "x$VCINSTALLDIR" != x; then
16849       if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
16850         MSVCR_DLL=`find "$VCINSTALLDIR" -name msvcr100.dll | grep x64 | head --lines 1`
16851       else
16852         MSVCR_DLL=`find "$VCINSTALLDIR" -name msvcr100.dll | grep x86 | grep -v ia64 | grep -v x64 | head --lines 1`
16853         if test "x$MSVCR_DLL" = x; then
16854           MSVCR_DLL=`find "$VCINSTALLDIR" -name msvcr100.dll | head --lines 1`
16855         fi
16856       fi
16857       if test "x$MSVCR_DLL" != x; then
16858         { $as_echo "$as_me:${as_lineno-$LINENO}: msvcr100.dll found in VCINSTALLDIR: $VCINSTALLDIR" >&5
16859 $as_echo "$as_me: msvcr100.dll found in VCINSTALLDIR: $VCINSTALLDIR" >&6;}
16860       else
16861         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: msvcr100.dll not found in VCINSTALLDIR: $VCINSTALLDIR" >&5
16862 $as_echo "$as_me: Warning: msvcr100.dll not found in VCINSTALLDIR: $VCINSTALLDIR" >&6;}
16863       fi
16864     fi
16865     if test "x$MSVCR_DLL" = x; then
16866       if test -f "$SYSTEMROOT/system32/msvcr100.dll"; then
16867         { $as_echo "$as_me:${as_lineno-$LINENO}: msvcr100.dll found in $SYSTEMROOT/system32" >&5
16868 $as_echo "$as_me: msvcr100.dll found in $SYSTEMROOT/system32" >&6;}
16869         MSVCR_DLL="$SYSTEMROOT/system32/msvcr100.dll"
16870       fi
16871     fi
16872   fi
16873   if test "x$MSVCR_DLL" = x; then
16874     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16875 $as_echo "no" >&6; }
16876     as_fn_error $? "Could not find msvcr100.dll !" "$LINENO" 5
16877   fi
16878   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
16879 $as_echo "$MSVCR_DLL" >&6; }
16880 
16881   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16882 
16883   # Input might be given as Windows format, start by converting to
16884   # unix format.
16885   path="$MSVCR_DLL"
16886   new_path=`$CYGPATH -u "$path"`
16887 
16888   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16889   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16890   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16891   # "foo.exe" is OK but "foo" is an error.
16892   #
16893   # This test is therefore slightly more accurate than "test -f" to check for file precense.
16894   # It is also a way to make sure we got the proper file name for the real test later on.
16895   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16896   if test "x$test_shortpath" = x; then
16897     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&5
16898 $as_echo "$as_me: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&6;}
16899     as_fn_error $? "Cannot locate the the path of MSVCR_DLL" "$LINENO" 5
16900   fi
16901 
16902   # Call helper function which possibly converts this using DOS-style short mode.
16903   # If so, the updated path is stored in $new_path.
16904 
16905   input_path="$new_path"
16906   # Check if we need to convert this using DOS-style short mode. If the path
16907   # contains just simple characters, use it. Otherwise (spaces, weird characters),
16908   # take no chances and rewrite it.
16909   # Note: m4 eats our [], so we need to use [ and ] instead.
16910   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16911   if test "x$has_forbidden_chars" != x; then
16912     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16913     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16914     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16915     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16916       # Going to short mode and back again did indeed matter. Since short mode is
16917       # case insensitive, let's make it lowercase to improve readability.
16918       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16919       # Now convert it back to Unix-stile (cygpath)
16920       input_path=`$CYGPATH -u "$shortmode_path"`
16921       new_path="$input_path"
16922     fi
16923   fi
16924 
16925   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16926   if test "x$test_cygdrive_prefix" = x; then
16927     # As a simple fix, exclude /usr/bin since it's not a real path.
16928     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
16929       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16930       # a path prefixed by /cygdrive for fixpath to work.
16931       new_path="$CYGWIN_ROOT_PATH$input_path"
16932     fi
16933   fi
16934 
16935 
16936   if test "x$path" != "x$new_path"; then
16937     MSVCR_DLL="$new_path"
16938     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVCR_DLL to \"$new_path\"" >&5
16939 $as_echo "$as_me: Rewriting MSVCR_DLL to \"$new_path\"" >&6;}
16940   fi
16941 
16942   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16943 
16944   path="$MSVCR_DLL"
16945   has_colon=`$ECHO $path | $GREP ^.:`
16946   new_path="$path"
16947   if test "x$has_colon" = x; then
16948     # Not in mixed or Windows style, start by that.
16949     new_path=`cmd //c echo $path`
16950   fi
16951 
16952 
16953   input_path="$new_path"
16954   # Check if we need to convert this using DOS-style short mode. If the path
16955   # contains just simple characters, use it. Otherwise (spaces, weird characters),
16956   # take no chances and rewrite it.
16957   # Note: m4 eats our [], so we need to use [ and ] instead.
16958   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16959   if test "x$has_forbidden_chars" != x; then
16960     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16961     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16962   fi
16963 
16964 
16965   windows_path="$new_path"
16966   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16967     unix_path=`$CYGPATH -u "$windows_path"`
16968     new_path="$unix_path"
16969   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16970     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16971     new_path="$unix_path"
16972   fi
16973 
16974   if test "x$path" != "x$new_path"; then
16975     MSVCR_DLL="$new_path"
16976     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVCR_DLL to \"$new_path\"" >&5
16977 $as_echo "$as_me: Rewriting MSVCR_DLL to \"$new_path\"" >&6;}
16978   fi
16979 
16980   # Save the first 10 bytes of this path to the storage, so fixpath can work.
16981   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16982 
16983   else
16984     # We're on a posix platform. Hooray! :)
16985     path="$MSVCR_DLL"
16986 
16987     if test ! -f "$path" && test ! -d "$path"; then
16988       as_fn_error $? "The path of MSVCR_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
16989     fi
16990 
16991     has_space=`$ECHO "$path" | $GREP " "`
16992     if test "x$has_space" != x; then
16993       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&5
16994 $as_echo "$as_me: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&6;}
16995       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
16996     fi
16997   fi
16998 
16999 
17000 
17001 
17002 # Check whether --with-dxsdk was given.
17003 if test "${with_dxsdk+set}" = set; then :
17004   withval=$with_dxsdk;
17005 fi
17006 
17007 
17008 # Check whether --with-dxsdk-lib was given.
17009 if test "${with_dxsdk_lib+set}" = set; then :
17010   withval=$with_dxsdk_lib;
17011 fi
17012 
17013 
17014 # Check whether --with-dxsdk-include was given.
17015 if test "${with_dxsdk_include+set}" = set; then :
17016   withval=$with_dxsdk_include;
17017 fi
17018 
17019 
17020   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DirectX SDK" >&5
17021 $as_echo_n "checking for DirectX SDK... " >&6; }
17022 
17023   if test "x$with_dxsdk" != x; then
17024     dxsdk_path="$with_dxsdk"
17025   elif test "x$DXSDK_DIR" != x; then
17026     dxsdk_path="$DXSDK_DIR"
17027   elif test -d "C:/DXSDK"; then
17028     dxsdk_path="C:/DXSDK"
17029   else
17030     as_fn_error $? "Could not find the DirectX SDK" "$LINENO" 5
17031   fi
17032   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $dxsdk_path" >&5
17033 $as_echo "$dxsdk_path" >&6; }
17034 
17035   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17036 
17037   # Input might be given as Windows format, start by converting to
17038   # unix format.
17039   path="$dxsdk_path"
17040   new_path=`$CYGPATH -u "$path"`
17041 
17042   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17043   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17044   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17045   # "foo.exe" is OK but "foo" is an error.
17046   #
17047   # This test is therefore slightly more accurate than "test -f" to check for file precense.
17048   # It is also a way to make sure we got the proper file name for the real test later on.
17049   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17050   if test "x$test_shortpath" = x; then
17051     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of dxsdk_path, which resolves as \"$path\", is invalid." >&5
17052 $as_echo "$as_me: The path of dxsdk_path, which resolves as \"$path\", is invalid." >&6;}
17053     as_fn_error $? "Cannot locate the the path of dxsdk_path" "$LINENO" 5
17054   fi
17055 
17056   # Call helper function which possibly converts this using DOS-style short mode.
17057   # If so, the updated path is stored in $new_path.
17058 
17059   input_path="$new_path"
17060   # Check if we need to convert this using DOS-style short mode. If the path
17061   # contains just simple characters, use it. Otherwise (spaces, weird characters),
17062   # take no chances and rewrite it.
17063   # Note: m4 eats our [], so we need to use [ and ] instead.
17064   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17065   if test "x$has_forbidden_chars" != x; then
17066     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17067     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17068     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17069     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17070       # Going to short mode and back again did indeed matter. Since short mode is
17071       # case insensitive, let's make it lowercase to improve readability.
17072       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17073       # Now convert it back to Unix-stile (cygpath)
17074       input_path=`$CYGPATH -u "$shortmode_path"`
17075       new_path="$input_path"
17076     fi
17077   fi
17078 
17079   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17080   if test "x$test_cygdrive_prefix" = x; then
17081     # As a simple fix, exclude /usr/bin since it's not a real path.
17082     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
17083       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17084       # a path prefixed by /cygdrive for fixpath to work.
17085       new_path="$CYGWIN_ROOT_PATH$input_path"
17086     fi
17087   fi
17088 
17089 
17090   if test "x$path" != "x$new_path"; then
17091     dxsdk_path="$new_path"
17092     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting dxsdk_path to \"$new_path\"" >&5
17093 $as_echo "$as_me: Rewriting dxsdk_path to \"$new_path\"" >&6;}
17094   fi
17095 
17096   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17097 
17098   path="$dxsdk_path"
17099   has_colon=`$ECHO $path | $GREP ^.:`
17100   new_path="$path"
17101   if test "x$has_colon" = x; then
17102     # Not in mixed or Windows style, start by that.
17103     new_path=`cmd //c echo $path`
17104   fi
17105 
17106 
17107   input_path="$new_path"
17108   # Check if we need to convert this using DOS-style short mode. If the path
17109   # contains just simple characters, use it. Otherwise (spaces, weird characters),
17110   # take no chances and rewrite it.
17111   # Note: m4 eats our [], so we need to use [ and ] instead.
17112   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17113   if test "x$has_forbidden_chars" != x; then
17114     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17115     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17116   fi
17117 
17118 
17119   windows_path="$new_path"
17120   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17121     unix_path=`$CYGPATH -u "$windows_path"`
17122     new_path="$unix_path"
17123   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17124     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17125     new_path="$unix_path"
17126   fi
17127 
17128   if test "x$path" != "x$new_path"; then
17129     dxsdk_path="$new_path"
17130     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting dxsdk_path to \"$new_path\"" >&5
17131 $as_echo "$as_me: Rewriting dxsdk_path to \"$new_path\"" >&6;}
17132   fi
17133 
17134   # Save the first 10 bytes of this path to the storage, so fixpath can work.
17135   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17136 
17137   else
17138     # We're on a posix platform. Hooray! :)
17139     path="$dxsdk_path"
17140 
17141     if test ! -f "$path" && test ! -d "$path"; then
17142       as_fn_error $? "The path of dxsdk_path, which resolves as \"$path\", is not found." "$LINENO" 5
17143     fi
17144 
17145     has_space=`$ECHO "$path" | $GREP " "`
17146     if test "x$has_space" != x; then
17147       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of dxsdk_path, which resolves as \"$path\", is invalid." >&5
17148 $as_echo "$as_me: The path of dxsdk_path, which resolves as \"$path\", is invalid." >&6;}
17149       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
17150     fi
17151   fi
17152 
17153 
17154   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DirectX SDK lib dir" >&5
17155 $as_echo_n "checking for DirectX SDK lib dir... " >&6; }
17156   if test "x$with_dxsdk_lib" != x; then
17157     DXSDK_LIB_PATH="$with_dxsdk_lib"
17158   elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
17159     DXSDK_LIB_PATH="$dxsdk_path/Lib/x64"
17160   else
17161     DXSDK_LIB_PATH="$dxsdk_path/Lib"
17162   fi
17163   # dsound.lib is linked to in jsoundds
17164   if test ! -f "$DXSDK_LIB_PATH/dsound.lib"; then
17165     as_fn_error $? "Invalid DirectX SDK lib dir" "$LINENO" 5
17166   fi
17167   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DXSDK_LIB_PATH" >&5
17168 $as_echo "$DXSDK_LIB_PATH" >&6; }
17169 
17170   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17171 
17172   # Input might be given as Windows format, start by converting to
17173   # unix format.
17174   path="$DXSDK_LIB_PATH"
17175   new_path=`$CYGPATH -u "$path"`
17176 
17177   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17178   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17179   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17180   # "foo.exe" is OK but "foo" is an error.
17181   #
17182   # This test is therefore slightly more accurate than "test -f" to check for file precense.
17183   # It is also a way to make sure we got the proper file name for the real test later on.
17184   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17185   if test "x$test_shortpath" = x; then
17186     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DXSDK_LIB_PATH, which resolves as \"$path\", is invalid." >&5
17187 $as_echo "$as_me: The path of DXSDK_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
17188     as_fn_error $? "Cannot locate the the path of DXSDK_LIB_PATH" "$LINENO" 5
17189   fi
17190 
17191   # Call helper function which possibly converts this using DOS-style short mode.
17192   # If so, the updated path is stored in $new_path.
17193 
17194   input_path="$new_path"
17195   # Check if we need to convert this using DOS-style short mode. If the path
17196   # contains just simple characters, use it. Otherwise (spaces, weird characters),
17197   # take no chances and rewrite it.
17198   # Note: m4 eats our [], so we need to use [ and ] instead.
17199   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17200   if test "x$has_forbidden_chars" != x; then
17201     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17202     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17203     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17204     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17205       # Going to short mode and back again did indeed matter. Since short mode is
17206       # case insensitive, let's make it lowercase to improve readability.
17207       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17208       # Now convert it back to Unix-stile (cygpath)
17209       input_path=`$CYGPATH -u "$shortmode_path"`
17210       new_path="$input_path"
17211     fi
17212   fi
17213 
17214   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17215   if test "x$test_cygdrive_prefix" = x; then
17216     # As a simple fix, exclude /usr/bin since it's not a real path.
17217     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
17218       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17219       # a path prefixed by /cygdrive for fixpath to work.
17220       new_path="$CYGWIN_ROOT_PATH$input_path"
17221     fi
17222   fi
17223 
17224 
17225   if test "x$path" != "x$new_path"; then
17226     DXSDK_LIB_PATH="$new_path"
17227     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DXSDK_LIB_PATH to \"$new_path\"" >&5
17228 $as_echo "$as_me: Rewriting DXSDK_LIB_PATH to \"$new_path\"" >&6;}
17229   fi
17230 
17231   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17232 
17233   path="$DXSDK_LIB_PATH"
17234   has_colon=`$ECHO $path | $GREP ^.:`
17235   new_path="$path"
17236   if test "x$has_colon" = x; then
17237     # Not in mixed or Windows style, start by that.
17238     new_path=`cmd //c echo $path`
17239   fi
17240 
17241 
17242   input_path="$new_path"
17243   # Check if we need to convert this using DOS-style short mode. If the path
17244   # contains just simple characters, use it. Otherwise (spaces, weird characters),
17245   # take no chances and rewrite it.
17246   # Note: m4 eats our [], so we need to use [ and ] instead.
17247   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17248   if test "x$has_forbidden_chars" != x; then
17249     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17250     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17251   fi
17252 
17253 
17254   windows_path="$new_path"
17255   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17256     unix_path=`$CYGPATH -u "$windows_path"`
17257     new_path="$unix_path"
17258   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17259     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17260     new_path="$unix_path"
17261   fi
17262 
17263   if test "x$path" != "x$new_path"; then
17264     DXSDK_LIB_PATH="$new_path"
17265     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DXSDK_LIB_PATH to \"$new_path\"" >&5
17266 $as_echo "$as_me: Rewriting DXSDK_LIB_PATH to \"$new_path\"" >&6;}
17267   fi
17268 
17269   # Save the first 10 bytes of this path to the storage, so fixpath can work.
17270   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17271 
17272   else
17273     # We're on a posix platform. Hooray! :)
17274     path="$DXSDK_LIB_PATH"
17275 
17276     if test ! -f "$path" && test ! -d "$path"; then
17277       as_fn_error $? "The path of DXSDK_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
17278     fi
17279 
17280     has_space=`$ECHO "$path" | $GREP " "`
17281     if test "x$has_space" != x; then
17282       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DXSDK_LIB_PATH, which resolves as \"$path\", is invalid." >&5
17283 $as_echo "$as_me: The path of DXSDK_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
17284       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
17285     fi
17286   fi
17287 
17288 
17289   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DirectX SDK include dir" >&5
17290 $as_echo_n "checking for DirectX SDK include dir... " >&6; }
17291   if test "x$with_dxsdk_include" != x; then
17292     DXSDK_INCLUDE_PATH="$with_dxsdk_include"
17293   else
17294     DXSDK_INCLUDE_PATH="$dxsdk_path/Include"
17295   fi
17296   # dsound.h is included in jsoundds
17297   if test ! -f "$DXSDK_INCLUDE_PATH/dsound.h"; then
17298     as_fn_error $? "Invalid DirectX SDK lib dir" "$LINENO" 5
17299   fi
17300   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DXSDK_INCLUDE_PATH" >&5
17301 $as_echo "$DXSDK_INCLUDE_PATH" >&6; }
17302 
17303   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17304 
17305   # Input might be given as Windows format, start by converting to
17306   # unix format.
17307   path="$DXSDK_INCLUDE_PATH"
17308   new_path=`$CYGPATH -u "$path"`
17309 
17310   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17311   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17312   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17313   # "foo.exe" is OK but "foo" is an error.
17314   #
17315   # This test is therefore slightly more accurate than "test -f" to check for file precense.
17316   # It is also a way to make sure we got the proper file name for the real test later on.
17317   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17318   if test "x$test_shortpath" = x; then
17319     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DXSDK_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
17320 $as_echo "$as_me: The path of DXSDK_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
17321     as_fn_error $? "Cannot locate the the path of DXSDK_INCLUDE_PATH" "$LINENO" 5
17322   fi
17323 
17324   # Call helper function which possibly converts this using DOS-style short mode.
17325   # If so, the updated path is stored in $new_path.
17326 
17327   input_path="$new_path"
17328   # Check if we need to convert this using DOS-style short mode. If the path
17329   # contains just simple characters, use it. Otherwise (spaces, weird characters),
17330   # take no chances and rewrite it.
17331   # Note: m4 eats our [], so we need to use [ and ] instead.
17332   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17333   if test "x$has_forbidden_chars" != x; then
17334     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17335     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17336     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17337     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17338       # Going to short mode and back again did indeed matter. Since short mode is
17339       # case insensitive, let's make it lowercase to improve readability.
17340       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17341       # Now convert it back to Unix-stile (cygpath)
17342       input_path=`$CYGPATH -u "$shortmode_path"`
17343       new_path="$input_path"
17344     fi
17345   fi
17346 
17347   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17348   if test "x$test_cygdrive_prefix" = x; then
17349     # As a simple fix, exclude /usr/bin since it's not a real path.
17350     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
17351       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17352       # a path prefixed by /cygdrive for fixpath to work.
17353       new_path="$CYGWIN_ROOT_PATH$input_path"
17354     fi
17355   fi
17356 
17357 
17358   if test "x$path" != "x$new_path"; then
17359     DXSDK_INCLUDE_PATH="$new_path"
17360     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DXSDK_INCLUDE_PATH to \"$new_path\"" >&5
17361 $as_echo "$as_me: Rewriting DXSDK_INCLUDE_PATH to \"$new_path\"" >&6;}
17362   fi
17363 
17364   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17365 
17366   path="$DXSDK_INCLUDE_PATH"
17367   has_colon=`$ECHO $path | $GREP ^.:`
17368   new_path="$path"
17369   if test "x$has_colon" = x; then
17370     # Not in mixed or Windows style, start by that.
17371     new_path=`cmd //c echo $path`
17372   fi
17373 
17374 
17375   input_path="$new_path"
17376   # Check if we need to convert this using DOS-style short mode. If the path
17377   # contains just simple characters, use it. Otherwise (spaces, weird characters),
17378   # take no chances and rewrite it.
17379   # Note: m4 eats our [], so we need to use [ and ] instead.
17380   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17381   if test "x$has_forbidden_chars" != x; then
17382     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17383     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17384   fi
17385 
17386 
17387   windows_path="$new_path"
17388   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17389     unix_path=`$CYGPATH -u "$windows_path"`
17390     new_path="$unix_path"
17391   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17392     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17393     new_path="$unix_path"
17394   fi
17395 
17396   if test "x$path" != "x$new_path"; then
17397     DXSDK_INCLUDE_PATH="$new_path"
17398     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DXSDK_INCLUDE_PATH to \"$new_path\"" >&5
17399 $as_echo "$as_me: Rewriting DXSDK_INCLUDE_PATH to \"$new_path\"" >&6;}
17400   fi
17401 
17402   # Save the first 10 bytes of this path to the storage, so fixpath can work.
17403   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17404 
17405   else
17406     # We're on a posix platform. Hooray! :)
17407     path="$DXSDK_INCLUDE_PATH"
17408 
17409     if test ! -f "$path" && test ! -d "$path"; then
17410       as_fn_error $? "The path of DXSDK_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
17411     fi
17412 
17413     has_space=`$ECHO "$path" | $GREP " "`
17414     if test "x$has_space" != x; then
17415       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DXSDK_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
17416 $as_echo "$as_me: The path of DXSDK_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
17417       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
17418     fi
17419   fi
17420 
17421 
17422 
17423 
17424   LDFLAGS_JDK="$LDFLAGS_JDK -libpath:$DXSDK_LIB_PATH"
17425 
17426 fi
17427 
17428 
17429 
17430 # If --build AND --host is set, then the configure script will find any
17431 # cross compilation tools in the PATH. Cross compilation tools
17432 # follows the cross compilation standard where they are prefixed with ${host}.
17433 # For example the binary i686-sun-solaris2.10-gcc
17434 # will cross compile for i686-sun-solaris2.10
17435 # If neither of build and host is not set, then build=host and the
17436 # default compiler found in the path will be used.
17437 # Setting only --host, does not seem to be really supported.
17438 # Please set both --build and --host if you want to cross compile.
17439 
17440 if test "x$COMPILE_TYPE" = "xcross"; then
17441     # Now we to find a C/C++ compiler that can build executables for the build
17442     # platform. We can't use the AC_PROG_CC macro, since it can only be used
17443     # once. Also, we need to do this before adding a tools dir to the path,
17444     # otherwise we might pick up cross-compilers which don't use standard naming.
17445     # Otherwise, we'll set the BUILD_tools to the native tools, but that'll have
17446     # to wait until they are properly discovered.
17447     for ac_prog in cl cc gcc
17448 do
17449   # Extract the first word of "$ac_prog", so it can be a program name with args.
17450 set dummy $ac_prog; ac_word=$2
17451 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17452 $as_echo_n "checking for $ac_word... " >&6; }
17453 if ${ac_cv_path_BUILD_CC+:} false; then :
17454   $as_echo_n "(cached) " >&6
17455 else
17456   case $BUILD_CC in
17457   [\\/]* | ?:[\\/]*)
17458   ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
17459   ;;
17460   *)
17461   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17462 for as_dir in $PATH
17463 do
17464   IFS=$as_save_IFS
17465   test -z "$as_dir" && as_dir=.
17466     for ac_exec_ext in '' $ac_executable_extensions; do
17467   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
17468     ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
17469     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17470     break 2
17471   fi
17472 done
17473   done
17474 IFS=$as_save_IFS
17475 
17476   ;;
17477 esac
17478 fi
17479 BUILD_CC=$ac_cv_path_BUILD_CC
17480 if test -n "$BUILD_CC"; then
17481   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
17482 $as_echo "$BUILD_CC" >&6; }
17483 else
17484   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17485 $as_echo "no" >&6; }
17486 fi
17487 
17488 
17489   test -n "$BUILD_CC" && break
17490 done
17491 
17492 
17493   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17494 
17495   # First separate the path from the arguments. This will split at the first
17496   # space.
17497   complete="$BUILD_CC"
17498   path="${complete%% *}"
17499   tmp="$complete EOL"
17500   arguments="${tmp#* }"
17501 
17502   # Input might be given as Windows format, start by converting to
17503   # unix format.
17504   new_path=`$CYGPATH -u "$path"`
17505 
17506   # Now try to locate executable using which
17507   new_path=`$WHICH "$new_path" 2> /dev/null`
17508   # bat and cmd files are not always considered executable in cygwin causing which
17509   # to not find them
17510   if test "x$new_path" = x \
17511            && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17512            && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17513     new_path=`$CYGPATH -u "$path"`
17514   fi
17515   if test "x$new_path" = x; then
17516     # Oops. Which didn't find the executable.
17517     # The splitting of arguments from the executable at a space might have been incorrect,
17518     # since paths with space are more likely in Windows. Give it another try with the whole
17519     # argument.
17520     path="$complete"
17521     arguments="EOL"
17522     new_path=`$CYGPATH -u "$path"`
17523     new_path=`$WHICH "$new_path" 2> /dev/null`
17524     # bat and cmd files are not always considered executable in cygwin causing which
17525     # to not find them
17526     if test "x$new_path" = x \
17527              && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17528              && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17529       new_path=`$CYGPATH -u "$path"`
17530     fi
17531     if test "x$new_path" = x; then
17532       # It's still not found. Now this is an unrecoverable error.
17533       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
17534 $as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
17535       has_space=`$ECHO "$complete" | $GREP " "`
17536       if test "x$has_space" != x; then
17537         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17538 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17539       fi
17540       as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
17541     fi
17542   fi
17543 
17544   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17545   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17546   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17547   # "foo.exe" is OK but "foo" is an error.
17548   #
17549   # This test is therefore slightly more accurate than "test -f" to check for file precense.
17550   # It is also a way to make sure we got the proper file name for the real test later on.
17551   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17552   if test "x$test_shortpath" = x; then
17553     # Short path failed, file does not exist as specified.
17554     # Try adding .exe or .cmd
17555     if test -f "${new_path}.exe"; then
17556        input_to_shortpath="${new_path}.exe"
17557     elif test -f "${new_path}.cmd"; then
17558        input_to_shortpath="${new_path}.cmd"
17559     else
17560       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&5
17561 $as_echo "$as_me: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&6;}
17562       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
17563 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
17564       as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
17565     fi
17566   else
17567     input_to_shortpath="$new_path"
17568   fi
17569 
17570   # Call helper function which possibly converts this using DOS-style short mode.
17571   # If so, the updated path is stored in $new_path.
17572   new_path="$input_to_shortpath"
17573 
17574   input_path="$input_to_shortpath"
17575   # Check if we need to convert this using DOS-style short mode. If the path
17576   # contains just simple characters, use it. Otherwise (spaces, weird characters),
17577   # take no chances and rewrite it.
17578   # Note: m4 eats our [], so we need to use [ and ] instead.
17579   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17580   if test "x$has_forbidden_chars" != x; then
17581     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17582     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17583     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17584     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17585       # Going to short mode and back again did indeed matter. Since short mode is
17586       # case insensitive, let's make it lowercase to improve readability.
17587       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17588       # Now convert it back to Unix-stile (cygpath)
17589       input_path=`$CYGPATH -u "$shortmode_path"`
17590       new_path="$input_path"
17591     fi
17592   fi
17593 
17594   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17595   if test "x$test_cygdrive_prefix" = x; then
17596     # As a simple fix, exclude /usr/bin since it's not a real path.
17597     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
17598       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17599       # a path prefixed by /cygdrive for fixpath to work.
17600       new_path="$CYGWIN_ROOT_PATH$input_path"
17601     fi
17602   fi
17603 
17604   # remove trailing .exe if any
17605   new_path="${new_path/%.exe/}"
17606 
17607   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17608 
17609   # First separate the path from the arguments. This will split at the first
17610   # space.
17611   complete="$BUILD_CC"
17612   path="${complete%% *}"
17613   tmp="$complete EOL"
17614   arguments="${tmp#* }"
17615 
17616   # Input might be given as Windows format, start by converting to
17617   # unix format.
17618   new_path="$path"
17619 
17620   windows_path="$new_path"
17621   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17622     unix_path=`$CYGPATH -u "$windows_path"`
17623     new_path="$unix_path"
17624   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17625     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17626     new_path="$unix_path"
17627   fi
17628 
17629 
17630   # Now try to locate executable using which
17631   new_path=`$WHICH "$new_path" 2> /dev/null`
17632 
17633   if test "x$new_path" = x; then
17634     # Oops. Which didn't find the executable.
17635     # The splitting of arguments from the executable at a space might have been incorrect,
17636     # since paths with space are more likely in Windows. Give it another try with the whole
17637     # argument.
17638     path="$complete"
17639     arguments="EOL"
17640     new_path="$path"
17641 
17642   windows_path="$new_path"
17643   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17644     unix_path=`$CYGPATH -u "$windows_path"`
17645     new_path="$unix_path"
17646   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17647     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17648     new_path="$unix_path"
17649   fi
17650 
17651 
17652     new_path=`$WHICH "$new_path" 2> /dev/null`
17653 
17654     if test "x$new_path" = x; then
17655       # It's still not found. Now this is an unrecoverable error.
17656       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
17657 $as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
17658       has_space=`$ECHO "$complete" | $GREP " "`
17659       if test "x$has_space" != x; then
17660         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17661 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17662       fi
17663       as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
17664     fi
17665   fi
17666 
17667   # Now new_path has a complete unix path to the binary
17668   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
17669     # Keep paths in /bin as-is, but remove trailing .exe if any
17670     new_path="${new_path/%.exe/}"
17671     # Do not save /bin paths to all_fixpath_prefixes!
17672   else
17673     # Not in mixed or Windows style, start by that.
17674     new_path=`cmd //c echo $new_path`
17675 
17676   input_path="$new_path"
17677   # Check if we need to convert this using DOS-style short mode. If the path
17678   # contains just simple characters, use it. Otherwise (spaces, weird characters),
17679   # take no chances and rewrite it.
17680   # Note: m4 eats our [], so we need to use [ and ] instead.
17681   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17682   if test "x$has_forbidden_chars" != x; then
17683     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17684     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17685   fi
17686 
17687     # Output is in $new_path
17688 
17689   windows_path="$new_path"
17690   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17691     unix_path=`$CYGPATH -u "$windows_path"`
17692     new_path="$unix_path"
17693   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17694     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17695     new_path="$unix_path"
17696   fi
17697 
17698     # remove trailing .exe if any
17699     new_path="${new_path/%.exe/}"
17700 
17701     # Save the first 10 bytes of this path to the storage, so fixpath can work.
17702     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17703   fi
17704 
17705   else
17706     # We're on a posix platform. Hooray! :)
17707     # First separate the path from the arguments. This will split at the first
17708     # space.
17709     complete="$BUILD_CC"
17710     path="${complete%% *}"
17711     tmp="$complete EOL"
17712     arguments="${tmp#* }"
17713 
17714     # Cannot rely on the command "which" here since it doesn't always work.
17715     is_absolute_path=`$ECHO "$path" | $GREP ^/`
17716     if test -z "$is_absolute_path"; then
17717       # Path to executable is not absolute. Find it.
17718       IFS_save="$IFS"
17719       IFS=:
17720       for p in $PATH; do
17721         if test -f "$p/$path" && test -x "$p/$path"; then
17722           new_path="$p/$path"
17723           break
17724         fi
17725       done
17726       IFS="$IFS_save"
17727     else
17728       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving BUILD_CC (as $path) failed, using $path directly." >&5
17729 $as_echo "$as_me: Resolving BUILD_CC (as $path) failed, using $path directly." >&6;}
17730       new_path="$path"
17731     fi
17732 
17733     if test "x$new_path" = x; then
17734         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
17735 $as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
17736         has_space=`$ECHO "$complete" | $GREP " "`
17737         if test "x$has_space" != x; then
17738           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
17739 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
17740         fi
17741         as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
17742       fi
17743   fi
17744 
17745       # Now join together the path and the arguments once again
17746       if test "x$arguments" != xEOL; then
17747         new_complete="$new_path ${arguments% *}"
17748       else
17749         new_complete="$new_path"
17750       fi
17751 
17752   if test "x$complete" != "x$new_complete"; then
17753       BUILD_CC="$new_complete"
17754       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CC to \"$new_complete\"" >&5
17755 $as_echo "$as_me: Rewriting BUILD_CC to \"$new_complete\"" >&6;}
17756     fi
17757 
17758     for ac_prog in cl CC g++
17759 do
17760   # Extract the first word of "$ac_prog", so it can be a program name with args.
17761 set dummy $ac_prog; ac_word=$2
17762 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17763 $as_echo_n "checking for $ac_word... " >&6; }
17764 if ${ac_cv_path_BUILD_CXX+:} false; then :
17765   $as_echo_n "(cached) " >&6
17766 else
17767   case $BUILD_CXX in
17768   [\\/]* | ?:[\\/]*)
17769   ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
17770   ;;
17771   *)
17772   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17773 for as_dir in $PATH
17774 do
17775   IFS=$as_save_IFS
17776   test -z "$as_dir" && as_dir=.
17777     for ac_exec_ext in '' $ac_executable_extensions; do
17778   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
17779     ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
17780     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17781     break 2
17782   fi
17783 done
17784   done
17785 IFS=$as_save_IFS
17786 
17787   ;;
17788 esac
17789 fi
17790 BUILD_CXX=$ac_cv_path_BUILD_CXX
17791 if test -n "$BUILD_CXX"; then
17792   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
17793 $as_echo "$BUILD_CXX" >&6; }
17794 else
17795   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17796 $as_echo "no" >&6; }
17797 fi
17798 
17799 
17800   test -n "$BUILD_CXX" && break
17801 done
17802 
17803 
17804   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17805 
17806   # First separate the path from the arguments. This will split at the first
17807   # space.
17808   complete="$BUILD_CXX"
17809   path="${complete%% *}"
17810   tmp="$complete EOL"
17811   arguments="${tmp#* }"
17812 
17813   # Input might be given as Windows format, start by converting to
17814   # unix format.
17815   new_path=`$CYGPATH -u "$path"`
17816 
17817   # Now try to locate executable using which
17818   new_path=`$WHICH "$new_path" 2> /dev/null`
17819   # bat and cmd files are not always considered executable in cygwin causing which
17820   # to not find them
17821   if test "x$new_path" = x \
17822            && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17823            && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17824     new_path=`$CYGPATH -u "$path"`
17825   fi
17826   if test "x$new_path" = x; then
17827     # Oops. Which didn't find the executable.
17828     # The splitting of arguments from the executable at a space might have been incorrect,
17829     # since paths with space are more likely in Windows. Give it another try with the whole
17830     # argument.
17831     path="$complete"
17832     arguments="EOL"
17833     new_path=`$CYGPATH -u "$path"`
17834     new_path=`$WHICH "$new_path" 2> /dev/null`
17835     # bat and cmd files are not always considered executable in cygwin causing which
17836     # to not find them
17837     if test "x$new_path" = x \
17838              && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17839              && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17840       new_path=`$CYGPATH -u "$path"`
17841     fi
17842     if test "x$new_path" = x; then
17843       # It's still not found. Now this is an unrecoverable error.
17844       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
17845 $as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
17846       has_space=`$ECHO "$complete" | $GREP " "`
17847       if test "x$has_space" != x; then
17848         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17849 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17850       fi
17851       as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
17852     fi
17853   fi
17854 
17855   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17856   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17857   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17858   # "foo.exe" is OK but "foo" is an error.
17859   #
17860   # This test is therefore slightly more accurate than "test -f" to check for file precense.
17861   # It is also a way to make sure we got the proper file name for the real test later on.
17862   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17863   if test "x$test_shortpath" = x; then
17864     # Short path failed, file does not exist as specified.
17865     # Try adding .exe or .cmd
17866     if test -f "${new_path}.exe"; then
17867        input_to_shortpath="${new_path}.exe"
17868     elif test -f "${new_path}.cmd"; then
17869        input_to_shortpath="${new_path}.cmd"
17870     else
17871       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&5
17872 $as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&6;}
17873       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
17874 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
17875       as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
17876     fi
17877   else
17878     input_to_shortpath="$new_path"
17879   fi
17880 
17881   # Call helper function which possibly converts this using DOS-style short mode.
17882   # If so, the updated path is stored in $new_path.
17883   new_path="$input_to_shortpath"
17884 
17885   input_path="$input_to_shortpath"
17886   # Check if we need to convert this using DOS-style short mode. If the path
17887   # contains just simple characters, use it. Otherwise (spaces, weird characters),
17888   # take no chances and rewrite it.
17889   # Note: m4 eats our [], so we need to use [ and ] instead.
17890   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17891   if test "x$has_forbidden_chars" != x; then
17892     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17893     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17894     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17895     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17896       # Going to short mode and back again did indeed matter. Since short mode is
17897       # case insensitive, let's make it lowercase to improve readability.
17898       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17899       # Now convert it back to Unix-stile (cygpath)
17900       input_path=`$CYGPATH -u "$shortmode_path"`
17901       new_path="$input_path"
17902     fi
17903   fi
17904 
17905   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17906   if test "x$test_cygdrive_prefix" = x; then
17907     # As a simple fix, exclude /usr/bin since it's not a real path.
17908     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
17909       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17910       # a path prefixed by /cygdrive for fixpath to work.
17911       new_path="$CYGWIN_ROOT_PATH$input_path"
17912     fi
17913   fi
17914 
17915   # remove trailing .exe if any
17916   new_path="${new_path/%.exe/}"
17917 
17918   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17919 
17920   # First separate the path from the arguments. This will split at the first
17921   # space.
17922   complete="$BUILD_CXX"
17923   path="${complete%% *}"
17924   tmp="$complete EOL"
17925   arguments="${tmp#* }"
17926 
17927   # Input might be given as Windows format, start by converting to
17928   # unix format.
17929   new_path="$path"
17930 
17931   windows_path="$new_path"
17932   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17933     unix_path=`$CYGPATH -u "$windows_path"`
17934     new_path="$unix_path"
17935   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17936     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17937     new_path="$unix_path"
17938   fi
17939 
17940 
17941   # Now try to locate executable using which
17942   new_path=`$WHICH "$new_path" 2> /dev/null`
17943 
17944   if test "x$new_path" = x; then
17945     # Oops. Which didn't find the executable.
17946     # The splitting of arguments from the executable at a space might have been incorrect,
17947     # since paths with space are more likely in Windows. Give it another try with the whole
17948     # argument.
17949     path="$complete"
17950     arguments="EOL"
17951     new_path="$path"
17952 
17953   windows_path="$new_path"
17954   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17955     unix_path=`$CYGPATH -u "$windows_path"`
17956     new_path="$unix_path"
17957   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17958     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17959     new_path="$unix_path"
17960   fi
17961 
17962 
17963     new_path=`$WHICH "$new_path" 2> /dev/null`
17964 
17965     if test "x$new_path" = x; then
17966       # It's still not found. Now this is an unrecoverable error.
17967       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
17968 $as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
17969       has_space=`$ECHO "$complete" | $GREP " "`
17970       if test "x$has_space" != x; then
17971         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17972 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17973       fi
17974       as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
17975     fi
17976   fi
17977 
17978   # Now new_path has a complete unix path to the binary
17979   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
17980     # Keep paths in /bin as-is, but remove trailing .exe if any
17981     new_path="${new_path/%.exe/}"
17982     # Do not save /bin paths to all_fixpath_prefixes!
17983   else
17984     # Not in mixed or Windows style, start by that.
17985     new_path=`cmd //c echo $new_path`
17986 
17987   input_path="$new_path"
17988   # Check if we need to convert this using DOS-style short mode. If the path
17989   # contains just simple characters, use it. Otherwise (spaces, weird characters),
17990   # take no chances and rewrite it.
17991   # Note: m4 eats our [], so we need to use [ and ] instead.
17992   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17993   if test "x$has_forbidden_chars" != x; then
17994     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17995     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17996   fi
17997 
17998     # Output is in $new_path
17999 
18000   windows_path="$new_path"
18001   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18002     unix_path=`$CYGPATH -u "$windows_path"`
18003     new_path="$unix_path"
18004   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18005     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18006     new_path="$unix_path"
18007   fi
18008 
18009     # remove trailing .exe if any
18010     new_path="${new_path/%.exe/}"
18011 
18012     # Save the first 10 bytes of this path to the storage, so fixpath can work.
18013     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18014   fi
18015 
18016   else
18017     # We're on a posix platform. Hooray! :)
18018     # First separate the path from the arguments. This will split at the first
18019     # space.
18020     complete="$BUILD_CXX"
18021     path="${complete%% *}"
18022     tmp="$complete EOL"
18023     arguments="${tmp#* }"
18024 
18025     # Cannot rely on the command "which" here since it doesn't always work.
18026     is_absolute_path=`$ECHO "$path" | $GREP ^/`
18027     if test -z "$is_absolute_path"; then
18028       # Path to executable is not absolute. Find it.
18029       IFS_save="$IFS"
18030       IFS=:
18031       for p in $PATH; do
18032         if test -f "$p/$path" && test -x "$p/$path"; then
18033           new_path="$p/$path"
18034           break
18035         fi
18036       done
18037       IFS="$IFS_save"
18038     else
18039       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving BUILD_CXX (as $path) failed, using $path directly." >&5
18040 $as_echo "$as_me: Resolving BUILD_CXX (as $path) failed, using $path directly." >&6;}
18041       new_path="$path"
18042     fi
18043 
18044     if test "x$new_path" = x; then
18045         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
18046 $as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
18047         has_space=`$ECHO "$complete" | $GREP " "`
18048         if test "x$has_space" != x; then
18049           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18050 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18051         fi
18052         as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
18053       fi
18054   fi
18055 
18056       # Now join together the path and the arguments once again
18057       if test "x$arguments" != xEOL; then
18058         new_complete="$new_path ${arguments% *}"
18059       else
18060         new_complete="$new_path"
18061       fi
18062 
18063   if test "x$complete" != "x$new_complete"; then
18064       BUILD_CXX="$new_complete"
18065       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CXX to \"$new_complete\"" >&5
18066 $as_echo "$as_me: Rewriting BUILD_CXX to \"$new_complete\"" >&6;}
18067     fi
18068 
18069     # Extract the first word of "ld", so it can be a program name with args.
18070 set dummy ld; ac_word=$2
18071 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18072 $as_echo_n "checking for $ac_word... " >&6; }
18073 if ${ac_cv_path_BUILD_LD+:} false; then :
18074   $as_echo_n "(cached) " >&6
18075 else
18076   case $BUILD_LD in
18077   [\\/]* | ?:[\\/]*)
18078   ac_cv_path_BUILD_LD="$BUILD_LD" # Let the user override the test with a path.
18079   ;;
18080   *)
18081   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18082 for as_dir in $PATH
18083 do
18084   IFS=$as_save_IFS
18085   test -z "$as_dir" && as_dir=.
18086     for ac_exec_ext in '' $ac_executable_extensions; do
18087   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
18088     ac_cv_path_BUILD_LD="$as_dir/$ac_word$ac_exec_ext"
18089     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18090     break 2
18091   fi
18092 done
18093   done
18094 IFS=$as_save_IFS
18095 
18096   ;;
18097 esac
18098 fi
18099 BUILD_LD=$ac_cv_path_BUILD_LD
18100 if test -n "$BUILD_LD"; then
18101   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_LD" >&5
18102 $as_echo "$BUILD_LD" >&6; }
18103 else
18104   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18105 $as_echo "no" >&6; }
18106 fi
18107 
18108 
18109 
18110   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18111 
18112   # First separate the path from the arguments. This will split at the first
18113   # space.
18114   complete="$BUILD_LD"
18115   path="${complete%% *}"
18116   tmp="$complete EOL"
18117   arguments="${tmp#* }"
18118 
18119   # Input might be given as Windows format, start by converting to
18120   # unix format.
18121   new_path=`$CYGPATH -u "$path"`
18122 
18123   # Now try to locate executable using which
18124   new_path=`$WHICH "$new_path" 2> /dev/null`
18125   # bat and cmd files are not always considered executable in cygwin causing which
18126   # to not find them
18127   if test "x$new_path" = x \
18128            && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18129            && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18130     new_path=`$CYGPATH -u "$path"`
18131   fi
18132   if test "x$new_path" = x; then
18133     # Oops. Which didn't find the executable.
18134     # The splitting of arguments from the executable at a space might have been incorrect,
18135     # since paths with space are more likely in Windows. Give it another try with the whole
18136     # argument.
18137     path="$complete"
18138     arguments="EOL"
18139     new_path=`$CYGPATH -u "$path"`
18140     new_path=`$WHICH "$new_path" 2> /dev/null`
18141     # bat and cmd files are not always considered executable in cygwin causing which
18142     # to not find them
18143     if test "x$new_path" = x \
18144              && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18145              && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18146       new_path=`$CYGPATH -u "$path"`
18147     fi
18148     if test "x$new_path" = x; then
18149       # It's still not found. Now this is an unrecoverable error.
18150       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
18151 $as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
18152       has_space=`$ECHO "$complete" | $GREP " "`
18153       if test "x$has_space" != x; then
18154         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18155 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18156       fi
18157       as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
18158     fi
18159   fi
18160 
18161   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18162   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18163   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18164   # "foo.exe" is OK but "foo" is an error.
18165   #
18166   # This test is therefore slightly more accurate than "test -f" to check for file precense.
18167   # It is also a way to make sure we got the proper file name for the real test later on.
18168   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18169   if test "x$test_shortpath" = x; then
18170     # Short path failed, file does not exist as specified.
18171     # Try adding .exe or .cmd
18172     if test -f "${new_path}.exe"; then
18173        input_to_shortpath="${new_path}.exe"
18174     elif test -f "${new_path}.cmd"; then
18175        input_to_shortpath="${new_path}.cmd"
18176     else
18177       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$new_path\", is invalid." >&5
18178 $as_echo "$as_me: The path of BUILD_LD, which resolves as \"$new_path\", is invalid." >&6;}
18179       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18180 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18181       as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
18182     fi
18183   else
18184     input_to_shortpath="$new_path"
18185   fi
18186 
18187   # Call helper function which possibly converts this using DOS-style short mode.
18188   # If so, the updated path is stored in $new_path.
18189   new_path="$input_to_shortpath"
18190 
18191   input_path="$input_to_shortpath"
18192   # Check if we need to convert this using DOS-style short mode. If the path
18193   # contains just simple characters, use it. Otherwise (spaces, weird characters),
18194   # take no chances and rewrite it.
18195   # Note: m4 eats our [], so we need to use [ and ] instead.
18196   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18197   if test "x$has_forbidden_chars" != x; then
18198     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18199     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18200     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18201     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18202       # Going to short mode and back again did indeed matter. Since short mode is
18203       # case insensitive, let's make it lowercase to improve readability.
18204       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18205       # Now convert it back to Unix-stile (cygpath)
18206       input_path=`$CYGPATH -u "$shortmode_path"`
18207       new_path="$input_path"
18208     fi
18209   fi
18210 
18211   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18212   if test "x$test_cygdrive_prefix" = x; then
18213     # As a simple fix, exclude /usr/bin since it's not a real path.
18214     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18215       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18216       # a path prefixed by /cygdrive for fixpath to work.
18217       new_path="$CYGWIN_ROOT_PATH$input_path"
18218     fi
18219   fi
18220 
18221   # remove trailing .exe if any
18222   new_path="${new_path/%.exe/}"
18223 
18224   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18225 
18226   # First separate the path from the arguments. This will split at the first
18227   # space.
18228   complete="$BUILD_LD"
18229   path="${complete%% *}"
18230   tmp="$complete EOL"
18231   arguments="${tmp#* }"
18232 
18233   # Input might be given as Windows format, start by converting to
18234   # unix format.
18235   new_path="$path"
18236 
18237   windows_path="$new_path"
18238   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18239     unix_path=`$CYGPATH -u "$windows_path"`
18240     new_path="$unix_path"
18241   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18242     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18243     new_path="$unix_path"
18244   fi
18245 
18246 
18247   # Now try to locate executable using which
18248   new_path=`$WHICH "$new_path" 2> /dev/null`
18249 
18250   if test "x$new_path" = x; then
18251     # Oops. Which didn't find the executable.
18252     # The splitting of arguments from the executable at a space might have been incorrect,
18253     # since paths with space are more likely in Windows. Give it another try with the whole
18254     # argument.
18255     path="$complete"
18256     arguments="EOL"
18257     new_path="$path"
18258 
18259   windows_path="$new_path"
18260   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18261     unix_path=`$CYGPATH -u "$windows_path"`
18262     new_path="$unix_path"
18263   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18264     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18265     new_path="$unix_path"
18266   fi
18267 
18268 
18269     new_path=`$WHICH "$new_path" 2> /dev/null`
18270 
18271     if test "x$new_path" = x; then
18272       # It's still not found. Now this is an unrecoverable error.
18273       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
18274 $as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
18275       has_space=`$ECHO "$complete" | $GREP " "`
18276       if test "x$has_space" != x; then
18277         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18278 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18279       fi
18280       as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
18281     fi
18282   fi
18283 
18284   # Now new_path has a complete unix path to the binary
18285   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18286     # Keep paths in /bin as-is, but remove trailing .exe if any
18287     new_path="${new_path/%.exe/}"
18288     # Do not save /bin paths to all_fixpath_prefixes!
18289   else
18290     # Not in mixed or Windows style, start by that.
18291     new_path=`cmd //c echo $new_path`
18292 
18293   input_path="$new_path"
18294   # Check if we need to convert this using DOS-style short mode. If the path
18295   # contains just simple characters, use it. Otherwise (spaces, weird characters),
18296   # take no chances and rewrite it.
18297   # Note: m4 eats our [], so we need to use [ and ] instead.
18298   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18299   if test "x$has_forbidden_chars" != x; then
18300     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18301     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18302   fi
18303 
18304     # Output is in $new_path
18305 
18306   windows_path="$new_path"
18307   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18308     unix_path=`$CYGPATH -u "$windows_path"`
18309     new_path="$unix_path"
18310   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18311     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18312     new_path="$unix_path"
18313   fi
18314 
18315     # remove trailing .exe if any
18316     new_path="${new_path/%.exe/}"
18317 
18318     # Save the first 10 bytes of this path to the storage, so fixpath can work.
18319     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18320   fi
18321 
18322   else
18323     # We're on a posix platform. Hooray! :)
18324     # First separate the path from the arguments. This will split at the first
18325     # space.
18326     complete="$BUILD_LD"
18327     path="${complete%% *}"
18328     tmp="$complete EOL"
18329     arguments="${tmp#* }"
18330 
18331     # Cannot rely on the command "which" here since it doesn't always work.
18332     is_absolute_path=`$ECHO "$path" | $GREP ^/`
18333     if test -z "$is_absolute_path"; then
18334       # Path to executable is not absolute. Find it.
18335       IFS_save="$IFS"
18336       IFS=:
18337       for p in $PATH; do
18338         if test -f "$p/$path" && test -x "$p/$path"; then
18339           new_path="$p/$path"
18340           break
18341         fi
18342       done
18343       IFS="$IFS_save"
18344     else
18345       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving BUILD_LD (as $path) failed, using $path directly." >&5
18346 $as_echo "$as_me: Resolving BUILD_LD (as $path) failed, using $path directly." >&6;}
18347       new_path="$path"
18348     fi
18349 
18350     if test "x$new_path" = x; then
18351         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
18352 $as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
18353         has_space=`$ECHO "$complete" | $GREP " "`
18354         if test "x$has_space" != x; then
18355           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18356 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18357         fi
18358         as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
18359       fi
18360   fi
18361 
18362       # Now join together the path and the arguments once again
18363       if test "x$arguments" != xEOL; then
18364         new_complete="$new_path ${arguments% *}"
18365       else
18366         new_complete="$new_path"
18367       fi
18368 
18369   if test "x$complete" != "x$new_complete"; then
18370       BUILD_LD="$new_complete"
18371       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_LD to \"$new_complete\"" >&5
18372 $as_echo "$as_me: Rewriting BUILD_LD to \"$new_complete\"" >&6;}
18373     fi
18374 
18375 fi
18376 
18377 
18378 
18379 
18380 # If a devkit is found on the builddeps server, then prepend its path to the
18381 # PATH variable. If there are cross compilers available in the devkit, these
18382 # will be found by AC_PROG_CC et al.
18383 DEVKIT=
18384 
18385 
18386     if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
18387         # Source the builddeps file again, to make sure it uses the latest variables!
18388         . $builddepsfile
18389         # Look for a target and build machine specific resource!
18390         eval resource=\${builddep_devkit_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
18391         if test "x$resource" = x; then
18392             # Ok, lets instead look for a target specific resource
18393             eval resource=\${builddep_devkit_TARGET_${rewritten_target_var}}
18394         fi
18395         if test "x$resource" = x; then
18396             # Ok, lets instead look for a build specific resource
18397             eval resource=\${builddep_devkit_BUILD_${rewritten_build_var}}
18398         fi
18399         if test "x$resource" = x; then
18400             # Ok, lets instead look for a generic resource
18401             # (The devkit comes from M4 and not the shell, thus no need for eval here.)
18402             resource=${builddep_devkit}
18403         fi
18404         if test "x$resource" != x; then
18405             { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for devkit" >&5
18406 $as_echo "$as_me: Using builddeps $resource for devkit" >&6;}
18407             # If the resource in the builddeps.conf file is an existing directory,
18408             # for example /java/linux/cups
18409             if test -d ${resource}; then
18410                depdir=${resource}
18411             else
18412 
18413 # devkit is for example mymodule
18414 # $resource is for example libs/general/libmymod_1_2_3.zip
18415 # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
18416 # $with_builddeps_dir is for example /localhome/builddeps
18417 # depdir is the name of the variable into which we store the depdir, eg MYMOD
18418 # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
18419 # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
18420     filename=`basename $resource`
18421     filebase=`echo $filename | sed 's/\.[^\.]*$//'`
18422     filebase=${filename%%.*}
18423     extension=${filename#*.}
18424     installdir=$with_builddeps_dir/$filebase
18425     if test ! -f $installdir/$filename.unpacked; then
18426         { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency devkit from $with_builddeps_server/$resource and installing into $installdir" >&5
18427 $as_echo "$as_me: Downloading build dependency devkit from $with_builddeps_server/$resource and installing into $installdir" >&6;}
18428         if test ! -d $installdir; then
18429             mkdir -p $installdir
18430         fi
18431         if test ! -d $installdir; then
18432             as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
18433         fi
18434         tmpfile=`mktemp $installdir/devkit.XXXXXXXXX`
18435         touch $tmpfile
18436         if test ! -f $tmpfile; then
18437             as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
18438         fi
18439 
18440     # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
18441     # $tmpfile is the local file name for the downloaded file.
18442     VALID_TOOL=no
18443     if test "x$BDEPS_FTP" = xwget; then
18444        VALID_TOOL=yes
18445        wget -O $tmpfile $with_builddeps_server/$resource
18446     fi
18447     if test "x$BDEPS_FTP" = xlftp; then
18448        VALID_TOOL=yes
18449        lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
18450     fi
18451     if test "x$BDEPS_FTP" = xftp; then
18452         VALID_TOOL=yes
18453         FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
18454         FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
18455         FTPUSERPWD=${FTPSERVER%%@*}
18456         if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
18457             FTPUSER=${userpwd%%:*}
18458             FTPPWD=${userpwd#*@}
18459             FTPSERVER=${FTPSERVER#*@}
18460         else
18461             FTPUSER=ftp
18462             FTPPWD=ftp
18463         fi
18464         # the "pass" command does not work on some
18465         # ftp clients (read ftp.exe) but if it works,
18466         # passive mode is better!
18467         (\
18468             echo "user $FTPUSER $FTPPWD"        ;\
18469             echo "pass"                         ;\
18470             echo "bin"                          ;\
18471             echo "get $FTPPATH $tmpfile"              ;\
18472         ) | ftp -in $FTPSERVER
18473     fi
18474     if test "x$VALID_TOOL" != xyes; then
18475        as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
18476     fi
18477 
18478         mv $tmpfile $installdir/$filename
18479         if test ! -s $installdir/$filename; then
18480             as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
18481         fi
18482         case "$extension" in
18483             zip)  echo "Unzipping $installdir/$filename..."
18484                (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
18485             ;;
18486             tar.gz) echo "Untaring $installdir/$filename..."
18487                (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
18488             ;;
18489             tgz) echo "Untaring $installdir/$filename..."
18490                (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
18491             ;;
18492             *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
18493             ;;
18494         esac
18495     fi
18496     if test -f $installdir/$filename.unpacked; then
18497         depdir=$installdir
18498     fi
18499 
18500             fi
18501             # Source the builddeps file again, because in the previous command, the depdir
18502             # was updated to point at the current build dependency install directory.
18503             . $builddepsfile
18504             # Now extract variables from the builddeps.conf files.
18505             theroot=${builddep_devkit_ROOT}
18506             thecflags=${builddep_devkit_CFLAGS}
18507             thelibs=${builddep_devkit_LIBS}
18508             if test "x$depdir" = x; then
18509                 as_fn_error $? "Could not download build dependency devkit" "$LINENO" 5
18510             fi
18511             DEVKIT=$depdir
18512             if test "x$theroot" != x; then
18513                DEVKIT="$theroot"
18514             fi
18515             if test "x$thecflags" != x; then
18516                DEVKIT_CFLAGS="$thecflags"
18517             fi
18518             if test "x$thelibs" != x; then
18519                DEVKIT_LIBS="$thelibs"
18520             fi
18521             # Found devkit
18522                      PATH="$DEVKIT/bin:$PATH"
18523                      SYS_ROOT="$DEVKIT/${rewritten_target}/sys-root"
18524                      if test "x$x_includes" = "xNONE"; then
18525                          x_includes="$SYS_ROOT/usr/include/X11"
18526                      fi
18527                      if test "x$x_libraries" = "xNONE"; then
18528                          x_libraries="$SYS_ROOT/usr/lib"
18529                      fi
18530 
18531 
18532         fi
18533 
18534     fi
18535 
18536 
18537 if test "x$SYS_ROOT" != "x/" ; then
18538     CFLAGS="--sysroot=$SYS_ROOT $CFLAGS"
18539     CXXFLAGS="--sysroot=$SYS_ROOT $CXXFLAGS"
18540     OBJCFLAGS="--sysroot=$SYS_ROOT $OBJCFLAGS"
18541     OBJCXXFLAGS="--sysroot=$SYS_ROOT $OBJCFLAGS"
18542     CPPFLAGS="--sysroot=$SYS_ROOT $CPPFLAGS"
18543     LDFLAGS="--sysroot=$SYS_ROOT $LDFLAGS"
18544 fi
18545 
18546 # Store the CFLAGS etal passed to the configure script.
18547 ORG_CFLAGS="$CFLAGS"
18548 ORG_CXXFLAGS="$CXXFLAGS"
18549 ORG_OBJCFLAGS="$OBJCFLAGS"
18550 
18551 # autoconf magic only relies on PATH, so update it if tools dir is specified
18552 OLD_PATH="$PATH"
18553 if test "x$TOOLS_DIR" != x; then
18554   PATH=$TOOLS_DIR:$PATH
18555 fi
18556 
18557 
18558 ### Locate C compiler (CC)
18559 
18560 # On windows, only cl.exe is supported.
18561 # On Solaris, cc is preferred to gcc.
18562 # Elsewhere, gcc is preferred to cc.
18563 
18564 if test "x$CC" != x; then
18565   COMPILER_CHECK_LIST="$CC"
18566 elif test "x$OPENJDK_TARGET_OS" = "xwindows"; then
18567   COMPILER_CHECK_LIST="cl"
18568 elif test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
18569   COMPILER_CHECK_LIST="cc gcc"
18570 else
18571   COMPILER_CHECK_LIST="gcc cc"
18572 fi
18573 
18574 
18575   COMPILER_NAME=C
18576 
18577   CC=
18578   # If TOOLS_DIR is set, check for all compiler names in there first
18579   # before checking the rest of the PATH.
18580   if test -n "$TOOLS_DIR"; then
18581     PATH_save="$PATH"
18582     PATH="$TOOLS_DIR"
18583     for ac_prog in $COMPILER_CHECK_LIST
18584 do
18585   # Extract the first word of "$ac_prog", so it can be a program name with args.
18586 set dummy $ac_prog; ac_word=$2
18587 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18588 $as_echo_n "checking for $ac_word... " >&6; }
18589 if ${ac_cv_path_TOOLS_DIR_CC+:} false; then :
18590   $as_echo_n "(cached) " >&6
18591 else
18592   case $TOOLS_DIR_CC in
18593   [\\/]* | ?:[\\/]*)
18594   ac_cv_path_TOOLS_DIR_CC="$TOOLS_DIR_CC" # Let the user override the test with a path.
18595   ;;
18596   *)
18597   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18598 for as_dir in $PATH
18599 do
18600   IFS=$as_save_IFS
18601   test -z "$as_dir" && as_dir=.
18602     for ac_exec_ext in '' $ac_executable_extensions; do
18603   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
18604     ac_cv_path_TOOLS_DIR_CC="$as_dir/$ac_word$ac_exec_ext"
18605     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18606     break 2
18607   fi
18608 done
18609   done
18610 IFS=$as_save_IFS
18611 
18612   ;;
18613 esac
18614 fi
18615 TOOLS_DIR_CC=$ac_cv_path_TOOLS_DIR_CC
18616 if test -n "$TOOLS_DIR_CC"; then
18617   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLS_DIR_CC" >&5
18618 $as_echo "$TOOLS_DIR_CC" >&6; }
18619 else
18620   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18621 $as_echo "no" >&6; }
18622 fi
18623 
18624 
18625   test -n "$TOOLS_DIR_CC" && break
18626 done
18627 
18628     CC=$TOOLS_DIR_CC
18629     PATH="$PATH_save"
18630   fi
18631 
18632   # AC_PATH_PROGS can't be run multiple times with the same variable,
18633   # so create a new name for this run.
18634   if test "x$CC" = x; then
18635     for ac_prog in $COMPILER_CHECK_LIST
18636 do
18637   # Extract the first word of "$ac_prog", so it can be a program name with args.
18638 set dummy $ac_prog; ac_word=$2
18639 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18640 $as_echo_n "checking for $ac_word... " >&6; }
18641 if ${ac_cv_path_POTENTIAL_CC+:} false; then :
18642   $as_echo_n "(cached) " >&6
18643 else
18644   case $POTENTIAL_CC in
18645   [\\/]* | ?:[\\/]*)
18646   ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
18647   ;;
18648   *)
18649   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18650 for as_dir in $PATH
18651 do
18652   IFS=$as_save_IFS
18653   test -z "$as_dir" && as_dir=.
18654     for ac_exec_ext in '' $ac_executable_extensions; do
18655   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
18656     ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
18657     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18658     break 2
18659   fi
18660 done
18661   done
18662 IFS=$as_save_IFS
18663 
18664   ;;
18665 esac
18666 fi
18667 POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
18668 if test -n "$POTENTIAL_CC"; then
18669   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
18670 $as_echo "$POTENTIAL_CC" >&6; }
18671 else
18672   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18673 $as_echo "no" >&6; }
18674 fi
18675 
18676 
18677   test -n "$POTENTIAL_CC" && break
18678 done
18679 
18680     CC=$POTENTIAL_CC
18681   fi
18682 
18683   if test "x$CC" = x; then
18684 
18685     # Print a helpful message on how to acquire the necessary build dependency.
18686     # devkit is the help tag: freetyp2, cups, pulse, alsa etc
18687     MISSING_DEPENDENCY=devkit
18688     PKGHANDLER_COMMAND=
18689 
18690     case $PKGHANDLER in
18691         apt-get)
18692                 apt_help     $MISSING_DEPENDENCY ;;
18693     yum)
18694                 yum_help     $MISSING_DEPENDENCY ;;
18695         port)
18696                 port_help    $MISSING_DEPENDENCY ;;
18697         pkgutil)
18698                 pkgutil_help $MISSING_DEPENDENCY ;;
18699         pkgadd)
18700                 pkgadd_help  $MISSING_DEPENDENCY ;;
18701     * )
18702       break ;;
18703     esac
18704 
18705     if test "x$PKGHANDLER_COMMAND" != x; then
18706         HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
18707     fi
18708 
18709       as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
18710   fi
18711 
18712   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18713 
18714   # First separate the path from the arguments. This will split at the first
18715   # space.
18716   complete="$CC"
18717   path="${complete%% *}"
18718   tmp="$complete EOL"
18719   arguments="${tmp#* }"
18720 
18721   # Input might be given as Windows format, start by converting to
18722   # unix format.
18723   new_path=`$CYGPATH -u "$path"`
18724 
18725   # Now try to locate executable using which
18726   new_path=`$WHICH "$new_path" 2> /dev/null`
18727   # bat and cmd files are not always considered executable in cygwin causing which
18728   # to not find them
18729   if test "x$new_path" = x \
18730            && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18731            && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18732     new_path=`$CYGPATH -u "$path"`
18733   fi
18734   if test "x$new_path" = x; then
18735     # Oops. Which didn't find the executable.
18736     # The splitting of arguments from the executable at a space might have been incorrect,
18737     # since paths with space are more likely in Windows. Give it another try with the whole
18738     # argument.
18739     path="$complete"
18740     arguments="EOL"
18741     new_path=`$CYGPATH -u "$path"`
18742     new_path=`$WHICH "$new_path" 2> /dev/null`
18743     # bat and cmd files are not always considered executable in cygwin causing which
18744     # to not find them
18745     if test "x$new_path" = x \
18746              && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18747              && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18748       new_path=`$CYGPATH -u "$path"`
18749     fi
18750     if test "x$new_path" = x; then
18751       # It's still not found. Now this is an unrecoverable error.
18752       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
18753 $as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
18754       has_space=`$ECHO "$complete" | $GREP " "`
18755       if test "x$has_space" != x; then
18756         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18757 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18758       fi
18759       as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
18760     fi
18761   fi
18762 
18763   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18764   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18765   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18766   # "foo.exe" is OK but "foo" is an error.
18767   #
18768   # This test is therefore slightly more accurate than "test -f" to check for file precense.
18769   # It is also a way to make sure we got the proper file name for the real test later on.
18770   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18771   if test "x$test_shortpath" = x; then
18772     # Short path failed, file does not exist as specified.
18773     # Try adding .exe or .cmd
18774     if test -f "${new_path}.exe"; then
18775        input_to_shortpath="${new_path}.exe"
18776     elif test -f "${new_path}.cmd"; then
18777        input_to_shortpath="${new_path}.cmd"
18778     else
18779       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$new_path\", is invalid." >&5
18780 $as_echo "$as_me: The path of CC, which resolves as \"$new_path\", is invalid." >&6;}
18781       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18782 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18783       as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
18784     fi
18785   else
18786     input_to_shortpath="$new_path"
18787   fi
18788 
18789   # Call helper function which possibly converts this using DOS-style short mode.
18790   # If so, the updated path is stored in $new_path.
18791   new_path="$input_to_shortpath"
18792 
18793   input_path="$input_to_shortpath"
18794   # Check if we need to convert this using DOS-style short mode. If the path
18795   # contains just simple characters, use it. Otherwise (spaces, weird characters),
18796   # take no chances and rewrite it.
18797   # Note: m4 eats our [], so we need to use [ and ] instead.
18798   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18799   if test "x$has_forbidden_chars" != x; then
18800     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18801     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18802     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18803     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18804       # Going to short mode and back again did indeed matter. Since short mode is
18805       # case insensitive, let's make it lowercase to improve readability.
18806       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18807       # Now convert it back to Unix-stile (cygpath)
18808       input_path=`$CYGPATH -u "$shortmode_path"`
18809       new_path="$input_path"
18810     fi
18811   fi
18812 
18813   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18814   if test "x$test_cygdrive_prefix" = x; then
18815     # As a simple fix, exclude /usr/bin since it's not a real path.
18816     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18817       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18818       # a path prefixed by /cygdrive for fixpath to work.
18819       new_path="$CYGWIN_ROOT_PATH$input_path"
18820     fi
18821   fi
18822 
18823   # remove trailing .exe if any
18824   new_path="${new_path/%.exe/}"
18825 
18826   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18827 
18828   # First separate the path from the arguments. This will split at the first
18829   # space.
18830   complete="$CC"
18831   path="${complete%% *}"
18832   tmp="$complete EOL"
18833   arguments="${tmp#* }"
18834 
18835   # Input might be given as Windows format, start by converting to
18836   # unix format.
18837   new_path="$path"
18838 
18839   windows_path="$new_path"
18840   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18841     unix_path=`$CYGPATH -u "$windows_path"`
18842     new_path="$unix_path"
18843   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18844     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18845     new_path="$unix_path"
18846   fi
18847 
18848 
18849   # Now try to locate executable using which
18850   new_path=`$WHICH "$new_path" 2> /dev/null`
18851 
18852   if test "x$new_path" = x; then
18853     # Oops. Which didn't find the executable.
18854     # The splitting of arguments from the executable at a space might have been incorrect,
18855     # since paths with space are more likely in Windows. Give it another try with the whole
18856     # argument.
18857     path="$complete"
18858     arguments="EOL"
18859     new_path="$path"
18860 
18861   windows_path="$new_path"
18862   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18863     unix_path=`$CYGPATH -u "$windows_path"`
18864     new_path="$unix_path"
18865   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18866     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18867     new_path="$unix_path"
18868   fi
18869 
18870 
18871     new_path=`$WHICH "$new_path" 2> /dev/null`
18872 
18873     if test "x$new_path" = x; then
18874       # It's still not found. Now this is an unrecoverable error.
18875       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
18876 $as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
18877       has_space=`$ECHO "$complete" | $GREP " "`
18878       if test "x$has_space" != x; then
18879         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18880 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18881       fi
18882       as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
18883     fi
18884   fi
18885 
18886   # Now new_path has a complete unix path to the binary
18887   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18888     # Keep paths in /bin as-is, but remove trailing .exe if any
18889     new_path="${new_path/%.exe/}"
18890     # Do not save /bin paths to all_fixpath_prefixes!
18891   else
18892     # Not in mixed or Windows style, start by that.
18893     new_path=`cmd //c echo $new_path`
18894 
18895   input_path="$new_path"
18896   # Check if we need to convert this using DOS-style short mode. If the path
18897   # contains just simple characters, use it. Otherwise (spaces, weird characters),
18898   # take no chances and rewrite it.
18899   # Note: m4 eats our [], so we need to use [ and ] instead.
18900   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18901   if test "x$has_forbidden_chars" != x; then
18902     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18903     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18904   fi
18905 
18906     # Output is in $new_path
18907 
18908   windows_path="$new_path"
18909   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18910     unix_path=`$CYGPATH -u "$windows_path"`
18911     new_path="$unix_path"
18912   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18913     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18914     new_path="$unix_path"
18915   fi
18916 
18917     # remove trailing .exe if any
18918     new_path="${new_path/%.exe/}"
18919 
18920     # Save the first 10 bytes of this path to the storage, so fixpath can work.
18921     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18922   fi
18923 
18924   else
18925     # We're on a posix platform. Hooray! :)
18926     # First separate the path from the arguments. This will split at the first
18927     # space.
18928     complete="$CC"
18929     path="${complete%% *}"
18930     tmp="$complete EOL"
18931     arguments="${tmp#* }"
18932 
18933     # Cannot rely on the command "which" here since it doesn't always work.
18934     is_absolute_path=`$ECHO "$path" | $GREP ^/`
18935     if test -z "$is_absolute_path"; then
18936       # Path to executable is not absolute. Find it.
18937       IFS_save="$IFS"
18938       IFS=:
18939       for p in $PATH; do
18940         if test -f "$p/$path" && test -x "$p/$path"; then
18941           new_path="$p/$path"
18942           break
18943         fi
18944       done
18945       IFS="$IFS_save"
18946     else
18947       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CC (as $path) failed, using $path directly." >&5
18948 $as_echo "$as_me: Resolving CC (as $path) failed, using $path directly." >&6;}
18949       new_path="$path"
18950     fi
18951 
18952     if test "x$new_path" = x; then
18953         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
18954 $as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
18955         has_space=`$ECHO "$complete" | $GREP " "`
18956         if test "x$has_space" != x; then
18957           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18958 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18959         fi
18960         as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
18961       fi
18962   fi
18963 
18964       # Now join together the path and the arguments once again
18965       if test "x$arguments" != xEOL; then
18966         new_complete="$new_path ${arguments% *}"
18967       else
18968         new_complete="$new_path"
18969       fi
18970 
18971   if test "x$complete" != "x$new_complete"; then
18972       CC="$new_complete"
18973       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CC to \"$new_complete\"" >&5
18974 $as_echo "$as_me: Rewriting CC to \"$new_complete\"" >&6;}
18975     fi
18976 
18977   { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CC" >&5
18978 $as_echo_n "checking resolved symbolic links for CC... " >&6; }
18979   TEST_COMPILER="$CC"
18980 
18981     if test "x$OPENJDK_BUILD_OS" != xwindows; then
18982         # Follow a chain of symbolic links. Use readlink
18983         # where it exists, else fall back to horribly
18984         # complicated shell code.
18985         if test "x$READLINK_TESTED" != yes; then
18986             # On MacOSX there is a readlink tool with a different
18987             # purpose than the GNU readlink tool. Check the found readlink.
18988             ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
18989             if test "x$ISGNU" = x; then
18990                  # A readlink that we do not know how to use.
18991                  # Are there other non-GNU readlinks out there?
18992                  READLINK_TESTED=yes
18993                  READLINK=
18994             fi
18995         fi
18996 
18997         if test "x$READLINK" != x; then
18998             TEST_COMPILER=`$READLINK -f $TEST_COMPILER`
18999         else
19000             # Save the current directory for restoring afterwards
19001             STARTDIR=$PWD
19002             COUNTER=0
19003             sym_link_dir=`$DIRNAME $TEST_COMPILER`
19004             sym_link_file=`$BASENAME $TEST_COMPILER`
19005             # Use the system pwd and not the shell builtin to resolve directory symlinks
19006             cd $sym_link_dir
19007             cd `$THEPWDCMD`
19008             sym_link_dir=`$THEPWDCMD`
19009             # Resolve file symlinks
19010             while test $COUNTER -lt 20; do
19011                 ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
19012                 if test "x$ISLINK" == x; then
19013                     # This is not a symbolic link! We are done!
19014                     break
19015                 fi
19016                 # Again resolve directory symlinks since the target of the just found
19017                 # link could be in a different directory
19018                 cd `$DIRNAME $ISLINK`
19019                 sym_link_dir=`$THEPWDCMD`
19020                 sym_link_file=`$BASENAME $ISLINK`
19021                 let COUNTER=COUNTER+1
19022             done
19023             cd $STARTDIR
19024             TEST_COMPILER=$sym_link_dir/$sym_link_file
19025         fi
19026     fi
19027 
19028   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_COMPILER" >&5
19029 $as_echo "$TEST_COMPILER" >&6; }
19030   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CC is disguised ccache" >&5
19031 $as_echo_n "checking if CC is disguised ccache... " >&6; }
19032 
19033   COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"`
19034   if test "x$COMPILER_BASENAME" = "xccache"; then
19035     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5
19036 $as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; }
19037     # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache.
19038     # We want to control ccache invocation ourselves, so ignore this cc and try
19039     # searching again.
19040 
19041     # Remove the path to the fake ccache cc from the PATH
19042     RETRY_COMPILER_SAVED_PATH="$PATH"
19043     COMPILER_DIRNAME=`$DIRNAME $CC`
19044     PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`"
19045 
19046     # Try again looking for our compiler
19047     if test -n "$ac_tool_prefix"; then
19048   for ac_prog in $COMPILER_CHECK_LIST
19049   do
19050     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
19051 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
19052 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19053 $as_echo_n "checking for $ac_word... " >&6; }
19054 if ${ac_cv_prog_PROPER_COMPILER_CC+:} false; then :
19055   $as_echo_n "(cached) " >&6
19056 else
19057   if test -n "$PROPER_COMPILER_CC"; then
19058   ac_cv_prog_PROPER_COMPILER_CC="$PROPER_COMPILER_CC" # Let the user override the test.
19059 else
19060 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19061 for as_dir in $PATH
19062 do
19063   IFS=$as_save_IFS
19064   test -z "$as_dir" && as_dir=.
19065     for ac_exec_ext in '' $ac_executable_extensions; do
19066   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
19067     ac_cv_prog_PROPER_COMPILER_CC="$ac_tool_prefix$ac_prog"
19068     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19069     break 2
19070   fi
19071 done
19072   done
19073 IFS=$as_save_IFS
19074 
19075 fi
19076 fi
19077 PROPER_COMPILER_CC=$ac_cv_prog_PROPER_COMPILER_CC
19078 if test -n "$PROPER_COMPILER_CC"; then
19079   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5
19080 $as_echo "$PROPER_COMPILER_CC" >&6; }
19081 else
19082   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19083 $as_echo "no" >&6; }
19084 fi
19085 
19086 
19087     test -n "$PROPER_COMPILER_CC" && break
19088   done
19089 fi
19090 if test -z "$PROPER_COMPILER_CC"; then
19091   ac_ct_PROPER_COMPILER_CC=$PROPER_COMPILER_CC
19092   for ac_prog in $COMPILER_CHECK_LIST
19093 do
19094   # Extract the first word of "$ac_prog", so it can be a program name with args.
19095 set dummy $ac_prog; ac_word=$2
19096 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19097 $as_echo_n "checking for $ac_word... " >&6; }
19098 if ${ac_cv_prog_ac_ct_PROPER_COMPILER_CC+:} false; then :
19099   $as_echo_n "(cached) " >&6
19100 else
19101   if test -n "$ac_ct_PROPER_COMPILER_CC"; then
19102   ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_ct_PROPER_COMPILER_CC" # Let the user override the test.
19103 else
19104 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19105 for as_dir in $PATH
19106 do
19107   IFS=$as_save_IFS
19108   test -z "$as_dir" && as_dir=.
19109     for ac_exec_ext in '' $ac_executable_extensions; do
19110   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
19111     ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_prog"
19112     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19113     break 2
19114   fi
19115 done
19116   done
19117 IFS=$as_save_IFS
19118 
19119 fi
19120 fi
19121 ac_ct_PROPER_COMPILER_CC=$ac_cv_prog_ac_ct_PROPER_COMPILER_CC
19122 if test -n "$ac_ct_PROPER_COMPILER_CC"; then
19123   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CC" >&5
19124 $as_echo "$ac_ct_PROPER_COMPILER_CC" >&6; }
19125 else
19126   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19127 $as_echo "no" >&6; }
19128 fi
19129 
19130 
19131   test -n "$ac_ct_PROPER_COMPILER_CC" && break
19132 done
19133 
19134   if test "x$ac_ct_PROPER_COMPILER_CC" = x; then
19135     PROPER_COMPILER_CC=""
19136   else
19137     case $cross_compiling:$ac_tool_warned in
19138 yes:)
19139 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
19140 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
19141 ac_tool_warned=yes ;;
19142 esac
19143     PROPER_COMPILER_CC=$ac_ct_PROPER_COMPILER_CC
19144   fi
19145 fi
19146 
19147 
19148   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19149 
19150   # First separate the path from the arguments. This will split at the first
19151   # space.
19152   complete="$PROPER_COMPILER_CC"
19153   path="${complete%% *}"
19154   tmp="$complete EOL"
19155   arguments="${tmp#* }"
19156 
19157   # Input might be given as Windows format, start by converting to
19158   # unix format.
19159   new_path=`$CYGPATH -u "$path"`
19160 
19161   # Now try to locate executable using which
19162   new_path=`$WHICH "$new_path" 2> /dev/null`
19163   # bat and cmd files are not always considered executable in cygwin causing which
19164   # to not find them
19165   if test "x$new_path" = x \
19166            && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19167            && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19168     new_path=`$CYGPATH -u "$path"`
19169   fi
19170   if test "x$new_path" = x; then
19171     # Oops. Which didn't find the executable.
19172     # The splitting of arguments from the executable at a space might have been incorrect,
19173     # since paths with space are more likely in Windows. Give it another try with the whole
19174     # argument.
19175     path="$complete"
19176     arguments="EOL"
19177     new_path=`$CYGPATH -u "$path"`
19178     new_path=`$WHICH "$new_path" 2> /dev/null`
19179     # bat and cmd files are not always considered executable in cygwin causing which
19180     # to not find them
19181     if test "x$new_path" = x \
19182              && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19183              && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19184       new_path=`$CYGPATH -u "$path"`
19185     fi
19186     if test "x$new_path" = x; then
19187       # It's still not found. Now this is an unrecoverable error.
19188       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
19189 $as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
19190       has_space=`$ECHO "$complete" | $GREP " "`
19191       if test "x$has_space" != x; then
19192         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19193 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19194       fi
19195       as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
19196     fi
19197   fi
19198 
19199   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19200   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19201   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19202   # "foo.exe" is OK but "foo" is an error.
19203   #
19204   # This test is therefore slightly more accurate than "test -f" to check for file precense.
19205   # It is also a way to make sure we got the proper file name for the real test later on.
19206   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19207   if test "x$test_shortpath" = x; then
19208     # Short path failed, file does not exist as specified.
19209     # Try adding .exe or .cmd
19210     if test -f "${new_path}.exe"; then
19211        input_to_shortpath="${new_path}.exe"
19212     elif test -f "${new_path}.cmd"; then
19213        input_to_shortpath="${new_path}.cmd"
19214     else
19215       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&5
19216 $as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&6;}
19217       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19218 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19219       as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
19220     fi
19221   else
19222     input_to_shortpath="$new_path"
19223   fi
19224 
19225   # Call helper function which possibly converts this using DOS-style short mode.
19226   # If so, the updated path is stored in $new_path.
19227   new_path="$input_to_shortpath"
19228 
19229   input_path="$input_to_shortpath"
19230   # Check if we need to convert this using DOS-style short mode. If the path
19231   # contains just simple characters, use it. Otherwise (spaces, weird characters),
19232   # take no chances and rewrite it.
19233   # Note: m4 eats our [], so we need to use [ and ] instead.
19234   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19235   if test "x$has_forbidden_chars" != x; then
19236     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19237     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19238     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19239     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19240       # Going to short mode and back again did indeed matter. Since short mode is
19241       # case insensitive, let's make it lowercase to improve readability.
19242       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19243       # Now convert it back to Unix-stile (cygpath)
19244       input_path=`$CYGPATH -u "$shortmode_path"`
19245       new_path="$input_path"
19246     fi
19247   fi
19248 
19249   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19250   if test "x$test_cygdrive_prefix" = x; then
19251     # As a simple fix, exclude /usr/bin since it's not a real path.
19252     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19253       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19254       # a path prefixed by /cygdrive for fixpath to work.
19255       new_path="$CYGWIN_ROOT_PATH$input_path"
19256     fi
19257   fi
19258 
19259   # remove trailing .exe if any
19260   new_path="${new_path/%.exe/}"
19261 
19262   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19263 
19264   # First separate the path from the arguments. This will split at the first
19265   # space.
19266   complete="$PROPER_COMPILER_CC"
19267   path="${complete%% *}"
19268   tmp="$complete EOL"
19269   arguments="${tmp#* }"
19270 
19271   # Input might be given as Windows format, start by converting to
19272   # unix format.
19273   new_path="$path"
19274 
19275   windows_path="$new_path"
19276   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19277     unix_path=`$CYGPATH -u "$windows_path"`
19278     new_path="$unix_path"
19279   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19280     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19281     new_path="$unix_path"
19282   fi
19283 
19284 
19285   # Now try to locate executable using which
19286   new_path=`$WHICH "$new_path" 2> /dev/null`
19287 
19288   if test "x$new_path" = x; then
19289     # Oops. Which didn't find the executable.
19290     # The splitting of arguments from the executable at a space might have been incorrect,
19291     # since paths with space are more likely in Windows. Give it another try with the whole
19292     # argument.
19293     path="$complete"
19294     arguments="EOL"
19295     new_path="$path"
19296 
19297   windows_path="$new_path"
19298   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19299     unix_path=`$CYGPATH -u "$windows_path"`
19300     new_path="$unix_path"
19301   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19302     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19303     new_path="$unix_path"
19304   fi
19305 
19306 
19307     new_path=`$WHICH "$new_path" 2> /dev/null`
19308 
19309     if test "x$new_path" = x; then
19310       # It's still not found. Now this is an unrecoverable error.
19311       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
19312 $as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
19313       has_space=`$ECHO "$complete" | $GREP " "`
19314       if test "x$has_space" != x; then
19315         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19316 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19317       fi
19318       as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
19319     fi
19320   fi
19321 
19322   # Now new_path has a complete unix path to the binary
19323   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
19324     # Keep paths in /bin as-is, but remove trailing .exe if any
19325     new_path="${new_path/%.exe/}"
19326     # Do not save /bin paths to all_fixpath_prefixes!
19327   else
19328     # Not in mixed or Windows style, start by that.
19329     new_path=`cmd //c echo $new_path`
19330 
19331   input_path="$new_path"
19332   # Check if we need to convert this using DOS-style short mode. If the path
19333   # contains just simple characters, use it. Otherwise (spaces, weird characters),
19334   # take no chances and rewrite it.
19335   # Note: m4 eats our [], so we need to use [ and ] instead.
19336   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19337   if test "x$has_forbidden_chars" != x; then
19338     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19339     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19340   fi
19341 
19342     # Output is in $new_path
19343 
19344   windows_path="$new_path"
19345   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19346     unix_path=`$CYGPATH -u "$windows_path"`
19347     new_path="$unix_path"
19348   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19349     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19350     new_path="$unix_path"
19351   fi
19352 
19353     # remove trailing .exe if any
19354     new_path="${new_path/%.exe/}"
19355 
19356     # Save the first 10 bytes of this path to the storage, so fixpath can work.
19357     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19358   fi
19359 
19360   else
19361     # We're on a posix platform. Hooray! :)
19362     # First separate the path from the arguments. This will split at the first
19363     # space.
19364     complete="$PROPER_COMPILER_CC"
19365     path="${complete%% *}"
19366     tmp="$complete EOL"
19367     arguments="${tmp#* }"
19368 
19369     # Cannot rely on the command "which" here since it doesn't always work.
19370     is_absolute_path=`$ECHO "$path" | $GREP ^/`
19371     if test -z "$is_absolute_path"; then
19372       # Path to executable is not absolute. Find it.
19373       IFS_save="$IFS"
19374       IFS=:
19375       for p in $PATH; do
19376         if test -f "$p/$path" && test -x "$p/$path"; then
19377           new_path="$p/$path"
19378           break
19379         fi
19380       done
19381       IFS="$IFS_save"
19382     else
19383       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving PROPER_COMPILER_CC (as $path) failed, using $path directly." >&5
19384 $as_echo "$as_me: Resolving PROPER_COMPILER_CC (as $path) failed, using $path directly." >&6;}
19385       new_path="$path"
19386     fi
19387 
19388     if test "x$new_path" = x; then
19389         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
19390 $as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
19391         has_space=`$ECHO "$complete" | $GREP " "`
19392         if test "x$has_space" != x; then
19393           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19394 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19395         fi
19396         as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
19397       fi
19398   fi
19399 
19400       # Now join together the path and the arguments once again
19401       if test "x$arguments" != xEOL; then
19402         new_complete="$new_path ${arguments% *}"
19403       else
19404         new_complete="$new_path"
19405       fi
19406 
19407   if test "x$complete" != "x$new_complete"; then
19408       PROPER_COMPILER_CC="$new_complete"
19409       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&5
19410 $as_echo "$as_me: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&6;}
19411     fi
19412 
19413     PATH="$RETRY_COMPILER_SAVED_PATH"
19414 
19415     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CC" >&5
19416 $as_echo_n "checking for resolved symbolic links for CC... " >&6; }
19417 
19418     if test "x$OPENJDK_BUILD_OS" != xwindows; then
19419         # Follow a chain of symbolic links. Use readlink
19420         # where it exists, else fall back to horribly
19421         # complicated shell code.
19422         if test "x$READLINK_TESTED" != yes; then
19423             # On MacOSX there is a readlink tool with a different
19424             # purpose than the GNU readlink tool. Check the found readlink.
19425             ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
19426             if test "x$ISGNU" = x; then
19427                  # A readlink that we do not know how to use.
19428                  # Are there other non-GNU readlinks out there?
19429                  READLINK_TESTED=yes
19430                  READLINK=
19431             fi
19432         fi
19433 
19434         if test "x$READLINK" != x; then
19435             PROPER_COMPILER_CC=`$READLINK -f $PROPER_COMPILER_CC`
19436         else
19437             # Save the current directory for restoring afterwards
19438             STARTDIR=$PWD
19439             COUNTER=0
19440             sym_link_dir=`$DIRNAME $PROPER_COMPILER_CC`
19441             sym_link_file=`$BASENAME $PROPER_COMPILER_CC`
19442             # Use the system pwd and not the shell builtin to resolve directory symlinks
19443             cd $sym_link_dir
19444             cd `$THEPWDCMD`
19445             sym_link_dir=`$THEPWDCMD`
19446             # Resolve file symlinks
19447             while test $COUNTER -lt 20; do
19448                 ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
19449                 if test "x$ISLINK" == x; then
19450                     # This is not a symbolic link! We are done!
19451                     break
19452                 fi
19453                 # Again resolve directory symlinks since the target of the just found
19454                 # link could be in a different directory
19455                 cd `$DIRNAME $ISLINK`
19456                 sym_link_dir=`$THEPWDCMD`
19457                 sym_link_file=`$BASENAME $ISLINK`
19458                 let COUNTER=COUNTER+1
19459             done
19460             cd $STARTDIR
19461             PROPER_COMPILER_CC=$sym_link_dir/$sym_link_file
19462         fi
19463     fi
19464 
19465     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5
19466 $as_echo "$PROPER_COMPILER_CC" >&6; }
19467     CC="$PROPER_COMPILER_CC"
19468   else
19469     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CC" >&5
19470 $as_echo "no, keeping CC" >&6; }
19471     CC="$TEST_COMPILER"
19472   fi
19473 
19474   COMPILER=$CC
19475   COMPILER_NAME=$COMPILER_NAME
19476 
19477   if test "x$OPENJDK_TARGET_OS" = xsolaris; then
19478     # Make sure we use the Sun Studio compiler and not gcc on Solaris, which won't work
19479     COMPILER_VERSION_TEST=`$COMPILER -V 2>&1 | $HEAD -n 1`
19480     $ECHO $COMPILER_VERSION_TEST | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
19481     if test $? -ne 0; then
19482       GCC_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
19483 
19484       { $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
19485 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required Sun Studio compiler." >&6;}
19486       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&5
19487 $as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&6;}
19488       as_fn_error $? "Sun Studio compiler is required. Try setting --with-tools-dir." "$LINENO" 5
19489     else
19490       COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/p"`
19491       COMPILER_VENDOR="Sun Studio"
19492     fi
19493   elif test  "x$OPENJDK_TARGET_OS" = xwindows; then
19494     # First line typically looks something like:
19495     # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.30319.01 for 80x86
19496     COMPILER_VERSION_TEST=`$COMPILER 2>&1 | $HEAD -n 1`
19497     COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*Version \([1-9][0-9.]*\) .*/\1/p"`
19498     COMPILER_VENDOR="Microsoft CL.EXE"
19499     COMPILER_CPU_TEST=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* for \(.*\)$/\1/p"`
19500     if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
19501       if test "x$COMPILER_CPU_TEST" != "x80x86"; then
19502         as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"80x86\"." "$LINENO" 5
19503       fi
19504     elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
19505       if test "x$COMPILER_CPU_TEST" != "xx64"; then
19506         as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." "$LINENO" 5
19507       fi
19508     fi
19509   else
19510     COMPILER_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
19511     # Check that this is likely to be GCC.
19512     $COMPILER --version 2>&1 | $GREP "Free Software Foundation" > /dev/null
19513     if test $? -ne 0; then
19514       { $as_echo "$as_me:${as_lineno-$LINENO}: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&5
19515 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&6;}
19516       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&5
19517 $as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&6;}
19518       as_fn_error $? "GCC compiler is required. Try setting --with-tools-dir." "$LINENO" 5
19519     fi
19520 
19521     # First line typically looks something like:
19522     # gcc (Ubuntu/Linaro 4.5.2-8ubuntu4) 4.5.2
19523     COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* \([1-9][0-9.]*\)/\1/p"`
19524     COMPILER_VENDOR=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^\(.*\) [1-9][0-9.]*/\1/p"`
19525   fi
19526   # This sets CC_VERSION or CXX_VERSION. (This comment is a grep marker)
19527   CC_VERSION="$COMPILER_VERSION"
19528   # This sets CC_VENDOR or CXX_VENDOR. (This comment is a grep marker)
19529   CC_VENDOR="$COMPILER_VENDOR"
19530 
19531   { $as_echo "$as_me:${as_lineno-$LINENO}: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&5
19532 $as_echo "$as_me: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&6;}
19533 
19534 
19535 # Now that we have resolved CC ourself, let autoconf have its go at it
19536 ac_ext=c
19537 ac_cpp='$CPP $CPPFLAGS'
19538 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
19539 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
19540 ac_compiler_gnu=$ac_cv_c_compiler_gnu
19541 if test -n "$ac_tool_prefix"; then
19542   for ac_prog in $CC
19543   do
19544     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
19545 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
19546 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19547 $as_echo_n "checking for $ac_word... " >&6; }
19548 if ${ac_cv_prog_CC+:} false; then :
19549   $as_echo_n "(cached) " >&6
19550 else
19551   if test -n "$CC"; then
19552   ac_cv_prog_CC="$CC" # Let the user override the test.
19553 else
19554 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19555 for as_dir in $PATH
19556 do
19557   IFS=$as_save_IFS
19558   test -z "$as_dir" && as_dir=.
19559     for ac_exec_ext in '' $ac_executable_extensions; do
19560   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
19561     ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
19562     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19563     break 2
19564   fi
19565 done
19566   done
19567 IFS=$as_save_IFS
19568 
19569 fi
19570 fi
19571 CC=$ac_cv_prog_CC
19572 if test -n "$CC"; then
19573   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
19574 $as_echo "$CC" >&6; }
19575 else
19576   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19577 $as_echo "no" >&6; }
19578 fi
19579 
19580 
19581     test -n "$CC" && break
19582   done
19583 fi
19584 if test -z "$CC"; then
19585   ac_ct_CC=$CC
19586   for ac_prog in $CC
19587 do
19588   # Extract the first word of "$ac_prog", so it can be a program name with args.
19589 set dummy $ac_prog; ac_word=$2
19590 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19591 $as_echo_n "checking for $ac_word... " >&6; }
19592 if ${ac_cv_prog_ac_ct_CC+:} false; then :
19593   $as_echo_n "(cached) " >&6
19594 else
19595   if test -n "$ac_ct_CC"; then
19596   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
19597 else
19598 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19599 for as_dir in $PATH
19600 do
19601   IFS=$as_save_IFS
19602   test -z "$as_dir" && as_dir=.
19603     for ac_exec_ext in '' $ac_executable_extensions; do
19604   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
19605     ac_cv_prog_ac_ct_CC="$ac_prog"
19606     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19607     break 2
19608   fi
19609 done
19610   done
19611 IFS=$as_save_IFS
19612 
19613 fi
19614 fi
19615 ac_ct_CC=$ac_cv_prog_ac_ct_CC
19616 if test -n "$ac_ct_CC"; then
19617   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
19618 $as_echo "$ac_ct_CC" >&6; }
19619 else
19620   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19621 $as_echo "no" >&6; }
19622 fi
19623 
19624 
19625   test -n "$ac_ct_CC" && break
19626 done
19627 
19628   if test "x$ac_ct_CC" = x; then
19629     CC=""
19630   else
19631     case $cross_compiling:$ac_tool_warned in
19632 yes:)
19633 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
19634 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
19635 ac_tool_warned=yes ;;
19636 esac
19637     CC=$ac_ct_CC
19638   fi
19639 fi
19640 
19641 
19642 test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
19643 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
19644 as_fn_error $? "no acceptable C compiler found in \$PATH
19645 See \`config.log' for more details" "$LINENO" 5; }
19646 
19647 # Provide some information about the compiler.
19648 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
19649 set X $ac_compile
19650 ac_compiler=$2
19651 for ac_option in --version -v -V -qversion; do
19652   { { ac_try="$ac_compiler $ac_option >&5"
19653 case "(($ac_try" in
19654   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19655   *) ac_try_echo=$ac_try;;
19656 esac
19657 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
19658 $as_echo "$ac_try_echo"; } >&5
19659   (eval "$ac_compiler $ac_option >&5") 2>conftest.err
19660   ac_status=$?
19661   if test -s conftest.err; then
19662     sed '10a\
19663 ... rest of stderr output deleted ...
19664          10q' conftest.err >conftest.er1
19665     cat conftest.er1 >&5
19666   fi
19667   rm -f conftest.er1 conftest.err
19668   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
19669   test $ac_status = 0; }
19670 done
19671 
19672 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19673 /* end confdefs.h.  */
19674 
19675 int
19676 main ()
19677 {
19678 
19679   ;
19680   return 0;
19681 }
19682 _ACEOF
19683 ac_clean_files_save=$ac_clean_files
19684 ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
19685 # Try to create an executable without -o first, disregard a.out.
19686 # It will help us diagnose broken compilers, and finding out an intuition
19687 # of exeext.
19688 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
19689 $as_echo_n "checking whether the C compiler works... " >&6; }
19690 ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
19691 
19692 # The possible output files:
19693 ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
19694 
19695 ac_rmfiles=
19696 for ac_file in $ac_files
19697 do
19698   case $ac_file in
19699     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
19700     * ) ac_rmfiles="$ac_rmfiles $ac_file";;
19701   esac
19702 done
19703 rm -f $ac_rmfiles
19704 
19705 if { { ac_try="$ac_link_default"
19706 case "(($ac_try" in
19707   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19708   *) ac_try_echo=$ac_try;;
19709 esac
19710 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
19711 $as_echo "$ac_try_echo"; } >&5
19712   (eval "$ac_link_default") 2>&5
19713   ac_status=$?
19714   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
19715   test $ac_status = 0; }; then :
19716   # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
19717 # So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
19718 # in a Makefile.  We should not override ac_cv_exeext if it was cached,
19719 # so that the user can short-circuit this test for compilers unknown to
19720 # Autoconf.
19721 for ac_file in $ac_files ''
19722 do
19723   test -f "$ac_file" || continue
19724   case $ac_file in
19725     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
19726         ;;
19727     [ab].out )
19728         # We found the default executable, but exeext='' is most
19729         # certainly right.
19730         break;;
19731     *.* )
19732         if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
19733         then :; else
19734            ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
19735         fi
19736         # We set ac_cv_exeext here because the later test for it is not
19737         # safe: cross compilers may not add the suffix if given an `-o'
19738         # argument, so we may need to know it at that point already.
19739         # Even if this section looks crufty: it has the advantage of
19740         # actually working.
19741         break;;
19742     * )
19743         break;;
19744   esac
19745 done
19746 test "$ac_cv_exeext" = no && ac_cv_exeext=
19747 
19748 else
19749   ac_file=''
19750 fi
19751 if test -z "$ac_file"; then :
19752   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19753 $as_echo "no" >&6; }
19754 $as_echo "$as_me: failed program was:" >&5
19755 sed 's/^/| /' conftest.$ac_ext >&5
19756 
19757 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
19758 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
19759 as_fn_error 77 "C compiler cannot create executables
19760 See \`config.log' for more details" "$LINENO" 5; }
19761 else
19762   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
19763 $as_echo "yes" >&6; }
19764 fi
19765 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
19766 $as_echo_n "checking for C compiler default output file name... " >&6; }
19767 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
19768 $as_echo "$ac_file" >&6; }
19769 ac_exeext=$ac_cv_exeext
19770 
19771 rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
19772 ac_clean_files=$ac_clean_files_save
19773 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
19774 $as_echo_n "checking for suffix of executables... " >&6; }
19775 if { { ac_try="$ac_link"
19776 case "(($ac_try" in
19777   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19778   *) ac_try_echo=$ac_try;;
19779 esac
19780 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
19781 $as_echo "$ac_try_echo"; } >&5
19782   (eval "$ac_link") 2>&5
19783   ac_status=$?
19784   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
19785   test $ac_status = 0; }; then :
19786   # If both `conftest.exe' and `conftest' are `present' (well, observable)
19787 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
19788 # work properly (i.e., refer to `conftest.exe'), while it won't with
19789 # `rm'.
19790 for ac_file in conftest.exe conftest conftest.*; do
19791   test -f "$ac_file" || continue
19792   case $ac_file in
19793     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
19794     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
19795           break;;
19796     * ) break;;
19797   esac
19798 done
19799 else
19800   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
19801 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
19802 as_fn_error $? "cannot compute suffix of executables: cannot compile and link
19803 See \`config.log' for more details" "$LINENO" 5; }
19804 fi
19805 rm -f conftest conftest$ac_cv_exeext
19806 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
19807 $as_echo "$ac_cv_exeext" >&6; }
19808 
19809 rm -f conftest.$ac_ext
19810 EXEEXT=$ac_cv_exeext
19811 ac_exeext=$EXEEXT
19812 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19813 /* end confdefs.h.  */
19814 #include <stdio.h>
19815 int
19816 main ()
19817 {
19818 FILE *f = fopen ("conftest.out", "w");
19819  return ferror (f) || fclose (f) != 0;
19820 
19821   ;
19822   return 0;
19823 }
19824 _ACEOF
19825 ac_clean_files="$ac_clean_files conftest.out"
19826 # Check that the compiler produces executables we can run.  If not, either
19827 # the compiler is broken, or we cross compile.
19828 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
19829 $as_echo_n "checking whether we are cross compiling... " >&6; }
19830 if test "$cross_compiling" != yes; then
19831   { { ac_try="$ac_link"
19832 case "(($ac_try" in
19833   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19834   *) ac_try_echo=$ac_try;;
19835 esac
19836 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
19837 $as_echo "$ac_try_echo"; } >&5
19838   (eval "$ac_link") 2>&5
19839   ac_status=$?
19840   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
19841   test $ac_status = 0; }
19842   if { ac_try='./conftest$ac_cv_exeext'
19843   { { case "(($ac_try" in
19844   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19845   *) ac_try_echo=$ac_try;;
19846 esac
19847 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
19848 $as_echo "$ac_try_echo"; } >&5
19849   (eval "$ac_try") 2>&5
19850   ac_status=$?
19851   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
19852   test $ac_status = 0; }; }; then
19853     cross_compiling=no
19854   else
19855     if test "$cross_compiling" = maybe; then
19856         cross_compiling=yes
19857     else
19858         { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
19859 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
19860 as_fn_error $? "cannot run C compiled programs.
19861 If you meant to cross compile, use \`--host'.
19862 See \`config.log' for more details" "$LINENO" 5; }
19863     fi
19864   fi
19865 fi
19866 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
19867 $as_echo "$cross_compiling" >&6; }
19868 
19869 rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
19870 ac_clean_files=$ac_clean_files_save
19871 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
19872 $as_echo_n "checking for suffix of object files... " >&6; }
19873 if ${ac_cv_objext+:} false; then :
19874   $as_echo_n "(cached) " >&6
19875 else
19876   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19877 /* end confdefs.h.  */
19878 
19879 int
19880 main ()
19881 {
19882 
19883   ;
19884   return 0;
19885 }
19886 _ACEOF
19887 rm -f conftest.o conftest.obj
19888 if { { ac_try="$ac_compile"
19889 case "(($ac_try" in
19890   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19891   *) ac_try_echo=$ac_try;;
19892 esac
19893 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
19894 $as_echo "$ac_try_echo"; } >&5
19895   (eval "$ac_compile") 2>&5
19896   ac_status=$?
19897   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
19898   test $ac_status = 0; }; then :
19899   for ac_file in conftest.o conftest.obj conftest.*; do
19900   test -f "$ac_file" || continue;
19901   case $ac_file in
19902     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
19903     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
19904        break;;
19905   esac
19906 done
19907 else
19908   $as_echo "$as_me: failed program was:" >&5
19909 sed 's/^/| /' conftest.$ac_ext >&5
19910 
19911 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
19912 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
19913 as_fn_error $? "cannot compute suffix of object files: cannot compile
19914 See \`config.log' for more details" "$LINENO" 5; }
19915 fi
19916 rm -f conftest.$ac_cv_objext conftest.$ac_ext
19917 fi
19918 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
19919 $as_echo "$ac_cv_objext" >&6; }
19920 OBJEXT=$ac_cv_objext
19921 ac_objext=$OBJEXT
19922 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
19923 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
19924 if ${ac_cv_c_compiler_gnu+:} false; then :
19925   $as_echo_n "(cached) " >&6
19926 else
19927   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19928 /* end confdefs.h.  */
19929 
19930 int
19931 main ()
19932 {
19933 #ifndef __GNUC__
19934        choke me
19935 #endif
19936 
19937   ;
19938   return 0;
19939 }
19940 _ACEOF
19941 if ac_fn_c_try_compile "$LINENO"; then :
19942   ac_compiler_gnu=yes
19943 else
19944   ac_compiler_gnu=no
19945 fi
19946 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19947 ac_cv_c_compiler_gnu=$ac_compiler_gnu
19948 
19949 fi
19950 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
19951 $as_echo "$ac_cv_c_compiler_gnu" >&6; }
19952 if test $ac_compiler_gnu = yes; then
19953   GCC=yes
19954 else
19955   GCC=
19956 fi
19957 ac_test_CFLAGS=${CFLAGS+set}
19958 ac_save_CFLAGS=$CFLAGS
19959 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
19960 $as_echo_n "checking whether $CC accepts -g... " >&6; }
19961 if ${ac_cv_prog_cc_g+:} false; then :
19962   $as_echo_n "(cached) " >&6
19963 else
19964   ac_save_c_werror_flag=$ac_c_werror_flag
19965    ac_c_werror_flag=yes
19966    ac_cv_prog_cc_g=no
19967    CFLAGS="-g"
19968    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19969 /* end confdefs.h.  */
19970 
19971 int
19972 main ()
19973 {
19974 
19975   ;
19976   return 0;
19977 }
19978 _ACEOF
19979 if ac_fn_c_try_compile "$LINENO"; then :
19980   ac_cv_prog_cc_g=yes
19981 else
19982   CFLAGS=""
19983       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19984 /* end confdefs.h.  */
19985 
19986 int
19987 main ()
19988 {
19989 
19990   ;
19991   return 0;
19992 }
19993 _ACEOF
19994 if ac_fn_c_try_compile "$LINENO"; then :
19995 
19996 else
19997   ac_c_werror_flag=$ac_save_c_werror_flag
19998          CFLAGS="-g"
19999          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20000 /* end confdefs.h.  */
20001 
20002 int
20003 main ()
20004 {
20005 
20006   ;
20007   return 0;
20008 }
20009 _ACEOF
20010 if ac_fn_c_try_compile "$LINENO"; then :
20011   ac_cv_prog_cc_g=yes
20012 fi
20013 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20014 fi
20015 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20016 fi
20017 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20018    ac_c_werror_flag=$ac_save_c_werror_flag
20019 fi
20020 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
20021 $as_echo "$ac_cv_prog_cc_g" >&6; }
20022 if test "$ac_test_CFLAGS" = set; then
20023   CFLAGS=$ac_save_CFLAGS
20024 elif test $ac_cv_prog_cc_g = yes; then
20025   if test "$GCC" = yes; then
20026     CFLAGS="-g -O2"
20027   else
20028     CFLAGS="-g"
20029   fi
20030 else
20031   if test "$GCC" = yes; then
20032     CFLAGS="-O2"
20033   else
20034     CFLAGS=
20035   fi
20036 fi
20037 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
20038 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
20039 if ${ac_cv_prog_cc_c89+:} false; then :
20040   $as_echo_n "(cached) " >&6
20041 else
20042   ac_cv_prog_cc_c89=no
20043 ac_save_CC=$CC
20044 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20045 /* end confdefs.h.  */
20046 #include <stdarg.h>
20047 #include <stdio.h>
20048 #include <sys/types.h>
20049 #include <sys/stat.h>
20050 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
20051 struct buf { int x; };
20052 FILE * (*rcsopen) (struct buf *, struct stat *, int);
20053 static char *e (p, i)
20054      char **p;
20055      int i;
20056 {
20057   return p[i];
20058 }
20059 static char *f (char * (*g) (char **, int), char **p, ...)
20060 {
20061   char *s;
20062   va_list v;
20063   va_start (v,p);
20064   s = g (p, va_arg (v,int));
20065   va_end (v);
20066   return s;
20067 }
20068 
20069 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
20070    function prototypes and stuff, but not '\xHH' hex character constants.
20071    These don't provoke an error unfortunately, instead are silently treated
20072    as 'x'.  The following induces an error, until -std is added to get
20073    proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
20074    array size at least.  It's necessary to write '\x00'==0 to get something
20075    that's true only with -std.  */
20076 int osf4_cc_array ['\x00' == 0 ? 1 : -1];
20077 
20078 /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
20079    inside strings and character constants.  */
20080 #define FOO(x) 'x'
20081 int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
20082 
20083 int test (int i, double x);
20084 struct s1 {int (*f) (int a);};
20085 struct s2 {int (*f) (double a);};
20086 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
20087 int argc;
20088 char **argv;
20089 int
20090 main ()
20091 {
20092 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
20093   ;
20094   return 0;
20095 }
20096 _ACEOF
20097 for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
20098         -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
20099 do
20100   CC="$ac_save_CC $ac_arg"
20101   if ac_fn_c_try_compile "$LINENO"; then :
20102   ac_cv_prog_cc_c89=$ac_arg
20103 fi
20104 rm -f core conftest.err conftest.$ac_objext
20105   test "x$ac_cv_prog_cc_c89" != "xno" && break
20106 done
20107 rm -f conftest.$ac_ext
20108 CC=$ac_save_CC
20109 
20110 fi
20111 # AC_CACHE_VAL
20112 case "x$ac_cv_prog_cc_c89" in
20113   x)
20114     { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
20115 $as_echo "none needed" >&6; } ;;
20116   xno)
20117     { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
20118 $as_echo "unsupported" >&6; } ;;
20119   *)
20120     CC="$CC $ac_cv_prog_cc_c89"
20121     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
20122 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
20123 esac
20124 if test "x$ac_cv_prog_cc_c89" != xno; then :
20125 
20126 fi
20127 
20128 ac_ext=cpp
20129 ac_cpp='$CXXCPP $CPPFLAGS'
20130 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
20131 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
20132 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
20133 
20134 
20135 ### Locate C++ compiler (CXX)
20136 
20137 if test "x$CXX" != x; then
20138   COMPILER_CHECK_LIST="$CXX"
20139 elif test "x$OPENJDK_TARGET_OS" = "xwindows"; then
20140   COMPILER_CHECK_LIST="cl"
20141 elif test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
20142   COMPILER_CHECK_LIST="CC g++"
20143 else
20144   COMPILER_CHECK_LIST="g++ CC"
20145 fi
20146 
20147 
20148   COMPILER_NAME=C++
20149 
20150   CXX=
20151   # If TOOLS_DIR is set, check for all compiler names in there first
20152   # before checking the rest of the PATH.
20153   if test -n "$TOOLS_DIR"; then
20154     PATH_save="$PATH"
20155     PATH="$TOOLS_DIR"
20156     for ac_prog in $COMPILER_CHECK_LIST
20157 do
20158   # Extract the first word of "$ac_prog", so it can be a program name with args.
20159 set dummy $ac_prog; ac_word=$2
20160 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20161 $as_echo_n "checking for $ac_word... " >&6; }
20162 if ${ac_cv_path_TOOLS_DIR_CXX+:} false; then :
20163   $as_echo_n "(cached) " >&6
20164 else
20165   case $TOOLS_DIR_CXX in
20166   [\\/]* | ?:[\\/]*)
20167   ac_cv_path_TOOLS_DIR_CXX="$TOOLS_DIR_CXX" # Let the user override the test with a path.
20168   ;;
20169   *)
20170   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20171 for as_dir in $PATH
20172 do
20173   IFS=$as_save_IFS
20174   test -z "$as_dir" && as_dir=.
20175     for ac_exec_ext in '' $ac_executable_extensions; do
20176   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
20177     ac_cv_path_TOOLS_DIR_CXX="$as_dir/$ac_word$ac_exec_ext"
20178     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20179     break 2
20180   fi
20181 done
20182   done
20183 IFS=$as_save_IFS
20184 
20185   ;;
20186 esac
20187 fi
20188 TOOLS_DIR_CXX=$ac_cv_path_TOOLS_DIR_CXX
20189 if test -n "$TOOLS_DIR_CXX"; then
20190   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLS_DIR_CXX" >&5
20191 $as_echo "$TOOLS_DIR_CXX" >&6; }
20192 else
20193   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20194 $as_echo "no" >&6; }
20195 fi
20196 
20197 
20198   test -n "$TOOLS_DIR_CXX" && break
20199 done
20200 
20201     CXX=$TOOLS_DIR_CXX
20202     PATH="$PATH_save"
20203   fi
20204 
20205   # AC_PATH_PROGS can't be run multiple times with the same variable,
20206   # so create a new name for this run.
20207   if test "x$CXX" = x; then
20208     for ac_prog in $COMPILER_CHECK_LIST
20209 do
20210   # Extract the first word of "$ac_prog", so it can be a program name with args.
20211 set dummy $ac_prog; ac_word=$2
20212 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20213 $as_echo_n "checking for $ac_word... " >&6; }
20214 if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
20215   $as_echo_n "(cached) " >&6
20216 else
20217   case $POTENTIAL_CXX in
20218   [\\/]* | ?:[\\/]*)
20219   ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
20220   ;;
20221   *)
20222   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20223 for as_dir in $PATH
20224 do
20225   IFS=$as_save_IFS
20226   test -z "$as_dir" && as_dir=.
20227     for ac_exec_ext in '' $ac_executable_extensions; do
20228   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
20229     ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
20230     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20231     break 2
20232   fi
20233 done
20234   done
20235 IFS=$as_save_IFS
20236 
20237   ;;
20238 esac
20239 fi
20240 POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
20241 if test -n "$POTENTIAL_CXX"; then
20242   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
20243 $as_echo "$POTENTIAL_CXX" >&6; }
20244 else
20245   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20246 $as_echo "no" >&6; }
20247 fi
20248 
20249 
20250   test -n "$POTENTIAL_CXX" && break
20251 done
20252 
20253     CXX=$POTENTIAL_CXX
20254   fi
20255 
20256   if test "x$CXX" = x; then
20257 
20258     # Print a helpful message on how to acquire the necessary build dependency.
20259     # devkit is the help tag: freetyp2, cups, pulse, alsa etc
20260     MISSING_DEPENDENCY=devkit
20261     PKGHANDLER_COMMAND=
20262 
20263     case $PKGHANDLER in
20264         apt-get)
20265                 apt_help     $MISSING_DEPENDENCY ;;
20266     yum)
20267                 yum_help     $MISSING_DEPENDENCY ;;
20268         port)
20269                 port_help    $MISSING_DEPENDENCY ;;
20270         pkgutil)
20271                 pkgutil_help $MISSING_DEPENDENCY ;;
20272         pkgadd)
20273                 pkgadd_help  $MISSING_DEPENDENCY ;;
20274     * )
20275       break ;;
20276     esac
20277 
20278     if test "x$PKGHANDLER_COMMAND" != x; then
20279         HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
20280     fi
20281 
20282       as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
20283   fi
20284 
20285   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20286 
20287   # First separate the path from the arguments. This will split at the first
20288   # space.
20289   complete="$CXX"
20290   path="${complete%% *}"
20291   tmp="$complete EOL"
20292   arguments="${tmp#* }"
20293 
20294   # Input might be given as Windows format, start by converting to
20295   # unix format.
20296   new_path=`$CYGPATH -u "$path"`
20297 
20298   # Now try to locate executable using which
20299   new_path=`$WHICH "$new_path" 2> /dev/null`
20300   # bat and cmd files are not always considered executable in cygwin causing which
20301   # to not find them
20302   if test "x$new_path" = x \
20303            && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20304            && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20305     new_path=`$CYGPATH -u "$path"`
20306   fi
20307   if test "x$new_path" = x; then
20308     # Oops. Which didn't find the executable.
20309     # The splitting of arguments from the executable at a space might have been incorrect,
20310     # since paths with space are more likely in Windows. Give it another try with the whole
20311     # argument.
20312     path="$complete"
20313     arguments="EOL"
20314     new_path=`$CYGPATH -u "$path"`
20315     new_path=`$WHICH "$new_path" 2> /dev/null`
20316     # bat and cmd files are not always considered executable in cygwin causing which
20317     # to not find them
20318     if test "x$new_path" = x \
20319              && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20320              && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20321       new_path=`$CYGPATH -u "$path"`
20322     fi
20323     if test "x$new_path" = x; then
20324       # It's still not found. Now this is an unrecoverable error.
20325       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
20326 $as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
20327       has_space=`$ECHO "$complete" | $GREP " "`
20328       if test "x$has_space" != x; then
20329         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20330 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20331       fi
20332       as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
20333     fi
20334   fi
20335 
20336   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20337   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20338   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20339   # "foo.exe" is OK but "foo" is an error.
20340   #
20341   # This test is therefore slightly more accurate than "test -f" to check for file precense.
20342   # It is also a way to make sure we got the proper file name for the real test later on.
20343   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20344   if test "x$test_shortpath" = x; then
20345     # Short path failed, file does not exist as specified.
20346     # Try adding .exe or .cmd
20347     if test -f "${new_path}.exe"; then
20348        input_to_shortpath="${new_path}.exe"
20349     elif test -f "${new_path}.cmd"; then
20350        input_to_shortpath="${new_path}.cmd"
20351     else
20352       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$new_path\", is invalid." >&5
20353 $as_echo "$as_me: The path of CXX, which resolves as \"$new_path\", is invalid." >&6;}
20354       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
20355 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
20356       as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
20357     fi
20358   else
20359     input_to_shortpath="$new_path"
20360   fi
20361 
20362   # Call helper function which possibly converts this using DOS-style short mode.
20363   # If so, the updated path is stored in $new_path.
20364   new_path="$input_to_shortpath"
20365 
20366   input_path="$input_to_shortpath"
20367   # Check if we need to convert this using DOS-style short mode. If the path
20368   # contains just simple characters, use it. Otherwise (spaces, weird characters),
20369   # take no chances and rewrite it.
20370   # Note: m4 eats our [], so we need to use [ and ] instead.
20371   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20372   if test "x$has_forbidden_chars" != x; then
20373     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20374     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20375     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20376     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20377       # Going to short mode and back again did indeed matter. Since short mode is
20378       # case insensitive, let's make it lowercase to improve readability.
20379       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20380       # Now convert it back to Unix-stile (cygpath)
20381       input_path=`$CYGPATH -u "$shortmode_path"`
20382       new_path="$input_path"
20383     fi
20384   fi
20385 
20386   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20387   if test "x$test_cygdrive_prefix" = x; then
20388     # As a simple fix, exclude /usr/bin since it's not a real path.
20389     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
20390       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20391       # a path prefixed by /cygdrive for fixpath to work.
20392       new_path="$CYGWIN_ROOT_PATH$input_path"
20393     fi
20394   fi
20395 
20396   # remove trailing .exe if any
20397   new_path="${new_path/%.exe/}"
20398 
20399   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20400 
20401   # First separate the path from the arguments. This will split at the first
20402   # space.
20403   complete="$CXX"
20404   path="${complete%% *}"
20405   tmp="$complete EOL"
20406   arguments="${tmp#* }"
20407 
20408   # Input might be given as Windows format, start by converting to
20409   # unix format.
20410   new_path="$path"
20411 
20412   windows_path="$new_path"
20413   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20414     unix_path=`$CYGPATH -u "$windows_path"`
20415     new_path="$unix_path"
20416   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20417     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20418     new_path="$unix_path"
20419   fi
20420 
20421 
20422   # Now try to locate executable using which
20423   new_path=`$WHICH "$new_path" 2> /dev/null`
20424 
20425   if test "x$new_path" = x; then
20426     # Oops. Which didn't find the executable.
20427     # The splitting of arguments from the executable at a space might have been incorrect,
20428     # since paths with space are more likely in Windows. Give it another try with the whole
20429     # argument.
20430     path="$complete"
20431     arguments="EOL"
20432     new_path="$path"
20433 
20434   windows_path="$new_path"
20435   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20436     unix_path=`$CYGPATH -u "$windows_path"`
20437     new_path="$unix_path"
20438   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20439     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20440     new_path="$unix_path"
20441   fi
20442 
20443 
20444     new_path=`$WHICH "$new_path" 2> /dev/null`
20445 
20446     if test "x$new_path" = x; then
20447       # It's still not found. Now this is an unrecoverable error.
20448       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
20449 $as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
20450       has_space=`$ECHO "$complete" | $GREP " "`
20451       if test "x$has_space" != x; then
20452         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20453 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20454       fi
20455       as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
20456     fi
20457   fi
20458 
20459   # Now new_path has a complete unix path to the binary
20460   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
20461     # Keep paths in /bin as-is, but remove trailing .exe if any
20462     new_path="${new_path/%.exe/}"
20463     # Do not save /bin paths to all_fixpath_prefixes!
20464   else
20465     # Not in mixed or Windows style, start by that.
20466     new_path=`cmd //c echo $new_path`
20467 
20468   input_path="$new_path"
20469   # Check if we need to convert this using DOS-style short mode. If the path
20470   # contains just simple characters, use it. Otherwise (spaces, weird characters),
20471   # take no chances and rewrite it.
20472   # Note: m4 eats our [], so we need to use [ and ] instead.
20473   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20474   if test "x$has_forbidden_chars" != x; then
20475     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20476     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20477   fi
20478 
20479     # Output is in $new_path
20480 
20481   windows_path="$new_path"
20482   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20483     unix_path=`$CYGPATH -u "$windows_path"`
20484     new_path="$unix_path"
20485   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20486     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20487     new_path="$unix_path"
20488   fi
20489 
20490     # remove trailing .exe if any
20491     new_path="${new_path/%.exe/}"
20492 
20493     # Save the first 10 bytes of this path to the storage, so fixpath can work.
20494     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20495   fi
20496 
20497   else
20498     # We're on a posix platform. Hooray! :)
20499     # First separate the path from the arguments. This will split at the first
20500     # space.
20501     complete="$CXX"
20502     path="${complete%% *}"
20503     tmp="$complete EOL"
20504     arguments="${tmp#* }"
20505 
20506     # Cannot rely on the command "which" here since it doesn't always work.
20507     is_absolute_path=`$ECHO "$path" | $GREP ^/`
20508     if test -z "$is_absolute_path"; then
20509       # Path to executable is not absolute. Find it.
20510       IFS_save="$IFS"
20511       IFS=:
20512       for p in $PATH; do
20513         if test -f "$p/$path" && test -x "$p/$path"; then
20514           new_path="$p/$path"
20515           break
20516         fi
20517       done
20518       IFS="$IFS_save"
20519     else
20520       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CXX (as $path) failed, using $path directly." >&5
20521 $as_echo "$as_me: Resolving CXX (as $path) failed, using $path directly." >&6;}
20522       new_path="$path"
20523     fi
20524 
20525     if test "x$new_path" = x; then
20526         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
20527 $as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
20528         has_space=`$ECHO "$complete" | $GREP " "`
20529         if test "x$has_space" != x; then
20530           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
20531 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
20532         fi
20533         as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
20534       fi
20535   fi
20536 
20537       # Now join together the path and the arguments once again
20538       if test "x$arguments" != xEOL; then
20539         new_complete="$new_path ${arguments% *}"
20540       else
20541         new_complete="$new_path"
20542       fi
20543 
20544   if test "x$complete" != "x$new_complete"; then
20545       CXX="$new_complete"
20546       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXX to \"$new_complete\"" >&5
20547 $as_echo "$as_me: Rewriting CXX to \"$new_complete\"" >&6;}
20548     fi
20549 
20550   { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CXX" >&5
20551 $as_echo_n "checking resolved symbolic links for CXX... " >&6; }
20552   TEST_COMPILER="$CXX"
20553 
20554     if test "x$OPENJDK_BUILD_OS" != xwindows; then
20555         # Follow a chain of symbolic links. Use readlink
20556         # where it exists, else fall back to horribly
20557         # complicated shell code.
20558         if test "x$READLINK_TESTED" != yes; then
20559             # On MacOSX there is a readlink tool with a different
20560             # purpose than the GNU readlink tool. Check the found readlink.
20561             ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
20562             if test "x$ISGNU" = x; then
20563                  # A readlink that we do not know how to use.
20564                  # Are there other non-GNU readlinks out there?
20565                  READLINK_TESTED=yes
20566                  READLINK=
20567             fi
20568         fi
20569 
20570         if test "x$READLINK" != x; then
20571             TEST_COMPILER=`$READLINK -f $TEST_COMPILER`
20572         else
20573             # Save the current directory for restoring afterwards
20574             STARTDIR=$PWD
20575             COUNTER=0
20576             sym_link_dir=`$DIRNAME $TEST_COMPILER`
20577             sym_link_file=`$BASENAME $TEST_COMPILER`
20578             # Use the system pwd and not the shell builtin to resolve directory symlinks
20579             cd $sym_link_dir
20580             cd `$THEPWDCMD`
20581             sym_link_dir=`$THEPWDCMD`
20582             # Resolve file symlinks
20583             while test $COUNTER -lt 20; do
20584                 ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
20585                 if test "x$ISLINK" == x; then
20586                     # This is not a symbolic link! We are done!
20587                     break
20588                 fi
20589                 # Again resolve directory symlinks since the target of the just found
20590                 # link could be in a different directory
20591                 cd `$DIRNAME $ISLINK`
20592                 sym_link_dir=`$THEPWDCMD`
20593                 sym_link_file=`$BASENAME $ISLINK`
20594                 let COUNTER=COUNTER+1
20595             done
20596             cd $STARTDIR
20597             TEST_COMPILER=$sym_link_dir/$sym_link_file
20598         fi
20599     fi
20600 
20601   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_COMPILER" >&5
20602 $as_echo "$TEST_COMPILER" >&6; }
20603   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CXX is disguised ccache" >&5
20604 $as_echo_n "checking if CXX is disguised ccache... " >&6; }
20605 
20606   COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"`
20607   if test "x$COMPILER_BASENAME" = "xccache"; then
20608     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5
20609 $as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; }
20610     # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache.
20611     # We want to control ccache invocation ourselves, so ignore this cc and try
20612     # searching again.
20613 
20614     # Remove the path to the fake ccache cc from the PATH
20615     RETRY_COMPILER_SAVED_PATH="$PATH"
20616     COMPILER_DIRNAME=`$DIRNAME $CXX`
20617     PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`"
20618 
20619     # Try again looking for our compiler
20620     if test -n "$ac_tool_prefix"; then
20621   for ac_prog in $COMPILER_CHECK_LIST
20622   do
20623     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
20624 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
20625 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20626 $as_echo_n "checking for $ac_word... " >&6; }
20627 if ${ac_cv_prog_PROPER_COMPILER_CXX+:} false; then :
20628   $as_echo_n "(cached) " >&6
20629 else
20630   if test -n "$PROPER_COMPILER_CXX"; then
20631   ac_cv_prog_PROPER_COMPILER_CXX="$PROPER_COMPILER_CXX" # Let the user override the test.
20632 else
20633 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20634 for as_dir in $PATH
20635 do
20636   IFS=$as_save_IFS
20637   test -z "$as_dir" && as_dir=.
20638     for ac_exec_ext in '' $ac_executable_extensions; do
20639   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
20640     ac_cv_prog_PROPER_COMPILER_CXX="$ac_tool_prefix$ac_prog"
20641     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20642     break 2
20643   fi
20644 done
20645   done
20646 IFS=$as_save_IFS
20647 
20648 fi
20649 fi
20650 PROPER_COMPILER_CXX=$ac_cv_prog_PROPER_COMPILER_CXX
20651 if test -n "$PROPER_COMPILER_CXX"; then
20652   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5
20653 $as_echo "$PROPER_COMPILER_CXX" >&6; }
20654 else
20655   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20656 $as_echo "no" >&6; }
20657 fi
20658 
20659 
20660     test -n "$PROPER_COMPILER_CXX" && break
20661   done
20662 fi
20663 if test -z "$PROPER_COMPILER_CXX"; then
20664   ac_ct_PROPER_COMPILER_CXX=$PROPER_COMPILER_CXX
20665   for ac_prog in $COMPILER_CHECK_LIST
20666 do
20667   # Extract the first word of "$ac_prog", so it can be a program name with args.
20668 set dummy $ac_prog; ac_word=$2
20669 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20670 $as_echo_n "checking for $ac_word... " >&6; }
20671 if ${ac_cv_prog_ac_ct_PROPER_COMPILER_CXX+:} false; then :
20672   $as_echo_n "(cached) " >&6
20673 else
20674   if test -n "$ac_ct_PROPER_COMPILER_CXX"; then
20675   ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_ct_PROPER_COMPILER_CXX" # Let the user override the test.
20676 else
20677 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20678 for as_dir in $PATH
20679 do
20680   IFS=$as_save_IFS
20681   test -z "$as_dir" && as_dir=.
20682     for ac_exec_ext in '' $ac_executable_extensions; do
20683   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
20684     ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_prog"
20685     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20686     break 2
20687   fi
20688 done
20689   done
20690 IFS=$as_save_IFS
20691 
20692 fi
20693 fi
20694 ac_ct_PROPER_COMPILER_CXX=$ac_cv_prog_ac_ct_PROPER_COMPILER_CXX
20695 if test -n "$ac_ct_PROPER_COMPILER_CXX"; then
20696   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CXX" >&5
20697 $as_echo "$ac_ct_PROPER_COMPILER_CXX" >&6; }
20698 else
20699   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20700 $as_echo "no" >&6; }
20701 fi
20702 
20703 
20704   test -n "$ac_ct_PROPER_COMPILER_CXX" && break
20705 done
20706 
20707   if test "x$ac_ct_PROPER_COMPILER_CXX" = x; then
20708     PROPER_COMPILER_CXX=""
20709   else
20710     case $cross_compiling:$ac_tool_warned in
20711 yes:)
20712 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
20713 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
20714 ac_tool_warned=yes ;;
20715 esac
20716     PROPER_COMPILER_CXX=$ac_ct_PROPER_COMPILER_CXX
20717   fi
20718 fi
20719 
20720 
20721   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20722 
20723   # First separate the path from the arguments. This will split at the first
20724   # space.
20725   complete="$PROPER_COMPILER_CXX"
20726   path="${complete%% *}"
20727   tmp="$complete EOL"
20728   arguments="${tmp#* }"
20729 
20730   # Input might be given as Windows format, start by converting to
20731   # unix format.
20732   new_path=`$CYGPATH -u "$path"`
20733 
20734   # Now try to locate executable using which
20735   new_path=`$WHICH "$new_path" 2> /dev/null`
20736   # bat and cmd files are not always considered executable in cygwin causing which
20737   # to not find them
20738   if test "x$new_path" = x \
20739            && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20740            && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20741     new_path=`$CYGPATH -u "$path"`
20742   fi
20743   if test "x$new_path" = x; then
20744     # Oops. Which didn't find the executable.
20745     # The splitting of arguments from the executable at a space might have been incorrect,
20746     # since paths with space are more likely in Windows. Give it another try with the whole
20747     # argument.
20748     path="$complete"
20749     arguments="EOL"
20750     new_path=`$CYGPATH -u "$path"`
20751     new_path=`$WHICH "$new_path" 2> /dev/null`
20752     # bat and cmd files are not always considered executable in cygwin causing which
20753     # to not find them
20754     if test "x$new_path" = x \
20755              && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20756              && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20757       new_path=`$CYGPATH -u "$path"`
20758     fi
20759     if test "x$new_path" = x; then
20760       # It's still not found. Now this is an unrecoverable error.
20761       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
20762 $as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
20763       has_space=`$ECHO "$complete" | $GREP " "`
20764       if test "x$has_space" != x; then
20765         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20766 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20767       fi
20768       as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
20769     fi
20770   fi
20771 
20772   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20773   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20774   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20775   # "foo.exe" is OK but "foo" is an error.
20776   #
20777   # This test is therefore slightly more accurate than "test -f" to check for file precense.
20778   # It is also a way to make sure we got the proper file name for the real test later on.
20779   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20780   if test "x$test_shortpath" = x; then
20781     # Short path failed, file does not exist as specified.
20782     # Try adding .exe or .cmd
20783     if test -f "${new_path}.exe"; then
20784        input_to_shortpath="${new_path}.exe"
20785     elif test -f "${new_path}.cmd"; then
20786        input_to_shortpath="${new_path}.cmd"
20787     else
20788       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&5
20789 $as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&6;}
20790       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
20791 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
20792       as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
20793     fi
20794   else
20795     input_to_shortpath="$new_path"
20796   fi
20797 
20798   # Call helper function which possibly converts this using DOS-style short mode.
20799   # If so, the updated path is stored in $new_path.
20800   new_path="$input_to_shortpath"
20801 
20802   input_path="$input_to_shortpath"
20803   # Check if we need to convert this using DOS-style short mode. If the path
20804   # contains just simple characters, use it. Otherwise (spaces, weird characters),
20805   # take no chances and rewrite it.
20806   # Note: m4 eats our [], so we need to use [ and ] instead.
20807   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20808   if test "x$has_forbidden_chars" != x; then
20809     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20810     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20811     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20812     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20813       # Going to short mode and back again did indeed matter. Since short mode is
20814       # case insensitive, let's make it lowercase to improve readability.
20815       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20816       # Now convert it back to Unix-stile (cygpath)
20817       input_path=`$CYGPATH -u "$shortmode_path"`
20818       new_path="$input_path"
20819     fi
20820   fi
20821 
20822   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20823   if test "x$test_cygdrive_prefix" = x; then
20824     # As a simple fix, exclude /usr/bin since it's not a real path.
20825     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
20826       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20827       # a path prefixed by /cygdrive for fixpath to work.
20828       new_path="$CYGWIN_ROOT_PATH$input_path"
20829     fi
20830   fi
20831 
20832   # remove trailing .exe if any
20833   new_path="${new_path/%.exe/}"
20834 
20835   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20836 
20837   # First separate the path from the arguments. This will split at the first
20838   # space.
20839   complete="$PROPER_COMPILER_CXX"
20840   path="${complete%% *}"
20841   tmp="$complete EOL"
20842   arguments="${tmp#* }"
20843 
20844   # Input might be given as Windows format, start by converting to
20845   # unix format.
20846   new_path="$path"
20847 
20848   windows_path="$new_path"
20849   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20850     unix_path=`$CYGPATH -u "$windows_path"`
20851     new_path="$unix_path"
20852   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20853     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20854     new_path="$unix_path"
20855   fi
20856 
20857 
20858   # Now try to locate executable using which
20859   new_path=`$WHICH "$new_path" 2> /dev/null`
20860 
20861   if test "x$new_path" = x; then
20862     # Oops. Which didn't find the executable.
20863     # The splitting of arguments from the executable at a space might have been incorrect,
20864     # since paths with space are more likely in Windows. Give it another try with the whole
20865     # argument.
20866     path="$complete"
20867     arguments="EOL"
20868     new_path="$path"
20869 
20870   windows_path="$new_path"
20871   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20872     unix_path=`$CYGPATH -u "$windows_path"`
20873     new_path="$unix_path"
20874   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20875     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20876     new_path="$unix_path"
20877   fi
20878 
20879 
20880     new_path=`$WHICH "$new_path" 2> /dev/null`
20881 
20882     if test "x$new_path" = x; then
20883       # It's still not found. Now this is an unrecoverable error.
20884       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
20885 $as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
20886       has_space=`$ECHO "$complete" | $GREP " "`
20887       if test "x$has_space" != x; then
20888         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20889 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20890       fi
20891       as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
20892     fi
20893   fi
20894 
20895   # Now new_path has a complete unix path to the binary
20896   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
20897     # Keep paths in /bin as-is, but remove trailing .exe if any
20898     new_path="${new_path/%.exe/}"
20899     # Do not save /bin paths to all_fixpath_prefixes!
20900   else
20901     # Not in mixed or Windows style, start by that.
20902     new_path=`cmd //c echo $new_path`
20903 
20904   input_path="$new_path"
20905   # Check if we need to convert this using DOS-style short mode. If the path
20906   # contains just simple characters, use it. Otherwise (spaces, weird characters),
20907   # take no chances and rewrite it.
20908   # Note: m4 eats our [], so we need to use [ and ] instead.
20909   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20910   if test "x$has_forbidden_chars" != x; then
20911     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20912     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20913   fi
20914 
20915     # Output is in $new_path
20916 
20917   windows_path="$new_path"
20918   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20919     unix_path=`$CYGPATH -u "$windows_path"`
20920     new_path="$unix_path"
20921   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20922     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20923     new_path="$unix_path"
20924   fi
20925 
20926     # remove trailing .exe if any
20927     new_path="${new_path/%.exe/}"
20928 
20929     # Save the first 10 bytes of this path to the storage, so fixpath can work.
20930     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20931   fi
20932 
20933   else
20934     # We're on a posix platform. Hooray! :)
20935     # First separate the path from the arguments. This will split at the first
20936     # space.
20937     complete="$PROPER_COMPILER_CXX"
20938     path="${complete%% *}"
20939     tmp="$complete EOL"
20940     arguments="${tmp#* }"
20941 
20942     # Cannot rely on the command "which" here since it doesn't always work.
20943     is_absolute_path=`$ECHO "$path" | $GREP ^/`
20944     if test -z "$is_absolute_path"; then
20945       # Path to executable is not absolute. Find it.
20946       IFS_save="$IFS"
20947       IFS=:
20948       for p in $PATH; do
20949         if test -f "$p/$path" && test -x "$p/$path"; then
20950           new_path="$p/$path"
20951           break
20952         fi
20953       done
20954       IFS="$IFS_save"
20955     else
20956       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving PROPER_COMPILER_CXX (as $path) failed, using $path directly." >&5
20957 $as_echo "$as_me: Resolving PROPER_COMPILER_CXX (as $path) failed, using $path directly." >&6;}
20958       new_path="$path"
20959     fi
20960 
20961     if test "x$new_path" = x; then
20962         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
20963 $as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
20964         has_space=`$ECHO "$complete" | $GREP " "`
20965         if test "x$has_space" != x; then
20966           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
20967 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
20968         fi
20969         as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
20970       fi
20971   fi
20972 
20973       # Now join together the path and the arguments once again
20974       if test "x$arguments" != xEOL; then
20975         new_complete="$new_path ${arguments% *}"
20976       else
20977         new_complete="$new_path"
20978       fi
20979 
20980   if test "x$complete" != "x$new_complete"; then
20981       PROPER_COMPILER_CXX="$new_complete"
20982       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&5
20983 $as_echo "$as_me: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&6;}
20984     fi
20985 
20986     PATH="$RETRY_COMPILER_SAVED_PATH"
20987 
20988     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CXX" >&5
20989 $as_echo_n "checking for resolved symbolic links for CXX... " >&6; }
20990 
20991     if test "x$OPENJDK_BUILD_OS" != xwindows; then
20992         # Follow a chain of symbolic links. Use readlink
20993         # where it exists, else fall back to horribly
20994         # complicated shell code.
20995         if test "x$READLINK_TESTED" != yes; then
20996             # On MacOSX there is a readlink tool with a different
20997             # purpose than the GNU readlink tool. Check the found readlink.
20998             ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
20999             if test "x$ISGNU" = x; then
21000                  # A readlink that we do not know how to use.
21001                  # Are there other non-GNU readlinks out there?
21002                  READLINK_TESTED=yes
21003                  READLINK=
21004             fi
21005         fi
21006 
21007         if test "x$READLINK" != x; then
21008             PROPER_COMPILER_CXX=`$READLINK -f $PROPER_COMPILER_CXX`
21009         else
21010             # Save the current directory for restoring afterwards
21011             STARTDIR=$PWD
21012             COUNTER=0
21013             sym_link_dir=`$DIRNAME $PROPER_COMPILER_CXX`
21014             sym_link_file=`$BASENAME $PROPER_COMPILER_CXX`
21015             # Use the system pwd and not the shell builtin to resolve directory symlinks
21016             cd $sym_link_dir
21017             cd `$THEPWDCMD`
21018             sym_link_dir=`$THEPWDCMD`
21019             # Resolve file symlinks
21020             while test $COUNTER -lt 20; do
21021                 ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
21022                 if test "x$ISLINK" == x; then
21023                     # This is not a symbolic link! We are done!
21024                     break
21025                 fi
21026                 # Again resolve directory symlinks since the target of the just found
21027                 # link could be in a different directory
21028                 cd `$DIRNAME $ISLINK`
21029                 sym_link_dir=`$THEPWDCMD`
21030                 sym_link_file=`$BASENAME $ISLINK`
21031                 let COUNTER=COUNTER+1
21032             done
21033             cd $STARTDIR
21034             PROPER_COMPILER_CXX=$sym_link_dir/$sym_link_file
21035         fi
21036     fi
21037 
21038     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5
21039 $as_echo "$PROPER_COMPILER_CXX" >&6; }
21040     CXX="$PROPER_COMPILER_CXX"
21041   else
21042     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CXX" >&5
21043 $as_echo "no, keeping CXX" >&6; }
21044     CXX="$TEST_COMPILER"
21045   fi
21046 
21047   COMPILER=$CXX
21048   COMPILER_NAME=$COMPILER_NAME
21049 
21050   if test "x$OPENJDK_TARGET_OS" = xsolaris; then
21051     # Make sure we use the Sun Studio compiler and not gcc on Solaris, which won't work
21052     COMPILER_VERSION_TEST=`$COMPILER -V 2>&1 | $HEAD -n 1`
21053     $ECHO $COMPILER_VERSION_TEST | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
21054     if test $? -ne 0; then
21055       GCC_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
21056 
21057       { $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
21058 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required Sun Studio compiler." >&6;}
21059       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&5
21060 $as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&6;}
21061       as_fn_error $? "Sun Studio compiler is required. Try setting --with-tools-dir." "$LINENO" 5
21062     else
21063       COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/p"`
21064       COMPILER_VENDOR="Sun Studio"
21065     fi
21066   elif test  "x$OPENJDK_TARGET_OS" = xwindows; then
21067     # First line typically looks something like:
21068     # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.30319.01 for 80x86
21069     COMPILER_VERSION_TEST=`$COMPILER 2>&1 | $HEAD -n 1`
21070     COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*Version \([1-9][0-9.]*\) .*/\1/p"`
21071     COMPILER_VENDOR="Microsoft CL.EXE"
21072     COMPILER_CPU_TEST=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* for \(.*\)$/\1/p"`
21073     if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
21074       if test "x$COMPILER_CPU_TEST" != "x80x86"; then
21075         as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"80x86\"." "$LINENO" 5
21076       fi
21077     elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
21078       if test "x$COMPILER_CPU_TEST" != "xx64"; then
21079         as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." "$LINENO" 5
21080       fi
21081     fi
21082   else
21083     COMPILER_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
21084     # Check that this is likely to be GCC.
21085     $COMPILER --version 2>&1 | $GREP "Free Software Foundation" > /dev/null
21086     if test $? -ne 0; then
21087       { $as_echo "$as_me:${as_lineno-$LINENO}: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&5
21088 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&6;}
21089       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&5
21090 $as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&6;}
21091       as_fn_error $? "GCC compiler is required. Try setting --with-tools-dir." "$LINENO" 5
21092     fi
21093 
21094     # First line typically looks something like:
21095     # gcc (Ubuntu/Linaro 4.5.2-8ubuntu4) 4.5.2
21096     COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* \([1-9][0-9.]*\)/\1/p"`
21097     COMPILER_VENDOR=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^\(.*\) [1-9][0-9.]*/\1/p"`
21098   fi
21099   # This sets CC_VERSION or CXX_VERSION. (This comment is a grep marker)
21100   CXX_VERSION="$COMPILER_VERSION"
21101   # This sets CC_VENDOR or CXX_VENDOR. (This comment is a grep marker)
21102   CXX_VENDOR="$COMPILER_VENDOR"
21103 
21104   { $as_echo "$as_me:${as_lineno-$LINENO}: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&5
21105 $as_echo "$as_me: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&6;}
21106 
21107 
21108 # Now that we have resolved CXX ourself, let autoconf have its go at it
21109 ac_ext=cpp
21110 ac_cpp='$CXXCPP $CPPFLAGS'
21111 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
21112 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
21113 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
21114 if test -z "$CXX"; then
21115   if test -n "$CCC"; then
21116     CXX=$CCC
21117   else
21118     if test -n "$ac_tool_prefix"; then
21119   for ac_prog in $CXX
21120   do
21121     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
21122 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
21123 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21124 $as_echo_n "checking for $ac_word... " >&6; }
21125 if ${ac_cv_prog_CXX+:} false; then :
21126   $as_echo_n "(cached) " >&6
21127 else
21128   if test -n "$CXX"; then
21129   ac_cv_prog_CXX="$CXX" # Let the user override the test.
21130 else
21131 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21132 for as_dir in $PATH
21133 do
21134   IFS=$as_save_IFS
21135   test -z "$as_dir" && as_dir=.
21136     for ac_exec_ext in '' $ac_executable_extensions; do
21137   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
21138     ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
21139     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21140     break 2
21141   fi
21142 done
21143   done
21144 IFS=$as_save_IFS
21145 
21146 fi
21147 fi
21148 CXX=$ac_cv_prog_CXX
21149 if test -n "$CXX"; then
21150   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
21151 $as_echo "$CXX" >&6; }
21152 else
21153   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21154 $as_echo "no" >&6; }
21155 fi
21156 
21157 
21158     test -n "$CXX" && break
21159   done
21160 fi
21161 if test -z "$CXX"; then
21162   ac_ct_CXX=$CXX
21163   for ac_prog in $CXX
21164 do
21165   # Extract the first word of "$ac_prog", so it can be a program name with args.
21166 set dummy $ac_prog; ac_word=$2
21167 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21168 $as_echo_n "checking for $ac_word... " >&6; }
21169 if ${ac_cv_prog_ac_ct_CXX+:} false; then :
21170   $as_echo_n "(cached) " >&6
21171 else
21172   if test -n "$ac_ct_CXX"; then
21173   ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
21174 else
21175 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21176 for as_dir in $PATH
21177 do
21178   IFS=$as_save_IFS
21179   test -z "$as_dir" && as_dir=.
21180     for ac_exec_ext in '' $ac_executable_extensions; do
21181   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
21182     ac_cv_prog_ac_ct_CXX="$ac_prog"
21183     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21184     break 2
21185   fi
21186 done
21187   done
21188 IFS=$as_save_IFS
21189 
21190 fi
21191 fi
21192 ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
21193 if test -n "$ac_ct_CXX"; then
21194   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
21195 $as_echo "$ac_ct_CXX" >&6; }
21196 else
21197   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21198 $as_echo "no" >&6; }
21199 fi
21200 
21201 
21202   test -n "$ac_ct_CXX" && break
21203 done
21204 
21205   if test "x$ac_ct_CXX" = x; then
21206     CXX="g++"
21207   else
21208     case $cross_compiling:$ac_tool_warned in
21209 yes:)
21210 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
21211 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
21212 ac_tool_warned=yes ;;
21213 esac
21214     CXX=$ac_ct_CXX
21215   fi
21216 fi
21217 
21218   fi
21219 fi
21220 # Provide some information about the compiler.
21221 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
21222 set X $ac_compile
21223 ac_compiler=$2
21224 for ac_option in --version -v -V -qversion; do
21225   { { ac_try="$ac_compiler $ac_option >&5"
21226 case "(($ac_try" in
21227   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21228   *) ac_try_echo=$ac_try;;
21229 esac
21230 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
21231 $as_echo "$ac_try_echo"; } >&5
21232   (eval "$ac_compiler $ac_option >&5") 2>conftest.err
21233   ac_status=$?
21234   if test -s conftest.err; then
21235     sed '10a\
21236 ... rest of stderr output deleted ...
21237          10q' conftest.err >conftest.er1
21238     cat conftest.er1 >&5
21239   fi
21240   rm -f conftest.er1 conftest.err
21241   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
21242   test $ac_status = 0; }
21243 done
21244 
21245 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
21246 $as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
21247 if ${ac_cv_cxx_compiler_gnu+:} false; then :
21248   $as_echo_n "(cached) " >&6
21249 else
21250   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21251 /* end confdefs.h.  */
21252 
21253 int
21254 main ()
21255 {
21256 #ifndef __GNUC__
21257        choke me
21258 #endif
21259 
21260   ;
21261   return 0;
21262 }
21263 _ACEOF
21264 if ac_fn_cxx_try_compile "$LINENO"; then :
21265   ac_compiler_gnu=yes
21266 else
21267   ac_compiler_gnu=no
21268 fi
21269 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21270 ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
21271 
21272 fi
21273 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
21274 $as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
21275 if test $ac_compiler_gnu = yes; then
21276   GXX=yes
21277 else
21278   GXX=
21279 fi
21280 ac_test_CXXFLAGS=${CXXFLAGS+set}
21281 ac_save_CXXFLAGS=$CXXFLAGS
21282 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
21283 $as_echo_n "checking whether $CXX accepts -g... " >&6; }
21284 if ${ac_cv_prog_cxx_g+:} false; then :
21285   $as_echo_n "(cached) " >&6
21286 else
21287   ac_save_cxx_werror_flag=$ac_cxx_werror_flag
21288    ac_cxx_werror_flag=yes
21289    ac_cv_prog_cxx_g=no
21290    CXXFLAGS="-g"
21291    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21292 /* end confdefs.h.  */
21293 
21294 int
21295 main ()
21296 {
21297 
21298   ;
21299   return 0;
21300 }
21301 _ACEOF
21302 if ac_fn_cxx_try_compile "$LINENO"; then :
21303   ac_cv_prog_cxx_g=yes
21304 else
21305   CXXFLAGS=""
21306       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21307 /* end confdefs.h.  */
21308 
21309 int
21310 main ()
21311 {
21312 
21313   ;
21314   return 0;
21315 }
21316 _ACEOF
21317 if ac_fn_cxx_try_compile "$LINENO"; then :
21318 
21319 else
21320   ac_cxx_werror_flag=$ac_save_cxx_werror_flag
21321          CXXFLAGS="-g"
21322          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21323 /* end confdefs.h.  */
21324 
21325 int
21326 main ()
21327 {
21328 
21329   ;
21330   return 0;
21331 }
21332 _ACEOF
21333 if ac_fn_cxx_try_compile "$LINENO"; then :
21334   ac_cv_prog_cxx_g=yes
21335 fi
21336 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21337 fi
21338 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21339 fi
21340 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21341    ac_cxx_werror_flag=$ac_save_cxx_werror_flag
21342 fi
21343 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
21344 $as_echo "$ac_cv_prog_cxx_g" >&6; }
21345 if test "$ac_test_CXXFLAGS" = set; then
21346   CXXFLAGS=$ac_save_CXXFLAGS
21347 elif test $ac_cv_prog_cxx_g = yes; then
21348   if test "$GXX" = yes; then
21349     CXXFLAGS="-g -O2"
21350   else
21351     CXXFLAGS="-g"
21352   fi
21353 else
21354   if test "$GXX" = yes; then
21355     CXXFLAGS="-O2"
21356   else
21357     CXXFLAGS=
21358   fi
21359 fi
21360 ac_ext=cpp
21361 ac_cpp='$CXXCPP $CPPFLAGS'
21362 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
21363 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
21364 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
21365 
21366 
21367 ### Locate other tools
21368 
21369 if test "x$OPENJDK_TARGET_OS" = xmacosx; then
21370     ac_ext=m
21371 ac_cpp='$OBJCPP $CPPFLAGS'
21372 ac_compile='$OBJC -c $OBJCFLAGS $CPPFLAGS conftest.$ac_ext >&5'
21373 ac_link='$OBJC -o conftest$ac_exeext $OBJCFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
21374 ac_compiler_gnu=$ac_cv_objc_compiler_gnu
21375 if test -n "$ac_tool_prefix"; then
21376   for ac_prog in gcc objcc objc cc CC
21377   do
21378     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
21379 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
21380 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21381 $as_echo_n "checking for $ac_word... " >&6; }
21382 if ${ac_cv_prog_OBJC+:} false; then :
21383   $as_echo_n "(cached) " >&6
21384 else
21385   if test -n "$OBJC"; then
21386   ac_cv_prog_OBJC="$OBJC" # Let the user override the test.
21387 else
21388 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21389 for as_dir in $PATH
21390 do
21391   IFS=$as_save_IFS
21392   test -z "$as_dir" && as_dir=.
21393     for ac_exec_ext in '' $ac_executable_extensions; do
21394   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
21395     ac_cv_prog_OBJC="$ac_tool_prefix$ac_prog"
21396     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21397     break 2
21398   fi
21399 done
21400   done
21401 IFS=$as_save_IFS
21402 
21403 fi
21404 fi
21405 OBJC=$ac_cv_prog_OBJC
21406 if test -n "$OBJC"; then
21407   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJC" >&5
21408 $as_echo "$OBJC" >&6; }
21409 else
21410   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21411 $as_echo "no" >&6; }
21412 fi
21413 
21414 
21415     test -n "$OBJC" && break
21416   done
21417 fi
21418 if test -z "$OBJC"; then
21419   ac_ct_OBJC=$OBJC
21420   for ac_prog in gcc objcc objc cc CC
21421 do
21422   # Extract the first word of "$ac_prog", so it can be a program name with args.
21423 set dummy $ac_prog; ac_word=$2
21424 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21425 $as_echo_n "checking for $ac_word... " >&6; }
21426 if ${ac_cv_prog_ac_ct_OBJC+:} false; then :
21427   $as_echo_n "(cached) " >&6
21428 else
21429   if test -n "$ac_ct_OBJC"; then
21430   ac_cv_prog_ac_ct_OBJC="$ac_ct_OBJC" # Let the user override the test.
21431 else
21432 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21433 for as_dir in $PATH
21434 do
21435   IFS=$as_save_IFS
21436   test -z "$as_dir" && as_dir=.
21437     for ac_exec_ext in '' $ac_executable_extensions; do
21438   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
21439     ac_cv_prog_ac_ct_OBJC="$ac_prog"
21440     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21441     break 2
21442   fi
21443 done
21444   done
21445 IFS=$as_save_IFS
21446 
21447 fi
21448 fi
21449 ac_ct_OBJC=$ac_cv_prog_ac_ct_OBJC
21450 if test -n "$ac_ct_OBJC"; then
21451   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJC" >&5
21452 $as_echo "$ac_ct_OBJC" >&6; }
21453 else
21454   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21455 $as_echo "no" >&6; }
21456 fi
21457 
21458 
21459   test -n "$ac_ct_OBJC" && break
21460 done
21461 
21462   if test "x$ac_ct_OBJC" = x; then
21463     OBJC="gcc"
21464   else
21465     case $cross_compiling:$ac_tool_warned in
21466 yes:)
21467 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
21468 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
21469 ac_tool_warned=yes ;;
21470 esac
21471     OBJC=$ac_ct_OBJC
21472   fi
21473 fi
21474 
21475 # Provide some information about the compiler.
21476 $as_echo "$as_me:${as_lineno-$LINENO}: checking for Objective C compiler version" >&5
21477 set X $ac_compile
21478 ac_compiler=$2
21479 for ac_option in --version -v -V -qversion; do
21480   { { ac_try="$ac_compiler $ac_option >&5"
21481 case "(($ac_try" in
21482   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21483   *) ac_try_echo=$ac_try;;
21484 esac
21485 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
21486 $as_echo "$ac_try_echo"; } >&5
21487   (eval "$ac_compiler $ac_option >&5") 2>conftest.err
21488   ac_status=$?
21489   if test -s conftest.err; then
21490     sed '10a\
21491 ... rest of stderr output deleted ...
21492          10q' conftest.err >conftest.er1
21493     cat conftest.er1 >&5
21494   fi
21495   rm -f conftest.er1 conftest.err
21496   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
21497   test $ac_status = 0; }
21498 done
21499 
21500 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU Objective C compiler" >&5
21501 $as_echo_n "checking whether we are using the GNU Objective C compiler... " >&6; }
21502 if ${ac_cv_objc_compiler_gnu+:} false; then :
21503   $as_echo_n "(cached) " >&6
21504 else
21505   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21506 /* end confdefs.h.  */
21507 
21508 int
21509 main ()
21510 {
21511 #ifndef __GNUC__
21512        choke me
21513 #endif
21514 
21515   ;
21516   return 0;
21517 }
21518 _ACEOF
21519 if ac_fn_objc_try_compile "$LINENO"; then :
21520   ac_compiler_gnu=yes
21521 else
21522   ac_compiler_gnu=no
21523 fi
21524 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21525 ac_cv_objc_compiler_gnu=$ac_compiler_gnu
21526 
21527 fi
21528 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objc_compiler_gnu" >&5
21529 $as_echo "$ac_cv_objc_compiler_gnu" >&6; }
21530 if test $ac_compiler_gnu = yes; then
21531   GOBJC=yes
21532 else
21533   GOBJC=
21534 fi
21535 ac_test_OBJCFLAGS=${OBJCFLAGS+set}
21536 ac_save_OBJCFLAGS=$OBJCFLAGS
21537 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $OBJC accepts -g" >&5
21538 $as_echo_n "checking whether $OBJC accepts -g... " >&6; }
21539 if ${ac_cv_prog_objc_g+:} false; then :
21540   $as_echo_n "(cached) " >&6
21541 else
21542   ac_save_objc_werror_flag=$ac_objc_werror_flag
21543    ac_objc_werror_flag=yes
21544    ac_cv_prog_objc_g=no
21545    OBJCFLAGS="-g"
21546    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21547 /* end confdefs.h.  */
21548 
21549 int
21550 main ()
21551 {
21552 
21553   ;
21554   return 0;
21555 }
21556 _ACEOF
21557 if ac_fn_objc_try_compile "$LINENO"; then :
21558   ac_cv_prog_objc_g=yes
21559 else
21560   OBJCFLAGS=""
21561       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21562 /* end confdefs.h.  */
21563 
21564 int
21565 main ()
21566 {
21567 
21568   ;
21569   return 0;
21570 }
21571 _ACEOF
21572 if ac_fn_objc_try_compile "$LINENO"; then :
21573 
21574 else
21575   ac_objc_werror_flag=$ac_save_objc_werror_flag
21576          OBJCFLAGS="-g"
21577          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21578 /* end confdefs.h.  */
21579 
21580 int
21581 main ()
21582 {
21583 
21584   ;
21585   return 0;
21586 }
21587 _ACEOF
21588 if ac_fn_objc_try_compile "$LINENO"; then :
21589   ac_cv_prog_objc_g=yes
21590 fi
21591 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21592 fi
21593 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21594 fi
21595 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21596    ac_objc_werror_flag=$ac_save_objc_werror_flag
21597 fi
21598 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_objc_g" >&5
21599 $as_echo "$ac_cv_prog_objc_g" >&6; }
21600 if test "$ac_test_OBJCFLAGS" = set; then
21601   OBJCFLAGS=$ac_save_OBJCFLAGS
21602 elif test $ac_cv_prog_objc_g = yes; then
21603   if test "$GOBJC" = yes; then
21604     OBJCFLAGS="-g -O2"
21605   else
21606     OBJCFLAGS="-g"
21607   fi
21608 else
21609   if test "$GOBJC" = yes; then
21610     OBJCFLAGS="-O2"
21611   else
21612     OBJCFLAGS=
21613   fi
21614 fi
21615 ac_ext=cpp
21616 ac_cpp='$CXXCPP $CPPFLAGS'
21617 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
21618 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
21619 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
21620 
21621 
21622   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21623 
21624   # First separate the path from the arguments. This will split at the first
21625   # space.
21626   complete="$OBJC"
21627   path="${complete%% *}"
21628   tmp="$complete EOL"
21629   arguments="${tmp#* }"
21630 
21631   # Input might be given as Windows format, start by converting to
21632   # unix format.
21633   new_path=`$CYGPATH -u "$path"`
21634 
21635   # Now try to locate executable using which
21636   new_path=`$WHICH "$new_path" 2> /dev/null`
21637   # bat and cmd files are not always considered executable in cygwin causing which
21638   # to not find them
21639   if test "x$new_path" = x \
21640            && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21641            && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21642     new_path=`$CYGPATH -u "$path"`
21643   fi
21644   if test "x$new_path" = x; then
21645     # Oops. Which didn't find the executable.
21646     # The splitting of arguments from the executable at a space might have been incorrect,
21647     # since paths with space are more likely in Windows. Give it another try with the whole
21648     # argument.
21649     path="$complete"
21650     arguments="EOL"
21651     new_path=`$CYGPATH -u "$path"`
21652     new_path=`$WHICH "$new_path" 2> /dev/null`
21653     # bat and cmd files are not always considered executable in cygwin causing which
21654     # to not find them
21655     if test "x$new_path" = x \
21656              && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21657              && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21658       new_path=`$CYGPATH -u "$path"`
21659     fi
21660     if test "x$new_path" = x; then
21661       # It's still not found. Now this is an unrecoverable error.
21662       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
21663 $as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
21664       has_space=`$ECHO "$complete" | $GREP " "`
21665       if test "x$has_space" != x; then
21666         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21667 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21668       fi
21669       as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
21670     fi
21671   fi
21672 
21673   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21674   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21675   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21676   # "foo.exe" is OK but "foo" is an error.
21677   #
21678   # This test is therefore slightly more accurate than "test -f" to check for file precense.
21679   # It is also a way to make sure we got the proper file name for the real test later on.
21680   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21681   if test "x$test_shortpath" = x; then
21682     # Short path failed, file does not exist as specified.
21683     # Try adding .exe or .cmd
21684     if test -f "${new_path}.exe"; then
21685        input_to_shortpath="${new_path}.exe"
21686     elif test -f "${new_path}.cmd"; then
21687        input_to_shortpath="${new_path}.cmd"
21688     else
21689       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$new_path\", is invalid." >&5
21690 $as_echo "$as_me: The path of OBJC, which resolves as \"$new_path\", is invalid." >&6;}
21691       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
21692 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
21693       as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
21694     fi
21695   else
21696     input_to_shortpath="$new_path"
21697   fi
21698 
21699   # Call helper function which possibly converts this using DOS-style short mode.
21700   # If so, the updated path is stored in $new_path.
21701   new_path="$input_to_shortpath"
21702 
21703   input_path="$input_to_shortpath"
21704   # Check if we need to convert this using DOS-style short mode. If the path
21705   # contains just simple characters, use it. Otherwise (spaces, weird characters),
21706   # take no chances and rewrite it.
21707   # Note: m4 eats our [], so we need to use [ and ] instead.
21708   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21709   if test "x$has_forbidden_chars" != x; then
21710     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21711     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21712     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21713     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21714       # Going to short mode and back again did indeed matter. Since short mode is
21715       # case insensitive, let's make it lowercase to improve readability.
21716       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21717       # Now convert it back to Unix-stile (cygpath)
21718       input_path=`$CYGPATH -u "$shortmode_path"`
21719       new_path="$input_path"
21720     fi
21721   fi
21722 
21723   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21724   if test "x$test_cygdrive_prefix" = x; then
21725     # As a simple fix, exclude /usr/bin since it's not a real path.
21726     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
21727       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21728       # a path prefixed by /cygdrive for fixpath to work.
21729       new_path="$CYGWIN_ROOT_PATH$input_path"
21730     fi
21731   fi
21732 
21733   # remove trailing .exe if any
21734   new_path="${new_path/%.exe/}"
21735 
21736   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21737 
21738   # First separate the path from the arguments. This will split at the first
21739   # space.
21740   complete="$OBJC"
21741   path="${complete%% *}"
21742   tmp="$complete EOL"
21743   arguments="${tmp#* }"
21744 
21745   # Input might be given as Windows format, start by converting to
21746   # unix format.
21747   new_path="$path"
21748 
21749   windows_path="$new_path"
21750   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21751     unix_path=`$CYGPATH -u "$windows_path"`
21752     new_path="$unix_path"
21753   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21754     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21755     new_path="$unix_path"
21756   fi
21757 
21758 
21759   # Now try to locate executable using which
21760   new_path=`$WHICH "$new_path" 2> /dev/null`
21761 
21762   if test "x$new_path" = x; then
21763     # Oops. Which didn't find the executable.
21764     # The splitting of arguments from the executable at a space might have been incorrect,
21765     # since paths with space are more likely in Windows. Give it another try with the whole
21766     # argument.
21767     path="$complete"
21768     arguments="EOL"
21769     new_path="$path"
21770 
21771   windows_path="$new_path"
21772   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21773     unix_path=`$CYGPATH -u "$windows_path"`
21774     new_path="$unix_path"
21775   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21776     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21777     new_path="$unix_path"
21778   fi
21779 
21780 
21781     new_path=`$WHICH "$new_path" 2> /dev/null`
21782 
21783     if test "x$new_path" = x; then
21784       # It's still not found. Now this is an unrecoverable error.
21785       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
21786 $as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
21787       has_space=`$ECHO "$complete" | $GREP " "`
21788       if test "x$has_space" != x; then
21789         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21790 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21791       fi
21792       as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
21793     fi
21794   fi
21795 
21796   # Now new_path has a complete unix path to the binary
21797   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
21798     # Keep paths in /bin as-is, but remove trailing .exe if any
21799     new_path="${new_path/%.exe/}"
21800     # Do not save /bin paths to all_fixpath_prefixes!
21801   else
21802     # Not in mixed or Windows style, start by that.
21803     new_path=`cmd //c echo $new_path`
21804 
21805   input_path="$new_path"
21806   # Check if we need to convert this using DOS-style short mode. If the path
21807   # contains just simple characters, use it. Otherwise (spaces, weird characters),
21808   # take no chances and rewrite it.
21809   # Note: m4 eats our [], so we need to use [ and ] instead.
21810   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21811   if test "x$has_forbidden_chars" != x; then
21812     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21813     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21814   fi
21815 
21816     # Output is in $new_path
21817 
21818   windows_path="$new_path"
21819   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21820     unix_path=`$CYGPATH -u "$windows_path"`
21821     new_path="$unix_path"
21822   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21823     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21824     new_path="$unix_path"
21825   fi
21826 
21827     # remove trailing .exe if any
21828     new_path="${new_path/%.exe/}"
21829 
21830     # Save the first 10 bytes of this path to the storage, so fixpath can work.
21831     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21832   fi
21833 
21834   else
21835     # We're on a posix platform. Hooray! :)
21836     # First separate the path from the arguments. This will split at the first
21837     # space.
21838     complete="$OBJC"
21839     path="${complete%% *}"
21840     tmp="$complete EOL"
21841     arguments="${tmp#* }"
21842 
21843     # Cannot rely on the command "which" here since it doesn't always work.
21844     is_absolute_path=`$ECHO "$path" | $GREP ^/`
21845     if test -z "$is_absolute_path"; then
21846       # Path to executable is not absolute. Find it.
21847       IFS_save="$IFS"
21848       IFS=:
21849       for p in $PATH; do
21850         if test -f "$p/$path" && test -x "$p/$path"; then
21851           new_path="$p/$path"
21852           break
21853         fi
21854       done
21855       IFS="$IFS_save"
21856     else
21857       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving OBJC (as $path) failed, using $path directly." >&5
21858 $as_echo "$as_me: Resolving OBJC (as $path) failed, using $path directly." >&6;}
21859       new_path="$path"
21860     fi
21861 
21862     if test "x$new_path" = x; then
21863         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
21864 $as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
21865         has_space=`$ECHO "$complete" | $GREP " "`
21866         if test "x$has_space" != x; then
21867           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
21868 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
21869         fi
21870         as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
21871       fi
21872   fi
21873 
21874       # Now join together the path and the arguments once again
21875       if test "x$arguments" != xEOL; then
21876         new_complete="$new_path ${arguments% *}"
21877       else
21878         new_complete="$new_path"
21879       fi
21880 
21881   if test "x$complete" != "x$new_complete"; then
21882       OBJC="$new_complete"
21883       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJC to \"$new_complete\"" >&5
21884 $as_echo "$as_me: Rewriting OBJC to \"$new_complete\"" >&6;}
21885     fi
21886 
21887 else
21888     OBJC=
21889 fi
21890 
21891 # Restore the flags to the user specified values.
21892 # This is necessary since AC_PROG_CC defaults CFLAGS to "-g -O2"
21893 CFLAGS="$ORG_CFLAGS"
21894 CXXFLAGS="$ORG_CXXFLAGS"
21895 OBJCFLAGS="$ORG_OBJCFLAGS"
21896 
21897 LD="$CC"
21898 LDEXE="$CC"
21899 LDCXX="$CXX"
21900 LDEXECXX="$CXX"
21901 
21902 # LDEXE is the linker to use, when creating executables.
21903 
21904 # Linking C++ libraries.
21905 
21906 # Linking C++ executables.
21907 
21908 
21909 if test "x$OPENJDK_TARGET_OS" != xwindows; then
21910     if test -n "$ac_tool_prefix"; then
21911   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
21912 set dummy ${ac_tool_prefix}ar; ac_word=$2
21913 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21914 $as_echo_n "checking for $ac_word... " >&6; }
21915 if ${ac_cv_prog_AR+:} false; then :
21916   $as_echo_n "(cached) " >&6
21917 else
21918   if test -n "$AR"; then
21919   ac_cv_prog_AR="$AR" # Let the user override the test.
21920 else
21921 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21922 for as_dir in $PATH
21923 do
21924   IFS=$as_save_IFS
21925   test -z "$as_dir" && as_dir=.
21926     for ac_exec_ext in '' $ac_executable_extensions; do
21927   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
21928     ac_cv_prog_AR="${ac_tool_prefix}ar"
21929     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21930     break 2
21931   fi
21932 done
21933   done
21934 IFS=$as_save_IFS
21935 
21936 fi
21937 fi
21938 AR=$ac_cv_prog_AR
21939 if test -n "$AR"; then
21940   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
21941 $as_echo "$AR" >&6; }
21942 else
21943   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21944 $as_echo "no" >&6; }
21945 fi
21946 
21947 
21948 fi
21949 if test -z "$ac_cv_prog_AR"; then
21950   ac_ct_AR=$AR
21951   # Extract the first word of "ar", so it can be a program name with args.
21952 set dummy ar; ac_word=$2
21953 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21954 $as_echo_n "checking for $ac_word... " >&6; }
21955 if ${ac_cv_prog_ac_ct_AR+:} false; then :
21956   $as_echo_n "(cached) " >&6
21957 else
21958   if test -n "$ac_ct_AR"; then
21959   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
21960 else
21961 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21962 for as_dir in $PATH
21963 do
21964   IFS=$as_save_IFS
21965   test -z "$as_dir" && as_dir=.
21966     for ac_exec_ext in '' $ac_executable_extensions; do
21967   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
21968     ac_cv_prog_ac_ct_AR="ar"
21969     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21970     break 2
21971   fi
21972 done
21973   done
21974 IFS=$as_save_IFS
21975 
21976 fi
21977 fi
21978 ac_ct_AR=$ac_cv_prog_ac_ct_AR
21979 if test -n "$ac_ct_AR"; then
21980   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
21981 $as_echo "$ac_ct_AR" >&6; }
21982 else
21983   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21984 $as_echo "no" >&6; }
21985 fi
21986 
21987   if test "x$ac_ct_AR" = x; then
21988     AR=""
21989   else
21990     case $cross_compiling:$ac_tool_warned in
21991 yes:)
21992 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
21993 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
21994 ac_tool_warned=yes ;;
21995 esac
21996     AR=$ac_ct_AR
21997   fi
21998 else
21999   AR="$ac_cv_prog_AR"
22000 fi
22001 
22002 
22003   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22004 
22005   # First separate the path from the arguments. This will split at the first
22006   # space.
22007   complete="$AR"
22008   path="${complete%% *}"
22009   tmp="$complete EOL"
22010   arguments="${tmp#* }"
22011 
22012   # Input might be given as Windows format, start by converting to
22013   # unix format.
22014   new_path=`$CYGPATH -u "$path"`
22015 
22016   # Now try to locate executable using which
22017   new_path=`$WHICH "$new_path" 2> /dev/null`
22018   # bat and cmd files are not always considered executable in cygwin causing which
22019   # to not find them
22020   if test "x$new_path" = x \
22021            && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22022            && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22023     new_path=`$CYGPATH -u "$path"`
22024   fi
22025   if test "x$new_path" = x; then
22026     # Oops. Which didn't find the executable.
22027     # The splitting of arguments from the executable at a space might have been incorrect,
22028     # since paths with space are more likely in Windows. Give it another try with the whole
22029     # argument.
22030     path="$complete"
22031     arguments="EOL"
22032     new_path=`$CYGPATH -u "$path"`
22033     new_path=`$WHICH "$new_path" 2> /dev/null`
22034     # bat and cmd files are not always considered executable in cygwin causing which
22035     # to not find them
22036     if test "x$new_path" = x \
22037              && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22038              && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22039       new_path=`$CYGPATH -u "$path"`
22040     fi
22041     if test "x$new_path" = x; then
22042       # It's still not found. Now this is an unrecoverable error.
22043       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
22044 $as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
22045       has_space=`$ECHO "$complete" | $GREP " "`
22046       if test "x$has_space" != x; then
22047         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22048 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22049       fi
22050       as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
22051     fi
22052   fi
22053 
22054   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22055   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22056   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22057   # "foo.exe" is OK but "foo" is an error.
22058   #
22059   # This test is therefore slightly more accurate than "test -f" to check for file precense.
22060   # It is also a way to make sure we got the proper file name for the real test later on.
22061   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22062   if test "x$test_shortpath" = x; then
22063     # Short path failed, file does not exist as specified.
22064     # Try adding .exe or .cmd
22065     if test -f "${new_path}.exe"; then
22066        input_to_shortpath="${new_path}.exe"
22067     elif test -f "${new_path}.cmd"; then
22068        input_to_shortpath="${new_path}.cmd"
22069     else
22070       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$new_path\", is invalid." >&5
22071 $as_echo "$as_me: The path of AR, which resolves as \"$new_path\", is invalid." >&6;}
22072       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
22073 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
22074       as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
22075     fi
22076   else
22077     input_to_shortpath="$new_path"
22078   fi
22079 
22080   # Call helper function which possibly converts this using DOS-style short mode.
22081   # If so, the updated path is stored in $new_path.
22082   new_path="$input_to_shortpath"
22083 
22084   input_path="$input_to_shortpath"
22085   # Check if we need to convert this using DOS-style short mode. If the path
22086   # contains just simple characters, use it. Otherwise (spaces, weird characters),
22087   # take no chances and rewrite it.
22088   # Note: m4 eats our [], so we need to use [ and ] instead.
22089   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22090   if test "x$has_forbidden_chars" != x; then
22091     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22092     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22093     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22094     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22095       # Going to short mode and back again did indeed matter. Since short mode is
22096       # case insensitive, let's make it lowercase to improve readability.
22097       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22098       # Now convert it back to Unix-stile (cygpath)
22099       input_path=`$CYGPATH -u "$shortmode_path"`
22100       new_path="$input_path"
22101     fi
22102   fi
22103 
22104   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22105   if test "x$test_cygdrive_prefix" = x; then
22106     # As a simple fix, exclude /usr/bin since it's not a real path.
22107     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
22108       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22109       # a path prefixed by /cygdrive for fixpath to work.
22110       new_path="$CYGWIN_ROOT_PATH$input_path"
22111     fi
22112   fi
22113 
22114   # remove trailing .exe if any
22115   new_path="${new_path/%.exe/}"
22116 
22117   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22118 
22119   # First separate the path from the arguments. This will split at the first
22120   # space.
22121   complete="$AR"
22122   path="${complete%% *}"
22123   tmp="$complete EOL"
22124   arguments="${tmp#* }"
22125 
22126   # Input might be given as Windows format, start by converting to
22127   # unix format.
22128   new_path="$path"
22129 
22130   windows_path="$new_path"
22131   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22132     unix_path=`$CYGPATH -u "$windows_path"`
22133     new_path="$unix_path"
22134   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22135     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22136     new_path="$unix_path"
22137   fi
22138 
22139 
22140   # Now try to locate executable using which
22141   new_path=`$WHICH "$new_path" 2> /dev/null`
22142 
22143   if test "x$new_path" = x; then
22144     # Oops. Which didn't find the executable.
22145     # The splitting of arguments from the executable at a space might have been incorrect,
22146     # since paths with space are more likely in Windows. Give it another try with the whole
22147     # argument.
22148     path="$complete"
22149     arguments="EOL"
22150     new_path="$path"
22151 
22152   windows_path="$new_path"
22153   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22154     unix_path=`$CYGPATH -u "$windows_path"`
22155     new_path="$unix_path"
22156   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22157     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22158     new_path="$unix_path"
22159   fi
22160 
22161 
22162     new_path=`$WHICH "$new_path" 2> /dev/null`
22163 
22164     if test "x$new_path" = x; then
22165       # It's still not found. Now this is an unrecoverable error.
22166       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
22167 $as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
22168       has_space=`$ECHO "$complete" | $GREP " "`
22169       if test "x$has_space" != x; then
22170         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22171 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22172       fi
22173       as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
22174     fi
22175   fi
22176 
22177   # Now new_path has a complete unix path to the binary
22178   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
22179     # Keep paths in /bin as-is, but remove trailing .exe if any
22180     new_path="${new_path/%.exe/}"
22181     # Do not save /bin paths to all_fixpath_prefixes!
22182   else
22183     # Not in mixed or Windows style, start by that.
22184     new_path=`cmd //c echo $new_path`
22185 
22186   input_path="$new_path"
22187   # Check if we need to convert this using DOS-style short mode. If the path
22188   # contains just simple characters, use it. Otherwise (spaces, weird characters),
22189   # take no chances and rewrite it.
22190   # Note: m4 eats our [], so we need to use [ and ] instead.
22191   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22192   if test "x$has_forbidden_chars" != x; then
22193     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22194     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22195   fi
22196 
22197     # Output is in $new_path
22198 
22199   windows_path="$new_path"
22200   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22201     unix_path=`$CYGPATH -u "$windows_path"`
22202     new_path="$unix_path"
22203   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22204     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22205     new_path="$unix_path"
22206   fi
22207 
22208     # remove trailing .exe if any
22209     new_path="${new_path/%.exe/}"
22210 
22211     # Save the first 10 bytes of this path to the storage, so fixpath can work.
22212     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22213   fi
22214 
22215   else
22216     # We're on a posix platform. Hooray! :)
22217     # First separate the path from the arguments. This will split at the first
22218     # space.
22219     complete="$AR"
22220     path="${complete%% *}"
22221     tmp="$complete EOL"
22222     arguments="${tmp#* }"
22223 
22224     # Cannot rely on the command "which" here since it doesn't always work.
22225     is_absolute_path=`$ECHO "$path" | $GREP ^/`
22226     if test -z "$is_absolute_path"; then
22227       # Path to executable is not absolute. Find it.
22228       IFS_save="$IFS"
22229       IFS=:
22230       for p in $PATH; do
22231         if test -f "$p/$path" && test -x "$p/$path"; then
22232           new_path="$p/$path"
22233           break
22234         fi
22235       done
22236       IFS="$IFS_save"
22237     else
22238       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving AR (as $path) failed, using $path directly." >&5
22239 $as_echo "$as_me: Resolving AR (as $path) failed, using $path directly." >&6;}
22240       new_path="$path"
22241     fi
22242 
22243     if test "x$new_path" = x; then
22244         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
22245 $as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
22246         has_space=`$ECHO "$complete" | $GREP " "`
22247         if test "x$has_space" != x; then
22248           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
22249 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
22250         fi
22251         as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
22252       fi
22253   fi
22254 
22255       # Now join together the path and the arguments once again
22256       if test "x$arguments" != xEOL; then
22257         new_complete="$new_path ${arguments% *}"
22258       else
22259         new_complete="$new_path"
22260       fi
22261 
22262   if test "x$complete" != "x$new_complete"; then
22263       AR="$new_complete"
22264       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AR to \"$new_complete\"" >&5
22265 $as_echo "$as_me: Rewriting AR to \"$new_complete\"" >&6;}
22266     fi
22267 
22268 fi
22269 if test "x$OPENJDK_TARGET_OS" = xmacosx; then
22270     ARFLAGS="-r"
22271 else
22272     ARFLAGS=""
22273 fi
22274 
22275 
22276 # For hotspot, we need these in Windows mixed path; other platforms keep them the same
22277 HOTSPOT_CXX="$CXX"
22278 HOTSPOT_LD="$LD"
22279 
22280 
22281 
22282 COMPILER_NAME=gcc
22283 COMPILER_TYPE=CC
22284 if test "x$OPENJDK_TARGET_OS" = xwindows; then :
22285 
22286     # For now, assume that we are always compiling using cl.exe.
22287     CC_OUT_OPTION=-Fo
22288     EXE_OUT_OPTION=-out:
22289     LD_OUT_OPTION=-out:
22290     AR_OUT_OPTION=-out:
22291     # On Windows, reject /usr/bin/link (as determined in CYGWIN_LINK), which is a cygwin
22292     # program for something completely different.
22293     # Extract the first word of "link", so it can be a program name with args.
22294 set dummy link; ac_word=$2
22295 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22296 $as_echo_n "checking for $ac_word... " >&6; }
22297 if ${ac_cv_prog_WINLD+:} false; then :
22298   $as_echo_n "(cached) " >&6
22299 else
22300   if test -n "$WINLD"; then
22301   ac_cv_prog_WINLD="$WINLD" # Let the user override the test.
22302 else
22303   ac_prog_rejected=no
22304 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22305 for as_dir in $PATH
22306 do
22307   IFS=$as_save_IFS
22308   test -z "$as_dir" && as_dir=.
22309     for ac_exec_ext in '' $ac_executable_extensions; do
22310   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
22311     if test "$as_dir/$ac_word$ac_exec_ext" = "$CYGWIN_LINK"; then
22312        ac_prog_rejected=yes
22313        continue
22314      fi
22315     ac_cv_prog_WINLD="link"
22316     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22317     break 2
22318   fi
22319 done
22320   done
22321 IFS=$as_save_IFS
22322 
22323 if test $ac_prog_rejected = yes; then
22324   # We found a bogon in the path, so make sure we never use it.
22325   set dummy $ac_cv_prog_WINLD
22326   shift
22327   if test $# != 0; then
22328     # We chose a different compiler from the bogus one.
22329     # However, it has the same basename, so the bogon will be chosen
22330     # first if we set WINLD to just the basename; use the full file name.
22331     shift
22332     ac_cv_prog_WINLD="$as_dir/$ac_word${1+' '}$@"
22333   fi
22334 fi
22335 fi
22336 fi
22337 WINLD=$ac_cv_prog_WINLD
22338 if test -n "$WINLD"; then
22339   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINLD" >&5
22340 $as_echo "$WINLD" >&6; }
22341 else
22342   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22343 $as_echo "no" >&6; }
22344 fi
22345 
22346 
22347     # Since we must ignore the first found link, WINLD will contain
22348     # the full path to the link.exe program.
22349 
22350   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22351 
22352   # First separate the path from the arguments. This will split at the first
22353   # space.
22354   complete="$WINLD"
22355   path="${complete%% *}"
22356   tmp="$complete EOL"
22357   arguments="${tmp#* }"
22358 
22359   # Input might be given as Windows format, start by converting to
22360   # unix format.
22361   new_path=`$CYGPATH -u "$path"`
22362 
22363   # Now try to locate executable using which
22364   new_path=`$WHICH "$new_path" 2> /dev/null`
22365   # bat and cmd files are not always considered executable in cygwin causing which
22366   # to not find them
22367   if test "x$new_path" = x \
22368            && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22369            && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22370     new_path=`$CYGPATH -u "$path"`
22371   fi
22372   if test "x$new_path" = x; then
22373     # Oops. Which didn't find the executable.
22374     # The splitting of arguments from the executable at a space might have been incorrect,
22375     # since paths with space are more likely in Windows. Give it another try with the whole
22376     # argument.
22377     path="$complete"
22378     arguments="EOL"
22379     new_path=`$CYGPATH -u "$path"`
22380     new_path=`$WHICH "$new_path" 2> /dev/null`
22381     # bat and cmd files are not always considered executable in cygwin causing which
22382     # to not find them
22383     if test "x$new_path" = x \
22384              && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22385              && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22386       new_path=`$CYGPATH -u "$path"`
22387     fi
22388     if test "x$new_path" = x; then
22389       # It's still not found. Now this is an unrecoverable error.
22390       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$complete\", is not found." >&5
22391 $as_echo "$as_me: The path of WINLD, which resolves as \"$complete\", is not found." >&6;}
22392       has_space=`$ECHO "$complete" | $GREP " "`
22393       if test "x$has_space" != x; then
22394         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22395 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22396       fi
22397       as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
22398     fi
22399   fi
22400 
22401   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22402   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22403   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22404   # "foo.exe" is OK but "foo" is an error.
22405   #
22406   # This test is therefore slightly more accurate than "test -f" to check for file precense.
22407   # It is also a way to make sure we got the proper file name for the real test later on.
22408   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22409   if test "x$test_shortpath" = x; then
22410     # Short path failed, file does not exist as specified.
22411     # Try adding .exe or .cmd
22412     if test -f "${new_path}.exe"; then
22413        input_to_shortpath="${new_path}.exe"
22414     elif test -f "${new_path}.cmd"; then
22415        input_to_shortpath="${new_path}.cmd"
22416     else
22417       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$new_path\", is invalid." >&5
22418 $as_echo "$as_me: The path of WINLD, which resolves as \"$new_path\", is invalid." >&6;}
22419       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
22420 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
22421       as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
22422     fi
22423   else
22424     input_to_shortpath="$new_path"
22425   fi
22426 
22427   # Call helper function which possibly converts this using DOS-style short mode.
22428   # If so, the updated path is stored in $new_path.
22429   new_path="$input_to_shortpath"
22430 
22431   input_path="$input_to_shortpath"
22432   # Check if we need to convert this using DOS-style short mode. If the path
22433   # contains just simple characters, use it. Otherwise (spaces, weird characters),
22434   # take no chances and rewrite it.
22435   # Note: m4 eats our [], so we need to use [ and ] instead.
22436   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22437   if test "x$has_forbidden_chars" != x; then
22438     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22439     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22440     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22441     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22442       # Going to short mode and back again did indeed matter. Since short mode is
22443       # case insensitive, let's make it lowercase to improve readability.
22444       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22445       # Now convert it back to Unix-stile (cygpath)
22446       input_path=`$CYGPATH -u "$shortmode_path"`
22447       new_path="$input_path"
22448     fi
22449   fi
22450 
22451   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22452   if test "x$test_cygdrive_prefix" = x; then
22453     # As a simple fix, exclude /usr/bin since it's not a real path.
22454     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
22455       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22456       # a path prefixed by /cygdrive for fixpath to work.
22457       new_path="$CYGWIN_ROOT_PATH$input_path"
22458     fi
22459   fi
22460 
22461   # remove trailing .exe if any
22462   new_path="${new_path/%.exe/}"
22463 
22464   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22465 
22466   # First separate the path from the arguments. This will split at the first
22467   # space.
22468   complete="$WINLD"
22469   path="${complete%% *}"
22470   tmp="$complete EOL"
22471   arguments="${tmp#* }"
22472 
22473   # Input might be given as Windows format, start by converting to
22474   # unix format.
22475   new_path="$path"
22476 
22477   windows_path="$new_path"
22478   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22479     unix_path=`$CYGPATH -u "$windows_path"`
22480     new_path="$unix_path"
22481   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22482     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22483     new_path="$unix_path"
22484   fi
22485 
22486 
22487   # Now try to locate executable using which
22488   new_path=`$WHICH "$new_path" 2> /dev/null`
22489 
22490   if test "x$new_path" = x; then
22491     # Oops. Which didn't find the executable.
22492     # The splitting of arguments from the executable at a space might have been incorrect,
22493     # since paths with space are more likely in Windows. Give it another try with the whole
22494     # argument.
22495     path="$complete"
22496     arguments="EOL"
22497     new_path="$path"
22498 
22499   windows_path="$new_path"
22500   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22501     unix_path=`$CYGPATH -u "$windows_path"`
22502     new_path="$unix_path"
22503   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22504     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22505     new_path="$unix_path"
22506   fi
22507 
22508 
22509     new_path=`$WHICH "$new_path" 2> /dev/null`
22510 
22511     if test "x$new_path" = x; then
22512       # It's still not found. Now this is an unrecoverable error.
22513       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$complete\", is not found." >&5
22514 $as_echo "$as_me: The path of WINLD, which resolves as \"$complete\", is not found." >&6;}
22515       has_space=`$ECHO "$complete" | $GREP " "`
22516       if test "x$has_space" != x; then
22517         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22518 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22519       fi
22520       as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
22521     fi
22522   fi
22523 
22524   # Now new_path has a complete unix path to the binary
22525   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
22526     # Keep paths in /bin as-is, but remove trailing .exe if any
22527     new_path="${new_path/%.exe/}"
22528     # Do not save /bin paths to all_fixpath_prefixes!
22529   else
22530     # Not in mixed or Windows style, start by that.
22531     new_path=`cmd //c echo $new_path`
22532 
22533   input_path="$new_path"
22534   # Check if we need to convert this using DOS-style short mode. If the path
22535   # contains just simple characters, use it. Otherwise (spaces, weird characters),
22536   # take no chances and rewrite it.
22537   # Note: m4 eats our [], so we need to use [ and ] instead.
22538   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22539   if test "x$has_forbidden_chars" != x; then
22540     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22541     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22542   fi
22543 
22544     # Output is in $new_path
22545 
22546   windows_path="$new_path"
22547   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22548     unix_path=`$CYGPATH -u "$windows_path"`
22549     new_path="$unix_path"
22550   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22551     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22552     new_path="$unix_path"
22553   fi
22554 
22555     # remove trailing .exe if any
22556     new_path="${new_path/%.exe/}"
22557 
22558     # Save the first 10 bytes of this path to the storage, so fixpath can work.
22559     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22560   fi
22561 
22562   else
22563     # We're on a posix platform. Hooray! :)
22564     # First separate the path from the arguments. This will split at the first
22565     # space.
22566     complete="$WINLD"
22567     path="${complete%% *}"
22568     tmp="$complete EOL"
22569     arguments="${tmp#* }"
22570 
22571     # Cannot rely on the command "which" here since it doesn't always work.
22572     is_absolute_path=`$ECHO "$path" | $GREP ^/`
22573     if test -z "$is_absolute_path"; then
22574       # Path to executable is not absolute. Find it.
22575       IFS_save="$IFS"
22576       IFS=:
22577       for p in $PATH; do
22578         if test -f "$p/$path" && test -x "$p/$path"; then
22579           new_path="$p/$path"
22580           break
22581         fi
22582       done
22583       IFS="$IFS_save"
22584     else
22585       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving WINLD (as $path) failed, using $path directly." >&5
22586 $as_echo "$as_me: Resolving WINLD (as $path) failed, using $path directly." >&6;}
22587       new_path="$path"
22588     fi
22589 
22590     if test "x$new_path" = x; then
22591         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$complete\", is not found." >&5
22592 $as_echo "$as_me: The path of WINLD, which resolves as \"$complete\", is not found." >&6;}
22593         has_space=`$ECHO "$complete" | $GREP " "`
22594         if test "x$has_space" != x; then
22595           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
22596 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
22597         fi
22598         as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
22599       fi
22600   fi
22601 
22602       # Now join together the path and the arguments once again
22603       if test "x$arguments" != xEOL; then
22604         new_complete="$new_path ${arguments% *}"
22605       else
22606         new_complete="$new_path"
22607       fi
22608 
22609   if test "x$complete" != "x$new_complete"; then
22610       WINLD="$new_complete"
22611       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting WINLD to \"$new_complete\"" >&5
22612 $as_echo "$as_me: Rewriting WINLD to \"$new_complete\"" >&6;}
22613     fi
22614 
22615     printf "Windows linker was found at $WINLD\n"
22616     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the found link.exe is actually the Visual Studio linker" >&5
22617 $as_echo_n "checking if the found link.exe is actually the Visual Studio linker... " >&6; }
22618     "$WINLD" --version > /dev/null
22619     if test $? -eq 0 ; then
22620       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22621 $as_echo "no" >&6; }
22622       as_fn_error $? "This is the Cygwin link tool. Please check your PATH and rerun configure." "$LINENO" 5
22623     else
22624       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
22625 $as_echo "yes" >&6; }
22626     fi
22627     LD="$WINLD"
22628     LDEXE="$WINLD"
22629     LDCXX="$WINLD"
22630     LDEXECXX="$WINLD"
22631 
22632     # Extract the first word of "mt", so it can be a program name with args.
22633 set dummy mt; ac_word=$2
22634 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22635 $as_echo_n "checking for $ac_word... " >&6; }
22636 if ${ac_cv_prog_MT+:} false; then :
22637   $as_echo_n "(cached) " >&6
22638 else
22639   if test -n "$MT"; then
22640   ac_cv_prog_MT="$MT" # Let the user override the test.
22641 else
22642   ac_prog_rejected=no
22643 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22644 for as_dir in $PATH
22645 do
22646   IFS=$as_save_IFS
22647   test -z "$as_dir" && as_dir=.
22648     for ac_exec_ext in '' $ac_executable_extensions; do
22649   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
22650     if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/mt"; then
22651        ac_prog_rejected=yes
22652        continue
22653      fi
22654     ac_cv_prog_MT="mt"
22655     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22656     break 2
22657   fi
22658 done
22659   done
22660 IFS=$as_save_IFS
22661 
22662 if test $ac_prog_rejected = yes; then
22663   # We found a bogon in the path, so make sure we never use it.
22664   set dummy $ac_cv_prog_MT
22665   shift
22666   if test $# != 0; then
22667     # We chose a different compiler from the bogus one.
22668     # However, it has the same basename, so the bogon will be chosen
22669     # first if we set MT to just the basename; use the full file name.
22670     shift
22671     ac_cv_prog_MT="$as_dir/$ac_word${1+' '}$@"
22672   fi
22673 fi
22674 fi
22675 fi
22676 MT=$ac_cv_prog_MT
22677 if test -n "$MT"; then
22678   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MT" >&5
22679 $as_echo "$MT" >&6; }
22680 else
22681   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22682 $as_echo "no" >&6; }
22683 fi
22684 
22685 
22686 
22687   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22688 
22689   # First separate the path from the arguments. This will split at the first
22690   # space.
22691   complete="$MT"
22692   path="${complete%% *}"
22693   tmp="$complete EOL"
22694   arguments="${tmp#* }"
22695 
22696   # Input might be given as Windows format, start by converting to
22697   # unix format.
22698   new_path=`$CYGPATH -u "$path"`
22699 
22700   # Now try to locate executable using which
22701   new_path=`$WHICH "$new_path" 2> /dev/null`
22702   # bat and cmd files are not always considered executable in cygwin causing which
22703   # to not find them
22704   if test "x$new_path" = x \
22705            && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22706            && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22707     new_path=`$CYGPATH -u "$path"`
22708   fi
22709   if test "x$new_path" = x; then
22710     # Oops. Which didn't find the executable.
22711     # The splitting of arguments from the executable at a space might have been incorrect,
22712     # since paths with space are more likely in Windows. Give it another try with the whole
22713     # argument.
22714     path="$complete"
22715     arguments="EOL"
22716     new_path=`$CYGPATH -u "$path"`
22717     new_path=`$WHICH "$new_path" 2> /dev/null`
22718     # bat and cmd files are not always considered executable in cygwin causing which
22719     # to not find them
22720     if test "x$new_path" = x \
22721              && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22722              && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22723       new_path=`$CYGPATH -u "$path"`
22724     fi
22725     if test "x$new_path" = x; then
22726       # It's still not found. Now this is an unrecoverable error.
22727       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
22728 $as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
22729       has_space=`$ECHO "$complete" | $GREP " "`
22730       if test "x$has_space" != x; then
22731         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22732 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22733       fi
22734       as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
22735     fi
22736   fi
22737 
22738   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22739   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22740   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22741   # "foo.exe" is OK but "foo" is an error.
22742   #
22743   # This test is therefore slightly more accurate than "test -f" to check for file precense.
22744   # It is also a way to make sure we got the proper file name for the real test later on.
22745   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22746   if test "x$test_shortpath" = x; then
22747     # Short path failed, file does not exist as specified.
22748     # Try adding .exe or .cmd
22749     if test -f "${new_path}.exe"; then
22750        input_to_shortpath="${new_path}.exe"
22751     elif test -f "${new_path}.cmd"; then
22752        input_to_shortpath="${new_path}.cmd"
22753     else
22754       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$new_path\", is invalid." >&5
22755 $as_echo "$as_me: The path of MT, which resolves as \"$new_path\", is invalid." >&6;}
22756       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
22757 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
22758       as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
22759     fi
22760   else
22761     input_to_shortpath="$new_path"
22762   fi
22763 
22764   # Call helper function which possibly converts this using DOS-style short mode.
22765   # If so, the updated path is stored in $new_path.
22766   new_path="$input_to_shortpath"
22767 
22768   input_path="$input_to_shortpath"
22769   # Check if we need to convert this using DOS-style short mode. If the path
22770   # contains just simple characters, use it. Otherwise (spaces, weird characters),
22771   # take no chances and rewrite it.
22772   # Note: m4 eats our [], so we need to use [ and ] instead.
22773   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22774   if test "x$has_forbidden_chars" != x; then
22775     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22776     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22777     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22778     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22779       # Going to short mode and back again did indeed matter. Since short mode is
22780       # case insensitive, let's make it lowercase to improve readability.
22781       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22782       # Now convert it back to Unix-stile (cygpath)
22783       input_path=`$CYGPATH -u "$shortmode_path"`
22784       new_path="$input_path"
22785     fi
22786   fi
22787 
22788   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22789   if test "x$test_cygdrive_prefix" = x; then
22790     # As a simple fix, exclude /usr/bin since it's not a real path.
22791     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
22792       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22793       # a path prefixed by /cygdrive for fixpath to work.
22794       new_path="$CYGWIN_ROOT_PATH$input_path"
22795     fi
22796   fi
22797 
22798   # remove trailing .exe if any
22799   new_path="${new_path/%.exe/}"
22800 
22801   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22802 
22803   # First separate the path from the arguments. This will split at the first
22804   # space.
22805   complete="$MT"
22806   path="${complete%% *}"
22807   tmp="$complete EOL"
22808   arguments="${tmp#* }"
22809 
22810   # Input might be given as Windows format, start by converting to
22811   # unix format.
22812   new_path="$path"
22813 
22814   windows_path="$new_path"
22815   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22816     unix_path=`$CYGPATH -u "$windows_path"`
22817     new_path="$unix_path"
22818   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22819     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22820     new_path="$unix_path"
22821   fi
22822 
22823 
22824   # Now try to locate executable using which
22825   new_path=`$WHICH "$new_path" 2> /dev/null`
22826 
22827   if test "x$new_path" = x; then
22828     # Oops. Which didn't find the executable.
22829     # The splitting of arguments from the executable at a space might have been incorrect,
22830     # since paths with space are more likely in Windows. Give it another try with the whole
22831     # argument.
22832     path="$complete"
22833     arguments="EOL"
22834     new_path="$path"
22835 
22836   windows_path="$new_path"
22837   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22838     unix_path=`$CYGPATH -u "$windows_path"`
22839     new_path="$unix_path"
22840   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22841     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22842     new_path="$unix_path"
22843   fi
22844 
22845 
22846     new_path=`$WHICH "$new_path" 2> /dev/null`
22847 
22848     if test "x$new_path" = x; then
22849       # It's still not found. Now this is an unrecoverable error.
22850       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
22851 $as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
22852       has_space=`$ECHO "$complete" | $GREP " "`
22853       if test "x$has_space" != x; then
22854         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22855 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22856       fi
22857       as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
22858     fi
22859   fi
22860 
22861   # Now new_path has a complete unix path to the binary
22862   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
22863     # Keep paths in /bin as-is, but remove trailing .exe if any
22864     new_path="${new_path/%.exe/}"
22865     # Do not save /bin paths to all_fixpath_prefixes!
22866   else
22867     # Not in mixed or Windows style, start by that.
22868     new_path=`cmd //c echo $new_path`
22869 
22870   input_path="$new_path"
22871   # Check if we need to convert this using DOS-style short mode. If the path
22872   # contains just simple characters, use it. Otherwise (spaces, weird characters),
22873   # take no chances and rewrite it.
22874   # Note: m4 eats our [], so we need to use [ and ] instead.
22875   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22876   if test "x$has_forbidden_chars" != x; then
22877     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22878     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22879   fi
22880 
22881     # Output is in $new_path
22882 
22883   windows_path="$new_path"
22884   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22885     unix_path=`$CYGPATH -u "$windows_path"`
22886     new_path="$unix_path"
22887   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22888     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22889     new_path="$unix_path"
22890   fi
22891 
22892     # remove trailing .exe if any
22893     new_path="${new_path/%.exe/}"
22894 
22895     # Save the first 10 bytes of this path to the storage, so fixpath can work.
22896     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22897   fi
22898 
22899   else
22900     # We're on a posix platform. Hooray! :)
22901     # First separate the path from the arguments. This will split at the first
22902     # space.
22903     complete="$MT"
22904     path="${complete%% *}"
22905     tmp="$complete EOL"
22906     arguments="${tmp#* }"
22907 
22908     # Cannot rely on the command "which" here since it doesn't always work.
22909     is_absolute_path=`$ECHO "$path" | $GREP ^/`
22910     if test -z "$is_absolute_path"; then
22911       # Path to executable is not absolute. Find it.
22912       IFS_save="$IFS"
22913       IFS=:
22914       for p in $PATH; do
22915         if test -f "$p/$path" && test -x "$p/$path"; then
22916           new_path="$p/$path"
22917           break
22918         fi
22919       done
22920       IFS="$IFS_save"
22921     else
22922       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving MT (as $path) failed, using $path directly." >&5
22923 $as_echo "$as_me: Resolving MT (as $path) failed, using $path directly." >&6;}
22924       new_path="$path"
22925     fi
22926 
22927     if test "x$new_path" = x; then
22928         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
22929 $as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
22930         has_space=`$ECHO "$complete" | $GREP " "`
22931         if test "x$has_space" != x; then
22932           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
22933 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
22934         fi
22935         as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
22936       fi
22937   fi
22938 
22939       # Now join together the path and the arguments once again
22940       if test "x$arguments" != xEOL; then
22941         new_complete="$new_path ${arguments% *}"
22942       else
22943         new_complete="$new_path"
22944       fi
22945 
22946   if test "x$complete" != "x$new_complete"; then
22947       MT="$new_complete"
22948       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MT to \"$new_complete\"" >&5
22949 $as_echo "$as_me: Rewriting MT to \"$new_complete\"" >&6;}
22950     fi
22951 
22952     # The resource compiler
22953     # Extract the first word of "rc", so it can be a program name with args.
22954 set dummy rc; ac_word=$2
22955 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22956 $as_echo_n "checking for $ac_word... " >&6; }
22957 if ${ac_cv_prog_RC+:} false; then :
22958   $as_echo_n "(cached) " >&6
22959 else
22960   if test -n "$RC"; then
22961   ac_cv_prog_RC="$RC" # Let the user override the test.
22962 else
22963   ac_prog_rejected=no
22964 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22965 for as_dir in $PATH
22966 do
22967   IFS=$as_save_IFS
22968   test -z "$as_dir" && as_dir=.
22969     for ac_exec_ext in '' $ac_executable_extensions; do
22970   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
22971     if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/rc"; then
22972        ac_prog_rejected=yes
22973        continue
22974      fi
22975     ac_cv_prog_RC="rc"
22976     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22977     break 2
22978   fi
22979 done
22980   done
22981 IFS=$as_save_IFS
22982 
22983 if test $ac_prog_rejected = yes; then
22984   # We found a bogon in the path, so make sure we never use it.
22985   set dummy $ac_cv_prog_RC
22986   shift
22987   if test $# != 0; then
22988     # We chose a different compiler from the bogus one.
22989     # However, it has the same basename, so the bogon will be chosen
22990     # first if we set RC to just the basename; use the full file name.
22991     shift
22992     ac_cv_prog_RC="$as_dir/$ac_word${1+' '}$@"
22993   fi
22994 fi
22995 fi
22996 fi
22997 RC=$ac_cv_prog_RC
22998 if test -n "$RC"; then
22999   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RC" >&5
23000 $as_echo "$RC" >&6; }
23001 else
23002   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23003 $as_echo "no" >&6; }
23004 fi
23005 
23006 
23007 
23008   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23009 
23010   # First separate the path from the arguments. This will split at the first
23011   # space.
23012   complete="$RC"
23013   path="${complete%% *}"
23014   tmp="$complete EOL"
23015   arguments="${tmp#* }"
23016 
23017   # Input might be given as Windows format, start by converting to
23018   # unix format.
23019   new_path=`$CYGPATH -u "$path"`
23020 
23021   # Now try to locate executable using which
23022   new_path=`$WHICH "$new_path" 2> /dev/null`
23023   # bat and cmd files are not always considered executable in cygwin causing which
23024   # to not find them
23025   if test "x$new_path" = x \
23026            && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23027            && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23028     new_path=`$CYGPATH -u "$path"`
23029   fi
23030   if test "x$new_path" = x; then
23031     # Oops. Which didn't find the executable.
23032     # The splitting of arguments from the executable at a space might have been incorrect,
23033     # since paths with space are more likely in Windows. Give it another try with the whole
23034     # argument.
23035     path="$complete"
23036     arguments="EOL"
23037     new_path=`$CYGPATH -u "$path"`
23038     new_path=`$WHICH "$new_path" 2> /dev/null`
23039     # bat and cmd files are not always considered executable in cygwin causing which
23040     # to not find them
23041     if test "x$new_path" = x \
23042              && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23043              && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23044       new_path=`$CYGPATH -u "$path"`
23045     fi
23046     if test "x$new_path" = x; then
23047       # It's still not found. Now this is an unrecoverable error.
23048       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
23049 $as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
23050       has_space=`$ECHO "$complete" | $GREP " "`
23051       if test "x$has_space" != x; then
23052         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23053 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23054       fi
23055       as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
23056     fi
23057   fi
23058 
23059   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23060   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23061   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23062   # "foo.exe" is OK but "foo" is an error.
23063   #
23064   # This test is therefore slightly more accurate than "test -f" to check for file precense.
23065   # It is also a way to make sure we got the proper file name for the real test later on.
23066   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23067   if test "x$test_shortpath" = x; then
23068     # Short path failed, file does not exist as specified.
23069     # Try adding .exe or .cmd
23070     if test -f "${new_path}.exe"; then
23071        input_to_shortpath="${new_path}.exe"
23072     elif test -f "${new_path}.cmd"; then
23073        input_to_shortpath="${new_path}.cmd"
23074     else
23075       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$new_path\", is invalid." >&5
23076 $as_echo "$as_me: The path of RC, which resolves as \"$new_path\", is invalid." >&6;}
23077       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
23078 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
23079       as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
23080     fi
23081   else
23082     input_to_shortpath="$new_path"
23083   fi
23084 
23085   # Call helper function which possibly converts this using DOS-style short mode.
23086   # If so, the updated path is stored in $new_path.
23087   new_path="$input_to_shortpath"
23088 
23089   input_path="$input_to_shortpath"
23090   # Check if we need to convert this using DOS-style short mode. If the path
23091   # contains just simple characters, use it. Otherwise (spaces, weird characters),
23092   # take no chances and rewrite it.
23093   # Note: m4 eats our [], so we need to use [ and ] instead.
23094   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23095   if test "x$has_forbidden_chars" != x; then
23096     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23097     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23098     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23099     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23100       # Going to short mode and back again did indeed matter. Since short mode is
23101       # case insensitive, let's make it lowercase to improve readability.
23102       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23103       # Now convert it back to Unix-stile (cygpath)
23104       input_path=`$CYGPATH -u "$shortmode_path"`
23105       new_path="$input_path"
23106     fi
23107   fi
23108 
23109   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23110   if test "x$test_cygdrive_prefix" = x; then
23111     # As a simple fix, exclude /usr/bin since it's not a real path.
23112     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
23113       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23114       # a path prefixed by /cygdrive for fixpath to work.
23115       new_path="$CYGWIN_ROOT_PATH$input_path"
23116     fi
23117   fi
23118 
23119   # remove trailing .exe if any
23120   new_path="${new_path/%.exe/}"
23121 
23122   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23123 
23124   # First separate the path from the arguments. This will split at the first
23125   # space.
23126   complete="$RC"
23127   path="${complete%% *}"
23128   tmp="$complete EOL"
23129   arguments="${tmp#* }"
23130 
23131   # Input might be given as Windows format, start by converting to
23132   # unix format.
23133   new_path="$path"
23134 
23135   windows_path="$new_path"
23136   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23137     unix_path=`$CYGPATH -u "$windows_path"`
23138     new_path="$unix_path"
23139   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23140     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23141     new_path="$unix_path"
23142   fi
23143 
23144 
23145   # Now try to locate executable using which
23146   new_path=`$WHICH "$new_path" 2> /dev/null`
23147 
23148   if test "x$new_path" = x; then
23149     # Oops. Which didn't find the executable.
23150     # The splitting of arguments from the executable at a space might have been incorrect,
23151     # since paths with space are more likely in Windows. Give it another try with the whole
23152     # argument.
23153     path="$complete"
23154     arguments="EOL"
23155     new_path="$path"
23156 
23157   windows_path="$new_path"
23158   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23159     unix_path=`$CYGPATH -u "$windows_path"`
23160     new_path="$unix_path"
23161   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23162     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23163     new_path="$unix_path"
23164   fi
23165 
23166 
23167     new_path=`$WHICH "$new_path" 2> /dev/null`
23168 
23169     if test "x$new_path" = x; then
23170       # It's still not found. Now this is an unrecoverable error.
23171       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
23172 $as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
23173       has_space=`$ECHO "$complete" | $GREP " "`
23174       if test "x$has_space" != x; then
23175         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23176 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23177       fi
23178       as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
23179     fi
23180   fi
23181 
23182   # Now new_path has a complete unix path to the binary
23183   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
23184     # Keep paths in /bin as-is, but remove trailing .exe if any
23185     new_path="${new_path/%.exe/}"
23186     # Do not save /bin paths to all_fixpath_prefixes!
23187   else
23188     # Not in mixed or Windows style, start by that.
23189     new_path=`cmd //c echo $new_path`
23190 
23191   input_path="$new_path"
23192   # Check if we need to convert this using DOS-style short mode. If the path
23193   # contains just simple characters, use it. Otherwise (spaces, weird characters),
23194   # take no chances and rewrite it.
23195   # Note: m4 eats our [], so we need to use [ and ] instead.
23196   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23197   if test "x$has_forbidden_chars" != x; then
23198     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23199     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23200   fi
23201 
23202     # Output is in $new_path
23203 
23204   windows_path="$new_path"
23205   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23206     unix_path=`$CYGPATH -u "$windows_path"`
23207     new_path="$unix_path"
23208   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23209     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23210     new_path="$unix_path"
23211   fi
23212 
23213     # remove trailing .exe if any
23214     new_path="${new_path/%.exe/}"
23215 
23216     # Save the first 10 bytes of this path to the storage, so fixpath can work.
23217     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23218   fi
23219 
23220   else
23221     # We're on a posix platform. Hooray! :)
23222     # First separate the path from the arguments. This will split at the first
23223     # space.
23224     complete="$RC"
23225     path="${complete%% *}"
23226     tmp="$complete EOL"
23227     arguments="${tmp#* }"
23228 
23229     # Cannot rely on the command "which" here since it doesn't always work.
23230     is_absolute_path=`$ECHO "$path" | $GREP ^/`
23231     if test -z "$is_absolute_path"; then
23232       # Path to executable is not absolute. Find it.
23233       IFS_save="$IFS"
23234       IFS=:
23235       for p in $PATH; do
23236         if test -f "$p/$path" && test -x "$p/$path"; then
23237           new_path="$p/$path"
23238           break
23239         fi
23240       done
23241       IFS="$IFS_save"
23242     else
23243       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving RC (as $path) failed, using $path directly." >&5
23244 $as_echo "$as_me: Resolving RC (as $path) failed, using $path directly." >&6;}
23245       new_path="$path"
23246     fi
23247 
23248     if test "x$new_path" = x; then
23249         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
23250 $as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
23251         has_space=`$ECHO "$complete" | $GREP " "`
23252         if test "x$has_space" != x; then
23253           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
23254 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
23255         fi
23256         as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
23257       fi
23258   fi
23259 
23260       # Now join together the path and the arguments once again
23261       if test "x$arguments" != xEOL; then
23262         new_complete="$new_path ${arguments% *}"
23263       else
23264         new_complete="$new_path"
23265       fi
23266 
23267   if test "x$complete" != "x$new_complete"; then
23268       RC="$new_complete"
23269       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting RC to \"$new_complete\"" >&5
23270 $as_echo "$as_me: Rewriting RC to \"$new_complete\"" >&6;}
23271     fi
23272 
23273 
23274     # For hotspot, we need these in Windows mixed path,
23275     # so rewrite them all. Need added .exe suffix.
23276     HOTSPOT_CXX="$CXX.exe"
23277     HOTSPOT_LD="$LD.exe"
23278     HOTSPOT_MT="$MT.exe"
23279     HOTSPOT_RC="$RC.exe"
23280 
23281   unix_path="$HOTSPOT_CXX"
23282   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23283     windows_path=`$CYGPATH -m "$unix_path"`
23284     HOTSPOT_CXX="$windows_path"
23285   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23286     windows_path=`cmd //c echo $unix_path`
23287     HOTSPOT_CXX="$windows_path"
23288   fi
23289 
23290 
23291   unix_path="$HOTSPOT_LD"
23292   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23293     windows_path=`$CYGPATH -m "$unix_path"`
23294     HOTSPOT_LD="$windows_path"
23295   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23296     windows_path=`cmd //c echo $unix_path`
23297     HOTSPOT_LD="$windows_path"
23298   fi
23299 
23300 
23301   unix_path="$HOTSPOT_MT"
23302   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23303     windows_path=`$CYGPATH -m "$unix_path"`
23304     HOTSPOT_MT="$windows_path"
23305   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23306     windows_path=`cmd //c echo $unix_path`
23307     HOTSPOT_MT="$windows_path"
23308   fi
23309 
23310 
23311   unix_path="$HOTSPOT_RC"
23312   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23313     windows_path=`$CYGPATH -m "$unix_path"`
23314     HOTSPOT_RC="$windows_path"
23315   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23316     windows_path=`cmd //c echo $unix_path`
23317     HOTSPOT_RC="$windows_path"
23318   fi
23319 
23320 
23321 
23322 
23323     RC_FLAGS="-nologo -l 0x409 -r"
23324     if test "x$VARIANT" = xOPT; then :
23325 
23326         RC_FLAGS="$RC_FLAGS -d NDEBUG"
23327 
23328 fi
23329     JDK_UPDATE_VERSION_NOTNULL=$JDK_UPDATE_VERSION
23330     if test "x$JDK_UPDATE_VERSION" = x; then :
23331 
23332         JDK_UPDATE_VERSION_NOTNULL=0
23333 
23334 fi
23335     RC_FLAGS="$RC_FLAGS -d \"JDK_BUILD_ID=$FULL_VERSION\""
23336     RC_FLAGS="$RC_FLAGS -d \"JDK_COMPANY=$COMPANY_NAME\""
23337     RC_FLAGS="$RC_FLAGS -d \"JDK_COMPONENT=$PRODUCT_NAME $JDK_RC_PLATFORM_NAME binary\""
23338     RC_FLAGS="$RC_FLAGS -d \"JDK_VER=$JDK_MINOR_VERSION.$JDK_MICRO_VERSION.$JDK_UPDATE_VERSION_NOTNULL.$COOKED_BUILD_NUMBER\""
23339     RC_FLAGS="$RC_FLAGS -d \"JDK_COPYRIGHT=Copyright \xA9 $COPYRIGHT_YEAR\""
23340     RC_FLAGS="$RC_FLAGS -d \"JDK_NAME=$PRODUCT_NAME $JDK_RC_PLATFORM_NAME $JDK_MINOR_VERSION $JDK_UPDATE_META_TAG\""
23341     RC_FLAGS="$RC_FLAGS -d \"JDK_FVER=$JDK_MINOR_VERSION,$JDK_MICRO_VERSION,$JDK_UPDATE_VERSION_NOTNULL,$COOKED_BUILD_NUMBER\""
23342 
23343     # lib.exe is used to create static libraries.
23344     # Extract the first word of "lib", so it can be a program name with args.
23345 set dummy lib; ac_word=$2
23346 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23347 $as_echo_n "checking for $ac_word... " >&6; }
23348 if ${ac_cv_prog_WINAR+:} false; then :
23349   $as_echo_n "(cached) " >&6
23350 else
23351   if test -n "$WINAR"; then
23352   ac_cv_prog_WINAR="$WINAR" # Let the user override the test.
23353 else
23354 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23355 for as_dir in $PATH
23356 do
23357   IFS=$as_save_IFS
23358   test -z "$as_dir" && as_dir=.
23359     for ac_exec_ext in '' $ac_executable_extensions; do
23360   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
23361     ac_cv_prog_WINAR="lib"
23362     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23363     break 2
23364   fi
23365 done
23366   done
23367 IFS=$as_save_IFS
23368 
23369 fi
23370 fi
23371 WINAR=$ac_cv_prog_WINAR
23372 if test -n "$WINAR"; then
23373   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINAR" >&5
23374 $as_echo "$WINAR" >&6; }
23375 else
23376   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23377 $as_echo "no" >&6; }
23378 fi
23379 
23380 
23381 
23382   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23383 
23384   # First separate the path from the arguments. This will split at the first
23385   # space.
23386   complete="$WINAR"
23387   path="${complete%% *}"
23388   tmp="$complete EOL"
23389   arguments="${tmp#* }"
23390 
23391   # Input might be given as Windows format, start by converting to
23392   # unix format.
23393   new_path=`$CYGPATH -u "$path"`
23394 
23395   # Now try to locate executable using which
23396   new_path=`$WHICH "$new_path" 2> /dev/null`
23397   # bat and cmd files are not always considered executable in cygwin causing which
23398   # to not find them
23399   if test "x$new_path" = x \
23400            && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23401            && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23402     new_path=`$CYGPATH -u "$path"`
23403   fi
23404   if test "x$new_path" = x; then
23405     # Oops. Which didn't find the executable.
23406     # The splitting of arguments from the executable at a space might have been incorrect,
23407     # since paths with space are more likely in Windows. Give it another try with the whole
23408     # argument.
23409     path="$complete"
23410     arguments="EOL"
23411     new_path=`$CYGPATH -u "$path"`
23412     new_path=`$WHICH "$new_path" 2> /dev/null`
23413     # bat and cmd files are not always considered executable in cygwin causing which
23414     # to not find them
23415     if test "x$new_path" = x \
23416              && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23417              && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23418       new_path=`$CYGPATH -u "$path"`
23419     fi
23420     if test "x$new_path" = x; then
23421       # It's still not found. Now this is an unrecoverable error.
23422       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$complete\", is not found." >&5
23423 $as_echo "$as_me: The path of WINAR, which resolves as \"$complete\", is not found." >&6;}
23424       has_space=`$ECHO "$complete" | $GREP " "`
23425       if test "x$has_space" != x; then
23426         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23427 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23428       fi
23429       as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5
23430     fi
23431   fi
23432 
23433   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23434   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23435   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23436   # "foo.exe" is OK but "foo" is an error.
23437   #
23438   # This test is therefore slightly more accurate than "test -f" to check for file precense.
23439   # It is also a way to make sure we got the proper file name for the real test later on.
23440   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23441   if test "x$test_shortpath" = x; then
23442     # Short path failed, file does not exist as specified.
23443     # Try adding .exe or .cmd
23444     if test -f "${new_path}.exe"; then
23445        input_to_shortpath="${new_path}.exe"
23446     elif test -f "${new_path}.cmd"; then
23447        input_to_shortpath="${new_path}.cmd"
23448     else
23449       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$new_path\", is invalid." >&5
23450 $as_echo "$as_me: The path of WINAR, which resolves as \"$new_path\", is invalid." >&6;}
23451       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
23452 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
23453       as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5
23454     fi
23455   else
23456     input_to_shortpath="$new_path"
23457   fi
23458 
23459   # Call helper function which possibly converts this using DOS-style short mode.
23460   # If so, the updated path is stored in $new_path.
23461   new_path="$input_to_shortpath"
23462 
23463   input_path="$input_to_shortpath"
23464   # Check if we need to convert this using DOS-style short mode. If the path
23465   # contains just simple characters, use it. Otherwise (spaces, weird characters),
23466   # take no chances and rewrite it.
23467   # Note: m4 eats our [], so we need to use [ and ] instead.
23468   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23469   if test "x$has_forbidden_chars" != x; then
23470     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23471     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23472     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23473     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23474       # Going to short mode and back again did indeed matter. Since short mode is
23475       # case insensitive, let's make it lowercase to improve readability.
23476       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23477       # Now convert it back to Unix-stile (cygpath)
23478       input_path=`$CYGPATH -u "$shortmode_path"`
23479       new_path="$input_path"
23480     fi
23481   fi
23482 
23483   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23484   if test "x$test_cygdrive_prefix" = x; then
23485     # As a simple fix, exclude /usr/bin since it's not a real path.
23486     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
23487       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23488       # a path prefixed by /cygdrive for fixpath to work.
23489       new_path="$CYGWIN_ROOT_PATH$input_path"
23490     fi
23491   fi
23492 
23493   # remove trailing .exe if any
23494   new_path="${new_path/%.exe/}"
23495 
23496   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23497 
23498   # First separate the path from the arguments. This will split at the first
23499   # space.
23500   complete="$WINAR"
23501   path="${complete%% *}"
23502   tmp="$complete EOL"
23503   arguments="${tmp#* }"
23504 
23505   # Input might be given as Windows format, start by converting to
23506   # unix format.
23507   new_path="$path"
23508 
23509   windows_path="$new_path"
23510   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23511     unix_path=`$CYGPATH -u "$windows_path"`
23512     new_path="$unix_path"
23513   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23514     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23515     new_path="$unix_path"
23516   fi
23517 
23518 
23519   # Now try to locate executable using which
23520   new_path=`$WHICH "$new_path" 2> /dev/null`
23521 
23522   if test "x$new_path" = x; then
23523     # Oops. Which didn't find the executable.
23524     # The splitting of arguments from the executable at a space might have been incorrect,
23525     # since paths with space are more likely in Windows. Give it another try with the whole
23526     # argument.
23527     path="$complete"
23528     arguments="EOL"
23529     new_path="$path"
23530 
23531   windows_path="$new_path"
23532   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23533     unix_path=`$CYGPATH -u "$windows_path"`
23534     new_path="$unix_path"
23535   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23536     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23537     new_path="$unix_path"
23538   fi
23539 
23540 
23541     new_path=`$WHICH "$new_path" 2> /dev/null`
23542 
23543     if test "x$new_path" = x; then
23544       # It's still not found. Now this is an unrecoverable error.
23545       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$complete\", is not found." >&5
23546 $as_echo "$as_me: The path of WINAR, which resolves as \"$complete\", is not found." >&6;}
23547       has_space=`$ECHO "$complete" | $GREP " "`
23548       if test "x$has_space" != x; then
23549         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23550 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23551       fi
23552       as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5
23553     fi
23554   fi
23555 
23556   # Now new_path has a complete unix path to the binary
23557   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
23558     # Keep paths in /bin as-is, but remove trailing .exe if any
23559     new_path="${new_path/%.exe/}"
23560     # Do not save /bin paths to all_fixpath_prefixes!
23561   else
23562     # Not in mixed or Windows style, start by that.
23563     new_path=`cmd //c echo $new_path`
23564 
23565   input_path="$new_path"
23566   # Check if we need to convert this using DOS-style short mode. If the path
23567   # contains just simple characters, use it. Otherwise (spaces, weird characters),
23568   # take no chances and rewrite it.
23569   # Note: m4 eats our [], so we need to use [ and ] instead.
23570   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23571   if test "x$has_forbidden_chars" != x; then
23572     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23573     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23574   fi
23575 
23576     # Output is in $new_path
23577 
23578   windows_path="$new_path"
23579   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23580     unix_path=`$CYGPATH -u "$windows_path"`
23581     new_path="$unix_path"
23582   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23583     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23584     new_path="$unix_path"
23585   fi
23586 
23587     # remove trailing .exe if any
23588     new_path="${new_path/%.exe/}"
23589 
23590     # Save the first 10 bytes of this path to the storage, so fixpath can work.
23591     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23592   fi
23593 
23594   else
23595     # We're on a posix platform. Hooray! :)
23596     # First separate the path from the arguments. This will split at the first
23597     # space.
23598     complete="$WINAR"
23599     path="${complete%% *}"
23600     tmp="$complete EOL"
23601     arguments="${tmp#* }"
23602 
23603     # Cannot rely on the command "which" here since it doesn't always work.
23604     is_absolute_path=`$ECHO "$path" | $GREP ^/`
23605     if test -z "$is_absolute_path"; then
23606       # Path to executable is not absolute. Find it.
23607       IFS_save="$IFS"
23608       IFS=:
23609       for p in $PATH; do
23610         if test -f "$p/$path" && test -x "$p/$path"; then
23611           new_path="$p/$path"
23612           break
23613         fi
23614       done
23615       IFS="$IFS_save"
23616     else
23617       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving WINAR (as $path) failed, using $path directly." >&5
23618 $as_echo "$as_me: Resolving WINAR (as $path) failed, using $path directly." >&6;}
23619       new_path="$path"
23620     fi
23621 
23622     if test "x$new_path" = x; then
23623         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$complete\", is not found." >&5
23624 $as_echo "$as_me: The path of WINAR, which resolves as \"$complete\", is not found." >&6;}
23625         has_space=`$ECHO "$complete" | $GREP " "`
23626         if test "x$has_space" != x; then
23627           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
23628 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
23629         fi
23630         as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5
23631       fi
23632   fi
23633 
23634       # Now join together the path and the arguments once again
23635       if test "x$arguments" != xEOL; then
23636         new_complete="$new_path ${arguments% *}"
23637       else
23638         new_complete="$new_path"
23639       fi
23640 
23641   if test "x$complete" != "x$new_complete"; then
23642       WINAR="$new_complete"
23643       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting WINAR to \"$new_complete\"" >&5
23644 $as_echo "$as_me: Rewriting WINAR to \"$new_complete\"" >&6;}
23645     fi
23646 
23647     AR="$WINAR"
23648     ARFLAGS="-nologo -NODEFAULTLIB:MSVCRT"
23649 
23650     # Extract the first word of "dumpbin", so it can be a program name with args.
23651 set dummy dumpbin; ac_word=$2
23652 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23653 $as_echo_n "checking for $ac_word... " >&6; }
23654 if ${ac_cv_prog_DUMPBIN+:} false; then :
23655   $as_echo_n "(cached) " >&6
23656 else
23657   if test -n "$DUMPBIN"; then
23658   ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test.
23659 else
23660 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23661 for as_dir in $PATH
23662 do
23663   IFS=$as_save_IFS
23664   test -z "$as_dir" && as_dir=.
23665     for ac_exec_ext in '' $ac_executable_extensions; do
23666   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
23667     ac_cv_prog_DUMPBIN="dumpbin"
23668     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23669     break 2
23670   fi
23671 done
23672   done
23673 IFS=$as_save_IFS
23674 
23675 fi
23676 fi
23677 DUMPBIN=$ac_cv_prog_DUMPBIN
23678 if test -n "$DUMPBIN"; then
23679   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5
23680 $as_echo "$DUMPBIN" >&6; }
23681 else
23682   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23683 $as_echo "no" >&6; }
23684 fi
23685 
23686 
23687 
23688   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23689 
23690   # First separate the path from the arguments. This will split at the first
23691   # space.
23692   complete="$DUMPBIN"
23693   path="${complete%% *}"
23694   tmp="$complete EOL"
23695   arguments="${tmp#* }"
23696 
23697   # Input might be given as Windows format, start by converting to
23698   # unix format.
23699   new_path=`$CYGPATH -u "$path"`
23700 
23701   # Now try to locate executable using which
23702   new_path=`$WHICH "$new_path" 2> /dev/null`
23703   # bat and cmd files are not always considered executable in cygwin causing which
23704   # to not find them
23705   if test "x$new_path" = x \
23706            && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23707            && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23708     new_path=`$CYGPATH -u "$path"`
23709   fi
23710   if test "x$new_path" = x; then
23711     # Oops. Which didn't find the executable.
23712     # The splitting of arguments from the executable at a space might have been incorrect,
23713     # since paths with space are more likely in Windows. Give it another try with the whole
23714     # argument.
23715     path="$complete"
23716     arguments="EOL"
23717     new_path=`$CYGPATH -u "$path"`
23718     new_path=`$WHICH "$new_path" 2> /dev/null`
23719     # bat and cmd files are not always considered executable in cygwin causing which
23720     # to not find them
23721     if test "x$new_path" = x \
23722              && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23723              && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23724       new_path=`$CYGPATH -u "$path"`
23725     fi
23726     if test "x$new_path" = x; then
23727       # It's still not found. Now this is an unrecoverable error.
23728       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
23729 $as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
23730       has_space=`$ECHO "$complete" | $GREP " "`
23731       if test "x$has_space" != x; then
23732         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23733 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23734       fi
23735       as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
23736     fi
23737   fi
23738 
23739   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23740   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23741   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23742   # "foo.exe" is OK but "foo" is an error.
23743   #
23744   # This test is therefore slightly more accurate than "test -f" to check for file precense.
23745   # It is also a way to make sure we got the proper file name for the real test later on.
23746   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23747   if test "x$test_shortpath" = x; then
23748     # Short path failed, file does not exist as specified.
23749     # Try adding .exe or .cmd
23750     if test -f "${new_path}.exe"; then
23751        input_to_shortpath="${new_path}.exe"
23752     elif test -f "${new_path}.cmd"; then
23753        input_to_shortpath="${new_path}.cmd"
23754     else
23755       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&5
23756 $as_echo "$as_me: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&6;}
23757       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
23758 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
23759       as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
23760     fi
23761   else
23762     input_to_shortpath="$new_path"
23763   fi
23764 
23765   # Call helper function which possibly converts this using DOS-style short mode.
23766   # If so, the updated path is stored in $new_path.
23767   new_path="$input_to_shortpath"
23768 
23769   input_path="$input_to_shortpath"
23770   # Check if we need to convert this using DOS-style short mode. If the path
23771   # contains just simple characters, use it. Otherwise (spaces, weird characters),
23772   # take no chances and rewrite it.
23773   # Note: m4 eats our [], so we need to use [ and ] instead.
23774   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23775   if test "x$has_forbidden_chars" != x; then
23776     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23777     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23778     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23779     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23780       # Going to short mode and back again did indeed matter. Since short mode is
23781       # case insensitive, let's make it lowercase to improve readability.
23782       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23783       # Now convert it back to Unix-stile (cygpath)
23784       input_path=`$CYGPATH -u "$shortmode_path"`
23785       new_path="$input_path"
23786     fi
23787   fi
23788 
23789   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23790   if test "x$test_cygdrive_prefix" = x; then
23791     # As a simple fix, exclude /usr/bin since it's not a real path.
23792     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
23793       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23794       # a path prefixed by /cygdrive for fixpath to work.
23795       new_path="$CYGWIN_ROOT_PATH$input_path"
23796     fi
23797   fi
23798 
23799   # remove trailing .exe if any
23800   new_path="${new_path/%.exe/}"
23801 
23802   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23803 
23804   # First separate the path from the arguments. This will split at the first
23805   # space.
23806   complete="$DUMPBIN"
23807   path="${complete%% *}"
23808   tmp="$complete EOL"
23809   arguments="${tmp#* }"
23810 
23811   # Input might be given as Windows format, start by converting to
23812   # unix format.
23813   new_path="$path"
23814 
23815   windows_path="$new_path"
23816   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23817     unix_path=`$CYGPATH -u "$windows_path"`
23818     new_path="$unix_path"
23819   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23820     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23821     new_path="$unix_path"
23822   fi
23823 
23824 
23825   # Now try to locate executable using which
23826   new_path=`$WHICH "$new_path" 2> /dev/null`
23827 
23828   if test "x$new_path" = x; then
23829     # Oops. Which didn't find the executable.
23830     # The splitting of arguments from the executable at a space might have been incorrect,
23831     # since paths with space are more likely in Windows. Give it another try with the whole
23832     # argument.
23833     path="$complete"
23834     arguments="EOL"
23835     new_path="$path"
23836 
23837   windows_path="$new_path"
23838   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23839     unix_path=`$CYGPATH -u "$windows_path"`
23840     new_path="$unix_path"
23841   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23842     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23843     new_path="$unix_path"
23844   fi
23845 
23846 
23847     new_path=`$WHICH "$new_path" 2> /dev/null`
23848 
23849     if test "x$new_path" = x; then
23850       # It's still not found. Now this is an unrecoverable error.
23851       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
23852 $as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
23853       has_space=`$ECHO "$complete" | $GREP " "`
23854       if test "x$has_space" != x; then
23855         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23856 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23857       fi
23858       as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
23859     fi
23860   fi
23861 
23862   # Now new_path has a complete unix path to the binary
23863   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
23864     # Keep paths in /bin as-is, but remove trailing .exe if any
23865     new_path="${new_path/%.exe/}"
23866     # Do not save /bin paths to all_fixpath_prefixes!
23867   else
23868     # Not in mixed or Windows style, start by that.
23869     new_path=`cmd //c echo $new_path`
23870 
23871   input_path="$new_path"
23872   # Check if we need to convert this using DOS-style short mode. If the path
23873   # contains just simple characters, use it. Otherwise (spaces, weird characters),
23874   # take no chances and rewrite it.
23875   # Note: m4 eats our [], so we need to use [ and ] instead.
23876   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23877   if test "x$has_forbidden_chars" != x; then
23878     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23879     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23880   fi
23881 
23882     # Output is in $new_path
23883 
23884   windows_path="$new_path"
23885   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23886     unix_path=`$CYGPATH -u "$windows_path"`
23887     new_path="$unix_path"
23888   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23889     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23890     new_path="$unix_path"
23891   fi
23892 
23893     # remove trailing .exe if any
23894     new_path="${new_path/%.exe/}"
23895 
23896     # Save the first 10 bytes of this path to the storage, so fixpath can work.
23897     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23898   fi
23899 
23900   else
23901     # We're on a posix platform. Hooray! :)
23902     # First separate the path from the arguments. This will split at the first
23903     # space.
23904     complete="$DUMPBIN"
23905     path="${complete%% *}"
23906     tmp="$complete EOL"
23907     arguments="${tmp#* }"
23908 
23909     # Cannot rely on the command "which" here since it doesn't always work.
23910     is_absolute_path=`$ECHO "$path" | $GREP ^/`
23911     if test -z "$is_absolute_path"; then
23912       # Path to executable is not absolute. Find it.
23913       IFS_save="$IFS"
23914       IFS=:
23915       for p in $PATH; do
23916         if test -f "$p/$path" && test -x "$p/$path"; then
23917           new_path="$p/$path"
23918           break
23919         fi
23920       done
23921       IFS="$IFS_save"
23922     else
23923       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving DUMPBIN (as $path) failed, using $path directly." >&5
23924 $as_echo "$as_me: Resolving DUMPBIN (as $path) failed, using $path directly." >&6;}
23925       new_path="$path"
23926     fi
23927 
23928     if test "x$new_path" = x; then
23929         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
23930 $as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
23931         has_space=`$ECHO "$complete" | $GREP " "`
23932         if test "x$has_space" != x; then
23933           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
23934 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
23935         fi
23936         as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
23937       fi
23938   fi
23939 
23940       # Now join together the path and the arguments once again
23941       if test "x$arguments" != xEOL; then
23942         new_complete="$new_path ${arguments% *}"
23943       else
23944         new_complete="$new_path"
23945       fi
23946 
23947   if test "x$complete" != "x$new_complete"; then
23948       DUMPBIN="$new_complete"
23949       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DUMPBIN to \"$new_complete\"" >&5
23950 $as_echo "$as_me: Rewriting DUMPBIN to \"$new_complete\"" >&6;}
23951     fi
23952 
23953 
23954     COMPILER_TYPE=CL
23955     CCXXFLAGS="$CCXXFLAGS -nologo"
23956 
23957 fi
23958 
23959 
23960 
23961 ac_ext=c
23962 ac_cpp='$CPP $CPPFLAGS'
23963 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
23964 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
23965 ac_compiler_gnu=$ac_cv_c_compiler_gnu
23966 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
23967 $as_echo_n "checking how to run the C preprocessor... " >&6; }
23968 # On Suns, sometimes $CPP names a directory.
23969 if test -n "$CPP" && test -d "$CPP"; then
23970   CPP=
23971 fi
23972 if test -z "$CPP"; then
23973   if ${ac_cv_prog_CPP+:} false; then :
23974   $as_echo_n "(cached) " >&6
23975 else
23976       # Double quotes because CPP needs to be expanded
23977     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
23978     do
23979       ac_preproc_ok=false
23980 for ac_c_preproc_warn_flag in '' yes
23981 do
23982   # Use a header file that comes with gcc, so configuring glibc
23983   # with a fresh cross-compiler works.
23984   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
23985   # <limits.h> exists even on freestanding compilers.
23986   # On the NeXT, cc -E runs the code through the compiler's parser,
23987   # not just through cpp. "Syntax error" is here to catch this case.
23988   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23989 /* end confdefs.h.  */
23990 #ifdef __STDC__
23991 # include <limits.h>
23992 #else
23993 # include <assert.h>
23994 #endif
23995                      Syntax error
23996 _ACEOF
23997 if ac_fn_c_try_cpp "$LINENO"; then :
23998 
23999 else
24000   # Broken: fails on valid input.
24001 continue
24002 fi
24003 rm -f conftest.err conftest.i conftest.$ac_ext
24004 
24005   # OK, works on sane cases.  Now check whether nonexistent headers
24006   # can be detected and how.
24007   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24008 /* end confdefs.h.  */
24009 #include <ac_nonexistent.h>
24010 _ACEOF
24011 if ac_fn_c_try_cpp "$LINENO"; then :
24012   # Broken: success on invalid input.
24013 continue
24014 else
24015   # Passes both tests.
24016 ac_preproc_ok=:
24017 break
24018 fi
24019 rm -f conftest.err conftest.i conftest.$ac_ext
24020 
24021 done
24022 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
24023 rm -f conftest.i conftest.err conftest.$ac_ext
24024 if $ac_preproc_ok; then :
24025   break
24026 fi
24027 
24028     done
24029     ac_cv_prog_CPP=$CPP
24030 
24031 fi
24032   CPP=$ac_cv_prog_CPP
24033 else
24034   ac_cv_prog_CPP=$CPP
24035 fi
24036 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
24037 $as_echo "$CPP" >&6; }
24038 ac_preproc_ok=false
24039 for ac_c_preproc_warn_flag in '' yes
24040 do
24041   # Use a header file that comes with gcc, so configuring glibc
24042   # with a fresh cross-compiler works.
24043   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
24044   # <limits.h> exists even on freestanding compilers.
24045   # On the NeXT, cc -E runs the code through the compiler's parser,
24046   # not just through cpp. "Syntax error" is here to catch this case.
24047   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24048 /* end confdefs.h.  */
24049 #ifdef __STDC__
24050 # include <limits.h>
24051 #else
24052 # include <assert.h>
24053 #endif
24054                      Syntax error
24055 _ACEOF
24056 if ac_fn_c_try_cpp "$LINENO"; then :
24057 
24058 else
24059   # Broken: fails on valid input.
24060 continue
24061 fi
24062 rm -f conftest.err conftest.i conftest.$ac_ext
24063 
24064   # OK, works on sane cases.  Now check whether nonexistent headers
24065   # can be detected and how.
24066   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24067 /* end confdefs.h.  */
24068 #include <ac_nonexistent.h>
24069 _ACEOF
24070 if ac_fn_c_try_cpp "$LINENO"; then :
24071   # Broken: success on invalid input.
24072 continue
24073 else
24074   # Passes both tests.
24075 ac_preproc_ok=:
24076 break
24077 fi
24078 rm -f conftest.err conftest.i conftest.$ac_ext
24079 
24080 done
24081 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
24082 rm -f conftest.i conftest.err conftest.$ac_ext
24083 if $ac_preproc_ok; then :
24084 
24085 else
24086   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
24087 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
24088 as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
24089 See \`config.log' for more details" "$LINENO" 5; }
24090 fi
24091 
24092 ac_ext=cpp
24093 ac_cpp='$CXXCPP $CPPFLAGS'
24094 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
24095 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
24096 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
24097 
24098 
24099   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24100 
24101   # First separate the path from the arguments. This will split at the first
24102   # space.
24103   complete="$CPP"
24104   path="${complete%% *}"
24105   tmp="$complete EOL"
24106   arguments="${tmp#* }"
24107 
24108   # Input might be given as Windows format, start by converting to
24109   # unix format.
24110   new_path=`$CYGPATH -u "$path"`
24111 
24112   # Now try to locate executable using which
24113   new_path=`$WHICH "$new_path" 2> /dev/null`
24114   # bat and cmd files are not always considered executable in cygwin causing which
24115   # to not find them
24116   if test "x$new_path" = x \
24117            && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24118            && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24119     new_path=`$CYGPATH -u "$path"`
24120   fi
24121   if test "x$new_path" = x; then
24122     # Oops. Which didn't find the executable.
24123     # The splitting of arguments from the executable at a space might have been incorrect,
24124     # since paths with space are more likely in Windows. Give it another try with the whole
24125     # argument.
24126     path="$complete"
24127     arguments="EOL"
24128     new_path=`$CYGPATH -u "$path"`
24129     new_path=`$WHICH "$new_path" 2> /dev/null`
24130     # bat and cmd files are not always considered executable in cygwin causing which
24131     # to not find them
24132     if test "x$new_path" = x \
24133              && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24134              && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24135       new_path=`$CYGPATH -u "$path"`
24136     fi
24137     if test "x$new_path" = x; then
24138       # It's still not found. Now this is an unrecoverable error.
24139       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
24140 $as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
24141       has_space=`$ECHO "$complete" | $GREP " "`
24142       if test "x$has_space" != x; then
24143         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24144 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24145       fi
24146       as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
24147     fi
24148   fi
24149 
24150   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24151   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24152   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24153   # "foo.exe" is OK but "foo" is an error.
24154   #
24155   # This test is therefore slightly more accurate than "test -f" to check for file precense.
24156   # It is also a way to make sure we got the proper file name for the real test later on.
24157   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24158   if test "x$test_shortpath" = x; then
24159     # Short path failed, file does not exist as specified.
24160     # Try adding .exe or .cmd
24161     if test -f "${new_path}.exe"; then
24162        input_to_shortpath="${new_path}.exe"
24163     elif test -f "${new_path}.cmd"; then
24164        input_to_shortpath="${new_path}.cmd"
24165     else
24166       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$new_path\", is invalid." >&5
24167 $as_echo "$as_me: The path of CPP, which resolves as \"$new_path\", is invalid." >&6;}
24168       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
24169 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
24170       as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
24171     fi
24172   else
24173     input_to_shortpath="$new_path"
24174   fi
24175 
24176   # Call helper function which possibly converts this using DOS-style short mode.
24177   # If so, the updated path is stored in $new_path.
24178   new_path="$input_to_shortpath"
24179 
24180   input_path="$input_to_shortpath"
24181   # Check if we need to convert this using DOS-style short mode. If the path
24182   # contains just simple characters, use it. Otherwise (spaces, weird characters),
24183   # take no chances and rewrite it.
24184   # Note: m4 eats our [], so we need to use [ and ] instead.
24185   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24186   if test "x$has_forbidden_chars" != x; then
24187     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24188     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24189     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24190     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24191       # Going to short mode and back again did indeed matter. Since short mode is
24192       # case insensitive, let's make it lowercase to improve readability.
24193       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24194       # Now convert it back to Unix-stile (cygpath)
24195       input_path=`$CYGPATH -u "$shortmode_path"`
24196       new_path="$input_path"
24197     fi
24198   fi
24199 
24200   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24201   if test "x$test_cygdrive_prefix" = x; then
24202     # As a simple fix, exclude /usr/bin since it's not a real path.
24203     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
24204       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24205       # a path prefixed by /cygdrive for fixpath to work.
24206       new_path="$CYGWIN_ROOT_PATH$input_path"
24207     fi
24208   fi
24209 
24210   # remove trailing .exe if any
24211   new_path="${new_path/%.exe/}"
24212 
24213   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24214 
24215   # First separate the path from the arguments. This will split at the first
24216   # space.
24217   complete="$CPP"
24218   path="${complete%% *}"
24219   tmp="$complete EOL"
24220   arguments="${tmp#* }"
24221 
24222   # Input might be given as Windows format, start by converting to
24223   # unix format.
24224   new_path="$path"
24225 
24226   windows_path="$new_path"
24227   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24228     unix_path=`$CYGPATH -u "$windows_path"`
24229     new_path="$unix_path"
24230   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24231     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24232     new_path="$unix_path"
24233   fi
24234 
24235 
24236   # Now try to locate executable using which
24237   new_path=`$WHICH "$new_path" 2> /dev/null`
24238 
24239   if test "x$new_path" = x; then
24240     # Oops. Which didn't find the executable.
24241     # The splitting of arguments from the executable at a space might have been incorrect,
24242     # since paths with space are more likely in Windows. Give it another try with the whole
24243     # argument.
24244     path="$complete"
24245     arguments="EOL"
24246     new_path="$path"
24247 
24248   windows_path="$new_path"
24249   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24250     unix_path=`$CYGPATH -u "$windows_path"`
24251     new_path="$unix_path"
24252   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24253     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24254     new_path="$unix_path"
24255   fi
24256 
24257 
24258     new_path=`$WHICH "$new_path" 2> /dev/null`
24259 
24260     if test "x$new_path" = x; then
24261       # It's still not found. Now this is an unrecoverable error.
24262       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
24263 $as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
24264       has_space=`$ECHO "$complete" | $GREP " "`
24265       if test "x$has_space" != x; then
24266         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24267 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24268       fi
24269       as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
24270     fi
24271   fi
24272 
24273   # Now new_path has a complete unix path to the binary
24274   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
24275     # Keep paths in /bin as-is, but remove trailing .exe if any
24276     new_path="${new_path/%.exe/}"
24277     # Do not save /bin paths to all_fixpath_prefixes!
24278   else
24279     # Not in mixed or Windows style, start by that.
24280     new_path=`cmd //c echo $new_path`
24281 
24282   input_path="$new_path"
24283   # Check if we need to convert this using DOS-style short mode. If the path
24284   # contains just simple characters, use it. Otherwise (spaces, weird characters),
24285   # take no chances and rewrite it.
24286   # Note: m4 eats our [], so we need to use [ and ] instead.
24287   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24288   if test "x$has_forbidden_chars" != x; then
24289     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24290     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24291   fi
24292 
24293     # Output is in $new_path
24294 
24295   windows_path="$new_path"
24296   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24297     unix_path=`$CYGPATH -u "$windows_path"`
24298     new_path="$unix_path"
24299   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24300     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24301     new_path="$unix_path"
24302   fi
24303 
24304     # remove trailing .exe if any
24305     new_path="${new_path/%.exe/}"
24306 
24307     # Save the first 10 bytes of this path to the storage, so fixpath can work.
24308     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24309   fi
24310 
24311   else
24312     # We're on a posix platform. Hooray! :)
24313     # First separate the path from the arguments. This will split at the first
24314     # space.
24315     complete="$CPP"
24316     path="${complete%% *}"
24317     tmp="$complete EOL"
24318     arguments="${tmp#* }"
24319 
24320     # Cannot rely on the command "which" here since it doesn't always work.
24321     is_absolute_path=`$ECHO "$path" | $GREP ^/`
24322     if test -z "$is_absolute_path"; then
24323       # Path to executable is not absolute. Find it.
24324       IFS_save="$IFS"
24325       IFS=:
24326       for p in $PATH; do
24327         if test -f "$p/$path" && test -x "$p/$path"; then
24328           new_path="$p/$path"
24329           break
24330         fi
24331       done
24332       IFS="$IFS_save"
24333     else
24334       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CPP (as $path) failed, using $path directly." >&5
24335 $as_echo "$as_me: Resolving CPP (as $path) failed, using $path directly." >&6;}
24336       new_path="$path"
24337     fi
24338 
24339     if test "x$new_path" = x; then
24340         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
24341 $as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
24342         has_space=`$ECHO "$complete" | $GREP " "`
24343         if test "x$has_space" != x; then
24344           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
24345 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
24346         fi
24347         as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
24348       fi
24349   fi
24350 
24351       # Now join together the path and the arguments once again
24352       if test "x$arguments" != xEOL; then
24353         new_complete="$new_path ${arguments% *}"
24354       else
24355         new_complete="$new_path"
24356       fi
24357 
24358   if test "x$complete" != "x$new_complete"; then
24359       CPP="$new_complete"
24360       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CPP to \"$new_complete\"" >&5
24361 $as_echo "$as_me: Rewriting CPP to \"$new_complete\"" >&6;}
24362     fi
24363 
24364 
24365 ac_ext=cpp
24366 ac_cpp='$CXXCPP $CPPFLAGS'
24367 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
24368 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
24369 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
24370 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5
24371 $as_echo_n "checking how to run the C++ preprocessor... " >&6; }
24372 if test -z "$CXXCPP"; then
24373   if ${ac_cv_prog_CXXCPP+:} false; then :
24374   $as_echo_n "(cached) " >&6
24375 else
24376       # Double quotes because CXXCPP needs to be expanded
24377     for CXXCPP in "$CXX -E" "/lib/cpp"
24378     do
24379       ac_preproc_ok=false
24380 for ac_cxx_preproc_warn_flag in '' yes
24381 do
24382   # Use a header file that comes with gcc, so configuring glibc
24383   # with a fresh cross-compiler works.
24384   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
24385   # <limits.h> exists even on freestanding compilers.
24386   # On the NeXT, cc -E runs the code through the compiler's parser,
24387   # not just through cpp. "Syntax error" is here to catch this case.
24388   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24389 /* end confdefs.h.  */
24390 #ifdef __STDC__
24391 # include <limits.h>
24392 #else
24393 # include <assert.h>
24394 #endif
24395                      Syntax error
24396 _ACEOF
24397 if ac_fn_cxx_try_cpp "$LINENO"; then :
24398 
24399 else
24400   # Broken: fails on valid input.
24401 continue
24402 fi
24403 rm -f conftest.err conftest.i conftest.$ac_ext
24404 
24405   # OK, works on sane cases.  Now check whether nonexistent headers
24406   # can be detected and how.
24407   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24408 /* end confdefs.h.  */
24409 #include <ac_nonexistent.h>
24410 _ACEOF
24411 if ac_fn_cxx_try_cpp "$LINENO"; then :
24412   # Broken: success on invalid input.
24413 continue
24414 else
24415   # Passes both tests.
24416 ac_preproc_ok=:
24417 break
24418 fi
24419 rm -f conftest.err conftest.i conftest.$ac_ext
24420 
24421 done
24422 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
24423 rm -f conftest.i conftest.err conftest.$ac_ext
24424 if $ac_preproc_ok; then :
24425   break
24426 fi
24427 
24428     done
24429     ac_cv_prog_CXXCPP=$CXXCPP
24430 
24431 fi
24432   CXXCPP=$ac_cv_prog_CXXCPP
24433 else
24434   ac_cv_prog_CXXCPP=$CXXCPP
24435 fi
24436 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5
24437 $as_echo "$CXXCPP" >&6; }
24438 ac_preproc_ok=false
24439 for ac_cxx_preproc_warn_flag in '' yes
24440 do
24441   # Use a header file that comes with gcc, so configuring glibc
24442   # with a fresh cross-compiler works.
24443   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
24444   # <limits.h> exists even on freestanding compilers.
24445   # On the NeXT, cc -E runs the code through the compiler's parser,
24446   # not just through cpp. "Syntax error" is here to catch this case.
24447   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24448 /* end confdefs.h.  */
24449 #ifdef __STDC__
24450 # include <limits.h>
24451 #else
24452 # include <assert.h>
24453 #endif
24454                      Syntax error
24455 _ACEOF
24456 if ac_fn_cxx_try_cpp "$LINENO"; then :
24457 
24458 else
24459   # Broken: fails on valid input.
24460 continue
24461 fi
24462 rm -f conftest.err conftest.i conftest.$ac_ext
24463 
24464   # OK, works on sane cases.  Now check whether nonexistent headers
24465   # can be detected and how.
24466   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24467 /* end confdefs.h.  */
24468 #include <ac_nonexistent.h>
24469 _ACEOF
24470 if ac_fn_cxx_try_cpp "$LINENO"; then :
24471   # Broken: success on invalid input.
24472 continue
24473 else
24474   # Passes both tests.
24475 ac_preproc_ok=:
24476 break
24477 fi
24478 rm -f conftest.err conftest.i conftest.$ac_ext
24479 
24480 done
24481 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
24482 rm -f conftest.i conftest.err conftest.$ac_ext
24483 if $ac_preproc_ok; then :
24484 
24485 else
24486   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
24487 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
24488 as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check
24489 See \`config.log' for more details" "$LINENO" 5; }
24490 fi
24491 
24492 ac_ext=cpp
24493 ac_cpp='$CXXCPP $CPPFLAGS'
24494 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
24495 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
24496 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
24497 
24498 
24499   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24500 
24501   # First separate the path from the arguments. This will split at the first
24502   # space.
24503   complete="$CXXCPP"
24504   path="${complete%% *}"
24505   tmp="$complete EOL"
24506   arguments="${tmp#* }"
24507 
24508   # Input might be given as Windows format, start by converting to
24509   # unix format.
24510   new_path=`$CYGPATH -u "$path"`
24511 
24512   # Now try to locate executable using which
24513   new_path=`$WHICH "$new_path" 2> /dev/null`
24514   # bat and cmd files are not always considered executable in cygwin causing which
24515   # to not find them
24516   if test "x$new_path" = x \
24517            && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24518            && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24519     new_path=`$CYGPATH -u "$path"`
24520   fi
24521   if test "x$new_path" = x; then
24522     # Oops. Which didn't find the executable.
24523     # The splitting of arguments from the executable at a space might have been incorrect,
24524     # since paths with space are more likely in Windows. Give it another try with the whole
24525     # argument.
24526     path="$complete"
24527     arguments="EOL"
24528     new_path=`$CYGPATH -u "$path"`
24529     new_path=`$WHICH "$new_path" 2> /dev/null`
24530     # bat and cmd files are not always considered executable in cygwin causing which
24531     # to not find them
24532     if test "x$new_path" = x \
24533              && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24534              && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24535       new_path=`$CYGPATH -u "$path"`
24536     fi
24537     if test "x$new_path" = x; then
24538       # It's still not found. Now this is an unrecoverable error.
24539       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
24540 $as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
24541       has_space=`$ECHO "$complete" | $GREP " "`
24542       if test "x$has_space" != x; then
24543         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24544 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24545       fi
24546       as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
24547     fi
24548   fi
24549 
24550   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24551   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24552   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24553   # "foo.exe" is OK but "foo" is an error.
24554   #
24555   # This test is therefore slightly more accurate than "test -f" to check for file precense.
24556   # It is also a way to make sure we got the proper file name for the real test later on.
24557   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24558   if test "x$test_shortpath" = x; then
24559     # Short path failed, file does not exist as specified.
24560     # Try adding .exe or .cmd
24561     if test -f "${new_path}.exe"; then
24562        input_to_shortpath="${new_path}.exe"
24563     elif test -f "${new_path}.cmd"; then
24564        input_to_shortpath="${new_path}.cmd"
24565     else
24566       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&5
24567 $as_echo "$as_me: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&6;}
24568       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
24569 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
24570       as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
24571     fi
24572   else
24573     input_to_shortpath="$new_path"
24574   fi
24575 
24576   # Call helper function which possibly converts this using DOS-style short mode.
24577   # If so, the updated path is stored in $new_path.
24578   new_path="$input_to_shortpath"
24579 
24580   input_path="$input_to_shortpath"
24581   # Check if we need to convert this using DOS-style short mode. If the path
24582   # contains just simple characters, use it. Otherwise (spaces, weird characters),
24583   # take no chances and rewrite it.
24584   # Note: m4 eats our [], so we need to use [ and ] instead.
24585   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24586   if test "x$has_forbidden_chars" != x; then
24587     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24588     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24589     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24590     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24591       # Going to short mode and back again did indeed matter. Since short mode is
24592       # case insensitive, let's make it lowercase to improve readability.
24593       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24594       # Now convert it back to Unix-stile (cygpath)
24595       input_path=`$CYGPATH -u "$shortmode_path"`
24596       new_path="$input_path"
24597     fi
24598   fi
24599 
24600   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24601   if test "x$test_cygdrive_prefix" = x; then
24602     # As a simple fix, exclude /usr/bin since it's not a real path.
24603     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
24604       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24605       # a path prefixed by /cygdrive for fixpath to work.
24606       new_path="$CYGWIN_ROOT_PATH$input_path"
24607     fi
24608   fi
24609 
24610   # remove trailing .exe if any
24611   new_path="${new_path/%.exe/}"
24612 
24613   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24614 
24615   # First separate the path from the arguments. This will split at the first
24616   # space.
24617   complete="$CXXCPP"
24618   path="${complete%% *}"
24619   tmp="$complete EOL"
24620   arguments="${tmp#* }"
24621 
24622   # Input might be given as Windows format, start by converting to
24623   # unix format.
24624   new_path="$path"
24625 
24626   windows_path="$new_path"
24627   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24628     unix_path=`$CYGPATH -u "$windows_path"`
24629     new_path="$unix_path"
24630   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24631     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24632     new_path="$unix_path"
24633   fi
24634 
24635 
24636   # Now try to locate executable using which
24637   new_path=`$WHICH "$new_path" 2> /dev/null`
24638 
24639   if test "x$new_path" = x; then
24640     # Oops. Which didn't find the executable.
24641     # The splitting of arguments from the executable at a space might have been incorrect,
24642     # since paths with space are more likely in Windows. Give it another try with the whole
24643     # argument.
24644     path="$complete"
24645     arguments="EOL"
24646     new_path="$path"
24647 
24648   windows_path="$new_path"
24649   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24650     unix_path=`$CYGPATH -u "$windows_path"`
24651     new_path="$unix_path"
24652   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24653     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24654     new_path="$unix_path"
24655   fi
24656 
24657 
24658     new_path=`$WHICH "$new_path" 2> /dev/null`
24659 
24660     if test "x$new_path" = x; then
24661       # It's still not found. Now this is an unrecoverable error.
24662       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
24663 $as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
24664       has_space=`$ECHO "$complete" | $GREP " "`
24665       if test "x$has_space" != x; then
24666         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24667 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24668       fi
24669       as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
24670     fi
24671   fi
24672 
24673   # Now new_path has a complete unix path to the binary
24674   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
24675     # Keep paths in /bin as-is, but remove trailing .exe if any
24676     new_path="${new_path/%.exe/}"
24677     # Do not save /bin paths to all_fixpath_prefixes!
24678   else
24679     # Not in mixed or Windows style, start by that.
24680     new_path=`cmd //c echo $new_path`
24681 
24682   input_path="$new_path"
24683   # Check if we need to convert this using DOS-style short mode. If the path
24684   # contains just simple characters, use it. Otherwise (spaces, weird characters),
24685   # take no chances and rewrite it.
24686   # Note: m4 eats our [], so we need to use [ and ] instead.
24687   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24688   if test "x$has_forbidden_chars" != x; then
24689     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24690     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24691   fi
24692 
24693     # Output is in $new_path
24694 
24695   windows_path="$new_path"
24696   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24697     unix_path=`$CYGPATH -u "$windows_path"`
24698     new_path="$unix_path"
24699   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24700     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24701     new_path="$unix_path"
24702   fi
24703 
24704     # remove trailing .exe if any
24705     new_path="${new_path/%.exe/}"
24706 
24707     # Save the first 10 bytes of this path to the storage, so fixpath can work.
24708     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24709   fi
24710 
24711   else
24712     # We're on a posix platform. Hooray! :)
24713     # First separate the path from the arguments. This will split at the first
24714     # space.
24715     complete="$CXXCPP"
24716     path="${complete%% *}"
24717     tmp="$complete EOL"
24718     arguments="${tmp#* }"
24719 
24720     # Cannot rely on the command "which" here since it doesn't always work.
24721     is_absolute_path=`$ECHO "$path" | $GREP ^/`
24722     if test -z "$is_absolute_path"; then
24723       # Path to executable is not absolute. Find it.
24724       IFS_save="$IFS"
24725       IFS=:
24726       for p in $PATH; do
24727         if test -f "$p/$path" && test -x "$p/$path"; then
24728           new_path="$p/$path"
24729           break
24730         fi
24731       done
24732       IFS="$IFS_save"
24733     else
24734       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CXXCPP (as $path) failed, using $path directly." >&5
24735 $as_echo "$as_me: Resolving CXXCPP (as $path) failed, using $path directly." >&6;}
24736       new_path="$path"
24737     fi
24738 
24739     if test "x$new_path" = x; then
24740         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
24741 $as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
24742         has_space=`$ECHO "$complete" | $GREP " "`
24743         if test "x$has_space" != x; then
24744           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
24745 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
24746         fi
24747         as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
24748       fi
24749   fi
24750 
24751       # Now join together the path and the arguments once again
24752       if test "x$arguments" != xEOL; then
24753         new_complete="$new_path ${arguments% *}"
24754       else
24755         new_complete="$new_path"
24756       fi
24757 
24758   if test "x$complete" != "x$new_complete"; then
24759       CXXCPP="$new_complete"
24760       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXXCPP to \"$new_complete\"" >&5
24761 $as_echo "$as_me: Rewriting CXXCPP to \"$new_complete\"" >&6;}
24762     fi
24763 
24764 
24765 if test "x$COMPILE_TYPE" != "xcross"; then
24766     # If we are not cross compiling, use the same compilers for
24767     # building the build platform executables. The cross-compilation
24768     # case needed to be done earlier, but this can only be done after
24769     # the native tools have been localized.
24770     BUILD_CC="$CC"
24771     BUILD_CXX="$CXX"
24772     BUILD_LD="$LD"
24773 fi
24774 
24775 # for solaris we really need solaris tools, and not gnu equivalent
24776 #   these seems to normally reside in /usr/ccs/bin so add that to path before
24777 #   starting to probe
24778 #
24779 #   NOTE: I add this /usr/ccs/bin after TOOLS but before OLD_PATH
24780 #         so that it can be overriden --with-tools-dir
24781 if test "x$OPENJDK_BUILD_OS" = xsolaris; then
24782     PATH="${TOOLS_DIR}:/usr/ccs/bin:${OLD_PATH}"
24783 fi
24784 
24785 # Find the right assembler.
24786 if test "x$OPENJDK_TARGET_OS" = xsolaris; then
24787     # Extract the first word of "as", so it can be a program name with args.
24788 set dummy as; ac_word=$2
24789 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24790 $as_echo_n "checking for $ac_word... " >&6; }
24791 if ${ac_cv_path_AS+:} false; then :
24792   $as_echo_n "(cached) " >&6
24793 else
24794   case $AS in
24795   [\\/]* | ?:[\\/]*)
24796   ac_cv_path_AS="$AS" # Let the user override the test with a path.
24797   ;;
24798   *)
24799   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24800 for as_dir in $PATH
24801 do
24802   IFS=$as_save_IFS
24803   test -z "$as_dir" && as_dir=.
24804     for ac_exec_ext in '' $ac_executable_extensions; do
24805   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
24806     ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
24807     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24808     break 2
24809   fi
24810 done
24811   done
24812 IFS=$as_save_IFS
24813 
24814   ;;
24815 esac
24816 fi
24817 AS=$ac_cv_path_AS
24818 if test -n "$AS"; then
24819   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
24820 $as_echo "$AS" >&6; }
24821 else
24822   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24823 $as_echo "no" >&6; }
24824 fi
24825 
24826 
24827 
24828   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24829 
24830   # First separate the path from the arguments. This will split at the first
24831   # space.
24832   complete="$AS"
24833   path="${complete%% *}"
24834   tmp="$complete EOL"
24835   arguments="${tmp#* }"
24836 
24837   # Input might be given as Windows format, start by converting to
24838   # unix format.
24839   new_path=`$CYGPATH -u "$path"`
24840 
24841   # Now try to locate executable using which
24842   new_path=`$WHICH "$new_path" 2> /dev/null`
24843   # bat and cmd files are not always considered executable in cygwin causing which
24844   # to not find them
24845   if test "x$new_path" = x \
24846            && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24847            && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24848     new_path=`$CYGPATH -u "$path"`
24849   fi
24850   if test "x$new_path" = x; then
24851     # Oops. Which didn't find the executable.
24852     # The splitting of arguments from the executable at a space might have been incorrect,
24853     # since paths with space are more likely in Windows. Give it another try with the whole
24854     # argument.
24855     path="$complete"
24856     arguments="EOL"
24857     new_path=`$CYGPATH -u "$path"`
24858     new_path=`$WHICH "$new_path" 2> /dev/null`
24859     # bat and cmd files are not always considered executable in cygwin causing which
24860     # to not find them
24861     if test "x$new_path" = x \
24862              && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24863              && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24864       new_path=`$CYGPATH -u "$path"`
24865     fi
24866     if test "x$new_path" = x; then
24867       # It's still not found. Now this is an unrecoverable error.
24868       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
24869 $as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
24870       has_space=`$ECHO "$complete" | $GREP " "`
24871       if test "x$has_space" != x; then
24872         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24873 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24874       fi
24875       as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
24876     fi
24877   fi
24878 
24879   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24880   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24881   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24882   # "foo.exe" is OK but "foo" is an error.
24883   #
24884   # This test is therefore slightly more accurate than "test -f" to check for file precense.
24885   # It is also a way to make sure we got the proper file name for the real test later on.
24886   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24887   if test "x$test_shortpath" = x; then
24888     # Short path failed, file does not exist as specified.
24889     # Try adding .exe or .cmd
24890     if test -f "${new_path}.exe"; then
24891        input_to_shortpath="${new_path}.exe"
24892     elif test -f "${new_path}.cmd"; then
24893        input_to_shortpath="${new_path}.cmd"
24894     else
24895       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$new_path\", is invalid." >&5
24896 $as_echo "$as_me: The path of AS, which resolves as \"$new_path\", is invalid." >&6;}
24897       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
24898 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
24899       as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
24900     fi
24901   else
24902     input_to_shortpath="$new_path"
24903   fi
24904 
24905   # Call helper function which possibly converts this using DOS-style short mode.
24906   # If so, the updated path is stored in $new_path.
24907   new_path="$input_to_shortpath"
24908 
24909   input_path="$input_to_shortpath"
24910   # Check if we need to convert this using DOS-style short mode. If the path
24911   # contains just simple characters, use it. Otherwise (spaces, weird characters),
24912   # take no chances and rewrite it.
24913   # Note: m4 eats our [], so we need to use [ and ] instead.
24914   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24915   if test "x$has_forbidden_chars" != x; then
24916     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24917     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24918     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24919     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24920       # Going to short mode and back again did indeed matter. Since short mode is
24921       # case insensitive, let's make it lowercase to improve readability.
24922       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24923       # Now convert it back to Unix-stile (cygpath)
24924       input_path=`$CYGPATH -u "$shortmode_path"`
24925       new_path="$input_path"
24926     fi
24927   fi
24928 
24929   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24930   if test "x$test_cygdrive_prefix" = x; then
24931     # As a simple fix, exclude /usr/bin since it's not a real path.
24932     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
24933       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24934       # a path prefixed by /cygdrive for fixpath to work.
24935       new_path="$CYGWIN_ROOT_PATH$input_path"
24936     fi
24937   fi
24938 
24939   # remove trailing .exe if any
24940   new_path="${new_path/%.exe/}"
24941 
24942   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24943 
24944   # First separate the path from the arguments. This will split at the first
24945   # space.
24946   complete="$AS"
24947   path="${complete%% *}"
24948   tmp="$complete EOL"
24949   arguments="${tmp#* }"
24950 
24951   # Input might be given as Windows format, start by converting to
24952   # unix format.
24953   new_path="$path"
24954 
24955   windows_path="$new_path"
24956   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24957     unix_path=`$CYGPATH -u "$windows_path"`
24958     new_path="$unix_path"
24959   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24960     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24961     new_path="$unix_path"
24962   fi
24963 
24964 
24965   # Now try to locate executable using which
24966   new_path=`$WHICH "$new_path" 2> /dev/null`
24967 
24968   if test "x$new_path" = x; then
24969     # Oops. Which didn't find the executable.
24970     # The splitting of arguments from the executable at a space might have been incorrect,
24971     # since paths with space are more likely in Windows. Give it another try with the whole
24972     # argument.
24973     path="$complete"
24974     arguments="EOL"
24975     new_path="$path"
24976 
24977   windows_path="$new_path"
24978   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24979     unix_path=`$CYGPATH -u "$windows_path"`
24980     new_path="$unix_path"
24981   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24982     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24983     new_path="$unix_path"
24984   fi
24985 
24986 
24987     new_path=`$WHICH "$new_path" 2> /dev/null`
24988 
24989     if test "x$new_path" = x; then
24990       # It's still not found. Now this is an unrecoverable error.
24991       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
24992 $as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
24993       has_space=`$ECHO "$complete" | $GREP " "`
24994       if test "x$has_space" != x; then
24995         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24996 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24997       fi
24998       as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
24999     fi
25000   fi
25001 
25002   # Now new_path has a complete unix path to the binary
25003   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
25004     # Keep paths in /bin as-is, but remove trailing .exe if any
25005     new_path="${new_path/%.exe/}"
25006     # Do not save /bin paths to all_fixpath_prefixes!
25007   else
25008     # Not in mixed or Windows style, start by that.
25009     new_path=`cmd //c echo $new_path`
25010 
25011   input_path="$new_path"
25012   # Check if we need to convert this using DOS-style short mode. If the path
25013   # contains just simple characters, use it. Otherwise (spaces, weird characters),
25014   # take no chances and rewrite it.
25015   # Note: m4 eats our [], so we need to use [ and ] instead.
25016   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25017   if test "x$has_forbidden_chars" != x; then
25018     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25019     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25020   fi
25021 
25022     # Output is in $new_path
25023 
25024   windows_path="$new_path"
25025   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25026     unix_path=`$CYGPATH -u "$windows_path"`
25027     new_path="$unix_path"
25028   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25029     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25030     new_path="$unix_path"
25031   fi
25032 
25033     # remove trailing .exe if any
25034     new_path="${new_path/%.exe/}"
25035 
25036     # Save the first 10 bytes of this path to the storage, so fixpath can work.
25037     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25038   fi
25039 
25040   else
25041     # We're on a posix platform. Hooray! :)
25042     # First separate the path from the arguments. This will split at the first
25043     # space.
25044     complete="$AS"
25045     path="${complete%% *}"
25046     tmp="$complete EOL"
25047     arguments="${tmp#* }"
25048 
25049     # Cannot rely on the command "which" here since it doesn't always work.
25050     is_absolute_path=`$ECHO "$path" | $GREP ^/`
25051     if test -z "$is_absolute_path"; then
25052       # Path to executable is not absolute. Find it.
25053       IFS_save="$IFS"
25054       IFS=:
25055       for p in $PATH; do
25056         if test -f "$p/$path" && test -x "$p/$path"; then
25057           new_path="$p/$path"
25058           break
25059         fi
25060       done
25061       IFS="$IFS_save"
25062     else
25063       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving AS (as $path) failed, using $path directly." >&5
25064 $as_echo "$as_me: Resolving AS (as $path) failed, using $path directly." >&6;}
25065       new_path="$path"
25066     fi
25067 
25068     if test "x$new_path" = x; then
25069         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
25070 $as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
25071         has_space=`$ECHO "$complete" | $GREP " "`
25072         if test "x$has_space" != x; then
25073           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
25074 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
25075         fi
25076         as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
25077       fi
25078   fi
25079 
25080       # Now join together the path and the arguments once again
25081       if test "x$arguments" != xEOL; then
25082         new_complete="$new_path ${arguments% *}"
25083       else
25084         new_complete="$new_path"
25085       fi
25086 
25087   if test "x$complete" != "x$new_complete"; then
25088       AS="$new_complete"
25089       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AS to \"$new_complete\"" >&5
25090 $as_echo "$as_me: Rewriting AS to \"$new_complete\"" >&6;}
25091     fi
25092 
25093 else
25094     AS="$CC -c"
25095 fi
25096 
25097 
25098 if test "x$OPENJDK_TARGET_OS" = xsolaris; then
25099     for ac_prog in gnm nm
25100 do
25101   # Extract the first word of "$ac_prog", so it can be a program name with args.
25102 set dummy $ac_prog; ac_word=$2
25103 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25104 $as_echo_n "checking for $ac_word... " >&6; }
25105 if ${ac_cv_path_NM+:} false; then :
25106   $as_echo_n "(cached) " >&6
25107 else
25108   case $NM in
25109   [\\/]* | ?:[\\/]*)
25110   ac_cv_path_NM="$NM" # Let the user override the test with a path.
25111   ;;
25112   *)
25113   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25114 for as_dir in $PATH
25115 do
25116   IFS=$as_save_IFS
25117   test -z "$as_dir" && as_dir=.
25118     for ac_exec_ext in '' $ac_executable_extensions; do
25119   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
25120     ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
25121     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25122     break 2
25123   fi
25124 done
25125   done
25126 IFS=$as_save_IFS
25127 
25128   ;;
25129 esac
25130 fi
25131 NM=$ac_cv_path_NM
25132 if test -n "$NM"; then
25133   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
25134 $as_echo "$NM" >&6; }
25135 else
25136   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25137 $as_echo "no" >&6; }
25138 fi
25139 
25140 
25141   test -n "$NM" && break
25142 done
25143 
25144 
25145   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25146 
25147   # First separate the path from the arguments. This will split at the first
25148   # space.
25149   complete="$NM"
25150   path="${complete%% *}"
25151   tmp="$complete EOL"
25152   arguments="${tmp#* }"
25153 
25154   # Input might be given as Windows format, start by converting to
25155   # unix format.
25156   new_path=`$CYGPATH -u "$path"`
25157 
25158   # Now try to locate executable using which
25159   new_path=`$WHICH "$new_path" 2> /dev/null`
25160   # bat and cmd files are not always considered executable in cygwin causing which
25161   # to not find them
25162   if test "x$new_path" = x \
25163            && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25164            && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25165     new_path=`$CYGPATH -u "$path"`
25166   fi
25167   if test "x$new_path" = x; then
25168     # Oops. Which didn't find the executable.
25169     # The splitting of arguments from the executable at a space might have been incorrect,
25170     # since paths with space are more likely in Windows. Give it another try with the whole
25171     # argument.
25172     path="$complete"
25173     arguments="EOL"
25174     new_path=`$CYGPATH -u "$path"`
25175     new_path=`$WHICH "$new_path" 2> /dev/null`
25176     # bat and cmd files are not always considered executable in cygwin causing which
25177     # to not find them
25178     if test "x$new_path" = x \
25179              && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25180              && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25181       new_path=`$CYGPATH -u "$path"`
25182     fi
25183     if test "x$new_path" = x; then
25184       # It's still not found. Now this is an unrecoverable error.
25185       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
25186 $as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
25187       has_space=`$ECHO "$complete" | $GREP " "`
25188       if test "x$has_space" != x; then
25189         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25190 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25191       fi
25192       as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
25193     fi
25194   fi
25195 
25196   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25197   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25198   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25199   # "foo.exe" is OK but "foo" is an error.
25200   #
25201   # This test is therefore slightly more accurate than "test -f" to check for file precense.
25202   # It is also a way to make sure we got the proper file name for the real test later on.
25203   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25204   if test "x$test_shortpath" = x; then
25205     # Short path failed, file does not exist as specified.
25206     # Try adding .exe or .cmd
25207     if test -f "${new_path}.exe"; then
25208        input_to_shortpath="${new_path}.exe"
25209     elif test -f "${new_path}.cmd"; then
25210        input_to_shortpath="${new_path}.cmd"
25211     else
25212       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
25213 $as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
25214       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
25215 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
25216       as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
25217     fi
25218   else
25219     input_to_shortpath="$new_path"
25220   fi
25221 
25222   # Call helper function which possibly converts this using DOS-style short mode.
25223   # If so, the updated path is stored in $new_path.
25224   new_path="$input_to_shortpath"
25225 
25226   input_path="$input_to_shortpath"
25227   # Check if we need to convert this using DOS-style short mode. If the path
25228   # contains just simple characters, use it. Otherwise (spaces, weird characters),
25229   # take no chances and rewrite it.
25230   # Note: m4 eats our [], so we need to use [ and ] instead.
25231   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25232   if test "x$has_forbidden_chars" != x; then
25233     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25234     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25235     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25236     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25237       # Going to short mode and back again did indeed matter. Since short mode is
25238       # case insensitive, let's make it lowercase to improve readability.
25239       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25240       # Now convert it back to Unix-stile (cygpath)
25241       input_path=`$CYGPATH -u "$shortmode_path"`
25242       new_path="$input_path"
25243     fi
25244   fi
25245 
25246   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25247   if test "x$test_cygdrive_prefix" = x; then
25248     # As a simple fix, exclude /usr/bin since it's not a real path.
25249     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
25250       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25251       # a path prefixed by /cygdrive for fixpath to work.
25252       new_path="$CYGWIN_ROOT_PATH$input_path"
25253     fi
25254   fi
25255 
25256   # remove trailing .exe if any
25257   new_path="${new_path/%.exe/}"
25258 
25259   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25260 
25261   # First separate the path from the arguments. This will split at the first
25262   # space.
25263   complete="$NM"
25264   path="${complete%% *}"
25265   tmp="$complete EOL"
25266   arguments="${tmp#* }"
25267 
25268   # Input might be given as Windows format, start by converting to
25269   # unix format.
25270   new_path="$path"
25271 
25272   windows_path="$new_path"
25273   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25274     unix_path=`$CYGPATH -u "$windows_path"`
25275     new_path="$unix_path"
25276   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25277     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25278     new_path="$unix_path"
25279   fi
25280 
25281 
25282   # Now try to locate executable using which
25283   new_path=`$WHICH "$new_path" 2> /dev/null`
25284 
25285   if test "x$new_path" = x; then
25286     # Oops. Which didn't find the executable.
25287     # The splitting of arguments from the executable at a space might have been incorrect,
25288     # since paths with space are more likely in Windows. Give it another try with the whole
25289     # argument.
25290     path="$complete"
25291     arguments="EOL"
25292     new_path="$path"
25293 
25294   windows_path="$new_path"
25295   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25296     unix_path=`$CYGPATH -u "$windows_path"`
25297     new_path="$unix_path"
25298   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25299     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25300     new_path="$unix_path"
25301   fi
25302 
25303 
25304     new_path=`$WHICH "$new_path" 2> /dev/null`
25305 
25306     if test "x$new_path" = x; then
25307       # It's still not found. Now this is an unrecoverable error.
25308       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
25309 $as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
25310       has_space=`$ECHO "$complete" | $GREP " "`
25311       if test "x$has_space" != x; then
25312         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25313 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25314       fi
25315       as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
25316     fi
25317   fi
25318 
25319   # Now new_path has a complete unix path to the binary
25320   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
25321     # Keep paths in /bin as-is, but remove trailing .exe if any
25322     new_path="${new_path/%.exe/}"
25323     # Do not save /bin paths to all_fixpath_prefixes!
25324   else
25325     # Not in mixed or Windows style, start by that.
25326     new_path=`cmd //c echo $new_path`
25327 
25328   input_path="$new_path"
25329   # Check if we need to convert this using DOS-style short mode. If the path
25330   # contains just simple characters, use it. Otherwise (spaces, weird characters),
25331   # take no chances and rewrite it.
25332   # Note: m4 eats our [], so we need to use [ and ] instead.
25333   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25334   if test "x$has_forbidden_chars" != x; then
25335     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25336     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25337   fi
25338 
25339     # Output is in $new_path
25340 
25341   windows_path="$new_path"
25342   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25343     unix_path=`$CYGPATH -u "$windows_path"`
25344     new_path="$unix_path"
25345   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25346     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25347     new_path="$unix_path"
25348   fi
25349 
25350     # remove trailing .exe if any
25351     new_path="${new_path/%.exe/}"
25352 
25353     # Save the first 10 bytes of this path to the storage, so fixpath can work.
25354     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25355   fi
25356 
25357   else
25358     # We're on a posix platform. Hooray! :)
25359     # First separate the path from the arguments. This will split at the first
25360     # space.
25361     complete="$NM"
25362     path="${complete%% *}"
25363     tmp="$complete EOL"
25364     arguments="${tmp#* }"
25365 
25366     # Cannot rely on the command "which" here since it doesn't always work.
25367     is_absolute_path=`$ECHO "$path" | $GREP ^/`
25368     if test -z "$is_absolute_path"; then
25369       # Path to executable is not absolute. Find it.
25370       IFS_save="$IFS"
25371       IFS=:
25372       for p in $PATH; do
25373         if test -f "$p/$path" && test -x "$p/$path"; then
25374           new_path="$p/$path"
25375           break
25376         fi
25377       done
25378       IFS="$IFS_save"
25379     else
25380       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving NM (as $path) failed, using $path directly." >&5
25381 $as_echo "$as_me: Resolving NM (as $path) failed, using $path directly." >&6;}
25382       new_path="$path"
25383     fi
25384 
25385     if test "x$new_path" = x; then
25386         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
25387 $as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
25388         has_space=`$ECHO "$complete" | $GREP " "`
25389         if test "x$has_space" != x; then
25390           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
25391 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
25392         fi
25393         as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
25394       fi
25395   fi
25396 
25397       # Now join together the path and the arguments once again
25398       if test "x$arguments" != xEOL; then
25399         new_complete="$new_path ${arguments% *}"
25400       else
25401         new_complete="$new_path"
25402       fi
25403 
25404   if test "x$complete" != "x$new_complete"; then
25405       NM="$new_complete"
25406       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
25407 $as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
25408     fi
25409 
25410     # Extract the first word of "strip", so it can be a program name with args.
25411 set dummy strip; ac_word=$2
25412 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25413 $as_echo_n "checking for $ac_word... " >&6; }
25414 if ${ac_cv_path_STRIP+:} false; then :
25415   $as_echo_n "(cached) " >&6
25416 else
25417   case $STRIP in
25418   [\\/]* | ?:[\\/]*)
25419   ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
25420   ;;
25421   *)
25422   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25423 for as_dir in $PATH
25424 do
25425   IFS=$as_save_IFS
25426   test -z "$as_dir" && as_dir=.
25427     for ac_exec_ext in '' $ac_executable_extensions; do
25428   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
25429     ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
25430     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25431     break 2
25432   fi
25433 done
25434   done
25435 IFS=$as_save_IFS
25436 
25437   ;;
25438 esac
25439 fi
25440 STRIP=$ac_cv_path_STRIP
25441 if test -n "$STRIP"; then
25442   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
25443 $as_echo "$STRIP" >&6; }
25444 else
25445   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25446 $as_echo "no" >&6; }
25447 fi
25448 
25449 
25450 
25451   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25452 
25453   # First separate the path from the arguments. This will split at the first
25454   # space.
25455   complete="$STRIP"
25456   path="${complete%% *}"
25457   tmp="$complete EOL"
25458   arguments="${tmp#* }"
25459 
25460   # Input might be given as Windows format, start by converting to
25461   # unix format.
25462   new_path=`$CYGPATH -u "$path"`
25463 
25464   # Now try to locate executable using which
25465   new_path=`$WHICH "$new_path" 2> /dev/null`
25466   # bat and cmd files are not always considered executable in cygwin causing which
25467   # to not find them
25468   if test "x$new_path" = x \
25469            && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25470            && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25471     new_path=`$CYGPATH -u "$path"`
25472   fi
25473   if test "x$new_path" = x; then
25474     # Oops. Which didn't find the executable.
25475     # The splitting of arguments from the executable at a space might have been incorrect,
25476     # since paths with space are more likely in Windows. Give it another try with the whole
25477     # argument.
25478     path="$complete"
25479     arguments="EOL"
25480     new_path=`$CYGPATH -u "$path"`
25481     new_path=`$WHICH "$new_path" 2> /dev/null`
25482     # bat and cmd files are not always considered executable in cygwin causing which
25483     # to not find them
25484     if test "x$new_path" = x \
25485              && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25486              && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25487       new_path=`$CYGPATH -u "$path"`
25488     fi
25489     if test "x$new_path" = x; then
25490       # It's still not found. Now this is an unrecoverable error.
25491       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
25492 $as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
25493       has_space=`$ECHO "$complete" | $GREP " "`
25494       if test "x$has_space" != x; then
25495         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25496 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25497       fi
25498       as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
25499     fi
25500   fi
25501 
25502   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25503   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25504   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25505   # "foo.exe" is OK but "foo" is an error.
25506   #
25507   # This test is therefore slightly more accurate than "test -f" to check for file precense.
25508   # It is also a way to make sure we got the proper file name for the real test later on.
25509   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25510   if test "x$test_shortpath" = x; then
25511     # Short path failed, file does not exist as specified.
25512     # Try adding .exe or .cmd
25513     if test -f "${new_path}.exe"; then
25514        input_to_shortpath="${new_path}.exe"
25515     elif test -f "${new_path}.cmd"; then
25516        input_to_shortpath="${new_path}.cmd"
25517     else
25518       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
25519 $as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
25520       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
25521 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
25522       as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
25523     fi
25524   else
25525     input_to_shortpath="$new_path"
25526   fi
25527 
25528   # Call helper function which possibly converts this using DOS-style short mode.
25529   # If so, the updated path is stored in $new_path.
25530   new_path="$input_to_shortpath"
25531 
25532   input_path="$input_to_shortpath"
25533   # Check if we need to convert this using DOS-style short mode. If the path
25534   # contains just simple characters, use it. Otherwise (spaces, weird characters),
25535   # take no chances and rewrite it.
25536   # Note: m4 eats our [], so we need to use [ and ] instead.
25537   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25538   if test "x$has_forbidden_chars" != x; then
25539     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25540     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25541     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25542     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25543       # Going to short mode and back again did indeed matter. Since short mode is
25544       # case insensitive, let's make it lowercase to improve readability.
25545       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25546       # Now convert it back to Unix-stile (cygpath)
25547       input_path=`$CYGPATH -u "$shortmode_path"`
25548       new_path="$input_path"
25549     fi
25550   fi
25551 
25552   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25553   if test "x$test_cygdrive_prefix" = x; then
25554     # As a simple fix, exclude /usr/bin since it's not a real path.
25555     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
25556       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25557       # a path prefixed by /cygdrive for fixpath to work.
25558       new_path="$CYGWIN_ROOT_PATH$input_path"
25559     fi
25560   fi
25561 
25562   # remove trailing .exe if any
25563   new_path="${new_path/%.exe/}"
25564 
25565   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25566 
25567   # First separate the path from the arguments. This will split at the first
25568   # space.
25569   complete="$STRIP"
25570   path="${complete%% *}"
25571   tmp="$complete EOL"
25572   arguments="${tmp#* }"
25573 
25574   # Input might be given as Windows format, start by converting to
25575   # unix format.
25576   new_path="$path"
25577 
25578   windows_path="$new_path"
25579   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25580     unix_path=`$CYGPATH -u "$windows_path"`
25581     new_path="$unix_path"
25582   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25583     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25584     new_path="$unix_path"
25585   fi
25586 
25587 
25588   # Now try to locate executable using which
25589   new_path=`$WHICH "$new_path" 2> /dev/null`
25590 
25591   if test "x$new_path" = x; then
25592     # Oops. Which didn't find the executable.
25593     # The splitting of arguments from the executable at a space might have been incorrect,
25594     # since paths with space are more likely in Windows. Give it another try with the whole
25595     # argument.
25596     path="$complete"
25597     arguments="EOL"
25598     new_path="$path"
25599 
25600   windows_path="$new_path"
25601   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25602     unix_path=`$CYGPATH -u "$windows_path"`
25603     new_path="$unix_path"
25604   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25605     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25606     new_path="$unix_path"
25607   fi
25608 
25609 
25610     new_path=`$WHICH "$new_path" 2> /dev/null`
25611 
25612     if test "x$new_path" = x; then
25613       # It's still not found. Now this is an unrecoverable error.
25614       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
25615 $as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
25616       has_space=`$ECHO "$complete" | $GREP " "`
25617       if test "x$has_space" != x; then
25618         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25619 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25620       fi
25621       as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
25622     fi
25623   fi
25624 
25625   # Now new_path has a complete unix path to the binary
25626   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
25627     # Keep paths in /bin as-is, but remove trailing .exe if any
25628     new_path="${new_path/%.exe/}"
25629     # Do not save /bin paths to all_fixpath_prefixes!
25630   else
25631     # Not in mixed or Windows style, start by that.
25632     new_path=`cmd //c echo $new_path`
25633 
25634   input_path="$new_path"
25635   # Check if we need to convert this using DOS-style short mode. If the path
25636   # contains just simple characters, use it. Otherwise (spaces, weird characters),
25637   # take no chances and rewrite it.
25638   # Note: m4 eats our [], so we need to use [ and ] instead.
25639   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25640   if test "x$has_forbidden_chars" != x; then
25641     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25642     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25643   fi
25644 
25645     # Output is in $new_path
25646 
25647   windows_path="$new_path"
25648   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25649     unix_path=`$CYGPATH -u "$windows_path"`
25650     new_path="$unix_path"
25651   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25652     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25653     new_path="$unix_path"
25654   fi
25655 
25656     # remove trailing .exe if any
25657     new_path="${new_path/%.exe/}"
25658 
25659     # Save the first 10 bytes of this path to the storage, so fixpath can work.
25660     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25661   fi
25662 
25663   else
25664     # We're on a posix platform. Hooray! :)
25665     # First separate the path from the arguments. This will split at the first
25666     # space.
25667     complete="$STRIP"
25668     path="${complete%% *}"
25669     tmp="$complete EOL"
25670     arguments="${tmp#* }"
25671 
25672     # Cannot rely on the command "which" here since it doesn't always work.
25673     is_absolute_path=`$ECHO "$path" | $GREP ^/`
25674     if test -z "$is_absolute_path"; then
25675       # Path to executable is not absolute. Find it.
25676       IFS_save="$IFS"
25677       IFS=:
25678       for p in $PATH; do
25679         if test -f "$p/$path" && test -x "$p/$path"; then
25680           new_path="$p/$path"
25681           break
25682         fi
25683       done
25684       IFS="$IFS_save"
25685     else
25686       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving STRIP (as $path) failed, using $path directly." >&5
25687 $as_echo "$as_me: Resolving STRIP (as $path) failed, using $path directly." >&6;}
25688       new_path="$path"
25689     fi
25690 
25691     if test "x$new_path" = x; then
25692         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
25693 $as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
25694         has_space=`$ECHO "$complete" | $GREP " "`
25695         if test "x$has_space" != x; then
25696           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
25697 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
25698         fi
25699         as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
25700       fi
25701   fi
25702 
25703       # Now join together the path and the arguments once again
25704       if test "x$arguments" != xEOL; then
25705         new_complete="$new_path ${arguments% *}"
25706       else
25707         new_complete="$new_path"
25708       fi
25709 
25710   if test "x$complete" != "x$new_complete"; then
25711       STRIP="$new_complete"
25712       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
25713 $as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
25714     fi
25715 
25716     # Extract the first word of "mcs", so it can be a program name with args.
25717 set dummy mcs; ac_word=$2
25718 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25719 $as_echo_n "checking for $ac_word... " >&6; }
25720 if ${ac_cv_path_MCS+:} false; then :
25721   $as_echo_n "(cached) " >&6
25722 else
25723   case $MCS in
25724   [\\/]* | ?:[\\/]*)
25725   ac_cv_path_MCS="$MCS" # Let the user override the test with a path.
25726   ;;
25727   *)
25728   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25729 for as_dir in $PATH
25730 do
25731   IFS=$as_save_IFS
25732   test -z "$as_dir" && as_dir=.
25733     for ac_exec_ext in '' $ac_executable_extensions; do
25734   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
25735     ac_cv_path_MCS="$as_dir/$ac_word$ac_exec_ext"
25736     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25737     break 2
25738   fi
25739 done
25740   done
25741 IFS=$as_save_IFS
25742 
25743   ;;
25744 esac
25745 fi
25746 MCS=$ac_cv_path_MCS
25747 if test -n "$MCS"; then
25748   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MCS" >&5
25749 $as_echo "$MCS" >&6; }
25750 else
25751   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25752 $as_echo "no" >&6; }
25753 fi
25754 
25755 
25756 
25757   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25758 
25759   # First separate the path from the arguments. This will split at the first
25760   # space.
25761   complete="$MCS"
25762   path="${complete%% *}"
25763   tmp="$complete EOL"
25764   arguments="${tmp#* }"
25765 
25766   # Input might be given as Windows format, start by converting to
25767   # unix format.
25768   new_path=`$CYGPATH -u "$path"`
25769 
25770   # Now try to locate executable using which
25771   new_path=`$WHICH "$new_path" 2> /dev/null`
25772   # bat and cmd files are not always considered executable in cygwin causing which
25773   # to not find them
25774   if test "x$new_path" = x \
25775            && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25776            && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25777     new_path=`$CYGPATH -u "$path"`
25778   fi
25779   if test "x$new_path" = x; then
25780     # Oops. Which didn't find the executable.
25781     # The splitting of arguments from the executable at a space might have been incorrect,
25782     # since paths with space are more likely in Windows. Give it another try with the whole
25783     # argument.
25784     path="$complete"
25785     arguments="EOL"
25786     new_path=`$CYGPATH -u "$path"`
25787     new_path=`$WHICH "$new_path" 2> /dev/null`
25788     # bat and cmd files are not always considered executable in cygwin causing which
25789     # to not find them
25790     if test "x$new_path" = x \
25791              && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25792              && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25793       new_path=`$CYGPATH -u "$path"`
25794     fi
25795     if test "x$new_path" = x; then
25796       # It's still not found. Now this is an unrecoverable error.
25797       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
25798 $as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
25799       has_space=`$ECHO "$complete" | $GREP " "`
25800       if test "x$has_space" != x; then
25801         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25802 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25803       fi
25804       as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
25805     fi
25806   fi
25807 
25808   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25809   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25810   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25811   # "foo.exe" is OK but "foo" is an error.
25812   #
25813   # This test is therefore slightly more accurate than "test -f" to check for file precense.
25814   # It is also a way to make sure we got the proper file name for the real test later on.
25815   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25816   if test "x$test_shortpath" = x; then
25817     # Short path failed, file does not exist as specified.
25818     # Try adding .exe or .cmd
25819     if test -f "${new_path}.exe"; then
25820        input_to_shortpath="${new_path}.exe"
25821     elif test -f "${new_path}.cmd"; then
25822        input_to_shortpath="${new_path}.cmd"
25823     else
25824       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$new_path\", is invalid." >&5
25825 $as_echo "$as_me: The path of MCS, which resolves as \"$new_path\", is invalid." >&6;}
25826       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
25827 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
25828       as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
25829     fi
25830   else
25831     input_to_shortpath="$new_path"
25832   fi
25833 
25834   # Call helper function which possibly converts this using DOS-style short mode.
25835   # If so, the updated path is stored in $new_path.
25836   new_path="$input_to_shortpath"
25837 
25838   input_path="$input_to_shortpath"
25839   # Check if we need to convert this using DOS-style short mode. If the path
25840   # contains just simple characters, use it. Otherwise (spaces, weird characters),
25841   # take no chances and rewrite it.
25842   # Note: m4 eats our [], so we need to use [ and ] instead.
25843   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25844   if test "x$has_forbidden_chars" != x; then
25845     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25846     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25847     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25848     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25849       # Going to short mode and back again did indeed matter. Since short mode is
25850       # case insensitive, let's make it lowercase to improve readability.
25851       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25852       # Now convert it back to Unix-stile (cygpath)
25853       input_path=`$CYGPATH -u "$shortmode_path"`
25854       new_path="$input_path"
25855     fi
25856   fi
25857 
25858   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25859   if test "x$test_cygdrive_prefix" = x; then
25860     # As a simple fix, exclude /usr/bin since it's not a real path.
25861     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
25862       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25863       # a path prefixed by /cygdrive for fixpath to work.
25864       new_path="$CYGWIN_ROOT_PATH$input_path"
25865     fi
25866   fi
25867 
25868   # remove trailing .exe if any
25869   new_path="${new_path/%.exe/}"
25870 
25871   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25872 
25873   # First separate the path from the arguments. This will split at the first
25874   # space.
25875   complete="$MCS"
25876   path="${complete%% *}"
25877   tmp="$complete EOL"
25878   arguments="${tmp#* }"
25879 
25880   # Input might be given as Windows format, start by converting to
25881   # unix format.
25882   new_path="$path"
25883 
25884   windows_path="$new_path"
25885   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25886     unix_path=`$CYGPATH -u "$windows_path"`
25887     new_path="$unix_path"
25888   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25889     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25890     new_path="$unix_path"
25891   fi
25892 
25893 
25894   # Now try to locate executable using which
25895   new_path=`$WHICH "$new_path" 2> /dev/null`
25896 
25897   if test "x$new_path" = x; then
25898     # Oops. Which didn't find the executable.
25899     # The splitting of arguments from the executable at a space might have been incorrect,
25900     # since paths with space are more likely in Windows. Give it another try with the whole
25901     # argument.
25902     path="$complete"
25903     arguments="EOL"
25904     new_path="$path"
25905 
25906   windows_path="$new_path"
25907   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25908     unix_path=`$CYGPATH -u "$windows_path"`
25909     new_path="$unix_path"
25910   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25911     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25912     new_path="$unix_path"
25913   fi
25914 
25915 
25916     new_path=`$WHICH "$new_path" 2> /dev/null`
25917 
25918     if test "x$new_path" = x; then
25919       # It's still not found. Now this is an unrecoverable error.
25920       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
25921 $as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
25922       has_space=`$ECHO "$complete" | $GREP " "`
25923       if test "x$has_space" != x; then
25924         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25925 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25926       fi
25927       as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
25928     fi
25929   fi
25930 
25931   # Now new_path has a complete unix path to the binary
25932   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
25933     # Keep paths in /bin as-is, but remove trailing .exe if any
25934     new_path="${new_path/%.exe/}"
25935     # Do not save /bin paths to all_fixpath_prefixes!
25936   else
25937     # Not in mixed or Windows style, start by that.
25938     new_path=`cmd //c echo $new_path`
25939 
25940   input_path="$new_path"
25941   # Check if we need to convert this using DOS-style short mode. If the path
25942   # contains just simple characters, use it. Otherwise (spaces, weird characters),
25943   # take no chances and rewrite it.
25944   # Note: m4 eats our [], so we need to use [ and ] instead.
25945   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25946   if test "x$has_forbidden_chars" != x; then
25947     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25948     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25949   fi
25950 
25951     # Output is in $new_path
25952 
25953   windows_path="$new_path"
25954   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25955     unix_path=`$CYGPATH -u "$windows_path"`
25956     new_path="$unix_path"
25957   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25958     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25959     new_path="$unix_path"
25960   fi
25961 
25962     # remove trailing .exe if any
25963     new_path="${new_path/%.exe/}"
25964 
25965     # Save the first 10 bytes of this path to the storage, so fixpath can work.
25966     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25967   fi
25968 
25969   else
25970     # We're on a posix platform. Hooray! :)
25971     # First separate the path from the arguments. This will split at the first
25972     # space.
25973     complete="$MCS"
25974     path="${complete%% *}"
25975     tmp="$complete EOL"
25976     arguments="${tmp#* }"
25977 
25978     # Cannot rely on the command "which" here since it doesn't always work.
25979     is_absolute_path=`$ECHO "$path" | $GREP ^/`
25980     if test -z "$is_absolute_path"; then
25981       # Path to executable is not absolute. Find it.
25982       IFS_save="$IFS"
25983       IFS=:
25984       for p in $PATH; do
25985         if test -f "$p/$path" && test -x "$p/$path"; then
25986           new_path="$p/$path"
25987           break
25988         fi
25989       done
25990       IFS="$IFS_save"
25991     else
25992       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving MCS (as $path) failed, using $path directly." >&5
25993 $as_echo "$as_me: Resolving MCS (as $path) failed, using $path directly." >&6;}
25994       new_path="$path"
25995     fi
25996 
25997     if test "x$new_path" = x; then
25998         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
25999 $as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
26000         has_space=`$ECHO "$complete" | $GREP " "`
26001         if test "x$has_space" != x; then
26002           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
26003 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
26004         fi
26005         as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
26006       fi
26007   fi
26008 
26009       # Now join together the path and the arguments once again
26010       if test "x$arguments" != xEOL; then
26011         new_complete="$new_path ${arguments% *}"
26012       else
26013         new_complete="$new_path"
26014       fi
26015 
26016   if test "x$complete" != "x$new_complete"; then
26017       MCS="$new_complete"
26018       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MCS to \"$new_complete\"" >&5
26019 $as_echo "$as_me: Rewriting MCS to \"$new_complete\"" >&6;}
26020     fi
26021 
26022 elif test "x$OPENJDK_TARGET_OS" != xwindows; then
26023     if test -n "$ac_tool_prefix"; then
26024   # Extract the first word of "${ac_tool_prefix}nm", so it can be a program name with args.
26025 set dummy ${ac_tool_prefix}nm; ac_word=$2
26026 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26027 $as_echo_n "checking for $ac_word... " >&6; }
26028 if ${ac_cv_prog_NM+:} false; then :
26029   $as_echo_n "(cached) " >&6
26030 else
26031   if test -n "$NM"; then
26032   ac_cv_prog_NM="$NM" # Let the user override the test.
26033 else
26034 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26035 for as_dir in $PATH
26036 do
26037   IFS=$as_save_IFS
26038   test -z "$as_dir" && as_dir=.
26039     for ac_exec_ext in '' $ac_executable_extensions; do
26040   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
26041     ac_cv_prog_NM="${ac_tool_prefix}nm"
26042     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26043     break 2
26044   fi
26045 done
26046   done
26047 IFS=$as_save_IFS
26048 
26049 fi
26050 fi
26051 NM=$ac_cv_prog_NM
26052 if test -n "$NM"; then
26053   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
26054 $as_echo "$NM" >&6; }
26055 else
26056   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26057 $as_echo "no" >&6; }
26058 fi
26059 
26060 
26061 fi
26062 if test -z "$ac_cv_prog_NM"; then
26063   ac_ct_NM=$NM
26064   # Extract the first word of "nm", so it can be a program name with args.
26065 set dummy nm; ac_word=$2
26066 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26067 $as_echo_n "checking for $ac_word... " >&6; }
26068 if ${ac_cv_prog_ac_ct_NM+:} false; then :
26069   $as_echo_n "(cached) " >&6
26070 else
26071   if test -n "$ac_ct_NM"; then
26072   ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
26073 else
26074 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26075 for as_dir in $PATH
26076 do
26077   IFS=$as_save_IFS
26078   test -z "$as_dir" && as_dir=.
26079     for ac_exec_ext in '' $ac_executable_extensions; do
26080   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
26081     ac_cv_prog_ac_ct_NM="nm"
26082     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26083     break 2
26084   fi
26085 done
26086   done
26087 IFS=$as_save_IFS
26088 
26089 fi
26090 fi
26091 ac_ct_NM=$ac_cv_prog_ac_ct_NM
26092 if test -n "$ac_ct_NM"; then
26093   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
26094 $as_echo "$ac_ct_NM" >&6; }
26095 else
26096   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26097 $as_echo "no" >&6; }
26098 fi
26099 
26100   if test "x$ac_ct_NM" = x; then
26101     NM=""
26102   else
26103     case $cross_compiling:$ac_tool_warned in
26104 yes:)
26105 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
26106 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
26107 ac_tool_warned=yes ;;
26108 esac
26109     NM=$ac_ct_NM
26110   fi
26111 else
26112   NM="$ac_cv_prog_NM"
26113 fi
26114 
26115 
26116   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26117 
26118   # First separate the path from the arguments. This will split at the first
26119   # space.
26120   complete="$NM"
26121   path="${complete%% *}"
26122   tmp="$complete EOL"
26123   arguments="${tmp#* }"
26124 
26125   # Input might be given as Windows format, start by converting to
26126   # unix format.
26127   new_path=`$CYGPATH -u "$path"`
26128 
26129   # Now try to locate executable using which
26130   new_path=`$WHICH "$new_path" 2> /dev/null`
26131   # bat and cmd files are not always considered executable in cygwin causing which
26132   # to not find them
26133   if test "x$new_path" = x \
26134            && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26135            && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26136     new_path=`$CYGPATH -u "$path"`
26137   fi
26138   if test "x$new_path" = x; then
26139     # Oops. Which didn't find the executable.
26140     # The splitting of arguments from the executable at a space might have been incorrect,
26141     # since paths with space are more likely in Windows. Give it another try with the whole
26142     # argument.
26143     path="$complete"
26144     arguments="EOL"
26145     new_path=`$CYGPATH -u "$path"`
26146     new_path=`$WHICH "$new_path" 2> /dev/null`
26147     # bat and cmd files are not always considered executable in cygwin causing which
26148     # to not find them
26149     if test "x$new_path" = x \
26150              && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26151              && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26152       new_path=`$CYGPATH -u "$path"`
26153     fi
26154     if test "x$new_path" = x; then
26155       # It's still not found. Now this is an unrecoverable error.
26156       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
26157 $as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
26158       has_space=`$ECHO "$complete" | $GREP " "`
26159       if test "x$has_space" != x; then
26160         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26161 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26162       fi
26163       as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
26164     fi
26165   fi
26166 
26167   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26168   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26169   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26170   # "foo.exe" is OK but "foo" is an error.
26171   #
26172   # This test is therefore slightly more accurate than "test -f" to check for file precense.
26173   # It is also a way to make sure we got the proper file name for the real test later on.
26174   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26175   if test "x$test_shortpath" = x; then
26176     # Short path failed, file does not exist as specified.
26177     # Try adding .exe or .cmd
26178     if test -f "${new_path}.exe"; then
26179        input_to_shortpath="${new_path}.exe"
26180     elif test -f "${new_path}.cmd"; then
26181        input_to_shortpath="${new_path}.cmd"
26182     else
26183       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
26184 $as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
26185       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
26186 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
26187       as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
26188     fi
26189   else
26190     input_to_shortpath="$new_path"
26191   fi
26192 
26193   # Call helper function which possibly converts this using DOS-style short mode.
26194   # If so, the updated path is stored in $new_path.
26195   new_path="$input_to_shortpath"
26196 
26197   input_path="$input_to_shortpath"
26198   # Check if we need to convert this using DOS-style short mode. If the path
26199   # contains just simple characters, use it. Otherwise (spaces, weird characters),
26200   # take no chances and rewrite it.
26201   # Note: m4 eats our [], so we need to use [ and ] instead.
26202   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26203   if test "x$has_forbidden_chars" != x; then
26204     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26205     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26206     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26207     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26208       # Going to short mode and back again did indeed matter. Since short mode is
26209       # case insensitive, let's make it lowercase to improve readability.
26210       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26211       # Now convert it back to Unix-stile (cygpath)
26212       input_path=`$CYGPATH -u "$shortmode_path"`
26213       new_path="$input_path"
26214     fi
26215   fi
26216 
26217   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26218   if test "x$test_cygdrive_prefix" = x; then
26219     # As a simple fix, exclude /usr/bin since it's not a real path.
26220     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
26221       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26222       # a path prefixed by /cygdrive for fixpath to work.
26223       new_path="$CYGWIN_ROOT_PATH$input_path"
26224     fi
26225   fi
26226 
26227   # remove trailing .exe if any
26228   new_path="${new_path/%.exe/}"
26229 
26230   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26231 
26232   # First separate the path from the arguments. This will split at the first
26233   # space.
26234   complete="$NM"
26235   path="${complete%% *}"
26236   tmp="$complete EOL"
26237   arguments="${tmp#* }"
26238 
26239   # Input might be given as Windows format, start by converting to
26240   # unix format.
26241   new_path="$path"
26242 
26243   windows_path="$new_path"
26244   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26245     unix_path=`$CYGPATH -u "$windows_path"`
26246     new_path="$unix_path"
26247   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26248     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26249     new_path="$unix_path"
26250   fi
26251 
26252 
26253   # Now try to locate executable using which
26254   new_path=`$WHICH "$new_path" 2> /dev/null`
26255 
26256   if test "x$new_path" = x; then
26257     # Oops. Which didn't find the executable.
26258     # The splitting of arguments from the executable at a space might have been incorrect,
26259     # since paths with space are more likely in Windows. Give it another try with the whole
26260     # argument.
26261     path="$complete"
26262     arguments="EOL"
26263     new_path="$path"
26264 
26265   windows_path="$new_path"
26266   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26267     unix_path=`$CYGPATH -u "$windows_path"`
26268     new_path="$unix_path"
26269   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26270     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26271     new_path="$unix_path"
26272   fi
26273 
26274 
26275     new_path=`$WHICH "$new_path" 2> /dev/null`
26276 
26277     if test "x$new_path" = x; then
26278       # It's still not found. Now this is an unrecoverable error.
26279       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
26280 $as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
26281       has_space=`$ECHO "$complete" | $GREP " "`
26282       if test "x$has_space" != x; then
26283         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26284 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26285       fi
26286       as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
26287     fi
26288   fi
26289 
26290   # Now new_path has a complete unix path to the binary
26291   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
26292     # Keep paths in /bin as-is, but remove trailing .exe if any
26293     new_path="${new_path/%.exe/}"
26294     # Do not save /bin paths to all_fixpath_prefixes!
26295   else
26296     # Not in mixed or Windows style, start by that.
26297     new_path=`cmd //c echo $new_path`
26298 
26299   input_path="$new_path"
26300   # Check if we need to convert this using DOS-style short mode. If the path
26301   # contains just simple characters, use it. Otherwise (spaces, weird characters),
26302   # take no chances and rewrite it.
26303   # Note: m4 eats our [], so we need to use [ and ] instead.
26304   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26305   if test "x$has_forbidden_chars" != x; then
26306     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26307     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26308   fi
26309 
26310     # Output is in $new_path
26311 
26312   windows_path="$new_path"
26313   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26314     unix_path=`$CYGPATH -u "$windows_path"`
26315     new_path="$unix_path"
26316   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26317     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26318     new_path="$unix_path"
26319   fi
26320 
26321     # remove trailing .exe if any
26322     new_path="${new_path/%.exe/}"
26323 
26324     # Save the first 10 bytes of this path to the storage, so fixpath can work.
26325     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26326   fi
26327 
26328   else
26329     # We're on a posix platform. Hooray! :)
26330     # First separate the path from the arguments. This will split at the first
26331     # space.
26332     complete="$NM"
26333     path="${complete%% *}"
26334     tmp="$complete EOL"
26335     arguments="${tmp#* }"
26336 
26337     # Cannot rely on the command "which" here since it doesn't always work.
26338     is_absolute_path=`$ECHO "$path" | $GREP ^/`
26339     if test -z "$is_absolute_path"; then
26340       # Path to executable is not absolute. Find it.
26341       IFS_save="$IFS"
26342       IFS=:
26343       for p in $PATH; do
26344         if test -f "$p/$path" && test -x "$p/$path"; then
26345           new_path="$p/$path"
26346           break
26347         fi
26348       done
26349       IFS="$IFS_save"
26350     else
26351       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving NM (as $path) failed, using $path directly." >&5
26352 $as_echo "$as_me: Resolving NM (as $path) failed, using $path directly." >&6;}
26353       new_path="$path"
26354     fi
26355 
26356     if test "x$new_path" = x; then
26357         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
26358 $as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
26359         has_space=`$ECHO "$complete" | $GREP " "`
26360         if test "x$has_space" != x; then
26361           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
26362 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
26363         fi
26364         as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
26365       fi
26366   fi
26367 
26368       # Now join together the path and the arguments once again
26369       if test "x$arguments" != xEOL; then
26370         new_complete="$new_path ${arguments% *}"
26371       else
26372         new_complete="$new_path"
26373       fi
26374 
26375   if test "x$complete" != "x$new_complete"; then
26376       NM="$new_complete"
26377       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
26378 $as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
26379     fi
26380 
26381     if test -n "$ac_tool_prefix"; then
26382   # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
26383 set dummy ${ac_tool_prefix}strip; ac_word=$2
26384 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26385 $as_echo_n "checking for $ac_word... " >&6; }
26386 if ${ac_cv_prog_STRIP+:} false; then :
26387   $as_echo_n "(cached) " >&6
26388 else
26389   if test -n "$STRIP"; then
26390   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
26391 else
26392 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26393 for as_dir in $PATH
26394 do
26395   IFS=$as_save_IFS
26396   test -z "$as_dir" && as_dir=.
26397     for ac_exec_ext in '' $ac_executable_extensions; do
26398   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
26399     ac_cv_prog_STRIP="${ac_tool_prefix}strip"
26400     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26401     break 2
26402   fi
26403 done
26404   done
26405 IFS=$as_save_IFS
26406 
26407 fi
26408 fi
26409 STRIP=$ac_cv_prog_STRIP
26410 if test -n "$STRIP"; then
26411   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
26412 $as_echo "$STRIP" >&6; }
26413 else
26414   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26415 $as_echo "no" >&6; }
26416 fi
26417 
26418 
26419 fi
26420 if test -z "$ac_cv_prog_STRIP"; then
26421   ac_ct_STRIP=$STRIP
26422   # Extract the first word of "strip", so it can be a program name with args.
26423 set dummy strip; ac_word=$2
26424 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26425 $as_echo_n "checking for $ac_word... " >&6; }
26426 if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
26427   $as_echo_n "(cached) " >&6
26428 else
26429   if test -n "$ac_ct_STRIP"; then
26430   ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
26431 else
26432 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26433 for as_dir in $PATH
26434 do
26435   IFS=$as_save_IFS
26436   test -z "$as_dir" && as_dir=.
26437     for ac_exec_ext in '' $ac_executable_extensions; do
26438   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
26439     ac_cv_prog_ac_ct_STRIP="strip"
26440     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26441     break 2
26442   fi
26443 done
26444   done
26445 IFS=$as_save_IFS
26446 
26447 fi
26448 fi
26449 ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
26450 if test -n "$ac_ct_STRIP"; then
26451   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
26452 $as_echo "$ac_ct_STRIP" >&6; }
26453 else
26454   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26455 $as_echo "no" >&6; }
26456 fi
26457 
26458   if test "x$ac_ct_STRIP" = x; then
26459     STRIP=""
26460   else
26461     case $cross_compiling:$ac_tool_warned in
26462 yes:)
26463 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
26464 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
26465 ac_tool_warned=yes ;;
26466 esac
26467     STRIP=$ac_ct_STRIP
26468   fi
26469 else
26470   STRIP="$ac_cv_prog_STRIP"
26471 fi
26472 
26473 
26474   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26475 
26476   # First separate the path from the arguments. This will split at the first
26477   # space.
26478   complete="$STRIP"
26479   path="${complete%% *}"
26480   tmp="$complete EOL"
26481   arguments="${tmp#* }"
26482 
26483   # Input might be given as Windows format, start by converting to
26484   # unix format.
26485   new_path=`$CYGPATH -u "$path"`
26486 
26487   # Now try to locate executable using which
26488   new_path=`$WHICH "$new_path" 2> /dev/null`
26489   # bat and cmd files are not always considered executable in cygwin causing which
26490   # to not find them
26491   if test "x$new_path" = x \
26492            && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26493            && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26494     new_path=`$CYGPATH -u "$path"`
26495   fi
26496   if test "x$new_path" = x; then
26497     # Oops. Which didn't find the executable.
26498     # The splitting of arguments from the executable at a space might have been incorrect,
26499     # since paths with space are more likely in Windows. Give it another try with the whole
26500     # argument.
26501     path="$complete"
26502     arguments="EOL"
26503     new_path=`$CYGPATH -u "$path"`
26504     new_path=`$WHICH "$new_path" 2> /dev/null`
26505     # bat and cmd files are not always considered executable in cygwin causing which
26506     # to not find them
26507     if test "x$new_path" = x \
26508              && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26509              && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26510       new_path=`$CYGPATH -u "$path"`
26511     fi
26512     if test "x$new_path" = x; then
26513       # It's still not found. Now this is an unrecoverable error.
26514       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
26515 $as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
26516       has_space=`$ECHO "$complete" | $GREP " "`
26517       if test "x$has_space" != x; then
26518         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26519 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26520       fi
26521       as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
26522     fi
26523   fi
26524 
26525   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26526   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26527   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26528   # "foo.exe" is OK but "foo" is an error.
26529   #
26530   # This test is therefore slightly more accurate than "test -f" to check for file precense.
26531   # It is also a way to make sure we got the proper file name for the real test later on.
26532   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26533   if test "x$test_shortpath" = x; then
26534     # Short path failed, file does not exist as specified.
26535     # Try adding .exe or .cmd
26536     if test -f "${new_path}.exe"; then
26537        input_to_shortpath="${new_path}.exe"
26538     elif test -f "${new_path}.cmd"; then
26539        input_to_shortpath="${new_path}.cmd"
26540     else
26541       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
26542 $as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
26543       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
26544 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
26545       as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
26546     fi
26547   else
26548     input_to_shortpath="$new_path"
26549   fi
26550 
26551   # Call helper function which possibly converts this using DOS-style short mode.
26552   # If so, the updated path is stored in $new_path.
26553   new_path="$input_to_shortpath"
26554 
26555   input_path="$input_to_shortpath"
26556   # Check if we need to convert this using DOS-style short mode. If the path
26557   # contains just simple characters, use it. Otherwise (spaces, weird characters),
26558   # take no chances and rewrite it.
26559   # Note: m4 eats our [], so we need to use [ and ] instead.
26560   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26561   if test "x$has_forbidden_chars" != x; then
26562     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26563     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26564     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26565     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26566       # Going to short mode and back again did indeed matter. Since short mode is
26567       # case insensitive, let's make it lowercase to improve readability.
26568       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26569       # Now convert it back to Unix-stile (cygpath)
26570       input_path=`$CYGPATH -u "$shortmode_path"`
26571       new_path="$input_path"
26572     fi
26573   fi
26574 
26575   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26576   if test "x$test_cygdrive_prefix" = x; then
26577     # As a simple fix, exclude /usr/bin since it's not a real path.
26578     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
26579       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26580       # a path prefixed by /cygdrive for fixpath to work.
26581       new_path="$CYGWIN_ROOT_PATH$input_path"
26582     fi
26583   fi
26584 
26585   # remove trailing .exe if any
26586   new_path="${new_path/%.exe/}"
26587 
26588   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26589 
26590   # First separate the path from the arguments. This will split at the first
26591   # space.
26592   complete="$STRIP"
26593   path="${complete%% *}"
26594   tmp="$complete EOL"
26595   arguments="${tmp#* }"
26596 
26597   # Input might be given as Windows format, start by converting to
26598   # unix format.
26599   new_path="$path"
26600 
26601   windows_path="$new_path"
26602   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26603     unix_path=`$CYGPATH -u "$windows_path"`
26604     new_path="$unix_path"
26605   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26606     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26607     new_path="$unix_path"
26608   fi
26609 
26610 
26611   # Now try to locate executable using which
26612   new_path=`$WHICH "$new_path" 2> /dev/null`
26613 
26614   if test "x$new_path" = x; then
26615     # Oops. Which didn't find the executable.
26616     # The splitting of arguments from the executable at a space might have been incorrect,
26617     # since paths with space are more likely in Windows. Give it another try with the whole
26618     # argument.
26619     path="$complete"
26620     arguments="EOL"
26621     new_path="$path"
26622 
26623   windows_path="$new_path"
26624   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26625     unix_path=`$CYGPATH -u "$windows_path"`
26626     new_path="$unix_path"
26627   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26628     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26629     new_path="$unix_path"
26630   fi
26631 
26632 
26633     new_path=`$WHICH "$new_path" 2> /dev/null`
26634 
26635     if test "x$new_path" = x; then
26636       # It's still not found. Now this is an unrecoverable error.
26637       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
26638 $as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
26639       has_space=`$ECHO "$complete" | $GREP " "`
26640       if test "x$has_space" != x; then
26641         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26642 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26643       fi
26644       as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
26645     fi
26646   fi
26647 
26648   # Now new_path has a complete unix path to the binary
26649   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
26650     # Keep paths in /bin as-is, but remove trailing .exe if any
26651     new_path="${new_path/%.exe/}"
26652     # Do not save /bin paths to all_fixpath_prefixes!
26653   else
26654     # Not in mixed or Windows style, start by that.
26655     new_path=`cmd //c echo $new_path`
26656 
26657   input_path="$new_path"
26658   # Check if we need to convert this using DOS-style short mode. If the path
26659   # contains just simple characters, use it. Otherwise (spaces, weird characters),
26660   # take no chances and rewrite it.
26661   # Note: m4 eats our [], so we need to use [ and ] instead.
26662   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26663   if test "x$has_forbidden_chars" != x; then
26664     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26665     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26666   fi
26667 
26668     # Output is in $new_path
26669 
26670   windows_path="$new_path"
26671   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26672     unix_path=`$CYGPATH -u "$windows_path"`
26673     new_path="$unix_path"
26674   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26675     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26676     new_path="$unix_path"
26677   fi
26678 
26679     # remove trailing .exe if any
26680     new_path="${new_path/%.exe/}"
26681 
26682     # Save the first 10 bytes of this path to the storage, so fixpath can work.
26683     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26684   fi
26685 
26686   else
26687     # We're on a posix platform. Hooray! :)
26688     # First separate the path from the arguments. This will split at the first
26689     # space.
26690     complete="$STRIP"
26691     path="${complete%% *}"
26692     tmp="$complete EOL"
26693     arguments="${tmp#* }"
26694 
26695     # Cannot rely on the command "which" here since it doesn't always work.
26696     is_absolute_path=`$ECHO "$path" | $GREP ^/`
26697     if test -z "$is_absolute_path"; then
26698       # Path to executable is not absolute. Find it.
26699       IFS_save="$IFS"
26700       IFS=:
26701       for p in $PATH; do
26702         if test -f "$p/$path" && test -x "$p/$path"; then
26703           new_path="$p/$path"
26704           break
26705         fi
26706       done
26707       IFS="$IFS_save"
26708     else
26709       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving STRIP (as $path) failed, using $path directly." >&5
26710 $as_echo "$as_me: Resolving STRIP (as $path) failed, using $path directly." >&6;}
26711       new_path="$path"
26712     fi
26713 
26714     if test "x$new_path" = x; then
26715         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
26716 $as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
26717         has_space=`$ECHO "$complete" | $GREP " "`
26718         if test "x$has_space" != x; then
26719           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
26720 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
26721         fi
26722         as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
26723       fi
26724   fi
26725 
26726       # Now join together the path and the arguments once again
26727       if test "x$arguments" != xEOL; then
26728         new_complete="$new_path ${arguments% *}"
26729       else
26730         new_complete="$new_path"
26731       fi
26732 
26733   if test "x$complete" != "x$new_complete"; then
26734       STRIP="$new_complete"
26735       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
26736 $as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
26737     fi
26738 
26739 fi
26740 
26741 # objcopy is used for moving debug symbols to separate files when
26742 # full debug symbols are enabled.
26743 if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
26744     if test -n "$ac_tool_prefix"; then
26745   for ac_prog in gobjcopy objcopy
26746   do
26747     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
26748 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
26749 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26750 $as_echo_n "checking for $ac_word... " >&6; }
26751 if ${ac_cv_prog_OBJCOPY+:} false; then :
26752   $as_echo_n "(cached) " >&6
26753 else
26754   if test -n "$OBJCOPY"; then
26755   ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
26756 else
26757 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26758 for as_dir in $PATH
26759 do
26760   IFS=$as_save_IFS
26761   test -z "$as_dir" && as_dir=.
26762     for ac_exec_ext in '' $ac_executable_extensions; do
26763   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
26764     ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
26765     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26766     break 2
26767   fi
26768 done
26769   done
26770 IFS=$as_save_IFS
26771 
26772 fi
26773 fi
26774 OBJCOPY=$ac_cv_prog_OBJCOPY
26775 if test -n "$OBJCOPY"; then
26776   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
26777 $as_echo "$OBJCOPY" >&6; }
26778 else
26779   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26780 $as_echo "no" >&6; }
26781 fi
26782 
26783 
26784     test -n "$OBJCOPY" && break
26785   done
26786 fi
26787 if test -z "$OBJCOPY"; then
26788   ac_ct_OBJCOPY=$OBJCOPY
26789   for ac_prog in gobjcopy objcopy
26790 do
26791   # Extract the first word of "$ac_prog", so it can be a program name with args.
26792 set dummy $ac_prog; ac_word=$2
26793 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26794 $as_echo_n "checking for $ac_word... " >&6; }
26795 if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
26796   $as_echo_n "(cached) " >&6
26797 else
26798   if test -n "$ac_ct_OBJCOPY"; then
26799   ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
26800 else
26801 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26802 for as_dir in $PATH
26803 do
26804   IFS=$as_save_IFS
26805   test -z "$as_dir" && as_dir=.
26806     for ac_exec_ext in '' $ac_executable_extensions; do
26807   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
26808     ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
26809     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26810     break 2
26811   fi
26812 done
26813   done
26814 IFS=$as_save_IFS
26815 
26816 fi
26817 fi
26818 ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
26819 if test -n "$ac_ct_OBJCOPY"; then
26820   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
26821 $as_echo "$ac_ct_OBJCOPY" >&6; }
26822 else
26823   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26824 $as_echo "no" >&6; }
26825 fi
26826 
26827 
26828   test -n "$ac_ct_OBJCOPY" && break
26829 done
26830 
26831   if test "x$ac_ct_OBJCOPY" = x; then
26832     OBJCOPY=""
26833   else
26834     case $cross_compiling:$ac_tool_warned in
26835 yes:)
26836 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
26837 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
26838 ac_tool_warned=yes ;;
26839 esac
26840     OBJCOPY=$ac_ct_OBJCOPY
26841   fi
26842 fi
26843 
26844     # Only call fixup if objcopy was found.
26845     if test -n "$OBJCOPY"; then
26846 
26847   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26848 
26849   # First separate the path from the arguments. This will split at the first
26850   # space.
26851   complete="$OBJCOPY"
26852   path="${complete%% *}"
26853   tmp="$complete EOL"
26854   arguments="${tmp#* }"
26855 
26856   # Input might be given as Windows format, start by converting to
26857   # unix format.
26858   new_path=`$CYGPATH -u "$path"`
26859 
26860   # Now try to locate executable using which
26861   new_path=`$WHICH "$new_path" 2> /dev/null`
26862   # bat and cmd files are not always considered executable in cygwin causing which
26863   # to not find them
26864   if test "x$new_path" = x \
26865            && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26866            && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26867     new_path=`$CYGPATH -u "$path"`
26868   fi
26869   if test "x$new_path" = x; then
26870     # Oops. Which didn't find the executable.
26871     # The splitting of arguments from the executable at a space might have been incorrect,
26872     # since paths with space are more likely in Windows. Give it another try with the whole
26873     # argument.
26874     path="$complete"
26875     arguments="EOL"
26876     new_path=`$CYGPATH -u "$path"`
26877     new_path=`$WHICH "$new_path" 2> /dev/null`
26878     # bat and cmd files are not always considered executable in cygwin causing which
26879     # to not find them
26880     if test "x$new_path" = x \
26881              && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26882              && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26883       new_path=`$CYGPATH -u "$path"`
26884     fi
26885     if test "x$new_path" = x; then
26886       # It's still not found. Now this is an unrecoverable error.
26887       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
26888 $as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
26889       has_space=`$ECHO "$complete" | $GREP " "`
26890       if test "x$has_space" != x; then
26891         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26892 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26893       fi
26894       as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
26895     fi
26896   fi
26897 
26898   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26899   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26900   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26901   # "foo.exe" is OK but "foo" is an error.
26902   #
26903   # This test is therefore slightly more accurate than "test -f" to check for file precense.
26904   # It is also a way to make sure we got the proper file name for the real test later on.
26905   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26906   if test "x$test_shortpath" = x; then
26907     # Short path failed, file does not exist as specified.
26908     # Try adding .exe or .cmd
26909     if test -f "${new_path}.exe"; then
26910        input_to_shortpath="${new_path}.exe"
26911     elif test -f "${new_path}.cmd"; then
26912        input_to_shortpath="${new_path}.cmd"
26913     else
26914       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&5
26915 $as_echo "$as_me: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&6;}
26916       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
26917 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
26918       as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
26919     fi
26920   else
26921     input_to_shortpath="$new_path"
26922   fi
26923 
26924   # Call helper function which possibly converts this using DOS-style short mode.
26925   # If so, the updated path is stored in $new_path.
26926   new_path="$input_to_shortpath"
26927 
26928   input_path="$input_to_shortpath"
26929   # Check if we need to convert this using DOS-style short mode. If the path
26930   # contains just simple characters, use it. Otherwise (spaces, weird characters),
26931   # take no chances and rewrite it.
26932   # Note: m4 eats our [], so we need to use [ and ] instead.
26933   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26934   if test "x$has_forbidden_chars" != x; then
26935     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26936     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26937     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26938     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26939       # Going to short mode and back again did indeed matter. Since short mode is
26940       # case insensitive, let's make it lowercase to improve readability.
26941       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26942       # Now convert it back to Unix-stile (cygpath)
26943       input_path=`$CYGPATH -u "$shortmode_path"`
26944       new_path="$input_path"
26945     fi
26946   fi
26947 
26948   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26949   if test "x$test_cygdrive_prefix" = x; then
26950     # As a simple fix, exclude /usr/bin since it's not a real path.
26951     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
26952       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26953       # a path prefixed by /cygdrive for fixpath to work.
26954       new_path="$CYGWIN_ROOT_PATH$input_path"
26955     fi
26956   fi
26957 
26958   # remove trailing .exe if any
26959   new_path="${new_path/%.exe/}"
26960 
26961   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26962 
26963   # First separate the path from the arguments. This will split at the first
26964   # space.
26965   complete="$OBJCOPY"
26966   path="${complete%% *}"
26967   tmp="$complete EOL"
26968   arguments="${tmp#* }"
26969 
26970   # Input might be given as Windows format, start by converting to
26971   # unix format.
26972   new_path="$path"
26973 
26974   windows_path="$new_path"
26975   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26976     unix_path=`$CYGPATH -u "$windows_path"`
26977     new_path="$unix_path"
26978   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26979     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26980     new_path="$unix_path"
26981   fi
26982 
26983 
26984   # Now try to locate executable using which
26985   new_path=`$WHICH "$new_path" 2> /dev/null`
26986 
26987   if test "x$new_path" = x; then
26988     # Oops. Which didn't find the executable.
26989     # The splitting of arguments from the executable at a space might have been incorrect,
26990     # since paths with space are more likely in Windows. Give it another try with the whole
26991     # argument.
26992     path="$complete"
26993     arguments="EOL"
26994     new_path="$path"
26995 
26996   windows_path="$new_path"
26997   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26998     unix_path=`$CYGPATH -u "$windows_path"`
26999     new_path="$unix_path"
27000   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27001     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27002     new_path="$unix_path"
27003   fi
27004 
27005 
27006     new_path=`$WHICH "$new_path" 2> /dev/null`
27007 
27008     if test "x$new_path" = x; then
27009       # It's still not found. Now this is an unrecoverable error.
27010       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
27011 $as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
27012       has_space=`$ECHO "$complete" | $GREP " "`
27013       if test "x$has_space" != x; then
27014         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27015 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27016       fi
27017       as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
27018     fi
27019   fi
27020 
27021   # Now new_path has a complete unix path to the binary
27022   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
27023     # Keep paths in /bin as-is, but remove trailing .exe if any
27024     new_path="${new_path/%.exe/}"
27025     # Do not save /bin paths to all_fixpath_prefixes!
27026   else
27027     # Not in mixed or Windows style, start by that.
27028     new_path=`cmd //c echo $new_path`
27029 
27030   input_path="$new_path"
27031   # Check if we need to convert this using DOS-style short mode. If the path
27032   # contains just simple characters, use it. Otherwise (spaces, weird characters),
27033   # take no chances and rewrite it.
27034   # Note: m4 eats our [], so we need to use [ and ] instead.
27035   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27036   if test "x$has_forbidden_chars" != x; then
27037     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27038     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27039   fi
27040 
27041     # Output is in $new_path
27042 
27043   windows_path="$new_path"
27044   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27045     unix_path=`$CYGPATH -u "$windows_path"`
27046     new_path="$unix_path"
27047   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27048     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27049     new_path="$unix_path"
27050   fi
27051 
27052     # remove trailing .exe if any
27053     new_path="${new_path/%.exe/}"
27054 
27055     # Save the first 10 bytes of this path to the storage, so fixpath can work.
27056     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27057   fi
27058 
27059   else
27060     # We're on a posix platform. Hooray! :)
27061     # First separate the path from the arguments. This will split at the first
27062     # space.
27063     complete="$OBJCOPY"
27064     path="${complete%% *}"
27065     tmp="$complete EOL"
27066     arguments="${tmp#* }"
27067 
27068     # Cannot rely on the command "which" here since it doesn't always work.
27069     is_absolute_path=`$ECHO "$path" | $GREP ^/`
27070     if test -z "$is_absolute_path"; then
27071       # Path to executable is not absolute. Find it.
27072       IFS_save="$IFS"
27073       IFS=:
27074       for p in $PATH; do
27075         if test -f "$p/$path" && test -x "$p/$path"; then
27076           new_path="$p/$path"
27077           break
27078         fi
27079       done
27080       IFS="$IFS_save"
27081     else
27082       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving OBJCOPY (as $path) failed, using $path directly." >&5
27083 $as_echo "$as_me: Resolving OBJCOPY (as $path) failed, using $path directly." >&6;}
27084       new_path="$path"
27085     fi
27086 
27087     if test "x$new_path" = x; then
27088         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
27089 $as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
27090         has_space=`$ECHO "$complete" | $GREP " "`
27091         if test "x$has_space" != x; then
27092           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
27093 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
27094         fi
27095         as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
27096       fi
27097   fi
27098 
27099       # Now join together the path and the arguments once again
27100       if test "x$arguments" != xEOL; then
27101         new_complete="$new_path ${arguments% *}"
27102       else
27103         new_complete="$new_path"
27104       fi
27105 
27106   if test "x$complete" != "x$new_complete"; then
27107       OBJCOPY="$new_complete"
27108       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJCOPY to \"$new_complete\"" >&5
27109 $as_echo "$as_me: Rewriting OBJCOPY to \"$new_complete\"" >&6;}
27110     fi
27111 
27112     fi
27113 fi
27114 
27115 if test -n "$ac_tool_prefix"; then
27116   for ac_prog in gobjdump objdump
27117   do
27118     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
27119 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
27120 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27121 $as_echo_n "checking for $ac_word... " >&6; }
27122 if ${ac_cv_prog_OBJDUMP+:} false; then :
27123   $as_echo_n "(cached) " >&6
27124 else
27125   if test -n "$OBJDUMP"; then
27126   ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
27127 else
27128 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27129 for as_dir in $PATH
27130 do
27131   IFS=$as_save_IFS
27132   test -z "$as_dir" && as_dir=.
27133     for ac_exec_ext in '' $ac_executable_extensions; do
27134   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
27135     ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
27136     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27137     break 2
27138   fi
27139 done
27140   done
27141 IFS=$as_save_IFS
27142 
27143 fi
27144 fi
27145 OBJDUMP=$ac_cv_prog_OBJDUMP
27146 if test -n "$OBJDUMP"; then
27147   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
27148 $as_echo "$OBJDUMP" >&6; }
27149 else
27150   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27151 $as_echo "no" >&6; }
27152 fi
27153 
27154 
27155     test -n "$OBJDUMP" && break
27156   done
27157 fi
27158 if test -z "$OBJDUMP"; then
27159   ac_ct_OBJDUMP=$OBJDUMP
27160   for ac_prog in gobjdump objdump
27161 do
27162   # Extract the first word of "$ac_prog", so it can be a program name with args.
27163 set dummy $ac_prog; ac_word=$2
27164 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27165 $as_echo_n "checking for $ac_word... " >&6; }
27166 if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
27167   $as_echo_n "(cached) " >&6
27168 else
27169   if test -n "$ac_ct_OBJDUMP"; then
27170   ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
27171 else
27172 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27173 for as_dir in $PATH
27174 do
27175   IFS=$as_save_IFS
27176   test -z "$as_dir" && as_dir=.
27177     for ac_exec_ext in '' $ac_executable_extensions; do
27178   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
27179     ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
27180     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27181     break 2
27182   fi
27183 done
27184   done
27185 IFS=$as_save_IFS
27186 
27187 fi
27188 fi
27189 ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
27190 if test -n "$ac_ct_OBJDUMP"; then
27191   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
27192 $as_echo "$ac_ct_OBJDUMP" >&6; }
27193 else
27194   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27195 $as_echo "no" >&6; }
27196 fi
27197 
27198 
27199   test -n "$ac_ct_OBJDUMP" && break
27200 done
27201 
27202   if test "x$ac_ct_OBJDUMP" = x; then
27203     OBJDUMP=""
27204   else
27205     case $cross_compiling:$ac_tool_warned in
27206 yes:)
27207 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
27208 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
27209 ac_tool_warned=yes ;;
27210 esac
27211     OBJDUMP=$ac_ct_OBJDUMP
27212   fi
27213 fi
27214 
27215 if test "x$OBJDUMP" != x; then
27216   # Only used for compare.sh; we can live without it. BASIC_FIXUP_EXECUTABLE bails if argument is missing.
27217 
27218   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27219 
27220   # First separate the path from the arguments. This will split at the first
27221   # space.
27222   complete="$OBJDUMP"
27223   path="${complete%% *}"
27224   tmp="$complete EOL"
27225   arguments="${tmp#* }"
27226 
27227   # Input might be given as Windows format, start by converting to
27228   # unix format.
27229   new_path=`$CYGPATH -u "$path"`
27230 
27231   # Now try to locate executable using which
27232   new_path=`$WHICH "$new_path" 2> /dev/null`
27233   # bat and cmd files are not always considered executable in cygwin causing which
27234   # to not find them
27235   if test "x$new_path" = x \
27236            && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27237            && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27238     new_path=`$CYGPATH -u "$path"`
27239   fi
27240   if test "x$new_path" = x; then
27241     # Oops. Which didn't find the executable.
27242     # The splitting of arguments from the executable at a space might have been incorrect,
27243     # since paths with space are more likely in Windows. Give it another try with the whole
27244     # argument.
27245     path="$complete"
27246     arguments="EOL"
27247     new_path=`$CYGPATH -u "$path"`
27248     new_path=`$WHICH "$new_path" 2> /dev/null`
27249     # bat and cmd files are not always considered executable in cygwin causing which
27250     # to not find them
27251     if test "x$new_path" = x \
27252              && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27253              && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27254       new_path=`$CYGPATH -u "$path"`
27255     fi
27256     if test "x$new_path" = x; then
27257       # It's still not found. Now this is an unrecoverable error.
27258       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
27259 $as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
27260       has_space=`$ECHO "$complete" | $GREP " "`
27261       if test "x$has_space" != x; then
27262         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27263 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27264       fi
27265       as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
27266     fi
27267   fi
27268 
27269   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27270   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27271   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27272   # "foo.exe" is OK but "foo" is an error.
27273   #
27274   # This test is therefore slightly more accurate than "test -f" to check for file precense.
27275   # It is also a way to make sure we got the proper file name for the real test later on.
27276   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27277   if test "x$test_shortpath" = x; then
27278     # Short path failed, file does not exist as specified.
27279     # Try adding .exe or .cmd
27280     if test -f "${new_path}.exe"; then
27281        input_to_shortpath="${new_path}.exe"
27282     elif test -f "${new_path}.cmd"; then
27283        input_to_shortpath="${new_path}.cmd"
27284     else
27285       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&5
27286 $as_echo "$as_me: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&6;}
27287       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
27288 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
27289       as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
27290     fi
27291   else
27292     input_to_shortpath="$new_path"
27293   fi
27294 
27295   # Call helper function which possibly converts this using DOS-style short mode.
27296   # If so, the updated path is stored in $new_path.
27297   new_path="$input_to_shortpath"
27298 
27299   input_path="$input_to_shortpath"
27300   # Check if we need to convert this using DOS-style short mode. If the path
27301   # contains just simple characters, use it. Otherwise (spaces, weird characters),
27302   # take no chances and rewrite it.
27303   # Note: m4 eats our [], so we need to use [ and ] instead.
27304   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27305   if test "x$has_forbidden_chars" != x; then
27306     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27307     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27308     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27309     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27310       # Going to short mode and back again did indeed matter. Since short mode is
27311       # case insensitive, let's make it lowercase to improve readability.
27312       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27313       # Now convert it back to Unix-stile (cygpath)
27314       input_path=`$CYGPATH -u "$shortmode_path"`
27315       new_path="$input_path"
27316     fi
27317   fi
27318 
27319   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27320   if test "x$test_cygdrive_prefix" = x; then
27321     # As a simple fix, exclude /usr/bin since it's not a real path.
27322     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
27323       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27324       # a path prefixed by /cygdrive for fixpath to work.
27325       new_path="$CYGWIN_ROOT_PATH$input_path"
27326     fi
27327   fi
27328 
27329   # remove trailing .exe if any
27330   new_path="${new_path/%.exe/}"
27331 
27332   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27333 
27334   # First separate the path from the arguments. This will split at the first
27335   # space.
27336   complete="$OBJDUMP"
27337   path="${complete%% *}"
27338   tmp="$complete EOL"
27339   arguments="${tmp#* }"
27340 
27341   # Input might be given as Windows format, start by converting to
27342   # unix format.
27343   new_path="$path"
27344 
27345   windows_path="$new_path"
27346   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27347     unix_path=`$CYGPATH -u "$windows_path"`
27348     new_path="$unix_path"
27349   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27350     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27351     new_path="$unix_path"
27352   fi
27353 
27354 
27355   # Now try to locate executable using which
27356   new_path=`$WHICH "$new_path" 2> /dev/null`
27357 
27358   if test "x$new_path" = x; then
27359     # Oops. Which didn't find the executable.
27360     # The splitting of arguments from the executable at a space might have been incorrect,
27361     # since paths with space are more likely in Windows. Give it another try with the whole
27362     # argument.
27363     path="$complete"
27364     arguments="EOL"
27365     new_path="$path"
27366 
27367   windows_path="$new_path"
27368   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27369     unix_path=`$CYGPATH -u "$windows_path"`
27370     new_path="$unix_path"
27371   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27372     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27373     new_path="$unix_path"
27374   fi
27375 
27376 
27377     new_path=`$WHICH "$new_path" 2> /dev/null`
27378 
27379     if test "x$new_path" = x; then
27380       # It's still not found. Now this is an unrecoverable error.
27381       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
27382 $as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
27383       has_space=`$ECHO "$complete" | $GREP " "`
27384       if test "x$has_space" != x; then
27385         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27386 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27387       fi
27388       as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
27389     fi
27390   fi
27391 
27392   # Now new_path has a complete unix path to the binary
27393   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
27394     # Keep paths in /bin as-is, but remove trailing .exe if any
27395     new_path="${new_path/%.exe/}"
27396     # Do not save /bin paths to all_fixpath_prefixes!
27397   else
27398     # Not in mixed or Windows style, start by that.
27399     new_path=`cmd //c echo $new_path`
27400 
27401   input_path="$new_path"
27402   # Check if we need to convert this using DOS-style short mode. If the path
27403   # contains just simple characters, use it. Otherwise (spaces, weird characters),
27404   # take no chances and rewrite it.
27405   # Note: m4 eats our [], so we need to use [ and ] instead.
27406   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27407   if test "x$has_forbidden_chars" != x; then
27408     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27409     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27410   fi
27411 
27412     # Output is in $new_path
27413 
27414   windows_path="$new_path"
27415   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27416     unix_path=`$CYGPATH -u "$windows_path"`
27417     new_path="$unix_path"
27418   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27419     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27420     new_path="$unix_path"
27421   fi
27422 
27423     # remove trailing .exe if any
27424     new_path="${new_path/%.exe/}"
27425 
27426     # Save the first 10 bytes of this path to the storage, so fixpath can work.
27427     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27428   fi
27429 
27430   else
27431     # We're on a posix platform. Hooray! :)
27432     # First separate the path from the arguments. This will split at the first
27433     # space.
27434     complete="$OBJDUMP"
27435     path="${complete%% *}"
27436     tmp="$complete EOL"
27437     arguments="${tmp#* }"
27438 
27439     # Cannot rely on the command "which" here since it doesn't always work.
27440     is_absolute_path=`$ECHO "$path" | $GREP ^/`
27441     if test -z "$is_absolute_path"; then
27442       # Path to executable is not absolute. Find it.
27443       IFS_save="$IFS"
27444       IFS=:
27445       for p in $PATH; do
27446         if test -f "$p/$path" && test -x "$p/$path"; then
27447           new_path="$p/$path"
27448           break
27449         fi
27450       done
27451       IFS="$IFS_save"
27452     else
27453       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving OBJDUMP (as $path) failed, using $path directly." >&5
27454 $as_echo "$as_me: Resolving OBJDUMP (as $path) failed, using $path directly." >&6;}
27455       new_path="$path"
27456     fi
27457 
27458     if test "x$new_path" = x; then
27459         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
27460 $as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
27461         has_space=`$ECHO "$complete" | $GREP " "`
27462         if test "x$has_space" != x; then
27463           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
27464 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
27465         fi
27466         as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
27467       fi
27468   fi
27469 
27470       # Now join together the path and the arguments once again
27471       if test "x$arguments" != xEOL; then
27472         new_complete="$new_path ${arguments% *}"
27473       else
27474         new_complete="$new_path"
27475       fi
27476 
27477   if test "x$complete" != "x$new_complete"; then
27478       OBJDUMP="$new_complete"
27479       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJDUMP to \"$new_complete\"" >&5
27480 $as_echo "$as_me: Rewriting OBJDUMP to \"$new_complete\"" >&6;}
27481     fi
27482 
27483 fi
27484 
27485 if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
27486    # Extract the first word of "lipo", so it can be a program name with args.
27487 set dummy lipo; ac_word=$2
27488 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27489 $as_echo_n "checking for $ac_word... " >&6; }
27490 if ${ac_cv_path_LIPO+:} false; then :
27491   $as_echo_n "(cached) " >&6
27492 else
27493   case $LIPO in
27494   [\\/]* | ?:[\\/]*)
27495   ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
27496   ;;
27497   *)
27498   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27499 for as_dir in $PATH
27500 do
27501   IFS=$as_save_IFS
27502   test -z "$as_dir" && as_dir=.
27503     for ac_exec_ext in '' $ac_executable_extensions; do
27504   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
27505     ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
27506     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27507     break 2
27508   fi
27509 done
27510   done
27511 IFS=$as_save_IFS
27512 
27513   ;;
27514 esac
27515 fi
27516 LIPO=$ac_cv_path_LIPO
27517 if test -n "$LIPO"; then
27518   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
27519 $as_echo "$LIPO" >&6; }
27520 else
27521   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27522 $as_echo "no" >&6; }
27523 fi
27524 
27525 
27526 
27527   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27528 
27529   # First separate the path from the arguments. This will split at the first
27530   # space.
27531   complete="$LIPO"
27532   path="${complete%% *}"
27533   tmp="$complete EOL"
27534   arguments="${tmp#* }"
27535 
27536   # Input might be given as Windows format, start by converting to
27537   # unix format.
27538   new_path=`$CYGPATH -u "$path"`
27539 
27540   # Now try to locate executable using which
27541   new_path=`$WHICH "$new_path" 2> /dev/null`
27542   # bat and cmd files are not always considered executable in cygwin causing which
27543   # to not find them
27544   if test "x$new_path" = x \
27545            && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27546            && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27547     new_path=`$CYGPATH -u "$path"`
27548   fi
27549   if test "x$new_path" = x; then
27550     # Oops. Which didn't find the executable.
27551     # The splitting of arguments from the executable at a space might have been incorrect,
27552     # since paths with space are more likely in Windows. Give it another try with the whole
27553     # argument.
27554     path="$complete"
27555     arguments="EOL"
27556     new_path=`$CYGPATH -u "$path"`
27557     new_path=`$WHICH "$new_path" 2> /dev/null`
27558     # bat and cmd files are not always considered executable in cygwin causing which
27559     # to not find them
27560     if test "x$new_path" = x \
27561              && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27562              && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27563       new_path=`$CYGPATH -u "$path"`
27564     fi
27565     if test "x$new_path" = x; then
27566       # It's still not found. Now this is an unrecoverable error.
27567       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
27568 $as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
27569       has_space=`$ECHO "$complete" | $GREP " "`
27570       if test "x$has_space" != x; then
27571         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27572 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27573       fi
27574       as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
27575     fi
27576   fi
27577 
27578   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27579   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27580   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27581   # "foo.exe" is OK but "foo" is an error.
27582   #
27583   # This test is therefore slightly more accurate than "test -f" to check for file precense.
27584   # It is also a way to make sure we got the proper file name for the real test later on.
27585   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27586   if test "x$test_shortpath" = x; then
27587     # Short path failed, file does not exist as specified.
27588     # Try adding .exe or .cmd
27589     if test -f "${new_path}.exe"; then
27590        input_to_shortpath="${new_path}.exe"
27591     elif test -f "${new_path}.cmd"; then
27592        input_to_shortpath="${new_path}.cmd"
27593     else
27594       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$new_path\", is invalid." >&5
27595 $as_echo "$as_me: The path of LIPO, which resolves as \"$new_path\", is invalid." >&6;}
27596       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
27597 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
27598       as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
27599     fi
27600   else
27601     input_to_shortpath="$new_path"
27602   fi
27603 
27604   # Call helper function which possibly converts this using DOS-style short mode.
27605   # If so, the updated path is stored in $new_path.
27606   new_path="$input_to_shortpath"
27607 
27608   input_path="$input_to_shortpath"
27609   # Check if we need to convert this using DOS-style short mode. If the path
27610   # contains just simple characters, use it. Otherwise (spaces, weird characters),
27611   # take no chances and rewrite it.
27612   # Note: m4 eats our [], so we need to use [ and ] instead.
27613   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27614   if test "x$has_forbidden_chars" != x; then
27615     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27616     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27617     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27618     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27619       # Going to short mode and back again did indeed matter. Since short mode is
27620       # case insensitive, let's make it lowercase to improve readability.
27621       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27622       # Now convert it back to Unix-stile (cygpath)
27623       input_path=`$CYGPATH -u "$shortmode_path"`
27624       new_path="$input_path"
27625     fi
27626   fi
27627 
27628   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27629   if test "x$test_cygdrive_prefix" = x; then
27630     # As a simple fix, exclude /usr/bin since it's not a real path.
27631     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
27632       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27633       # a path prefixed by /cygdrive for fixpath to work.
27634       new_path="$CYGWIN_ROOT_PATH$input_path"
27635     fi
27636   fi
27637 
27638   # remove trailing .exe if any
27639   new_path="${new_path/%.exe/}"
27640 
27641   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27642 
27643   # First separate the path from the arguments. This will split at the first
27644   # space.
27645   complete="$LIPO"
27646   path="${complete%% *}"
27647   tmp="$complete EOL"
27648   arguments="${tmp#* }"
27649 
27650   # Input might be given as Windows format, start by converting to
27651   # unix format.
27652   new_path="$path"
27653 
27654   windows_path="$new_path"
27655   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27656     unix_path=`$CYGPATH -u "$windows_path"`
27657     new_path="$unix_path"
27658   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27659     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27660     new_path="$unix_path"
27661   fi
27662 
27663 
27664   # Now try to locate executable using which
27665   new_path=`$WHICH "$new_path" 2> /dev/null`
27666 
27667   if test "x$new_path" = x; then
27668     # Oops. Which didn't find the executable.
27669     # The splitting of arguments from the executable at a space might have been incorrect,
27670     # since paths with space are more likely in Windows. Give it another try with the whole
27671     # argument.
27672     path="$complete"
27673     arguments="EOL"
27674     new_path="$path"
27675 
27676   windows_path="$new_path"
27677   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27678     unix_path=`$CYGPATH -u "$windows_path"`
27679     new_path="$unix_path"
27680   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27681     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27682     new_path="$unix_path"
27683   fi
27684 
27685 
27686     new_path=`$WHICH "$new_path" 2> /dev/null`
27687 
27688     if test "x$new_path" = x; then
27689       # It's still not found. Now this is an unrecoverable error.
27690       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
27691 $as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
27692       has_space=`$ECHO "$complete" | $GREP " "`
27693       if test "x$has_space" != x; then
27694         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27695 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27696       fi
27697       as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
27698     fi
27699   fi
27700 
27701   # Now new_path has a complete unix path to the binary
27702   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
27703     # Keep paths in /bin as-is, but remove trailing .exe if any
27704     new_path="${new_path/%.exe/}"
27705     # Do not save /bin paths to all_fixpath_prefixes!
27706   else
27707     # Not in mixed or Windows style, start by that.
27708     new_path=`cmd //c echo $new_path`
27709 
27710   input_path="$new_path"
27711   # Check if we need to convert this using DOS-style short mode. If the path
27712   # contains just simple characters, use it. Otherwise (spaces, weird characters),
27713   # take no chances and rewrite it.
27714   # Note: m4 eats our [], so we need to use [ and ] instead.
27715   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27716   if test "x$has_forbidden_chars" != x; then
27717     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27718     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27719   fi
27720 
27721     # Output is in $new_path
27722 
27723   windows_path="$new_path"
27724   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27725     unix_path=`$CYGPATH -u "$windows_path"`
27726     new_path="$unix_path"
27727   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27728     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27729     new_path="$unix_path"
27730   fi
27731 
27732     # remove trailing .exe if any
27733     new_path="${new_path/%.exe/}"
27734 
27735     # Save the first 10 bytes of this path to the storage, so fixpath can work.
27736     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27737   fi
27738 
27739   else
27740     # We're on a posix platform. Hooray! :)
27741     # First separate the path from the arguments. This will split at the first
27742     # space.
27743     complete="$LIPO"
27744     path="${complete%% *}"
27745     tmp="$complete EOL"
27746     arguments="${tmp#* }"
27747 
27748     # Cannot rely on the command "which" here since it doesn't always work.
27749     is_absolute_path=`$ECHO "$path" | $GREP ^/`
27750     if test -z "$is_absolute_path"; then
27751       # Path to executable is not absolute. Find it.
27752       IFS_save="$IFS"
27753       IFS=:
27754       for p in $PATH; do
27755         if test -f "$p/$path" && test -x "$p/$path"; then
27756           new_path="$p/$path"
27757           break
27758         fi
27759       done
27760       IFS="$IFS_save"
27761     else
27762       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving LIPO (as $path) failed, using $path directly." >&5
27763 $as_echo "$as_me: Resolving LIPO (as $path) failed, using $path directly." >&6;}
27764       new_path="$path"
27765     fi
27766 
27767     if test "x$new_path" = x; then
27768         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
27769 $as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
27770         has_space=`$ECHO "$complete" | $GREP " "`
27771         if test "x$has_space" != x; then
27772           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
27773 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
27774         fi
27775         as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
27776       fi
27777   fi
27778 
27779       # Now join together the path and the arguments once again
27780       if test "x$arguments" != xEOL; then
27781         new_complete="$new_path ${arguments% *}"
27782       else
27783         new_complete="$new_path"
27784       fi
27785 
27786   if test "x$complete" != "x$new_complete"; then
27787       LIPO="$new_complete"
27788       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LIPO to \"$new_complete\"" >&5
27789 $as_echo "$as_me: Rewriting LIPO to \"$new_complete\"" >&6;}
27790     fi
27791 
27792 fi
27793 
27794 # Restore old path without tools dir
27795 PATH="$OLD_PATH"
27796 
27797 
27798 # FIXME: Currently we must test this after paths but before flags. Fix!
27799 
27800 # And we can test some aspects on the target using configure macros.
27801 
27802 
27803 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
27804 $as_echo_n "checking for ANSI C header files... " >&6; }
27805 if ${ac_cv_header_stdc+:} false; then :
27806   $as_echo_n "(cached) " >&6
27807 else
27808   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27809 /* end confdefs.h.  */
27810 #include <stdlib.h>
27811 #include <stdarg.h>
27812 #include <string.h>
27813 #include <float.h>
27814 
27815 int
27816 main ()
27817 {
27818 
27819   ;
27820   return 0;
27821 }
27822 _ACEOF
27823 if ac_fn_cxx_try_compile "$LINENO"; then :
27824   ac_cv_header_stdc=yes
27825 else
27826   ac_cv_header_stdc=no
27827 fi
27828 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27829 
27830 if test $ac_cv_header_stdc = yes; then
27831   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
27832   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27833 /* end confdefs.h.  */
27834 #include <string.h>
27835 
27836 _ACEOF
27837 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
27838   $EGREP "memchr" >/dev/null 2>&1; then :
27839 
27840 else
27841   ac_cv_header_stdc=no
27842 fi
27843 rm -f conftest*
27844 
27845 fi
27846 
27847 if test $ac_cv_header_stdc = yes; then
27848   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
27849   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27850 /* end confdefs.h.  */
27851 #include <stdlib.h>
27852 
27853 _ACEOF
27854 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
27855   $EGREP "free" >/dev/null 2>&1; then :
27856 
27857 else
27858   ac_cv_header_stdc=no
27859 fi
27860 rm -f conftest*
27861 
27862 fi
27863 
27864 if test $ac_cv_header_stdc = yes; then
27865   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
27866   if test "$cross_compiling" = yes; then :
27867   :
27868 else
27869   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27870 /* end confdefs.h.  */
27871 #include <ctype.h>
27872 #include <stdlib.h>
27873 #if ((' ' & 0x0FF) == 0x020)
27874 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
27875 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
27876 #else
27877 # define ISLOWER(c) \
27878                    (('a' <= (c) && (c) <= 'i') \
27879                      || ('j' <= (c) && (c) <= 'r') \
27880                      || ('s' <= (c) && (c) <= 'z'))
27881 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
27882 #endif
27883 
27884 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
27885 int
27886 main ()
27887 {
27888   int i;
27889   for (i = 0; i < 256; i++)
27890     if (XOR (islower (i), ISLOWER (i))
27891         || toupper (i) != TOUPPER (i))
27892       return 2;
27893   return 0;
27894 }
27895 _ACEOF
27896 if ac_fn_cxx_try_run "$LINENO"; then :
27897 
27898 else
27899   ac_cv_header_stdc=no
27900 fi
27901 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
27902   conftest.$ac_objext conftest.beam conftest.$ac_ext
27903 fi
27904 
27905 fi
27906 fi
27907 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
27908 $as_echo "$ac_cv_header_stdc" >&6; }
27909 if test $ac_cv_header_stdc = yes; then
27910 
27911 $as_echo "#define STDC_HEADERS 1" >>confdefs.h
27912 
27913 fi
27914 
27915 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
27916 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
27917                   inttypes.h stdint.h unistd.h
27918 do :
27919   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
27920 ac_fn_cxx_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
27921 "
27922 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
27923   cat >>confdefs.h <<_ACEOF
27924 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
27925 _ACEOF
27926 
27927 fi
27928 
27929 done
27930 
27931 
27932 
27933 ###############################################################################
27934 #
27935 # Now we check if libjvm.so will use 32 or 64 bit pointers for the C/C++ code.
27936 # (The JVM can use 32 or 64 bit Java pointers but that decision
27937 # is made at runtime.)
27938 #
27939 if test "x$OPENJDK_TARGET_OS" = xsolaris; then
27940   # Always specify -m flags on Solaris
27941 
27942   # keep track of c/cxx flags that we added outselves...
27943   #   to prevent emitting warning...
27944   ADDED_CFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
27945   ADDED_CXXFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
27946   ADDED_LDFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
27947 
27948   CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
27949   CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
27950   LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
27951 
27952   CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
27953   CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
27954   LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
27955 
27956 elif test "x$COMPILE_TYPE" = xreduced; then
27957   if test "x$OPENJDK_TARGET_OS" != xwindows; then
27958     # Specify -m if running reduced on other Posix platforms
27959 
27960   # keep track of c/cxx flags that we added outselves...
27961   #   to prevent emitting warning...
27962   ADDED_CFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
27963   ADDED_CXXFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
27964   ADDED_LDFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
27965 
27966   CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
27967   CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
27968   LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
27969 
27970   CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
27971   CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
27972   LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
27973 
27974   fi
27975 fi
27976 
27977 # Make compilation sanity check
27978 for ac_header in stdio.h
27979 do :
27980   ac_fn_cxx_check_header_mongrel "$LINENO" "stdio.h" "ac_cv_header_stdio_h" "$ac_includes_default"
27981 if test "x$ac_cv_header_stdio_h" = xyes; then :
27982   cat >>confdefs.h <<_ACEOF
27983 #define HAVE_STDIO_H 1
27984 _ACEOF
27985 
27986 else
27987 
27988   { $as_echo "$as_me:${as_lineno-$LINENO}: Failed to compile stdio.h. This likely implies missing compile dependencies." >&5
27989 $as_echo "$as_me: Failed to compile stdio.h. This likely implies missing compile dependencies." >&6;}
27990   if test "x$COMPILE_TYPE" = xreduced; then
27991     { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed." >&5
27992 $as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed." >&6;}
27993   elif test "x$COMPILE_TYPE" = xcross; then
27994     { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
27995 $as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;}
27996   fi
27997   as_fn_error $? "Cannot continue." "$LINENO" 5
27998 
27999 fi
28000 
28001 done
28002 
28003 
28004 # The cast to long int works around a bug in the HP C Compiler
28005 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
28006 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
28007 # This bug is HP SR number 8606223364.
28008 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
28009 $as_echo_n "checking size of int *... " >&6; }
28010 if ${ac_cv_sizeof_int_p+:} false; then :
28011   $as_echo_n "(cached) " >&6
28012 else
28013   if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
28014 
28015 else
28016   if test "$ac_cv_type_int_p" = yes; then
28017      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
28018 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
28019 as_fn_error 77 "cannot compute sizeof (int *)
28020 See \`config.log' for more details" "$LINENO" 5; }
28021    else
28022      ac_cv_sizeof_int_p=0
28023    fi
28024 fi
28025 
28026 fi
28027 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
28028 $as_echo "$ac_cv_sizeof_int_p" >&6; }
28029 
28030 
28031 
28032 cat >>confdefs.h <<_ACEOF
28033 #define SIZEOF_INT_P $ac_cv_sizeof_int_p
28034 _ACEOF
28035 
28036 
28037 
28038 if test "x$SIZEOF_INT_P" != "x$ac_cv_sizeof_int_p"; then
28039   # Workaround autoconf bug, see http://lists.gnu.org/archive/html/autoconf/2010-07/msg00004.html
28040   SIZEOF_INT_P="$ac_cv_sizeof_int_p"
28041 fi
28042 
28043 if test "x$SIZEOF_INT_P" = x; then
28044     # The test failed, lets stick to the assumed value.
28045     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: The number of bits in the target could not be determined, using $OPENJDK_TARGET_CPU_BITS." >&5
28046 $as_echo "$as_me: WARNING: The number of bits in the target could not be determined, using $OPENJDK_TARGET_CPU_BITS." >&2;}
28047 else
28048     TESTED_TARGET_CPU_BITS=`expr 8 \* $SIZEOF_INT_P`
28049 
28050     if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
28051         as_fn_error $? "The tested number of bits in the target ($TESTED_TARGET_CPU_BITS) differs from the number of bits expected to be found in the target ($OPENJDK_TARGET_CPU_BITS)" "$LINENO" 5
28052     fi
28053 fi
28054 
28055 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for target address size" >&5
28056 $as_echo_n "checking for target address size... " >&6; }
28057 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_CPU_BITS bits" >&5
28058 $as_echo "$OPENJDK_TARGET_CPU_BITS bits" >&6; }
28059 
28060 
28061 ###############################################################################
28062 #
28063 # Is the target little of big endian?
28064 #
28065  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
28066 $as_echo_n "checking whether byte ordering is bigendian... " >&6; }
28067 if ${ac_cv_c_bigendian+:} false; then :
28068   $as_echo_n "(cached) " >&6
28069 else
28070   ac_cv_c_bigendian=unknown
28071     # See if we're dealing with a universal compiler.
28072     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28073 /* end confdefs.h.  */
28074 #ifndef __APPLE_CC__
28075                not a universal capable compiler
28076              #endif
28077              typedef int dummy;
28078 
28079 _ACEOF
28080 if ac_fn_cxx_try_compile "$LINENO"; then :
28081 
28082         # Check for potential -arch flags.  It is not universal unless
28083         # there are at least two -arch flags with different values.
28084         ac_arch=
28085         ac_prev=
28086         for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
28087          if test -n "$ac_prev"; then
28088            case $ac_word in
28089              i?86 | x86_64 | ppc | ppc64)
28090                if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
28091                  ac_arch=$ac_word
28092                else
28093                  ac_cv_c_bigendian=universal
28094                  break
28095                fi
28096                ;;
28097            esac
28098            ac_prev=
28099          elif test "x$ac_word" = "x-arch"; then
28100            ac_prev=arch
28101          fi
28102        done
28103 fi
28104 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28105     if test $ac_cv_c_bigendian = unknown; then
28106       # See if sys/param.h defines the BYTE_ORDER macro.
28107       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28108 /* end confdefs.h.  */
28109 #include <sys/types.h>
28110              #include <sys/param.h>
28111 
28112 int
28113 main ()
28114 {
28115 #if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
28116                      && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
28117                      && LITTLE_ENDIAN)
28118               bogus endian macros
28119              #endif
28120 
28121   ;
28122   return 0;
28123 }
28124 _ACEOF
28125 if ac_fn_cxx_try_compile "$LINENO"; then :
28126   # It does; now see whether it defined to BIG_ENDIAN or not.
28127          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28128 /* end confdefs.h.  */
28129 #include <sys/types.h>
28130                 #include <sys/param.h>
28131 
28132 int
28133 main ()
28134 {
28135 #if BYTE_ORDER != BIG_ENDIAN
28136                  not big endian
28137                 #endif
28138 
28139   ;
28140   return 0;
28141 }
28142 _ACEOF
28143 if ac_fn_cxx_try_compile "$LINENO"; then :
28144   ac_cv_c_bigendian=yes
28145 else
28146   ac_cv_c_bigendian=no
28147 fi
28148 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28149 fi
28150 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28151     fi
28152     if test $ac_cv_c_bigendian = unknown; then
28153       # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
28154       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28155 /* end confdefs.h.  */
28156 #include <limits.h>
28157 
28158 int
28159 main ()
28160 {
28161 #if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
28162               bogus endian macros
28163              #endif
28164 
28165   ;
28166   return 0;
28167 }
28168 _ACEOF
28169 if ac_fn_cxx_try_compile "$LINENO"; then :
28170   # It does; now see whether it defined to _BIG_ENDIAN or not.
28171          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28172 /* end confdefs.h.  */
28173 #include <limits.h>
28174 
28175 int
28176 main ()
28177 {
28178 #ifndef _BIG_ENDIAN
28179                  not big endian
28180                 #endif
28181 
28182   ;
28183   return 0;
28184 }
28185 _ACEOF
28186 if ac_fn_cxx_try_compile "$LINENO"; then :
28187   ac_cv_c_bigendian=yes
28188 else
28189   ac_cv_c_bigendian=no
28190 fi
28191 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28192 fi
28193 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28194     fi
28195     if test $ac_cv_c_bigendian = unknown; then
28196       # Compile a test program.
28197       if test "$cross_compiling" = yes; then :
28198   # Try to guess by grepping values from an object file.
28199          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28200 /* end confdefs.h.  */
28201 short int ascii_mm[] =
28202                   { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
28203                 short int ascii_ii[] =
28204                   { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
28205                 int use_ascii (int i) {
28206                   return ascii_mm[i] + ascii_ii[i];
28207                 }
28208                 short int ebcdic_ii[] =
28209                   { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
28210                 short int ebcdic_mm[] =
28211                   { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
28212                 int use_ebcdic (int i) {
28213                   return ebcdic_mm[i] + ebcdic_ii[i];
28214                 }
28215                 extern int foo;
28216 
28217 int
28218 main ()
28219 {
28220 return use_ascii (foo) == use_ebcdic (foo);
28221   ;
28222   return 0;
28223 }
28224 _ACEOF
28225 if ac_fn_cxx_try_compile "$LINENO"; then :
28226   if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
28227               ac_cv_c_bigendian=yes
28228             fi
28229             if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
28230               if test "$ac_cv_c_bigendian" = unknown; then
28231                 ac_cv_c_bigendian=no
28232               else
28233                 # finding both strings is unlikely to happen, but who knows?
28234                 ac_cv_c_bigendian=unknown
28235               fi
28236             fi
28237 fi
28238 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28239 else
28240   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28241 /* end confdefs.h.  */
28242 $ac_includes_default
28243 int
28244 main ()
28245 {
28246 
28247              /* Are we little or big endian?  From Harbison&Steele.  */
28248              union
28249              {
28250                long int l;
28251                char c[sizeof (long int)];
28252              } u;
28253              u.l = 1;
28254              return u.c[sizeof (long int) - 1] == 1;
28255 
28256   ;
28257   return 0;
28258 }
28259 _ACEOF
28260 if ac_fn_cxx_try_run "$LINENO"; then :
28261   ac_cv_c_bigendian=no
28262 else
28263   ac_cv_c_bigendian=yes
28264 fi
28265 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
28266   conftest.$ac_objext conftest.beam conftest.$ac_ext
28267 fi
28268 
28269     fi
28270 fi
28271 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
28272 $as_echo "$ac_cv_c_bigendian" >&6; }
28273  case $ac_cv_c_bigendian in #(
28274    yes)
28275      ENDIAN="big";; #(
28276    no)
28277      ENDIAN="little" ;; #(
28278    universal)
28279      ENDIAN="universal_endianness"
28280      ;; #(
28281    *)
28282      ENDIAN="unknown" ;;
28283  esac
28284 
28285 
28286 if test "x$ENDIAN" = xuniversal_endianness; then
28287     as_fn_error $? "Building with both big and little endianness is not supported" "$LINENO" 5
28288 fi
28289 if test "x$ENDIAN" != "x$OPENJDK_TARGET_CPU_ENDIAN"; then
28290     as_fn_error $? "The tested endian in the target ($ENDIAN) differs from the endian expected to be found in the target ($OPENJDK_TARGET_CPU_ENDIAN)" "$LINENO" 5
28291 fi
28292 
28293 
28294 # Configure flags for the tools
28295 
28296 
28297 ###############################################################################
28298 #
28299 # How to compile shared libraries.
28300 #
28301 
28302 if test "x$GCC" = xyes; then
28303     COMPILER_NAME=gcc
28304     PICFLAG="-fPIC"
28305     LIBRARY_PREFIX=lib
28306     SHARED_LIBRARY='lib$1.so'
28307     STATIC_LIBRARY='lib$1.a'
28308     SHARED_LIBRARY_FLAGS="-shared"
28309     SHARED_LIBRARY_SUFFIX='.so'
28310     STATIC_LIBRARY_SUFFIX='.a'
28311     OBJ_SUFFIX='.o'
28312     EXE_SUFFIX=''
28313     SET_SHARED_LIBRARY_NAME='-Xlinker -soname=$1'
28314     SET_SHARED_LIBRARY_MAPFILE='-Xlinker -version-script=$1'
28315     C_FLAG_REORDER=''
28316     CXX_FLAG_REORDER=''
28317     SET_SHARED_LIBRARY_ORIGIN='-Xlinker -z -Xlinker origin -Xlinker -rpath -Xlinker \$$$$ORIGIN$1'
28318     SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker \$$$$ORIGIN$1'
28319     LD="$CC"
28320     LDEXE="$CC"
28321     LDCXX="$CXX"
28322     LDEXECXX="$CXX"
28323     POST_STRIP_CMD="$STRIP -g"
28324 
28325     # Linking is different on MacOSX
28326     if test "x$OPENJDK_TARGET_OS" = xmacosx; then
28327         # Might change in the future to clang.
28328         COMPILER_NAME=gcc
28329         SHARED_LIBRARY='lib$1.dylib'
28330         SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
28331         SHARED_LIBRARY_SUFFIX='.dylib'
28332         EXE_SUFFIX=''
28333         SET_SHARED_LIBRARY_NAME='-Xlinker -install_name -Xlinker @rpath/$1'
28334         SET_SHARED_LIBRARY_MAPFILE=''
28335         SET_SHARED_LIBRARY_ORIGIN='-Xlinker -rpath -Xlinker @loader_path/.'
28336         SET_EXECUTABLE_ORIGIN="$SET_SHARED_LIBRARY_ORIGIN"
28337         POST_STRIP_CMD="$STRIP -S"
28338     fi
28339 else
28340     if test "x$OPENJDK_TARGET_OS" = xsolaris; then
28341         # If it is not gcc, then assume it is the Oracle Solaris Studio Compiler
28342         COMPILER_NAME=ossc
28343         PICFLAG="-KPIC"
28344         LIBRARY_PREFIX=lib
28345         SHARED_LIBRARY='lib$1.so'
28346         STATIC_LIBRARY='lib$1.a'
28347         SHARED_LIBRARY_FLAGS="-G"
28348         SHARED_LIBRARY_SUFFIX='.so'
28349         STATIC_LIBRARY_SUFFIX='.a'
28350         OBJ_SUFFIX='.o'
28351         EXE_SUFFIX=''
28352         SET_SHARED_LIBRARY_NAME=''
28353         SET_SHARED_LIBRARY_MAPFILE='-M$1'
28354         C_FLAG_REORDER='-xF'
28355         CXX_FLAG_REORDER='-xF'
28356         SET_SHARED_LIBRARY_ORIGIN='-R\$$$$ORIGIN$1'
28357         SET_EXECUTABLE_ORIGIN="$SET_SHARED_LIBRARY_ORIGIN"
28358         CFLAGS_JDK="${CFLAGS_JDK} -D__solaris__"
28359         CXXFLAGS_JDK="${CXXFLAGS_JDK} -D__solaris__"
28360         CFLAGS_JDKLIB_EXTRA='-xstrconst'
28361         POST_STRIP_CMD="$STRIP -x"
28362         POST_MCS_CMD="$MCS -d -a \"JDK $FULL_VERSION\""
28363     fi
28364     if test "x$OPENJDK_TARGET_OS" = xwindows; then
28365         # If it is not gcc, then assume it is the MS Visual Studio compiler
28366         COMPILER_NAME=cl
28367         PICFLAG=""
28368         LIBRARY_PREFIX=
28369         SHARED_LIBRARY='$1.dll'
28370         STATIC_LIBRARY='$1.lib'
28371         SHARED_LIBRARY_FLAGS="-LD"
28372         SHARED_LIBRARY_SUFFIX='.dll'
28373         STATIC_LIBRARY_SUFFIX='.lib'
28374         OBJ_SUFFIX='.obj'
28375         EXE_SUFFIX='.exe'
28376         SET_SHARED_LIBRARY_NAME=''
28377         SET_SHARED_LIBRARY_MAPFILE=''
28378         SET_SHARED_LIBRARY_ORIGIN=''
28379         SET_EXECUTABLE_ORIGIN=''
28380     fi
28381 fi
28382 
28383 
28384 
28385 
28386 
28387 
28388 
28389 
28390 
28391 
28392 
28393 
28394 
28395 
28396 
28397 
28398 
28399 
28400 # The (cross) compiler is now configured, we can now test capabilities
28401 # of the target platform.
28402 
28403 
28404 
28405 ###############################################################################
28406 #
28407 # Setup the opt flags for different compilers
28408 # and different operating systems.
28409 #
28410 
28411 #
28412 # NOTE: check for -mstackrealign needs to be below potential addition of -m32
28413 #
28414 if test "x$OPENJDK_TARGET_CPU_BITS" = x32 && test "x$OPENJDK_TARGET_OS" = xmacosx; then
28415     # On 32-bit MacOSX the OS requires C-entry points to be 16 byte aligned.
28416     # While waiting for a better solution, the current workaround is to use -mstackrealign.
28417     CFLAGS="$CFLAGS -mstackrealign"
28418     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if 32-bit compiler supports -mstackrealign" >&5
28419 $as_echo_n "checking if 32-bit compiler supports -mstackrealign... " >&6; }
28420     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28421 /* end confdefs.h.  */
28422 int main() { return 0; }
28423 _ACEOF
28424 if ac_fn_cxx_try_link "$LINENO"; then :
28425 
28426                         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
28427 $as_echo "yes" >&6; }
28428 
28429 else
28430 
28431                         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28432 $as_echo "no" >&6; }
28433                         as_fn_error $? "The selected compiler $CXX does not support -mstackrealign! Try to put another compiler in the path." "$LINENO" 5
28434 
28435 fi
28436 rm -f core conftest.err conftest.$ac_objext \
28437     conftest$ac_exeext conftest.$ac_ext
28438 fi
28439 
28440 C_FLAG_DEPS="-MMD -MF"
28441 CXX_FLAG_DEPS="-MMD -MF"
28442 
28443 case $COMPILER_TYPE in
28444   CC )
28445     D_FLAG="-g"
28446     case $COMPILER_NAME in
28447       gcc )
28448         case $OPENJDK_TARGET_OS in
28449           macosx )
28450             # On MacOSX we optimize for size, something
28451             # we should do for all platforms?
28452             C_O_FLAG_HI="-Os"
28453             C_O_FLAG_NORM="-Os"
28454             C_O_FLAG_NONE=""
28455             ;;
28456           *)
28457             C_O_FLAG_HI="-O3"
28458             C_O_FLAG_NORM="-O2"
28459             C_O_FLAG_NONE="-O0"
28460             CFLAGS_DEBUG_SYMBOLS="-g"
28461             CXXFLAGS_DEBUG_SYMBOLS="-g"
28462             if test "x$OPENJDK_TARGET_CPU_BITS" = "x64" && test "x$DEBUG_LEVEL" = "xfastdebug"; then
28463                CFLAGS_DEBUG_SYMBOLS="-g1"
28464                CXXFLAGS_DEBUG_SYMBOLS="-g1"
28465             fi
28466             ;;
28467         esac
28468         CXX_O_FLAG_HI="$C_O_FLAG_HI"
28469         CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
28470         CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
28471         ;;
28472       ossc )
28473         #
28474         # Forte has different names for this with their C++ compiler...
28475         #
28476         C_FLAG_DEPS="-xMMD -xMF"
28477         CXX_FLAG_DEPS="-xMMD -xMF"
28478 
28479         # Extra options used with HIGHEST
28480         #
28481         # WARNING: Use of OPTIMIZATION_LEVEL=HIGHEST in your Makefile needs to be
28482         #          done with care, there are some assumptions below that need to
28483         #          be understood about the use of pointers, and IEEE behavior.
28484         #
28485         # Use non-standard floating point mode (not IEEE 754)
28486         CC_HIGHEST="$CC_HIGHEST -fns"
28487         # Do some simplification of floating point arithmetic (not IEEE 754)
28488         CC_HIGHEST="$CC_HIGHEST -fsimple"
28489         # Use single precision floating point with 'float'
28490         CC_HIGHEST="$CC_HIGHEST -fsingle"
28491         # Assume memory references via basic pointer types do not alias
28492         #   (Source with excessing pointer casting and data access with mixed
28493         #    pointer types are not recommended)
28494         CC_HIGHEST="$CC_HIGHEST -xalias_level=basic"
28495         # Use intrinsic or inline versions for math/std functions
28496         #   (If you expect perfect errno behavior, do not use this)
28497         CC_HIGHEST="$CC_HIGHEST -xbuiltin=%all"
28498         # Loop data dependency optimizations (need -xO3 or higher)
28499         CC_HIGHEST="$CC_HIGHEST -xdepend"
28500         # Pointer parameters to functions do not overlap
28501         #   (Similar to -xalias_level=basic usage, but less obvious sometimes.
28502         #    If you pass in multiple pointers to the same data, do not use this)
28503         CC_HIGHEST="$CC_HIGHEST -xrestrict"
28504         # Inline some library routines
28505         #   (If you expect perfect errno behavior, do not use this)
28506         CC_HIGHEST="$CC_HIGHEST -xlibmil"
28507         # Use optimized math routines
28508         #   (If you expect perfect errno behavior, do not use this)
28509         #  Can cause undefined external on Solaris 8 X86 on __sincos, removing for now
28510         #CC_HIGHEST="$CC_HIGHEST -xlibmopt"
28511 
28512         if test "x$OPENJDK_TARGET_CPU" = xsparc; then
28513           CFLAGS_JDK="${CFLAGS_JDK} -xmemalign=4s"
28514           CXXFLAGS_JDK="${CXXFLAGS_JDK} -xmemalign=4s"
28515         fi
28516 
28517         case $OPENJDK_TARGET_CPU_ARCH in
28518           x86)
28519             C_O_FLAG_HIGHEST="-xO4 -Wu,-O4~yz $CC_HIGHEST -xregs=no%frameptr"
28520             C_O_FLAG_HI="-xO4 -Wu,-O4~yz -xregs=no%frameptr"
28521             C_O_FLAG_NORM="-xO2 -Wu,-O2~yz -xregs=no%frameptr"
28522             C_O_FLAG_NONE="-xregs=no%frameptr"
28523             CXX_O_FLAG_HIGHEST="-xO4 -Qoption ube -O4~yz $CC_HIGHEST -xregs=no%frameptr"
28524             CXX_O_FLAG_HI="-xO4 -Qoption ube -O4~yz -xregs=no%frameptr"
28525             CXX_O_FLAG_NORM="-xO2 -Qoption ube -O2~yz -xregs=no%frameptr"
28526             CXX_O_FLAG_NONE="-xregs=no%frameptr"
28527             if test "x$OPENJDK_TARGET_CPU" = xx86; then
28528                C_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST -xchip=pentium"
28529                CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HIGHEST -xchip=pentium"
28530             fi
28531             ;;
28532           sparc)
28533             CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
28534             CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
28535             C_O_FLAG_HIGHEST="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
28536             C_O_FLAG_HI="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0"
28537             C_O_FLAG_NORM="-xO2 -Wc,-Qrm-s -Wc,-Qiselect-T0"
28538             C_O_FLAG_NONE=""
28539             CXX_O_FLAG_HIGHEST="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
28540             CXX_O_FLAG_HI="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
28541             CXX_O_FLAG_NORM="-xO2 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
28542             CXX_O_FLAG_NONE=""
28543             ;;
28544         esac
28545 
28546     CFLAGS_DEBUG_SYMBOLS="-g -xs"
28547     CXXFLAGS_DEBUG_SYMBOLS="-g0 -xs"
28548     esac
28549     ;;
28550   CL )
28551     D_FLAG=
28552     C_O_FLAG_HIGHEST="-O2"
28553     C_O_FLAG_HI="-O1"
28554     C_O_FLAG_NORM="-O1"
28555     C_O_FLAG_NONE="-Od"
28556     CXX_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST"
28557     CXX_O_FLAG_HI="$C_O_FLAG_HI"
28558     CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
28559     CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
28560     ;;
28561 esac
28562 
28563 if test -z "$C_O_FLAG_HIGHEST"; then
28564    C_O_FLAG_HIGHEST="$C_O_FLAG_HI"
28565 fi
28566 
28567 if test -z "$CXX_O_FLAG_HIGHEST"; then
28568    CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HI"
28569 fi
28570 
28571 
28572 
28573 
28574 
28575 
28576 
28577 
28578 
28579 
28580 
28581 
28582 
28583 
28584 if test "x$CFLAGS" != "x${ADDED_CFLAGS}"; then
28585    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&5
28586 $as_echo "$as_me: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&2;}
28587 fi
28588 
28589 if test "x$CXXFLAGS" != "x${ADDED_CXXFLAGS}"; then
28590    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&5
28591 $as_echo "$as_me: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&2;}
28592 fi
28593 
28594 if test "x$LDFLAGS" != "x${ADDED_LDFLAGS}"; then
28595    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&5
28596 $as_echo "$as_me: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&2;}
28597 fi
28598 
28599 
28600 # Check whether --with-extra-cflags was given.
28601 if test "${with_extra_cflags+set}" = set; then :
28602   withval=$with_extra_cflags;
28603 fi
28604 
28605 
28606 
28607 # Check whether --with-extra-cxxflags was given.
28608 if test "${with_extra_cxxflags+set}" = set; then :
28609   withval=$with_extra_cxxflags;
28610 fi
28611 
28612 
28613 
28614 # Check whether --with-extra-ldflags was given.
28615 if test "${with_extra_ldflags+set}" = set; then :
28616   withval=$with_extra_ldflags;
28617 fi
28618 
28619 
28620 CFLAGS_JDK="${CFLAGS_JDK} $with_extra_cflags"
28621 CXXFLAGS_JDK="${CXXFLAGS_JDK} $with_extra_cxxflags"
28622 LDFLAGS_JDK="${LDFLAGS_JDK} $with_extra_ldflags"
28623 
28624 # Hotspot needs these set in their legacy form
28625 LEGACY_EXTRA_CFLAGS=$with_extra_cflags
28626 LEGACY_EXTRA_CXXFLAGS=$with_extra_cxxflags
28627 LEGACY_EXTRA_LDFLAGS=$with_extra_ldflags
28628 
28629 
28630 
28631 
28632 
28633 ###############################################################################
28634 #
28635 # Now setup the CFLAGS and LDFLAGS for the JDK build.
28636 # Later we will also have CFLAGS and LDFLAGS for the hotspot subrepo build.
28637 #
28638 case $COMPILER_NAME in
28639       gcc )
28640           CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -W -Wall -Wno-unused -Wno-parentheses \
28641                           -pipe \
28642                           -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
28643           case $OPENJDK_TARGET_CPU_ARCH in
28644           arm )
28645             # on arm we don't prevent gcc to omit frame pointer but do prevent strict aliasing
28646             CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
28647           ;;
28648           ppc )
28649             # on ppc we don't prevent gcc to omit frame pointer nor strict-aliasing
28650           ;;
28651           * )
28652             CCXXFLAGS_JDK="$CCXXFLAGS_JDK -fno-omit-frame-pointer"
28653             CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
28654           ;;
28655           esac
28656           ;;
28657       ossc )
28658           CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS"
28659           case $OPENJDK_TARGET_CPU_ARCH in
28660           x86 )
28661             CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DcpuIntel -Di586 -D$OPENJDK_TARGET_CPU_LEGACY_LIB"
28662             CFLAGS_JDK="$CFLAGS_JDK -erroff=E_BAD_PRAGMA_PACK_VALUE"
28663           ;;
28664           esac
28665 
28666           CFLAGS_JDK="$CFLAGS_JDK -xc99=%none -xCC -errshort=tags -Xa -v -mt -W0,-noglobal"
28667           CXXFLAGS_JDK="$CXXFLAGS_JDK -errtags=yes +w -mt -features=no%except -DCC_NOEX -norunpath -xnolib"
28668 
28669           LDFLAGS_JDK="$LDFLAGS_JDK -z defs -xildoff -ztext"
28670           LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK -norunpath -xnolib"
28671           ;;
28672       cl )
28673           CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -Zi -MD -Zc:wchar_t- -W3 -wd4800 \
28674                -D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB -DWIN32_LEAN_AND_MEAN \
28675                -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \
28676                -DWIN32 -DIAL"
28677           case $OPENJDK_TARGET_CPU in
28678               x86 )
28679                   CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_X86_ -Dx86"
28680                   ;;
28681               x86_64 )
28682                   CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_AMD64_ -Damd64"
28683                   ;;
28684           esac
28685           ;;
28686 esac
28687 
28688 ###############################################################################
28689 
28690 CCXXFLAGS_JDK="$CCXXFLAGS_JDK $ADD_LP64"
28691 
28692 # The package path is used only on macosx?
28693 PACKAGE_PATH=/opt/local
28694 
28695 
28696 if test "x$OPENJDK_TARGET_CPU_ENDIAN" = xlittle; then
28697     # The macro _LITTLE_ENDIAN needs to be defined the same to avoid the
28698     #   Sun C compiler warning message: warning: macro redefined: _LITTLE_ENDIAN
28699     #   (The Solaris X86 system defines this in file /usr/include/sys/isa_defs.h).
28700     #   Note: -Dmacro         is the same as    #define macro 1
28701     #         -Dmacro=      is the same as    #define macro
28702     if test "x$OPENJDK_TARGET_OS" = xsolaris; then
28703         CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_LITTLE_ENDIAN="
28704     else
28705         CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_LITTLE_ENDIAN"
28706     fi
28707 else
28708     CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_BIG_ENDIAN"
28709 fi
28710 if test "x$OPENJDK_TARGET_OS" = xlinux; then
28711     CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DLINUX"
28712 fi
28713 if test "x$OPENJDK_TARGET_OS" = xwindows; then
28714     CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DWINDOWS"
28715 fi
28716 if test "x$OPENJDK_TARGET_OS" = xsolaris; then
28717     CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DSOLARIS"
28718 fi
28719 if test "x$OPENJDK_TARGET_OS" = xmacosx; then
28720     CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DMACOSX -D_ALLBSD_SOURCE"
28721     # Setting these parameters makes it an error to link to macosx APIs that are
28722     # newer than the given OS version and makes the linked binaries compatible even
28723     # if built on a newer version of the OS.
28724     # The expected format is X.Y.Z
28725     MACOSX_VERSION_MIN=10.7.0
28726 
28727     # The macro takes the version with no dots, ex: 1070
28728     # Let the flags variables get resolved in make for easier override on make
28729     # command line.
28730     CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DMAC_OS_X_VERSION_MAX_ALLOWED=\$(subst .,,\$(MACOSX_VERSION_MIN)) -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
28731     LDFLAGS_JDK="$LDFLAGS_JDK -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
28732 fi
28733 if test "x$OPENJDK_TARGET_OS" = xbsd; then
28734     CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DBSD -D_ALLBSD_SOURCE"
28735 fi
28736 if test "x$DEBUG_LEVEL" = xrelease; then
28737     CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DNDEBUG"
28738     if test "x$OPENJDK_TARGET_OS" = xsolaris; then
28739         CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DTRIMMED"
28740     fi
28741 else
28742     CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DDEBUG"
28743 fi
28744 
28745 CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DARCH='\"$OPENJDK_TARGET_CPU_LEGACY\"' -D$OPENJDK_TARGET_CPU_LEGACY"
28746 CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DRELEASE='\"$RELEASE\"'"
28747 
28748 CCXXFLAGS_JDK="$CCXXFLAGS_JDK \
28749         -I${JDK_OUTPUTDIR}/include \
28750         -I${JDK_OUTPUTDIR}/include/$OPENJDK_TARGET_OS \
28751         -I${JDK_TOPDIR}/src/share/javavm/export \
28752         -I${JDK_TOPDIR}/src/$OPENJDK_TARGET_OS_API_DIR/javavm/export \
28753         -I${JDK_TOPDIR}/src/share/native/common \
28754         -I${JDK_TOPDIR}/src/$OPENJDK_TARGET_OS_API_DIR/native/common"
28755 
28756 # The shared libraries are compiled using the picflag.
28757 CFLAGS_JDKLIB="$CCXXFLAGS_JDK $CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
28758 CXXFLAGS_JDKLIB="$CCXXFLAGS_JDK $CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA "
28759 
28760 # Executable flags
28761 CFLAGS_JDKEXE="$CCXXFLAGS_JDK $CFLAGS_JDK"
28762 CXXFLAGS_JDKEXE="$CCXXFLAGS_JDK $CXXFLAGS_JDK"
28763 
28764 # Now this is odd. The JDK native libraries have to link against libjvm.so
28765 # On 32-bit machines there is normally two distinct libjvm.so:s, client and server.
28766 # Which should we link to? Are we lucky enough that the binary api to the libjvm.so library
28767 # is identical for client and server? Yes. Which is picked at runtime (client or server)?
28768 # Neither, since the chosen libjvm.so has already been loaded by the launcher, all the following
28769 # libraries will link to whatever is in memory. Yuck.
28770 #
28771 # Thus we offer the compiler to find libjvm.so first in server then in client. It works. Ugh.
28772 if test "x$COMPILER_NAME" = xcl; then
28773     LDFLAGS_JDK="$LDFLAGS_JDK -nologo -opt:ref -incremental:no"
28774     if test "x$OPENJDK_TARGET_CPU" = xx86; then
28775         LDFLAGS_JDK="$LDFLAGS_JDK -safeseh"
28776     fi
28777     # TODO: make -debug optional "--disable-full-debug-symbols"
28778     LDFLAGS_JDK="$LDFLAGS_JDK -debug"
28779     LDFLAGS_JDKLIB="${LDFLAGS_JDK} -dll -libpath:${JDK_OUTPUTDIR}/lib"
28780     LDFLAGS_JDKLIB_SUFFIX=""
28781     if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
28782         LDFLAGS_STACK_SIZE=1048576
28783     else
28784         LDFLAGS_STACK_SIZE=327680
28785     fi
28786     LDFLAGS_JDKEXE="${LDFLAGS_JDK} /STACK:$LDFLAGS_STACK_SIZE"
28787 else
28788     if test "x$COMPILER_NAME" = xgcc; then
28789         # If this is a --hash-style=gnu system, use --hash-style=both, why?
28790         HAS_GNU_HASH=`$CC -dumpspecs 2>/dev/null | $GREP 'hash-style=gnu'`
28791         if test -n "$HAS_GNU_HASH"; then
28792             LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker --hash-style=both "
28793         fi
28794         if test "x$OPENJDK_TARGET_OS" = xlinux; then
28795           # And since we now know that the linker is gnu, then add -z defs, to forbid
28796           # undefined symbols in object files.
28797           LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -z -Xlinker defs"
28798           if test "x$DEBUG_LEVEL" = "xrelease"; then
28799               # When building release libraries, tell the linker optimize them.
28800               # Should this be supplied to the OSS linker as well?
28801               LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -O1"
28802           fi
28803         fi
28804     fi
28805     LDFLAGS_JDKLIB="${LDFLAGS_JDK} $SHARED_LIBRARY_FLAGS \
28806                     -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}"
28807 
28808     # On some platforms (mac) the linker warns about non existing -L dirs.
28809     # Add server first if available. Linking aginst client does not always produce the same results.
28810     # Only add client dir if client is being built. Add minimal (note not minimal1) if only building minimal1.
28811     # Default to server for other variants.
28812     if test "x$JVM_VARIANT_SERVER" = xtrue; then
28813         LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/server"
28814     elif test "x$JVM_VARIANT_CLIENT" = xtrue; then
28815         LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/client"
28816     elif test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
28817         LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/minimal"
28818     else
28819         LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/server"
28820     fi
28821 
28822     LDFLAGS_JDKLIB_SUFFIX="-ljava -ljvm"
28823     if test "x$COMPILER_NAME" = xossc; then
28824         LDFLAGS_JDKLIB_SUFFIX="$LDFLAGS_JDKLIB_SUFFIX -lc"
28825     fi
28826 
28827     LDFLAGS_JDKEXE="${LDFLAGS_JDK}"
28828     if test "x$OPENJDK_TARGET_OS" = xlinux; then
28829         LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE -Xlinker --allow-shlib-undefined"
28830     fi
28831 fi
28832 
28833 # Adjust flags according to debug level.
28834 case $DEBUG_LEVEL in
28835       fastdebug )
28836               CFLAGS="$CFLAGS $D_FLAG"
28837               JAVAC_FLAGS="$JAVAC_FLAGS -g"
28838               ;;
28839       slowdebug )
28840               CFLAGS="$CFLAGS $D_FLAG"
28841               C_O_FLAG_HI="$C_O_FLAG_NONE"
28842               C_O_FLAG_NORM="$C_O_FLAG_NONE"
28843               CXX_O_FLAG_HI="$CXX_O_FLAG_NONE"
28844               CXX_O_FLAG_NORM="$CXX_O_FLAG_NONE"
28845               JAVAC_FLAGS="$JAVAC_FLAGS -g"
28846               ;;
28847 esac
28848 
28849 
28850 
28851 
28852 
28853 
28854 
28855 
28856 
28857 
28858 
28859 
28860 
28861 
28862 
28863 # Setup debug symbols (need objcopy from the toolchain for that)
28864 
28865 #
28866 # ENABLE_DEBUG_SYMBOLS
28867 # This must be done after the toolchain is setup, since we're looking at objcopy.
28868 #
28869 # Check whether --enable-debug-symbols was given.
28870 if test "${enable_debug_symbols+set}" = set; then :
28871   enableval=$enable_debug_symbols;
28872 fi
28873 
28874 
28875 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should generate debug symbols" >&5
28876 $as_echo_n "checking if we should generate debug symbols... " >&6; }
28877 
28878 if test "x$enable_debug_symbols" = "xyes" && test "x$OBJCOPY" = x; then
28879    # explicit enabling of enable-debug-symbols and can't find objcopy
28880    #   this is an error
28881    as_fn_error $? "Unable to find objcopy, cannot enable debug-symbols" "$LINENO" 5
28882 fi
28883 
28884 if test "x$enable_debug_symbols" = "xyes"; then
28885   ENABLE_DEBUG_SYMBOLS=true
28886 elif test "x$enable_debug_symbols" = "xno"; then
28887   ENABLE_DEBUG_SYMBOLS=false
28888 else
28889   # default on macosx is false
28890   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
28891     ENABLE_DEBUG_SYMBOLS=false
28892   # Default is on if objcopy is found, otherwise off
28893   elif test "x$OBJCOPY" != x || test "x$OPENJDK_TARGET_OS" = xwindows; then
28894     ENABLE_DEBUG_SYMBOLS=true
28895   else
28896     ENABLE_DEBUG_SYMBOLS=false
28897   fi
28898 fi
28899 
28900 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_DEBUG_SYMBOLS" >&5
28901 $as_echo "$ENABLE_DEBUG_SYMBOLS" >&6; }
28902 
28903 #
28904 # ZIP_DEBUGINFO_FILES
28905 #
28906 # Check whether --enable-zip-debug-info was given.
28907 if test "${enable_zip_debug_info+set}" = set; then :
28908   enableval=$enable_zip_debug_info;
28909 fi
28910 
28911 
28912 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should zip debug-info files" >&5
28913 $as_echo_n "checking if we should zip debug-info files... " >&6; }
28914 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${enable_zip_debug_info}" >&5
28915 $as_echo "${enable_zip_debug_info}" >&6; }
28916 
28917 if test "x${enable_zip_debug_info}" = "xno"; then
28918    ZIP_DEBUGINFO_FILES=false
28919 else
28920    ZIP_DEBUGINFO_FILES=true
28921 fi
28922 
28923 
28924 
28925 
28926 
28927 
28928 
28929 ###############################################################################
28930 #
28931 # Check dependencies for external and internal libraries.
28932 #
28933 ###############################################################################
28934 
28935 
28936 
28937 ###############################################################################
28938 #
28939 # OS specific settings that we never will need to probe.
28940 #
28941 if test "x$OPENJDK_TARGET_OS" = xlinux; then
28942     { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Linux?" >&5
28943 $as_echo_n "checking what is not needed on Linux?... " >&6; }
28944     PULSE_NOT_NEEDED=yes
28945     { $as_echo "$as_me:${as_lineno-$LINENO}: result: pulse" >&5
28946 $as_echo "pulse" >&6; }
28947 fi
28948 
28949 if test "x$OPENJDK_TARGET_OS" = xsolaris; then
28950     { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Solaris?" >&5
28951 $as_echo_n "checking what is not needed on Solaris?... " >&6; }
28952     ALSA_NOT_NEEDED=yes
28953     PULSE_NOT_NEEDED=yes
28954     { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse" >&5
28955 $as_echo "alsa pulse" >&6; }
28956 fi
28957 
28958 if test "x$OPENJDK_TARGET_OS" = xwindows; then
28959     { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Windows?" >&5
28960 $as_echo_n "checking what is not needed on Windows?... " >&6; }
28961     CUPS_NOT_NEEDED=yes
28962     ALSA_NOT_NEEDED=yes
28963     PULSE_NOT_NEEDED=yes
28964     X11_NOT_NEEDED=yes
28965     { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa cups pulse x11" >&5
28966 $as_echo "alsa cups pulse x11" >&6; }
28967 fi
28968 
28969 if test "x$OPENJDK_TARGET_OS" = xmacosx; then
28970     { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on MacOSX?" >&5
28971 $as_echo_n "checking what is not needed on MacOSX?... " >&6; }
28972     ALSA_NOT_NEEDED=yes
28973     PULSE_NOT_NEEDED=yes
28974     X11_NOT_NEEDED=yes
28975     FREETYPE2_NOT_NEEDED=yes
28976     # If the java runtime framework is disabled, then we need X11.
28977     # This will be adjusted below.
28978     { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse x11" >&5
28979 $as_echo "alsa pulse x11" >&6; }
28980 fi
28981 
28982 if test "x$OPENJDK_TARGET_OS" = xbsd; then
28983     { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on bsd?" >&5
28984 $as_echo_n "checking what is not needed on bsd?... " >&6; }
28985     ALSA_NOT_NEEDED=yes
28986     { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa" >&5
28987 $as_echo "alsa" >&6; }
28988 fi
28989 
28990 if test "x$OPENJDK" = "xfalse"; then
28991     FREETYPE2_NOT_NEEDED=yes
28992 fi
28993 
28994 if test "x$SUPPORT_HEADFUL" = xno; then
28995     X11_NOT_NEEDED=yes
28996 fi
28997 
28998 ###############################################################################
28999 #
29000 # Check for MacOSX support for OpenJDK. If this exists, try to build a JVM
29001 # that uses this API.
29002 #
29003 # Check whether --enable-macosx-runtime-support was given.
29004 if test "${enable_macosx_runtime_support+set}" = set; then :
29005   enableval=$enable_macosx_runtime_support; MACOSX_RUNTIME_SUPPORT="${enableval}"
29006 else
29007   MACOSX_RUNTIME_SUPPORT="no"
29008 fi
29009 
29010 
29011 USE_MACOSX_RUNTIME_SUPPORT=no
29012 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for explicit Java runtime support in the OS" >&5
29013 $as_echo_n "checking for explicit Java runtime support in the OS... " >&6; }
29014 if test -f /System/Library/Frameworks/JavaVM.framework/Frameworks/JavaRuntimeSupport.framework/Headers/JavaRuntimeSupport.h; then
29015     if test "x$MACOSX_RUNTIME_SUPPORT" != xno; then
29016         MACOSX_RUNTIME_SUPPORT=yes
29017         USE_MACOSX_RUNTIME_SUPPORT=yes
29018         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, does not need alsa freetype2 pulse and X11" >&5
29019 $as_echo "yes, does not need alsa freetype2 pulse and X11" >&6; }
29020     else
29021         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, but explicitly disabled." >&5
29022 $as_echo "yes, but explicitly disabled." >&6; }
29023     fi
29024 else
29025     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29026 $as_echo "no" >&6; }
29027 fi
29028 
29029 if test "x$OPENJDK_TARGET_OS" = xmacosx && test "x$USE_MACOSX_RUNTIME_SUPPORT" = xno; then
29030     { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on an X11 build on MacOSX?" >&5
29031 $as_echo_n "checking what is not needed on an X11 build on MacOSX?... " >&6; }
29032     X11_NOT_NEEDED=
29033     FREETYPE2_NOT_NEEDED=
29034     { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse" >&5
29035 $as_echo "alsa pulse" >&6; }
29036 fi
29037 
29038 
29039 
29040 
29041 ###############################################################################
29042 #
29043 # Check for X Windows
29044 #
29045 
29046 # Check if the user has specified sysroot, but not --x-includes or --x-libraries.
29047 # Make a simple check for the libraries at the sysroot, and setup --x-includes and
29048 # --x-libraries for the sysroot, if that seems to be correct.
29049 if test "x$SYS_ROOT" != "x/"; then
29050   if test "x$x_includes" = xNONE; then
29051     if test -f "$SYS_ROOT/usr/X11R6/include/X11/Xlib.h"; then
29052       x_includes="$SYS_ROOT/usr/X11R6/include"
29053     fi
29054   fi
29055   if test "x$x_libraries" = xNONE; then
29056     if test -f "$SYS_ROOT/usr/X11R6/lib/libX11.so"; then
29057       x_libraries="$SYS_ROOT/usr/X11R6/lib"
29058     fi
29059   fi
29060 fi
29061 
29062 # Now let autoconf do it's magic
29063 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
29064 $as_echo_n "checking for X... " >&6; }
29065 
29066 
29067 # Check whether --with-x was given.
29068 if test "${with_x+set}" = set; then :
29069   withval=$with_x;
29070 fi
29071 
29072 # $have_x is `yes', `no', `disabled', or empty when we do not yet know.
29073 if test "x$with_x" = xno; then
29074   # The user explicitly disabled X.
29075   have_x=disabled
29076 else
29077   case $x_includes,$x_libraries in #(
29078     *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5;; #(
29079     *,NONE | NONE,*) if ${ac_cv_have_x+:} false; then :
29080   $as_echo_n "(cached) " >&6
29081 else
29082   # One or both of the vars are not set, and there is no cached value.
29083 ac_x_includes=no ac_x_libraries=no
29084 rm -f -r conftest.dir
29085 if mkdir conftest.dir; then
29086   cd conftest.dir
29087   cat >Imakefile <<'_ACEOF'
29088 incroot:
29089         @echo incroot='${INCROOT}'
29090 usrlibdir:
29091         @echo usrlibdir='${USRLIBDIR}'
29092 libdir:
29093         @echo libdir='${LIBDIR}'
29094 _ACEOF
29095   if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
29096     # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
29097     for ac_var in incroot usrlibdir libdir; do
29098       eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
29099     done
29100     # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
29101     for ac_extension in a so sl dylib la dll; do
29102       if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
29103          test -f "$ac_im_libdir/libX11.$ac_extension"; then
29104         ac_im_usrlibdir=$ac_im_libdir; break
29105       fi
29106     done
29107     # Screen out bogus values from the imake configuration.  They are
29108     # bogus both because they are the default anyway, and because
29109     # using them would break gcc on systems where it needs fixed includes.
29110     case $ac_im_incroot in
29111         /usr/include) ac_x_includes= ;;
29112         *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
29113     esac
29114     case $ac_im_usrlibdir in
29115         /usr/lib | /usr/lib64 | /lib | /lib64) ;;
29116         *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
29117     esac
29118   fi
29119   cd ..
29120   rm -f -r conftest.dir
29121 fi
29122 
29123 # Standard set of common directories for X headers.
29124 # Check X11 before X11Rn because it is often a symlink to the current release.
29125 ac_x_header_dirs='
29126 /usr/X11/include
29127 /usr/X11R7/include
29128 /usr/X11R6/include
29129 /usr/X11R5/include
29130 /usr/X11R4/include
29131 
29132 /usr/include/X11
29133 /usr/include/X11R7
29134 /usr/include/X11R6
29135 /usr/include/X11R5
29136 /usr/include/X11R4
29137 
29138 /usr/local/X11/include
29139 /usr/local/X11R7/include
29140 /usr/local/X11R6/include
29141 /usr/local/X11R5/include
29142 /usr/local/X11R4/include
29143 
29144 /usr/local/include/X11
29145 /usr/local/include/X11R7
29146 /usr/local/include/X11R6
29147 /usr/local/include/X11R5
29148 /usr/local/include/X11R4
29149 
29150 /usr/X386/include
29151 /usr/x386/include
29152 /usr/XFree86/include/X11
29153 
29154 /usr/include
29155 /usr/local/include
29156 /usr/unsupported/include
29157 /usr/athena/include
29158 /usr/local/x11r5/include
29159 /usr/lpp/Xamples/include
29160 
29161 /usr/openwin/include
29162 /usr/openwin/share/include'
29163 
29164 if test "$ac_x_includes" = no; then
29165   # Guess where to find include files, by looking for Xlib.h.
29166   # First, try using that file with no special directory specified.
29167   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29168 /* end confdefs.h.  */
29169 #include <X11/Xlib.h>
29170 _ACEOF
29171 if ac_fn_cxx_try_cpp "$LINENO"; then :
29172   # We can compile using X headers with no special include directory.
29173 ac_x_includes=
29174 else
29175   for ac_dir in $ac_x_header_dirs; do
29176   if test -r "$ac_dir/X11/Xlib.h"; then
29177     ac_x_includes=$ac_dir
29178     break
29179   fi
29180 done
29181 fi
29182 rm -f conftest.err conftest.i conftest.$ac_ext
29183 fi # $ac_x_includes = no
29184 
29185 if test "$ac_x_libraries" = no; then
29186   # Check for the libraries.
29187   # See if we find them without any special options.
29188   # Don't add to $LIBS permanently.
29189   ac_save_LIBS=$LIBS
29190   LIBS="-lX11 $LIBS"
29191   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29192 /* end confdefs.h.  */
29193 #include <X11/Xlib.h>
29194 int
29195 main ()
29196 {
29197 XrmInitialize ()
29198   ;
29199   return 0;
29200 }
29201 _ACEOF
29202 if ac_fn_cxx_try_link "$LINENO"; then :
29203   LIBS=$ac_save_LIBS
29204 # We can link X programs with no special library path.
29205 ac_x_libraries=
29206 else
29207   LIBS=$ac_save_LIBS
29208 for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
29209 do
29210   # Don't even attempt the hair of trying to link an X program!
29211   for ac_extension in a so sl dylib la dll; do
29212     if test -r "$ac_dir/libX11.$ac_extension"; then
29213       ac_x_libraries=$ac_dir
29214       break 2
29215     fi
29216   done
29217 done
29218 fi
29219 rm -f core conftest.err conftest.$ac_objext \
29220     conftest$ac_exeext conftest.$ac_ext
29221 fi # $ac_x_libraries = no
29222 
29223 case $ac_x_includes,$ac_x_libraries in #(
29224   no,* | *,no | *\'*)
29225     # Didn't find X, or a directory has "'" in its name.
29226     ac_cv_have_x="have_x=no";; #(
29227   *)
29228     # Record where we found X for the cache.
29229     ac_cv_have_x="have_x=yes\
29230         ac_x_includes='$ac_x_includes'\
29231         ac_x_libraries='$ac_x_libraries'"
29232 esac
29233 fi
29234 ;; #(
29235     *) have_x=yes;;
29236   esac
29237   eval "$ac_cv_have_x"
29238 fi # $with_x != no
29239 
29240 if test "$have_x" != yes; then
29241   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
29242 $as_echo "$have_x" >&6; }
29243   no_x=yes
29244 else
29245   # If each of the values was on the command line, it overrides each guess.
29246   test "x$x_includes" = xNONE && x_includes=$ac_x_includes
29247   test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
29248   # Update the cache value to reflect the command line values.
29249   ac_cv_have_x="have_x=yes\
29250         ac_x_includes='$x_includes'\
29251         ac_x_libraries='$x_libraries'"
29252   { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
29253 $as_echo "libraries $x_libraries, headers $x_includes" >&6; }
29254 fi
29255 
29256 if test "$no_x" = yes; then
29257   # Not all programs may use this symbol, but it does not hurt to define it.
29258 
29259 $as_echo "#define X_DISPLAY_MISSING 1" >>confdefs.h
29260 
29261   X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
29262 else
29263   if test -n "$x_includes"; then
29264     X_CFLAGS="$X_CFLAGS -I$x_includes"
29265   fi
29266 
29267   # It would also be nice to do this for all -L options, not just this one.
29268   if test -n "$x_libraries"; then
29269     X_LIBS="$X_LIBS -L$x_libraries"
29270     # For Solaris; some versions of Sun CC require a space after -R and
29271     # others require no space.  Words are not sufficient . . . .
29272     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -R must be followed by a space" >&5
29273 $as_echo_n "checking whether -R must be followed by a space... " >&6; }
29274     ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
29275     ac_xsave_cxx_werror_flag=$ac_cxx_werror_flag
29276     ac_cxx_werror_flag=yes
29277     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29278 /* end confdefs.h.  */
29279 
29280 int
29281 main ()
29282 {
29283 
29284   ;
29285   return 0;
29286 }
29287 _ACEOF
29288 if ac_fn_cxx_try_link "$LINENO"; then :
29289   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29290 $as_echo "no" >&6; }
29291        X_LIBS="$X_LIBS -R$x_libraries"
29292 else
29293   LIBS="$ac_xsave_LIBS -R $x_libraries"
29294        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29295 /* end confdefs.h.  */
29296 
29297 int
29298 main ()
29299 {
29300 
29301   ;
29302   return 0;
29303 }
29304 _ACEOF
29305 if ac_fn_cxx_try_link "$LINENO"; then :
29306   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
29307 $as_echo "yes" >&6; }
29308           X_LIBS="$X_LIBS -R $x_libraries"
29309 else
29310   { $as_echo "$as_me:${as_lineno-$LINENO}: result: neither works" >&5
29311 $as_echo "neither works" >&6; }
29312 fi
29313 rm -f core conftest.err conftest.$ac_objext \
29314     conftest$ac_exeext conftest.$ac_ext
29315 fi
29316 rm -f core conftest.err conftest.$ac_objext \
29317     conftest$ac_exeext conftest.$ac_ext
29318     ac_cxx_werror_flag=$ac_xsave_cxx_werror_flag
29319     LIBS=$ac_xsave_LIBS
29320   fi
29321 
29322   # Check for system-dependent libraries X programs must link with.
29323   # Do this before checking for the system-independent R6 libraries
29324   # (-lICE), since we may need -lsocket or whatever for X linking.
29325 
29326   if test "$ISC" = yes; then
29327     X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
29328   else
29329     # Martyn Johnson says this is needed for Ultrix, if the X
29330     # libraries were built with DECnet support.  And Karl Berry says
29331     # the Alpha needs dnet_stub (dnet does not exist).
29332     ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
29333     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29334 /* end confdefs.h.  */
29335 
29336 /* Override any GCC internal prototype to avoid an error.
29337    Use char because int might match the return type of a GCC
29338    builtin and then its argument prototype would still apply.  */
29339 #ifdef __cplusplus
29340 extern "C"
29341 #endif
29342 char XOpenDisplay ();
29343 int
29344 main ()
29345 {
29346 return XOpenDisplay ();
29347   ;
29348   return 0;
29349 }
29350 _ACEOF
29351 if ac_fn_cxx_try_link "$LINENO"; then :
29352 
29353 else
29354   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5
29355 $as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; }
29356 if ${ac_cv_lib_dnet_dnet_ntoa+:} false; then :
29357   $as_echo_n "(cached) " >&6
29358 else
29359   ac_check_lib_save_LIBS=$LIBS
29360 LIBS="-ldnet  $LIBS"
29361 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29362 /* end confdefs.h.  */
29363 
29364 /* Override any GCC internal prototype to avoid an error.
29365    Use char because int might match the return type of a GCC
29366    builtin and then its argument prototype would still apply.  */
29367 #ifdef __cplusplus
29368 extern "C"
29369 #endif
29370 char dnet_ntoa ();
29371 int
29372 main ()
29373 {
29374 return dnet_ntoa ();
29375   ;
29376   return 0;
29377 }
29378 _ACEOF
29379 if ac_fn_cxx_try_link "$LINENO"; then :
29380   ac_cv_lib_dnet_dnet_ntoa=yes
29381 else
29382   ac_cv_lib_dnet_dnet_ntoa=no
29383 fi
29384 rm -f core conftest.err conftest.$ac_objext \
29385     conftest$ac_exeext conftest.$ac_ext
29386 LIBS=$ac_check_lib_save_LIBS
29387 fi
29388 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
29389 $as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; }
29390 if test "x$ac_cv_lib_dnet_dnet_ntoa" = xyes; then :
29391   X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
29392 fi
29393 
29394     if test $ac_cv_lib_dnet_dnet_ntoa = no; then
29395       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet_stub" >&5
29396 $as_echo_n "checking for dnet_ntoa in -ldnet_stub... " >&6; }
29397 if ${ac_cv_lib_dnet_stub_dnet_ntoa+:} false; then :
29398   $as_echo_n "(cached) " >&6
29399 else
29400   ac_check_lib_save_LIBS=$LIBS
29401 LIBS="-ldnet_stub  $LIBS"
29402 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29403 /* end confdefs.h.  */
29404 
29405 /* Override any GCC internal prototype to avoid an error.
29406    Use char because int might match the return type of a GCC
29407    builtin and then its argument prototype would still apply.  */
29408 #ifdef __cplusplus
29409 extern "C"
29410 #endif
29411 char dnet_ntoa ();
29412 int
29413 main ()
29414 {
29415 return dnet_ntoa ();
29416   ;
29417   return 0;
29418 }
29419 _ACEOF
29420 if ac_fn_cxx_try_link "$LINENO"; then :
29421   ac_cv_lib_dnet_stub_dnet_ntoa=yes
29422 else
29423   ac_cv_lib_dnet_stub_dnet_ntoa=no
29424 fi
29425 rm -f core conftest.err conftest.$ac_objext \
29426     conftest$ac_exeext conftest.$ac_ext
29427 LIBS=$ac_check_lib_save_LIBS
29428 fi
29429 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
29430 $as_echo "$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; }
29431 if test "x$ac_cv_lib_dnet_stub_dnet_ntoa" = xyes; then :
29432   X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
29433 fi
29434 
29435     fi
29436 fi
29437 rm -f core conftest.err conftest.$ac_objext \
29438     conftest$ac_exeext conftest.$ac_ext
29439     LIBS="$ac_xsave_LIBS"
29440 
29441     # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
29442     # to get the SysV transport functions.
29443     # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
29444     # needs -lnsl.
29445     # The nsl library prevents programs from opening the X display
29446     # on Irix 5.2, according to T.E. Dickey.
29447     # The functions gethostbyname, getservbyname, and inet_addr are
29448     # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
29449     ac_fn_cxx_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
29450 if test "x$ac_cv_func_gethostbyname" = xyes; then :
29451 
29452 fi
29453 
29454     if test $ac_cv_func_gethostbyname = no; then
29455       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5
29456 $as_echo_n "checking for gethostbyname in -lnsl... " >&6; }
29457 if ${ac_cv_lib_nsl_gethostbyname+:} false; then :
29458   $as_echo_n "(cached) " >&6
29459 else
29460   ac_check_lib_save_LIBS=$LIBS
29461 LIBS="-lnsl  $LIBS"
29462 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29463 /* end confdefs.h.  */
29464 
29465 /* Override any GCC internal prototype to avoid an error.
29466    Use char because int might match the return type of a GCC
29467    builtin and then its argument prototype would still apply.  */
29468 #ifdef __cplusplus
29469 extern "C"
29470 #endif
29471 char gethostbyname ();
29472 int
29473 main ()
29474 {
29475 return gethostbyname ();
29476   ;
29477   return 0;
29478 }
29479 _ACEOF
29480 if ac_fn_cxx_try_link "$LINENO"; then :
29481   ac_cv_lib_nsl_gethostbyname=yes
29482 else
29483   ac_cv_lib_nsl_gethostbyname=no
29484 fi
29485 rm -f core conftest.err conftest.$ac_objext \
29486     conftest$ac_exeext conftest.$ac_ext
29487 LIBS=$ac_check_lib_save_LIBS
29488 fi
29489 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5
29490 $as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; }
29491 if test "x$ac_cv_lib_nsl_gethostbyname" = xyes; then :
29492   X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
29493 fi
29494 
29495       if test $ac_cv_lib_nsl_gethostbyname = no; then
29496         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lbsd" >&5
29497 $as_echo_n "checking for gethostbyname in -lbsd... " >&6; }
29498 if ${ac_cv_lib_bsd_gethostbyname+:} false; then :
29499   $as_echo_n "(cached) " >&6
29500 else
29501   ac_check_lib_save_LIBS=$LIBS
29502 LIBS="-lbsd  $LIBS"
29503 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29504 /* end confdefs.h.  */
29505 
29506 /* Override any GCC internal prototype to avoid an error.
29507    Use char because int might match the return type of a GCC
29508    builtin and then its argument prototype would still apply.  */
29509 #ifdef __cplusplus
29510 extern "C"
29511 #endif
29512 char gethostbyname ();
29513 int
29514 main ()
29515 {
29516 return gethostbyname ();
29517   ;
29518   return 0;
29519 }
29520 _ACEOF
29521 if ac_fn_cxx_try_link "$LINENO"; then :
29522   ac_cv_lib_bsd_gethostbyname=yes
29523 else
29524   ac_cv_lib_bsd_gethostbyname=no
29525 fi
29526 rm -f core conftest.err conftest.$ac_objext \
29527     conftest$ac_exeext conftest.$ac_ext
29528 LIBS=$ac_check_lib_save_LIBS
29529 fi
29530 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_gethostbyname" >&5
29531 $as_echo "$ac_cv_lib_bsd_gethostbyname" >&6; }
29532 if test "x$ac_cv_lib_bsd_gethostbyname" = xyes; then :
29533   X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
29534 fi
29535 
29536       fi
29537     fi
29538 
29539     # lieder@skyler.mavd.honeywell.com says without -lsocket,
29540     # socket/setsockopt and other routines are undefined under SCO ODT
29541     # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
29542     # on later versions), says Simon Leinen: it contains gethostby*
29543     # variants that don't use the name server (or something).  -lsocket
29544     # must be given before -lnsl if both are needed.  We assume that
29545     # if connect needs -lnsl, so does gethostbyname.
29546     ac_fn_cxx_check_func "$LINENO" "connect" "ac_cv_func_connect"
29547 if test "x$ac_cv_func_connect" = xyes; then :
29548 
29549 fi
29550 
29551     if test $ac_cv_func_connect = no; then
29552       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for connect in -lsocket" >&5
29553 $as_echo_n "checking for connect in -lsocket... " >&6; }
29554 if ${ac_cv_lib_socket_connect+:} false; then :
29555   $as_echo_n "(cached) " >&6
29556 else
29557   ac_check_lib_save_LIBS=$LIBS
29558 LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
29559 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29560 /* end confdefs.h.  */
29561 
29562 /* Override any GCC internal prototype to avoid an error.
29563    Use char because int might match the return type of a GCC
29564    builtin and then its argument prototype would still apply.  */
29565 #ifdef __cplusplus
29566 extern "C"
29567 #endif
29568 char connect ();
29569 int
29570 main ()
29571 {
29572 return connect ();
29573   ;
29574   return 0;
29575 }
29576 _ACEOF
29577 if ac_fn_cxx_try_link "$LINENO"; then :
29578   ac_cv_lib_socket_connect=yes
29579 else
29580   ac_cv_lib_socket_connect=no
29581 fi
29582 rm -f core conftest.err conftest.$ac_objext \
29583     conftest$ac_exeext conftest.$ac_ext
29584 LIBS=$ac_check_lib_save_LIBS
29585 fi
29586 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_connect" >&5
29587 $as_echo "$ac_cv_lib_socket_connect" >&6; }
29588 if test "x$ac_cv_lib_socket_connect" = xyes; then :
29589   X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
29590 fi
29591 
29592     fi
29593 
29594     # Guillermo Gomez says -lposix is necessary on A/UX.
29595     ac_fn_cxx_check_func "$LINENO" "remove" "ac_cv_func_remove"
29596 if test "x$ac_cv_func_remove" = xyes; then :
29597 
29598 fi
29599 
29600     if test $ac_cv_func_remove = no; then
29601       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for remove in -lposix" >&5
29602 $as_echo_n "checking for remove in -lposix... " >&6; }
29603 if ${ac_cv_lib_posix_remove+:} false; then :
29604   $as_echo_n "(cached) " >&6
29605 else
29606   ac_check_lib_save_LIBS=$LIBS
29607 LIBS="-lposix  $LIBS"
29608 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29609 /* end confdefs.h.  */
29610 
29611 /* Override any GCC internal prototype to avoid an error.
29612    Use char because int might match the return type of a GCC
29613    builtin and then its argument prototype would still apply.  */
29614 #ifdef __cplusplus
29615 extern "C"
29616 #endif
29617 char remove ();
29618 int
29619 main ()
29620 {
29621 return remove ();
29622   ;
29623   return 0;
29624 }
29625 _ACEOF
29626 if ac_fn_cxx_try_link "$LINENO"; then :
29627   ac_cv_lib_posix_remove=yes
29628 else
29629   ac_cv_lib_posix_remove=no
29630 fi
29631 rm -f core conftest.err conftest.$ac_objext \
29632     conftest$ac_exeext conftest.$ac_ext
29633 LIBS=$ac_check_lib_save_LIBS
29634 fi
29635 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix_remove" >&5
29636 $as_echo "$ac_cv_lib_posix_remove" >&6; }
29637 if test "x$ac_cv_lib_posix_remove" = xyes; then :
29638   X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
29639 fi
29640 
29641     fi
29642 
29643     # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
29644     ac_fn_cxx_check_func "$LINENO" "shmat" "ac_cv_func_shmat"
29645 if test "x$ac_cv_func_shmat" = xyes; then :
29646 
29647 fi
29648 
29649     if test $ac_cv_func_shmat = no; then
29650       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shmat in -lipc" >&5
29651 $as_echo_n "checking for shmat in -lipc... " >&6; }
29652 if ${ac_cv_lib_ipc_shmat+:} false; then :
29653   $as_echo_n "(cached) " >&6
29654 else
29655   ac_check_lib_save_LIBS=$LIBS
29656 LIBS="-lipc  $LIBS"
29657 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29658 /* end confdefs.h.  */
29659 
29660 /* Override any GCC internal prototype to avoid an error.
29661    Use char because int might match the return type of a GCC
29662    builtin and then its argument prototype would still apply.  */
29663 #ifdef __cplusplus
29664 extern "C"
29665 #endif
29666 char shmat ();
29667 int
29668 main ()
29669 {
29670 return shmat ();
29671   ;
29672   return 0;
29673 }
29674 _ACEOF
29675 if ac_fn_cxx_try_link "$LINENO"; then :
29676   ac_cv_lib_ipc_shmat=yes
29677 else
29678   ac_cv_lib_ipc_shmat=no
29679 fi
29680 rm -f core conftest.err conftest.$ac_objext \
29681     conftest$ac_exeext conftest.$ac_ext
29682 LIBS=$ac_check_lib_save_LIBS
29683 fi
29684 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ipc_shmat" >&5
29685 $as_echo "$ac_cv_lib_ipc_shmat" >&6; }
29686 if test "x$ac_cv_lib_ipc_shmat" = xyes; then :
29687   X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
29688 fi
29689 
29690     fi
29691   fi
29692 
29693   # Check for libraries that X11R6 Xt/Xaw programs need.
29694   ac_save_LDFLAGS=$LDFLAGS
29695   test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
29696   # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
29697   # check for ICE first), but we must link in the order -lSM -lICE or
29698   # we get undefined symbols.  So assume we have SM if we have ICE.
29699   # These have to be linked with before -lX11, unlike the other
29700   # libraries we check for below, so use a different variable.
29701   # John Interrante, Karl Berry
29702   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IceConnectionNumber in -lICE" >&5
29703 $as_echo_n "checking for IceConnectionNumber in -lICE... " >&6; }
29704 if ${ac_cv_lib_ICE_IceConnectionNumber+:} false; then :
29705   $as_echo_n "(cached) " >&6
29706 else
29707   ac_check_lib_save_LIBS=$LIBS
29708 LIBS="-lICE $X_EXTRA_LIBS $LIBS"
29709 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29710 /* end confdefs.h.  */
29711 
29712 /* Override any GCC internal prototype to avoid an error.
29713    Use char because int might match the return type of a GCC
29714    builtin and then its argument prototype would still apply.  */
29715 #ifdef __cplusplus
29716 extern "C"
29717 #endif
29718 char IceConnectionNumber ();
29719 int
29720 main ()
29721 {
29722 return IceConnectionNumber ();
29723   ;
29724   return 0;
29725 }
29726 _ACEOF
29727 if ac_fn_cxx_try_link "$LINENO"; then :
29728   ac_cv_lib_ICE_IceConnectionNumber=yes
29729 else
29730   ac_cv_lib_ICE_IceConnectionNumber=no
29731 fi
29732 rm -f core conftest.err conftest.$ac_objext \
29733     conftest$ac_exeext conftest.$ac_ext
29734 LIBS=$ac_check_lib_save_LIBS
29735 fi
29736 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
29737 $as_echo "$ac_cv_lib_ICE_IceConnectionNumber" >&6; }
29738 if test "x$ac_cv_lib_ICE_IceConnectionNumber" = xyes; then :
29739   X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
29740 fi
29741 
29742   LDFLAGS=$ac_save_LDFLAGS
29743 
29744 fi
29745 
29746 
29747 # AC_PATH_XTRA creates X_LIBS and sometimes adds -R flags. When cross compiling
29748 # this doesn't make sense so we remove it.
29749 if test "x$COMPILE_TYPE" = xcross; then
29750   X_LIBS=`$ECHO $X_LIBS | $SED 's/-R \{0,1\}[^ ]*//g'`
29751 fi
29752 
29753 if test "x$no_x" = xyes && test "x$X11_NOT_NEEDED" != xyes; then
29754 
29755     # Print a helpful message on how to acquire the necessary build dependency.
29756     # x11 is the help tag: freetyp2, cups, pulse, alsa etc
29757     MISSING_DEPENDENCY=x11
29758     PKGHANDLER_COMMAND=
29759 
29760     case $PKGHANDLER in
29761         apt-get)
29762                 apt_help     $MISSING_DEPENDENCY ;;
29763     yum)
29764                 yum_help     $MISSING_DEPENDENCY ;;
29765         port)
29766                 port_help    $MISSING_DEPENDENCY ;;
29767         pkgutil)
29768                 pkgutil_help $MISSING_DEPENDENCY ;;
29769         pkgadd)
29770                 pkgadd_help  $MISSING_DEPENDENCY ;;
29771     * )
29772       break ;;
29773     esac
29774 
29775     if test "x$PKGHANDLER_COMMAND" != x; then
29776         HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
29777     fi
29778 
29779     as_fn_error $? "Could not find X11 libraries. $HELP_MSG" "$LINENO" 5
29780 fi
29781 
29782 # Some of the old makefiles require a setting of OPENWIN_HOME
29783 # Since the X11R6 directory has disappeared on later Linuxes,
29784 # we need to probe for it.
29785 if test "x$OPENJDK_TARGET_OS" = xlinux; then
29786     if test -d "$SYS_ROOT/usr/X11R6"; then
29787         OPENWIN_HOME="$SYS_ROOT/usr/X11R6"
29788     fi
29789     if test -d "$SYS_ROOT/usr/include/X11"; then
29790         OPENWIN_HOME="$SYS_ROOT/usr"
29791     fi
29792 fi
29793 if test "x$OPENJDK_TARGET_OS" = xsolaris; then
29794     OPENWIN_HOME="/usr/openwin"
29795 fi
29796 
29797 
29798 
29799 #
29800 # Weird Sol10 something check...TODO change to try compile
29801 #
29802 if test "x${OPENJDK_TARGET_OS}" = xsolaris; then
29803   if test "`uname -r`" = "5.10"; then
29804      if test "`${EGREP} -c XLinearGradient ${OPENWIN_HOME}/share/include/X11/extensions/Xrender.h`" = "0"; then
29805         X_CFLAGS="${X_CFLAGS} -DSOLARIS10_NO_XRENDER_STRUCTS"
29806      fi
29807   fi
29808 fi
29809 
29810 ac_ext=c
29811 ac_cpp='$CPP $CPPFLAGS'
29812 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29813 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29814 ac_compiler_gnu=$ac_cv_c_compiler_gnu
29815 
29816 OLD_CFLAGS="$CFLAGS"
29817 CFLAGS="$CFLAGS $X_CFLAGS"
29818 
29819 # Need to include Xlib.h and Xutil.h to avoid "present but cannot be compiled" warnings on Solaris 10
29820 for ac_header in X11/extensions/shape.h X11/extensions/Xrender.h X11/extensions/XTest.h
29821 do :
29822   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
29823 ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" " # include <X11/Xlib.h>
29824                    # include <X11/Xutil.h>
29825 
29826 "
29827 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
29828   cat >>confdefs.h <<_ACEOF
29829 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
29830 _ACEOF
29831  X11_A_OK=yes
29832 else
29833   X11_A_OK=no
29834 fi
29835 
29836 done
29837 
29838 
29839 CFLAGS="$OLD_CFLAGS"
29840 ac_ext=cpp
29841 ac_cpp='$CXXCPP $CPPFLAGS'
29842 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29843 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29844 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
29845 
29846 
29847 if test "x$X11_A_OK" = xno && test "x$X11_NOT_NEEDED" != xyes; then
29848 
29849     # Print a helpful message on how to acquire the necessary build dependency.
29850     # x11 is the help tag: freetyp2, cups, pulse, alsa etc
29851     MISSING_DEPENDENCY=x11
29852     PKGHANDLER_COMMAND=
29853 
29854     case $PKGHANDLER in
29855         apt-get)
29856                 apt_help     $MISSING_DEPENDENCY ;;
29857     yum)
29858                 yum_help     $MISSING_DEPENDENCY ;;
29859         port)
29860                 port_help    $MISSING_DEPENDENCY ;;
29861         pkgutil)
29862                 pkgutil_help $MISSING_DEPENDENCY ;;
29863         pkgadd)
29864                 pkgadd_help  $MISSING_DEPENDENCY ;;
29865     * )
29866       break ;;
29867     esac
29868 
29869     if test "x$PKGHANDLER_COMMAND" != x; then
29870         HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
29871     fi
29872 
29873     as_fn_error $? "Could not find all X11 headers (shape.h Xrender.h XTest.h). $HELP_MSG" "$LINENO" 5
29874 fi
29875 
29876 
29877 
29878 
29879 
29880 
29881 ###############################################################################
29882 #
29883 # The common unix printing system cups is used to print from java.
29884 #
29885 
29886 # Check whether --with-cups was given.
29887 if test "${with_cups+set}" = set; then :
29888   withval=$with_cups;
29889 fi
29890 
29891 
29892 # Check whether --with-cups-include was given.
29893 if test "${with_cups_include+set}" = set; then :
29894   withval=$with_cups_include;
29895 fi
29896 
29897 
29898 if test "x$CUPS_NOT_NEEDED" = xyes; then
29899         if test "x${with_cups}" != x || test "x${with_cups_include}" != x; then
29900                 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cups not used, so --with-cups is ignored" >&5
29901 $as_echo "$as_me: WARNING: cups not used, so --with-cups is ignored" >&2;}
29902         fi
29903         CUPS_CFLAGS=
29904 else
29905         CUPS_FOUND=no
29906 
29907         if test "x${with_cups}" = xno || test "x${with_cups_include}" = xno; then
29908             as_fn_error $? "It is not possible to disable the use of cups. Remove the --without-cups option." "$LINENO" 5
29909         fi
29910 
29911         if test "x${with_cups}" != x; then
29912             CUPS_CFLAGS="-I${with_cups}/include"
29913             CUPS_FOUND=yes
29914         fi
29915         if test "x${with_cups_include}" != x; then
29916             CUPS_CFLAGS="-I${with_cups_include}"
29917             CUPS_FOUND=yes
29918         fi
29919         if test "x$CUPS_FOUND" = xno; then
29920 
29921 
29922     if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
29923         # Source the builddeps file again, to make sure it uses the latest variables!
29924         . $builddepsfile
29925         # Look for a target and build machine specific resource!
29926         eval resource=\${builddep_cups_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
29927         if test "x$resource" = x; then
29928             # Ok, lets instead look for a target specific resource
29929             eval resource=\${builddep_cups_TARGET_${rewritten_target_var}}
29930         fi
29931         if test "x$resource" = x; then
29932             # Ok, lets instead look for a build specific resource
29933             eval resource=\${builddep_cups_BUILD_${rewritten_build_var}}
29934         fi
29935         if test "x$resource" = x; then
29936             # Ok, lets instead look for a generic resource
29937             # (The cups comes from M4 and not the shell, thus no need for eval here.)
29938             resource=${builddep_cups}
29939         fi
29940         if test "x$resource" != x; then
29941             { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for cups" >&5
29942 $as_echo "$as_me: Using builddeps $resource for cups" >&6;}
29943             # If the resource in the builddeps.conf file is an existing directory,
29944             # for example /java/linux/cups
29945             if test -d ${resource}; then
29946                depdir=${resource}
29947             else
29948 
29949 # cups is for example mymodule
29950 # $resource is for example libs/general/libmymod_1_2_3.zip
29951 # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
29952 # $with_builddeps_dir is for example /localhome/builddeps
29953 # depdir is the name of the variable into which we store the depdir, eg MYMOD
29954 # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
29955 # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
29956     filename=`basename $resource`
29957     filebase=`echo $filename | sed 's/\.[^\.]*$//'`
29958     filebase=${filename%%.*}
29959     extension=${filename#*.}
29960     installdir=$with_builddeps_dir/$filebase
29961     if test ! -f $installdir/$filename.unpacked; then
29962         { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency cups from $with_builddeps_server/$resource and installing into $installdir" >&5
29963 $as_echo "$as_me: Downloading build dependency cups from $with_builddeps_server/$resource and installing into $installdir" >&6;}
29964         if test ! -d $installdir; then
29965             mkdir -p $installdir
29966         fi
29967         if test ! -d $installdir; then
29968             as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
29969         fi
29970         tmpfile=`mktemp $installdir/cups.XXXXXXXXX`
29971         touch $tmpfile
29972         if test ! -f $tmpfile; then
29973             as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
29974         fi
29975 
29976     # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
29977     # $tmpfile is the local file name for the downloaded file.
29978     VALID_TOOL=no
29979     if test "x$BDEPS_FTP" = xwget; then
29980        VALID_TOOL=yes
29981        wget -O $tmpfile $with_builddeps_server/$resource
29982     fi
29983     if test "x$BDEPS_FTP" = xlftp; then
29984        VALID_TOOL=yes
29985        lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
29986     fi
29987     if test "x$BDEPS_FTP" = xftp; then
29988         VALID_TOOL=yes
29989         FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
29990         FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
29991         FTPUSERPWD=${FTPSERVER%%@*}
29992         if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
29993             FTPUSER=${userpwd%%:*}
29994             FTPPWD=${userpwd#*@}
29995             FTPSERVER=${FTPSERVER#*@}
29996         else
29997             FTPUSER=ftp
29998             FTPPWD=ftp
29999         fi
30000         # the "pass" command does not work on some
30001         # ftp clients (read ftp.exe) but if it works,
30002         # passive mode is better!
30003         (\
30004             echo "user $FTPUSER $FTPPWD"        ;\
30005             echo "pass"                         ;\
30006             echo "bin"                          ;\
30007             echo "get $FTPPATH $tmpfile"              ;\
30008         ) | ftp -in $FTPSERVER
30009     fi
30010     if test "x$VALID_TOOL" != xyes; then
30011        as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
30012     fi
30013 
30014         mv $tmpfile $installdir/$filename
30015         if test ! -s $installdir/$filename; then
30016             as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
30017         fi
30018         case "$extension" in
30019             zip)  echo "Unzipping $installdir/$filename..."
30020                (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
30021             ;;
30022             tar.gz) echo "Untaring $installdir/$filename..."
30023                (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
30024             ;;
30025             tgz) echo "Untaring $installdir/$filename..."
30026                (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
30027             ;;
30028             *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
30029             ;;
30030         esac
30031     fi
30032     if test -f $installdir/$filename.unpacked; then
30033         depdir=$installdir
30034     fi
30035 
30036             fi
30037             # Source the builddeps file again, because in the previous command, the depdir
30038             # was updated to point at the current build dependency install directory.
30039             . $builddepsfile
30040             # Now extract variables from the builddeps.conf files.
30041             theroot=${builddep_cups_ROOT}
30042             thecflags=${builddep_cups_CFLAGS}
30043             thelibs=${builddep_cups_LIBS}
30044             if test "x$depdir" = x; then
30045                 as_fn_error $? "Could not download build dependency cups" "$LINENO" 5
30046             fi
30047             CUPS=$depdir
30048             if test "x$theroot" != x; then
30049                CUPS="$theroot"
30050             fi
30051             if test "x$thecflags" != x; then
30052                CUPS_CFLAGS="$thecflags"
30053             fi
30054             if test "x$thelibs" != x; then
30055                CUPS_LIBS="$thelibs"
30056             fi
30057             CUPS_FOUND=yes
30058 
30059         fi
30060 
30061     fi
30062 
30063         fi
30064         if test "x$CUPS_FOUND" = xno; then
30065             # Are the cups headers installed in the default /usr/include location?
30066             for ac_header in cups/cups.h cups/ppd.h
30067 do :
30068   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
30069 ac_fn_cxx_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
30070 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
30071   cat >>confdefs.h <<_ACEOF
30072 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
30073 _ACEOF
30074  CUPS_FOUND=yes
30075                               CUPS_CFLAGS=
30076                               DEFAULT_CUPS=yes
30077 fi
30078 
30079 done
30080 
30081         fi
30082         if test "x$CUPS_FOUND" = xno; then
30083             # Getting nervous now? Lets poke around for standard Solaris third-party
30084             # package installation locations.
30085             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
30086 $as_echo_n "checking for cups headers... " >&6; }
30087             if test -s /opt/sfw/cups/include/cups/cups.h; then
30088                # An SFW package seems to be installed!
30089                CUPS_FOUND=yes
30090                CUPS_CFLAGS="-I/opt/sfw/cups/include"
30091             elif test -s /opt/csw/include/cups/cups.h; then
30092                # A CSW package seems to be installed!
30093                CUPS_FOUND=yes
30094                CUPS_CFLAGS="-I/opt/csw/include"
30095             fi
30096             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
30097 $as_echo "$CUPS_FOUND" >&6; }
30098         fi
30099         if test "x$CUPS_FOUND" = xno; then
30100 
30101     # Print a helpful message on how to acquire the necessary build dependency.
30102     # cups is the help tag: freetyp2, cups, pulse, alsa etc
30103     MISSING_DEPENDENCY=cups
30104     PKGHANDLER_COMMAND=
30105 
30106     case $PKGHANDLER in
30107         apt-get)
30108                 apt_help     $MISSING_DEPENDENCY ;;
30109     yum)
30110                 yum_help     $MISSING_DEPENDENCY ;;
30111         port)
30112                 port_help    $MISSING_DEPENDENCY ;;
30113         pkgutil)
30114                 pkgutil_help $MISSING_DEPENDENCY ;;
30115         pkgadd)
30116                 pkgadd_help  $MISSING_DEPENDENCY ;;
30117     * )
30118       break ;;
30119     esac
30120 
30121     if test "x$PKGHANDLER_COMMAND" != x; then
30122         HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
30123     fi
30124 
30125             as_fn_error $? "Could not find cups! $HELP_MSG " "$LINENO" 5
30126         fi
30127 fi
30128 
30129 
30130 
30131 
30132 
30133 
30134 ###############################################################################
30135 #
30136 # The ubiquitous freetype2 library is used to render fonts.
30137 #
30138 
30139 # Check whether --with-freetype was given.
30140 if test "${with_freetype+set}" = set; then :
30141   withval=$with_freetype;
30142 fi
30143 
30144 
30145 # If we are using the OS installed system lib for freetype, then we do not need to copy it to the build tree
30146 USING_SYSTEM_FT_LIB=false
30147 
30148 if test "x$FREETYPE2_NOT_NEEDED" = xyes; then
30149         if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != x; then
30150                 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --with-freetype is ignored" >&5
30151 $as_echo "$as_me: WARNING: freetype not used, so --with-freetype is ignored" >&2;}
30152         fi
30153         FREETYPE2_CFLAGS=
30154         FREETYPE2_LIBS=
30155         FREETYPE2_LIB_PATH=
30156 else
30157         FREETYPE2_FOUND=no
30158 
30159         if test "x$with_freetype" != x; then
30160 
30161   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30162 
30163   # Input might be given as Windows format, start by converting to
30164   # unix format.
30165   path="$with_freetype"
30166   new_path=`$CYGPATH -u "$path"`
30167 
30168   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
30169   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
30170   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
30171   # "foo.exe" is OK but "foo" is an error.
30172   #
30173   # This test is therefore slightly more accurate than "test -f" to check for file precense.
30174   # It is also a way to make sure we got the proper file name for the real test later on.
30175   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
30176   if test "x$test_shortpath" = x; then
30177     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_freetype, which resolves as \"$path\", is invalid." >&5
30178 $as_echo "$as_me: The path of with_freetype, which resolves as \"$path\", is invalid." >&6;}
30179     as_fn_error $? "Cannot locate the the path of with_freetype" "$LINENO" 5
30180   fi
30181 
30182   # Call helper function which possibly converts this using DOS-style short mode.
30183   # If so, the updated path is stored in $new_path.
30184 
30185   input_path="$new_path"
30186   # Check if we need to convert this using DOS-style short mode. If the path
30187   # contains just simple characters, use it. Otherwise (spaces, weird characters),
30188   # take no chances and rewrite it.
30189   # Note: m4 eats our [], so we need to use [ and ] instead.
30190   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
30191   if test "x$has_forbidden_chars" != x; then
30192     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30193     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
30194     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
30195     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
30196       # Going to short mode and back again did indeed matter. Since short mode is
30197       # case insensitive, let's make it lowercase to improve readability.
30198       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30199       # Now convert it back to Unix-stile (cygpath)
30200       input_path=`$CYGPATH -u "$shortmode_path"`
30201       new_path="$input_path"
30202     fi
30203   fi
30204 
30205   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
30206   if test "x$test_cygdrive_prefix" = x; then
30207     # As a simple fix, exclude /usr/bin since it's not a real path.
30208     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
30209       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
30210       # a path prefixed by /cygdrive for fixpath to work.
30211       new_path="$CYGWIN_ROOT_PATH$input_path"
30212     fi
30213   fi
30214 
30215 
30216   if test "x$path" != "x$new_path"; then
30217     with_freetype="$new_path"
30218     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_freetype to \"$new_path\"" >&5
30219 $as_echo "$as_me: Rewriting with_freetype to \"$new_path\"" >&6;}
30220   fi
30221 
30222   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30223 
30224   path="$with_freetype"
30225   has_colon=`$ECHO $path | $GREP ^.:`
30226   new_path="$path"
30227   if test "x$has_colon" = x; then
30228     # Not in mixed or Windows style, start by that.
30229     new_path=`cmd //c echo $path`
30230   fi
30231 
30232 
30233   input_path="$new_path"
30234   # Check if we need to convert this using DOS-style short mode. If the path
30235   # contains just simple characters, use it. Otherwise (spaces, weird characters),
30236   # take no chances and rewrite it.
30237   # Note: m4 eats our [], so we need to use [ and ] instead.
30238   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
30239   if test "x$has_forbidden_chars" != x; then
30240     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30241     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30242   fi
30243 
30244 
30245   windows_path="$new_path"
30246   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30247     unix_path=`$CYGPATH -u "$windows_path"`
30248     new_path="$unix_path"
30249   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30250     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30251     new_path="$unix_path"
30252   fi
30253 
30254   if test "x$path" != "x$new_path"; then
30255     with_freetype="$new_path"
30256     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_freetype to \"$new_path\"" >&5
30257 $as_echo "$as_me: Rewriting with_freetype to \"$new_path\"" >&6;}
30258   fi
30259 
30260   # Save the first 10 bytes of this path to the storage, so fixpath can work.
30261   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
30262 
30263   else
30264     # We're on a posix platform. Hooray! :)
30265     path="$with_freetype"
30266 
30267     if test ! -f "$path" && test ! -d "$path"; then
30268       as_fn_error $? "The path of with_freetype, which resolves as \"$path\", is not found." "$LINENO" 5
30269     fi
30270 
30271     has_space=`$ECHO "$path" | $GREP " "`
30272     if test "x$has_space" != x; then
30273       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_freetype, which resolves as \"$path\", is invalid." >&5
30274 $as_echo "$as_me: The path of with_freetype, which resolves as \"$path\", is invalid." >&6;}
30275       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
30276     fi
30277   fi
30278 
30279             FREETYPE2_LIBS="-L$with_freetype/lib -lfreetype"
30280             FREETYPE2_LIB_PATH="$with_freetype/lib"
30281             if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64 && test -d "$with_freetype/lib/amd64"; then
30282                 FREETYPE2_LIBS="-L$with_freetype/lib/amd64 -lfreetype"
30283                 FREETYPE2_LIB_PATH="$with_freetype/lib/amd64"
30284             fi
30285             if test "x$OPENJDK_TARGET_OS" = xwindows; then
30286                 FREETYPE2_LIBS="$with_freetype/lib/freetype.lib"
30287             fi
30288             FREETYPE2_CFLAGS="-I$with_freetype/include"
30289             if test -s $with_freetype/include/ft2build.h && test -d $with_freetype/include/freetype2/freetype; then
30290                 FREETYPE2_CFLAGS="-I$with_freetype/include/freetype2 -I$with_freetype/include"
30291             fi
30292             FREETYPE2_FOUND=yes
30293             if test "x$FREETYPE2_FOUND" = xyes; then
30294                 # Verify that the directories exist
30295                 if ! test -d "$with_freetype/lib" || ! test -d "$with_freetype/include"; then
30296                    as_fn_error $? "Could not find the expected directories $with_freetype/lib and $with_freetype/include" "$LINENO" 5
30297                 fi
30298                 # List the contents of the lib.
30299                 FREETYPELIB=`ls $with_freetype/lib/libfreetype.so $with_freetype/lib/freetype.dll 2> /dev/null`
30300                 if test "x$FREETYPELIB" = x; then
30301                    as_fn_error $? "Could not find libfreetype.so nor freetype.dll in $with_freetype/lib" "$LINENO" 5
30302                 fi
30303                 # Check one h-file
30304                 if ! test -s "$with_freetype/include/ft2build.h"; then
30305                    as_fn_error $? "Could not find $with_freetype/include/ft2build.h" "$LINENO" 5
30306                 fi
30307             fi
30308         fi
30309         if test "x$FREETYPE2_FOUND" = xno; then
30310 
30311 
30312     if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
30313         # Source the builddeps file again, to make sure it uses the latest variables!
30314         . $builddepsfile
30315         # Look for a target and build machine specific resource!
30316         eval resource=\${builddep_freetype2_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
30317         if test "x$resource" = x; then
30318             # Ok, lets instead look for a target specific resource
30319             eval resource=\${builddep_freetype2_TARGET_${rewritten_target_var}}
30320         fi
30321         if test "x$resource" = x; then
30322             # Ok, lets instead look for a build specific resource
30323             eval resource=\${builddep_freetype2_BUILD_${rewritten_build_var}}
30324         fi
30325         if test "x$resource" = x; then
30326             # Ok, lets instead look for a generic resource
30327             # (The freetype2 comes from M4 and not the shell, thus no need for eval here.)
30328             resource=${builddep_freetype2}
30329         fi
30330         if test "x$resource" != x; then
30331             { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for freetype2" >&5
30332 $as_echo "$as_me: Using builddeps $resource for freetype2" >&6;}
30333             # If the resource in the builddeps.conf file is an existing directory,
30334             # for example /java/linux/cups
30335             if test -d ${resource}; then
30336                depdir=${resource}
30337             else
30338 
30339 # freetype2 is for example mymodule
30340 # $resource is for example libs/general/libmymod_1_2_3.zip
30341 # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
30342 # $with_builddeps_dir is for example /localhome/builddeps
30343 # depdir is the name of the variable into which we store the depdir, eg MYMOD
30344 # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
30345 # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
30346     filename=`basename $resource`
30347     filebase=`echo $filename | sed 's/\.[^\.]*$//'`
30348     filebase=${filename%%.*}
30349     extension=${filename#*.}
30350     installdir=$with_builddeps_dir/$filebase
30351     if test ! -f $installdir/$filename.unpacked; then
30352         { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency freetype2 from $with_builddeps_server/$resource and installing into $installdir" >&5
30353 $as_echo "$as_me: Downloading build dependency freetype2 from $with_builddeps_server/$resource and installing into $installdir" >&6;}
30354         if test ! -d $installdir; then
30355             mkdir -p $installdir
30356         fi
30357         if test ! -d $installdir; then
30358             as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
30359         fi
30360         tmpfile=`mktemp $installdir/freetype2.XXXXXXXXX`
30361         touch $tmpfile
30362         if test ! -f $tmpfile; then
30363             as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
30364         fi
30365 
30366     # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
30367     # $tmpfile is the local file name for the downloaded file.
30368     VALID_TOOL=no
30369     if test "x$BDEPS_FTP" = xwget; then
30370        VALID_TOOL=yes
30371        wget -O $tmpfile $with_builddeps_server/$resource
30372     fi
30373     if test "x$BDEPS_FTP" = xlftp; then
30374        VALID_TOOL=yes
30375        lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
30376     fi
30377     if test "x$BDEPS_FTP" = xftp; then
30378         VALID_TOOL=yes
30379         FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
30380         FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
30381         FTPUSERPWD=${FTPSERVER%%@*}
30382         if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
30383             FTPUSER=${userpwd%%:*}
30384             FTPPWD=${userpwd#*@}
30385             FTPSERVER=${FTPSERVER#*@}
30386         else
30387             FTPUSER=ftp
30388             FTPPWD=ftp
30389         fi
30390         # the "pass" command does not work on some
30391         # ftp clients (read ftp.exe) but if it works,
30392         # passive mode is better!
30393         (\
30394             echo "user $FTPUSER $FTPPWD"        ;\
30395             echo "pass"                         ;\
30396             echo "bin"                          ;\
30397             echo "get $FTPPATH $tmpfile"              ;\
30398         ) | ftp -in $FTPSERVER
30399     fi
30400     if test "x$VALID_TOOL" != xyes; then
30401        as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
30402     fi
30403 
30404         mv $tmpfile $installdir/$filename
30405         if test ! -s $installdir/$filename; then
30406             as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
30407         fi
30408         case "$extension" in
30409             zip)  echo "Unzipping $installdir/$filename..."
30410                (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
30411             ;;
30412             tar.gz) echo "Untaring $installdir/$filename..."
30413                (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
30414             ;;
30415             tgz) echo "Untaring $installdir/$filename..."
30416                (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
30417             ;;
30418             *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
30419             ;;
30420         esac
30421     fi
30422     if test -f $installdir/$filename.unpacked; then
30423         depdir=$installdir
30424     fi
30425 
30426             fi
30427             # Source the builddeps file again, because in the previous command, the depdir
30428             # was updated to point at the current build dependency install directory.
30429             . $builddepsfile
30430             # Now extract variables from the builddeps.conf files.
30431             theroot=${builddep_freetype2_ROOT}
30432             thecflags=${builddep_freetype2_CFLAGS}
30433             thelibs=${builddep_freetype2_LIBS}
30434             if test "x$depdir" = x; then
30435                 as_fn_error $? "Could not download build dependency freetype2" "$LINENO" 5
30436             fi
30437             FREETYPE2=$depdir
30438             if test "x$theroot" != x; then
30439                FREETYPE2="$theroot"
30440             fi
30441             if test "x$thecflags" != x; then
30442                FREETYPE2_CFLAGS="$thecflags"
30443             fi
30444             if test "x$thelibs" != x; then
30445                FREETYPE2_LIBS="$thelibs"
30446             fi
30447             FREETYPE2_FOUND=yes
30448             else FREETYPE2_FOUND=no
30449 
30450         fi
30451         else FREETYPE2_FOUND=no
30452 
30453     fi
30454 
30455             USING_SYSTEM_FT_LIB=true
30456         fi
30457         if test "x$FREETYPE2_FOUND" = xno && test "x$OPENJDK_TARGET_OS" = xwindows; then
30458             FREETYPELOCATION="$PROGRAMFILES/GnuWin32"
30459 
30460   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30461 
30462   # Input might be given as Windows format, start by converting to
30463   # unix format.
30464   path="$FREETYPELOCATION"
30465   new_path=`$CYGPATH -u "$path"`
30466 
30467   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
30468   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
30469   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
30470   # "foo.exe" is OK but "foo" is an error.
30471   #
30472   # This test is therefore slightly more accurate than "test -f" to check for file precense.
30473   # It is also a way to make sure we got the proper file name for the real test later on.
30474   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
30475   if test "x$test_shortpath" = x; then
30476     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPELOCATION, which resolves as \"$path\", is invalid." >&5
30477 $as_echo "$as_me: The path of FREETYPELOCATION, which resolves as \"$path\", is invalid." >&6;}
30478     as_fn_error $? "Cannot locate the the path of FREETYPELOCATION" "$LINENO" 5
30479   fi
30480 
30481   # Call helper function which possibly converts this using DOS-style short mode.
30482   # If so, the updated path is stored in $new_path.
30483 
30484   input_path="$new_path"
30485   # Check if we need to convert this using DOS-style short mode. If the path
30486   # contains just simple characters, use it. Otherwise (spaces, weird characters),
30487   # take no chances and rewrite it.
30488   # Note: m4 eats our [], so we need to use [ and ] instead.
30489   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
30490   if test "x$has_forbidden_chars" != x; then
30491     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30492     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
30493     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
30494     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
30495       # Going to short mode and back again did indeed matter. Since short mode is
30496       # case insensitive, let's make it lowercase to improve readability.
30497       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30498       # Now convert it back to Unix-stile (cygpath)
30499       input_path=`$CYGPATH -u "$shortmode_path"`
30500       new_path="$input_path"
30501     fi
30502   fi
30503 
30504   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
30505   if test "x$test_cygdrive_prefix" = x; then
30506     # As a simple fix, exclude /usr/bin since it's not a real path.
30507     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
30508       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
30509       # a path prefixed by /cygdrive for fixpath to work.
30510       new_path="$CYGWIN_ROOT_PATH$input_path"
30511     fi
30512   fi
30513 
30514 
30515   if test "x$path" != "x$new_path"; then
30516     FREETYPELOCATION="$new_path"
30517     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPELOCATION to \"$new_path\"" >&5
30518 $as_echo "$as_me: Rewriting FREETYPELOCATION to \"$new_path\"" >&6;}
30519   fi
30520 
30521   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30522 
30523   path="$FREETYPELOCATION"
30524   has_colon=`$ECHO $path | $GREP ^.:`
30525   new_path="$path"
30526   if test "x$has_colon" = x; then
30527     # Not in mixed or Windows style, start by that.
30528     new_path=`cmd //c echo $path`
30529   fi
30530 
30531 
30532   input_path="$new_path"
30533   # Check if we need to convert this using DOS-style short mode. If the path
30534   # contains just simple characters, use it. Otherwise (spaces, weird characters),
30535   # take no chances and rewrite it.
30536   # Note: m4 eats our [], so we need to use [ and ] instead.
30537   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
30538   if test "x$has_forbidden_chars" != x; then
30539     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30540     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30541   fi
30542 
30543 
30544   windows_path="$new_path"
30545   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30546     unix_path=`$CYGPATH -u "$windows_path"`
30547     new_path="$unix_path"
30548   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30549     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30550     new_path="$unix_path"
30551   fi
30552 
30553   if test "x$path" != "x$new_path"; then
30554     FREETYPELOCATION="$new_path"
30555     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPELOCATION to \"$new_path\"" >&5
30556 $as_echo "$as_me: Rewriting FREETYPELOCATION to \"$new_path\"" >&6;}
30557   fi
30558 
30559   # Save the first 10 bytes of this path to the storage, so fixpath can work.
30560   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
30561 
30562   else
30563     # We're on a posix platform. Hooray! :)
30564     path="$FREETYPELOCATION"
30565 
30566     if test ! -f "$path" && test ! -d "$path"; then
30567       as_fn_error $? "The path of FREETYPELOCATION, which resolves as \"$path\", is not found." "$LINENO" 5
30568     fi
30569 
30570     has_space=`$ECHO "$path" | $GREP " "`
30571     if test "x$has_space" != x; then
30572       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPELOCATION, which resolves as \"$path\", is invalid." >&5
30573 $as_echo "$as_me: The path of FREETYPELOCATION, which resolves as \"$path\", is invalid." >&6;}
30574       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
30575     fi
30576   fi
30577 
30578             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype in some standard windows locations" >&5
30579 $as_echo_n "checking for freetype in some standard windows locations... " >&6; }
30580             if test -s "$FREETYPELOCATION/include/ft2build.h" && test -d "$FREETYPELOCATION/include/freetype2/freetype"; then
30581                 FREETYPE2_CFLAGS="-I$FREETYPELOCATION/include/freetype2 -I$FREETYPELOCATION/include"
30582                 FREETYPE2_LIBS="$FREETYPELOCATION/lib/freetype.lib"
30583                 FREETYPE2_LIB_PATH="$FREETYPELOCATION/lib"
30584                 if ! test -s "$FREETYPE2_LIBS"; then
30585                    as_fn_error $? "Could not find $FREETYPE2_LIBS" "$LINENO" 5
30586                 fi
30587                 if ! test -s "$FREETYPE2_LIB_PATH/freetype.dll"; then
30588                    as_fn_error $? "Could not find $FREETYPE2_LIB_PATH/freetype.dll" "$LINENO" 5
30589                 fi
30590                 USING_SYSTEM_FT_LIB=true
30591                 FREETYPE2_FOUND=yes
30592             fi
30593             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE2_FOUND" >&5
30594 $as_echo "$FREETYPE2_FOUND" >&6; }
30595         fi
30596         if test "x$FREETYPE2_FOUND" = xno; then
30597 
30598 pkg_failed=no
30599 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FREETYPE2" >&5
30600 $as_echo_n "checking for FREETYPE2... " >&6; }
30601 
30602 if test -n "$FREETYPE2_CFLAGS"; then
30603     pkg_cv_FREETYPE2_CFLAGS="$FREETYPE2_CFLAGS"
30604  elif test -n "$PKG_CONFIG"; then
30605     if test -n "$PKG_CONFIG" && \
30606     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
30607   ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
30608   ac_status=$?
30609   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
30610   test $ac_status = 0; }; then
30611   pkg_cv_FREETYPE2_CFLAGS=`$PKG_CONFIG --cflags "freetype2" 2>/dev/null`
30612 else
30613   pkg_failed=yes
30614 fi
30615  else
30616     pkg_failed=untried
30617 fi
30618 if test -n "$FREETYPE2_LIBS"; then
30619     pkg_cv_FREETYPE2_LIBS="$FREETYPE2_LIBS"
30620  elif test -n "$PKG_CONFIG"; then
30621     if test -n "$PKG_CONFIG" && \
30622     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
30623   ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
30624   ac_status=$?
30625   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
30626   test $ac_status = 0; }; then
30627   pkg_cv_FREETYPE2_LIBS=`$PKG_CONFIG --libs "freetype2" 2>/dev/null`
30628 else
30629   pkg_failed=yes
30630 fi
30631  else
30632     pkg_failed=untried
30633 fi
30634 
30635 
30636 
30637 if test $pkg_failed = yes; then
30638 
30639 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
30640         _pkg_short_errors_supported=yes
30641 else
30642         _pkg_short_errors_supported=no
30643 fi
30644         if test $_pkg_short_errors_supported = yes; then
30645                 FREETYPE2_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "freetype2" 2>&1`
30646         else
30647                 FREETYPE2_PKG_ERRORS=`$PKG_CONFIG --print-errors "freetype2" 2>&1`
30648         fi
30649         # Put the nasty error message in config.log where it belongs
30650         echo "$FREETYPE2_PKG_ERRORS" >&5
30651 
30652         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30653 $as_echo "no" >&6; }
30654                 FREETYPE2_FOUND=no
30655 elif test $pkg_failed = untried; then
30656         FREETYPE2_FOUND=no
30657 else
30658         FREETYPE2_CFLAGS=$pkg_cv_FREETYPE2_CFLAGS
30659         FREETYPE2_LIBS=$pkg_cv_FREETYPE2_LIBS
30660         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
30661 $as_echo "yes" >&6; }
30662         FREETYPE2_FOUND=yes
30663 fi
30664             # On solaris, pkg_check adds -lz to freetype libs, which isn't necessary for us.
30665             FREETYPE2_LIBS=`$ECHO $FREETYPE2_LIBS | $SED 's/-lz//g'`
30666             USING_SYSTEM_FT_LIB=true
30667             # 64-bit libs for Solaris x86 are installed in the amd64 subdirectory, change lib to lib/amd64
30668             if test "x$FREETYPE2_FOUND" = xyes && test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
30669               FREETYPE2_LIBS=`$ECHO $FREETYPE2_LIBS | $SED 's?/lib?/lib/amd64?g'`
30670             fi
30671         fi
30672         if test "x$FREETYPE2_FOUND" = xno; then
30673             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype in some standard locations" >&5
30674 $as_echo_n "checking for freetype in some standard locations... " >&6; }
30675 
30676             if test -s /usr/X11/include/ft2build.h && test -d /usr/X11/include/freetype2/freetype; then
30677                 DEFAULT_FREETYPE_CFLAGS="-I/usr/X11/include/freetype2 -I/usr/X11/include"
30678                 DEFAULT_FREETYPE_LIBS="-L/usr/X11/lib -lfreetype"
30679             fi
30680             if test -s /usr/include/ft2build.h && test -d /usr/include/freetype2/freetype; then
30681                 DEFAULT_FREETYPE_CFLAGS="-I/usr/include/freetype2"
30682                 DEFAULT_FREETYPE_LIBS="-lfreetype"
30683             fi
30684 
30685             PREV_CXXCFLAGS="$CXXFLAGS"
30686             PREV_LDFLAGS="$LDFLAGS"
30687             CXXFLAGS="$CXXFLAGS $DEFAULT_FREETYPE_CFLAGS"
30688             LDFLAGS="$LDFLAGS $DEFAULT_FREETYPE_LIBS"
30689             cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30690 /* end confdefs.h.  */
30691 #include<ft2build.h>
30692                             #include FT_FREETYPE_H
30693                            int main() { return 0; }
30694 
30695 _ACEOF
30696 if ac_fn_cxx_try_link "$LINENO"; then :
30697 
30698                               # Yes, the default cflags and libs did the trick.
30699                               FREETYPE2_FOUND=yes
30700                               FREETYPE2_CFLAGS="$DEFAULT_FREETYPE_CFLAGS"
30701                               FREETYPE2_LIBS="$DEFAULT_FREETYPE_LIBS"
30702 
30703 else
30704 
30705                               FREETYPE2_FOUND=no
30706 
30707 fi
30708 rm -f core conftest.err conftest.$ac_objext \
30709     conftest$ac_exeext conftest.$ac_ext
30710             CXXCFLAGS="$PREV_CXXFLAGS"
30711             LDFLAGS="$PREV_LDFLAGS"
30712             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE2_FOUND" >&5
30713 $as_echo "$FREETYPE2_FOUND" >&6; }
30714             USING_SYSTEM_FT_LIB=true
30715         fi
30716         if test "x$FREETYPE2_FOUND" = xno; then
30717 
30718     # Print a helpful message on how to acquire the necessary build dependency.
30719     # freetype2 is the help tag: freetyp2, cups, pulse, alsa etc
30720     MISSING_DEPENDENCY=freetype2
30721     PKGHANDLER_COMMAND=
30722 
30723     case $PKGHANDLER in
30724         apt-get)
30725                 apt_help     $MISSING_DEPENDENCY ;;
30726     yum)
30727                 yum_help     $MISSING_DEPENDENCY ;;
30728         port)
30729                 port_help    $MISSING_DEPENDENCY ;;
30730         pkgutil)
30731                 pkgutil_help $MISSING_DEPENDENCY ;;
30732         pkgadd)
30733                 pkgadd_help  $MISSING_DEPENDENCY ;;
30734     * )
30735       break ;;
30736     esac
30737 
30738     if test "x$PKGHANDLER_COMMAND" != x; then
30739         HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
30740     fi
30741 
30742                 as_fn_error $? "Could not find freetype2! $HELP_MSG " "$LINENO" 5
30743         fi
30744 
30745         if test "x$OPENJDK_TARGET_OS" != xwindows; then
30746             # AC_CHECK_LIB does not support use of cl.exe
30747             PREV_LDFLAGS="$LDFLAGS"
30748             LDFLAGS="$FREETYPE2_LIBS"
30749             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FT_Init_FreeType in -lfreetype" >&5
30750 $as_echo_n "checking for FT_Init_FreeType in -lfreetype... " >&6; }
30751 if ${ac_cv_lib_freetype_FT_Init_FreeType+:} false; then :
30752   $as_echo_n "(cached) " >&6
30753 else
30754   ac_check_lib_save_LIBS=$LIBS
30755 LIBS="-lfreetype  $LIBS"
30756 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30757 /* end confdefs.h.  */
30758 
30759 /* Override any GCC internal prototype to avoid an error.
30760    Use char because int might match the return type of a GCC
30761    builtin and then its argument prototype would still apply.  */
30762 #ifdef __cplusplus
30763 extern "C"
30764 #endif
30765 char FT_Init_FreeType ();
30766 int
30767 main ()
30768 {
30769 return FT_Init_FreeType ();
30770   ;
30771   return 0;
30772 }
30773 _ACEOF
30774 if ac_fn_cxx_try_link "$LINENO"; then :
30775   ac_cv_lib_freetype_FT_Init_FreeType=yes
30776 else
30777   ac_cv_lib_freetype_FT_Init_FreeType=no
30778 fi
30779 rm -f core conftest.err conftest.$ac_objext \
30780     conftest$ac_exeext conftest.$ac_ext
30781 LIBS=$ac_check_lib_save_LIBS
30782 fi
30783 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_freetype_FT_Init_FreeType" >&5
30784 $as_echo "$ac_cv_lib_freetype_FT_Init_FreeType" >&6; }
30785 if test "x$ac_cv_lib_freetype_FT_Init_FreeType" = xyes; then :
30786   FREETYPE2_FOUND=true
30787 else
30788   as_fn_error $? "Could not find freetype2! $HELP_MSG " "$LINENO" 5
30789 fi
30790 
30791             LDFLAGS="$PREV_LDFLAGS"
30792         fi
30793 fi
30794 
30795 
30796 
30797 
30798 
30799 
30800 
30801 
30802 
30803 ###############################################################################
30804 #
30805 # Check for alsa headers and libraries. Used on Linux/GNU systems.
30806 #
30807 
30808 # Check whether --with-alsa was given.
30809 if test "${with_alsa+set}" = set; then :
30810   withval=$with_alsa;
30811 fi
30812 
30813 
30814 # Check whether --with-alsa-include was given.
30815 if test "${with_alsa_include+set}" = set; then :
30816   withval=$with_alsa_include;
30817 fi
30818 
30819 
30820 # Check whether --with-alsa-lib was given.
30821 if test "${with_alsa_lib+set}" = set; then :
30822   withval=$with_alsa_lib;
30823 fi
30824 
30825 
30826 if test "x$ALSA_NOT_NEEDED" = xyes; then
30827         if test "x${with_alsa}" != x || test "x${with_alsa_include}" != x || test "x${with_alsa_lib}" != x; then
30828                 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: alsa not used, so --with-alsa is ignored" >&5
30829 $as_echo "$as_me: WARNING: alsa not used, so --with-alsa is ignored" >&2;}
30830         fi
30831         ALSA_CFLAGS=
30832         ALSA_LIBS=
30833 else
30834         ALSA_FOUND=no
30835 
30836         if test "x${with_alsa}" = xno || test "x${with_alsa_include}" = xno || test "x${with_alsa_lib}" = xno; then
30837             as_fn_error $? "It is not possible to disable the use of alsa. Remove the --without-alsa option." "$LINENO" 5
30838         fi
30839 
30840         if test "x${with_alsa}" != x; then
30841             ALSA_LIBS="-L${with_alsa}/lib -lalsa"
30842             ALSA_CFLAGS="-I${with_alsa}/include"
30843             ALSA_FOUND=yes
30844         fi
30845         if test "x${with_alsa_include}" != x; then
30846             ALSA_CFLAGS="-I${with_alsa_include}"
30847             ALSA_FOUND=yes
30848         fi
30849         if test "x${with_alsa_lib}" != x; then
30850             ALSA_LIBS="-L${with_alsa_lib} -lalsa"
30851             ALSA_FOUND=yes
30852         fi
30853         if test "x$ALSA_FOUND" = xno; then
30854 
30855 
30856     if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
30857         # Source the builddeps file again, to make sure it uses the latest variables!
30858         . $builddepsfile
30859         # Look for a target and build machine specific resource!
30860         eval resource=\${builddep_alsa_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
30861         if test "x$resource" = x; then
30862             # Ok, lets instead look for a target specific resource
30863             eval resource=\${builddep_alsa_TARGET_${rewritten_target_var}}
30864         fi
30865         if test "x$resource" = x; then
30866             # Ok, lets instead look for a build specific resource
30867             eval resource=\${builddep_alsa_BUILD_${rewritten_build_var}}
30868         fi
30869         if test "x$resource" = x; then
30870             # Ok, lets instead look for a generic resource
30871             # (The alsa comes from M4 and not the shell, thus no need for eval here.)
30872             resource=${builddep_alsa}
30873         fi
30874         if test "x$resource" != x; then
30875             { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for alsa" >&5
30876 $as_echo "$as_me: Using builddeps $resource for alsa" >&6;}
30877             # If the resource in the builddeps.conf file is an existing directory,
30878             # for example /java/linux/cups
30879             if test -d ${resource}; then
30880                depdir=${resource}
30881             else
30882 
30883 # alsa is for example mymodule
30884 # $resource is for example libs/general/libmymod_1_2_3.zip
30885 # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
30886 # $with_builddeps_dir is for example /localhome/builddeps
30887 # depdir is the name of the variable into which we store the depdir, eg MYMOD
30888 # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
30889 # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
30890     filename=`basename $resource`
30891     filebase=`echo $filename | sed 's/\.[^\.]*$//'`
30892     filebase=${filename%%.*}
30893     extension=${filename#*.}
30894     installdir=$with_builddeps_dir/$filebase
30895     if test ! -f $installdir/$filename.unpacked; then
30896         { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency alsa from $with_builddeps_server/$resource and installing into $installdir" >&5
30897 $as_echo "$as_me: Downloading build dependency alsa from $with_builddeps_server/$resource and installing into $installdir" >&6;}
30898         if test ! -d $installdir; then
30899             mkdir -p $installdir
30900         fi
30901         if test ! -d $installdir; then
30902             as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
30903         fi
30904         tmpfile=`mktemp $installdir/alsa.XXXXXXXXX`
30905         touch $tmpfile
30906         if test ! -f $tmpfile; then
30907             as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
30908         fi
30909 
30910     # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
30911     # $tmpfile is the local file name for the downloaded file.
30912     VALID_TOOL=no
30913     if test "x$BDEPS_FTP" = xwget; then
30914        VALID_TOOL=yes
30915        wget -O $tmpfile $with_builddeps_server/$resource
30916     fi
30917     if test "x$BDEPS_FTP" = xlftp; then
30918        VALID_TOOL=yes
30919        lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
30920     fi
30921     if test "x$BDEPS_FTP" = xftp; then
30922         VALID_TOOL=yes
30923         FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
30924         FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
30925         FTPUSERPWD=${FTPSERVER%%@*}
30926         if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
30927             FTPUSER=${userpwd%%:*}
30928             FTPPWD=${userpwd#*@}
30929             FTPSERVER=${FTPSERVER#*@}
30930         else
30931             FTPUSER=ftp
30932             FTPPWD=ftp
30933         fi
30934         # the "pass" command does not work on some
30935         # ftp clients (read ftp.exe) but if it works,
30936         # passive mode is better!
30937         (\
30938             echo "user $FTPUSER $FTPPWD"        ;\
30939             echo "pass"                         ;\
30940             echo "bin"                          ;\
30941             echo "get $FTPPATH $tmpfile"              ;\
30942         ) | ftp -in $FTPSERVER
30943     fi
30944     if test "x$VALID_TOOL" != xyes; then
30945        as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
30946     fi
30947 
30948         mv $tmpfile $installdir/$filename
30949         if test ! -s $installdir/$filename; then
30950             as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
30951         fi
30952         case "$extension" in
30953             zip)  echo "Unzipping $installdir/$filename..."
30954                (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
30955             ;;
30956             tar.gz) echo "Untaring $installdir/$filename..."
30957                (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
30958             ;;
30959             tgz) echo "Untaring $installdir/$filename..."
30960                (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
30961             ;;
30962             *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
30963             ;;
30964         esac
30965     fi
30966     if test -f $installdir/$filename.unpacked; then
30967         depdir=$installdir
30968     fi
30969 
30970             fi
30971             # Source the builddeps file again, because in the previous command, the depdir
30972             # was updated to point at the current build dependency install directory.
30973             . $builddepsfile
30974             # Now extract variables from the builddeps.conf files.
30975             theroot=${builddep_alsa_ROOT}
30976             thecflags=${builddep_alsa_CFLAGS}
30977             thelibs=${builddep_alsa_LIBS}
30978             if test "x$depdir" = x; then
30979                 as_fn_error $? "Could not download build dependency alsa" "$LINENO" 5
30980             fi
30981             ALSA=$depdir
30982             if test "x$theroot" != x; then
30983                ALSA="$theroot"
30984             fi
30985             if test "x$thecflags" != x; then
30986                ALSA_CFLAGS="$thecflags"
30987             fi
30988             if test "x$thelibs" != x; then
30989                ALSA_LIBS="$thelibs"
30990             fi
30991             ALSA_FOUND=yes
30992             else ALSA_FOUND=no
30993 
30994         fi
30995         else ALSA_FOUND=no
30996 
30997     fi
30998 
30999         fi
31000         if test "x$ALSA_FOUND" = xno; then
31001 
31002 pkg_failed=no
31003 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ALSA" >&5
31004 $as_echo_n "checking for ALSA... " >&6; }
31005 
31006 if test -n "$ALSA_CFLAGS"; then
31007     pkg_cv_ALSA_CFLAGS="$ALSA_CFLAGS"
31008  elif test -n "$PKG_CONFIG"; then
31009     if test -n "$PKG_CONFIG" && \
31010     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
31011   ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
31012   ac_status=$?
31013   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
31014   test $ac_status = 0; }; then
31015   pkg_cv_ALSA_CFLAGS=`$PKG_CONFIG --cflags "alsa" 2>/dev/null`
31016 else
31017   pkg_failed=yes
31018 fi
31019  else
31020     pkg_failed=untried
31021 fi
31022 if test -n "$ALSA_LIBS"; then
31023     pkg_cv_ALSA_LIBS="$ALSA_LIBS"
31024  elif test -n "$PKG_CONFIG"; then
31025     if test -n "$PKG_CONFIG" && \
31026     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
31027   ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
31028   ac_status=$?
31029   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
31030   test $ac_status = 0; }; then
31031   pkg_cv_ALSA_LIBS=`$PKG_CONFIG --libs "alsa" 2>/dev/null`
31032 else
31033   pkg_failed=yes
31034 fi
31035  else
31036     pkg_failed=untried
31037 fi
31038 
31039 
31040 
31041 if test $pkg_failed = yes; then
31042 
31043 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
31044         _pkg_short_errors_supported=yes
31045 else
31046         _pkg_short_errors_supported=no
31047 fi
31048         if test $_pkg_short_errors_supported = yes; then
31049                 ALSA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "alsa" 2>&1`
31050         else
31051                 ALSA_PKG_ERRORS=`$PKG_CONFIG --print-errors "alsa" 2>&1`
31052         fi
31053         # Put the nasty error message in config.log where it belongs
31054         echo "$ALSA_PKG_ERRORS" >&5
31055 
31056         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31057 $as_echo "no" >&6; }
31058                 ALSA_FOUND=no
31059 elif test $pkg_failed = untried; then
31060         ALSA_FOUND=no
31061 else
31062         ALSA_CFLAGS=$pkg_cv_ALSA_CFLAGS
31063         ALSA_LIBS=$pkg_cv_ALSA_LIBS
31064         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
31065 $as_echo "yes" >&6; }
31066         ALSA_FOUND=yes
31067 fi
31068         fi
31069         if test "x$ALSA_FOUND" = xno; then
31070             for ac_header in alsa/asoundlib.h
31071 do :
31072   ac_fn_cxx_check_header_mongrel "$LINENO" "alsa/asoundlib.h" "ac_cv_header_alsa_asoundlib_h" "$ac_includes_default"
31073 if test "x$ac_cv_header_alsa_asoundlib_h" = xyes; then :
31074   cat >>confdefs.h <<_ACEOF
31075 #define HAVE_ALSA_ASOUNDLIB_H 1
31076 _ACEOF
31077  ALSA_FOUND=yes
31078                               ALSA_CFLAGS=-Iignoreme
31079                               ALSA_LIBS=-lasound
31080                               DEFAULT_ALSA=yes
31081 else
31082   ALSA_FOUND=no
31083 fi
31084 
31085 done
31086 
31087         fi
31088         if test "x$ALSA_FOUND" = xno; then
31089 
31090     # Print a helpful message on how to acquire the necessary build dependency.
31091     # alsa is the help tag: freetyp2, cups, pulse, alsa etc
31092     MISSING_DEPENDENCY=alsa
31093     PKGHANDLER_COMMAND=
31094 
31095     case $PKGHANDLER in
31096         apt-get)
31097                 apt_help     $MISSING_DEPENDENCY ;;
31098     yum)
31099                 yum_help     $MISSING_DEPENDENCY ;;
31100         port)
31101                 port_help    $MISSING_DEPENDENCY ;;
31102         pkgutil)
31103                 pkgutil_help $MISSING_DEPENDENCY ;;
31104         pkgadd)
31105                 pkgadd_help  $MISSING_DEPENDENCY ;;
31106     * )
31107       break ;;
31108     esac
31109 
31110     if test "x$PKGHANDLER_COMMAND" != x; then
31111         HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
31112     fi
31113 
31114             as_fn_error $? "Could not find alsa! $HELP_MSG " "$LINENO" 5
31115         fi
31116 fi
31117 
31118 
31119 
31120 
31121 
31122 
31123 
31124 ###############################################################################
31125 #
31126 # Check for the jpeg library
31127 #
31128 
31129 USE_EXTERNAL_LIBJPEG=true
31130 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -ljpeg" >&5
31131 $as_echo_n "checking for main in -ljpeg... " >&6; }
31132 if ${ac_cv_lib_jpeg_main+:} false; then :
31133   $as_echo_n "(cached) " >&6
31134 else
31135   ac_check_lib_save_LIBS=$LIBS
31136 LIBS="-ljpeg  $LIBS"
31137 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31138 /* end confdefs.h.  */
31139 
31140 
31141 int
31142 main ()
31143 {
31144 return main ();
31145   ;
31146   return 0;
31147 }
31148 _ACEOF
31149 if ac_fn_cxx_try_link "$LINENO"; then :
31150   ac_cv_lib_jpeg_main=yes
31151 else
31152   ac_cv_lib_jpeg_main=no
31153 fi
31154 rm -f core conftest.err conftest.$ac_objext \
31155     conftest$ac_exeext conftest.$ac_ext
31156 LIBS=$ac_check_lib_save_LIBS
31157 fi
31158 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_jpeg_main" >&5
31159 $as_echo "$ac_cv_lib_jpeg_main" >&6; }
31160 if test "x$ac_cv_lib_jpeg_main" = xyes; then :
31161   cat >>confdefs.h <<_ACEOF
31162 #define HAVE_LIBJPEG 1
31163 _ACEOF
31164 
31165   LIBS="-ljpeg $LIBS"
31166 
31167 else
31168    USE_EXTERNAL_LIBJPEG=false
31169                { $as_echo "$as_me:${as_lineno-$LINENO}: Will use jpeg decoder bundled with the OpenJDK source" >&5
31170 $as_echo "$as_me: Will use jpeg decoder bundled with the OpenJDK source" >&6;}
31171 
31172 fi
31173 
31174 
31175 
31176 ###############################################################################
31177 #
31178 # Check for the gif library
31179 #
31180 
31181 USE_EXTERNAL_LIBJPEG=true
31182 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lgif" >&5
31183 $as_echo_n "checking for main in -lgif... " >&6; }
31184 if ${ac_cv_lib_gif_main+:} false; then :
31185   $as_echo_n "(cached) " >&6
31186 else
31187   ac_check_lib_save_LIBS=$LIBS
31188 LIBS="-lgif  $LIBS"
31189 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31190 /* end confdefs.h.  */
31191 
31192 
31193 int
31194 main ()
31195 {
31196 return main ();
31197   ;
31198   return 0;
31199 }
31200 _ACEOF
31201 if ac_fn_cxx_try_link "$LINENO"; then :
31202   ac_cv_lib_gif_main=yes
31203 else
31204   ac_cv_lib_gif_main=no
31205 fi
31206 rm -f core conftest.err conftest.$ac_objext \
31207     conftest$ac_exeext conftest.$ac_ext
31208 LIBS=$ac_check_lib_save_LIBS
31209 fi
31210 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gif_main" >&5
31211 $as_echo "$ac_cv_lib_gif_main" >&6; }
31212 if test "x$ac_cv_lib_gif_main" = xyes; then :
31213   cat >>confdefs.h <<_ACEOF
31214 #define HAVE_LIBGIF 1
31215 _ACEOF
31216 
31217   LIBS="-lgif $LIBS"
31218 
31219 else
31220    USE_EXTERNAL_LIBGIF=false
31221                { $as_echo "$as_me:${as_lineno-$LINENO}: Will use gif decoder bundled with the OpenJDK source" >&5
31222 $as_echo "$as_me: Will use gif decoder bundled with the OpenJDK source" >&6;}
31223 
31224 fi
31225 
31226 
31227 
31228 ###############################################################################
31229 #
31230 # Check for the zlib library
31231 #
31232 
31233 
31234 # Check whether --with-zlib was given.
31235 if test "${with_zlib+set}" = set; then :
31236   withval=$with_zlib;
31237 fi
31238 
31239 
31240 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compress in -lz" >&5
31241 $as_echo_n "checking for compress in -lz... " >&6; }
31242 if ${ac_cv_lib_z_compress+:} false; then :
31243   $as_echo_n "(cached) " >&6
31244 else
31245   ac_check_lib_save_LIBS=$LIBS
31246 LIBS="-lz  $LIBS"
31247 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31248 /* end confdefs.h.  */
31249 
31250 /* Override any GCC internal prototype to avoid an error.
31251    Use char because int might match the return type of a GCC
31252    builtin and then its argument prototype would still apply.  */
31253 #ifdef __cplusplus
31254 extern "C"
31255 #endif
31256 char compress ();
31257 int
31258 main ()
31259 {
31260 return compress ();
31261   ;
31262   return 0;
31263 }
31264 _ACEOF
31265 if ac_fn_cxx_try_link "$LINENO"; then :
31266   ac_cv_lib_z_compress=yes
31267 else
31268   ac_cv_lib_z_compress=no
31269 fi
31270 rm -f core conftest.err conftest.$ac_objext \
31271     conftest$ac_exeext conftest.$ac_ext
31272 LIBS=$ac_check_lib_save_LIBS
31273 fi
31274 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_compress" >&5
31275 $as_echo "$ac_cv_lib_z_compress" >&6; }
31276 if test "x$ac_cv_lib_z_compress" = xyes; then :
31277    ZLIB_FOUND=yes
31278 else
31279    ZLIB_FOUND=no
31280 fi
31281 
31282 
31283 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which zlib to use" >&5
31284 $as_echo_n "checking for which zlib to use... " >&6; }
31285 
31286 DEFAULT_ZLIB=bundled
31287 if test "x$OPENJDK_TARGET_OS" = xmacosx; then
31288 #
31289 # On macosx default is system...on others default is
31290 #
31291     DEFAULT_ZLIB=system
31292 fi
31293 
31294 if test "x${ZLIB_FOUND}" != "xyes"; then
31295 #
31296 # If we don't find any system...set default to bundled
31297 #
31298     DEFAULT_ZLIB=bundled
31299 fi
31300 
31301 #
31302 # If user didn't specify, use DEFAULT_ZLIB
31303 #
31304 if test "x${with_zlib}" = "x"; then
31305     with_zlib=${DEFAULT_ZLIB}
31306 fi
31307 
31308 if test "x${with_zlib}" = "xbundled"; then
31309     USE_EXTERNAL_LIBZ=false
31310     { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
31311 $as_echo "bundled" >&6; }
31312 elif test "x${with_zlib}" = "xsystem"; then
31313     if test "x${ZLIB_FOUND}" = "xyes"; then
31314         USE_EXTERNAL_LIBZ=true
31315         { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
31316 $as_echo "system" >&6; }
31317     else
31318         { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
31319 $as_echo "system not found" >&6; }
31320         as_fn_error $? "--with-zlib=system specified, but no zlib found!" "$LINENO" 5
31321     fi
31322 else
31323     as_fn_error $? "Invalid value for --with-zlib: ${with_zlib}, use 'system' or 'bundled'" "$LINENO" 5
31324 fi
31325 
31326 
31327 
31328 ###############################################################################
31329 LIBZIP_CAN_USE_MMAP=true
31330 
31331 
31332 
31333 ###############################################################################
31334 #
31335 # Check if altzone exists in time.h
31336 #
31337 
31338 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31339 /* end confdefs.h.  */
31340 #include <time.h>
31341 int
31342 main ()
31343 {
31344 return (int)altzone;
31345   ;
31346   return 0;
31347 }
31348 _ACEOF
31349 if ac_fn_cxx_try_link "$LINENO"; then :
31350   has_altzone=yes
31351 else
31352   has_altzone=no
31353 fi
31354 rm -f core conftest.err conftest.$ac_objext \
31355     conftest$ac_exeext conftest.$ac_ext
31356 if test "x$has_altzone" = xyes; then
31357 
31358 $as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
31359 
31360 fi
31361 
31362 ###############################################################################
31363 #
31364 # Check the maths library
31365 #
31366 
31367 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cos in -lm" >&5
31368 $as_echo_n "checking for cos in -lm... " >&6; }
31369 if ${ac_cv_lib_m_cos+:} false; then :
31370   $as_echo_n "(cached) " >&6
31371 else
31372   ac_check_lib_save_LIBS=$LIBS
31373 LIBS="-lm  $LIBS"
31374 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31375 /* end confdefs.h.  */
31376 
31377 /* Override any GCC internal prototype to avoid an error.
31378    Use char because int might match the return type of a GCC
31379    builtin and then its argument prototype would still apply.  */
31380 #ifdef __cplusplus
31381 extern "C"
31382 #endif
31383 char cos ();
31384 int
31385 main ()
31386 {
31387 return cos ();
31388   ;
31389   return 0;
31390 }
31391 _ACEOF
31392 if ac_fn_cxx_try_link "$LINENO"; then :
31393   ac_cv_lib_m_cos=yes
31394 else
31395   ac_cv_lib_m_cos=no
31396 fi
31397 rm -f core conftest.err conftest.$ac_objext \
31398     conftest$ac_exeext conftest.$ac_ext
31399 LIBS=$ac_check_lib_save_LIBS
31400 fi
31401 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_cos" >&5
31402 $as_echo "$ac_cv_lib_m_cos" >&6; }
31403 if test "x$ac_cv_lib_m_cos" = xyes; then :
31404   cat >>confdefs.h <<_ACEOF
31405 #define HAVE_LIBM 1
31406 _ACEOF
31407 
31408   LIBS="-lm $LIBS"
31409 
31410 else
31411 
31412                   { $as_echo "$as_me:${as_lineno-$LINENO}: Maths library was not found" >&5
31413 $as_echo "$as_me: Maths library was not found" >&6;}
31414 
31415 fi
31416 
31417 
31418 
31419 ###############################################################################
31420 #
31421 # Check for libdl.so
31422 
31423 save_LIBS="$LIBS"
31424 LIBS=""
31425 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
31426 $as_echo_n "checking for dlopen in -ldl... " >&6; }
31427 if ${ac_cv_lib_dl_dlopen+:} false; then :
31428   $as_echo_n "(cached) " >&6
31429 else
31430   ac_check_lib_save_LIBS=$LIBS
31431 LIBS="-ldl  $LIBS"
31432 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31433 /* end confdefs.h.  */
31434 
31435 /* Override any GCC internal prototype to avoid an error.
31436    Use char because int might match the return type of a GCC
31437    builtin and then its argument prototype would still apply.  */
31438 #ifdef __cplusplus
31439 extern "C"
31440 #endif
31441 char dlopen ();
31442 int
31443 main ()
31444 {
31445 return dlopen ();
31446   ;
31447   return 0;
31448 }
31449 _ACEOF
31450 if ac_fn_cxx_try_link "$LINENO"; then :
31451   ac_cv_lib_dl_dlopen=yes
31452 else
31453   ac_cv_lib_dl_dlopen=no
31454 fi
31455 rm -f core conftest.err conftest.$ac_objext \
31456     conftest$ac_exeext conftest.$ac_ext
31457 LIBS=$ac_check_lib_save_LIBS
31458 fi
31459 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
31460 $as_echo "$ac_cv_lib_dl_dlopen" >&6; }
31461 if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
31462   cat >>confdefs.h <<_ACEOF
31463 #define HAVE_LIBDL 1
31464 _ACEOF
31465 
31466   LIBS="-ldl $LIBS"
31467 
31468 fi
31469 
31470 LIBDL="$LIBS"
31471 
31472 LIBS="$save_LIBS"
31473 
31474 
31475 
31476 ###############################################################################
31477 #
31478 # statically link libstdc++ before C++ ABI is stablized on Linux unless
31479 # dynamic build is configured on command line.
31480 #
31481 
31482 # Check whether --with-stdc++lib was given.
31483 if test "${with_stdc__lib+set}" = set; then :
31484   withval=$with_stdc__lib;
31485     if test "x$with_stdc__lib" != xdynamic && test "x$with_stdc__lib" != xstatic \
31486         && test "x$with_stdc__lib" != xdefault; then
31487       as_fn_error $? "Bad parameter value --with-stdc++lib=$with_stdc__lib!" "$LINENO" 5
31488     fi
31489 
31490 else
31491   with_stdc__lib=default
31492 
31493 fi
31494 
31495 
31496 if test "x$OPENJDK_TARGET_OS" = xlinux; then
31497     # Test if -lstdc++ works.
31498     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if dynamic link of stdc++ is possible" >&5
31499 $as_echo_n "checking if dynamic link of stdc++ is possible... " >&6; }
31500     ac_ext=cpp
31501 ac_cpp='$CXXCPP $CPPFLAGS'
31502 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31503 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31504 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
31505 
31506     OLD_CXXFLAGS="$CXXFLAGS"
31507     CXXFLAGS="$CXXFLAGS -lstdc++"
31508     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31509 /* end confdefs.h.  */
31510 
31511 int
31512 main ()
31513 {
31514 return 0;
31515   ;
31516   return 0;
31517 }
31518 _ACEOF
31519 if ac_fn_cxx_try_link "$LINENO"; then :
31520   has_dynamic_libstdcxx=yes
31521 else
31522   has_dynamic_libstdcxx=no
31523 fi
31524 rm -f core conftest.err conftest.$ac_objext \
31525     conftest$ac_exeext conftest.$ac_ext
31526     CXXFLAGS="$OLD_CXXFLAGS"
31527     ac_ext=cpp
31528 ac_cpp='$CXXCPP $CPPFLAGS'
31529 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31530 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31531 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
31532 
31533     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_dynamic_libstdcxx" >&5
31534 $as_echo "$has_dynamic_libstdcxx" >&6; }
31535 
31536     # Test if stdc++ can be linked statically.
31537     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static link of stdc++ is possible" >&5
31538 $as_echo_n "checking if static link of stdc++ is possible... " >&6; }
31539     STATIC_STDCXX_FLAGS="-Wl,-Bstatic -lstdc++ -lgcc -Wl,-Bdynamic"
31540     ac_ext=cpp
31541 ac_cpp='$CXXCPP $CPPFLAGS'
31542 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31543 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31544 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
31545 
31546     OLD_LIBS="$LIBS"
31547     OLD_CXX="$CXX"
31548     LIBS="$STATIC_STDCXX_FLAGS"
31549     CXX="$CC"
31550     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31551 /* end confdefs.h.  */
31552 
31553 int
31554 main ()
31555 {
31556 return 0;
31557   ;
31558   return 0;
31559 }
31560 _ACEOF
31561 if ac_fn_cxx_try_link "$LINENO"; then :
31562   has_static_libstdcxx=yes
31563 else
31564   has_static_libstdcxx=no
31565 fi
31566 rm -f core conftest.err conftest.$ac_objext \
31567     conftest$ac_exeext conftest.$ac_ext
31568     LIBS="$OLD_LIBS"
31569     CXX="$OLD_CXX"
31570     ac_ext=cpp
31571 ac_cpp='$CXXCPP $CPPFLAGS'
31572 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31573 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31574 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
31575 
31576     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_static_libstdcxx" >&5
31577 $as_echo "$has_static_libstdcxx" >&6; }
31578 
31579     if test "x$has_static_libstdcxx" = xno && test "x$has_dynamic_libstdcxx" = xno; then
31580         as_fn_error $? "Cannot link to stdc++, neither dynamically nor statically!" "$LINENO" 5
31581     fi
31582 
31583     if test "x$with_stdc__lib" = xstatic && test "x$has_static_libstdcxx" = xno; then
31584         as_fn_error $? "Static linking of libstdc++ was not possible!" "$LINENO" 5
31585     fi
31586 
31587     if test "x$with_stdc__lib" = xdynamic && test "x$has_dynamic_libstdcxx" = xno; then
31588         as_fn_error $? "Dynamic linking of libstdc++ was not possible!" "$LINENO" 5
31589     fi
31590 
31591     { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libstdc++" >&5
31592 $as_echo_n "checking how to link with libstdc++... " >&6; }
31593     # If dynamic was requested, it's available since it would fail above otherwise.
31594     # If dynamic wasn't requested, go with static unless it isn't available.
31595     if test "x$with_stdc__lib" = xdynamic || test "x$has_static_libstdcxx" = xno; then
31596         LIBCXX="$LIBCXX -lstdc++"
31597         LDCXX="$CXX"
31598         STATIC_CXX_SETTING="STATIC_CXX=false"
31599         { $as_echo "$as_me:${as_lineno-$LINENO}: result: dynamic" >&5
31600 $as_echo "dynamic" >&6; }
31601     else
31602         LIBCXX="$LIBCXX $STATIC_STDCXX_FLAGS"
31603         LDCXX="$CC"
31604         STATIC_CXX_SETTING="STATIC_CXX=true"
31605         { $as_echo "$as_me:${as_lineno-$LINENO}: result: static" >&5
31606 $as_echo "static" >&6; }
31607     fi
31608 fi
31609 
31610 
31611 # libCrun is the c++ runtime-library with SunStudio (roughly the equivalent of gcc's libstdc++.so)
31612 if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$LIBCXX" = x; then
31613     LIBCXX="/usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libCrun.so.1"
31614 fi
31615 
31616 # TODO better (platform agnostic) test
31617 if test "x$OPENJDK_TARGET_OS" = xmacosx && test "x$LIBCXX" = x && test "x$GCC" = xyes; then
31618     LIBCXX="-lstdc++"
31619 fi
31620 
31621 
31622 
31623 
31624 
31625 # After we have toolchain and the paths to all libraries (needed by msys), we can compile the fixpath helper
31626 
31627 # When using cygwin or msys, we need a wrapper binary that renames
31628 # /cygdrive/c/ arguments into c:/ arguments and peeks into
31629 # @files and rewrites these too! This wrapper binary is
31630 # called fixpath.
31631 FIXPATH=
31632 if test "x$OPENJDK_BUILD_OS" = xwindows; then
31633     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath can be created" >&5
31634 $as_echo_n "checking if fixpath can be created... " >&6; }
31635     FIXPATH_SRC="$SRC_ROOT/common/src/fixpath.c"
31636     FIXPATH_BIN="$OUTPUT_ROOT/fixpath.exe"
31637     if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
31638       FIXPATH_SRC=`$CYGPATH -m $FIXPATH_SRC`
31639       FIXPATH_BIN=`$CYGPATH -m $FIXPATH_BIN`
31640       # Important to keep the .exe suffix on Cygwin for Hotspot makefiles
31641       FIXPATH="$OUTPUT_ROOT/fixpath.exe -c"
31642     elif test "x$OPENJDK_BUILD_OS_ENV" = xwindows.msys; then
31643       FIXPATH_SRC=`cmd //c echo $FIXPATH_SRC`
31644       FIXPATH_BIN=`cmd //c echo $FIXPATH_BIN`
31645 
31646       # Take all collected prefixes and turn them into a -m/c/foo@/c/bar@... command line
31647       # @ was chosen as separator to minimize risk of other tools messing around with it
31648       all_unique_prefixes=`echo "${all_fixpath_prefixes[@]}" | tr ' ' '\n' | grep '^/./' | sort | uniq`
31649       fixpath_argument_list=`echo $all_unique_prefixes  | tr ' ' '@'`
31650 
31651       FIXPATH="$OUTPUT_ROOT/fixpath -m$fixpath_argument_list"
31652     fi
31653     rm -f $OUTPUT_ROOT/fixpath*
31654     cd $OUTPUT_ROOT
31655     $CC $FIXPATH_SRC -Fe$FIXPATH_BIN > $OUTPUT_ROOT/fixpath1.log 2>&1
31656     cd $CURDIR
31657 
31658     if test ! -x $OUTPUT_ROOT/fixpath.exe; then
31659         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31660 $as_echo "no" >&6; }
31661         cat $OUTPUT_ROOT/fixpath1.log
31662         as_fn_error $? "Could not create $OUTPUT_ROOT/fixpath.exe" "$LINENO" 5
31663     fi
31664     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
31665 $as_echo "yes" >&6; }
31666     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath.exe works" >&5
31667 $as_echo_n "checking if fixpath.exe works... " >&6; }
31668     cd $OUTPUT_ROOT
31669     $FIXPATH $CC $SRC_ROOT/common/src/fixpath.c -Fe$OUTPUT_ROOT/fixpath2.exe > $OUTPUT_ROOT/fixpath2.log 2>&1
31670     cd $CURDIR
31671     if test ! -x $OUTPUT_ROOT/fixpath2.exe; then
31672         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31673 $as_echo "no" >&6; }
31674         cat $OUTPUT_ROOT/fixpath2.log
31675         as_fn_error $? "fixpath did not work!" "$LINENO" 5
31676     fi
31677     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
31678 $as_echo "yes" >&6; }
31679     rm -f $OUTPUT_ROOT/fixpath?.??? $OUTPUT_ROOT/fixpath.obj
31680 fi
31681 
31682 
31683 
31684 
31685 ###############################################################################
31686 #
31687 # We need to do some final tweaking, when everything else is done.
31688 #
31689 ###############################################################################
31690 
31691 
31692 HOTSPOT_MAKE_ARGS="$HOTSPOT_TARGET"
31693 
31694 
31695 # The name of the Service Agent jar.
31696 SALIB_NAME="${LIBRARY_PREFIX}saproc${SHARED_LIBRARY_SUFFIX}"
31697 if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
31698   SALIB_NAME="${LIBRARY_PREFIX}sawindbg${SHARED_LIBRARY_SUFFIX}"
31699 fi
31700 
31701 
31702 
31703 
31704 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if elliptic curve crypto implementation is present" >&5
31705 $as_echo_n "checking if elliptic curve crypto implementation is present... " >&6; }
31706 
31707 if test -d "${SRC_ROOT}/jdk/src/share/native/sun/security/ec/impl"; then
31708     ENABLE_INTREE_EC=yes
31709     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
31710 $as_echo "yes" >&6; }
31711 else
31712     ENABLE_INTREE_EC=no
31713     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31714 $as_echo "no" >&6; }
31715 fi
31716 
31717 
31718 
31719 
31720 ###############################################################################
31721 #
31722 # Configure parts of the build that only affect the build performance,
31723 # not the result.
31724 #
31725 ###############################################################################
31726 
31727 
31728   # How many cores do we have on this build system?
31729 
31730 # Check whether --with-num-cores was given.
31731 if test "${with_num_cores+set}" = set; then :
31732   withval=$with_num_cores;
31733 fi
31734 
31735   if test "x$with_num_cores" = x; then
31736     # The number of cores were not specified, try to probe them.
31737 
31738     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for number of cores" >&5
31739 $as_echo_n "checking for number of cores... " >&6; }
31740     NUM_CORES=1
31741     FOUND_CORES=no
31742 
31743     if test -f /proc/cpuinfo; then
31744         # Looks like a Linux (or cygwin) system
31745         NUM_CORES=`cat /proc/cpuinfo  | grep -c processor`
31746         FOUND_CORES=yes
31747     elif test -x /usr/sbin/psrinfo; then
31748         # Looks like a Solaris system
31749         NUM_CORES=`LC_MESSAGES=C /usr/sbin/psrinfo -v | grep -c on-line`
31750         FOUND_CORES=yes
31751     elif test -x /usr/sbin/system_profiler; then
31752         # Looks like a MacOSX system
31753         NUM_CORES=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Cores' | awk  '{print $5}'`
31754         FOUND_CORES=yes
31755     elif test -n "$NUMBER_OF_PROCESSORS"; then
31756         # On windows, look in the env
31757         NUM_CORES=$NUMBER_OF_PROCESSORS
31758         FOUND_CORES=yes
31759     fi
31760 
31761     if test "x$FOUND_CORES" = xyes; then
31762         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NUM_CORES" >&5
31763 $as_echo "$NUM_CORES" >&6; }
31764     else
31765         { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect number of cores, defaulting to 1" >&5
31766 $as_echo "could not detect number of cores, defaulting to 1" >&6; }
31767         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This will disable all parallelism from build!" >&5
31768 $as_echo "$as_me: WARNING: This will disable all parallelism from build!" >&2;}
31769     fi
31770 
31771 
31772   else
31773     NUM_CORES=$with_num_cores
31774   fi
31775 
31776 
31777 
31778   # How much memory do we have on this build system?
31779 
31780 # Check whether --with-memory-size was given.
31781 if test "${with_memory_size+set}" = set; then :
31782   withval=$with_memory_size;
31783 fi
31784 
31785   if test "x$with_memory_size" = x; then
31786     # The memory size was not specified, try to probe it.
31787 
31788     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for memory size" >&5
31789 $as_echo_n "checking for memory size... " >&6; }
31790     # Default to 1024 MB
31791     MEMORY_SIZE=1024
31792     FOUND_MEM=no
31793 
31794     if test -f /proc/meminfo; then
31795         # Looks like a Linux (or cygwin) system
31796         MEMORY_SIZE=`cat /proc/meminfo | grep MemTotal | awk '{print $2}'`
31797         MEMORY_SIZE=`expr $MEMORY_SIZE / 1024`
31798         FOUND_MEM=yes
31799     elif test -x /usr/sbin/prtconf; then
31800         # Looks like a Solaris system
31801         MEMORY_SIZE=`/usr/sbin/prtconf | grep "Memory size" | awk '{ print $3 }'`
31802         FOUND_MEM=yes
31803     elif test -x /usr/sbin/system_profiler; then
31804         # Looks like a MacOSX system
31805         MEMORY_SIZE=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Memory' | awk  '{print $2}'`
31806         MEMORY_SIZE=`expr $MEMORY_SIZE \* 1024`
31807         FOUND_MEM=yes
31808     elif test "x$OPENJDK_BUILD_OS" = xwindows; then
31809         # Windows, but without cygwin
31810         MEMORY_SIZE=`wmic computersystem get totalphysicalmemory -value | grep = | cut -d "=" -f 2-`
31811         MEMORY_SIZE=`expr $MEMORY_SIZE / 1024 / 1024`
31812         FOUND_MEM=yes
31813     fi
31814 
31815     if test "x$FOUND_MEM" = xyes; then
31816         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MEMORY_SIZE MB" >&5
31817 $as_echo "$MEMORY_SIZE MB" >&6; }
31818     else
31819         { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect memory size, defaulting to 1024 MB" >&5
31820 $as_echo "could not detect memory size, defaulting to 1024 MB" >&6; }
31821         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This might seriously impact build performance!" >&5
31822 $as_echo "$as_me: WARNING: This might seriously impact build performance!" >&2;}
31823     fi
31824 
31825   else
31826     MEMORY_SIZE=$with_memory_size
31827   fi
31828 
31829 
31830 
31831   # Provide a decent default number of parallel jobs for make depending on
31832   # number of cores, amount of memory and machine architecture.
31833 
31834 # Check whether --with-jobs was given.
31835 if test "${with_jobs+set}" = set; then :
31836   withval=$with_jobs;
31837 fi
31838 
31839   if test "x$with_jobs" = x; then
31840     # Number of jobs was not specified, calculate.
31841     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for appropriate number of jobs to run in parallel" >&5
31842 $as_echo_n "checking for appropriate number of jobs to run in parallel... " >&6; }
31843     # Approximate memory in GB, rounding up a bit.
31844     memory_gb=`expr $MEMORY_SIZE / 1100`
31845     # Pick the lowest of memory in gb and number of cores.
31846     if test "$memory_gb" -lt "$NUM_CORES"; then
31847       JOBS="$memory_gb"
31848     else
31849       JOBS="$NUM_CORES"
31850       # On bigger machines, leave some room for other processes to run
31851       if test "$JOBS" -gt "4"; then
31852         JOBS=`expr $JOBS '*' 90 / 100`
31853       fi
31854     fi
31855     # Cap number of jobs to 16
31856     if test "$JOBS" -gt "16"; then
31857       JOBS=16
31858     fi
31859     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JOBS" >&5
31860 $as_echo "$JOBS" >&6; }
31861   else
31862     JOBS=$with_jobs
31863   fi
31864 
31865 
31866 
31867 # Setup smart javac (after cores and memory have been setup)
31868 
31869 
31870 # Check whether --with-sjavac-server-java was given.
31871 if test "${with_sjavac_server_java+set}" = set; then :
31872   withval=$with_sjavac_server_java;
31873 fi
31874 
31875 
31876 if test "x$with_sjavac_server_java" != x; then
31877     SJAVAC_SERVER_JAVA="$with_sjavac_server_java"
31878     FOUND_VERSION=`$SJAVAC_SERVER_JAVA -version 2>&1 | grep " version \""`
31879     if test "x$FOUND_VERSION" = x; then
31880         as_fn_error $? "Could not execute server java: $SJAVAC_SERVER_JAVA" "$LINENO" 5
31881     fi
31882 else
31883     SJAVAC_SERVER_JAVA=""
31884     # Hotspot specific options.
31885 
31886     # Test if -verbosegc is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
31887     # If so, then append -verbosegc to SJAVAC_SERVER_JAVA
31888     FOUND_WARN=`$JAVA -verbosegc -version 2>&1 | grep -i warn`
31889     FOUND_VERSION=`$JAVA -verbosegc -version 2>&1 | grep " version \""`
31890     if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
31891         SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -verbosegc"
31892     fi
31893 
31894     # JRockit specific options.
31895 
31896     # Test if -Xverbose:gc is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
31897     # If so, then append -Xverbose:gc to SJAVAC_SERVER_JAVA
31898     FOUND_WARN=`$JAVA -Xverbose:gc -version 2>&1 | grep -i warn`
31899     FOUND_VERSION=`$JAVA -Xverbose:gc -version 2>&1 | grep " version \""`
31900     if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
31901         SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xverbose:gc"
31902     fi
31903 
31904     SJAVAC_SERVER_JAVA="$JAVA $SJAVAC_SERVER_JAVA"
31905 fi
31906 
31907 
31908 
31909 # Check whether --with-sjavac-server-cores was given.
31910 if test "${with_sjavac_server_cores+set}" = set; then :
31911   withval=$with_sjavac_server_cores;
31912 fi
31913 
31914 if test "x$with_sjavac_server_cores" != x; then
31915     SJAVAC_SERVER_CORES="$with_sjavac_server_cores"
31916 else
31917     if test "$NUM_CORES" -gt 16; then
31918         # We set this arbitrary limit because we want to limit the heap
31919         # size of the javac server.
31920         # In the future we will make the javac compilers in the server
31921         # share more and more state, thus enabling us to use more and
31922         # more concurrent threads in the server.
31923         SJAVAC_SERVER_CORES="16"
31924     else
31925         SJAVAC_SERVER_CORES="$NUM_CORES"
31926     fi
31927 
31928     if test "$MEMORY_SIZE" -gt "17000"; then
31929         MAX_HEAP_MEM=10000
31930 
31931     # Test if -d64 is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
31932     # If so, then append -d64 to SJAVAC_SERVER_JAVA
31933     FOUND_WARN=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1 | grep -i warn`
31934     FOUND_VERSION=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1 | grep " version \""`
31935     if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
31936         SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -d64"
31937     fi
31938 
31939 
31940     # Test if -Xms10G -Xmx10G is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
31941     # If so, then append -Xms10G -Xmx10G to SJAVAC_SERVER_JAVA
31942     FOUND_WARN=`$SJAVAC_SERVER_JAVA -Xms10G -Xmx10G -version 2>&1 | grep -i warn`
31943     FOUND_VERSION=`$SJAVAC_SERVER_JAVA -Xms10G -Xmx10G -version 2>&1 | grep " version \""`
31944     if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
31945         SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms10G -Xmx10G"
31946     fi
31947 
31948     elif test "$MEMORY_SIZE" -gt "10000"; then
31949         MAX_HEAP_MEM=6000
31950 
31951     # Test if -d64 is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
31952     # If so, then append -d64 to SJAVAC_SERVER_JAVA
31953     FOUND_WARN=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1 | grep -i warn`
31954     FOUND_VERSION=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1 | grep " version \""`
31955     if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
31956         SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -d64"
31957     fi
31958 
31959 
31960     # Test if -Xms6G -Xmx6G is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
31961     # If so, then append -Xms6G -Xmx6G to SJAVAC_SERVER_JAVA
31962     FOUND_WARN=`$SJAVAC_SERVER_JAVA -Xms6G -Xmx6G -version 2>&1 | grep -i warn`
31963     FOUND_VERSION=`$SJAVAC_SERVER_JAVA -Xms6G -Xmx6G -version 2>&1 | grep " version \""`
31964     if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
31965         SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms6G -Xmx6G"
31966     fi
31967 
31968     elif test "$MEMORY_SIZE" -gt "5000"; then
31969         MAX_HEAP_MEM=3000
31970 
31971     # Test if -d64 is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
31972     # If so, then append -d64 to SJAVAC_SERVER_JAVA
31973     FOUND_WARN=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1 | grep -i warn`
31974     FOUND_VERSION=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1 | grep " version \""`
31975     if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
31976         SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -d64"
31977     fi
31978 
31979 
31980     # Test if -Xms1G -Xmx3G is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
31981     # If so, then append -Xms1G -Xmx3G to SJAVAC_SERVER_JAVA
31982     FOUND_WARN=`$SJAVAC_SERVER_JAVA -Xms1G -Xmx3G -version 2>&1 | grep -i warn`
31983     FOUND_VERSION=`$SJAVAC_SERVER_JAVA -Xms1G -Xmx3G -version 2>&1 | grep " version \""`
31984     if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
31985         SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms1G -Xmx3G"
31986     fi
31987 
31988     elif test "$MEMORY_SIZE" -gt "3800"; then
31989         MAX_HEAP_MEM=2500
31990 
31991     # Test if -Xms1G -Xmx2500M is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
31992     # If so, then append -Xms1G -Xmx2500M to SJAVAC_SERVER_JAVA
31993     FOUND_WARN=`$SJAVAC_SERVER_JAVA -Xms1G -Xmx2500M -version 2>&1 | grep -i warn`
31994     FOUND_VERSION=`$SJAVAC_SERVER_JAVA -Xms1G -Xmx2500M -version 2>&1 | grep " version \""`
31995     if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
31996         SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms1G -Xmx2500M"
31997     fi
31998 
31999     elif test "$MEMORY_SIZE" -gt "1900"; then
32000         MAX_HEAP_MEM=1200
32001 
32002     # Test if -Xms700M -Xmx1400M is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
32003     # If so, then append -Xms700M -Xmx1400M to SJAVAC_SERVER_JAVA
32004     FOUND_WARN=`$SJAVAC_SERVER_JAVA -Xms700M -Xmx1400M -version 2>&1 | grep -i warn`
32005     FOUND_VERSION=`$SJAVAC_SERVER_JAVA -Xms700M -Xmx1400M -version 2>&1 | grep " version \""`
32006     if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
32007         SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms700M -Xmx1400M"
32008     fi
32009 
32010     elif test "$MEMORY_SIZE" -gt "1000"; then
32011         MAX_HEAP_MEM=900
32012 
32013     # Test if -Xms400M -Xmx1100M is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
32014     # If so, then append -Xms400M -Xmx1100M to SJAVAC_SERVER_JAVA
32015     FOUND_WARN=`$SJAVAC_SERVER_JAVA -Xms400M -Xmx1100M -version 2>&1 | grep -i warn`
32016     FOUND_VERSION=`$SJAVAC_SERVER_JAVA -Xms400M -Xmx1100M -version 2>&1 | grep " version \""`
32017     if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
32018         SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms400M -Xmx1100M"
32019     fi
32020 
32021     else
32022         MAX_HEAP_MEM=512
32023 
32024     # Test if -Xms256M -Xmx512M is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
32025     # If so, then append -Xms256M -Xmx512M to SJAVAC_SERVER_JAVA
32026     FOUND_WARN=`$SJAVAC_SERVER_JAVA -Xms256M -Xmx512M -version 2>&1 | grep -i warn`
32027     FOUND_VERSION=`$SJAVAC_SERVER_JAVA -Xms256M -Xmx512M -version 2>&1 | grep " version \""`
32028     if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
32029         SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms256M -Xmx512M"
32030     fi
32031 
32032     fi
32033 
32034 
32035     # Test if -XX:PermSize=32m is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
32036     # If so, then append -XX:PermSize=32m to SJAVAC_SERVER_JAVA
32037     FOUND_WARN=`$SJAVAC_SERVER_JAVA -XX:PermSize=32m -version 2>&1 | grep -i warn`
32038     FOUND_VERSION=`$SJAVAC_SERVER_JAVA -XX:PermSize=32m -version 2>&1 | grep " version \""`
32039     if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
32040         SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -XX:PermSize=32m"
32041     fi
32042 
32043 
32044     # Test if -XX:MaxPermSize=160m is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
32045     # If so, then append -XX:MaxPermSize=160m to SJAVAC_SERVER_JAVA
32046     FOUND_WARN=`$SJAVAC_SERVER_JAVA -XX:MaxPermSize=160m -version 2>&1 | grep -i warn`
32047     FOUND_VERSION=`$SJAVAC_SERVER_JAVA -XX:MaxPermSize=160m -version 2>&1 | grep " version \""`
32048     if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
32049         SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -XX:MaxPermSize=160m"
32050     fi
32051 
32052 
32053     # Test if -XX:ThreadStackSize=$STACK_SIZE is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
32054     # If so, then append -XX:ThreadStackSize=$STACK_SIZE to SJAVAC_SERVER_JAVA
32055     FOUND_WARN=`$SJAVAC_SERVER_JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1 | grep -i warn`
32056     FOUND_VERSION=`$SJAVAC_SERVER_JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1 | grep " version \""`
32057     if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
32058         SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -XX:ThreadStackSize=$STACK_SIZE"
32059     fi
32060 
32061 
32062     MAX_COMPILERS_IN_HEAP=`expr $MAX_HEAP_MEM / 501`
32063     if test "$SJAVAC_SERVER_CORES" -gt "$MAX_COMPILERS_IN_HEAP"; then
32064         { $as_echo "$as_me:${as_lineno-$LINENO}: checking if number of server cores must be reduced" >&5
32065 $as_echo_n "checking if number of server cores must be reduced... " >&6; }
32066         SJAVAC_SERVER_CORES="$MAX_COMPILERS_IN_HEAP"
32067         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, to $SJAVAC_SERVER_CORES with max heap size $MAX_HEAP_MEM MB" >&5
32068 $as_echo "yes, to $SJAVAC_SERVER_CORES with max heap size $MAX_HEAP_MEM MB" >&6; }
32069     fi
32070 fi
32071 
32072 
32073 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use sjavac" >&5
32074 $as_echo_n "checking whether to use sjavac... " >&6; }
32075 # Check whether --enable-sjavac was given.
32076 if test "${enable_sjavac+set}" = set; then :
32077   enableval=$enable_sjavac; ENABLE_SJAVAC="${enableval}"
32078 else
32079   ENABLE_SJAVAC='no'
32080 fi
32081 
32082 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_SJAVAC" >&5
32083 $as_echo "$ENABLE_SJAVAC" >&6; }
32084 
32085 
32086 if test "x$ENABLE_SJAVAC" = xyes; then
32087     SJAVAC_SERVER_DIR="$OUTPUT_ROOT/javacservers"
32088 else
32089     SJAVAC_SERVER_DIR=
32090 fi
32091 
32092 
32093 
32094 
32095 # Can the C/C++ compiler use precompiled headers?
32096 
32097 
32098 ###############################################################################
32099 #
32100 # Can the C/C++ compiler use precompiled headers?
32101 #
32102 # Check whether --enable-precompiled-headers was given.
32103 if test "${enable_precompiled_headers+set}" = set; then :
32104   enableval=$enable_precompiled_headers; ENABLE_PRECOMPH=${enable_precompiled_headers}
32105 else
32106   ENABLE_PRECOMPH=yes
32107 fi
32108 
32109 
32110 USE_PRECOMPILED_HEADER=1
32111 if test "x$ENABLE_PRECOMPH" = xno; then
32112     USE_PRECOMPILED_HEADER=0
32113 fi
32114 
32115 if test "x$ENABLE_PRECOMPH" = xyes; then
32116     # Check that the compiler actually supports precomp headers.
32117     if test "x$GCC" = xyes; then
32118          { $as_echo "$as_me:${as_lineno-$LINENO}: checking that precompiled headers work" >&5
32119 $as_echo_n "checking that precompiled headers work... " >&6; }
32120          echo "int alfa();" > conftest.h
32121          $CXX -x c++-header conftest.h -o conftest.hpp.gch 2>&5 >&5
32122          if test ! -f conftest.hpp.gch; then
32123              USE_PRECOMPILED_HEADER=0
32124              { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32125 $as_echo "no" >&6; }
32126          else
32127              { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
32128 $as_echo "yes" >&6; }
32129          fi
32130          rm -f conftest.h conftest.hpp.gch
32131     fi
32132 fi
32133 
32134 
32135 
32136 
32137 # Setup use of ccache, if available
32138 
32139     # Check whether --enable-ccache was given.
32140 if test "${enable_ccache+set}" = set; then :
32141   enableval=$enable_ccache; ENABLE_CCACHE=${enable_ccache}
32142 else
32143   ENABLE_CCACHE=yes
32144 fi
32145 
32146     if test "x$ENABLE_CCACHE" = xyes; then
32147         # Extract the first word of "ccache", so it can be a program name with args.
32148 set dummy ccache; ac_word=$2
32149 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32150 $as_echo_n "checking for $ac_word... " >&6; }
32151 if ${ac_cv_path_CCACHE+:} false; then :
32152   $as_echo_n "(cached) " >&6
32153 else
32154   case $CCACHE in
32155   [\\/]* | ?:[\\/]*)
32156   ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
32157   ;;
32158   *)
32159   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32160 for as_dir in $PATH
32161 do
32162   IFS=$as_save_IFS
32163   test -z "$as_dir" && as_dir=.
32164     for ac_exec_ext in '' $ac_executable_extensions; do
32165   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
32166     ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
32167     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32168     break 2
32169   fi
32170 done
32171   done
32172 IFS=$as_save_IFS
32173 
32174   ;;
32175 esac
32176 fi
32177 CCACHE=$ac_cv_path_CCACHE
32178 if test -n "$CCACHE"; then
32179   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
32180 $as_echo "$CCACHE" >&6; }
32181 else
32182   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32183 $as_echo "no" >&6; }
32184 fi
32185 
32186 
32187     else
32188         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ccache" >&5
32189 $as_echo_n "checking for ccache... " >&6; }
32190         { $as_echo "$as_me:${as_lineno-$LINENO}: result: explicitly disabled" >&5
32191 $as_echo "explicitly disabled" >&6; }
32192         CCACHE=
32193     fi
32194 
32195 
32196 
32197 # Check whether --with-ccache-dir was given.
32198 if test "${with_ccache_dir+set}" = set; then :
32199   withval=$with_ccache_dir;
32200 fi
32201 
32202 
32203     if test "x$with_ccache_dir" != x; then
32204         # When using a non home ccache directory, assume the use is to share ccache files
32205         # with other users. Thus change the umask.
32206         SET_CCACHE_DIR="CCACHE_DIR=$with_ccache_dir CCACHE_UMASK=002"
32207     fi
32208     CCACHE_FOUND=""
32209     if test "x$CCACHE" != x; then
32210 
32211     if test "x$CCACHE" != x; then
32212         CCACHE_FOUND="true"
32213         # Only use ccache if it is 3.1.4 or later, which supports
32214         # precompiled headers.
32215         { $as_echo "$as_me:${as_lineno-$LINENO}: checking if ccache supports precompiled headers" >&5
32216 $as_echo_n "checking if ccache supports precompiled headers... " >&6; }
32217         HAS_GOOD_CCACHE=`($CCACHE --version | head -n 1 | grep -E 3.1.[456789]) 2> /dev/null`
32218         if test "x$HAS_GOOD_CCACHE" = x; then
32219             { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, disabling ccache" >&5
32220 $as_echo "no, disabling ccache" >&6; }
32221             CCACHE=
32222         else
32223             { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
32224 $as_echo "yes" >&6; }
32225             { $as_echo "$as_me:${as_lineno-$LINENO}: checking if C-compiler supports ccache precompiled headers" >&5
32226 $as_echo_n "checking if C-compiler supports ccache precompiled headers... " >&6; }
32227             PUSHED_FLAGS="$CXXFLAGS"
32228             CXXFLAGS="-fpch-preprocess $CXXFLAGS"
32229             cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32230 /* end confdefs.h.  */
32231 
32232 int
32233 main ()
32234 {
32235 
32236   ;
32237   return 0;
32238 }
32239 _ACEOF
32240 if ac_fn_cxx_try_compile "$LINENO"; then :
32241   CC_KNOWS_CCACHE_TRICK=yes
32242 else
32243   CC_KNOWS_CCACHE_TRICK=no
32244 fi
32245 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
32246             CXXFLAGS="$PUSHED_FLAGS"
32247             if test "x$CC_KNOWS_CCACHE_TRICK" = xyes; then
32248                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
32249 $as_echo "yes" >&6; }
32250             else
32251                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, disabling ccaching of precompiled headers" >&5
32252 $as_echo "no, disabling ccaching of precompiled headers" >&6; }
32253                 CCACHE=
32254             fi
32255         fi
32256     fi
32257 
32258     if test "x$CCACHE" != x; then
32259         CCACHE_SLOPPINESS=time_macros
32260         CCACHE="CCACHE_COMPRESS=1 $SET_CCACHE_DIR CCACHE_SLOPPINESS=$CCACHE_SLOPPINESS $CCACHE"
32261         CCACHE_FLAGS=-fpch-preprocess
32262 
32263         if test "x$SET_CCACHE_DIR" != x; then
32264             mkdir -p $CCACHE_DIR > /dev/null 2>&1
32265             chmod a+rwxs $CCACHE_DIR > /dev/null 2>&1
32266         fi
32267     fi
32268 
32269     fi
32270 
32271 
32272 ###############################################################################
32273 #
32274 # And now the finish...
32275 #
32276 ###############################################################################
32277 
32278 # Check for some common pitfalls
32279 
32280   if test x"$OPENJDK_BUILD_OS" = xwindows; then
32281     file_to_test="$SRC_ROOT/LICENSE"
32282     if test `$STAT -c '%a' "$file_to_test"` -lt 400; then
32283       as_fn_error $? "Bad file permissions on src files. This is usually caused by cloning the repositories with a non cygwin hg in a directory not created in cygwin." "$LINENO" 5
32284     fi
32285   fi
32286 
32287 
32288 
32289 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if build directory is on local disk" >&5
32290 $as_echo_n "checking if build directory is on local disk... " >&6; }
32291 
32292         # df -l lists only local disks; if the given directory is not found then
32293         # a non-zero exit code is given
32294   if test "x$DF" = x; then
32295     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32296       # msys does not have df; use Windows "net use" instead.
32297       IS_NETWORK_DISK=`net use | grep \`pwd -W | cut -d ":" -f 1 | tr a-z A-Z\`:`
32298       if test "x$IS_NETWORK_DISK" = x; then
32299         OUTPUT_DIR_IS_LOCAL="yes"
32300       else
32301         OUTPUT_DIR_IS_LOCAL="no"
32302       fi
32303     else
32304       # No df here, say it's local
32305       OUTPUT_DIR_IS_LOCAL="yes"
32306     fi
32307   else
32308     if $DF -l $OUTPUT_ROOT > /dev/null 2>&1; then
32309       OUTPUT_DIR_IS_LOCAL="yes"
32310     else
32311       OUTPUT_DIR_IS_LOCAL="no"
32312     fi
32313   fi
32314 
32315 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_DIR_IS_LOCAL" >&5
32316 $as_echo "$OUTPUT_DIR_IS_LOCAL" >&6; }
32317 
32318 
32319 
32320 # Check if the user has any old-style ALT_ variables set.
32321 FOUND_ALT_VARIABLES=`env | grep ^ALT_`
32322 
32323 # Before generating output files, test if they exist. If they do, this is a reconfigure.
32324 # Since we can't properly handle the dependencies for this, warn the user about the situation
32325 if test -e $OUTPUT_ROOT/spec.gmk; then
32326   IS_RECONFIGURE=yes
32327 else
32328   IS_RECONFIGURE=no
32329 fi
32330 
32331 if test -e $SRC_ROOT/build/.hide-configure-performance-hints; then
32332   HIDE_PERFORMANCE_HINTS=yes
32333 else
32334   HIDE_PERFORMANCE_HINTS=no
32335   # Hide it the next time around...
32336   $TOUCH $SRC_ROOT/build/.hide-configure-performance-hints > /dev/null 2>&1
32337 fi
32338 
32339 
32340 
32341 # At the end, call the custom hook. (Dummy macro if no custom sources available)
32342 
32343 
32344 # We're messing a bit with internal autoconf variables to put the config.status
32345 # in the output directory instead of the current directory.
32346 CONFIG_STATUS="$OUTPUT_ROOT/config.status"
32347 # Create the actual output files. Now the main work of configure is done.
32348 cat >confcache <<\_ACEOF
32349 # This file is a shell script that caches the results of configure
32350 # tests run on this system so they can be shared between configure
32351 # scripts and configure runs, see configure's option --config-cache.
32352 # It is not useful on other systems.  If it contains results you don't
32353 # want to keep, you may remove or edit it.
32354 #
32355 # config.status only pays attention to the cache file if you give it
32356 # the --recheck option to rerun configure.
32357 #
32358 # `ac_cv_env_foo' variables (set or unset) will be overridden when
32359 # loading this file, other *unset* `ac_cv_foo' will be assigned the
32360 # following values.
32361 
32362 _ACEOF
32363 
32364 # The following way of writing the cache mishandles newlines in values,
32365 # but we know of no workaround that is simple, portable, and efficient.
32366 # So, we kill variables containing newlines.
32367 # Ultrix sh set writes to stderr and can't be redirected directly,
32368 # and sets the high bit in the cache file unless we assign to the vars.
32369 (
32370   for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
32371     eval ac_val=\$$ac_var
32372     case $ac_val in #(
32373     *${as_nl}*)
32374       case $ac_var in #(
32375       *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
32376 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
32377       esac
32378       case $ac_var in #(
32379       _ | IFS | as_nl) ;; #(
32380       BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
32381       *) { eval $ac_var=; unset $ac_var;} ;;
32382       esac ;;
32383     esac
32384   done
32385 
32386   (set) 2>&1 |
32387     case $as_nl`(ac_space=' '; set) 2>&1` in #(
32388     *${as_nl}ac_space=\ *)
32389       # `set' does not quote correctly, so add quotes: double-quote
32390       # substitution turns \\\\ into \\, and sed turns \\ into \.
32391       sed -n \
32392         "s/'/'\\\\''/g;
32393           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
32394       ;; #(
32395     *)
32396       # `set' quotes correctly as required by POSIX, so do not add quotes.
32397       sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
32398       ;;
32399     esac |
32400     sort
32401 ) |
32402   sed '
32403      /^ac_cv_env_/b end
32404      t clear
32405      :clear
32406      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
32407      t end
32408      s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
32409      :end' >>confcache
32410 if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
32411   if test -w "$cache_file"; then
32412     if test "x$cache_file" != "x/dev/null"; then
32413       { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
32414 $as_echo "$as_me: updating cache $cache_file" >&6;}
32415       if test ! -f "$cache_file" || test -h "$cache_file"; then
32416         cat confcache >"$cache_file"
32417       else
32418         case $cache_file in #(
32419         */* | ?:*)
32420           mv -f confcache "$cache_file"$$ &&
32421           mv -f "$cache_file"$$ "$cache_file" ;; #(
32422         *)
32423           mv -f confcache "$cache_file" ;;
32424         esac
32425       fi
32426     fi
32427   else
32428     { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
32429 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
32430   fi
32431 fi
32432 rm -f confcache
32433 
32434 test "x$prefix" = xNONE && prefix=$ac_default_prefix
32435 # Let make expand exec_prefix.
32436 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
32437 
32438 DEFS=-DHAVE_CONFIG_H
32439 
32440 ac_libobjs=
32441 ac_ltlibobjs=
32442 U=
32443 for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
32444   # 1. Remove the extension, and $U if already installed.
32445   ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
32446   ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
32447   # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
32448   #    will be set to the directory where LIBOBJS objects are built.
32449   as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
32450   as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
32451 done
32452 LIBOBJS=$ac_libobjs
32453 
32454 LTLIBOBJS=$ac_ltlibobjs
32455 
32456 
32457 
32458 : "${CONFIG_STATUS=./config.status}"
32459 ac_write_fail=0
32460 ac_clean_files_save=$ac_clean_files
32461 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
32462 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
32463 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
32464 as_write_fail=0
32465 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
32466 #! $SHELL
32467 # Generated by $as_me.
32468 # Run this file to recreate the current configuration.
32469 # Compiler output produced by configure, useful for debugging
32470 # configure, is in config.log if it exists.
32471 
32472 debug=false
32473 ac_cs_recheck=false
32474 ac_cs_silent=false
32475 
32476 SHELL=\${CONFIG_SHELL-$SHELL}
32477 export SHELL
32478 _ASEOF
32479 cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
32480 ## -------------------- ##
32481 ## M4sh Initialization. ##
32482 ## -------------------- ##
32483 
32484 # Be more Bourne compatible
32485 DUALCASE=1; export DUALCASE # for MKS sh
32486 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
32487   emulate sh
32488   NULLCMD=:
32489   # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
32490   # is contrary to our usage.  Disable this feature.
32491   alias -g '${1+"$@"}'='"$@"'
32492   setopt NO_GLOB_SUBST
32493 else
32494   case `(set -o) 2>/dev/null` in #(
32495   *posix*) :
32496     set -o posix ;; #(
32497   *) :
32498      ;;
32499 esac
32500 fi
32501 
32502 
32503 as_nl='
32504 '
32505 export as_nl
32506 # Printing a long string crashes Solaris 7 /usr/bin/printf.
32507 as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
32508 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
32509 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
32510 # Prefer a ksh shell builtin over an external printf program on Solaris,
32511 # but without wasting forks for bash or zsh.
32512 if test -z "$BASH_VERSION$ZSH_VERSION" \
32513     && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
32514   as_echo='print -r --'
32515   as_echo_n='print -rn --'
32516 elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
32517   as_echo='printf %s\n'
32518   as_echo_n='printf %s'
32519 else
32520   if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
32521     as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
32522     as_echo_n='/usr/ucb/echo -n'
32523   else
32524     as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
32525     as_echo_n_body='eval
32526       arg=$1;
32527       case $arg in #(
32528       *"$as_nl"*)
32529         expr "X$arg" : "X\\(.*\\)$as_nl";
32530         arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
32531       esac;
32532       expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
32533     '
32534     export as_echo_n_body
32535     as_echo_n='sh -c $as_echo_n_body as_echo'
32536   fi
32537   export as_echo_body
32538   as_echo='sh -c $as_echo_body as_echo'
32539 fi
32540 
32541 # The user is always right.
32542 if test "${PATH_SEPARATOR+set}" != set; then
32543   PATH_SEPARATOR=:
32544   (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
32545     (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
32546       PATH_SEPARATOR=';'
32547   }
32548 fi
32549 
32550 
32551 # IFS
32552 # We need space, tab and new line, in precisely that order.  Quoting is
32553 # there to prevent editors from complaining about space-tab.
32554 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
32555 # splitting by setting IFS to empty value.)
32556 IFS=" ""        $as_nl"
32557 
32558 # Find who we are.  Look in the path if we contain no directory separator.
32559 as_myself=
32560 case $0 in #((
32561   *[\\/]* ) as_myself=$0 ;;
32562   *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32563 for as_dir in $PATH
32564 do
32565   IFS=$as_save_IFS
32566   test -z "$as_dir" && as_dir=.
32567     test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
32568   done
32569 IFS=$as_save_IFS
32570 
32571      ;;
32572 esac
32573 # We did not find ourselves, most probably we were run as `sh COMMAND'
32574 # in which case we are not to be found in the path.
32575 if test "x$as_myself" = x; then
32576   as_myself=$0
32577 fi
32578 if test ! -f "$as_myself"; then
32579   $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
32580   exit 1
32581 fi
32582 
32583 # Unset variables that we do not need and which cause bugs (e.g. in
32584 # pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
32585 # suppresses any "Segmentation fault" message there.  '((' could
32586 # trigger a bug in pdksh 5.2.14.
32587 for as_var in BASH_ENV ENV MAIL MAILPATH
32588 do eval test x\${$as_var+set} = xset \
32589   && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
32590 done
32591 PS1='$ '
32592 PS2='> '
32593 PS4='+ '
32594 
32595 # NLS nuisances.
32596 LC_ALL=C
32597 export LC_ALL
32598 LANGUAGE=C
32599 export LANGUAGE
32600 
32601 # CDPATH.
32602 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
32603 
32604 
32605 # as_fn_error STATUS ERROR [LINENO LOG_FD]
32606 # ----------------------------------------
32607 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
32608 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
32609 # script with STATUS, using 1 if that was 0.
32610 as_fn_error ()
32611 {
32612   as_status=$1; test $as_status -eq 0 && as_status=1
32613   if test "$4"; then
32614     as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
32615     $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
32616   fi
32617   $as_echo "$as_me: error: $2" >&2
32618   as_fn_exit $as_status
32619 } # as_fn_error
32620 
32621 
32622 # as_fn_set_status STATUS
32623 # -----------------------
32624 # Set $? to STATUS, without forking.
32625 as_fn_set_status ()
32626 {
32627   return $1
32628 } # as_fn_set_status
32629 
32630 # as_fn_exit STATUS
32631 # -----------------
32632 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
32633 as_fn_exit ()
32634 {
32635   set +e
32636   as_fn_set_status $1
32637   exit $1
32638 } # as_fn_exit
32639 
32640 # as_fn_unset VAR
32641 # ---------------
32642 # Portably unset VAR.
32643 as_fn_unset ()
32644 {
32645   { eval $1=; unset $1;}
32646 }
32647 as_unset=as_fn_unset
32648 # as_fn_append VAR VALUE
32649 # ----------------------
32650 # Append the text in VALUE to the end of the definition contained in VAR. Take
32651 # advantage of any shell optimizations that allow amortized linear growth over
32652 # repeated appends, instead of the typical quadratic growth present in naive
32653 # implementations.
32654 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
32655   eval 'as_fn_append ()
32656   {
32657     eval $1+=\$2
32658   }'
32659 else
32660   as_fn_append ()
32661   {
32662     eval $1=\$$1\$2
32663   }
32664 fi # as_fn_append
32665 
32666 # as_fn_arith ARG...
32667 # ------------------
32668 # Perform arithmetic evaluation on the ARGs, and store the result in the
32669 # global $as_val. Take advantage of shells that can avoid forks. The arguments
32670 # must be portable across $(()) and expr.
32671 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
32672   eval 'as_fn_arith ()
32673   {
32674     as_val=$(( $* ))
32675   }'
32676 else
32677   as_fn_arith ()
32678   {
32679     as_val=`expr "$@" || test $? -eq 1`
32680   }
32681 fi # as_fn_arith
32682 
32683 
32684 if expr a : '\(a\)' >/dev/null 2>&1 &&
32685    test "X`expr 00001 : '.*\(...\)'`" = X001; then
32686   as_expr=expr
32687 else
32688   as_expr=false
32689 fi
32690 
32691 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
32692   as_basename=basename
32693 else
32694   as_basename=false
32695 fi
32696 
32697 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
32698   as_dirname=dirname
32699 else
32700   as_dirname=false
32701 fi
32702 
32703 as_me=`$as_basename -- "$0" ||
32704 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
32705          X"$0" : 'X\(//\)$' \| \
32706          X"$0" : 'X\(/\)' \| . 2>/dev/null ||
32707 $as_echo X/"$0" |
32708     sed '/^.*\/\([^/][^/]*\)\/*$/{
32709             s//\1/
32710             q
32711           }
32712           /^X\/\(\/\/\)$/{
32713             s//\1/
32714             q
32715           }
32716           /^X\/\(\/\).*/{
32717             s//\1/
32718             q
32719           }
32720           s/.*/./; q'`
32721 
32722 # Avoid depending upon Character Ranges.
32723 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
32724 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
32725 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
32726 as_cr_digits='0123456789'
32727 as_cr_alnum=$as_cr_Letters$as_cr_digits
32728 
32729 ECHO_C= ECHO_N= ECHO_T=
32730 case `echo -n x` in #(((((
32731 -n*)
32732   case `echo 'xy\c'` in
32733   *c*) ECHO_T=' ';;     # ECHO_T is single tab character.
32734   xy)  ECHO_C='\c';;
32735   *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
32736        ECHO_T=' ';;
32737   esac;;
32738 *)
32739   ECHO_N='-n';;
32740 esac
32741 
32742 rm -f conf$$ conf$$.exe conf$$.file
32743 if test -d conf$$.dir; then
32744   rm -f conf$$.dir/conf$$.file
32745 else
32746   rm -f conf$$.dir
32747   mkdir conf$$.dir 2>/dev/null
32748 fi
32749 if (echo >conf$$.file) 2>/dev/null; then
32750   if ln -s conf$$.file conf$$ 2>/dev/null; then
32751     as_ln_s='ln -s'
32752     # ... but there are two gotchas:
32753     # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
32754     # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
32755     # In both cases, we have to default to `cp -p'.
32756     ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
32757       as_ln_s='cp -p'
32758   elif ln conf$$.file conf$$ 2>/dev/null; then
32759     as_ln_s=ln
32760   else
32761     as_ln_s='cp -p'
32762   fi
32763 else
32764   as_ln_s='cp -p'
32765 fi
32766 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
32767 rmdir conf$$.dir 2>/dev/null
32768 
32769 
32770 # as_fn_mkdir_p
32771 # -------------
32772 # Create "$as_dir" as a directory, including parents if necessary.
32773 as_fn_mkdir_p ()
32774 {
32775 
32776   case $as_dir in #(
32777   -*) as_dir=./$as_dir;;
32778   esac
32779   test -d "$as_dir" || eval $as_mkdir_p || {
32780     as_dirs=
32781     while :; do
32782       case $as_dir in #(
32783       *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
32784       *) as_qdir=$as_dir;;
32785       esac
32786       as_dirs="'$as_qdir' $as_dirs"
32787       as_dir=`$as_dirname -- "$as_dir" ||
32788 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
32789          X"$as_dir" : 'X\(//\)[^/]' \| \
32790          X"$as_dir" : 'X\(//\)$' \| \
32791          X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
32792 $as_echo X"$as_dir" |
32793     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
32794             s//\1/
32795             q
32796           }
32797           /^X\(\/\/\)[^/].*/{
32798             s//\1/
32799             q
32800           }
32801           /^X\(\/\/\)$/{
32802             s//\1/
32803             q
32804           }
32805           /^X\(\/\).*/{
32806             s//\1/
32807             q
32808           }
32809           s/.*/./; q'`
32810       test -d "$as_dir" && break
32811     done
32812     test -z "$as_dirs" || eval "mkdir $as_dirs"
32813   } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
32814 
32815 
32816 } # as_fn_mkdir_p
32817 if mkdir -p . 2>/dev/null; then
32818   as_mkdir_p='mkdir -p "$as_dir"'
32819 else
32820   test -d ./-p && rmdir ./-p
32821   as_mkdir_p=false
32822 fi
32823 
32824 if test -x / >/dev/null 2>&1; then
32825   as_test_x='test -x'
32826 else
32827   if ls -dL / >/dev/null 2>&1; then
32828     as_ls_L_option=L
32829   else
32830     as_ls_L_option=
32831   fi
32832   as_test_x='
32833     eval sh -c '\''
32834       if test -d "$1"; then
32835         test -d "$1/.";
32836       else
32837         case $1 in #(
32838         -*)set "./$1";;
32839         esac;
32840         case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
32841         ???[sx]*):;;*)false;;esac;fi
32842     '\'' sh
32843   '
32844 fi
32845 as_executable_p=$as_test_x
32846 
32847 # Sed expression to map a string onto a valid CPP name.
32848 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
32849 
32850 # Sed expression to map a string onto a valid variable name.
32851 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
32852 
32853 
32854 exec 6>&1
32855 ## ----------------------------------- ##
32856 ## Main body of $CONFIG_STATUS script. ##
32857 ## ----------------------------------- ##
32858 _ASEOF
32859 test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
32860 
32861 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
32862 # Save the log message, to keep $0 and so on meaningful, and to
32863 # report actual input values of CONFIG_FILES etc. instead of their
32864 # values after options handling.
32865 ac_log="
32866 This file was extended by OpenJDK $as_me jdk8, which was
32867 generated by GNU Autoconf 2.68.  Invocation command line was
32868 
32869   CONFIG_FILES    = $CONFIG_FILES
32870   CONFIG_HEADERS  = $CONFIG_HEADERS
32871   CONFIG_LINKS    = $CONFIG_LINKS
32872   CONFIG_COMMANDS = $CONFIG_COMMANDS
32873   $ $0 $@
32874 
32875 on `(hostname || uname -n) 2>/dev/null | sed 1q`
32876 "
32877 
32878 _ACEOF
32879 
32880 case $ac_config_files in *"
32881 "*) set x $ac_config_files; shift; ac_config_files=$*;;
32882 esac
32883 
32884 case $ac_config_headers in *"
32885 "*) set x $ac_config_headers; shift; ac_config_headers=$*;;
32886 esac
32887 
32888 
32889 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
32890 # Files that config.status was made for.
32891 config_files="$ac_config_files"
32892 config_headers="$ac_config_headers"
32893 
32894 _ACEOF
32895 
32896 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
32897 ac_cs_usage="\
32898 \`$as_me' instantiates files and other configuration actions
32899 from templates according to the current configuration.  Unless the files
32900 and actions are specified as TAGs, all are instantiated by default.
32901 
32902 Usage: $0 [OPTION]... [TAG]...
32903 
32904   -h, --help       print this help, then exit
32905   -V, --version    print version number and configuration settings, then exit
32906       --config     print configuration, then exit
32907   -q, --quiet, --silent
32908                    do not print progress messages
32909   -d, --debug      don't remove temporary files
32910       --recheck    update $as_me by reconfiguring in the same conditions
32911       --file=FILE[:TEMPLATE]
32912                    instantiate the configuration file FILE
32913       --header=FILE[:TEMPLATE]
32914                    instantiate the configuration header FILE
32915 
32916 Configuration files:
32917 $config_files
32918 
32919 Configuration headers:
32920 $config_headers
32921 
32922 Report bugs to <build-dev@openjdk.java.net>.
32923 OpenJDK home page: <http://openjdk.java.net>."
32924 
32925 _ACEOF
32926 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
32927 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
32928 ac_cs_version="\\
32929 OpenJDK config.status jdk8
32930 configured by $0, generated by GNU Autoconf 2.68,
32931   with options \\"\$ac_cs_config\\"
32932 
32933 Copyright (C) 2010 Free Software Foundation, Inc.
32934 This config.status script is free software; the Free Software Foundation
32935 gives unlimited permission to copy, distribute and modify it."
32936 
32937 ac_pwd='$ac_pwd'
32938 srcdir='$srcdir'
32939 AWK='$AWK'
32940 test -n "\$AWK" || AWK=awk
32941 _ACEOF
32942 
32943 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
32944 # The default lists apply if the user does not specify any file.
32945 ac_need_defaults=:
32946 while test $# != 0
32947 do
32948   case $1 in
32949   --*=?*)
32950     ac_option=`expr "X$1" : 'X\([^=]*\)='`
32951     ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
32952     ac_shift=:
32953     ;;
32954   --*=)
32955     ac_option=`expr "X$1" : 'X\([^=]*\)='`
32956     ac_optarg=
32957     ac_shift=:
32958     ;;
32959   *)
32960     ac_option=$1
32961     ac_optarg=$2
32962     ac_shift=shift
32963     ;;
32964   esac
32965 
32966   case $ac_option in
32967   # Handling of the options.
32968   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
32969     ac_cs_recheck=: ;;
32970   --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
32971     $as_echo "$ac_cs_version"; exit ;;
32972   --config | --confi | --conf | --con | --co | --c )
32973     $as_echo "$ac_cs_config"; exit ;;
32974   --debug | --debu | --deb | --de | --d | -d )
32975     debug=: ;;
32976   --file | --fil | --fi | --f )
32977     $ac_shift
32978     case $ac_optarg in
32979     *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
32980     '') as_fn_error $? "missing file argument" ;;
32981     esac
32982     as_fn_append CONFIG_FILES " '$ac_optarg'"
32983     ac_need_defaults=false;;
32984   --header | --heade | --head | --hea )
32985     $ac_shift
32986     case $ac_optarg in
32987     *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
32988     esac
32989     as_fn_append CONFIG_HEADERS " '$ac_optarg'"
32990     ac_need_defaults=false;;
32991   --he | --h)
32992     # Conflict between --help and --header
32993     as_fn_error $? "ambiguous option: \`$1'
32994 Try \`$0 --help' for more information.";;
32995   --help | --hel | -h )
32996     $as_echo "$ac_cs_usage"; exit ;;
32997   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
32998   | -silent | --silent | --silen | --sile | --sil | --si | --s)
32999     ac_cs_silent=: ;;
33000 
33001   # This is an error.
33002   -*) as_fn_error $? "unrecognized option: \`$1'
33003 Try \`$0 --help' for more information." ;;
33004 
33005   *) as_fn_append ac_config_targets " $1"
33006      ac_need_defaults=false ;;
33007 
33008   esac
33009   shift
33010 done
33011 
33012 ac_configure_extra_args=
33013 
33014 if $ac_cs_silent; then
33015   exec 6>/dev/null
33016   ac_configure_extra_args="$ac_configure_extra_args --silent"
33017 fi
33018 
33019 _ACEOF
33020 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
33021 if \$ac_cs_recheck; then
33022   set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
33023   shift
33024   \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
33025   CONFIG_SHELL='$SHELL'
33026   export CONFIG_SHELL
33027   exec "\$@"
33028 fi
33029 
33030 _ACEOF
33031 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
33032 exec 5>>config.log
33033 {
33034   echo
33035   sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
33036 ## Running $as_me. ##
33037 _ASBOX
33038   $as_echo "$ac_log"
33039 } >&5
33040 
33041 _ACEOF
33042 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
33043 _ACEOF
33044 
33045 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
33046 
33047 # Handling of arguments.
33048 for ac_config_target in $ac_config_targets
33049 do
33050   case $ac_config_target in
33051     "$OUTPUT_ROOT/config.h") CONFIG_HEADERS="$CONFIG_HEADERS $OUTPUT_ROOT/config.h:$AUTOCONF_DIR/config.h.in" ;;
33052     "$OUTPUT_ROOT/spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in" ;;
33053     "$OUTPUT_ROOT/hotspot-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in" ;;
33054     "$OUTPUT_ROOT/bootcycle-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in" ;;
33055     "$OUTPUT_ROOT/compare.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in" ;;
33056     "$OUTPUT_ROOT/spec.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.sh:$AUTOCONF_DIR/spec.sh.in" ;;
33057     "$OUTPUT_ROOT/Makefile") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in" ;;
33058 
33059   *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
33060   esac
33061 done
33062 
33063 
33064 # If the user did not use the arguments to specify the items to instantiate,
33065 # then the envvar interface is used.  Set only those that are not.
33066 # We use the long form for the default assignment because of an extremely
33067 # bizarre bug on SunOS 4.1.3.
33068 if $ac_need_defaults; then
33069   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
33070   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
33071 fi
33072 
33073 # Have a temporary directory for convenience.  Make it in the build tree
33074 # simply because there is no reason against having it here, and in addition,
33075 # creating and moving files from /tmp can sometimes cause problems.
33076 # Hook for its removal unless debugging.
33077 # Note that there is a small window in which the directory will not be cleaned:
33078 # after its creation but before its name has been assigned to `$tmp'.
33079 $debug ||
33080 {
33081   tmp= ac_tmp=
33082   trap 'exit_status=$?
33083   : "${ac_tmp:=$tmp}"
33084   { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
33085 ' 0
33086   trap 'as_fn_exit 1' 1 2 13 15
33087 }
33088 # Create a (secure) tmp directory for tmp files.
33089 
33090 {
33091   tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
33092   test -d "$tmp"
33093 }  ||
33094 {
33095   tmp=./conf$$-$RANDOM
33096   (umask 077 && mkdir "$tmp")
33097 } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
33098 ac_tmp=$tmp
33099 
33100 # Set up the scripts for CONFIG_FILES section.
33101 # No need to generate them if there are no CONFIG_FILES.
33102 # This happens for instance with `./config.status config.h'.
33103 if test -n "$CONFIG_FILES"; then
33104 
33105 
33106 ac_cr=`echo X | tr X '\015'`
33107 # On cygwin, bash can eat \r inside `` if the user requested igncr.
33108 # But we know of no other shell where ac_cr would be empty at this
33109 # point, so we can use a bashism as a fallback.
33110 if test "x$ac_cr" = x; then
33111   eval ac_cr=\$\'\\r\'
33112 fi
33113 ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
33114 if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
33115   ac_cs_awk_cr='\\r'
33116 else
33117   ac_cs_awk_cr=$ac_cr
33118 fi
33119 
33120 echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
33121 _ACEOF
33122 
33123 
33124 {
33125   echo "cat >conf$$subs.awk <<_ACEOF" &&
33126   echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
33127   echo "_ACEOF"
33128 } >conf$$subs.sh ||
33129   as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
33130 ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
33131 ac_delim='%!_!# '
33132 for ac_last_try in false false false false false :; do
33133   . ./conf$$subs.sh ||
33134     as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
33135 
33136   ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
33137   if test $ac_delim_n = $ac_delim_num; then
33138     break
33139   elif $ac_last_try; then
33140     as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
33141   else
33142     ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
33143   fi
33144 done
33145 rm -f conf$$subs.sh
33146 
33147 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
33148 cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
33149 _ACEOF
33150 sed -n '
33151 h
33152 s/^/S["/; s/!.*/"]=/
33153 p
33154 g
33155 s/^[^!]*!//
33156 :repl
33157 t repl
33158 s/'"$ac_delim"'$//
33159 t delim
33160 :nl
33161 h
33162 s/\(.\{148\}\)..*/\1/
33163 t more1
33164 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
33165 p
33166 n
33167 b repl
33168 :more1
33169 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
33170 p
33171 g
33172 s/.\{148\}//
33173 t nl
33174 :delim
33175 h
33176 s/\(.\{148\}\)..*/\1/
33177 t more2
33178 s/["\\]/\\&/g; s/^/"/; s/$/"/
33179 p
33180 b
33181 :more2
33182 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
33183 p
33184 g
33185 s/.\{148\}//
33186 t delim
33187 ' <conf$$subs.awk | sed '
33188 /^[^""]/{
33189   N
33190   s/\n//
33191 }
33192 ' >>$CONFIG_STATUS || ac_write_fail=1
33193 rm -f conf$$subs.awk
33194 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
33195 _ACAWK
33196 cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
33197   for (key in S) S_is_set[key] = 1
33198   FS = ""
33199 
33200 }
33201 {
33202   line = $ 0
33203   nfields = split(line, field, "@")
33204   substed = 0
33205   len = length(field[1])
33206   for (i = 2; i < nfields; i++) {
33207     key = field[i]
33208     keylen = length(key)
33209     if (S_is_set[key]) {
33210       value = S[key]
33211       line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
33212       len += length(value) + length(field[++i])
33213       substed = 1
33214     } else
33215       len += 1 + keylen
33216   }
33217 
33218   print line
33219 }
33220 
33221 _ACAWK
33222 _ACEOF
33223 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
33224 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
33225   sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
33226 else
33227   cat
33228 fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
33229   || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
33230 _ACEOF
33231 
33232 # VPATH may cause trouble with some makes, so we remove sole $(srcdir),
33233 # ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
33234 # trailing colons and then remove the whole line if VPATH becomes empty
33235 # (actually we leave an empty line to preserve line numbers).
33236 if test "x$srcdir" = x.; then
33237   ac_vpsub='/^[  ]*VPATH[        ]*=[    ]*/{
33238 h
33239 s///
33240 s/^/:/
33241 s/[      ]*$/:/
33242 s/:\$(srcdir):/:/g
33243 s/:\${srcdir}:/:/g
33244 s/:@srcdir@:/:/g
33245 s/^:*//
33246 s/:*$//
33247 x
33248 s/\(=[   ]*\).*/\1/
33249 G
33250 s/\n//
33251 s/^[^=]*=[       ]*$//
33252 }'
33253 fi
33254 
33255 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
33256 fi # test -n "$CONFIG_FILES"
33257 
33258 # Set up the scripts for CONFIG_HEADERS section.
33259 # No need to generate them if there are no CONFIG_HEADERS.
33260 # This happens for instance with `./config.status Makefile'.
33261 if test -n "$CONFIG_HEADERS"; then
33262 cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
33263 BEGIN {
33264 _ACEOF
33265 
33266 # Transform confdefs.h into an awk script `defines.awk', embedded as
33267 # here-document in config.status, that substitutes the proper values into
33268 # config.h.in to produce config.h.
33269 
33270 # Create a delimiter string that does not exist in confdefs.h, to ease
33271 # handling of long lines.
33272 ac_delim='%!_!# '
33273 for ac_last_try in false false :; do
33274   ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
33275   if test -z "$ac_tt"; then
33276     break
33277   elif $ac_last_try; then
33278     as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
33279   else
33280     ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
33281   fi
33282 done
33283 
33284 # For the awk script, D is an array of macro values keyed by name,
33285 # likewise P contains macro parameters if any.  Preserve backslash
33286 # newline sequences.
33287 
33288 ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
33289 sed -n '
33290 s/.\{148\}/&'"$ac_delim"'/g
33291 t rset
33292 :rset
33293 s/^[     ]*#[    ]*define[       ][      ]*/ /
33294 t def
33295 d
33296 :def
33297 s/\\$//
33298 t bsnl
33299 s/["\\]/\\&/g
33300 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[     ]*\(.*\)/P["\1"]="\2"\
33301 D["\1"]=" \3"/p
33302 s/^ \('"$ac_word_re"'\)[         ]*\(.*\)/D["\1"]=" \2"/p
33303 d
33304 :bsnl
33305 s/["\\]/\\&/g
33306 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[     ]*\(.*\)/P["\1"]="\2"\
33307 D["\1"]=" \3\\\\\\n"\\/p
33308 t cont
33309 s/^ \('"$ac_word_re"'\)[         ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
33310 t cont
33311 d
33312 :cont
33313 n
33314 s/.\{148\}/&'"$ac_delim"'/g
33315 t clear
33316 :clear
33317 s/\\$//
33318 t bsnlc
33319 s/["\\]/\\&/g; s/^/"/; s/$/"/p
33320 d
33321 :bsnlc
33322 s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
33323 b cont
33324 ' <confdefs.h | sed '
33325 s/'"$ac_delim"'/"\\\
33326 "/g' >>$CONFIG_STATUS || ac_write_fail=1
33327 
33328 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
33329   for (key in D) D_is_set[key] = 1
33330   FS = ""
33331 }
33332 /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
33333   line = \$ 0
33334   split(line, arg, " ")
33335   if (arg[1] == "#") {
33336     defundef = arg[2]
33337     mac1 = arg[3]
33338   } else {
33339     defundef = substr(arg[1], 2)
33340     mac1 = arg[2]
33341   }
33342   split(mac1, mac2, "(") #)
33343   macro = mac2[1]
33344   prefix = substr(line, 1, index(line, defundef) - 1)
33345   if (D_is_set[macro]) {
33346     # Preserve the white space surrounding the "#".
33347     print prefix "define", macro P[macro] D[macro]
33348     next
33349   } else {
33350     # Replace #undef with comments.  This is necessary, for example,
33351     # in the case of _POSIX_SOURCE, which is predefined and required
33352     # on some systems where configure will not decide to define it.
33353     if (defundef == "undef") {
33354       print "/*", prefix defundef, macro, "*/"
33355       next
33356     }
33357   }
33358 }
33359 { print }
33360 _ACAWK
33361 _ACEOF
33362 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
33363   as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
33364 fi # test -n "$CONFIG_HEADERS"
33365 
33366 
33367 eval set X "  :F $CONFIG_FILES  :H $CONFIG_HEADERS    "
33368 shift
33369 for ac_tag
33370 do
33371   case $ac_tag in
33372   :[FHLC]) ac_mode=$ac_tag; continue;;
33373   esac
33374   case $ac_mode$ac_tag in
33375   :[FHL]*:*);;
33376   :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
33377   :[FH]-) ac_tag=-:-;;
33378   :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
33379   esac
33380   ac_save_IFS=$IFS
33381   IFS=:
33382   set x $ac_tag
33383   IFS=$ac_save_IFS
33384   shift
33385   ac_file=$1
33386   shift
33387 
33388   case $ac_mode in
33389   :L) ac_source=$1;;
33390   :[FH])
33391     ac_file_inputs=
33392     for ac_f
33393     do
33394       case $ac_f in
33395       -) ac_f="$ac_tmp/stdin";;
33396       *) # Look for the file first in the build tree, then in the source tree
33397          # (if the path is not absolute).  The absolute path cannot be DOS-style,
33398          # because $ac_f cannot contain `:'.
33399          test -f "$ac_f" ||
33400            case $ac_f in
33401            [\\/$]*) false;;
33402            *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
33403            esac ||
33404            as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
33405       esac
33406       case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
33407       as_fn_append ac_file_inputs " '$ac_f'"
33408     done
33409 
33410     # Let's still pretend it is `configure' which instantiates (i.e., don't
33411     # use $as_me), people would be surprised to read:
33412     #    /* config.h.  Generated by config.status.  */
33413     configure_input='Generated from '`
33414           $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
33415         `' by configure.'
33416     if test x"$ac_file" != x-; then
33417       configure_input="$ac_file.  $configure_input"
33418       { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
33419 $as_echo "$as_me: creating $ac_file" >&6;}
33420     fi
33421     # Neutralize special characters interpreted by sed in replacement strings.
33422     case $configure_input in #(
33423     *\&* | *\|* | *\\* )
33424        ac_sed_conf_input=`$as_echo "$configure_input" |
33425        sed 's/[\\\\&|]/\\\\&/g'`;; #(
33426     *) ac_sed_conf_input=$configure_input;;
33427     esac
33428 
33429     case $ac_tag in
33430     *:-:* | *:-) cat >"$ac_tmp/stdin" \
33431       || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
33432     esac
33433     ;;
33434   esac
33435 
33436   ac_dir=`$as_dirname -- "$ac_file" ||
33437 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
33438          X"$ac_file" : 'X\(//\)[^/]' \| \
33439          X"$ac_file" : 'X\(//\)$' \| \
33440          X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
33441 $as_echo X"$ac_file" |
33442     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
33443             s//\1/
33444             q
33445           }
33446           /^X\(\/\/\)[^/].*/{
33447             s//\1/
33448             q
33449           }
33450           /^X\(\/\/\)$/{
33451             s//\1/
33452             q
33453           }
33454           /^X\(\/\).*/{
33455             s//\1/
33456             q
33457           }
33458           s/.*/./; q'`
33459   as_dir="$ac_dir"; as_fn_mkdir_p
33460   ac_builddir=.
33461 
33462 case "$ac_dir" in
33463 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
33464 *)
33465   ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
33466   # A ".." for each directory in $ac_dir_suffix.
33467   ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
33468   case $ac_top_builddir_sub in
33469   "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
33470   *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
33471   esac ;;
33472 esac
33473 ac_abs_top_builddir=$ac_pwd
33474 ac_abs_builddir=$ac_pwd$ac_dir_suffix
33475 # for backward compatibility:
33476 ac_top_builddir=$ac_top_build_prefix
33477 
33478 case $srcdir in
33479   .)  # We are building in place.
33480     ac_srcdir=.
33481     ac_top_srcdir=$ac_top_builddir_sub
33482     ac_abs_top_srcdir=$ac_pwd ;;
33483   [\\/]* | ?:[\\/]* )  # Absolute name.
33484     ac_srcdir=$srcdir$ac_dir_suffix;
33485     ac_top_srcdir=$srcdir
33486     ac_abs_top_srcdir=$srcdir ;;
33487   *) # Relative name.
33488     ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
33489     ac_top_srcdir=$ac_top_build_prefix$srcdir
33490     ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
33491 esac
33492 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
33493 
33494 
33495   case $ac_mode in
33496   :F)
33497   #
33498   # CONFIG_FILE
33499   #
33500 
33501 _ACEOF
33502 
33503 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
33504 # If the template does not know about datarootdir, expand it.
33505 # FIXME: This hack should be removed a few years after 2.60.
33506 ac_datarootdir_hack=; ac_datarootdir_seen=
33507 ac_sed_dataroot='
33508 /datarootdir/ {
33509   p
33510   q
33511 }
33512 /@datadir@/p
33513 /@docdir@/p
33514 /@infodir@/p
33515 /@localedir@/p
33516 /@mandir@/p'
33517 case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
33518 *datarootdir*) ac_datarootdir_seen=yes;;
33519 *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
33520   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
33521 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
33522 _ACEOF
33523 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
33524   ac_datarootdir_hack='
33525   s&@datadir@&$datadir&g
33526   s&@docdir@&$docdir&g
33527   s&@infodir@&$infodir&g
33528   s&@localedir@&$localedir&g
33529   s&@mandir@&$mandir&g
33530   s&\\\${datarootdir}&$datarootdir&g' ;;
33531 esac
33532 _ACEOF
33533 
33534 # Neutralize VPATH when `$srcdir' = `.'.
33535 # Shell code in configure.ac might set extrasub.
33536 # FIXME: do we really want to maintain this feature?
33537 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
33538 ac_sed_extra="$ac_vpsub
33539 $extrasub
33540 _ACEOF
33541 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
33542 :t
33543 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
33544 s|@configure_input@|$ac_sed_conf_input|;t t
33545 s&@top_builddir@&$ac_top_builddir_sub&;t t
33546 s&@top_build_prefix@&$ac_top_build_prefix&;t t
33547 s&@srcdir@&$ac_srcdir&;t t
33548 s&@abs_srcdir@&$ac_abs_srcdir&;t t
33549 s&@top_srcdir@&$ac_top_srcdir&;t t
33550 s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
33551 s&@builddir@&$ac_builddir&;t t
33552 s&@abs_builddir@&$ac_abs_builddir&;t t
33553 s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
33554 $ac_datarootdir_hack
33555 "
33556 eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
33557   >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
33558 
33559 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
33560   { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
33561   { ac_out=`sed -n '/^[  ]*datarootdir[  ]*:*=/p' \
33562       "$ac_tmp/out"`; test -z "$ac_out"; } &&
33563   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
33564 which seems to be undefined.  Please make sure it is defined" >&5
33565 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
33566 which seems to be undefined.  Please make sure it is defined" >&2;}
33567 
33568   rm -f "$ac_tmp/stdin"
33569   case $ac_file in
33570   -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
33571   *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
33572   esac \
33573   || as_fn_error $? "could not create $ac_file" "$LINENO" 5
33574  ;;
33575   :H)
33576   #
33577   # CONFIG_HEADER
33578   #
33579   if test x"$ac_file" != x-; then
33580     {
33581       $as_echo "/* $configure_input  */" \
33582       && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
33583     } >"$ac_tmp/config.h" \
33584       || as_fn_error $? "could not create $ac_file" "$LINENO" 5
33585     if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
33586       { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
33587 $as_echo "$as_me: $ac_file is unchanged" >&6;}
33588     else
33589       rm -f "$ac_file"
33590       mv "$ac_tmp/config.h" "$ac_file" \
33591         || as_fn_error $? "could not create $ac_file" "$LINENO" 5
33592     fi
33593   else
33594     $as_echo "/* $configure_input  */" \
33595       && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
33596       || as_fn_error $? "could not create -" "$LINENO" 5
33597   fi
33598  ;;
33599 
33600 
33601   esac
33602 
33603 done # for ac_tag
33604 
33605 
33606 as_fn_exit 0
33607 _ACEOF
33608 ac_clean_files=$ac_clean_files_save
33609 
33610 test $ac_write_fail = 0 ||
33611   as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
33612 
33613 
33614 # configure is writing to config.log, and then calls config.status.
33615 # config.status does its own redirection, appending to config.log.
33616 # Unfortunately, on DOS this fails, as config.log is still kept open
33617 # by configure, so config.status won't be able to write to it; its
33618 # output is simply discarded.  So we exec the FD to /dev/null,
33619 # effectively closing config.log, so it can be properly (re)opened and
33620 # appended to by config.status.  When coming back to configure, we
33621 # need to make the FD available again.
33622 if test "$no_create" != yes; then
33623   ac_cs_success=:
33624   ac_config_status_args=
33625   test "$silent" = yes &&
33626     ac_config_status_args="$ac_config_status_args --quiet"
33627   exec 5>/dev/null
33628   $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
33629   exec 5>>config.log
33630   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
33631   # would make configure fail if this is the last instruction.
33632   $ac_cs_success || as_fn_exit 1
33633 fi
33634 if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
33635   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
33636 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
33637 fi
33638 
33639 
33640 # Make the compare script executable
33641 $CHMOD +x $OUTPUT_ROOT/compare.sh
33642 
33643 # Finally output some useful information to the user
33644 
33645 # Finally output some useful information to the user
33646 
33647 if test "x$CCACHE_FOUND" != x; then
33648         if  test "x$HAS_GOOD_CCACHE" = x; then
33649                 CCACHE_STATUS="installed, but disabled (version older than 3.1.4)"
33650                 CCACHE_HELP_MSG="You have ccache installed, but it is a version prior to 3.1.4. Try upgrading."
33651         else
33652                 CCACHE_STATUS="installed and in use"
33653         fi
33654 else
33655         if test "x$GCC" = xyes; then
33656                 CCACHE_STATUS="not installed (consider installing)"
33657                 CCACHE_HELP_MSG="You do not have ccache installed. Try installing it."
33658         else
33659                 CCACHE_STATUS="not available for your system"
33660         fi
33661 fi
33662 
33663 printf "\n"
33664 printf "====================================================\n"
33665 printf "A new configuration has been successfully created in\n"
33666 printf "$OUTPUT_ROOT\n"
33667 if test "x$CONFIGURE_COMMAND_LINE" != x; then
33668         printf "using configure arguments '$CONFIGURE_COMMAND_LINE'.\n"
33669 else
33670         printf "using default settings.\n"
33671 fi
33672 
33673 printf "\n"
33674 printf "Configuration summary:\n"
33675 printf "* Debug level:    $DEBUG_LEVEL\n"
33676 printf "* JDK variant:    $JDK_VARIANT\n"
33677 printf "* JVM variants:   $with_jvm_variants\n"
33678 printf "* OpenJDK target: OS: $OPENJDK_TARGET_OS, CPU architecture: $OPENJDK_TARGET_CPU_ARCH, address length: $OPENJDK_TARGET_CPU_BITS\n"
33679 
33680 printf "\n"
33681 printf "Tools summary:\n"
33682 if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
33683   printf "* Environment:    $WINDOWS_ENV_VENDOR version $WINDOWS_ENV_VERSION (root at $WINDOWS_ENV_ROOT_PATH)\n"
33684 fi
33685 printf "* Boot JDK:       $BOOT_JDK_VERSION (at $BOOT_JDK)\n"
33686 printf "* C Compiler:     $CC_VENDOR version $CC_VERSION (at $CC)\n"
33687 printf "* C++ Compiler:   $CXX_VENDOR version $CXX_VERSION (at $CXX)\n"
33688 
33689 printf "\n"
33690 printf "Build performance summary:\n"
33691 printf "* Cores to use:   $JOBS\n"
33692 printf "* Memory limit:   $MEMORY_SIZE MB\n"
33693 printf "* ccache status:  $CCACHE_STATUS\n"
33694 printf "\n"
33695 
33696 if test "x$CCACHE_HELP_MSG" != x && test "x$HIDE_PERFORMANCE_HINTS" = "xno"; then
33697         printf "Build performance tip: ccache gives a tremendous speedup for C++ recompilations.\n"
33698         printf "$CCACHE_HELP_MSG\n"
33699 
33700     # Print a helpful message on how to acquire the necessary build dependency.
33701     # ccache is the help tag: freetyp2, cups, pulse, alsa etc
33702     MISSING_DEPENDENCY=ccache
33703     PKGHANDLER_COMMAND=
33704 
33705     case $PKGHANDLER in
33706         apt-get)
33707                 apt_help     $MISSING_DEPENDENCY ;;
33708     yum)
33709                 yum_help     $MISSING_DEPENDENCY ;;
33710         port)
33711                 port_help    $MISSING_DEPENDENCY ;;
33712         pkgutil)
33713                 pkgutil_help $MISSING_DEPENDENCY ;;
33714         pkgadd)
33715                 pkgadd_help  $MISSING_DEPENDENCY ;;
33716     * )
33717       break ;;
33718     esac
33719 
33720     if test "x$PKGHANDLER_COMMAND" != x; then
33721         HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
33722     fi
33723 
33724         printf "$HELP_MSG\n"
33725         printf "\n"
33726 fi
33727 
33728 if test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = "xyes"; then
33729         printf "NOTE: You have requested to build more than one version of the JVM, which\n"
33730         printf "will result in longer build times.\n"
33731         printf "\n"
33732 fi
33733 
33734 if test "x$FOUND_ALT_VARIABLES" != "x"; then
33735         printf "WARNING: You have old-style ALT_ environment variables set.\n"
33736         printf "These are not respected, and will be ignored. It is recommended\n"
33737         printf "that you clean your environment. The following variables are set:\n"
33738         printf "$FOUND_ALT_VARIABLES\n"
33739         printf "\n"
33740 fi
33741 
33742 if test "x$OUTPUT_DIR_IS_LOCAL" != "xyes"; then
33743         printf "WARNING: Your build output directory is not on a local disk.\n"
33744         printf "This will severely degrade build performance!\n"
33745         printf "It is recommended that you create an output directory on a local disk,\n"
33746         printf "and run the configure script again from that directory.\n"
33747         printf "\n"
33748 fi
33749 
33750 if test "x$IS_RECONFIGURE" = "xyes"; then
33751         printf "WARNING: The result of this configuration has overridden an older\n"
33752         printf "configuration. You *should* run 'make clean' to make sure you get a\n"
33753         printf "proper build. Failure to do so might result in strange build problems.\n"
33754         printf "\n"
33755 fi
33756 
--- EOF ---