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 DISABLE_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 HOTSPOT_TOPDIR
 754 JAXWS_TOPDIR
 755 JAXP_TOPDIR
 756 CORBA_TOPDIR
 757 LANGTOOLS_TOPDIR
 758 BOOT_JDK_JVMARGS
 759 JAVAC_FLAGS
 760 BOOT_JDK_SOURCETARGET
 761 BOOT_JDK
 762 BOOT_TOOLSJAR
 763 BOOT_RTJAR
 764 JAVA_CHECK
 765 JAVAC_CHECK
 766 COOKED_BUILD_NUMBER
 767 JDK_VERSION
 768 COPYRIGHT_YEAR
 769 MACOSX_BUNDLE_ID_BASE
 770 MACOSX_BUNDLE_NAME_BASE
 771 COMPANY_NAME
 772 JDK_RC_PLATFORM_NAME
 773 PRODUCT_SUFFIX
 774 PRODUCT_NAME
 775 LAUNCHER_NAME
 776 MILESTONE
 777 JDK_BUILD_NUMBER
 778 JDK_UPDATE_VERSION
 779 JDK_MICRO_VERSION
 780 JDK_MINOR_VERSION
 781 JDK_MAJOR_VERSION
 782 USER_RELEASE_SUFFIX
 783 COMPRESS_JARS
 784 UNLIMITED_CRYPTO
 785 CACERTS_FILE
 786 TEST_IN_BUILD
 787 BUILD_HEADLESS
 788 SUPPORT_HEADFUL
 789 SUPPORT_HEADLESS
 790 BDEPS_FTP
 791 BDEPS_UNZIP
 792 OS_VERSION_MICRO
 793 OS_VERSION_MINOR
 794 OS_VERSION_MAJOR
 795 PKG_CONFIG
 796 TIME
 797 STAT
 798 HG
 799 READELF
 800 OTOOL
 801 LDD
 802 ZIP
 803 UNZIP
 804 FIND_DELETE
 805 MAKE
 806 CHECK_TOOLSDIR_MAKE
 807 CHECK_TOOLSDIR_GMAKE
 808 CHECK_MAKE
 809 CHECK_GMAKE
 810 PKGHANDLER
 811 OUTPUT_ROOT
 812 CONF_NAME
 813 SPEC
 814 BUILD_VARIANT_RELEASE
 815 DEBUG_CLASSFILES
 816 FASTDEBUG
 817 VARIANT
 818 DEBUG_LEVEL
 819 MACOSX_UNIVERSAL
 820 JVM_VARIANT_ZEROSHARK
 821 JVM_VARIANT_ZERO
 822 JVM_VARIANT_KERNEL
 823 JVM_VARIANT_MINIMAL1
 824 JVM_VARIANT_CLIENT
 825 JVM_VARIANT_SERVER
 826 JVM_VARIANTS
 827 JDK_VARIANT
 828 SET_OPENJDK
 829 BUILD_LOG_WRAPPER
 830 BUILD_LOG_PREVIOUS
 831 BUILD_LOG
 832 SYS_ROOT
 833 PATH_SEP
 834 SRC_ROOT
 835 DEFINE_CROSS_COMPILE_ARCH
 836 LP64
 837 OPENJDK_TARGET_OS_API_DIR
 838 OPENJDK_TARGET_CPU_JLI_CFLAGS
 839 OPENJDK_TARGET_CPU_OSARCH
 840 OPENJDK_TARGET_CPU_ISADIR
 841 OPENJDK_TARGET_CPU_LIBDIR
 842 OPENJDK_TARGET_CPU_LEGACY_LIB
 843 OPENJDK_TARGET_CPU_LEGACY
 844 REQUIRED_OS_VERSION
 845 REQUIRED_OS_NAME
 846 COMPILE_TYPE
 847 OPENJDK_TARGET_CPU_ENDIAN
 848 OPENJDK_TARGET_CPU_BITS
 849 OPENJDK_TARGET_CPU_ARCH
 850 OPENJDK_TARGET_CPU
 851 OPENJDK_TARGET_OS_API
 852 OPENJDK_TARGET_OS
 853 OPENJDK_BUILD_CPU_ENDIAN
 854 OPENJDK_BUILD_CPU_BITS
 855 OPENJDK_BUILD_CPU_ARCH
 856 OPENJDK_BUILD_CPU
 857 OPENJDK_BUILD_OS_API
 858 OPENJDK_BUILD_OS
 859 OPENJDK_BUILD_AUTOCONF_NAME
 860 OPENJDK_TARGET_AUTOCONF_NAME
 861 target_os
 862 target_vendor
 863 target_cpu
 864 target
 865 host_os
 866 host_vendor
 867 host_cpu
 868 host
 869 build_os
 870 build_vendor
 871 build_cpu
 872 build
 873 SETFILE
 874 DF
 875 READLINK
 876 CYGPATH
 877 NAWK
 878 SED
 879 FGREP
 880 EGREP
 881 GREP
 882 AWK
 883 XARGS
 884 WHICH
 885 WC
 886 UNIQ
 887 UNAME
 888 TR
 889 TOUCH
 890 TEE
 891 TAR
 892 TAIL
 893 SORT
 894 SH
 895 RM
 896 THEPWDCMD
 897 PRINTF
 898 MV
 899 MKTEMP
 900 MKDIR
 901 LS
 902 LN
 903 HEAD
 904 FIND
 905 FILE
 906 EXPR
 907 ECHO
 908 DIRNAME
 909 DIFF
 910 DATE
 911 CUT
 912 CPIO
 913 CP
 914 COMM
 915 CMP
 916 CHMOD
 917 CAT
 918 BASH
 919 BASENAME
 920 DATE_WHEN_CONFIGURED
 921 CONFIGURE_COMMAND_LINE
 922 CUSTOM_MAKE_DIR
 923 target_alias
 924 host_alias
 925 build_alias
 926 LIBS
 927 ECHO_T
 928 ECHO_N
 929 ECHO_C
 930 DEFS
 931 mandir
 932 localedir
 933 libdir
 934 psdir
 935 pdfdir
 936 dvidir
 937 htmldir
 938 infodir
 939 docdir
 940 oldincludedir
 941 includedir
 942 localstatedir
 943 sharedstatedir
 944 sysconfdir
 945 datadir
 946 datarootdir
 947 libexecdir
 948 sbindir
 949 bindir
 950 program_transform_name
 951 prefix
 952 exec_prefix
 953 PACKAGE_URL
 954 PACKAGE_BUGREPORT
 955 PACKAGE_STRING
 956 PACKAGE_VERSION
 957 PACKAGE_TARNAME
 958 PACKAGE_NAME
 959 PATH_SEPARATOR
 960 SHELL'
 961 ac_subst_files=''
 962 ac_user_opts='
 963 enable_option_checking
 964 with_custom_make_dir
 965 with_target_bits
 966 with_sys_root
 967 with_tools_dir
 968 with_devkit
 969 enable_openjdk_only
 970 with_jdk_variant
 971 with_jvm_variants
 972 enable_debug
 973 with_debug_level
 974 with_conf_name
 975 with_builddeps_conf
 976 with_builddeps_server
 977 with_builddeps_dir
 978 with_builddeps_group
 979 enable_headful
 980 enable_hotspot_test_in_build
 981 with_cacerts_file
 982 enable_unlimited_crypto
 983 with_milestone
 984 with_build_number
 985 with_user_release_suffix
 986 with_boot_jdk
 987 with_boot_jdk_jvmargs
 988 with_add_source_root
 989 with_override_source_root
 990 with_adds_and_overrides
 991 with_override_langtools
 992 with_override_corba
 993 with_override_jaxp
 994 with_override_jaxws
 995 with_override_hotspot
 996 with_override_jdk
 997 with_import_hotspot
 998 with_msvcr_dll
 999 with_dxsdk
1000 with_dxsdk_lib
1001 with_dxsdk_include
1002 with_extra_cflags
1003 with_extra_cxxflags
1004 with_extra_ldflags
1005 enable_debug_symbols
1006 enable_zip_debug_info
1007 enable_macosx_runtime_support
1008 with_x
1009 with_cups
1010 with_cups_include
1011 with_freetype
1012 with_alsa
1013 with_alsa_include
1014 with_alsa_lib
1015 with_zlib
1016 with_stdc__lib
1017 with_num_cores
1018 with_memory_size
1019 with_jobs
1020 with_sjavac_server_java
1021 with_sjavac_server_cores
1022 enable_sjavac
1023 enable_precompiled_headers
1024 enable_ccache
1025 with_ccache_dir
1026 '
1027       ac_precious_vars='build_alias
1028 host_alias
1029 target_alias
1030 PKG_CONFIG
1031 CC
1032 CFLAGS
1033 LDFLAGS
1034 LIBS
1035 CPPFLAGS
1036 CXX
1037 CXXFLAGS
1038 CCC
1039 OBJC
1040 OBJCFLAGS
1041 CPP
1042 CXXCPP
1043 XMKMF
1044 FREETYPE2_CFLAGS
1045 FREETYPE2_LIBS
1046 ALSA_CFLAGS
1047 ALSA_LIBS'
1048 
1049 
1050 # Initialize some variables set by options.
1051 ac_init_help=
1052 ac_init_version=false
1053 ac_unrecognized_opts=
1054 ac_unrecognized_sep=
1055 # The variables have the same names as the options, with
1056 # dashes changed to underlines.
1057 cache_file=/dev/null
1058 exec_prefix=NONE
1059 no_create=
1060 no_recursion=
1061 prefix=NONE
1062 program_prefix=NONE
1063 program_suffix=NONE
1064 program_transform_name=s,x,x,
1065 silent=
1066 site=
1067 srcdir=
1068 verbose=
1069 x_includes=NONE
1070 x_libraries=NONE
1071 
1072 # Installation directory options.
1073 # These are left unexpanded so users can "make install exec_prefix=/foo"
1074 # and all the variables that are supposed to be based on exec_prefix
1075 # by default will actually change.
1076 # Use braces instead of parens because sh, perl, etc. also accept them.
1077 # (The list follows the same order as the GNU Coding Standards.)
1078 bindir='${exec_prefix}/bin'
1079 sbindir='${exec_prefix}/sbin'
1080 libexecdir='${exec_prefix}/libexec'
1081 datarootdir='${prefix}/share'
1082 datadir='${datarootdir}'
1083 sysconfdir='${prefix}/etc'
1084 sharedstatedir='${prefix}/com'
1085 localstatedir='${prefix}/var'
1086 includedir='${prefix}/include'
1087 oldincludedir='/usr/include'
1088 docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
1089 infodir='${datarootdir}/info'
1090 htmldir='${docdir}'
1091 dvidir='${docdir}'
1092 pdfdir='${docdir}'
1093 psdir='${docdir}'
1094 libdir='${exec_prefix}/lib'
1095 localedir='${datarootdir}/locale'
1096 mandir='${datarootdir}/man'
1097 
1098 ac_prev=
1099 ac_dashdash=
1100 for ac_option
1101 do
1102   # If the previous option needs an argument, assign it.
1103   if test -n "$ac_prev"; then
1104     eval $ac_prev=\$ac_option
1105     ac_prev=
1106     continue
1107   fi
1108 
1109   case $ac_option in
1110   *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
1111   *=)   ac_optarg= ;;
1112   *)    ac_optarg=yes ;;
1113   esac
1114 
1115   # Accept the important Cygnus configure options, so we can diagnose typos.
1116 
1117   case $ac_dashdash$ac_option in
1118   --)
1119     ac_dashdash=yes ;;
1120 
1121   -bindir | --bindir | --bindi | --bind | --bin | --bi)
1122     ac_prev=bindir ;;
1123   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
1124     bindir=$ac_optarg ;;
1125 
1126   -build | --build | --buil | --bui | --bu)
1127     ac_prev=build_alias ;;
1128   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
1129     build_alias=$ac_optarg ;;
1130 
1131   -cache-file | --cache-file | --cache-fil | --cache-fi \
1132   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1133     ac_prev=cache_file ;;
1134   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1135   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
1136     cache_file=$ac_optarg ;;
1137 
1138   --config-cache | -C)
1139     cache_file=config.cache ;;
1140 
1141   -datadir | --datadir | --datadi | --datad)
1142     ac_prev=datadir ;;
1143   -datadir=* | --datadir=* | --datadi=* | --datad=*)
1144     datadir=$ac_optarg ;;
1145 
1146   -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1147   | --dataroo | --dataro | --datar)
1148     ac_prev=datarootdir ;;
1149   -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1150   | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1151     datarootdir=$ac_optarg ;;
1152 
1153   -disable-* | --disable-*)
1154     ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1155     # Reject names that are not valid shell variable names.
1156     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1157       as_fn_error $? "invalid feature name: $ac_useropt"
1158     ac_useropt_orig=$ac_useropt
1159     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1160     case $ac_user_opts in
1161       *"
1162 "enable_$ac_useropt"
1163 "*) ;;
1164       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1165          ac_unrecognized_sep=', ';;
1166     esac
1167     eval enable_$ac_useropt=no ;;
1168 
1169   -docdir | --docdir | --docdi | --doc | --do)
1170     ac_prev=docdir ;;
1171   -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1172     docdir=$ac_optarg ;;
1173 
1174   -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1175     ac_prev=dvidir ;;
1176   -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1177     dvidir=$ac_optarg ;;
1178 
1179   -enable-* | --enable-*)
1180     ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1181     # Reject names that are not valid shell variable names.
1182     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1183       as_fn_error $? "invalid feature name: $ac_useropt"
1184     ac_useropt_orig=$ac_useropt
1185     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1186     case $ac_user_opts in
1187       *"
1188 "enable_$ac_useropt"
1189 "*) ;;
1190       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1191          ac_unrecognized_sep=', ';;
1192     esac
1193     eval enable_$ac_useropt=\$ac_optarg ;;
1194 
1195   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1196   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1197   | --exec | --exe | --ex)
1198     ac_prev=exec_prefix ;;
1199   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1200   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1201   | --exec=* | --exe=* | --ex=*)
1202     exec_prefix=$ac_optarg ;;
1203 
1204   -gas | --gas | --ga | --g)
1205     # Obsolete; use --with-gas.
1206     with_gas=yes ;;
1207 
1208   -help | --help | --hel | --he | -h)
1209     ac_init_help=long ;;
1210   -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1211     ac_init_help=recursive ;;
1212   -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1213     ac_init_help=short ;;
1214 
1215   -host | --host | --hos | --ho)
1216     ac_prev=host_alias ;;
1217   -host=* | --host=* | --hos=* | --ho=*)
1218     host_alias=$ac_optarg ;;
1219 
1220   -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1221     ac_prev=htmldir ;;
1222   -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1223   | --ht=*)
1224     htmldir=$ac_optarg ;;
1225 
1226   -includedir | --includedir | --includedi | --included | --include \
1227   | --includ | --inclu | --incl | --inc)
1228     ac_prev=includedir ;;
1229   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1230   | --includ=* | --inclu=* | --incl=* | --inc=*)
1231     includedir=$ac_optarg ;;
1232 
1233   -infodir | --infodir | --infodi | --infod | --info | --inf)
1234     ac_prev=infodir ;;
1235   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1236     infodir=$ac_optarg ;;
1237 
1238   -libdir | --libdir | --libdi | --libd)
1239     ac_prev=libdir ;;
1240   -libdir=* | --libdir=* | --libdi=* | --libd=*)
1241     libdir=$ac_optarg ;;
1242 
1243   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1244   | --libexe | --libex | --libe)
1245     ac_prev=libexecdir ;;
1246   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1247   | --libexe=* | --libex=* | --libe=*)
1248     libexecdir=$ac_optarg ;;
1249 
1250   -localedir | --localedir | --localedi | --localed | --locale)
1251     ac_prev=localedir ;;
1252   -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1253     localedir=$ac_optarg ;;
1254 
1255   -localstatedir | --localstatedir | --localstatedi | --localstated \
1256   | --localstate | --localstat | --localsta | --localst | --locals)
1257     ac_prev=localstatedir ;;
1258   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1259   | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1260     localstatedir=$ac_optarg ;;
1261 
1262   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1263     ac_prev=mandir ;;
1264   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1265     mandir=$ac_optarg ;;
1266 
1267   -nfp | --nfp | --nf)
1268     # Obsolete; use --without-fp.
1269     with_fp=no ;;
1270 
1271   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1272   | --no-cr | --no-c | -n)
1273     no_create=yes ;;
1274 
1275   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1276   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1277     no_recursion=yes ;;
1278 
1279   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1280   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1281   | --oldin | --oldi | --old | --ol | --o)
1282     ac_prev=oldincludedir ;;
1283   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1284   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1285   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1286     oldincludedir=$ac_optarg ;;
1287 
1288   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1289     ac_prev=prefix ;;
1290   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1291     prefix=$ac_optarg ;;
1292 
1293   -program-prefix | --program-prefix | --program-prefi | --program-pref \
1294   | --program-pre | --program-pr | --program-p)
1295     ac_prev=program_prefix ;;
1296   -program-prefix=* | --program-prefix=* | --program-prefi=* \
1297   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1298     program_prefix=$ac_optarg ;;
1299 
1300   -program-suffix | --program-suffix | --program-suffi | --program-suff \
1301   | --program-suf | --program-su | --program-s)
1302     ac_prev=program_suffix ;;
1303   -program-suffix=* | --program-suffix=* | --program-suffi=* \
1304   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1305     program_suffix=$ac_optarg ;;
1306 
1307   -program-transform-name | --program-transform-name \
1308   | --program-transform-nam | --program-transform-na \
1309   | --program-transform-n | --program-transform- \
1310   | --program-transform | --program-transfor \
1311   | --program-transfo | --program-transf \
1312   | --program-trans | --program-tran \
1313   | --progr-tra | --program-tr | --program-t)
1314     ac_prev=program_transform_name ;;
1315   -program-transform-name=* | --program-transform-name=* \
1316   | --program-transform-nam=* | --program-transform-na=* \
1317   | --program-transform-n=* | --program-transform-=* \
1318   | --program-transform=* | --program-transfor=* \
1319   | --program-transfo=* | --program-transf=* \
1320   | --program-trans=* | --program-tran=* \
1321   | --progr-tra=* | --program-tr=* | --program-t=*)
1322     program_transform_name=$ac_optarg ;;
1323 
1324   -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1325     ac_prev=pdfdir ;;
1326   -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1327     pdfdir=$ac_optarg ;;
1328 
1329   -psdir | --psdir | --psdi | --psd | --ps)
1330     ac_prev=psdir ;;
1331   -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1332     psdir=$ac_optarg ;;
1333 
1334   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1335   | -silent | --silent | --silen | --sile | --sil)
1336     silent=yes ;;
1337 
1338   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1339     ac_prev=sbindir ;;
1340   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1341   | --sbi=* | --sb=*)
1342     sbindir=$ac_optarg ;;
1343 
1344   -sharedstatedir | --sharedstatedir | --sharedstatedi \
1345   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1346   | --sharedst | --shareds | --shared | --share | --shar \
1347   | --sha | --sh)
1348     ac_prev=sharedstatedir ;;
1349   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1350   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1351   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1352   | --sha=* | --sh=*)
1353     sharedstatedir=$ac_optarg ;;
1354 
1355   -site | --site | --sit)
1356     ac_prev=site ;;
1357   -site=* | --site=* | --sit=*)
1358     site=$ac_optarg ;;
1359 
1360   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1361     ac_prev=srcdir ;;
1362   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1363     srcdir=$ac_optarg ;;
1364 
1365   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1366   | --syscon | --sysco | --sysc | --sys | --sy)
1367     ac_prev=sysconfdir ;;
1368   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1369   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1370     sysconfdir=$ac_optarg ;;
1371 
1372   -target | --target | --targe | --targ | --tar | --ta | --t)
1373     ac_prev=target_alias ;;
1374   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1375     target_alias=$ac_optarg ;;
1376 
1377   -v | -verbose | --verbose | --verbos | --verbo | --verb)
1378     verbose=yes ;;
1379 
1380   -version | --version | --versio | --versi | --vers | -V)
1381     ac_init_version=: ;;
1382 
1383   -with-* | --with-*)
1384     ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1385     # Reject names that are not valid shell variable names.
1386     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1387       as_fn_error $? "invalid package name: $ac_useropt"
1388     ac_useropt_orig=$ac_useropt
1389     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1390     case $ac_user_opts in
1391       *"
1392 "with_$ac_useropt"
1393 "*) ;;
1394       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1395          ac_unrecognized_sep=', ';;
1396     esac
1397     eval with_$ac_useropt=\$ac_optarg ;;
1398 
1399   -without-* | --without-*)
1400     ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1401     # Reject names that are not valid shell variable names.
1402     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1403       as_fn_error $? "invalid package name: $ac_useropt"
1404     ac_useropt_orig=$ac_useropt
1405     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1406     case $ac_user_opts in
1407       *"
1408 "with_$ac_useropt"
1409 "*) ;;
1410       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1411          ac_unrecognized_sep=', ';;
1412     esac
1413     eval with_$ac_useropt=no ;;
1414 
1415   --x)
1416     # Obsolete; use --with-x.
1417     with_x=yes ;;
1418 
1419   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1420   | --x-incl | --x-inc | --x-in | --x-i)
1421     ac_prev=x_includes ;;
1422   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1423   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1424     x_includes=$ac_optarg ;;
1425 
1426   -x-libraries | --x-libraries | --x-librarie | --x-librari \
1427   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1428     ac_prev=x_libraries ;;
1429   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1430   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1431     x_libraries=$ac_optarg ;;
1432 
1433   -*) as_fn_error $? "unrecognized option: \`$ac_option'
1434 Try \`$0 --help' for more information"
1435     ;;
1436 
1437   *=*)
1438     ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1439     # Reject names that are not valid shell variable names.
1440     case $ac_envvar in #(
1441       '' | [0-9]* | *[!_$as_cr_alnum]* )
1442       as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1443     esac
1444     eval $ac_envvar=\$ac_optarg
1445     export $ac_envvar ;;
1446 
1447   *)
1448     # FIXME: should be removed in autoconf 3.0.
1449     $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1450     expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1451       $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1452     : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1453     ;;
1454 
1455   esac
1456 done
1457 
1458 if test -n "$ac_prev"; then
1459   ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1460   as_fn_error $? "missing argument to $ac_option"
1461 fi
1462 
1463 if test -n "$ac_unrecognized_opts"; then
1464   case $enable_option_checking in
1465     no) ;;
1466     fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1467     *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1468   esac
1469 fi
1470 
1471 # Check all directory arguments for consistency.
1472 for ac_var in   exec_prefix prefix bindir sbindir libexecdir datarootdir \
1473                 datadir sysconfdir sharedstatedir localstatedir includedir \
1474                 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1475                 libdir localedir mandir
1476 do
1477   eval ac_val=\$$ac_var
1478   # Remove trailing slashes.
1479   case $ac_val in
1480     */ )
1481       ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1482       eval $ac_var=\$ac_val;;
1483   esac
1484   # Be sure to have absolute directory names.
1485   case $ac_val in
1486     [\\/$]* | ?:[\\/]* )  continue;;
1487     NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1488   esac
1489   as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1490 done
1491 
1492 # There might be people who depend on the old broken behavior: `$host'
1493 # used to hold the argument of --host etc.
1494 # FIXME: To remove some day.
1495 build=$build_alias
1496 host=$host_alias
1497 target=$target_alias
1498 
1499 # FIXME: To remove some day.
1500 if test "x$host_alias" != x; then
1501   if test "x$build_alias" = x; then
1502     cross_compiling=maybe
1503     $as_echo "$as_me: WARNING: if you wanted to set the --build type, don't use --host.
1504     If a cross compiler is detected then cross compile mode will be used" >&2
1505   elif test "x$build_alias" != "x$host_alias"; then
1506     cross_compiling=yes
1507   fi
1508 fi
1509 
1510 ac_tool_prefix=
1511 test -n "$host_alias" && ac_tool_prefix=$host_alias-
1512 
1513 test "$silent" = yes && exec 6>/dev/null
1514 
1515 
1516 ac_pwd=`pwd` && test -n "$ac_pwd" &&
1517 ac_ls_di=`ls -di .` &&
1518 ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1519   as_fn_error $? "working directory cannot be determined"
1520 test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1521   as_fn_error $? "pwd does not report name of working directory"
1522 
1523 
1524 # Find the source files, if location was not specified.
1525 if test -z "$srcdir"; then
1526   ac_srcdir_defaulted=yes
1527   # Try the directory containing this script, then the parent directory.
1528   ac_confdir=`$as_dirname -- "$as_myself" ||
1529 $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1530          X"$as_myself" : 'X\(//\)[^/]' \| \
1531          X"$as_myself" : 'X\(//\)$' \| \
1532          X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1533 $as_echo X"$as_myself" |
1534     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1535             s//\1/
1536             q
1537           }
1538           /^X\(\/\/\)[^/].*/{
1539             s//\1/
1540             q
1541           }
1542           /^X\(\/\/\)$/{
1543             s//\1/
1544             q
1545           }
1546           /^X\(\/\).*/{
1547             s//\1/
1548             q
1549           }
1550           s/.*/./; q'`
1551   srcdir=$ac_confdir
1552   if test ! -r "$srcdir/$ac_unique_file"; then
1553     srcdir=..
1554   fi
1555 else
1556   ac_srcdir_defaulted=no
1557 fi
1558 if test ! -r "$srcdir/$ac_unique_file"; then
1559   test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1560   as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1561 fi
1562 ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1563 ac_abs_confdir=`(
1564         cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1565         pwd)`
1566 # When building in place, set srcdir=.
1567 if test "$ac_abs_confdir" = "$ac_pwd"; then
1568   srcdir=.
1569 fi
1570 # Remove unnecessary trailing slashes from srcdir.
1571 # Double slashes in file names in object file debugging info
1572 # mess up M-x gdb in Emacs.
1573 case $srcdir in
1574 */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1575 esac
1576 for ac_var in $ac_precious_vars; do
1577   eval ac_env_${ac_var}_set=\${${ac_var}+set}
1578   eval ac_env_${ac_var}_value=\$${ac_var}
1579   eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1580   eval ac_cv_env_${ac_var}_value=\$${ac_var}
1581 done
1582 
1583 #
1584 # Report the --help message.
1585 #
1586 if test "$ac_init_help" = "long"; then
1587   # Omit some internal or obsolete options to make the list less imposing.
1588   # This message is too long to be a string in the A/UX 3.1 sh.
1589   cat <<_ACEOF
1590 \`configure' configures OpenJDK jdk8 to adapt to many kinds of systems.
1591 
1592 Usage: $0 [OPTION]... [VAR=VALUE]...
1593 
1594 To assign environment variables (e.g., CC, CFLAGS...), specify them as
1595 VAR=VALUE.  See below for descriptions of some of the useful variables.
1596 
1597 Defaults for the options are specified in brackets.
1598 
1599 Configuration:
1600   -h, --help              display this help and exit
1601       --help=short        display options specific to this package
1602       --help=recursive    display the short help of all the included packages
1603   -V, --version           display version information and exit
1604   -q, --quiet, --silent   do not print \`checking ...' messages
1605       --cache-file=FILE   cache test results in FILE [disabled]
1606   -C, --config-cache      alias for \`--cache-file=config.cache'
1607   -n, --no-create         do not create output files
1608       --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1609 
1610 Installation directories:
1611   --prefix=PREFIX         install architecture-independent files in PREFIX
1612                           [$ac_default_prefix]
1613   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1614                           [PREFIX]
1615 
1616 By default, \`make install' will install all the files in
1617 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1618 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1619 for instance \`--prefix=\$HOME'.
1620 
1621 For better control, use the options below.
1622 
1623 Fine tuning of the installation directories:
1624   --bindir=DIR            user executables [EPREFIX/bin]
1625   --sbindir=DIR           system admin executables [EPREFIX/sbin]
1626   --libexecdir=DIR        program executables [EPREFIX/libexec]
1627   --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
1628   --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
1629   --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
1630   --libdir=DIR            object code libraries [EPREFIX/lib]
1631   --includedir=DIR        C header files [PREFIX/include]
1632   --oldincludedir=DIR     C header files for non-gcc [/usr/include]
1633   --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
1634   --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
1635   --infodir=DIR           info documentation [DATAROOTDIR/info]
1636   --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
1637   --mandir=DIR            man documentation [DATAROOTDIR/man]
1638   --docdir=DIR            documentation root [DATAROOTDIR/doc/openjdk]
1639   --htmldir=DIR           html documentation [DOCDIR]
1640   --dvidir=DIR            dvi documentation [DOCDIR]
1641   --pdfdir=DIR            pdf documentation [DOCDIR]
1642   --psdir=DIR             ps documentation [DOCDIR]
1643 _ACEOF
1644 
1645   cat <<\_ACEOF
1646 
1647 X features:
1648   --x-includes=DIR    X include files are in DIR
1649   --x-libraries=DIR   X library files are in DIR
1650 
1651 System types:
1652   --build=BUILD     configure for building on BUILD [guessed]
1653   --host=HOST       cross-compile to build programs to run on HOST [BUILD]
1654   --target=TARGET   configure for building compilers for TARGET [HOST]
1655 _ACEOF
1656 fi
1657 
1658 if test -n "$ac_init_help"; then
1659   case $ac_init_help in
1660      short | recursive ) echo "Configuration of OpenJDK jdk8:";;
1661    esac
1662   cat <<\_ACEOF
1663 
1664 Optional Features:
1665   --disable-option-checking  ignore unrecognized --enable/--with options
1666   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1667   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1668   --enable-openjdk-only   suppress building custom source even if present
1669                           [disabled]
1670   --enable-debug          set the debug level to fastdebug (shorthand for
1671                           --with-debug-level=fastdebug) [disabled]
1672   --disable-headful       disable building headful support (graphical UI
1673                           support) [enabled]
1674   --enable-hotspot-test-in-build
1675                           run the Queens test after Hotspot build [disabled]
1676   --enable-unlimited-crypto
1677                           Enable unlimited crypto policy [disabled]
1678   --disable-debug-symbols disable generation of debug symbols [enabled]
1679   --disable-zip-debug-info
1680                           disable zipping of debug-info files [enabled]
1681   --disable-macosx-runtime-support
1682                           disable the use of MacOSX Java runtime support
1683                           framework [enabled]
1684   --enable-sjavac         use sjavac to do fast incremental compiles
1685                           [disabled]
1686   --disable-precompiled-headers
1687                           disable using precompiled headers when compiling C++
1688                           [enabled]
1689   --disable-ccache        disable using ccache to speed up recompilations
1690                           [enabled]
1691 
1692 Optional Packages:
1693   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
1694   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
1695   --with-custom-make-dir  use this directory for custom build/make files
1696   --with-target-bits      build 32-bit or 64-bit binaries (for platforms that
1697                           support it), e.g. --with-target-bits=32 [guessed]
1698   --with-sys-root         pass this sys-root to the compilers and tools (for
1699                           cross-compiling)
1700   --with-tools-dir        search this directory for compilers and tools (for
1701                           cross-compiling)
1702   --with-devkit           use this directory as base for tools-dir and
1703                           sys-root (for cross-compiling)
1704   --with-jdk-variant      JDK variant to build (normal) [normal]
1705   --with-jvm-variants     JVM variants (separated by commas) to build (server,
1706                           client, minimal1, kernel, zero, zeroshark) [server]
1707   --with-debug-level      set the debug level (release, fastdebug, slowdebug)
1708                           [release]
1709   --with-conf-name        use this as the name of the configuration [generated
1710                           from important configuration options]
1711   --with-builddeps-conf   use this configuration file for the builddeps
1712   --with-builddeps-server download and use build dependencies from this server
1713                           url
1714   --with-builddeps-dir    store downloaded build dependencies here
1715                           [/localhome/builddeps]
1716   --with-builddeps-group  chgrp the downloaded build dependencies to this
1717                           group
1718   --with-cacerts-file     specify alternative cacerts file
1719   --with-milestone        Set milestone value for build [internal]
1720   --with-build-number     Set build number value for build [b00]
1721   --with-user-release-suffix
1722                           Add a custom string to the version string if build
1723                           number isn't set.[username_builddateb00]
1724   --with-boot-jdk         path to Boot JDK (used to bootstrap build) [probed]
1725   --with-boot-jdk-jvmargs specify JVM arguments to be passed to all
1726                           invocations of the Boot JDK, overriding the default
1727                           values, e.g --with-boot-jdk-jvmargs="-Xmx8G
1728                           -enableassertions"
1729   --with-add-source-root  for each and every source directory, look in this
1730                           additional source root for the same directory; if it
1731                           exists and have files in it, include it in the build
1732   --with-override-source-root
1733                           for each and every source directory, look in this
1734                           override source root for the same directory; if it
1735                           exists, use that directory instead and ignore the
1736                           directory in the original source root
1737   --with-adds-and-overrides
1738                           use the subdirs 'adds' and 'overrides' in the
1739                           specified directory as add-source-root and
1740                           override-source-root
1741   --with-override-langtools
1742                           use this langtools dir for the build
1743   --with-override-corba   use this corba dir for the build
1744   --with-override-jaxp    use this jaxp dir for the build
1745   --with-override-jaxws   use this jaxws dir for the build
1746   --with-override-hotspot use this hotspot dir for the build
1747   --with-override-jdk     use this jdk dir for the build
1748   --with-import-hotspot   import hotspot binaries from this jdk image or
1749                           hotspot build dist dir instead of building from
1750                           source
1751   --with-msvcr-dll        copy this msvcr100.dll into the built JDK (Windows
1752                           only) [probed]
1753   --with-dxsdk            the DirectX SDK (Windows only) [probed]
1754   --with-dxsdk-lib        the DirectX SDK lib directory (Windows only)
1755                           [probed]
1756   --with-dxsdk-include    the DirectX SDK include directory (Windows only)
1757                           [probed]
1758   --with-extra-cflags     extra flags to be used when compiling jdk c-files
1759   --with-extra-cxxflags   extra flags to be used when compiling jdk c++-files
1760   --with-extra-ldflags    extra flags to be used when linking jdk
1761   --with-x                use the X Window System
1762   --with-cups             specify prefix directory for the cups package
1763                           (expecting the headers under PATH/include)
1764   --with-cups-include     specify directory for the cups include files
1765   --with-freetype         specify prefix directory for the freetype2 package
1766                           (expecting the libraries under PATH/lib and the
1767                           headers under PATH/include)
1768   --with-alsa             specify prefix directory for the alsa package
1769                           (expecting the libraries under PATH/lib and the
1770                           headers under PATH/include)
1771   --with-alsa-include     specify directory for the alsa include files
1772   --with-alsa-lib         specify directory for the alsa library
1773   --with-zlib             use zlib from build system or OpenJDK source
1774                           (system, bundled) [bundled]
1775   --with-stdc++lib=<static>,<dynamic>,<default>
1776                           force linking of the C++ runtime on Linux to either
1777                           static or dynamic, default is static with dynamic as
1778                           fallback
1779   --with-num-cores        number of cores in the build system, e.g.
1780                           --with-num-cores=8 [probed]
1781   --with-memory-size      memory (in MB) available in the build system, e.g.
1782                           --with-memory-size=1024 [probed]
1783   --with-jobs             number of parallel jobs to let make run [calculated
1784                           based on cores and memory]
1785   --with-sjavac-server-java
1786                           use this java binary for running the sjavac
1787                           background server [Boot JDK java]
1788   --with-sjavac-server-cores
1789                           use at most this number of concurrent threads on the
1790                           sjavac server [probed]
1791   --with-ccache-dir       where to store ccache files [~/.ccache]
1792 
1793 Some influential environment variables:
1794   PKG_CONFIG  path to pkg-config utility
1795   CC          C compiler command
1796   CFLAGS      C compiler flags
1797   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
1798               nonstandard directory <lib dir>
1799   LIBS        libraries to pass to the linker, e.g. -l<library>
1800   CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
1801               you have headers in a nonstandard directory <include dir>
1802   CXX         C++ compiler command
1803   CXXFLAGS    C++ compiler flags
1804   OBJC        Objective C compiler command
1805   OBJCFLAGS   Objective C compiler flags
1806   CPP         C preprocessor
1807   CXXCPP      C++ preprocessor
1808   XMKMF       Path to xmkmf, Makefile generator for X Window System
1809   FREETYPE2_CFLAGS
1810               C compiler flags for FREETYPE2, overriding pkg-config
1811   FREETYPE2_LIBS
1812               linker flags for FREETYPE2, overriding pkg-config
1813   ALSA_CFLAGS C compiler flags for ALSA, overriding pkg-config
1814   ALSA_LIBS   linker flags for ALSA, overriding pkg-config
1815 
1816 Use these variables to override the choices made by `configure' or to help
1817 it to find libraries and programs with nonstandard names/locations.
1818 
1819 Report bugs to <build-dev@openjdk.java.net>.
1820 OpenJDK home page: <http://openjdk.java.net>.
1821 _ACEOF
1822 ac_status=$?
1823 fi
1824 
1825 if test "$ac_init_help" = "recursive"; then
1826   # If there are subdirs, report their specific --help.
1827   for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
1828     test -d "$ac_dir" ||
1829       { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1830       continue
1831     ac_builddir=.
1832 
1833 case "$ac_dir" in
1834 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1835 *)
1836   ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
1837   # A ".." for each directory in $ac_dir_suffix.
1838   ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
1839   case $ac_top_builddir_sub in
1840   "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1841   *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1842   esac ;;
1843 esac
1844 ac_abs_top_builddir=$ac_pwd
1845 ac_abs_builddir=$ac_pwd$ac_dir_suffix
1846 # for backward compatibility:
1847 ac_top_builddir=$ac_top_build_prefix
1848 
1849 case $srcdir in
1850   .)  # We are building in place.
1851     ac_srcdir=.
1852     ac_top_srcdir=$ac_top_builddir_sub
1853     ac_abs_top_srcdir=$ac_pwd ;;
1854   [\\/]* | ?:[\\/]* )  # Absolute name.
1855     ac_srcdir=$srcdir$ac_dir_suffix;
1856     ac_top_srcdir=$srcdir
1857     ac_abs_top_srcdir=$srcdir ;;
1858   *) # Relative name.
1859     ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1860     ac_top_srcdir=$ac_top_build_prefix$srcdir
1861     ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
1862 esac
1863 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
1864 
1865     cd "$ac_dir" || { ac_status=$?; continue; }
1866     # Check for guested configure.
1867     if test -f "$ac_srcdir/configure.gnu"; then
1868       echo &&
1869       $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1870     elif test -f "$ac_srcdir/configure"; then
1871       echo &&
1872       $SHELL "$ac_srcdir/configure" --help=recursive
1873     else
1874       $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1875     fi || ac_status=$?
1876     cd "$ac_pwd" || { ac_status=$?; break; }
1877   done
1878 fi
1879 
1880 test -n "$ac_init_help" && exit $ac_status
1881 if $ac_init_version; then
1882   cat <<\_ACEOF
1883 OpenJDK configure jdk8
1884 generated by GNU Autoconf 2.68
1885 
1886 Copyright (C) 2010 Free Software Foundation, Inc.
1887 This configure script is free software; the Free Software Foundation
1888 gives unlimited permission to copy, distribute and modify it.
1889 _ACEOF
1890   exit
1891 fi
1892 
1893 ## ------------------------ ##
1894 ## Autoconf initialization. ##
1895 ## ------------------------ ##
1896 
1897 # ac_fn_c_try_compile LINENO
1898 # --------------------------
1899 # Try to compile conftest.$ac_ext, and return whether this succeeded.
1900 ac_fn_c_try_compile ()
1901 {
1902   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1903   rm -f conftest.$ac_objext
1904   if { { ac_try="$ac_compile"
1905 case "(($ac_try" in
1906   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1907   *) ac_try_echo=$ac_try;;
1908 esac
1909 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1910 $as_echo "$ac_try_echo"; } >&5
1911   (eval "$ac_compile") 2>conftest.err
1912   ac_status=$?
1913   if test -s conftest.err; then
1914     grep -v '^ *+' conftest.err >conftest.er1
1915     cat conftest.er1 >&5
1916     mv -f conftest.er1 conftest.err
1917   fi
1918   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1919   test $ac_status = 0; } && {
1920          test -z "$ac_c_werror_flag" ||
1921          test ! -s conftest.err
1922        } && test -s conftest.$ac_objext; then :
1923   ac_retval=0
1924 else
1925   $as_echo "$as_me: failed program was:" >&5
1926 sed 's/^/| /' conftest.$ac_ext >&5
1927 
1928         ac_retval=1
1929 fi
1930   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1931   as_fn_set_status $ac_retval
1932 
1933 } # ac_fn_c_try_compile
1934 
1935 # ac_fn_cxx_try_compile LINENO
1936 # ----------------------------
1937 # Try to compile conftest.$ac_ext, and return whether this succeeded.
1938 ac_fn_cxx_try_compile ()
1939 {
1940   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1941   rm -f conftest.$ac_objext
1942   if { { ac_try="$ac_compile"
1943 case "(($ac_try" in
1944   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1945   *) ac_try_echo=$ac_try;;
1946 esac
1947 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1948 $as_echo "$ac_try_echo"; } >&5
1949   (eval "$ac_compile") 2>conftest.err
1950   ac_status=$?
1951   if test -s conftest.err; then
1952     grep -v '^ *+' conftest.err >conftest.er1
1953     cat conftest.er1 >&5
1954     mv -f conftest.er1 conftest.err
1955   fi
1956   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1957   test $ac_status = 0; } && {
1958          test -z "$ac_cxx_werror_flag" ||
1959          test ! -s conftest.err
1960        } && test -s conftest.$ac_objext; then :
1961   ac_retval=0
1962 else
1963   $as_echo "$as_me: failed program was:" >&5
1964 sed 's/^/| /' conftest.$ac_ext >&5
1965 
1966         ac_retval=1
1967 fi
1968   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1969   as_fn_set_status $ac_retval
1970 
1971 } # ac_fn_cxx_try_compile
1972 
1973 # ac_fn_objc_try_compile LINENO
1974 # -----------------------------
1975 # Try to compile conftest.$ac_ext, and return whether this succeeded.
1976 ac_fn_objc_try_compile ()
1977 {
1978   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1979   rm -f conftest.$ac_objext
1980   if { { ac_try="$ac_compile"
1981 case "(($ac_try" in
1982   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1983   *) ac_try_echo=$ac_try;;
1984 esac
1985 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1986 $as_echo "$ac_try_echo"; } >&5
1987   (eval "$ac_compile") 2>conftest.err
1988   ac_status=$?
1989   if test -s conftest.err; then
1990     grep -v '^ *+' conftest.err >conftest.er1
1991     cat conftest.er1 >&5
1992     mv -f conftest.er1 conftest.err
1993   fi
1994   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1995   test $ac_status = 0; } && {
1996          test -z "$ac_objc_werror_flag" ||
1997          test ! -s conftest.err
1998        } && test -s conftest.$ac_objext; then :
1999   ac_retval=0
2000 else
2001   $as_echo "$as_me: failed program was:" >&5
2002 sed 's/^/| /' conftest.$ac_ext >&5
2003 
2004         ac_retval=1
2005 fi
2006   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2007   as_fn_set_status $ac_retval
2008 
2009 } # ac_fn_objc_try_compile
2010 
2011 # ac_fn_c_try_cpp LINENO
2012 # ----------------------
2013 # Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2014 ac_fn_c_try_cpp ()
2015 {
2016   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2017   if { { ac_try="$ac_cpp conftest.$ac_ext"
2018 case "(($ac_try" in
2019   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2020   *) ac_try_echo=$ac_try;;
2021 esac
2022 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2023 $as_echo "$ac_try_echo"; } >&5
2024   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2025   ac_status=$?
2026   if test -s conftest.err; then
2027     grep -v '^ *+' conftest.err >conftest.er1
2028     cat conftest.er1 >&5
2029     mv -f conftest.er1 conftest.err
2030   fi
2031   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2032   test $ac_status = 0; } > conftest.i && {
2033          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
2034          test ! -s conftest.err
2035        }; then :
2036   ac_retval=0
2037 else
2038   $as_echo "$as_me: failed program was:" >&5
2039 sed 's/^/| /' conftest.$ac_ext >&5
2040 
2041     ac_retval=1
2042 fi
2043   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2044   as_fn_set_status $ac_retval
2045 
2046 } # ac_fn_c_try_cpp
2047 
2048 # ac_fn_cxx_try_cpp LINENO
2049 # ------------------------
2050 # Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2051 ac_fn_cxx_try_cpp ()
2052 {
2053   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2054   if { { ac_try="$ac_cpp conftest.$ac_ext"
2055 case "(($ac_try" in
2056   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2057   *) ac_try_echo=$ac_try;;
2058 esac
2059 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2060 $as_echo "$ac_try_echo"; } >&5
2061   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2062   ac_status=$?
2063   if test -s conftest.err; then
2064     grep -v '^ *+' conftest.err >conftest.er1
2065     cat conftest.er1 >&5
2066     mv -f conftest.er1 conftest.err
2067   fi
2068   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2069   test $ac_status = 0; } > conftest.i && {
2070          test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
2071          test ! -s conftest.err
2072        }; then :
2073   ac_retval=0
2074 else
2075   $as_echo "$as_me: failed program was:" >&5
2076 sed 's/^/| /' conftest.$ac_ext >&5
2077 
2078     ac_retval=1
2079 fi
2080   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2081   as_fn_set_status $ac_retval
2082 
2083 } # ac_fn_cxx_try_cpp
2084 
2085 # ac_fn_cxx_check_header_mongrel LINENO HEADER VAR INCLUDES
2086 # ---------------------------------------------------------
2087 # Tests whether HEADER exists, giving a warning if it cannot be compiled using
2088 # the include files in INCLUDES and setting the cache variable VAR
2089 # accordingly.
2090 ac_fn_cxx_check_header_mongrel ()
2091 {
2092   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2093   if eval \${$3+:} false; then :
2094   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2095 $as_echo_n "checking for $2... " >&6; }
2096 if eval \${$3+:} false; then :
2097   $as_echo_n "(cached) " >&6
2098 fi
2099 eval ac_res=\$$3
2100                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2101 $as_echo "$ac_res" >&6; }
2102 else
2103   # Is the header compilable?
2104 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
2105 $as_echo_n "checking $2 usability... " >&6; }
2106 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2107 /* end confdefs.h.  */
2108 $4
2109 #include <$2>
2110 _ACEOF
2111 if ac_fn_cxx_try_compile "$LINENO"; then :
2112   ac_header_compiler=yes
2113 else
2114   ac_header_compiler=no
2115 fi
2116 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2117 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
2118 $as_echo "$ac_header_compiler" >&6; }
2119 
2120 # Is the header present?
2121 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
2122 $as_echo_n "checking $2 presence... " >&6; }
2123 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2124 /* end confdefs.h.  */
2125 #include <$2>
2126 _ACEOF
2127 if ac_fn_cxx_try_cpp "$LINENO"; then :
2128   ac_header_preproc=yes
2129 else
2130   ac_header_preproc=no
2131 fi
2132 rm -f conftest.err conftest.i conftest.$ac_ext
2133 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
2134 $as_echo "$ac_header_preproc" >&6; }
2135 
2136 # So?  What about this header?
2137 case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in #((
2138   yes:no: )
2139     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
2140 $as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
2141     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2142 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2143     ;;
2144   no:yes:* )
2145     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
2146 $as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
2147     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
2148 $as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
2149     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
2150 $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
2151     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
2152 $as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
2153     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2154 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2155 ( $as_echo "## ----------------------------------------- ##
2156 ## Report this to build-dev@openjdk.java.net ##
2157 ## ----------------------------------------- ##"
2158      ) | sed "s/^/$as_me: WARNING:     /" >&2
2159     ;;
2160 esac
2161   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2162 $as_echo_n "checking for $2... " >&6; }
2163 if eval \${$3+:} false; then :
2164   $as_echo_n "(cached) " >&6
2165 else
2166   eval "$3=\$ac_header_compiler"
2167 fi
2168 eval ac_res=\$$3
2169                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2170 $as_echo "$ac_res" >&6; }
2171 fi
2172   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2173 
2174 } # ac_fn_cxx_check_header_mongrel
2175 
2176 # ac_fn_cxx_try_run LINENO
2177 # ------------------------
2178 # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
2179 # that executables *can* be run.
2180 ac_fn_cxx_try_run ()
2181 {
2182   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2183   if { { ac_try="$ac_link"
2184 case "(($ac_try" in
2185   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2186   *) ac_try_echo=$ac_try;;
2187 esac
2188 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2189 $as_echo "$ac_try_echo"; } >&5
2190   (eval "$ac_link") 2>&5
2191   ac_status=$?
2192   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2193   test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
2194   { { case "(($ac_try" in
2195   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2196   *) ac_try_echo=$ac_try;;
2197 esac
2198 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2199 $as_echo "$ac_try_echo"; } >&5
2200   (eval "$ac_try") 2>&5
2201   ac_status=$?
2202   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2203   test $ac_status = 0; }; }; then :
2204   ac_retval=0
2205 else
2206   $as_echo "$as_me: program exited with status $ac_status" >&5
2207        $as_echo "$as_me: failed program was:" >&5
2208 sed 's/^/| /' conftest.$ac_ext >&5
2209 
2210        ac_retval=$ac_status
2211 fi
2212   rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2213   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2214   as_fn_set_status $ac_retval
2215 
2216 } # ac_fn_cxx_try_run
2217 
2218 # ac_fn_cxx_check_header_compile LINENO HEADER VAR INCLUDES
2219 # ---------------------------------------------------------
2220 # Tests whether HEADER exists and can be compiled using the include files in
2221 # INCLUDES, setting the cache variable VAR accordingly.
2222 ac_fn_cxx_check_header_compile ()
2223 {
2224   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2225   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2226 $as_echo_n "checking for $2... " >&6; }
2227 if eval \${$3+:} false; then :
2228   $as_echo_n "(cached) " >&6
2229 else
2230   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2231 /* end confdefs.h.  */
2232 $4
2233 #include <$2>
2234 _ACEOF
2235 if ac_fn_cxx_try_compile "$LINENO"; then :
2236   eval "$3=yes"
2237 else
2238   eval "$3=no"
2239 fi
2240 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2241 fi
2242 eval ac_res=\$$3
2243                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2244 $as_echo "$ac_res" >&6; }
2245   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2246 
2247 } # ac_fn_cxx_check_header_compile
2248 
2249 # ac_fn_cxx_compute_int LINENO EXPR VAR INCLUDES
2250 # ----------------------------------------------
2251 # Tries to find the compile-time value of EXPR in a program that includes
2252 # INCLUDES, setting VAR accordingly. Returns whether the value could be
2253 # computed
2254 ac_fn_cxx_compute_int ()
2255 {
2256   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2257   if test "$cross_compiling" = yes; then
2258     # Depending upon the size, compute the lo and hi bounds.
2259 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2260 /* end confdefs.h.  */
2261 $4
2262 int
2263 main ()
2264 {
2265 static int test_array [1 - 2 * !(($2) >= 0)];
2266 test_array [0] = 0
2267 
2268   ;
2269   return 0;
2270 }
2271 _ACEOF
2272 if ac_fn_cxx_try_compile "$LINENO"; then :
2273   ac_lo=0 ac_mid=0
2274   while :; do
2275     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2276 /* end confdefs.h.  */
2277 $4
2278 int
2279 main ()
2280 {
2281 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2282 test_array [0] = 0
2283 
2284   ;
2285   return 0;
2286 }
2287 _ACEOF
2288 if ac_fn_cxx_try_compile "$LINENO"; then :
2289   ac_hi=$ac_mid; break
2290 else
2291   as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2292                         if test $ac_lo -le $ac_mid; then
2293                           ac_lo= ac_hi=
2294                           break
2295                         fi
2296                         as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2297 fi
2298 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2299   done
2300 else
2301   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2302 /* end confdefs.h.  */
2303 $4
2304 int
2305 main ()
2306 {
2307 static int test_array [1 - 2 * !(($2) < 0)];
2308 test_array [0] = 0
2309 
2310   ;
2311   return 0;
2312 }
2313 _ACEOF
2314 if ac_fn_cxx_try_compile "$LINENO"; then :
2315   ac_hi=-1 ac_mid=-1
2316   while :; do
2317     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2318 /* end confdefs.h.  */
2319 $4
2320 int
2321 main ()
2322 {
2323 static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2324 test_array [0] = 0
2325 
2326   ;
2327   return 0;
2328 }
2329 _ACEOF
2330 if ac_fn_cxx_try_compile "$LINENO"; then :
2331   ac_lo=$ac_mid; break
2332 else
2333   as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2334                         if test $ac_mid -le $ac_hi; then
2335                           ac_lo= ac_hi=
2336                           break
2337                         fi
2338                         as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2339 fi
2340 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2341   done
2342 else
2343   ac_lo= ac_hi=
2344 fi
2345 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2346 fi
2347 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2348 # Binary search between lo and hi bounds.
2349 while test "x$ac_lo" != "x$ac_hi"; do
2350   as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2351   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2352 /* end confdefs.h.  */
2353 $4
2354 int
2355 main ()
2356 {
2357 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2358 test_array [0] = 0
2359 
2360   ;
2361   return 0;
2362 }
2363 _ACEOF
2364 if ac_fn_cxx_try_compile "$LINENO"; then :
2365   ac_hi=$ac_mid
2366 else
2367   as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2368 fi
2369 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2370 done
2371 case $ac_lo in #((
2372 ?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2373 '') ac_retval=1 ;;
2374 esac
2375   else
2376     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2377 /* end confdefs.h.  */
2378 $4
2379 static long int longval () { return $2; }
2380 static unsigned long int ulongval () { return $2; }
2381 #include <stdio.h>
2382 #include <stdlib.h>
2383 int
2384 main ()
2385 {
2386 
2387   FILE *f = fopen ("conftest.val", "w");
2388   if (! f)
2389     return 1;
2390   if (($2) < 0)
2391     {
2392       long int i = longval ();
2393       if (i != ($2))
2394         return 1;
2395       fprintf (f, "%ld", i);
2396     }
2397   else
2398     {
2399       unsigned long int i = ulongval ();
2400       if (i != ($2))
2401         return 1;
2402       fprintf (f, "%lu", i);
2403     }
2404   /* Do not output a trailing newline, as this causes \r\n confusion
2405      on some platforms.  */
2406   return ferror (f) || fclose (f) != 0;
2407 
2408   ;
2409   return 0;
2410 }
2411 _ACEOF
2412 if ac_fn_cxx_try_run "$LINENO"; then :
2413   echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2414 else
2415   ac_retval=1
2416 fi
2417 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2418   conftest.$ac_objext conftest.beam conftest.$ac_ext
2419 rm -f conftest.val
2420 
2421   fi
2422   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2423   as_fn_set_status $ac_retval
2424 
2425 } # ac_fn_cxx_compute_int
2426 
2427 # ac_fn_cxx_try_link LINENO
2428 # -------------------------
2429 # Try to link conftest.$ac_ext, and return whether this succeeded.
2430 ac_fn_cxx_try_link ()
2431 {
2432   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2433   rm -f conftest.$ac_objext conftest$ac_exeext
2434   if { { ac_try="$ac_link"
2435 case "(($ac_try" in
2436   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2437   *) ac_try_echo=$ac_try;;
2438 esac
2439 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2440 $as_echo "$ac_try_echo"; } >&5
2441   (eval "$ac_link") 2>conftest.err
2442   ac_status=$?
2443   if test -s conftest.err; then
2444     grep -v '^ *+' conftest.err >conftest.er1
2445     cat conftest.er1 >&5
2446     mv -f conftest.er1 conftest.err
2447   fi
2448   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2449   test $ac_status = 0; } && {
2450          test -z "$ac_cxx_werror_flag" ||
2451          test ! -s conftest.err
2452        } && test -s conftest$ac_exeext && {
2453          test "$cross_compiling" = yes ||
2454          $as_test_x conftest$ac_exeext
2455        }; then :
2456   ac_retval=0
2457 else
2458   $as_echo "$as_me: failed program was:" >&5
2459 sed 's/^/| /' conftest.$ac_ext >&5
2460 
2461         ac_retval=1
2462 fi
2463   # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2464   # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2465   # interfere with the next link command; also delete a directory that is
2466   # left behind by Apple's compiler.  We do this before executing the actions.
2467   rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2468   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2469   as_fn_set_status $ac_retval
2470 
2471 } # ac_fn_cxx_try_link
2472 
2473 # ac_fn_cxx_check_func LINENO FUNC VAR
2474 # ------------------------------------
2475 # Tests whether FUNC exists, setting the cache variable VAR accordingly
2476 ac_fn_cxx_check_func ()
2477 {
2478   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2479   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2480 $as_echo_n "checking for $2... " >&6; }
2481 if eval \${$3+:} false; then :
2482   $as_echo_n "(cached) " >&6
2483 else
2484   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2485 /* end confdefs.h.  */
2486 /* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2487    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
2488 #define $2 innocuous_$2
2489 
2490 /* System header to define __stub macros and hopefully few prototypes,
2491     which can conflict with char $2 (); below.
2492     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2493     <limits.h> exists even on freestanding compilers.  */
2494 
2495 #ifdef __STDC__
2496 # include <limits.h>
2497 #else
2498 # include <assert.h>
2499 #endif
2500 
2501 #undef $2
2502 
2503 /* Override any GCC internal prototype to avoid an error.
2504    Use char because int might match the return type of a GCC
2505    builtin and then its argument prototype would still apply.  */
2506 #ifdef __cplusplus
2507 extern "C"
2508 #endif
2509 char $2 ();
2510 /* The GNU C library defines this for functions which it implements
2511     to always fail with ENOSYS.  Some functions are actually named
2512     something starting with __ and the normal name is an alias.  */
2513 #if defined __stub_$2 || defined __stub___$2
2514 choke me
2515 #endif
2516 
2517 int
2518 main ()
2519 {
2520 return $2 ();
2521   ;
2522   return 0;
2523 }
2524 _ACEOF
2525 if ac_fn_cxx_try_link "$LINENO"; then :
2526   eval "$3=yes"
2527 else
2528   eval "$3=no"
2529 fi
2530 rm -f core conftest.err conftest.$ac_objext \
2531     conftest$ac_exeext conftest.$ac_ext
2532 fi
2533 eval ac_res=\$$3
2534                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2535 $as_echo "$ac_res" >&6; }
2536   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2537 
2538 } # ac_fn_cxx_check_func
2539 
2540 # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
2541 # -------------------------------------------------------
2542 # Tests whether HEADER exists and can be compiled using the include files in
2543 # INCLUDES, setting the cache variable VAR accordingly.
2544 ac_fn_c_check_header_compile ()
2545 {
2546   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2547   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2548 $as_echo_n "checking for $2... " >&6; }
2549 if eval \${$3+:} false; then :
2550   $as_echo_n "(cached) " >&6
2551 else
2552   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2553 /* end confdefs.h.  */
2554 $4
2555 #include <$2>
2556 _ACEOF
2557 if ac_fn_c_try_compile "$LINENO"; then :
2558   eval "$3=yes"
2559 else
2560   eval "$3=no"
2561 fi
2562 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2563 fi
2564 eval ac_res=\$$3
2565                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2566 $as_echo "$ac_res" >&6; }
2567   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2568 
2569 } # ac_fn_c_check_header_compile
2570 cat >config.log <<_ACEOF
2571 This file contains any messages produced by compilers while
2572 running configure, to aid debugging if configure makes a mistake.
2573 
2574 It was created by OpenJDK $as_me jdk8, which was
2575 generated by GNU Autoconf 2.68.  Invocation command line was
2576 
2577   $ $0 $@
2578 
2579 _ACEOF
2580 exec 5>>config.log
2581 {
2582 cat <<_ASUNAME
2583 ## --------- ##
2584 ## Platform. ##
2585 ## --------- ##
2586 
2587 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2588 uname -m = `(uname -m) 2>/dev/null || echo unknown`
2589 uname -r = `(uname -r) 2>/dev/null || echo unknown`
2590 uname -s = `(uname -s) 2>/dev/null || echo unknown`
2591 uname -v = `(uname -v) 2>/dev/null || echo unknown`
2592 
2593 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2594 /bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
2595 
2596 /bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
2597 /usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
2598 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2599 /usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
2600 /bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
2601 /usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
2602 /bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
2603 
2604 _ASUNAME
2605 
2606 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2607 for as_dir in $PATH
2608 do
2609   IFS=$as_save_IFS
2610   test -z "$as_dir" && as_dir=.
2611     $as_echo "PATH: $as_dir"
2612   done
2613 IFS=$as_save_IFS
2614 
2615 } >&5
2616 
2617 cat >&5 <<_ACEOF
2618 
2619 
2620 ## ----------- ##
2621 ## Core tests. ##
2622 ## ----------- ##
2623 
2624 _ACEOF
2625 
2626 
2627 # Keep a trace of the command line.
2628 # Strip out --no-create and --no-recursion so they do not pile up.
2629 # Strip out --silent because we don't want to record it for future runs.
2630 # Also quote any args containing shell meta-characters.
2631 # Make two passes to allow for proper duplicate-argument suppression.
2632 ac_configure_args=
2633 ac_configure_args0=
2634 ac_configure_args1=
2635 ac_must_keep_next=false
2636 for ac_pass in 1 2
2637 do
2638   for ac_arg
2639   do
2640     case $ac_arg in
2641     -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2642     -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2643     | -silent | --silent | --silen | --sile | --sil)
2644       continue ;;
2645     *\'*)
2646       ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2647     esac
2648     case $ac_pass in
2649     1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2650     2)
2651       as_fn_append ac_configure_args1 " '$ac_arg'"
2652       if test $ac_must_keep_next = true; then
2653         ac_must_keep_next=false # Got value, back to normal.
2654       else
2655         case $ac_arg in
2656           *=* | --config-cache | -C | -disable-* | --disable-* \
2657           | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2658           | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2659           | -with-* | --with-* | -without-* | --without-* | --x)
2660             case "$ac_configure_args0 " in
2661               "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2662             esac
2663             ;;
2664           -* ) ac_must_keep_next=true ;;
2665         esac
2666       fi
2667       as_fn_append ac_configure_args " '$ac_arg'"
2668       ;;
2669     esac
2670   done
2671 done
2672 { ac_configure_args0=; unset ac_configure_args0;}
2673 { ac_configure_args1=; unset ac_configure_args1;}
2674 
2675 # When interrupted or exit'd, cleanup temporary files, and complete
2676 # config.log.  We remove comments because anyway the quotes in there
2677 # would cause problems or look ugly.
2678 # WARNING: Use '\'' to represent an apostrophe within the trap.
2679 # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2680 trap 'exit_status=$?
2681   # Save into config.log some information that might help in debugging.
2682   {
2683     echo
2684 
2685     $as_echo "## ---------------- ##
2686 ## Cache variables. ##
2687 ## ---------------- ##"
2688     echo
2689     # The following way of writing the cache mishandles newlines in values,
2690 (
2691   for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2692     eval ac_val=\$$ac_var
2693     case $ac_val in #(
2694     *${as_nl}*)
2695       case $ac_var in #(
2696       *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2697 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
2698       esac
2699       case $ac_var in #(
2700       _ | IFS | as_nl) ;; #(
2701       BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2702       *) { eval $ac_var=; unset $ac_var;} ;;
2703       esac ;;
2704     esac
2705   done
2706   (set) 2>&1 |
2707     case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2708     *${as_nl}ac_space=\ *)
2709       sed -n \
2710         "s/'\''/'\''\\\\'\'''\''/g;
2711           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2712       ;; #(
2713     *)
2714       sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
2715       ;;
2716     esac |
2717     sort
2718 )
2719     echo
2720 
2721     $as_echo "## ----------------- ##
2722 ## Output variables. ##
2723 ## ----------------- ##"
2724     echo
2725     for ac_var in $ac_subst_vars
2726     do
2727       eval ac_val=\$$ac_var
2728       case $ac_val in
2729       *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2730       esac
2731       $as_echo "$ac_var='\''$ac_val'\''"
2732     done | sort
2733     echo
2734 
2735     if test -n "$ac_subst_files"; then
2736       $as_echo "## ------------------- ##
2737 ## File substitutions. ##
2738 ## ------------------- ##"
2739       echo
2740       for ac_var in $ac_subst_files
2741       do
2742         eval ac_val=\$$ac_var
2743         case $ac_val in
2744         *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2745         esac
2746         $as_echo "$ac_var='\''$ac_val'\''"
2747       done | sort
2748       echo
2749     fi
2750 
2751     if test -s confdefs.h; then
2752       $as_echo "## ----------- ##
2753 ## confdefs.h. ##
2754 ## ----------- ##"
2755       echo
2756       cat confdefs.h
2757       echo
2758     fi
2759     test "$ac_signal" != 0 &&
2760       $as_echo "$as_me: caught signal $ac_signal"
2761     $as_echo "$as_me: exit $exit_status"
2762   } >&5
2763   rm -f core *.core core.conftest.* &&
2764     rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
2765     exit $exit_status
2766 ' 0
2767 for ac_signal in 1 2 13 15; do
2768   trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
2769 done
2770 ac_signal=0
2771 
2772 # confdefs.h avoids OS command line length limits that DEFS can exceed.
2773 rm -f -r conftest* confdefs.h
2774 
2775 $as_echo "/* confdefs.h */" > confdefs.h
2776 
2777 # Predefined preprocessor variables.
2778 
2779 cat >>confdefs.h <<_ACEOF
2780 #define PACKAGE_NAME "$PACKAGE_NAME"
2781 _ACEOF
2782 
2783 cat >>confdefs.h <<_ACEOF
2784 #define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2785 _ACEOF
2786 
2787 cat >>confdefs.h <<_ACEOF
2788 #define PACKAGE_VERSION "$PACKAGE_VERSION"
2789 _ACEOF
2790 
2791 cat >>confdefs.h <<_ACEOF
2792 #define PACKAGE_STRING "$PACKAGE_STRING"
2793 _ACEOF
2794 
2795 cat >>confdefs.h <<_ACEOF
2796 #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2797 _ACEOF
2798 
2799 cat >>confdefs.h <<_ACEOF
2800 #define PACKAGE_URL "$PACKAGE_URL"
2801 _ACEOF
2802 
2803 
2804 # Let the site file select an alternate cache file if it wants to.
2805 # Prefer an explicitly selected file to automatically selected ones.
2806 ac_site_file1=NONE
2807 ac_site_file2=NONE
2808 if test -n "$CONFIG_SITE"; then
2809   # We do not want a PATH search for config.site.
2810   case $CONFIG_SITE in #((
2811     -*)  ac_site_file1=./$CONFIG_SITE;;
2812     */*) ac_site_file1=$CONFIG_SITE;;
2813     *)   ac_site_file1=./$CONFIG_SITE;;
2814   esac
2815 elif test "x$prefix" != xNONE; then
2816   ac_site_file1=$prefix/share/config.site
2817   ac_site_file2=$prefix/etc/config.site
2818 else
2819   ac_site_file1=$ac_default_prefix/share/config.site
2820   ac_site_file2=$ac_default_prefix/etc/config.site
2821 fi
2822 for ac_site_file in "$ac_site_file1" "$ac_site_file2"
2823 do
2824   test "x$ac_site_file" = xNONE && continue
2825   if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2826     { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2827 $as_echo "$as_me: loading site script $ac_site_file" >&6;}
2828     sed 's/^/| /' "$ac_site_file" >&5
2829     . "$ac_site_file" \
2830       || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2831 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2832 as_fn_error $? "failed to load site script $ac_site_file
2833 See \`config.log' for more details" "$LINENO" 5; }
2834   fi
2835 done
2836 
2837 if test -r "$cache_file"; then
2838   # Some versions of bash will fail to source /dev/null (special files
2839   # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
2840   if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2841     { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2842 $as_echo "$as_me: loading cache $cache_file" >&6;}
2843     case $cache_file in
2844       [\\/]* | ?:[\\/]* ) . "$cache_file";;
2845       *)                      . "./$cache_file";;
2846     esac
2847   fi
2848 else
2849   { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2850 $as_echo "$as_me: creating cache $cache_file" >&6;}
2851   >$cache_file
2852 fi
2853 
2854 # Check that the precious variables saved in the cache have kept the same
2855 # value.
2856 ac_cache_corrupted=false
2857 for ac_var in $ac_precious_vars; do
2858   eval ac_old_set=\$ac_cv_env_${ac_var}_set
2859   eval ac_new_set=\$ac_env_${ac_var}_set
2860   eval ac_old_val=\$ac_cv_env_${ac_var}_value
2861   eval ac_new_val=\$ac_env_${ac_var}_value
2862   case $ac_old_set,$ac_new_set in
2863     set,)
2864       { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2865 $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
2866       ac_cache_corrupted=: ;;
2867     ,set)
2868       { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2869 $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
2870       ac_cache_corrupted=: ;;
2871     ,);;
2872     *)
2873       if test "x$ac_old_val" != "x$ac_new_val"; then
2874         # differences in whitespace do not lead to failure.
2875         ac_old_val_w=`echo x $ac_old_val`
2876         ac_new_val_w=`echo x $ac_new_val`
2877         if test "$ac_old_val_w" != "$ac_new_val_w"; then
2878           { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2879 $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2880           ac_cache_corrupted=:
2881         else
2882           { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2883 $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2884           eval $ac_var=\$ac_old_val
2885         fi
2886         { $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
2887 $as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
2888         { $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
2889 $as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
2890       fi;;
2891   esac
2892   # Pass precious variables to config.status.
2893   if test "$ac_new_set" = set; then
2894     case $ac_new_val in
2895     *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
2896     *) ac_arg=$ac_var=$ac_new_val ;;
2897     esac
2898     case " $ac_configure_args " in
2899       *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
2900       *) as_fn_append ac_configure_args " '$ac_arg'" ;;
2901     esac
2902   fi
2903 done
2904 if $ac_cache_corrupted; then
2905   { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2906 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2907   { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2908 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
2909   as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
2910 fi
2911 ## -------------------- ##
2912 ## Main body of script. ##
2913 ## -------------------- ##
2914 
2915 ac_ext=c
2916 ac_cpp='$CPP $CPPFLAGS'
2917 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2918 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2919 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2920 
2921 
2922 
2923 ac_aux_dir=
2924 for ac_dir in build-aux "$srcdir"/build-aux; do
2925   if test -f "$ac_dir/install-sh"; then
2926     ac_aux_dir=$ac_dir
2927     ac_install_sh="$ac_aux_dir/install-sh -c"
2928     break
2929   elif test -f "$ac_dir/install.sh"; then
2930     ac_aux_dir=$ac_dir
2931     ac_install_sh="$ac_aux_dir/install.sh -c"
2932     break
2933   elif test -f "$ac_dir/shtool"; then
2934     ac_aux_dir=$ac_dir
2935     ac_install_sh="$ac_aux_dir/shtool install -c"
2936     break
2937   fi
2938 done
2939 if test -z "$ac_aux_dir"; then
2940   as_fn_error $? "cannot find install-sh, install.sh, or shtool in build-aux \"$srcdir\"/build-aux" "$LINENO" 5
2941 fi
2942 
2943 # These three variables are undocumented and unsupported,
2944 # and are intended to be withdrawn in a future Autoconf release.
2945 # They can cause serious problems if a builder's source tree is in a directory
2946 # whose full name contains unusual characters.
2947 ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
2948 ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
2949 ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
2950 
2951 
2952 # pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
2953 
2954 #
2955 # Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
2956 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
2957 #
2958 # This code is free software; you can redistribute it and/or modify it
2959 # under the terms of the GNU General Public License version 2 only, as
2960 # published by the Free Software Foundation.  Oracle designates this
2961 # particular file as subject to the "Classpath" exception as provided
2962 # by Oracle in the LICENSE file that accompanied this code.
2963 #
2964 # This code is distributed in the hope that it will be useful, but WITHOUT
2965 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
2966 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
2967 # version 2 for more details (a copy is included in the LICENSE file that
2968 # accompanied this code).
2969 #
2970 # You should have received a copy of the GNU General Public License version
2971 # 2 along with this work; if not, write to the Free Software Foundation,
2972 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
2973 #
2974 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
2975 # or visit www.oracle.com if you need additional information or have any
2976 # questions.
2977 #
2978 
2979 #
2980 # Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
2981 #
2982 # This program is free software; you can redistribute it and/or modify
2983 # it under the terms of the GNU General Public License as published by
2984 # the Free Software Foundation; either version 2 of the License, or
2985 # (at your option) any later version.
2986 #
2987 # This program is distributed in the hope that it will be useful, but
2988 # WITHOUT ANY WARRANTY; without even the implied warranty of
2989 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
2990 # General Public License for more details.
2991 #
2992 # You should have received a copy of the GNU General Public License
2993 # along with this program; if not, write to the Free Software
2994 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
2995 #
2996 # As a special exception to the GNU General Public License, if you
2997 # distribute this file as part of a program that contains a
2998 # configuration script generated by Autoconf, you may include it under
2999 # the same distribution terms that you use for the rest of that program.
3000 
3001 # PKG_PROG_PKG_CONFIG([MIN-VERSION])
3002 # ----------------------------------
3003 # PKG_PROG_PKG_CONFIG
3004 
3005 # PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
3006 #
3007 # Check to see whether a particular set of modules exists.  Similar
3008 # to PKG_CHECK_MODULES(), but does not set variables or print errors.
3009 #
3010 #
3011 # Similar to PKG_CHECK_MODULES, make sure that the first instance of
3012 # this or PKG_CHECK_MODULES is called, or make sure to call
3013 # PKG_CHECK_EXISTS manually
3014 # --------------------------------------------------------------
3015 
3016 
3017 
3018 # _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
3019 # ---------------------------------------------
3020 # _PKG_CONFIG
3021 
3022 # _PKG_SHORT_ERRORS_SUPPORTED
3023 # -----------------------------
3024 # _PKG_SHORT_ERRORS_SUPPORTED
3025 
3026 
3027 # PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
3028 # [ACTION-IF-NOT-FOUND])
3029 #
3030 #
3031 # Note that if there is a possibility the first call to
3032 # PKG_CHECK_MODULES might not happen, you should be sure to include an
3033 # explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
3034 #
3035 #
3036 # --------------------------------------------------------------
3037 # PKG_CHECK_MODULES
3038 
3039 
3040 # Include these first...
3041 #
3042 # Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
3043 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3044 #
3045 # This code is free software; you can redistribute it and/or modify it
3046 # under the terms of the GNU General Public License version 2 only, as
3047 # published by the Free Software Foundation.  Oracle designates this
3048 # particular file as subject to the "Classpath" exception as provided
3049 # by Oracle in the LICENSE file that accompanied this code.
3050 #
3051 # This code is distributed in the hope that it will be useful, but WITHOUT
3052 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3053 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3054 # version 2 for more details (a copy is included in the LICENSE file that
3055 # accompanied this code).
3056 #
3057 # You should have received a copy of the GNU General Public License version
3058 # 2 along with this work; if not, write to the Free Software Foundation,
3059 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3060 #
3061 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3062 # or visit www.oracle.com if you need additional information or have any
3063 # questions.
3064 #
3065 
3066 
3067 
3068 # This will make sure the given variable points to a full and proper
3069 # path. This means:
3070 # 1) There will be no spaces in the path. On posix platforms,
3071 #    spaces in the path will result in an error. On Windows,
3072 #    the path will be rewritten using short-style to be space-free.
3073 # 2) The path will be absolute, and it will be in unix-style (on
3074 #     cygwin).
3075 # $1: The name of the variable to fix
3076 
3077 
3078 # This will make sure the given variable points to a executable
3079 # with a full and proper path. This means:
3080 # 1) There will be no spaces in the path. On posix platforms,
3081 #    spaces in the path will result in an error. On Windows,
3082 #    the path will be rewritten using short-style to be space-free.
3083 # 2) The path will be absolute, and it will be in unix-style (on
3084 #     cygwin).
3085 # Any arguments given to the executable is preserved.
3086 # If the input variable does not have a directory specification, then
3087 # it need to be in the PATH.
3088 # $1: The name of the variable to fix
3089 
3090 
3091 
3092 
3093 
3094 
3095 # Test that variable $1 denoting a program is not empty. If empty, exit with an error.
3096 # $1: variable to check
3097 # $2: executable name to print in warning (optional)
3098 
3099 
3100 # Does AC_PATH_PROG followed by BASIC_CHECK_NONEMPTY.
3101 # Arguments as AC_PATH_PROG:
3102 # $1: variable to set
3103 # $2: executable name to look for
3104 
3105 
3106 # Setup the most fundamental tools that relies on not much else to set up,
3107 # but is used by much of the early bootstrap code.
3108 
3109 
3110 # Setup basic configuration paths, and platform-specific stuff related to PATHs.
3111 
3112 
3113 
3114 
3115 
3116 
3117 
3118 #%%% Simple tools %%%
3119 
3120 # Check if we have found a usable version of make
3121 # $1: the path to a potential make binary (or empty)
3122 # $2: the description on how we found this
3123 
3124 
3125 # Goes looking for a usable version of GNU make.
3126 
3127 
3128 
3129 
3130 
3131 
3132 # Check if build directory is on local disk. If not possible to determine,
3133 # we prefer to claim it's local.
3134 # Argument 1: directory to test
3135 # Argument 2: what to do if it is on local disk
3136 # Argument 3: what to do otherwise (remote disk or failure)
3137 
3138 
3139 # Check that source files have basic read permissions set. This might
3140 # not be the case in cygwin in certain conditions.
3141 
3142 
3143 
3144 
3145 #
3146 # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3147 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3148 #
3149 # This code is free software; you can redistribute it and/or modify it
3150 # under the terms of the GNU General Public License version 2 only, as
3151 # published by the Free Software Foundation.  Oracle designates this
3152 # particular file as subject to the "Classpath" exception as provided
3153 # by Oracle in the LICENSE file that accompanied this code.
3154 #
3155 # This code is distributed in the hope that it will be useful, but WITHOUT
3156 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3157 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3158 # version 2 for more details (a copy is included in the LICENSE file that
3159 # accompanied this code).
3160 #
3161 # You should have received a copy of the GNU General Public License version
3162 # 2 along with this work; if not, write to the Free Software Foundation,
3163 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3164 #
3165 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3166 # or visit www.oracle.com if you need additional information or have any
3167 # questions.
3168 #
3169 
3170 
3171 
3172 
3173 
3174 # Helper function which possibly converts a path using DOS-style short mode.
3175 # If so, the updated path is stored in $new_path.
3176 # $1: The path to check
3177 
3178 
3179 # Helper function which possibly converts a path using DOS-style short mode.
3180 # If so, the updated path is stored in $new_path.
3181 # $1: The path to check
3182 
3183 
3184 # FIXME: The BASIC_FIXUP_*_CYGWIN/MSYS is most likely too convoluted
3185 # and could probably be heavily simplified. However, all changes in this
3186 # area tend to need lot of testing in different scenarios, and in lack of
3187 # proper unit testing, cleaning this up has not been deemed worth the effort
3188 # at the moment.
3189 
3190 
3191 
3192 
3193 
3194 
3195 
3196 
3197 
3198 # Setup basic configuration paths, and platform-specific stuff related to PATHs.
3199 
3200 
3201 
3202 
3203 #
3204 # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3205 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3206 #
3207 # This code is free software; you can redistribute it and/or modify it
3208 # under the terms of the GNU General Public License version 2 only, as
3209 # published by the Free Software Foundation.  Oracle designates this
3210 # particular file as subject to the "Classpath" exception as provided
3211 # by Oracle in the LICENSE file that accompanied this code.
3212 #
3213 # This code is distributed in the hope that it will be useful, but WITHOUT
3214 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3215 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3216 # version 2 for more details (a copy is included in the LICENSE file that
3217 # accompanied this code).
3218 #
3219 # You should have received a copy of the GNU General Public License version
3220 # 2 along with this work; if not, write to the Free Software Foundation,
3221 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3222 #
3223 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3224 # or visit www.oracle.com if you need additional information or have any
3225 # questions.
3226 #
3227 
3228 
3229 
3230 
3231 
3232 
3233 
3234 
3235 
3236 
3237 
3238 # ... then the rest
3239 #
3240 # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3241 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3242 #
3243 # This code is free software; you can redistribute it and/or modify it
3244 # under the terms of the GNU General Public License version 2 only, as
3245 # published by the Free Software Foundation.  Oracle designates this
3246 # particular file as subject to the "Classpath" exception as provided
3247 # by Oracle in the LICENSE file that accompanied this code.
3248 #
3249 # This code is distributed in the hope that it will be useful, but WITHOUT
3250 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3251 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3252 # version 2 for more details (a copy is included in the LICENSE file that
3253 # accompanied this code).
3254 #
3255 # You should have received a copy of the GNU General Public License version
3256 # 2 along with this work; if not, write to the Free Software Foundation,
3257 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3258 #
3259 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3260 # or visit www.oracle.com if you need additional information or have any
3261 # questions.
3262 #
3263 
3264 # Execute the check given as argument, and verify the result
3265 # If the Boot JDK was previously found, do nothing
3266 # $1 A command line (typically autoconf macro) to execute
3267 
3268 
3269 # Test: Is bootjdk explicitely set by command line arguments?
3270 
3271 
3272 # Test: Is bootjdk available from builddeps?
3273 
3274 
3275 # Test: Is $JAVA_HOME set?
3276 
3277 
3278 # Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
3279 
3280 
3281 # Test: Is there a /usr/libexec/java_home? (Typically on MacOSX)
3282 
3283 
3284 # Look for a jdk in the given path. If there are multiple, try to select the newest.
3285 # If found, set BOOT_JDK and BOOT_JDK_FOUND.
3286 # $1 = Path to directory containing jdk installations.
3287 # $2 = String to append to the found JDK directory to get the proper JDK home
3288 
3289 
3290 # Call BOOTJDK_FIND_BEST_JDK_IN_DIRECTORY, but use the given
3291 # environmental variable as base for where to look.
3292 # $1 Name of an environmal variable, assumed to point to the Program Files directory.
3293 
3294 
3295 # Test: Is there a JDK installed in default, well-known locations?
3296 
3297 
3298 # Check that a command-line tool in the Boot JDK is correct
3299 # $1 = name of variable to assign
3300 # $2 = name of binary
3301 
3302 
3303 ###############################################################################
3304 #
3305 # We need a Boot JDK to bootstrap the build.
3306 #
3307 
3308 
3309 
3310 
3311 
3312 #
3313 # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3314 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3315 #
3316 # This code is free software; you can redistribute it and/or modify it
3317 # under the terms of the GNU General Public License version 2 only, as
3318 # published by the Free Software Foundation.  Oracle designates this
3319 # particular file as subject to the "Classpath" exception as provided
3320 # by Oracle in the LICENSE file that accompanied this code.
3321 #
3322 # This code is distributed in the hope that it will be useful, but WITHOUT
3323 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3324 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3325 # version 2 for more details (a copy is included in the LICENSE file that
3326 # accompanied this code).
3327 #
3328 # You should have received a copy of the GNU General Public License version
3329 # 2 along with this work; if not, write to the Free Software Foundation,
3330 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3331 #
3332 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3333 # or visit www.oracle.com if you need additional information or have any
3334 # questions.
3335 #
3336 
3337 
3338 
3339 
3340 
3341 
3342 
3343 
3344 
3345 
3346 
3347 
3348 
3349 
3350 
3351 
3352 
3353 
3354 
3355 
3356 #
3357 # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3358 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3359 #
3360 # This code is free software; you can redistribute it and/or modify it
3361 # under the terms of the GNU General Public License version 2 only, as
3362 # published by the Free Software Foundation.  Oracle designates this
3363 # particular file as subject to the "Classpath" exception as provided
3364 # by Oracle in the LICENSE file that accompanied this code.
3365 #
3366 # This code is distributed in the hope that it will be useful, but WITHOUT
3367 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3368 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3369 # version 2 for more details (a copy is included in the LICENSE file that
3370 # accompanied this code).
3371 #
3372 # You should have received a copy of the GNU General Public License version
3373 # 2 along with this work; if not, write to the Free Software Foundation,
3374 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3375 #
3376 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3377 # or visit www.oracle.com if you need additional information or have any
3378 # questions.
3379 #
3380 
3381 
3382 
3383 
3384 
3385 cygwin_help() {
3386     case $1 in
3387     unzip)
3388         PKGHANDLER_COMMAND="cd <location of cygwin setup.exe> && cmd /c setup -q -P unzip" ;;
3389     zip)
3390         PKGHANDLER_COMMAND="cd <location of cygwin setup.exe> && cmd /c setup -q -P zip" ;;
3391     make)
3392         PKGHANDLER_COMMAND="cd <location of cygwin setup.exe> && cmd /c setup -q -P make" ;;
3393     * )
3394        break ;;
3395     esac
3396 }
3397 
3398 apt_help() {
3399     case $1 in
3400     devkit)
3401         PKGHANDLER_COMMAND="sudo apt-get install build-essential" ;;
3402     openjdk)
3403         PKGHANDLER_COMMAND="sudo apt-get install openjdk-7-jdk" ;;
3404     alsa)
3405         PKGHANDLER_COMMAND="sudo apt-get install libasound2-dev" ;;
3406     cups)
3407         PKGHANDLER_COMMAND="sudo apt-get install libcups2-dev" ;;
3408     freetype2)
3409         PKGHANDLER_COMMAND="sudo apt-get install libfreetype6-dev" ;;
3410     pulse)
3411         PKGHANDLER_COMMAND="sudo apt-get install libpulse-dev" ;;
3412     x11)
3413         PKGHANDLER_COMMAND="sudo apt-get install libX11-dev libxext-dev libxrender-dev libxtst-dev" ;;
3414     ccache)
3415         PKGHANDLER_COMMAND="sudo apt-get install ccache" ;;
3416     * )
3417        break ;;
3418     esac
3419 }
3420 
3421 yum_help() {
3422     case $1 in
3423     devkit)
3424         PKGHANDLER_COMMAND="sudo yum groupinstall \"Development Tools\"" ;;
3425     openjdk)
3426         PKGHANDLER_COMMAND="sudo yum install java-1.7.0-openjdk" ;;
3427     alsa)
3428         PKGHANDLER_COMMAND="sudo yum install alsa-lib-devel" ;;
3429     cups)
3430         PKGHANDLER_COMMAND="sudo yum install cups-devel" ;;
3431     freetype2)
3432         PKGHANDLER_COMMAND="sudo yum install freetype2-devel" ;;
3433     pulse)
3434         PKGHANDLER_COMMAND="sudo yum install pulseaudio-libs-devel" ;;
3435     x11)
3436         PKGHANDLER_COMMAND="sudo yum install libXtst-devel" ;;
3437     ccache)
3438         PKGHANDLER_COMMAND="sudo yum install ccache" ;;
3439     * )
3440        break ;;
3441     esac
3442 }
3443 
3444 port_help() {
3445     PKGHANDLER_COMMAND=""
3446 }
3447 
3448 pkgutil_help() {
3449     PKGHANDLER_COMMAND=""
3450 }
3451 
3452 pkgadd_help() {
3453     PKGHANDLER_COMMAND=""
3454 }
3455 
3456 
3457 
3458 #
3459 # Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
3460 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3461 #
3462 # This code is free software; you can redistribute it and/or modify it
3463 # under the terms of the GNU General Public License version 2 only, as
3464 # published by the Free Software Foundation.  Oracle designates this
3465 # particular file as subject to the "Classpath" exception as provided
3466 # by Oracle in the LICENSE file that accompanied this code.
3467 #
3468 # This code is distributed in the hope that it will be useful, but WITHOUT
3469 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3470 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3471 # version 2 for more details (a copy is included in the LICENSE file that
3472 # accompanied this code).
3473 #
3474 # You should have received a copy of the GNU General Public License version
3475 # 2 along with this work; if not, write to the Free Software Foundation,
3476 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3477 #
3478 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3479 # or visit www.oracle.com if you need additional information or have any
3480 # questions.
3481 #
3482 
3483 
3484 
3485 
3486 
3487 
3488 
3489 
3490 ###############################################################################
3491 #
3492 # Should we build only OpenJDK even if closed sources are present?
3493 #
3494 
3495 
3496 
3497 
3498 ###############################################################################
3499 #
3500 # Setup version numbers
3501 #
3502 
3503 
3504 
3505 
3506 
3507 
3508 # Support for customization of the build process. Some build files
3509 # will include counterparts from this location, if they exist. This allows
3510 # for a degree of customization of the build targets and the rules/recipes
3511 # to create them
3512 
3513 # Check whether --with-custom-make-dir was given.
3514 if test "${with_custom_make_dir+set}" = set; then :
3515   withval=$with_custom_make_dir; CUSTOM_MAKE_DIR=$with_custom_make_dir
3516 fi
3517 
3518 
3519 
3520 #
3521 # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3522 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3523 #
3524 # This code is free software; you can redistribute it and/or modify it
3525 # under the terms of the GNU General Public License version 2 only, as
3526 # published by the Free Software Foundation.  Oracle designates this
3527 # particular file as subject to the "Classpath" exception as provided
3528 # by Oracle in the LICENSE file that accompanied this code.
3529 #
3530 # This code is distributed in the hope that it will be useful, but WITHOUT
3531 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3532 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3533 # version 2 for more details (a copy is included in the LICENSE file that
3534 # accompanied this code).
3535 #
3536 # You should have received a copy of the GNU General Public License version
3537 # 2 along with this work; if not, write to the Free Software Foundation,
3538 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3539 #
3540 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3541 # or visit www.oracle.com if you need additional information or have any
3542 # questions.
3543 #
3544 
3545 
3546 
3547 
3548 
3549 
3550 
3551 
3552 
3553 
3554 
3555 
3556 
3557 
3558 
3559 #
3560 # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3561 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3562 #
3563 # This code is free software; you can redistribute it and/or modify it
3564 # under the terms of the GNU General Public License version 2 only, as
3565 # published by the Free Software Foundation.  Oracle designates this
3566 # particular file as subject to the "Classpath" exception as provided
3567 # by Oracle in the LICENSE file that accompanied this code.
3568 #
3569 # This code is distributed in the hope that it will be useful, but WITHOUT
3570 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3571 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3572 # version 2 for more details (a copy is included in the LICENSE file that
3573 # accompanied this code).
3574 #
3575 # You should have received a copy of the GNU General Public License version
3576 # 2 along with this work; if not, write to the Free Software Foundation,
3577 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3578 #
3579 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3580 # or visit www.oracle.com if you need additional information or have any
3581 # questions.
3582 #
3583 
3584 # Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
3585 # Converts autoconf style CPU name to OpenJDK style, into
3586 # VAR_CPU, VAR_CPU_ARCH, VAR_CPU_BITS and VAR_CPU_ENDIAN.
3587 
3588 
3589 # Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
3590 # Converts autoconf style OS name to OpenJDK style, into
3591 # VAR_OS and VAR_OS_API.
3592 
3593 
3594 # Expects $host_os $host_cpu $build_os and $build_cpu
3595 # and $with_target_bits to have been setup!
3596 #
3597 # Translate the standard triplet(quadruplet) definition
3598 # of the target/build system into OPENJDK_TARGET_OS, OPENJDK_TARGET_CPU,
3599 # OPENJDK_BUILD_OS, etc.
3600 
3601 
3602 # Check if a reduced build (32-bit on 64-bit platforms) is requested, and modify behaviour
3603 # accordingly. Must be done after setting up build and target system, but before
3604 # doing anything else with these values.
3605 
3606 
3607     # Setup the legacy variables, for controlling the old makefiles.
3608     #
3609 
3610 
3611 
3612 
3613 #%%% Build and target systems %%%
3614 
3615 
3616 
3617 
3618 # Support macro for PLATFORM_SETUP_OPENJDK_TARGET_BITS.
3619 # Add -mX to various FLAGS variables.
3620 
3621 
3622 
3623 
3624 
3625 
3626 #
3627 # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3628 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3629 #
3630 # This code is free software; you can redistribute it and/or modify it
3631 # under the terms of the GNU General Public License version 2 only, as
3632 # published by the Free Software Foundation.  Oracle designates this
3633 # particular file as subject to the "Classpath" exception as provided
3634 # by Oracle in the LICENSE file that accompanied this code.
3635 #
3636 # This code is distributed in the hope that it will be useful, but WITHOUT
3637 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3638 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3639 # version 2 for more details (a copy is included in the LICENSE file that
3640 # accompanied this code).
3641 #
3642 # You should have received a copy of the GNU General Public License version
3643 # 2 along with this work; if not, write to the Free Software Foundation,
3644 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3645 #
3646 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3647 # or visit www.oracle.com if you need additional information or have any
3648 # questions.
3649 #
3650 
3651 
3652 
3653 
3654 
3655 
3656 
3657 
3658 #
3659 # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3660 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3661 #
3662 # This code is free software; you can redistribute it and/or modify it
3663 # under the terms of the GNU General Public License version 2 only, as
3664 # published by the Free Software Foundation.  Oracle designates this
3665 # particular file as subject to the "Classpath" exception as provided
3666 # by Oracle in the LICENSE file that accompanied this code.
3667 #
3668 # This code is distributed in the hope that it will be useful, but WITHOUT
3669 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3670 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3671 # version 2 for more details (a copy is included in the LICENSE file that
3672 # accompanied this code).
3673 #
3674 # You should have received a copy of the GNU General Public License version
3675 # 2 along with this work; if not, write to the Free Software Foundation,
3676 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3677 #
3678 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3679 # or visit www.oracle.com if you need additional information or have any
3680 # questions.
3681 #
3682 
3683 # $1 = compiler to test (CC or CXX)
3684 # $2 = human readable name of compiler (C or C++)
3685 
3686 
3687 
3688 
3689 
3690 # $1 = compiler to test (CC or CXX)
3691 # $2 = human readable name of compiler (C or C++)
3692 # $3 = list of compiler names to search for
3693 
3694 
3695 
3696 
3697 
3698 
3699 
3700 
3701 
3702 
3703 
3704 
3705 #
3706 # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3707 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3708 #
3709 # This code is free software; you can redistribute it and/or modify it
3710 # under the terms of the GNU General Public License version 2 only, as
3711 # published by the Free Software Foundation.  Oracle designates this
3712 # particular file as subject to the "Classpath" exception as provided
3713 # by Oracle in the LICENSE file that accompanied this code.
3714 #
3715 # This code is distributed in the hope that it will be useful, but WITHOUT
3716 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3717 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3718 # version 2 for more details (a copy is included in the LICENSE file that
3719 # accompanied this code).
3720 #
3721 # You should have received a copy of the GNU General Public License version
3722 # 2 along with this work; if not, write to the Free Software Foundation,
3723 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3724 #
3725 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3726 # or visit www.oracle.com if you need additional information or have any
3727 # questions.
3728 #
3729 
3730 
3731 
3732 
3733 
3734 
3735 
3736 # Check if the VS env variables were setup prior to running configure.
3737 # If not, then find vcvarsall.bat and run it automatically, and integrate
3738 # the set env variables into the spec file.
3739 
3740 
3741 
3742 # Setup the DXSDK paths
3743 
3744 
3745 
3746 
3747 
3748 
3749 # This line needs to be here, verbatim, after all includes and the dummy hook
3750 # definitions. It is replaced with custom functionality when building
3751 # custom sources.
3752 #CUSTOM_AUTOCONF_INCLUDE
3753 
3754 # Do not change or remove the following line, it is needed for consistency checks:
3755 DATE_WHEN_GENERATED=1363203123
3756 
3757 ###############################################################################
3758 #
3759 # Initialization / Boot-strapping
3760 #
3761 # The bootstrapping process needs to solve the "chicken or the egg" problem,
3762 # thus it jumps back and forth, each time gaining something needed later on.
3763 #
3764 ###############################################################################
3765 
3766 # Basic initialization that must happen first of all
3767 
3768 # Save the original command line. This is passed to us by the wrapper configure script.
3769 
3770 DATE_WHEN_CONFIGURED=`LANG=C date`
3771 
3772 { $as_echo "$as_me:${as_lineno-$LINENO}: Configuration created at $DATE_WHEN_CONFIGURED." >&5
3773 $as_echo "$as_me: Configuration created at $DATE_WHEN_CONFIGURED." >&6;}
3774 { $as_echo "$as_me:${as_lineno-$LINENO}: configure script generated at timestamp $DATE_WHEN_GENERATED." >&5
3775 $as_echo "$as_me: configure script generated at timestamp $DATE_WHEN_GENERATED." >&6;}
3776 
3777 
3778 
3779 # Start with tools that do not need have cross compilation support
3780 # and can be expected to be found in the default PATH. These tools are
3781 # used by configure. Nor are these tools expected to be found in the
3782 # devkit from the builddeps server either, since they are
3783 # needed to download the devkit.
3784 
3785 # First are all the simple required tools.
3786 
3787     for ac_prog in basename
3788 do
3789   # Extract the first word of "$ac_prog", so it can be a program name with args.
3790 set dummy $ac_prog; ac_word=$2
3791 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3792 $as_echo_n "checking for $ac_word... " >&6; }
3793 if ${ac_cv_path_BASENAME+:} false; then :
3794   $as_echo_n "(cached) " >&6
3795 else
3796   case $BASENAME in
3797   [\\/]* | ?:[\\/]*)
3798   ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
3799   ;;
3800   *)
3801   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3802 for as_dir in $PATH
3803 do
3804   IFS=$as_save_IFS
3805   test -z "$as_dir" && as_dir=.
3806     for ac_exec_ext in '' $ac_executable_extensions; do
3807   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3808     ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
3809     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3810     break 2
3811   fi
3812 done
3813   done
3814 IFS=$as_save_IFS
3815 
3816   ;;
3817 esac
3818 fi
3819 BASENAME=$ac_cv_path_BASENAME
3820 if test -n "$BASENAME"; then
3821   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
3822 $as_echo "$BASENAME" >&6; }
3823 else
3824   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3825 $as_echo "no" >&6; }
3826 fi
3827 
3828 
3829   test -n "$BASENAME" && break
3830 done
3831 
3832 
3833     if test "x$BASENAME" = x; then
3834         if test "xbasename" = x; then
3835           PROG_NAME=basename
3836         else
3837           PROG_NAME=basename
3838         fi
3839         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
3840 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
3841         as_fn_error $? "Cannot continue" "$LINENO" 5
3842     fi
3843 
3844 
3845 
3846     for ac_prog in bash
3847 do
3848   # Extract the first word of "$ac_prog", so it can be a program name with args.
3849 set dummy $ac_prog; ac_word=$2
3850 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3851 $as_echo_n "checking for $ac_word... " >&6; }
3852 if ${ac_cv_path_BASH+:} false; then :
3853   $as_echo_n "(cached) " >&6
3854 else
3855   case $BASH in
3856   [\\/]* | ?:[\\/]*)
3857   ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
3858   ;;
3859   *)
3860   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3861 for as_dir in $PATH
3862 do
3863   IFS=$as_save_IFS
3864   test -z "$as_dir" && as_dir=.
3865     for ac_exec_ext in '' $ac_executable_extensions; do
3866   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3867     ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
3868     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3869     break 2
3870   fi
3871 done
3872   done
3873 IFS=$as_save_IFS
3874 
3875   ;;
3876 esac
3877 fi
3878 BASH=$ac_cv_path_BASH
3879 if test -n "$BASH"; then
3880   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
3881 $as_echo "$BASH" >&6; }
3882 else
3883   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3884 $as_echo "no" >&6; }
3885 fi
3886 
3887 
3888   test -n "$BASH" && break
3889 done
3890 
3891 
3892     if test "x$BASH" = x; then
3893         if test "xbash" = x; then
3894           PROG_NAME=bash
3895         else
3896           PROG_NAME=bash
3897         fi
3898         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
3899 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
3900         as_fn_error $? "Cannot continue" "$LINENO" 5
3901     fi
3902 
3903 
3904 
3905     for ac_prog in cat
3906 do
3907   # Extract the first word of "$ac_prog", so it can be a program name with args.
3908 set dummy $ac_prog; ac_word=$2
3909 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3910 $as_echo_n "checking for $ac_word... " >&6; }
3911 if ${ac_cv_path_CAT+:} false; then :
3912   $as_echo_n "(cached) " >&6
3913 else
3914   case $CAT in
3915   [\\/]* | ?:[\\/]*)
3916   ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
3917   ;;
3918   *)
3919   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3920 for as_dir in $PATH
3921 do
3922   IFS=$as_save_IFS
3923   test -z "$as_dir" && as_dir=.
3924     for ac_exec_ext in '' $ac_executable_extensions; do
3925   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3926     ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
3927     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3928     break 2
3929   fi
3930 done
3931   done
3932 IFS=$as_save_IFS
3933 
3934   ;;
3935 esac
3936 fi
3937 CAT=$ac_cv_path_CAT
3938 if test -n "$CAT"; then
3939   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
3940 $as_echo "$CAT" >&6; }
3941 else
3942   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3943 $as_echo "no" >&6; }
3944 fi
3945 
3946 
3947   test -n "$CAT" && break
3948 done
3949 
3950 
3951     if test "x$CAT" = x; then
3952         if test "xcat" = x; then
3953           PROG_NAME=cat
3954         else
3955           PROG_NAME=cat
3956         fi
3957         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
3958 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
3959         as_fn_error $? "Cannot continue" "$LINENO" 5
3960     fi
3961 
3962 
3963 
3964     for ac_prog in chmod
3965 do
3966   # Extract the first word of "$ac_prog", so it can be a program name with args.
3967 set dummy $ac_prog; ac_word=$2
3968 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3969 $as_echo_n "checking for $ac_word... " >&6; }
3970 if ${ac_cv_path_CHMOD+:} false; then :
3971   $as_echo_n "(cached) " >&6
3972 else
3973   case $CHMOD in
3974   [\\/]* | ?:[\\/]*)
3975   ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
3976   ;;
3977   *)
3978   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3979 for as_dir in $PATH
3980 do
3981   IFS=$as_save_IFS
3982   test -z "$as_dir" && as_dir=.
3983     for ac_exec_ext in '' $ac_executable_extensions; do
3984   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3985     ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
3986     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3987     break 2
3988   fi
3989 done
3990   done
3991 IFS=$as_save_IFS
3992 
3993   ;;
3994 esac
3995 fi
3996 CHMOD=$ac_cv_path_CHMOD
3997 if test -n "$CHMOD"; then
3998   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
3999 $as_echo "$CHMOD" >&6; }
4000 else
4001   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4002 $as_echo "no" >&6; }
4003 fi
4004 
4005 
4006   test -n "$CHMOD" && break
4007 done
4008 
4009 
4010     if test "x$CHMOD" = x; then
4011         if test "xchmod" = x; then
4012           PROG_NAME=chmod
4013         else
4014           PROG_NAME=chmod
4015         fi
4016         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4017 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4018         as_fn_error $? "Cannot continue" "$LINENO" 5
4019     fi
4020 
4021 
4022 
4023     for ac_prog in cmp
4024 do
4025   # Extract the first word of "$ac_prog", so it can be a program name with args.
4026 set dummy $ac_prog; ac_word=$2
4027 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4028 $as_echo_n "checking for $ac_word... " >&6; }
4029 if ${ac_cv_path_CMP+:} false; then :
4030   $as_echo_n "(cached) " >&6
4031 else
4032   case $CMP in
4033   [\\/]* | ?:[\\/]*)
4034   ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
4035   ;;
4036   *)
4037   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4038 for as_dir in $PATH
4039 do
4040   IFS=$as_save_IFS
4041   test -z "$as_dir" && as_dir=.
4042     for ac_exec_ext in '' $ac_executable_extensions; do
4043   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4044     ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
4045     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4046     break 2
4047   fi
4048 done
4049   done
4050 IFS=$as_save_IFS
4051 
4052   ;;
4053 esac
4054 fi
4055 CMP=$ac_cv_path_CMP
4056 if test -n "$CMP"; then
4057   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
4058 $as_echo "$CMP" >&6; }
4059 else
4060   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4061 $as_echo "no" >&6; }
4062 fi
4063 
4064 
4065   test -n "$CMP" && break
4066 done
4067 
4068 
4069     if test "x$CMP" = x; then
4070         if test "xcmp" = x; then
4071           PROG_NAME=cmp
4072         else
4073           PROG_NAME=cmp
4074         fi
4075         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4076 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4077         as_fn_error $? "Cannot continue" "$LINENO" 5
4078     fi
4079 
4080 
4081 
4082     for ac_prog in comm
4083 do
4084   # Extract the first word of "$ac_prog", so it can be a program name with args.
4085 set dummy $ac_prog; ac_word=$2
4086 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4087 $as_echo_n "checking for $ac_word... " >&6; }
4088 if ${ac_cv_path_COMM+:} false; then :
4089   $as_echo_n "(cached) " >&6
4090 else
4091   case $COMM in
4092   [\\/]* | ?:[\\/]*)
4093   ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
4094   ;;
4095   *)
4096   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4097 for as_dir in $PATH
4098 do
4099   IFS=$as_save_IFS
4100   test -z "$as_dir" && as_dir=.
4101     for ac_exec_ext in '' $ac_executable_extensions; do
4102   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4103     ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
4104     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4105     break 2
4106   fi
4107 done
4108   done
4109 IFS=$as_save_IFS
4110 
4111   ;;
4112 esac
4113 fi
4114 COMM=$ac_cv_path_COMM
4115 if test -n "$COMM"; then
4116   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
4117 $as_echo "$COMM" >&6; }
4118 else
4119   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4120 $as_echo "no" >&6; }
4121 fi
4122 
4123 
4124   test -n "$COMM" && break
4125 done
4126 
4127 
4128     if test "x$COMM" = x; then
4129         if test "xcomm" = x; then
4130           PROG_NAME=comm
4131         else
4132           PROG_NAME=comm
4133         fi
4134         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4135 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4136         as_fn_error $? "Cannot continue" "$LINENO" 5
4137     fi
4138 
4139 
4140 
4141     for ac_prog in cp
4142 do
4143   # Extract the first word of "$ac_prog", so it can be a program name with args.
4144 set dummy $ac_prog; ac_word=$2
4145 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4146 $as_echo_n "checking for $ac_word... " >&6; }
4147 if ${ac_cv_path_CP+:} false; then :
4148   $as_echo_n "(cached) " >&6
4149 else
4150   case $CP in
4151   [\\/]* | ?:[\\/]*)
4152   ac_cv_path_CP="$CP" # Let the user override the test with a path.
4153   ;;
4154   *)
4155   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4156 for as_dir in $PATH
4157 do
4158   IFS=$as_save_IFS
4159   test -z "$as_dir" && as_dir=.
4160     for ac_exec_ext in '' $ac_executable_extensions; do
4161   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4162     ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
4163     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4164     break 2
4165   fi
4166 done
4167   done
4168 IFS=$as_save_IFS
4169 
4170   ;;
4171 esac
4172 fi
4173 CP=$ac_cv_path_CP
4174 if test -n "$CP"; then
4175   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
4176 $as_echo "$CP" >&6; }
4177 else
4178   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4179 $as_echo "no" >&6; }
4180 fi
4181 
4182 
4183   test -n "$CP" && break
4184 done
4185 
4186 
4187     if test "x$CP" = x; then
4188         if test "xcp" = x; then
4189           PROG_NAME=cp
4190         else
4191           PROG_NAME=cp
4192         fi
4193         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4194 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4195         as_fn_error $? "Cannot continue" "$LINENO" 5
4196     fi
4197 
4198 
4199 
4200     for ac_prog in cpio
4201 do
4202   # Extract the first word of "$ac_prog", so it can be a program name with args.
4203 set dummy $ac_prog; ac_word=$2
4204 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4205 $as_echo_n "checking for $ac_word... " >&6; }
4206 if ${ac_cv_path_CPIO+:} false; then :
4207   $as_echo_n "(cached) " >&6
4208 else
4209   case $CPIO in
4210   [\\/]* | ?:[\\/]*)
4211   ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
4212   ;;
4213   *)
4214   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4215 for as_dir in $PATH
4216 do
4217   IFS=$as_save_IFS
4218   test -z "$as_dir" && as_dir=.
4219     for ac_exec_ext in '' $ac_executable_extensions; do
4220   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4221     ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
4222     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4223     break 2
4224   fi
4225 done
4226   done
4227 IFS=$as_save_IFS
4228 
4229   ;;
4230 esac
4231 fi
4232 CPIO=$ac_cv_path_CPIO
4233 if test -n "$CPIO"; then
4234   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
4235 $as_echo "$CPIO" >&6; }
4236 else
4237   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4238 $as_echo "no" >&6; }
4239 fi
4240 
4241 
4242   test -n "$CPIO" && break
4243 done
4244 
4245 
4246     if test "x$CPIO" = x; then
4247         if test "xcpio" = x; then
4248           PROG_NAME=cpio
4249         else
4250           PROG_NAME=cpio
4251         fi
4252         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4253 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4254         as_fn_error $? "Cannot continue" "$LINENO" 5
4255     fi
4256 
4257 
4258 
4259     for ac_prog in cut
4260 do
4261   # Extract the first word of "$ac_prog", so it can be a program name with args.
4262 set dummy $ac_prog; ac_word=$2
4263 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4264 $as_echo_n "checking for $ac_word... " >&6; }
4265 if ${ac_cv_path_CUT+:} false; then :
4266   $as_echo_n "(cached) " >&6
4267 else
4268   case $CUT in
4269   [\\/]* | ?:[\\/]*)
4270   ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
4271   ;;
4272   *)
4273   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4274 for as_dir in $PATH
4275 do
4276   IFS=$as_save_IFS
4277   test -z "$as_dir" && as_dir=.
4278     for ac_exec_ext in '' $ac_executable_extensions; do
4279   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4280     ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
4281     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4282     break 2
4283   fi
4284 done
4285   done
4286 IFS=$as_save_IFS
4287 
4288   ;;
4289 esac
4290 fi
4291 CUT=$ac_cv_path_CUT
4292 if test -n "$CUT"; then
4293   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
4294 $as_echo "$CUT" >&6; }
4295 else
4296   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4297 $as_echo "no" >&6; }
4298 fi
4299 
4300 
4301   test -n "$CUT" && break
4302 done
4303 
4304 
4305     if test "x$CUT" = x; then
4306         if test "xcut" = x; then
4307           PROG_NAME=cut
4308         else
4309           PROG_NAME=cut
4310         fi
4311         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4312 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4313         as_fn_error $? "Cannot continue" "$LINENO" 5
4314     fi
4315 
4316 
4317 
4318     for ac_prog in date
4319 do
4320   # Extract the first word of "$ac_prog", so it can be a program name with args.
4321 set dummy $ac_prog; ac_word=$2
4322 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4323 $as_echo_n "checking for $ac_word... " >&6; }
4324 if ${ac_cv_path_DATE+:} false; then :
4325   $as_echo_n "(cached) " >&6
4326 else
4327   case $DATE in
4328   [\\/]* | ?:[\\/]*)
4329   ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
4330   ;;
4331   *)
4332   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4333 for as_dir in $PATH
4334 do
4335   IFS=$as_save_IFS
4336   test -z "$as_dir" && as_dir=.
4337     for ac_exec_ext in '' $ac_executable_extensions; do
4338   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4339     ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
4340     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4341     break 2
4342   fi
4343 done
4344   done
4345 IFS=$as_save_IFS
4346 
4347   ;;
4348 esac
4349 fi
4350 DATE=$ac_cv_path_DATE
4351 if test -n "$DATE"; then
4352   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
4353 $as_echo "$DATE" >&6; }
4354 else
4355   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4356 $as_echo "no" >&6; }
4357 fi
4358 
4359 
4360   test -n "$DATE" && break
4361 done
4362 
4363 
4364     if test "x$DATE" = x; then
4365         if test "xdate" = x; then
4366           PROG_NAME=date
4367         else
4368           PROG_NAME=date
4369         fi
4370         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4371 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4372         as_fn_error $? "Cannot continue" "$LINENO" 5
4373     fi
4374 
4375 
4376 
4377     for ac_prog in gdiff diff
4378 do
4379   # Extract the first word of "$ac_prog", so it can be a program name with args.
4380 set dummy $ac_prog; ac_word=$2
4381 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4382 $as_echo_n "checking for $ac_word... " >&6; }
4383 if ${ac_cv_path_DIFF+:} false; then :
4384   $as_echo_n "(cached) " >&6
4385 else
4386   case $DIFF in
4387   [\\/]* | ?:[\\/]*)
4388   ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
4389   ;;
4390   *)
4391   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4392 for as_dir in $PATH
4393 do
4394   IFS=$as_save_IFS
4395   test -z "$as_dir" && as_dir=.
4396     for ac_exec_ext in '' $ac_executable_extensions; do
4397   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4398     ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
4399     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4400     break 2
4401   fi
4402 done
4403   done
4404 IFS=$as_save_IFS
4405 
4406   ;;
4407 esac
4408 fi
4409 DIFF=$ac_cv_path_DIFF
4410 if test -n "$DIFF"; then
4411   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
4412 $as_echo "$DIFF" >&6; }
4413 else
4414   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4415 $as_echo "no" >&6; }
4416 fi
4417 
4418 
4419   test -n "$DIFF" && break
4420 done
4421 
4422 
4423     if test "x$DIFF" = x; then
4424         if test "xgdiff diff" = x; then
4425           PROG_NAME=diff
4426         else
4427           PROG_NAME=gdiff diff
4428         fi
4429         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4430 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4431         as_fn_error $? "Cannot continue" "$LINENO" 5
4432     fi
4433 
4434 
4435 
4436     for ac_prog in dirname
4437 do
4438   # Extract the first word of "$ac_prog", so it can be a program name with args.
4439 set dummy $ac_prog; ac_word=$2
4440 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4441 $as_echo_n "checking for $ac_word... " >&6; }
4442 if ${ac_cv_path_DIRNAME+:} false; then :
4443   $as_echo_n "(cached) " >&6
4444 else
4445   case $DIRNAME in
4446   [\\/]* | ?:[\\/]*)
4447   ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
4448   ;;
4449   *)
4450   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4451 for as_dir in $PATH
4452 do
4453   IFS=$as_save_IFS
4454   test -z "$as_dir" && as_dir=.
4455     for ac_exec_ext in '' $ac_executable_extensions; do
4456   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4457     ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
4458     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4459     break 2
4460   fi
4461 done
4462   done
4463 IFS=$as_save_IFS
4464 
4465   ;;
4466 esac
4467 fi
4468 DIRNAME=$ac_cv_path_DIRNAME
4469 if test -n "$DIRNAME"; then
4470   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
4471 $as_echo "$DIRNAME" >&6; }
4472 else
4473   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4474 $as_echo "no" >&6; }
4475 fi
4476 
4477 
4478   test -n "$DIRNAME" && break
4479 done
4480 
4481 
4482     if test "x$DIRNAME" = x; then
4483         if test "xdirname" = x; then
4484           PROG_NAME=dirname
4485         else
4486           PROG_NAME=dirname
4487         fi
4488         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4489 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4490         as_fn_error $? "Cannot continue" "$LINENO" 5
4491     fi
4492 
4493 
4494 
4495     for ac_prog in echo
4496 do
4497   # Extract the first word of "$ac_prog", so it can be a program name with args.
4498 set dummy $ac_prog; ac_word=$2
4499 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4500 $as_echo_n "checking for $ac_word... " >&6; }
4501 if ${ac_cv_path_ECHO+:} false; then :
4502   $as_echo_n "(cached) " >&6
4503 else
4504   case $ECHO in
4505   [\\/]* | ?:[\\/]*)
4506   ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
4507   ;;
4508   *)
4509   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4510 for as_dir in $PATH
4511 do
4512   IFS=$as_save_IFS
4513   test -z "$as_dir" && as_dir=.
4514     for ac_exec_ext in '' $ac_executable_extensions; do
4515   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4516     ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
4517     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4518     break 2
4519   fi
4520 done
4521   done
4522 IFS=$as_save_IFS
4523 
4524   ;;
4525 esac
4526 fi
4527 ECHO=$ac_cv_path_ECHO
4528 if test -n "$ECHO"; then
4529   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
4530 $as_echo "$ECHO" >&6; }
4531 else
4532   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4533 $as_echo "no" >&6; }
4534 fi
4535 
4536 
4537   test -n "$ECHO" && break
4538 done
4539 
4540 
4541     if test "x$ECHO" = x; then
4542         if test "xecho" = x; then
4543           PROG_NAME=echo
4544         else
4545           PROG_NAME=echo
4546         fi
4547         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4548 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4549         as_fn_error $? "Cannot continue" "$LINENO" 5
4550     fi
4551 
4552 
4553 
4554     for ac_prog in expr
4555 do
4556   # Extract the first word of "$ac_prog", so it can be a program name with args.
4557 set dummy $ac_prog; ac_word=$2
4558 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4559 $as_echo_n "checking for $ac_word... " >&6; }
4560 if ${ac_cv_path_EXPR+:} false; then :
4561   $as_echo_n "(cached) " >&6
4562 else
4563   case $EXPR in
4564   [\\/]* | ?:[\\/]*)
4565   ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
4566   ;;
4567   *)
4568   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4569 for as_dir in $PATH
4570 do
4571   IFS=$as_save_IFS
4572   test -z "$as_dir" && as_dir=.
4573     for ac_exec_ext in '' $ac_executable_extensions; do
4574   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4575     ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
4576     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4577     break 2
4578   fi
4579 done
4580   done
4581 IFS=$as_save_IFS
4582 
4583   ;;
4584 esac
4585 fi
4586 EXPR=$ac_cv_path_EXPR
4587 if test -n "$EXPR"; then
4588   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
4589 $as_echo "$EXPR" >&6; }
4590 else
4591   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4592 $as_echo "no" >&6; }
4593 fi
4594 
4595 
4596   test -n "$EXPR" && break
4597 done
4598 
4599 
4600     if test "x$EXPR" = x; then
4601         if test "xexpr" = x; then
4602           PROG_NAME=expr
4603         else
4604           PROG_NAME=expr
4605         fi
4606         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4607 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4608         as_fn_error $? "Cannot continue" "$LINENO" 5
4609     fi
4610 
4611 
4612 
4613     for ac_prog in file
4614 do
4615   # Extract the first word of "$ac_prog", so it can be a program name with args.
4616 set dummy $ac_prog; ac_word=$2
4617 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4618 $as_echo_n "checking for $ac_word... " >&6; }
4619 if ${ac_cv_path_FILE+:} false; then :
4620   $as_echo_n "(cached) " >&6
4621 else
4622   case $FILE in
4623   [\\/]* | ?:[\\/]*)
4624   ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
4625   ;;
4626   *)
4627   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4628 for as_dir in $PATH
4629 do
4630   IFS=$as_save_IFS
4631   test -z "$as_dir" && as_dir=.
4632     for ac_exec_ext in '' $ac_executable_extensions; do
4633   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4634     ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
4635     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4636     break 2
4637   fi
4638 done
4639   done
4640 IFS=$as_save_IFS
4641 
4642   ;;
4643 esac
4644 fi
4645 FILE=$ac_cv_path_FILE
4646 if test -n "$FILE"; then
4647   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
4648 $as_echo "$FILE" >&6; }
4649 else
4650   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4651 $as_echo "no" >&6; }
4652 fi
4653 
4654 
4655   test -n "$FILE" && break
4656 done
4657 
4658 
4659     if test "x$FILE" = x; then
4660         if test "xfile" = x; then
4661           PROG_NAME=file
4662         else
4663           PROG_NAME=file
4664         fi
4665         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4666 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4667         as_fn_error $? "Cannot continue" "$LINENO" 5
4668     fi
4669 
4670 
4671 
4672     for ac_prog in find
4673 do
4674   # Extract the first word of "$ac_prog", so it can be a program name with args.
4675 set dummy $ac_prog; ac_word=$2
4676 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4677 $as_echo_n "checking for $ac_word... " >&6; }
4678 if ${ac_cv_path_FIND+:} false; then :
4679   $as_echo_n "(cached) " >&6
4680 else
4681   case $FIND in
4682   [\\/]* | ?:[\\/]*)
4683   ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
4684   ;;
4685   *)
4686   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4687 for as_dir in $PATH
4688 do
4689   IFS=$as_save_IFS
4690   test -z "$as_dir" && as_dir=.
4691     for ac_exec_ext in '' $ac_executable_extensions; do
4692   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4693     ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
4694     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4695     break 2
4696   fi
4697 done
4698   done
4699 IFS=$as_save_IFS
4700 
4701   ;;
4702 esac
4703 fi
4704 FIND=$ac_cv_path_FIND
4705 if test -n "$FIND"; then
4706   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
4707 $as_echo "$FIND" >&6; }
4708 else
4709   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4710 $as_echo "no" >&6; }
4711 fi
4712 
4713 
4714   test -n "$FIND" && break
4715 done
4716 
4717 
4718     if test "x$FIND" = x; then
4719         if test "xfind" = x; then
4720           PROG_NAME=find
4721         else
4722           PROG_NAME=find
4723         fi
4724         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4725 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4726         as_fn_error $? "Cannot continue" "$LINENO" 5
4727     fi
4728 
4729 
4730 
4731     for ac_prog in head
4732 do
4733   # Extract the first word of "$ac_prog", so it can be a program name with args.
4734 set dummy $ac_prog; ac_word=$2
4735 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4736 $as_echo_n "checking for $ac_word... " >&6; }
4737 if ${ac_cv_path_HEAD+:} false; then :
4738   $as_echo_n "(cached) " >&6
4739 else
4740   case $HEAD in
4741   [\\/]* | ?:[\\/]*)
4742   ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
4743   ;;
4744   *)
4745   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4746 for as_dir in $PATH
4747 do
4748   IFS=$as_save_IFS
4749   test -z "$as_dir" && as_dir=.
4750     for ac_exec_ext in '' $ac_executable_extensions; do
4751   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4752     ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
4753     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4754     break 2
4755   fi
4756 done
4757   done
4758 IFS=$as_save_IFS
4759 
4760   ;;
4761 esac
4762 fi
4763 HEAD=$ac_cv_path_HEAD
4764 if test -n "$HEAD"; then
4765   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
4766 $as_echo "$HEAD" >&6; }
4767 else
4768   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4769 $as_echo "no" >&6; }
4770 fi
4771 
4772 
4773   test -n "$HEAD" && break
4774 done
4775 
4776 
4777     if test "x$HEAD" = x; then
4778         if test "xhead" = x; then
4779           PROG_NAME=head
4780         else
4781           PROG_NAME=head
4782         fi
4783         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4784 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4785         as_fn_error $? "Cannot continue" "$LINENO" 5
4786     fi
4787 
4788 
4789 
4790     for ac_prog in ln
4791 do
4792   # Extract the first word of "$ac_prog", so it can be a program name with args.
4793 set dummy $ac_prog; ac_word=$2
4794 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4795 $as_echo_n "checking for $ac_word... " >&6; }
4796 if ${ac_cv_path_LN+:} false; then :
4797   $as_echo_n "(cached) " >&6
4798 else
4799   case $LN in
4800   [\\/]* | ?:[\\/]*)
4801   ac_cv_path_LN="$LN" # Let the user override the test with a path.
4802   ;;
4803   *)
4804   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4805 for as_dir in $PATH
4806 do
4807   IFS=$as_save_IFS
4808   test -z "$as_dir" && as_dir=.
4809     for ac_exec_ext in '' $ac_executable_extensions; do
4810   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4811     ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
4812     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4813     break 2
4814   fi
4815 done
4816   done
4817 IFS=$as_save_IFS
4818 
4819   ;;
4820 esac
4821 fi
4822 LN=$ac_cv_path_LN
4823 if test -n "$LN"; then
4824   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
4825 $as_echo "$LN" >&6; }
4826 else
4827   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4828 $as_echo "no" >&6; }
4829 fi
4830 
4831 
4832   test -n "$LN" && break
4833 done
4834 
4835 
4836     if test "x$LN" = x; then
4837         if test "xln" = x; then
4838           PROG_NAME=ln
4839         else
4840           PROG_NAME=ln
4841         fi
4842         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4843 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4844         as_fn_error $? "Cannot continue" "$LINENO" 5
4845     fi
4846 
4847 
4848 
4849     for ac_prog in ls
4850 do
4851   # Extract the first word of "$ac_prog", so it can be a program name with args.
4852 set dummy $ac_prog; ac_word=$2
4853 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4854 $as_echo_n "checking for $ac_word... " >&6; }
4855 if ${ac_cv_path_LS+:} false; then :
4856   $as_echo_n "(cached) " >&6
4857 else
4858   case $LS in
4859   [\\/]* | ?:[\\/]*)
4860   ac_cv_path_LS="$LS" # Let the user override the test with a path.
4861   ;;
4862   *)
4863   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4864 for as_dir in $PATH
4865 do
4866   IFS=$as_save_IFS
4867   test -z "$as_dir" && as_dir=.
4868     for ac_exec_ext in '' $ac_executable_extensions; do
4869   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4870     ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
4871     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4872     break 2
4873   fi
4874 done
4875   done
4876 IFS=$as_save_IFS
4877 
4878   ;;
4879 esac
4880 fi
4881 LS=$ac_cv_path_LS
4882 if test -n "$LS"; then
4883   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
4884 $as_echo "$LS" >&6; }
4885 else
4886   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4887 $as_echo "no" >&6; }
4888 fi
4889 
4890 
4891   test -n "$LS" && break
4892 done
4893 
4894 
4895     if test "x$LS" = x; then
4896         if test "xls" = x; then
4897           PROG_NAME=ls
4898         else
4899           PROG_NAME=ls
4900         fi
4901         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4902 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4903         as_fn_error $? "Cannot continue" "$LINENO" 5
4904     fi
4905 
4906 
4907 
4908     for ac_prog in mkdir
4909 do
4910   # Extract the first word of "$ac_prog", so it can be a program name with args.
4911 set dummy $ac_prog; ac_word=$2
4912 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4913 $as_echo_n "checking for $ac_word... " >&6; }
4914 if ${ac_cv_path_MKDIR+:} false; then :
4915   $as_echo_n "(cached) " >&6
4916 else
4917   case $MKDIR in
4918   [\\/]* | ?:[\\/]*)
4919   ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
4920   ;;
4921   *)
4922   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4923 for as_dir in $PATH
4924 do
4925   IFS=$as_save_IFS
4926   test -z "$as_dir" && as_dir=.
4927     for ac_exec_ext in '' $ac_executable_extensions; do
4928   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4929     ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
4930     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4931     break 2
4932   fi
4933 done
4934   done
4935 IFS=$as_save_IFS
4936 
4937   ;;
4938 esac
4939 fi
4940 MKDIR=$ac_cv_path_MKDIR
4941 if test -n "$MKDIR"; then
4942   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
4943 $as_echo "$MKDIR" >&6; }
4944 else
4945   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4946 $as_echo "no" >&6; }
4947 fi
4948 
4949 
4950   test -n "$MKDIR" && break
4951 done
4952 
4953 
4954     if test "x$MKDIR" = x; then
4955         if test "xmkdir" = x; then
4956           PROG_NAME=mkdir
4957         else
4958           PROG_NAME=mkdir
4959         fi
4960         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4961 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4962         as_fn_error $? "Cannot continue" "$LINENO" 5
4963     fi
4964 
4965 
4966 
4967     for ac_prog in mktemp
4968 do
4969   # Extract the first word of "$ac_prog", so it can be a program name with args.
4970 set dummy $ac_prog; ac_word=$2
4971 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4972 $as_echo_n "checking for $ac_word... " >&6; }
4973 if ${ac_cv_path_MKTEMP+:} false; then :
4974   $as_echo_n "(cached) " >&6
4975 else
4976   case $MKTEMP in
4977   [\\/]* | ?:[\\/]*)
4978   ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
4979   ;;
4980   *)
4981   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4982 for as_dir in $PATH
4983 do
4984   IFS=$as_save_IFS
4985   test -z "$as_dir" && as_dir=.
4986     for ac_exec_ext in '' $ac_executable_extensions; do
4987   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4988     ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
4989     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4990     break 2
4991   fi
4992 done
4993   done
4994 IFS=$as_save_IFS
4995 
4996   ;;
4997 esac
4998 fi
4999 MKTEMP=$ac_cv_path_MKTEMP
5000 if test -n "$MKTEMP"; then
5001   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
5002 $as_echo "$MKTEMP" >&6; }
5003 else
5004   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5005 $as_echo "no" >&6; }
5006 fi
5007 
5008 
5009   test -n "$MKTEMP" && break
5010 done
5011 
5012 
5013     if test "x$MKTEMP" = x; then
5014         if test "xmktemp" = x; then
5015           PROG_NAME=mktemp
5016         else
5017           PROG_NAME=mktemp
5018         fi
5019         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5020 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5021         as_fn_error $? "Cannot continue" "$LINENO" 5
5022     fi
5023 
5024 
5025 
5026     for ac_prog in mv
5027 do
5028   # Extract the first word of "$ac_prog", so it can be a program name with args.
5029 set dummy $ac_prog; ac_word=$2
5030 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5031 $as_echo_n "checking for $ac_word... " >&6; }
5032 if ${ac_cv_path_MV+:} false; then :
5033   $as_echo_n "(cached) " >&6
5034 else
5035   case $MV in
5036   [\\/]* | ?:[\\/]*)
5037   ac_cv_path_MV="$MV" # Let the user override the test with a path.
5038   ;;
5039   *)
5040   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5041 for as_dir in $PATH
5042 do
5043   IFS=$as_save_IFS
5044   test -z "$as_dir" && as_dir=.
5045     for ac_exec_ext in '' $ac_executable_extensions; do
5046   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5047     ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
5048     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5049     break 2
5050   fi
5051 done
5052   done
5053 IFS=$as_save_IFS
5054 
5055   ;;
5056 esac
5057 fi
5058 MV=$ac_cv_path_MV
5059 if test -n "$MV"; then
5060   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
5061 $as_echo "$MV" >&6; }
5062 else
5063   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5064 $as_echo "no" >&6; }
5065 fi
5066 
5067 
5068   test -n "$MV" && break
5069 done
5070 
5071 
5072     if test "x$MV" = x; then
5073         if test "xmv" = x; then
5074           PROG_NAME=mv
5075         else
5076           PROG_NAME=mv
5077         fi
5078         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5079 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5080         as_fn_error $? "Cannot continue" "$LINENO" 5
5081     fi
5082 
5083 
5084 
5085     for ac_prog in printf
5086 do
5087   # Extract the first word of "$ac_prog", so it can be a program name with args.
5088 set dummy $ac_prog; ac_word=$2
5089 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5090 $as_echo_n "checking for $ac_word... " >&6; }
5091 if ${ac_cv_path_PRINTF+:} false; then :
5092   $as_echo_n "(cached) " >&6
5093 else
5094   case $PRINTF in
5095   [\\/]* | ?:[\\/]*)
5096   ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
5097   ;;
5098   *)
5099   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5100 for as_dir in $PATH
5101 do
5102   IFS=$as_save_IFS
5103   test -z "$as_dir" && as_dir=.
5104     for ac_exec_ext in '' $ac_executable_extensions; do
5105   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5106     ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
5107     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5108     break 2
5109   fi
5110 done
5111   done
5112 IFS=$as_save_IFS
5113 
5114   ;;
5115 esac
5116 fi
5117 PRINTF=$ac_cv_path_PRINTF
5118 if test -n "$PRINTF"; then
5119   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
5120 $as_echo "$PRINTF" >&6; }
5121 else
5122   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5123 $as_echo "no" >&6; }
5124 fi
5125 
5126 
5127   test -n "$PRINTF" && break
5128 done
5129 
5130 
5131     if test "x$PRINTF" = x; then
5132         if test "xprintf" = x; then
5133           PROG_NAME=printf
5134         else
5135           PROG_NAME=printf
5136         fi
5137         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5138 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5139         as_fn_error $? "Cannot continue" "$LINENO" 5
5140     fi
5141 
5142 
5143 
5144     for ac_prog in pwd
5145 do
5146   # Extract the first word of "$ac_prog", so it can be a program name with args.
5147 set dummy $ac_prog; ac_word=$2
5148 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5149 $as_echo_n "checking for $ac_word... " >&6; }
5150 if ${ac_cv_path_THEPWDCMD+:} false; then :
5151   $as_echo_n "(cached) " >&6
5152 else
5153   case $THEPWDCMD in
5154   [\\/]* | ?:[\\/]*)
5155   ac_cv_path_THEPWDCMD="$THEPWDCMD" # Let the user override the test with a path.
5156   ;;
5157   *)
5158   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5159 for as_dir in $PATH
5160 do
5161   IFS=$as_save_IFS
5162   test -z "$as_dir" && as_dir=.
5163     for ac_exec_ext in '' $ac_executable_extensions; do
5164   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5165     ac_cv_path_THEPWDCMD="$as_dir/$ac_word$ac_exec_ext"
5166     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5167     break 2
5168   fi
5169 done
5170   done
5171 IFS=$as_save_IFS
5172 
5173   ;;
5174 esac
5175 fi
5176 THEPWDCMD=$ac_cv_path_THEPWDCMD
5177 if test -n "$THEPWDCMD"; then
5178   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $THEPWDCMD" >&5
5179 $as_echo "$THEPWDCMD" >&6; }
5180 else
5181   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5182 $as_echo "no" >&6; }
5183 fi
5184 
5185 
5186   test -n "$THEPWDCMD" && break
5187 done
5188 
5189 
5190     if test "x$THEPWDCMD" = x; then
5191         if test "xpwd" = x; then
5192           PROG_NAME=thepwdcmd
5193         else
5194           PROG_NAME=pwd
5195         fi
5196         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5197 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5198         as_fn_error $? "Cannot continue" "$LINENO" 5
5199     fi
5200 
5201 
5202 
5203     for ac_prog in rm
5204 do
5205   # Extract the first word of "$ac_prog", so it can be a program name with args.
5206 set dummy $ac_prog; ac_word=$2
5207 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5208 $as_echo_n "checking for $ac_word... " >&6; }
5209 if ${ac_cv_path_RM+:} false; then :
5210   $as_echo_n "(cached) " >&6
5211 else
5212   case $RM in
5213   [\\/]* | ?:[\\/]*)
5214   ac_cv_path_RM="$RM" # Let the user override the test with a path.
5215   ;;
5216   *)
5217   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5218 for as_dir in $PATH
5219 do
5220   IFS=$as_save_IFS
5221   test -z "$as_dir" && as_dir=.
5222     for ac_exec_ext in '' $ac_executable_extensions; do
5223   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5224     ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
5225     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5226     break 2
5227   fi
5228 done
5229   done
5230 IFS=$as_save_IFS
5231 
5232   ;;
5233 esac
5234 fi
5235 RM=$ac_cv_path_RM
5236 if test -n "$RM"; then
5237   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
5238 $as_echo "$RM" >&6; }
5239 else
5240   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5241 $as_echo "no" >&6; }
5242 fi
5243 
5244 
5245   test -n "$RM" && break
5246 done
5247 
5248 
5249     if test "x$RM" = x; then
5250         if test "xrm" = x; then
5251           PROG_NAME=rm
5252         else
5253           PROG_NAME=rm
5254         fi
5255         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5256 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5257         as_fn_error $? "Cannot continue" "$LINENO" 5
5258     fi
5259 
5260 
5261 
5262     for ac_prog in sh
5263 do
5264   # Extract the first word of "$ac_prog", so it can be a program name with args.
5265 set dummy $ac_prog; ac_word=$2
5266 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5267 $as_echo_n "checking for $ac_word... " >&6; }
5268 if ${ac_cv_path_SH+:} false; then :
5269   $as_echo_n "(cached) " >&6
5270 else
5271   case $SH in
5272   [\\/]* | ?:[\\/]*)
5273   ac_cv_path_SH="$SH" # Let the user override the test with a path.
5274   ;;
5275   *)
5276   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5277 for as_dir in $PATH
5278 do
5279   IFS=$as_save_IFS
5280   test -z "$as_dir" && as_dir=.
5281     for ac_exec_ext in '' $ac_executable_extensions; do
5282   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5283     ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
5284     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5285     break 2
5286   fi
5287 done
5288   done
5289 IFS=$as_save_IFS
5290 
5291   ;;
5292 esac
5293 fi
5294 SH=$ac_cv_path_SH
5295 if test -n "$SH"; then
5296   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
5297 $as_echo "$SH" >&6; }
5298 else
5299   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5300 $as_echo "no" >&6; }
5301 fi
5302 
5303 
5304   test -n "$SH" && break
5305 done
5306 
5307 
5308     if test "x$SH" = x; then
5309         if test "xsh" = x; then
5310           PROG_NAME=sh
5311         else
5312           PROG_NAME=sh
5313         fi
5314         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5315 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5316         as_fn_error $? "Cannot continue" "$LINENO" 5
5317     fi
5318 
5319 
5320 
5321     for ac_prog in sort
5322 do
5323   # Extract the first word of "$ac_prog", so it can be a program name with args.
5324 set dummy $ac_prog; ac_word=$2
5325 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5326 $as_echo_n "checking for $ac_word... " >&6; }
5327 if ${ac_cv_path_SORT+:} false; then :
5328   $as_echo_n "(cached) " >&6
5329 else
5330   case $SORT in
5331   [\\/]* | ?:[\\/]*)
5332   ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
5333   ;;
5334   *)
5335   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5336 for as_dir in $PATH
5337 do
5338   IFS=$as_save_IFS
5339   test -z "$as_dir" && as_dir=.
5340     for ac_exec_ext in '' $ac_executable_extensions; do
5341   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5342     ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
5343     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5344     break 2
5345   fi
5346 done
5347   done
5348 IFS=$as_save_IFS
5349 
5350   ;;
5351 esac
5352 fi
5353 SORT=$ac_cv_path_SORT
5354 if test -n "$SORT"; then
5355   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
5356 $as_echo "$SORT" >&6; }
5357 else
5358   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5359 $as_echo "no" >&6; }
5360 fi
5361 
5362 
5363   test -n "$SORT" && break
5364 done
5365 
5366 
5367     if test "x$SORT" = x; then
5368         if test "xsort" = x; then
5369           PROG_NAME=sort
5370         else
5371           PROG_NAME=sort
5372         fi
5373         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5374 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5375         as_fn_error $? "Cannot continue" "$LINENO" 5
5376     fi
5377 
5378 
5379 
5380     for ac_prog in tail
5381 do
5382   # Extract the first word of "$ac_prog", so it can be a program name with args.
5383 set dummy $ac_prog; ac_word=$2
5384 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5385 $as_echo_n "checking for $ac_word... " >&6; }
5386 if ${ac_cv_path_TAIL+:} false; then :
5387   $as_echo_n "(cached) " >&6
5388 else
5389   case $TAIL in
5390   [\\/]* | ?:[\\/]*)
5391   ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
5392   ;;
5393   *)
5394   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5395 for as_dir in $PATH
5396 do
5397   IFS=$as_save_IFS
5398   test -z "$as_dir" && as_dir=.
5399     for ac_exec_ext in '' $ac_executable_extensions; do
5400   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5401     ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
5402     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5403     break 2
5404   fi
5405 done
5406   done
5407 IFS=$as_save_IFS
5408 
5409   ;;
5410 esac
5411 fi
5412 TAIL=$ac_cv_path_TAIL
5413 if test -n "$TAIL"; then
5414   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
5415 $as_echo "$TAIL" >&6; }
5416 else
5417   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5418 $as_echo "no" >&6; }
5419 fi
5420 
5421 
5422   test -n "$TAIL" && break
5423 done
5424 
5425 
5426     if test "x$TAIL" = x; then
5427         if test "xtail" = x; then
5428           PROG_NAME=tail
5429         else
5430           PROG_NAME=tail
5431         fi
5432         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5433 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5434         as_fn_error $? "Cannot continue" "$LINENO" 5
5435     fi
5436 
5437 
5438 
5439     for ac_prog in tar
5440 do
5441   # Extract the first word of "$ac_prog", so it can be a program name with args.
5442 set dummy $ac_prog; ac_word=$2
5443 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5444 $as_echo_n "checking for $ac_word... " >&6; }
5445 if ${ac_cv_path_TAR+:} false; then :
5446   $as_echo_n "(cached) " >&6
5447 else
5448   case $TAR in
5449   [\\/]* | ?:[\\/]*)
5450   ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
5451   ;;
5452   *)
5453   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5454 for as_dir in $PATH
5455 do
5456   IFS=$as_save_IFS
5457   test -z "$as_dir" && as_dir=.
5458     for ac_exec_ext in '' $ac_executable_extensions; do
5459   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5460     ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
5461     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5462     break 2
5463   fi
5464 done
5465   done
5466 IFS=$as_save_IFS
5467 
5468   ;;
5469 esac
5470 fi
5471 TAR=$ac_cv_path_TAR
5472 if test -n "$TAR"; then
5473   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
5474 $as_echo "$TAR" >&6; }
5475 else
5476   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5477 $as_echo "no" >&6; }
5478 fi
5479 
5480 
5481   test -n "$TAR" && break
5482 done
5483 
5484 
5485     if test "x$TAR" = x; then
5486         if test "xtar" = x; then
5487           PROG_NAME=tar
5488         else
5489           PROG_NAME=tar
5490         fi
5491         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5492 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5493         as_fn_error $? "Cannot continue" "$LINENO" 5
5494     fi
5495 
5496 
5497 
5498     for ac_prog in tee
5499 do
5500   # Extract the first word of "$ac_prog", so it can be a program name with args.
5501 set dummy $ac_prog; ac_word=$2
5502 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5503 $as_echo_n "checking for $ac_word... " >&6; }
5504 if ${ac_cv_path_TEE+:} false; then :
5505   $as_echo_n "(cached) " >&6
5506 else
5507   case $TEE in
5508   [\\/]* | ?:[\\/]*)
5509   ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
5510   ;;
5511   *)
5512   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5513 for as_dir in $PATH
5514 do
5515   IFS=$as_save_IFS
5516   test -z "$as_dir" && as_dir=.
5517     for ac_exec_ext in '' $ac_executable_extensions; do
5518   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5519     ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
5520     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5521     break 2
5522   fi
5523 done
5524   done
5525 IFS=$as_save_IFS
5526 
5527   ;;
5528 esac
5529 fi
5530 TEE=$ac_cv_path_TEE
5531 if test -n "$TEE"; then
5532   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
5533 $as_echo "$TEE" >&6; }
5534 else
5535   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5536 $as_echo "no" >&6; }
5537 fi
5538 
5539 
5540   test -n "$TEE" && break
5541 done
5542 
5543 
5544     if test "x$TEE" = x; then
5545         if test "xtee" = x; then
5546           PROG_NAME=tee
5547         else
5548           PROG_NAME=tee
5549         fi
5550         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5551 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5552         as_fn_error $? "Cannot continue" "$LINENO" 5
5553     fi
5554 
5555 
5556 
5557     for ac_prog in touch
5558 do
5559   # Extract the first word of "$ac_prog", so it can be a program name with args.
5560 set dummy $ac_prog; ac_word=$2
5561 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5562 $as_echo_n "checking for $ac_word... " >&6; }
5563 if ${ac_cv_path_TOUCH+:} false; then :
5564   $as_echo_n "(cached) " >&6
5565 else
5566   case $TOUCH in
5567   [\\/]* | ?:[\\/]*)
5568   ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
5569   ;;
5570   *)
5571   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5572 for as_dir in $PATH
5573 do
5574   IFS=$as_save_IFS
5575   test -z "$as_dir" && as_dir=.
5576     for ac_exec_ext in '' $ac_executable_extensions; do
5577   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5578     ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
5579     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5580     break 2
5581   fi
5582 done
5583   done
5584 IFS=$as_save_IFS
5585 
5586   ;;
5587 esac
5588 fi
5589 TOUCH=$ac_cv_path_TOUCH
5590 if test -n "$TOUCH"; then
5591   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
5592 $as_echo "$TOUCH" >&6; }
5593 else
5594   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5595 $as_echo "no" >&6; }
5596 fi
5597 
5598 
5599   test -n "$TOUCH" && break
5600 done
5601 
5602 
5603     if test "x$TOUCH" = x; then
5604         if test "xtouch" = x; then
5605           PROG_NAME=touch
5606         else
5607           PROG_NAME=touch
5608         fi
5609         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5610 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5611         as_fn_error $? "Cannot continue" "$LINENO" 5
5612     fi
5613 
5614 
5615 
5616     for ac_prog in tr
5617 do
5618   # Extract the first word of "$ac_prog", so it can be a program name with args.
5619 set dummy $ac_prog; ac_word=$2
5620 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5621 $as_echo_n "checking for $ac_word... " >&6; }
5622 if ${ac_cv_path_TR+:} false; then :
5623   $as_echo_n "(cached) " >&6
5624 else
5625   case $TR in
5626   [\\/]* | ?:[\\/]*)
5627   ac_cv_path_TR="$TR" # Let the user override the test with a path.
5628   ;;
5629   *)
5630   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5631 for as_dir in $PATH
5632 do
5633   IFS=$as_save_IFS
5634   test -z "$as_dir" && as_dir=.
5635     for ac_exec_ext in '' $ac_executable_extensions; do
5636   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5637     ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
5638     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5639     break 2
5640   fi
5641 done
5642   done
5643 IFS=$as_save_IFS
5644 
5645   ;;
5646 esac
5647 fi
5648 TR=$ac_cv_path_TR
5649 if test -n "$TR"; then
5650   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
5651 $as_echo "$TR" >&6; }
5652 else
5653   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5654 $as_echo "no" >&6; }
5655 fi
5656 
5657 
5658   test -n "$TR" && break
5659 done
5660 
5661 
5662     if test "x$TR" = x; then
5663         if test "xtr" = x; then
5664           PROG_NAME=tr
5665         else
5666           PROG_NAME=tr
5667         fi
5668         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5669 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5670         as_fn_error $? "Cannot continue" "$LINENO" 5
5671     fi
5672 
5673 
5674 
5675     for ac_prog in uname
5676 do
5677   # Extract the first word of "$ac_prog", so it can be a program name with args.
5678 set dummy $ac_prog; ac_word=$2
5679 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5680 $as_echo_n "checking for $ac_word... " >&6; }
5681 if ${ac_cv_path_UNAME+:} false; then :
5682   $as_echo_n "(cached) " >&6
5683 else
5684   case $UNAME in
5685   [\\/]* | ?:[\\/]*)
5686   ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
5687   ;;
5688   *)
5689   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5690 for as_dir in $PATH
5691 do
5692   IFS=$as_save_IFS
5693   test -z "$as_dir" && as_dir=.
5694     for ac_exec_ext in '' $ac_executable_extensions; do
5695   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5696     ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
5697     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5698     break 2
5699   fi
5700 done
5701   done
5702 IFS=$as_save_IFS
5703 
5704   ;;
5705 esac
5706 fi
5707 UNAME=$ac_cv_path_UNAME
5708 if test -n "$UNAME"; then
5709   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
5710 $as_echo "$UNAME" >&6; }
5711 else
5712   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5713 $as_echo "no" >&6; }
5714 fi
5715 
5716 
5717   test -n "$UNAME" && break
5718 done
5719 
5720 
5721     if test "x$UNAME" = x; then
5722         if test "xuname" = x; then
5723           PROG_NAME=uname
5724         else
5725           PROG_NAME=uname
5726         fi
5727         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5728 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5729         as_fn_error $? "Cannot continue" "$LINENO" 5
5730     fi
5731 
5732 
5733 
5734     for ac_prog in uniq
5735 do
5736   # Extract the first word of "$ac_prog", so it can be a program name with args.
5737 set dummy $ac_prog; ac_word=$2
5738 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5739 $as_echo_n "checking for $ac_word... " >&6; }
5740 if ${ac_cv_path_UNIQ+:} false; then :
5741   $as_echo_n "(cached) " >&6
5742 else
5743   case $UNIQ in
5744   [\\/]* | ?:[\\/]*)
5745   ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
5746   ;;
5747   *)
5748   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5749 for as_dir in $PATH
5750 do
5751   IFS=$as_save_IFS
5752   test -z "$as_dir" && as_dir=.
5753     for ac_exec_ext in '' $ac_executable_extensions; do
5754   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5755     ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
5756     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5757     break 2
5758   fi
5759 done
5760   done
5761 IFS=$as_save_IFS
5762 
5763   ;;
5764 esac
5765 fi
5766 UNIQ=$ac_cv_path_UNIQ
5767 if test -n "$UNIQ"; then
5768   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
5769 $as_echo "$UNIQ" >&6; }
5770 else
5771   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5772 $as_echo "no" >&6; }
5773 fi
5774 
5775 
5776   test -n "$UNIQ" && break
5777 done
5778 
5779 
5780     if test "x$UNIQ" = x; then
5781         if test "xuniq" = x; then
5782           PROG_NAME=uniq
5783         else
5784           PROG_NAME=uniq
5785         fi
5786         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5787 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5788         as_fn_error $? "Cannot continue" "$LINENO" 5
5789     fi
5790 
5791 
5792 
5793     for ac_prog in wc
5794 do
5795   # Extract the first word of "$ac_prog", so it can be a program name with args.
5796 set dummy $ac_prog; ac_word=$2
5797 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5798 $as_echo_n "checking for $ac_word... " >&6; }
5799 if ${ac_cv_path_WC+:} false; then :
5800   $as_echo_n "(cached) " >&6
5801 else
5802   case $WC in
5803   [\\/]* | ?:[\\/]*)
5804   ac_cv_path_WC="$WC" # Let the user override the test with a path.
5805   ;;
5806   *)
5807   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5808 for as_dir in $PATH
5809 do
5810   IFS=$as_save_IFS
5811   test -z "$as_dir" && as_dir=.
5812     for ac_exec_ext in '' $ac_executable_extensions; do
5813   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5814     ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
5815     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5816     break 2
5817   fi
5818 done
5819   done
5820 IFS=$as_save_IFS
5821 
5822   ;;
5823 esac
5824 fi
5825 WC=$ac_cv_path_WC
5826 if test -n "$WC"; then
5827   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
5828 $as_echo "$WC" >&6; }
5829 else
5830   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5831 $as_echo "no" >&6; }
5832 fi
5833 
5834 
5835   test -n "$WC" && break
5836 done
5837 
5838 
5839     if test "x$WC" = x; then
5840         if test "xwc" = x; then
5841           PROG_NAME=wc
5842         else
5843           PROG_NAME=wc
5844         fi
5845         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5846 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5847         as_fn_error $? "Cannot continue" "$LINENO" 5
5848     fi
5849 
5850 
5851 
5852     for ac_prog in which
5853 do
5854   # Extract the first word of "$ac_prog", so it can be a program name with args.
5855 set dummy $ac_prog; ac_word=$2
5856 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5857 $as_echo_n "checking for $ac_word... " >&6; }
5858 if ${ac_cv_path_WHICH+:} false; then :
5859   $as_echo_n "(cached) " >&6
5860 else
5861   case $WHICH in
5862   [\\/]* | ?:[\\/]*)
5863   ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
5864   ;;
5865   *)
5866   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5867 for as_dir in $PATH
5868 do
5869   IFS=$as_save_IFS
5870   test -z "$as_dir" && as_dir=.
5871     for ac_exec_ext in '' $ac_executable_extensions; do
5872   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5873     ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
5874     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5875     break 2
5876   fi
5877 done
5878   done
5879 IFS=$as_save_IFS
5880 
5881   ;;
5882 esac
5883 fi
5884 WHICH=$ac_cv_path_WHICH
5885 if test -n "$WHICH"; then
5886   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
5887 $as_echo "$WHICH" >&6; }
5888 else
5889   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5890 $as_echo "no" >&6; }
5891 fi
5892 
5893 
5894   test -n "$WHICH" && break
5895 done
5896 
5897 
5898     if test "x$WHICH" = x; then
5899         if test "xwhich" = x; then
5900           PROG_NAME=which
5901         else
5902           PROG_NAME=which
5903         fi
5904         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5905 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5906         as_fn_error $? "Cannot continue" "$LINENO" 5
5907     fi
5908 
5909 
5910 
5911     for ac_prog in xargs
5912 do
5913   # Extract the first word of "$ac_prog", so it can be a program name with args.
5914 set dummy $ac_prog; ac_word=$2
5915 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5916 $as_echo_n "checking for $ac_word... " >&6; }
5917 if ${ac_cv_path_XARGS+:} false; then :
5918   $as_echo_n "(cached) " >&6
5919 else
5920   case $XARGS in
5921   [\\/]* | ?:[\\/]*)
5922   ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
5923   ;;
5924   *)
5925   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5926 for as_dir in $PATH
5927 do
5928   IFS=$as_save_IFS
5929   test -z "$as_dir" && as_dir=.
5930     for ac_exec_ext in '' $ac_executable_extensions; do
5931   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5932     ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
5933     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5934     break 2
5935   fi
5936 done
5937   done
5938 IFS=$as_save_IFS
5939 
5940   ;;
5941 esac
5942 fi
5943 XARGS=$ac_cv_path_XARGS
5944 if test -n "$XARGS"; then
5945   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
5946 $as_echo "$XARGS" >&6; }
5947 else
5948   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5949 $as_echo "no" >&6; }
5950 fi
5951 
5952 
5953   test -n "$XARGS" && break
5954 done
5955 
5956 
5957     if test "x$XARGS" = x; then
5958         if test "xxargs" = x; then
5959           PROG_NAME=xargs
5960         else
5961           PROG_NAME=xargs
5962         fi
5963         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5964 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5965         as_fn_error $? "Cannot continue" "$LINENO" 5
5966     fi
5967 
5968 
5969 
5970 # Then required tools that require some special treatment.
5971 for ac_prog in gawk mawk nawk awk
5972 do
5973   # Extract the first word of "$ac_prog", so it can be a program name with args.
5974 set dummy $ac_prog; ac_word=$2
5975 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5976 $as_echo_n "checking for $ac_word... " >&6; }
5977 if ${ac_cv_prog_AWK+:} false; then :
5978   $as_echo_n "(cached) " >&6
5979 else
5980   if test -n "$AWK"; then
5981   ac_cv_prog_AWK="$AWK" # Let the user override the test.
5982 else
5983 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5984 for as_dir in $PATH
5985 do
5986   IFS=$as_save_IFS
5987   test -z "$as_dir" && as_dir=.
5988     for ac_exec_ext in '' $ac_executable_extensions; do
5989   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5990     ac_cv_prog_AWK="$ac_prog"
5991     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5992     break 2
5993   fi
5994 done
5995   done
5996 IFS=$as_save_IFS
5997 
5998 fi
5999 fi
6000 AWK=$ac_cv_prog_AWK
6001 if test -n "$AWK"; then
6002   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
6003 $as_echo "$AWK" >&6; }
6004 else
6005   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6006 $as_echo "no" >&6; }
6007 fi
6008 
6009 
6010   test -n "$AWK" && break
6011 done
6012 
6013 
6014     if test "x$AWK" = x; then
6015         if test "x" = x; then
6016           PROG_NAME=awk
6017         else
6018           PROG_NAME=
6019         fi
6020         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6021 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6022         as_fn_error $? "Cannot continue" "$LINENO" 5
6023     fi
6024 
6025 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
6026 $as_echo_n "checking for grep that handles long lines and -e... " >&6; }
6027 if ${ac_cv_path_GREP+:} false; then :
6028   $as_echo_n "(cached) " >&6
6029 else
6030   if test -z "$GREP"; then
6031   ac_path_GREP_found=false
6032   # Loop through the user's path and test for each of PROGNAME-LIST
6033   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6034 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
6035 do
6036   IFS=$as_save_IFS
6037   test -z "$as_dir" && as_dir=.
6038     for ac_prog in grep ggrep; do
6039     for ac_exec_ext in '' $ac_executable_extensions; do
6040       ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
6041       { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
6042 # Check for GNU ac_path_GREP and select it if it is found.
6043   # Check for GNU $ac_path_GREP
6044 case `"$ac_path_GREP" --version 2>&1` in
6045 *GNU*)
6046   ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
6047 *)
6048   ac_count=0
6049   $as_echo_n 0123456789 >"conftest.in"
6050   while :
6051   do
6052     cat "conftest.in" "conftest.in" >"conftest.tmp"
6053     mv "conftest.tmp" "conftest.in"
6054     cp "conftest.in" "conftest.nl"
6055     $as_echo 'GREP' >> "conftest.nl"
6056     "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
6057     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6058     as_fn_arith $ac_count + 1 && ac_count=$as_val
6059     if test $ac_count -gt ${ac_path_GREP_max-0}; then
6060       # Best one so far, save it but keep looking for a better one
6061       ac_cv_path_GREP="$ac_path_GREP"
6062       ac_path_GREP_max=$ac_count
6063     fi
6064     # 10*(2^10) chars as input seems more than enough
6065     test $ac_count -gt 10 && break
6066   done
6067   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6068 esac
6069 
6070       $ac_path_GREP_found && break 3
6071     done
6072   done
6073   done
6074 IFS=$as_save_IFS
6075   if test -z "$ac_cv_path_GREP"; then
6076     as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
6077   fi
6078 else
6079   ac_cv_path_GREP=$GREP
6080 fi
6081 
6082 fi
6083 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
6084 $as_echo "$ac_cv_path_GREP" >&6; }
6085  GREP="$ac_cv_path_GREP"
6086 
6087 
6088 
6089     if test "x$GREP" = x; then
6090         if test "x" = x; then
6091           PROG_NAME=grep
6092         else
6093           PROG_NAME=
6094         fi
6095         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6096 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6097         as_fn_error $? "Cannot continue" "$LINENO" 5
6098     fi
6099 
6100 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
6101 $as_echo_n "checking for egrep... " >&6; }
6102 if ${ac_cv_path_EGREP+:} false; then :
6103   $as_echo_n "(cached) " >&6
6104 else
6105   if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
6106    then ac_cv_path_EGREP="$GREP -E"
6107    else
6108      if test -z "$EGREP"; then
6109   ac_path_EGREP_found=false
6110   # Loop through the user's path and test for each of PROGNAME-LIST
6111   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6112 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
6113 do
6114   IFS=$as_save_IFS
6115   test -z "$as_dir" && as_dir=.
6116     for ac_prog in egrep; do
6117     for ac_exec_ext in '' $ac_executable_extensions; do
6118       ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
6119       { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
6120 # Check for GNU ac_path_EGREP and select it if it is found.
6121   # Check for GNU $ac_path_EGREP
6122 case `"$ac_path_EGREP" --version 2>&1` in
6123 *GNU*)
6124   ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
6125 *)
6126   ac_count=0
6127   $as_echo_n 0123456789 >"conftest.in"
6128   while :
6129   do
6130     cat "conftest.in" "conftest.in" >"conftest.tmp"
6131     mv "conftest.tmp" "conftest.in"
6132     cp "conftest.in" "conftest.nl"
6133     $as_echo 'EGREP' >> "conftest.nl"
6134     "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
6135     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6136     as_fn_arith $ac_count + 1 && ac_count=$as_val
6137     if test $ac_count -gt ${ac_path_EGREP_max-0}; then
6138       # Best one so far, save it but keep looking for a better one
6139       ac_cv_path_EGREP="$ac_path_EGREP"
6140       ac_path_EGREP_max=$ac_count
6141     fi
6142     # 10*(2^10) chars as input seems more than enough
6143     test $ac_count -gt 10 && break
6144   done
6145   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6146 esac
6147 
6148       $ac_path_EGREP_found && break 3
6149     done
6150   done
6151   done
6152 IFS=$as_save_IFS
6153   if test -z "$ac_cv_path_EGREP"; then
6154     as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
6155   fi
6156 else
6157   ac_cv_path_EGREP=$EGREP
6158 fi
6159 
6160    fi
6161 fi
6162 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
6163 $as_echo "$ac_cv_path_EGREP" >&6; }
6164  EGREP="$ac_cv_path_EGREP"
6165 
6166 
6167 
6168     if test "x$EGREP" = x; then
6169         if test "x" = x; then
6170           PROG_NAME=egrep
6171         else
6172           PROG_NAME=
6173         fi
6174         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6175 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6176         as_fn_error $? "Cannot continue" "$LINENO" 5
6177     fi
6178 
6179 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
6180 $as_echo_n "checking for fgrep... " >&6; }
6181 if ${ac_cv_path_FGREP+:} false; then :
6182   $as_echo_n "(cached) " >&6
6183 else
6184   if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
6185    then ac_cv_path_FGREP="$GREP -F"
6186    else
6187      if test -z "$FGREP"; then
6188   ac_path_FGREP_found=false
6189   # Loop through the user's path and test for each of PROGNAME-LIST
6190   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6191 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
6192 do
6193   IFS=$as_save_IFS
6194   test -z "$as_dir" && as_dir=.
6195     for ac_prog in fgrep; do
6196     for ac_exec_ext in '' $ac_executable_extensions; do
6197       ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
6198       { test -f "$ac_path_FGREP" && $as_test_x "$ac_path_FGREP"; } || continue
6199 # Check for GNU ac_path_FGREP and select it if it is found.
6200   # Check for GNU $ac_path_FGREP
6201 case `"$ac_path_FGREP" --version 2>&1` in
6202 *GNU*)
6203   ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
6204 *)
6205   ac_count=0
6206   $as_echo_n 0123456789 >"conftest.in"
6207   while :
6208   do
6209     cat "conftest.in" "conftest.in" >"conftest.tmp"
6210     mv "conftest.tmp" "conftest.in"
6211     cp "conftest.in" "conftest.nl"
6212     $as_echo 'FGREP' >> "conftest.nl"
6213     "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
6214     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6215     as_fn_arith $ac_count + 1 && ac_count=$as_val
6216     if test $ac_count -gt ${ac_path_FGREP_max-0}; then
6217       # Best one so far, save it but keep looking for a better one
6218       ac_cv_path_FGREP="$ac_path_FGREP"
6219       ac_path_FGREP_max=$ac_count
6220     fi
6221     # 10*(2^10) chars as input seems more than enough
6222     test $ac_count -gt 10 && break
6223   done
6224   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6225 esac
6226 
6227       $ac_path_FGREP_found && break 3
6228     done
6229   done
6230   done
6231 IFS=$as_save_IFS
6232   if test -z "$ac_cv_path_FGREP"; then
6233     as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
6234   fi
6235 else
6236   ac_cv_path_FGREP=$FGREP
6237 fi
6238 
6239    fi
6240 fi
6241 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
6242 $as_echo "$ac_cv_path_FGREP" >&6; }
6243  FGREP="$ac_cv_path_FGREP"
6244 
6245 
6246 
6247     if test "x$FGREP" = x; then
6248         if test "x" = x; then
6249           PROG_NAME=fgrep
6250         else
6251           PROG_NAME=
6252         fi
6253         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6254 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6255         as_fn_error $? "Cannot continue" "$LINENO" 5
6256     fi
6257 
6258 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
6259 $as_echo_n "checking for a sed that does not truncate output... " >&6; }
6260 if ${ac_cv_path_SED+:} false; then :
6261   $as_echo_n "(cached) " >&6
6262 else
6263             ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
6264      for ac_i in 1 2 3 4 5 6 7; do
6265        ac_script="$ac_script$as_nl$ac_script"
6266      done
6267      echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
6268      { ac_script=; unset ac_script;}
6269      if test -z "$SED"; then
6270   ac_path_SED_found=false
6271   # Loop through the user's path and test for each of PROGNAME-LIST
6272   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6273 for as_dir in $PATH
6274 do
6275   IFS=$as_save_IFS
6276   test -z "$as_dir" && as_dir=.
6277     for ac_prog in sed gsed; do
6278     for ac_exec_ext in '' $ac_executable_extensions; do
6279       ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
6280       { test -f "$ac_path_SED" && $as_test_x "$ac_path_SED"; } || continue
6281 # Check for GNU ac_path_SED and select it if it is found.
6282   # Check for GNU $ac_path_SED
6283 case `"$ac_path_SED" --version 2>&1` in
6284 *GNU*)
6285   ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
6286 *)
6287   ac_count=0
6288   $as_echo_n 0123456789 >"conftest.in"
6289   while :
6290   do
6291     cat "conftest.in" "conftest.in" >"conftest.tmp"
6292     mv "conftest.tmp" "conftest.in"
6293     cp "conftest.in" "conftest.nl"
6294     $as_echo '' >> "conftest.nl"
6295     "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
6296     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6297     as_fn_arith $ac_count + 1 && ac_count=$as_val
6298     if test $ac_count -gt ${ac_path_SED_max-0}; then
6299       # Best one so far, save it but keep looking for a better one
6300       ac_cv_path_SED="$ac_path_SED"
6301       ac_path_SED_max=$ac_count
6302     fi
6303     # 10*(2^10) chars as input seems more than enough
6304     test $ac_count -gt 10 && break
6305   done
6306   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6307 esac
6308 
6309       $ac_path_SED_found && break 3
6310     done
6311   done
6312   done
6313 IFS=$as_save_IFS
6314   if test -z "$ac_cv_path_SED"; then
6315     as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
6316   fi
6317 else
6318   ac_cv_path_SED=$SED
6319 fi
6320 
6321 fi
6322 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
6323 $as_echo "$ac_cv_path_SED" >&6; }
6324  SED="$ac_cv_path_SED"
6325   rm -f conftest.sed
6326 
6327 
6328     if test "x$SED" = x; then
6329         if test "x" = x; then
6330           PROG_NAME=sed
6331         else
6332           PROG_NAME=
6333         fi
6334         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6335 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6336         as_fn_error $? "Cannot continue" "$LINENO" 5
6337     fi
6338 
6339 
6340 for ac_prog in nawk gawk awk
6341 do
6342   # Extract the first word of "$ac_prog", so it can be a program name with args.
6343 set dummy $ac_prog; ac_word=$2
6344 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6345 $as_echo_n "checking for $ac_word... " >&6; }
6346 if ${ac_cv_path_NAWK+:} false; then :
6347   $as_echo_n "(cached) " >&6
6348 else
6349   case $NAWK in
6350   [\\/]* | ?:[\\/]*)
6351   ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
6352   ;;
6353   *)
6354   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6355 for as_dir in $PATH
6356 do
6357   IFS=$as_save_IFS
6358   test -z "$as_dir" && as_dir=.
6359     for ac_exec_ext in '' $ac_executable_extensions; do
6360   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6361     ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
6362     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6363     break 2
6364   fi
6365 done
6366   done
6367 IFS=$as_save_IFS
6368 
6369   ;;
6370 esac
6371 fi
6372 NAWK=$ac_cv_path_NAWK
6373 if test -n "$NAWK"; then
6374   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
6375 $as_echo "$NAWK" >&6; }
6376 else
6377   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6378 $as_echo "no" >&6; }
6379 fi
6380 
6381 
6382   test -n "$NAWK" && break
6383 done
6384 
6385 
6386     if test "x$NAWK" = x; then
6387         if test "x" = x; then
6388           PROG_NAME=nawk
6389         else
6390           PROG_NAME=
6391         fi
6392         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6393 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6394         as_fn_error $? "Cannot continue" "$LINENO" 5
6395     fi
6396 
6397 
6398 # Always force rm.
6399 RM="$RM -f"
6400 
6401 # These are not required on all platforms
6402 # Extract the first word of "cygpath", so it can be a program name with args.
6403 set dummy cygpath; ac_word=$2
6404 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6405 $as_echo_n "checking for $ac_word... " >&6; }
6406 if ${ac_cv_path_CYGPATH+:} false; then :
6407   $as_echo_n "(cached) " >&6
6408 else
6409   case $CYGPATH in
6410   [\\/]* | ?:[\\/]*)
6411   ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
6412   ;;
6413   *)
6414   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6415 for as_dir in $PATH
6416 do
6417   IFS=$as_save_IFS
6418   test -z "$as_dir" && as_dir=.
6419     for ac_exec_ext in '' $ac_executable_extensions; do
6420   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6421     ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
6422     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6423     break 2
6424   fi
6425 done
6426   done
6427 IFS=$as_save_IFS
6428 
6429   ;;
6430 esac
6431 fi
6432 CYGPATH=$ac_cv_path_CYGPATH
6433 if test -n "$CYGPATH"; then
6434   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
6435 $as_echo "$CYGPATH" >&6; }
6436 else
6437   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6438 $as_echo "no" >&6; }
6439 fi
6440 
6441 
6442 # Extract the first word of "readlink", so it can be a program name with args.
6443 set dummy readlink; ac_word=$2
6444 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6445 $as_echo_n "checking for $ac_word... " >&6; }
6446 if ${ac_cv_path_READLINK+:} false; then :
6447   $as_echo_n "(cached) " >&6
6448 else
6449   case $READLINK in
6450   [\\/]* | ?:[\\/]*)
6451   ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
6452   ;;
6453   *)
6454   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6455 for as_dir in $PATH
6456 do
6457   IFS=$as_save_IFS
6458   test -z "$as_dir" && as_dir=.
6459     for ac_exec_ext in '' $ac_executable_extensions; do
6460   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6461     ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
6462     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6463     break 2
6464   fi
6465 done
6466   done
6467 IFS=$as_save_IFS
6468 
6469   ;;
6470 esac
6471 fi
6472 READLINK=$ac_cv_path_READLINK
6473 if test -n "$READLINK"; then
6474   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
6475 $as_echo "$READLINK" >&6; }
6476 else
6477   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6478 $as_echo "no" >&6; }
6479 fi
6480 
6481 
6482 # Extract the first word of "df", so it can be a program name with args.
6483 set dummy df; ac_word=$2
6484 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6485 $as_echo_n "checking for $ac_word... " >&6; }
6486 if ${ac_cv_path_DF+:} false; then :
6487   $as_echo_n "(cached) " >&6
6488 else
6489   case $DF in
6490   [\\/]* | ?:[\\/]*)
6491   ac_cv_path_DF="$DF" # Let the user override the test with a path.
6492   ;;
6493   *)
6494   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6495 for as_dir in $PATH
6496 do
6497   IFS=$as_save_IFS
6498   test -z "$as_dir" && as_dir=.
6499     for ac_exec_ext in '' $ac_executable_extensions; do
6500   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6501     ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
6502     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6503     break 2
6504   fi
6505 done
6506   done
6507 IFS=$as_save_IFS
6508 
6509   ;;
6510 esac
6511 fi
6512 DF=$ac_cv_path_DF
6513 if test -n "$DF"; then
6514   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
6515 $as_echo "$DF" >&6; }
6516 else
6517   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6518 $as_echo "no" >&6; }
6519 fi
6520 
6521 
6522 # Extract the first word of "SetFile", so it can be a program name with args.
6523 set dummy SetFile; ac_word=$2
6524 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6525 $as_echo_n "checking for $ac_word... " >&6; }
6526 if ${ac_cv_path_SETFILE+:} false; then :
6527   $as_echo_n "(cached) " >&6
6528 else
6529   case $SETFILE in
6530   [\\/]* | ?:[\\/]*)
6531   ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
6532   ;;
6533   *)
6534   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6535 for as_dir in $PATH
6536 do
6537   IFS=$as_save_IFS
6538   test -z "$as_dir" && as_dir=.
6539     for ac_exec_ext in '' $ac_executable_extensions; do
6540   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6541     ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
6542     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6543     break 2
6544   fi
6545 done
6546   done
6547 IFS=$as_save_IFS
6548 
6549   ;;
6550 esac
6551 fi
6552 SETFILE=$ac_cv_path_SETFILE
6553 if test -n "$SETFILE"; then
6554   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
6555 $as_echo "$SETFILE" >&6; }
6556 else
6557   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6558 $as_echo "no" >&6; }
6559 fi
6560 
6561 
6562 
6563 
6564 # Now we can determine OpenJDK build and target platforms. This is required to
6565 # have early on.
6566 # Make sure we can run config.sub.
6567 $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
6568   as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
6569 
6570 { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
6571 $as_echo_n "checking build system type... " >&6; }
6572 if ${ac_cv_build+:} false; then :
6573   $as_echo_n "(cached) " >&6
6574 else
6575   ac_build_alias=$build_alias
6576 test "x$ac_build_alias" = x &&
6577   ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
6578 test "x$ac_build_alias" = x &&
6579   as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
6580 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
6581   as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
6582 
6583 fi
6584 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
6585 $as_echo "$ac_cv_build" >&6; }
6586 case $ac_cv_build in
6587 *-*-*) ;;
6588 *) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
6589 esac
6590 build=$ac_cv_build
6591 ac_save_IFS=$IFS; IFS='-'
6592 set x $ac_cv_build
6593 shift
6594 build_cpu=$1
6595 build_vendor=$2
6596 shift; shift
6597 # Remember, the first character of IFS is used to create $*,
6598 # except with old shells:
6599 build_os=$*
6600 IFS=$ac_save_IFS
6601 case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
6602 
6603 
6604 { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
6605 $as_echo_n "checking host system type... " >&6; }
6606 if ${ac_cv_host+:} false; then :
6607   $as_echo_n "(cached) " >&6
6608 else
6609   if test "x$host_alias" = x; then
6610   ac_cv_host=$ac_cv_build
6611 else
6612   ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
6613     as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
6614 fi
6615 
6616 fi
6617 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
6618 $as_echo "$ac_cv_host" >&6; }
6619 case $ac_cv_host in
6620 *-*-*) ;;
6621 *) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
6622 esac
6623 host=$ac_cv_host
6624 ac_save_IFS=$IFS; IFS='-'
6625 set x $ac_cv_host
6626 shift
6627 host_cpu=$1
6628 host_vendor=$2
6629 shift; shift
6630 # Remember, the first character of IFS is used to create $*,
6631 # except with old shells:
6632 host_os=$*
6633 IFS=$ac_save_IFS
6634 case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
6635 
6636 
6637 { $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
6638 $as_echo_n "checking target system type... " >&6; }
6639 if ${ac_cv_target+:} false; then :
6640   $as_echo_n "(cached) " >&6
6641 else
6642   if test "x$target_alias" = x; then
6643   ac_cv_target=$ac_cv_host
6644 else
6645   ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
6646     as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
6647 fi
6648 
6649 fi
6650 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
6651 $as_echo "$ac_cv_target" >&6; }
6652 case $ac_cv_target in
6653 *-*-*) ;;
6654 *) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
6655 esac
6656 target=$ac_cv_target
6657 ac_save_IFS=$IFS; IFS='-'
6658 set x $ac_cv_target
6659 shift
6660 target_cpu=$1
6661 target_vendor=$2
6662 shift; shift
6663 # Remember, the first character of IFS is used to create $*,
6664 # except with old shells:
6665 target_os=$*
6666 IFS=$ac_save_IFS
6667 case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
6668 
6669 
6670 # The aliases save the names the user supplied, while $host etc.
6671 # will get canonicalized.
6672 test -n "$target_alias" &&
6673   test "$program_prefix$program_suffix$program_transform_name" = \
6674     NONENONEs,x,x, &&
6675   program_prefix=${target_alias}-
6676 
6677 # Figure out the build and target systems. # Note that in autoconf terminology, "build" is obvious, but "target"
6678 # is confusing; it assumes you are cross-compiling a cross-compiler (!)  and "target" is thus the target of the
6679 # product you're building. The target of this build is called "host". Since this is confusing to most people, we
6680 # have not adopted that system, but use "target" as the platform we are building for. In some places though we need
6681 # to use the configure naming style.
6682 
6683 
6684 
6685 
6686 
6687     # Copy the autoconf trip/quadruplet verbatim to OPENJDK_TARGET_AUTOCONF_NAME
6688     # (from the autoconf "host") and OPENJDK_BUILD_AUTOCONF_NAME
6689     # Note that we might later on rewrite e.g. OPENJDK_TARGET_CPU due to reduced build,
6690     # but this will not change the value of OPENJDK_TARGET_AUTOCONF_NAME.
6691     OPENJDK_TARGET_AUTOCONF_NAME="$host"
6692     OPENJDK_BUILD_AUTOCONF_NAME="$build"
6693 
6694 
6695 
6696     # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
6697 
6698   case "$build_os" in
6699     *linux*)
6700       VAR_OS=linux
6701       VAR_OS_API=posix
6702       VAR_OS_ENV=linux
6703       ;;
6704     *solaris*)
6705       VAR_OS=solaris
6706       VAR_OS_API=posix
6707       VAR_OS_ENV=solaris
6708       ;;
6709     *darwin*)
6710       VAR_OS=macosx
6711       VAR_OS_API=posix
6712       VAR_OS_ENV=macosx
6713       ;;
6714     *bsd*)
6715       VAR_OS=bsd
6716       VAR_OS_API=posix
6717       VAR_OS_ENV=bsd
6718       ;;
6719     *cygwin*)
6720       VAR_OS=windows
6721       VAR_OS_API=winapi
6722       VAR_OS_ENV=windows.cygwin
6723       ;;
6724     *mingw*)
6725       VAR_OS=windows
6726       VAR_OS_API=winapi
6727       VAR_OS_ENV=windows.msys
6728       ;;
6729     *)
6730       as_fn_error $? "unsupported operating system $build_os" "$LINENO" 5
6731       ;;
6732   esac
6733 
6734 
6735   # First argument is the cpu name from the trip/quad
6736   case "$build_cpu" in
6737     x86_64)
6738       VAR_CPU=x86_64
6739       VAR_CPU_ARCH=x86
6740       VAR_CPU_BITS=64
6741       VAR_CPU_ENDIAN=little
6742       ;;
6743     i?86)
6744       VAR_CPU=x86
6745       VAR_CPU_ARCH=x86
6746       VAR_CPU_BITS=32
6747       VAR_CPU_ENDIAN=little
6748       ;;
6749     arm*)
6750       VAR_CPU=arm
6751       VAR_CPU_ARCH=arm
6752       VAR_CPU_BITS=32
6753       VAR_CPU_ENDIAN=little
6754       ;;
6755     powerpc)
6756       VAR_CPU=ppc
6757       VAR_CPU_ARCH=ppc
6758       VAR_CPU_BITS=32
6759       VAR_CPU_ENDIAN=big
6760        ;;
6761     powerpc64)
6762       VAR_CPU=ppc64
6763       VAR_CPU_ARCH=ppc
6764       VAR_CPU_BITS=64
6765       VAR_CPU_ENDIAN=big
6766        ;;
6767     sparc)
6768       VAR_CPU=sparc
6769       VAR_CPU_ARCH=sparc
6770       VAR_CPU_BITS=32
6771       VAR_CPU_ENDIAN=big
6772        ;;
6773     sparcv9)
6774       VAR_CPU=sparcv9
6775       VAR_CPU_ARCH=sparc
6776       VAR_CPU_BITS=64
6777       VAR_CPU_ENDIAN=big
6778        ;;
6779     *)
6780       as_fn_error $? "unsupported cpu $build_cpu" "$LINENO" 5
6781       ;;
6782   esac
6783 
6784     # ..and setup our own variables. (Do this explicitely to facilitate searching)
6785     OPENJDK_BUILD_OS="$VAR_OS"
6786     OPENJDK_BUILD_OS_API="$VAR_OS_API"
6787     OPENJDK_BUILD_OS_ENV="$VAR_OS_ENV"
6788     OPENJDK_BUILD_CPU="$VAR_CPU"
6789     OPENJDK_BUILD_CPU_ARCH="$VAR_CPU_ARCH"
6790     OPENJDK_BUILD_CPU_BITS="$VAR_CPU_BITS"
6791     OPENJDK_BUILD_CPU_ENDIAN="$VAR_CPU_ENDIAN"
6792 
6793 
6794 
6795 
6796 
6797 
6798 
6799     { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-build os-cpu" >&5
6800 $as_echo_n "checking openjdk-build os-cpu... " >&6; }
6801     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&5
6802 $as_echo "$OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&6; }
6803 
6804     # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
6805 
6806   case "$host_os" in
6807     *linux*)
6808       VAR_OS=linux
6809       VAR_OS_API=posix
6810       VAR_OS_ENV=linux
6811       ;;
6812     *solaris*)
6813       VAR_OS=solaris
6814       VAR_OS_API=posix
6815       VAR_OS_ENV=solaris
6816       ;;
6817     *darwin*)
6818       VAR_OS=macosx
6819       VAR_OS_API=posix
6820       VAR_OS_ENV=macosx
6821       ;;
6822     *bsd*)
6823       VAR_OS=bsd
6824       VAR_OS_API=posix
6825       VAR_OS_ENV=bsd
6826       ;;
6827     *cygwin*)
6828       VAR_OS=windows
6829       VAR_OS_API=winapi
6830       VAR_OS_ENV=windows.cygwin
6831       ;;
6832     *mingw*)
6833       VAR_OS=windows
6834       VAR_OS_API=winapi
6835       VAR_OS_ENV=windows.msys
6836       ;;
6837     *)
6838       as_fn_error $? "unsupported operating system $host_os" "$LINENO" 5
6839       ;;
6840   esac
6841 
6842 
6843   # First argument is the cpu name from the trip/quad
6844   case "$host_cpu" in
6845     x86_64)
6846       VAR_CPU=x86_64
6847       VAR_CPU_ARCH=x86
6848       VAR_CPU_BITS=64
6849       VAR_CPU_ENDIAN=little
6850       ;;
6851     i?86)
6852       VAR_CPU=x86
6853       VAR_CPU_ARCH=x86
6854       VAR_CPU_BITS=32
6855       VAR_CPU_ENDIAN=little
6856       ;;
6857     arm*)
6858       VAR_CPU=arm
6859       VAR_CPU_ARCH=arm
6860       VAR_CPU_BITS=32
6861       VAR_CPU_ENDIAN=little
6862       ;;
6863     powerpc)
6864       VAR_CPU=ppc
6865       VAR_CPU_ARCH=ppc
6866       VAR_CPU_BITS=32
6867       VAR_CPU_ENDIAN=big
6868        ;;
6869     powerpc64)
6870       VAR_CPU=ppc64
6871       VAR_CPU_ARCH=ppc
6872       VAR_CPU_BITS=64
6873       VAR_CPU_ENDIAN=big
6874        ;;
6875     sparc)
6876       VAR_CPU=sparc
6877       VAR_CPU_ARCH=sparc
6878       VAR_CPU_BITS=32
6879       VAR_CPU_ENDIAN=big
6880        ;;
6881     sparcv9)
6882       VAR_CPU=sparcv9
6883       VAR_CPU_ARCH=sparc
6884       VAR_CPU_BITS=64
6885       VAR_CPU_ENDIAN=big
6886        ;;
6887     *)
6888       as_fn_error $? "unsupported cpu $host_cpu" "$LINENO" 5
6889       ;;
6890   esac
6891 
6892     # ... and setup our own variables. (Do this explicitely to facilitate searching)
6893     OPENJDK_TARGET_OS="$VAR_OS"
6894     OPENJDK_TARGET_OS_API="$VAR_OS_API"
6895     OPENJDK_TARGET_OS_ENV="$VAR_OS_ENV"
6896     OPENJDK_TARGET_CPU="$VAR_CPU"
6897     OPENJDK_TARGET_CPU_ARCH="$VAR_CPU_ARCH"
6898     OPENJDK_TARGET_CPU_BITS="$VAR_CPU_BITS"
6899     OPENJDK_TARGET_CPU_ENDIAN="$VAR_CPU_ENDIAN"
6900 
6901 
6902 
6903 
6904 
6905 
6906 
6907     { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-target os-cpu" >&5
6908 $as_echo_n "checking openjdk-target os-cpu... " >&6; }
6909     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&5
6910 $as_echo "$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&6; }
6911 
6912 
6913 
6914 # Check whether --with-target-bits was given.
6915 if test "${with_target_bits+set}" = set; then :
6916   withval=$with_target_bits;
6917 fi
6918 
6919 
6920   # We have three types of compiles:
6921   # native  == normal compilation, target system == build system
6922   # cross   == traditional cross compilation, target system != build system; special toolchain needed
6923   # reduced == using native compilers, but with special flags (e.g. -m32) to produce 32-bit builds on 64-bit machines
6924   #
6925   if test "x$OPENJDK_BUILD_AUTOCONF_NAME" != "x$OPENJDK_TARGET_AUTOCONF_NAME"; then
6926     # We're doing a proper cross-compilation
6927     COMPILE_TYPE="cross"
6928   else
6929     COMPILE_TYPE="native"
6930   fi
6931 
6932   if test "x$with_target_bits" != x; then
6933     if test "x$COMPILE_TYPE" = "xcross"; then
6934       as_fn_error $? "It is not possible to combine --with-target-bits=X and proper cross-compilation. Choose either." "$LINENO" 5
6935     fi
6936 
6937     if test "x$with_target_bits" = x32 && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
6938       # A reduced build is requested
6939       COMPILE_TYPE="reduced"
6940       OPENJDK_TARGET_CPU_BITS=32
6941       if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
6942         OPENJDK_TARGET_CPU=x86
6943       elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
6944         OPENJDK_TARGET_CPU=sparc
6945       else
6946         as_fn_error $? "Reduced build (--with-target-bits=32) is only supported on x86_64 and sparcv9" "$LINENO" 5
6947       fi
6948     elif test "x$with_target_bits" = x64 && test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
6949       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
6950     elif test "x$with_target_bits" = "x$OPENJDK_TARGET_CPU_BITS"; then
6951       { $as_echo "$as_me:${as_lineno-$LINENO}: --with-target-bits are set to build platform address size; argument has no meaning" >&5
6952 $as_echo "$as_me: --with-target-bits are set to build platform address size; argument has no meaning" >&6;}
6953     else
6954       as_fn_error $? "--with-target-bits can only be 32 or 64, you specified $with_target_bits!" "$LINENO" 5
6955     fi
6956   fi
6957 
6958 
6959 { $as_echo "$as_me:${as_lineno-$LINENO}: checking compilation type" >&5
6960 $as_echo_n "checking compilation type... " >&6; }
6961 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMPILE_TYPE" >&5
6962 $as_echo "$COMPILE_TYPE" >&6; }
6963 
6964 
6965     if test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
6966        REQUIRED_OS_NAME=SunOS
6967        REQUIRED_OS_VERSION=5.10
6968     fi
6969     if test "x$OPENJDK_TARGET_OS" = "xlinux"; then
6970        REQUIRED_OS_NAME=Linux
6971        REQUIRED_OS_VERSION=2.6
6972     fi
6973     if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
6974         REQUIRED_OS_NAME=Windows
6975         if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
6976             REQUIRED_OS_VERSION=5.2
6977         else
6978             REQUIRED_OS_VERSION=5.1
6979         fi
6980     fi
6981     if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
6982         REQUIRED_OS_NAME=Darwin
6983         REQUIRED_OS_VERSION=11.2
6984     fi
6985 
6986 
6987 
6988 
6989 
6990     # Also store the legacy naming of the cpu.
6991     # Ie i586 and amd64 instead of x86 and x86_64
6992     OPENJDK_TARGET_CPU_LEGACY="$OPENJDK_TARGET_CPU"
6993     if test "x$OPENJDK_TARGET_CPU" = xx86; then
6994       OPENJDK_TARGET_CPU_LEGACY="i586"
6995     elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
6996       # On all platforms except MacOSX replace x86_64 with amd64.
6997       OPENJDK_TARGET_CPU_LEGACY="amd64"
6998     fi
6999 
7000 
7001     # And the second legacy naming of the cpu.
7002     # Ie i386 and amd64 instead of x86 and x86_64.
7003     OPENJDK_TARGET_CPU_LEGACY_LIB="$OPENJDK_TARGET_CPU"
7004     if test "x$OPENJDK_TARGET_CPU" = xx86; then
7005       OPENJDK_TARGET_CPU_LEGACY_LIB="i386"
7006     elif test "x$OPENJDK_TARGET_CPU" = xx86_64; then
7007       OPENJDK_TARGET_CPU_LEGACY_LIB="amd64"
7008     fi
7009 
7010 
7011     # This is the name of the cpu (but using i386 and amd64 instead of
7012     # x86 and x86_64, respectively), preceeded by a /, to be used when
7013     # locating libraries. On macosx, it's empty, though.
7014     OPENJDK_TARGET_CPU_LIBDIR="/$OPENJDK_TARGET_CPU_LEGACY_LIB"
7015     if test "x$OPENJDK_TARGET_OS" = xmacosx; then
7016         OPENJDK_TARGET_CPU_LIBDIR=""
7017     fi
7018 
7019 
7020     # OPENJDK_TARGET_CPU_ISADIR is normally empty. On 64-bit Solaris systems, it is set to
7021     # /amd64 or /sparcv9. This string is appended to some library paths, like this:
7022     # /usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libexample.so
7023     OPENJDK_TARGET_CPU_ISADIR=""
7024     if test "x$OPENJDK_TARGET_OS" = xsolaris; then
7025       if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
7026           OPENJDK_TARGET_CPU_ISADIR="/amd64"
7027       elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
7028           OPENJDK_TARGET_CPU_ISADIR="/sparcv9"
7029       fi
7030     fi
7031 
7032 
7033     # Setup OPENJDK_TARGET_CPU_OSARCH, which is used to set the os.arch Java system property
7034     OPENJDK_TARGET_CPU_OSARCH="$OPENJDK_TARGET_CPU"
7035     if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$OPENJDK_TARGET_CPU" = xx86; then
7036       # On linux only, we replace x86 with i386.
7037       OPENJDK_TARGET_CPU_OSARCH="i386"
7038     elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
7039       # On all platforms except macosx, we replace x86_64 with amd64.
7040       OPENJDK_TARGET_CPU_OSARCH="amd64"
7041     fi
7042 
7043 
7044     OPENJDK_TARGET_CPU_JLI="$OPENJDK_TARGET_CPU"
7045     if test "x$OPENJDK_TARGET_CPU" = xx86; then
7046       OPENJDK_TARGET_CPU_JLI="i386"
7047     elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
7048       # On all platforms except macosx, we replace x86_64 with amd64.
7049       OPENJDK_TARGET_CPU_JLI="amd64"
7050     fi
7051     # Now setup the -D flags for building libjli.
7052     OPENJDK_TARGET_CPU_JLI_CFLAGS="-DLIBARCHNAME='\"$OPENJDK_TARGET_CPU_JLI\"'"
7053     if test "x$OPENJDK_TARGET_OS" = xsolaris; then
7054       if test "x$OPENJDK_TARGET_CPU_ARCH" = xsparc; then
7055         OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"sparc\"' -DLIBARCH64NAME='\"sparcv9\"'"
7056       elif test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
7057         OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"i386\"' -DLIBARCH64NAME='\"amd64\"'"
7058       fi
7059     fi
7060 
7061 
7062     # Setup OPENJDK_TARGET_OS_API_DIR, used in source paths.
7063     if test "x$OPENJDK_TARGET_OS_API" = xposix; then
7064         OPENJDK_TARGET_OS_API_DIR="solaris"
7065     fi
7066     if test "x$OPENJDK_TARGET_OS_API" = xwinapi; then
7067         OPENJDK_TARGET_OS_API_DIR="windows"
7068     fi
7069 
7070 
7071     if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
7072         A_LP64="LP64:="
7073         # -D_LP64=1 is only set on linux and mac. Setting on windows causes diff in
7074         # unpack200.exe
7075         if test "x$OPENJDK_TARGET_OS" = xlinux || test "x$OPENJDK_TARGET_OS" = xmacosx; then
7076             ADD_LP64="-D_LP64=1"
7077         fi
7078     fi
7079     LP64=$A_LP64
7080 
7081 
7082     if test "x$COMPILE_TYPE" = "xcross"; then
7083       # FIXME: ... or should this include reduced builds..?
7084       DEFINE_CROSS_COMPILE_ARCH="CROSS_COMPILE_ARCH:=$OPENJDK_TARGET_CPU_LEGACY"
7085     else
7086       DEFINE_CROSS_COMPILE_ARCH=""
7087     fi
7088 
7089 
7090 
7091 
7092 # Continue setting up basic stuff. Most remaining code require fundamental tools.
7093 
7094 # Locate the directory of this script.
7095 SCRIPT="$0"
7096 
7097     if test "x$OPENJDK_BUILD_OS" != xwindows; then
7098         # Follow a chain of symbolic links. Use readlink
7099         # where it exists, else fall back to horribly
7100         # complicated shell code.
7101         if test "x$READLINK_TESTED" != yes; then
7102             # On MacOSX there is a readlink tool with a different
7103             # purpose than the GNU readlink tool. Check the found readlink.
7104             ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
7105             if test "x$ISGNU" = x; then
7106                  # A readlink that we do not know how to use.
7107                  # Are there other non-GNU readlinks out there?
7108                  READLINK_TESTED=yes
7109                  READLINK=
7110             fi
7111         fi
7112 
7113         if test "x$READLINK" != x; then
7114             SCRIPT=`$READLINK -f $SCRIPT`
7115         else
7116             # Save the current directory for restoring afterwards
7117             STARTDIR=$PWD
7118             COUNTER=0
7119             sym_link_dir=`$DIRNAME $SCRIPT`
7120             sym_link_file=`$BASENAME $SCRIPT`
7121             # Use the system pwd and not the shell builtin to resolve directory symlinks
7122             cd $sym_link_dir
7123             cd `$THEPWDCMD`
7124             sym_link_dir=`$THEPWDCMD`
7125             # Resolve file symlinks
7126             while test $COUNTER -lt 20; do
7127                 ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
7128                 if test "x$ISLINK" == x; then
7129                     # This is not a symbolic link! We are done!
7130                     break
7131                 fi
7132                 # Again resolve directory symlinks since the target of the just found
7133                 # link could be in a different directory
7134                 cd `$DIRNAME $ISLINK`
7135                 sym_link_dir=`$THEPWDCMD`
7136                 sym_link_file=`$BASENAME $ISLINK`
7137                 let COUNTER=COUNTER+1
7138             done
7139             cd $STARTDIR
7140             SCRIPT=$sym_link_dir/$sym_link_file
7141         fi
7142     fi
7143 
7144 AUTOCONF_DIR=`cd \`$DIRNAME $SCRIPT\`; $THEPWDCMD`
7145 
7146 # Where is the source? It is located two levels above the configure script.
7147 CURDIR="$PWD"
7148 cd "$AUTOCONF_DIR/../.."
7149 SRC_ROOT="`$THEPWDCMD`"
7150 
7151 if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
7152   PATH_SEP=";"
7153 
7154   SRC_ROOT_LENGTH=`$THEPWDCMD|$WC -m`
7155   if test $SRC_ROOT_LENGTH -gt 100; then
7156       as_fn_error $? "Your base path is too long. It is $SRC_ROOT_LENGTH characters long, but only 100 is supported" "$LINENO" 5
7157   fi
7158 
7159   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7160     { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin release" >&5
7161 $as_echo_n "checking cygwin release... " >&6; }
7162     CYGWIN_VERSION=`$UNAME -r`
7163     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_VERSION" >&5
7164 $as_echo "$CYGWIN_VERSION" >&6; }
7165     WINDOWS_ENV_VENDOR='cygwin'
7166     WINDOWS_ENV_VERSION="$CYGWIN_VERSION"
7167 
7168     CYGWIN_VERSION_OK=`$ECHO $CYGWIN_VERSION | $GREP ^1.7.`
7169     if test "x$CYGWIN_VERSION_OK" = x; then
7170       { $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
7171 $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;}
7172       as_fn_error $? "Cannot continue" "$LINENO" 5
7173     fi
7174     if test "x$CYGPATH" = x; then
7175         as_fn_error $? "Something is wrong with your cygwin installation since I cannot find cygpath.exe in your path" "$LINENO" 5
7176     fi
7177     { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin root directory as unix-style path" >&5
7178 $as_echo_n "checking cygwin root directory as unix-style path... " >&6; }
7179     # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
7180     cygwin_winpath_root=`cd / ; cmd /c cd | grep ".*"`
7181     # Force cygpath to report the proper root by including a trailing space, and then stripping it off again.
7182     CYGWIN_ROOT_PATH=`$CYGPATH -u "$cygwin_winpath_root " | $CUT -f 1 -d " "`
7183     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_ROOT_PATH" >&5
7184 $as_echo "$CYGWIN_ROOT_PATH" >&6; }
7185     WINDOWS_ENV_ROOT_PATH="$CYGWIN_ROOT_PATH"
7186     test_cygdrive_prefix=`$ECHO $CYGWIN_ROOT_PATH | $GREP ^/cygdrive/`
7187     if test "x$test_cygdrive_prefix" = x; then
7188         as_fn_error $? "Your cygdrive prefix is not /cygdrive. This is currently not supported. Change with mount -c." "$LINENO" 5
7189     fi
7190   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7191     { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys release" >&5
7192 $as_echo_n "checking msys release... " >&6; }
7193     MSYS_VERSION=`$UNAME -r`
7194     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_VERSION" >&5
7195 $as_echo "$MSYS_VERSION" >&6; }
7196 
7197     WINDOWS_ENV_VENDOR='msys'
7198     WINDOWS_ENV_VERSION="$MSYS_VERSION"
7199 
7200     { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys root directory as unix-style path" >&5
7201 $as_echo_n "checking msys root directory as unix-style path... " >&6; }
7202     # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
7203     MSYS_ROOT_PATH=`cd / ; cmd /c cd | grep ".*"`
7204 
7205   windows_path="$MSYS_ROOT_PATH"
7206   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7207     unix_path=`$CYGPATH -u "$windows_path"`
7208     MSYS_ROOT_PATH="$unix_path"
7209   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7210     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
7211     MSYS_ROOT_PATH="$unix_path"
7212   fi
7213 
7214     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_ROOT_PATH" >&5
7215 $as_echo "$MSYS_ROOT_PATH" >&6; }
7216     WINDOWS_ENV_ROOT_PATH="$MSYS_ROOT_PATH"
7217   else
7218     as_fn_error $? "Unknown Windows environment. Neither cygwin nor msys was detected." "$LINENO" 5
7219   fi
7220 
7221   # Test if windows or unix (cygwin/msys) find is first in path.
7222   { $as_echo "$as_me:${as_lineno-$LINENO}: checking what kind of 'find' is first on the PATH" >&5
7223 $as_echo_n "checking what kind of 'find' is first on the PATH... " >&6; }
7224   FIND_BINARY_OUTPUT=`find --version 2>&1`
7225   if test "x`echo $FIND_BINARY_OUTPUT | $GREP GNU`" != x; then
7226     { $as_echo "$as_me:${as_lineno-$LINENO}: result: unix style" >&5
7227 $as_echo "unix style" >&6; }
7228   elif test "x`echo $FIND_BINARY_OUTPUT | $GREP FIND`" != x; then
7229     { $as_echo "$as_me:${as_lineno-$LINENO}: result: Windows" >&5
7230 $as_echo "Windows" >&6; }
7231     { $as_echo "$as_me:${as_lineno-$LINENO}: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&5
7232 $as_echo "$as_me: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&6;}
7233     { $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
7234 $as_echo "$as_me: This will not work. Please correct and make sure /usr/bin (or similar) is first in path." >&6;}
7235     as_fn_error $? "Cannot continue" "$LINENO" 5
7236   else
7237     { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
7238 $as_echo "unknown" >&6; }
7239     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: It seems that your find utility is non-standard." >&5
7240 $as_echo "$as_me: WARNING: It seems that your find utility is non-standard." >&2;}
7241   fi
7242 
7243 else
7244   PATH_SEP=":"
7245 fi
7246 
7247 
7248 
7249 cd "$CURDIR"
7250 
7251 
7252   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7253 
7254   # Input might be given as Windows format, start by converting to
7255   # unix format.
7256   path="$SRC_ROOT"
7257   new_path=`$CYGPATH -u "$path"`
7258 
7259   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
7260   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
7261   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
7262   # "foo.exe" is OK but "foo" is an error.
7263   #
7264   # This test is therefore slightly more accurate than "test -f" to check for file precense.
7265   # It is also a way to make sure we got the proper file name for the real test later on.
7266   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
7267   if test "x$test_shortpath" = x; then
7268     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&5
7269 $as_echo "$as_me: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&6;}
7270     as_fn_error $? "Cannot locate the the path of SRC_ROOT" "$LINENO" 5
7271   fi
7272 
7273   # Call helper function which possibly converts this using DOS-style short mode.
7274   # If so, the updated path is stored in $new_path.
7275 
7276   input_path="$new_path"
7277   # Check if we need to convert this using DOS-style short mode. If the path
7278   # contains just simple characters, use it. Otherwise (spaces, weird characters),
7279   # take no chances and rewrite it.
7280   # Note: m4 eats our [], so we need to use [ and ] instead.
7281   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
7282   if test "x$has_forbidden_chars" != x; then
7283     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7284     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
7285     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
7286     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
7287       # Going to short mode and back again did indeed matter. Since short mode is
7288       # case insensitive, let's make it lowercase to improve readability.
7289       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7290       # Now convert it back to Unix-stile (cygpath)
7291       input_path=`$CYGPATH -u "$shortmode_path"`
7292       new_path="$input_path"
7293     fi
7294   fi
7295 
7296   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
7297   if test "x$test_cygdrive_prefix" = x; then
7298     # As a simple fix, exclude /usr/bin since it's not a real path.
7299     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
7300       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
7301       # a path prefixed by /cygdrive for fixpath to work.
7302       new_path="$CYGWIN_ROOT_PATH$input_path"
7303     fi
7304   fi
7305 
7306 
7307   if test "x$path" != "x$new_path"; then
7308     SRC_ROOT="$new_path"
7309     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting SRC_ROOT to \"$new_path\"" >&5
7310 $as_echo "$as_me: Rewriting SRC_ROOT to \"$new_path\"" >&6;}
7311   fi
7312 
7313   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7314 
7315   path="$SRC_ROOT"
7316   has_colon=`$ECHO $path | $GREP ^.:`
7317   new_path="$path"
7318   if test "x$has_colon" = x; then
7319     # Not in mixed or Windows style, start by that.
7320     new_path=`cmd //c echo $path`
7321   fi
7322 
7323 
7324   input_path="$new_path"
7325   # Check if we need to convert this using DOS-style short mode. If the path
7326   # contains just simple characters, use it. Otherwise (spaces, weird characters),
7327   # take no chances and rewrite it.
7328   # Note: m4 eats our [], so we need to use [ and ] instead.
7329   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
7330   if test "x$has_forbidden_chars" != x; then
7331     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7332     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7333   fi
7334 
7335 
7336   windows_path="$new_path"
7337   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7338     unix_path=`$CYGPATH -u "$windows_path"`
7339     new_path="$unix_path"
7340   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7341     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
7342     new_path="$unix_path"
7343   fi
7344 
7345   if test "x$path" != "x$new_path"; then
7346     SRC_ROOT="$new_path"
7347     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting SRC_ROOT to \"$new_path\"" >&5
7348 $as_echo "$as_me: Rewriting SRC_ROOT to \"$new_path\"" >&6;}
7349   fi
7350 
7351   # Save the first 10 bytes of this path to the storage, so fixpath can work.
7352   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
7353 
7354   else
7355     # We're on a posix platform. Hooray! :)
7356     path="$SRC_ROOT"
7357 
7358     if test ! -f "$path" && test ! -d "$path"; then
7359       as_fn_error $? "The path of SRC_ROOT, which resolves as \"$path\", is not found." "$LINENO" 5
7360     fi
7361 
7362     has_space=`$ECHO "$path" | $GREP " "`
7363     if test "x$has_space" != x; then
7364       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&5
7365 $as_echo "$as_me: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&6;}
7366       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
7367     fi
7368   fi
7369 
7370 
7371   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7372 
7373   # Input might be given as Windows format, start by converting to
7374   # unix format.
7375   path="$CURDIR"
7376   new_path=`$CYGPATH -u "$path"`
7377 
7378   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
7379   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
7380   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
7381   # "foo.exe" is OK but "foo" is an error.
7382   #
7383   # This test is therefore slightly more accurate than "test -f" to check for file precense.
7384   # It is also a way to make sure we got the proper file name for the real test later on.
7385   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
7386   if test "x$test_shortpath" = x; then
7387     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
7388 $as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
7389     as_fn_error $? "Cannot locate the the path of CURDIR" "$LINENO" 5
7390   fi
7391 
7392   # Call helper function which possibly converts this using DOS-style short mode.
7393   # If so, the updated path is stored in $new_path.
7394 
7395   input_path="$new_path"
7396   # Check if we need to convert this using DOS-style short mode. If the path
7397   # contains just simple characters, use it. Otherwise (spaces, weird characters),
7398   # take no chances and rewrite it.
7399   # Note: m4 eats our [], so we need to use [ and ] instead.
7400   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
7401   if test "x$has_forbidden_chars" != x; then
7402     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7403     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
7404     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
7405     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
7406       # Going to short mode and back again did indeed matter. Since short mode is
7407       # case insensitive, let's make it lowercase to improve readability.
7408       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7409       # Now convert it back to Unix-stile (cygpath)
7410       input_path=`$CYGPATH -u "$shortmode_path"`
7411       new_path="$input_path"
7412     fi
7413   fi
7414 
7415   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
7416   if test "x$test_cygdrive_prefix" = x; then
7417     # As a simple fix, exclude /usr/bin since it's not a real path.
7418     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
7419       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
7420       # a path prefixed by /cygdrive for fixpath to work.
7421       new_path="$CYGWIN_ROOT_PATH$input_path"
7422     fi
7423   fi
7424 
7425 
7426   if test "x$path" != "x$new_path"; then
7427     CURDIR="$new_path"
7428     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
7429 $as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
7430   fi
7431 
7432   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7433 
7434   path="$CURDIR"
7435   has_colon=`$ECHO $path | $GREP ^.:`
7436   new_path="$path"
7437   if test "x$has_colon" = x; then
7438     # Not in mixed or Windows style, start by that.
7439     new_path=`cmd //c echo $path`
7440   fi
7441 
7442 
7443   input_path="$new_path"
7444   # Check if we need to convert this using DOS-style short mode. If the path
7445   # contains just simple characters, use it. Otherwise (spaces, weird characters),
7446   # take no chances and rewrite it.
7447   # Note: m4 eats our [], so we need to use [ and ] instead.
7448   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
7449   if test "x$has_forbidden_chars" != x; then
7450     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7451     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7452   fi
7453 
7454 
7455   windows_path="$new_path"
7456   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7457     unix_path=`$CYGPATH -u "$windows_path"`
7458     new_path="$unix_path"
7459   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7460     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
7461     new_path="$unix_path"
7462   fi
7463 
7464   if test "x$path" != "x$new_path"; then
7465     CURDIR="$new_path"
7466     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
7467 $as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
7468   fi
7469 
7470   # Save the first 10 bytes of this path to the storage, so fixpath can work.
7471   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
7472 
7473   else
7474     # We're on a posix platform. Hooray! :)
7475     path="$CURDIR"
7476 
7477     if test ! -f "$path" && test ! -d "$path"; then
7478       as_fn_error $? "The path of CURDIR, which resolves as \"$path\", is not found." "$LINENO" 5
7479     fi
7480 
7481     has_space=`$ECHO "$path" | $GREP " "`
7482     if test "x$has_space" != x; then
7483       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
7484 $as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
7485       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
7486     fi
7487   fi
7488 
7489 
7490 if test "x$OPENJDK_BUILD_OS" = "xsolaris"; then
7491     # Add extra search paths on solaris for utilities like ar and as etc...
7492     PATH="$PATH:/usr/ccs/bin:/usr/sfw/bin:/opt/csw/bin"
7493 fi
7494 
7495 # You can force the sys-root if the sys-root encoded into the cross compiler tools
7496 # is not correct.
7497 
7498 # Check whether --with-sys-root was given.
7499 if test "${with_sys_root+set}" = set; then :
7500   withval=$with_sys_root;
7501 fi
7502 
7503 
7504 if test "x$with_sys_root" != x; then
7505   SYS_ROOT=$with_sys_root
7506 else
7507   SYS_ROOT=/
7508 fi
7509 
7510 
7511 
7512 # Check whether --with-tools-dir was given.
7513 if test "${with_tools_dir+set}" = set; then :
7514   withval=$with_tools_dir; TOOLS_DIR=$with_tools_dir
7515 fi
7516 
7517 
7518 
7519 # Check whether --with-devkit was given.
7520 if test "${with_devkit+set}" = set; then :
7521   withval=$with_devkit;
7522     if test "x$with_sys_root" != x; then
7523       as_fn_error $? "Cannot specify both --with-devkit and --with-sys-root at the same time" "$LINENO" 5
7524     fi
7525     if test "x$with_tools_dir" != x; then
7526       as_fn_error $? "Cannot specify both --with-devkit and --with-tools-dir at the same time" "$LINENO" 5
7527     fi
7528     TOOLS_DIR=$with_devkit/bin
7529     SYS_ROOT=$with_devkit/$host_alias/libc
7530 
7531 fi
7532 
7533 
7534 
7535 
7536 # Setup default logging of stdout and stderr to build.log in the output root.
7537 BUILD_LOG='$(OUTPUT_ROOT)/build.log'
7538 BUILD_LOG_PREVIOUS='$(OUTPUT_ROOT)/build.log.old'
7539 BUILD_LOG_WRAPPER='$(BASH) $(SRC_ROOT)/common/bin/logger.sh $(BUILD_LOG)'
7540 
7541 
7542 
7543 
7544 
7545 # Check if it's a pure open build or if custom sources are to be used.
7546 
7547   # Check whether --enable-openjdk-only was given.
7548 if test "${enable_openjdk_only+set}" = set; then :
7549   enableval=$enable_openjdk_only;
7550 else
7551   enable_openjdk_only="no"
7552 fi
7553 
7554 
7555   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for presence of closed sources" >&5
7556 $as_echo_n "checking for presence of closed sources... " >&6; }
7557   if test -d "$SRC_ROOT/jdk/src/closed"; then
7558     CLOSED_SOURCE_PRESENT=yes
7559   else
7560     CLOSED_SOURCE_PRESENT=no
7561   fi
7562   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CLOSED_SOURCE_PRESENT" >&5
7563 $as_echo "$CLOSED_SOURCE_PRESENT" >&6; }
7564 
7565   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if closed source is suppressed (openjdk-only)" >&5
7566 $as_echo_n "checking if closed source is suppressed (openjdk-only)... " >&6; }
7567   SUPPRESS_CLOSED_SOURCE="$enable_openjdk_only"
7568   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SUPPRESS_CLOSED_SOURCE" >&5
7569 $as_echo "$SUPPRESS_CLOSED_SOURCE" >&6; }
7570 
7571   if test "x$CLOSED_SOURCE_PRESENT" = xno; then
7572     OPENJDK=true
7573     if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then
7574       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&5
7575 $as_echo "$as_me: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&2;}
7576     fi
7577   else
7578     if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then
7579       OPENJDK=true
7580     else
7581       OPENJDK=false
7582     fi
7583   fi
7584 
7585   if test "x$OPENJDK" = "xtrue"; then
7586     SET_OPENJDK="OPENJDK=true"
7587   fi
7588 
7589 
7590 
7591 
7592 # These are needed to be able to create a configuration name (and thus the output directory)
7593 
7594 ###############################################################################
7595 #
7596 # Check which variant of the JDK that we want to build.
7597 # Currently we have:
7598 #    normal:   standard edition
7599 # but the custom make system may add other variants
7600 #
7601 # Effectively the JDK variant gives a name to a specific set of
7602 # modules to compile into the JDK. In the future, these modules
7603 # might even be Jigsaw modules.
7604 #
7605 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variant of the JDK to build" >&5
7606 $as_echo_n "checking which variant of the JDK to build... " >&6; }
7607 
7608 # Check whether --with-jdk-variant was given.
7609 if test "${with_jdk_variant+set}" = set; then :
7610   withval=$with_jdk_variant;
7611 fi
7612 
7613 
7614 if test "x$with_jdk_variant" = xnormal || test "x$with_jdk_variant" = x; then
7615     JDK_VARIANT="normal"
7616 else
7617     as_fn_error $? "The available JDK variants are: normal" "$LINENO" 5
7618 fi
7619 
7620 
7621 
7622 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JDK_VARIANT" >&5
7623 $as_echo "$JDK_VARIANT" >&6; }
7624 
7625 
7626 
7627 ###############################################################################
7628 #
7629 # Check which variants of the JVM that we want to build.
7630 # Currently we have:
7631 #    server: normal interpreter and a tiered C1/C2 compiler
7632 #    client: normal interpreter and C1 (no C2 compiler) (only 32-bit platforms)
7633 #    minimal1: reduced form of client with optional VM services and features stripped out
7634 #    kernel: kernel footprint JVM that passes the TCK without major performance problems,
7635 #             ie normal interpreter and C1, only the serial GC, kernel jvmti etc
7636 #    zero: no machine code interpreter, no compiler
7637 #    zeroshark: zero interpreter and shark/llvm compiler backend
7638 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variants of the JVM to build" >&5
7639 $as_echo_n "checking which variants of the JVM to build... " >&6; }
7640 
7641 # Check whether --with-jvm-variants was given.
7642 if test "${with_jvm_variants+set}" = set; then :
7643   withval=$with_jvm_variants;
7644 fi
7645 
7646 
7647 if test "x$with_jvm_variants" = x; then
7648      with_jvm_variants="server"
7649 fi
7650 
7651 JVM_VARIANTS=",$with_jvm_variants,"
7652 TEST_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/server,//' -e 's/client,//'  -e 's/minimal1,//' -e 's/kernel,//' -e 's/zero,//' -e 's/zeroshark,//'`
7653 
7654 if test "x$TEST_VARIANTS" != "x,"; then
7655    as_fn_error $? "The available JVM variants are: server, client, minimal1, kernel, zero, zeroshark" "$LINENO" 5
7656 fi
7657 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_jvm_variants" >&5
7658 $as_echo "$with_jvm_variants" >&6; }
7659 
7660 JVM_VARIANT_SERVER=`$ECHO "$JVM_VARIANTS" | $SED -e '/,server,/!s/.*/false/g' -e '/,server,/s/.*/true/g'`
7661 JVM_VARIANT_CLIENT=`$ECHO "$JVM_VARIANTS" | $SED -e '/,client,/!s/.*/false/g' -e '/,client,/s/.*/true/g'`
7662 JVM_VARIANT_MINIMAL1=`$ECHO "$JVM_VARIANTS" | $SED -e '/,minimal1,/!s/.*/false/g' -e '/,minimal1,/s/.*/true/g'`
7663 JVM_VARIANT_KERNEL=`$ECHO "$JVM_VARIANTS" | $SED -e '/,kernel,/!s/.*/false/g' -e '/,kernel,/s/.*/true/g'`
7664 JVM_VARIANT_ZERO=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zero,/!s/.*/false/g' -e '/,zero,/s/.*/true/g'`
7665 JVM_VARIANT_ZEROSHARK=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zeroshark,/!s/.*/false/g' -e '/,zeroshark,/s/.*/true/g'`
7666 
7667 if test "x$JVM_VARIANT_CLIENT" = xtrue; then
7668     if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
7669         as_fn_error $? "You cannot build a client JVM for a 64-bit machine." "$LINENO" 5
7670     fi
7671 fi
7672 if test "x$JVM_VARIANT_KERNEL" = xtrue; then
7673     if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
7674         as_fn_error $? "You cannot build a kernel JVM for a 64-bit machine." "$LINENO" 5
7675     fi
7676 fi
7677 if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
7678     if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
7679         as_fn_error $? "You cannot build a minimal JVM for a 64-bit machine." "$LINENO" 5
7680     fi
7681 fi
7682 
7683 # Replace the commas with AND for use in the build directory name.
7684 ANDED_JVM_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/^,//' -e 's/,$//' -e 's/,/AND/'`
7685 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/'`
7686 if test "x$COUNT_VARIANTS" != "x,1"; then
7687     BUILDING_MULTIPLE_JVM_VARIANTS=yes
7688 else
7689     BUILDING_MULTIPLE_JVM_VARIANTS=no
7690 fi
7691 
7692 
7693 
7694 
7695 
7696 
7697 
7698 
7699 
7700 if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
7701    MACOSX_UNIVERSAL="true"
7702 fi
7703 
7704 
7705 
7706 
7707 
7708 ###############################################################################
7709 #
7710 # Set the debug level
7711 #    release: no debug information, all optimizations, no asserts.
7712 #    fastdebug: debug information (-g), all optimizations, all asserts
7713 #    slowdebug: debug information (-g), no optimizations, all asserts
7714 #
7715 DEBUG_LEVEL="release"
7716 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which debug level to use" >&5
7717 $as_echo_n "checking which debug level to use... " >&6; }
7718 # Check whether --enable-debug was given.
7719 if test "${enable_debug+set}" = set; then :
7720   enableval=$enable_debug;
7721         ENABLE_DEBUG="${enableval}"
7722         DEBUG_LEVEL="fastdebug"
7723 
7724 else
7725   ENABLE_DEBUG="no"
7726 fi
7727 
7728 
7729 
7730 # Check whether --with-debug-level was given.
7731 if test "${with_debug_level+set}" = set; then :
7732   withval=$with_debug_level;
7733         DEBUG_LEVEL="${withval}"
7734         if test "x$ENABLE_DEBUG" = xyes; then
7735                         as_fn_error $? "You cannot use both --enable-debug and --with-debug-level at the same time." "$LINENO" 5
7736         fi
7737 
7738 fi
7739 
7740 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEBUG_LEVEL" >&5
7741 $as_echo "$DEBUG_LEVEL" >&6; }
7742 
7743 if test "x$DEBUG_LEVEL" != xrelease && \
7744    test "x$DEBUG_LEVEL" != xfastdebug && \
7745    test "x$DEBUG_LEVEL" != xslowdebug; then
7746    as_fn_error $? "Allowed debug levels are: release, fastdebug and slowdebug" "$LINENO" 5
7747 fi
7748 
7749 
7750 ###############################################################################
7751 #
7752 # Setup legacy vars/targets and new vars to deal with different debug levels.
7753 #
7754 
7755 case $DEBUG_LEVEL in
7756       release )
7757           VARIANT="OPT"
7758           FASTDEBUG="false"
7759           DEBUG_CLASSFILES="false"
7760           BUILD_VARIANT_RELEASE=""
7761           HOTSPOT_DEBUG_LEVEL="product"
7762           HOTSPOT_EXPORT="product"
7763            ;;
7764       fastdebug )
7765           VARIANT="DBG"
7766           FASTDEBUG="true"
7767           DEBUG_CLASSFILES="true"
7768           BUILD_VARIANT_RELEASE="-fastdebug"
7769           HOTSPOT_DEBUG_LEVEL="fastdebug"
7770           HOTSPOT_EXPORT="fastdebug"
7771            ;;
7772       slowdebug )
7773           VARIANT="DBG"
7774           FASTDEBUG="false"
7775           DEBUG_CLASSFILES="true"
7776           BUILD_VARIANT_RELEASE="-debug"
7777           HOTSPOT_DEBUG_LEVEL="jvmg"
7778           HOTSPOT_EXPORT="debug"
7779            ;;
7780 esac
7781 
7782 #####
7783 # Generate the legacy makefile targets for hotspot.
7784 # The hotspot api for selecting the build artifacts, really, needs to be improved.
7785 # JDK-7195896 will fix this on the hotspot side by using the JVM_VARIANT_* variables to
7786 # determine what needs to be built. All we will need to set here is all_product, all_fastdebug etc
7787 # But until then ...
7788 HOTSPOT_TARGET=""
7789 
7790 if test "x$JVM_VARIANT_SERVER" = xtrue; then
7791     HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL} "
7792 fi
7793 
7794 if test "x$JVM_VARIANT_CLIENT" = xtrue; then
7795     HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}1 "
7796 fi
7797 
7798 if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
7799     HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}minimal1 "
7800 fi
7801 
7802 if test "x$JVM_VARIANT_KERNEL" = xtrue; then
7803     HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}kernel "
7804 fi
7805 
7806 if test "x$JVM_VARIANT_ZERO" = xtrue; then
7807     HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}zero "
7808 fi
7809 
7810 if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
7811     HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}shark "
7812 fi
7813 
7814 HOTSPOT_TARGET="$HOTSPOT_TARGET docs export_$HOTSPOT_EXPORT"
7815 
7816 # On Macosx universal binaries are produced, but they only contain
7817 # 64 bit intel. This invalidates control of which jvms are built
7818 # from configure, but only server is valid anyway. Fix this
7819 # when hotspot makefiles are rewritten.
7820 if test "x$MACOSX_UNIVERSAL" = xtrue; then
7821     HOTSPOT_TARGET=universal_${HOTSPOT_EXPORT}
7822 fi
7823 
7824 #####
7825 
7826 
7827 
7828 
7829 
7830 
7831 
7832 
7833 # With basic setup done, call the custom early hook.
7834 
7835 
7836 # To properly create a configuration name, we need to have the OpenJDK target
7837 # and options (variants and debug level) parsed.
7838 
7839 
7840 
7841 # Check whether --with-conf-name was given.
7842 if test "${with_conf_name+set}" = set; then :
7843   withval=$with_conf_name;  CONF_NAME=${with_conf_name}
7844 fi
7845 
7846 
7847 # Test from where we are running configure, in or outside of src root.
7848 # To enable comparison of directories, CURDIR needs to be symlink free
7849 # just like SRC_ROOT already is
7850 NOSYM_CURDIR="$CURDIR"
7851 
7852     if test "x$OPENJDK_BUILD_OS" != xwindows; then
7853         # Follow a chain of symbolic links. Use readlink
7854         # where it exists, else fall back to horribly
7855         # complicated shell code.
7856         if test "x$READLINK_TESTED" != yes; then
7857             # On MacOSX there is a readlink tool with a different
7858             # purpose than the GNU readlink tool. Check the found readlink.
7859             ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
7860             if test "x$ISGNU" = x; then
7861                  # A readlink that we do not know how to use.
7862                  # Are there other non-GNU readlinks out there?
7863                  READLINK_TESTED=yes
7864                  READLINK=
7865             fi
7866         fi
7867 
7868         if test "x$READLINK" != x; then
7869             NOSYM_CURDIR=`$READLINK -f $NOSYM_CURDIR`
7870         else
7871             # Save the current directory for restoring afterwards
7872             STARTDIR=$PWD
7873             COUNTER=0
7874             sym_link_dir=`$DIRNAME $NOSYM_CURDIR`
7875             sym_link_file=`$BASENAME $NOSYM_CURDIR`
7876             # Use the system pwd and not the shell builtin to resolve directory symlinks
7877             cd $sym_link_dir
7878             cd `$THEPWDCMD`
7879             sym_link_dir=`$THEPWDCMD`
7880             # Resolve file symlinks
7881             while test $COUNTER -lt 20; do
7882                 ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
7883                 if test "x$ISLINK" == x; then
7884                     # This is not a symbolic link! We are done!
7885                     break
7886                 fi
7887                 # Again resolve directory symlinks since the target of the just found
7888                 # link could be in a different directory
7889                 cd `$DIRNAME $ISLINK`
7890                 sym_link_dir=`$THEPWDCMD`
7891                 sym_link_file=`$BASENAME $ISLINK`
7892                 let COUNTER=COUNTER+1
7893             done
7894             cd $STARTDIR
7895             NOSYM_CURDIR=$sym_link_dir/$sym_link_file
7896         fi
7897     fi
7898 
7899 if test "x$NOSYM_CURDIR" = "x$SRC_ROOT" || test "x$NOSYM_CURDIR" = "x$SRC_ROOT/common" \
7900         || test "x$NOSYM_CURDIR" = "x$SRC_ROOT/common/autoconf" \
7901         || test "x$NOSYM_CURDIR" = "x$SRC_ROOT/common/makefiles" ; then
7902     # We are running configure from the src root.
7903     # Create a default ./build/target-variant-debuglevel output root.
7904     if test "x${CONF_NAME}" = x; then
7905         CONF_NAME="${OPENJDK_TARGET_OS}-${OPENJDK_TARGET_CPU}-${JDK_VARIANT}-${ANDED_JVM_VARIANTS}-${DEBUG_LEVEL}"
7906     fi
7907     OUTPUT_ROOT="$SRC_ROOT/build/${CONF_NAME}"
7908     $MKDIR -p "$OUTPUT_ROOT"
7909     if test ! -d "$OUTPUT_ROOT"; then
7910         as_fn_error $? "Could not create build directory $OUTPUT_ROOT" "$LINENO" 5
7911     fi
7912 else
7913     # We are running configure from outside of the src dir.
7914     # Then use the current directory as output dir!
7915     # If configuration is situated in normal build directory, just use the build
7916     # directory name as configuration name, otherwise use the complete path.
7917     if test "x${CONF_NAME}" = x; then
7918         CONF_NAME=`$ECHO $CURDIR | $SED -e "s!^${SRC_ROOT}/build/!!"`
7919     fi
7920     OUTPUT_ROOT="$CURDIR"
7921 
7922     # WARNING: This might be a bad thing to do. You need to be sure you want to
7923     # have a configuration in this directory. Do some sanity checks!
7924 
7925     if test ! -e "$OUTPUT_ROOT/spec.gmk"; then
7926       # If we have a spec.gmk, we have run here before and we are OK. Otherwise, check for
7927       # other files
7928       files_present=`$LS $OUTPUT_ROOT`
7929       # Configure has already touched config.log and confdefs.h in the current dir when this check
7930       # is performed.
7931       filtered_files=`$ECHO "$files_present" | $SED -e 's/config.log//g' -e 's/confdefs.h//g' -e 's/ //g' \
7932                                              | $TR -d '\n'`
7933       if test "x$filtered_files" != x; then
7934         { $as_echo "$as_me:${as_lineno-$LINENO}: Current directory is $CURDIR." >&5
7935 $as_echo "$as_me: Current directory is $CURDIR." >&6;}
7936         { $as_echo "$as_me:${as_lineno-$LINENO}: Since this is not the source root, configure will output the configuration here" >&5
7937 $as_echo "$as_me: Since this is not the source root, configure will output the configuration here" >&6;}
7938         { $as_echo "$as_me:${as_lineno-$LINENO}: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&5
7939 $as_echo "$as_me: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&6;}
7940         { $as_echo "$as_me:${as_lineno-$LINENO}: However, this directory is not empty. This is not allowed, since it could" >&5
7941 $as_echo "$as_me: However, this directory is not empty. This is not allowed, since it could" >&6;}
7942         { $as_echo "$as_me:${as_lineno-$LINENO}: seriously mess up just about everything." >&5
7943 $as_echo "$as_me: seriously mess up just about everything." >&6;}
7944         { $as_echo "$as_me:${as_lineno-$LINENO}: Try 'cd $SRC_ROOT' and restart configure" >&5
7945 $as_echo "$as_me: Try 'cd $SRC_ROOT' and restart configure" >&6;}
7946         { $as_echo "$as_me:${as_lineno-$LINENO}: (or create a new empty directory and cd to it)." >&5
7947 $as_echo "$as_me: (or create a new empty directory and cd to it)." >&6;}
7948         as_fn_error $? "Will not continue creating configuration in $CURDIR" "$LINENO" 5
7949       fi
7950     fi
7951 fi
7952 { $as_echo "$as_me:${as_lineno-$LINENO}: checking what configuration name to use" >&5
7953 $as_echo_n "checking what configuration name to use... " >&6; }
7954 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CONF_NAME" >&5
7955 $as_echo "$CONF_NAME" >&6; }
7956 
7957 
7958   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7959 
7960   # Input might be given as Windows format, start by converting to
7961   # unix format.
7962   path="$OUTPUT_ROOT"
7963   new_path=`$CYGPATH -u "$path"`
7964 
7965   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
7966   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
7967   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
7968   # "foo.exe" is OK but "foo" is an error.
7969   #
7970   # This test is therefore slightly more accurate than "test -f" to check for file precense.
7971   # It is also a way to make sure we got the proper file name for the real test later on.
7972   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
7973   if test "x$test_shortpath" = x; then
7974     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
7975 $as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
7976     as_fn_error $? "Cannot locate the the path of OUTPUT_ROOT" "$LINENO" 5
7977   fi
7978 
7979   # Call helper function which possibly converts this using DOS-style short mode.
7980   # If so, the updated path is stored in $new_path.
7981 
7982   input_path="$new_path"
7983   # Check if we need to convert this using DOS-style short mode. If the path
7984   # contains just simple characters, use it. Otherwise (spaces, weird characters),
7985   # take no chances and rewrite it.
7986   # Note: m4 eats our [], so we need to use [ and ] instead.
7987   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
7988   if test "x$has_forbidden_chars" != x; then
7989     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7990     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
7991     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
7992     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
7993       # Going to short mode and back again did indeed matter. Since short mode is
7994       # case insensitive, let's make it lowercase to improve readability.
7995       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7996       # Now convert it back to Unix-stile (cygpath)
7997       input_path=`$CYGPATH -u "$shortmode_path"`
7998       new_path="$input_path"
7999     fi
8000   fi
8001 
8002   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
8003   if test "x$test_cygdrive_prefix" = x; then
8004     # As a simple fix, exclude /usr/bin since it's not a real path.
8005     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
8006       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
8007       # a path prefixed by /cygdrive for fixpath to work.
8008       new_path="$CYGWIN_ROOT_PATH$input_path"
8009     fi
8010   fi
8011 
8012 
8013   if test "x$path" != "x$new_path"; then
8014     OUTPUT_ROOT="$new_path"
8015     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
8016 $as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
8017   fi
8018 
8019   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8020 
8021   path="$OUTPUT_ROOT"
8022   has_colon=`$ECHO $path | $GREP ^.:`
8023   new_path="$path"
8024   if test "x$has_colon" = x; then
8025     # Not in mixed or Windows style, start by that.
8026     new_path=`cmd //c echo $path`
8027   fi
8028 
8029 
8030   input_path="$new_path"
8031   # Check if we need to convert this using DOS-style short mode. If the path
8032   # contains just simple characters, use it. Otherwise (spaces, weird characters),
8033   # take no chances and rewrite it.
8034   # Note: m4 eats our [], so we need to use [ and ] instead.
8035   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
8036   if test "x$has_forbidden_chars" != x; then
8037     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8038     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8039   fi
8040 
8041 
8042   windows_path="$new_path"
8043   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8044     unix_path=`$CYGPATH -u "$windows_path"`
8045     new_path="$unix_path"
8046   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8047     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8048     new_path="$unix_path"
8049   fi
8050 
8051   if test "x$path" != "x$new_path"; then
8052     OUTPUT_ROOT="$new_path"
8053     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
8054 $as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
8055   fi
8056 
8057   # Save the first 10 bytes of this path to the storage, so fixpath can work.
8058   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
8059 
8060   else
8061     # We're on a posix platform. Hooray! :)
8062     path="$OUTPUT_ROOT"
8063 
8064     if test ! -f "$path" && test ! -d "$path"; then
8065       as_fn_error $? "The path of OUTPUT_ROOT, which resolves as \"$path\", is not found." "$LINENO" 5
8066     fi
8067 
8068     has_space=`$ECHO "$path" | $GREP " "`
8069     if test "x$has_space" != x; then
8070       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
8071 $as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
8072       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
8073     fi
8074   fi
8075 
8076 
8077 SPEC=$OUTPUT_ROOT/spec.gmk
8078 
8079 CONF_NAME=$CONF_NAME
8080 
8081 OUTPUT_ROOT=$OUTPUT_ROOT
8082 
8083 
8084 # Most of the probed defines are put into config.h
8085 ac_config_headers="$ac_config_headers $OUTPUT_ROOT/config.h:$AUTOCONF_DIR/config.h.in"
8086 
8087 # The spec.gmk file contains all variables for the make system.
8088 ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in"
8089 
8090 # The hotspot-spec.gmk file contains legacy variables for the hotspot make system.
8091 ac_config_files="$ac_config_files $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in"
8092 
8093 # The bootcycle-spec.gmk file contains support for boot cycle builds.
8094 ac_config_files="$ac_config_files $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in"
8095 
8096 # The compare.sh is used to compare the build output to other builds.
8097 ac_config_files="$ac_config_files $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in"
8098 
8099 # Spec.sh is currently used by compare-objects.sh
8100 ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.sh:$AUTOCONF_DIR/spec.sh.in"
8101 
8102 # The generated Makefile knows where the spec.gmk is and where the source is.
8103 # You can run make from the OUTPUT_ROOT, or from the top-level Makefile
8104 # which will look for generated configurations
8105 ac_config_files="$ac_config_files $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in"
8106 
8107 
8108 # Save the arguments given to us
8109 echo "$CONFIGURE_COMMAND_LINE" > $OUTPUT_ROOT/configure-arguments
8110 
8111 
8112 # Must be done before we can call HELP_MSG_MISSING_DEPENDENCY.
8113 
8114     for ac_prog in apt-get yum port pkgutil pkgadd
8115 do
8116   # Extract the first word of "$ac_prog", so it can be a program name with args.
8117 set dummy $ac_prog; ac_word=$2
8118 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8119 $as_echo_n "checking for $ac_word... " >&6; }
8120 if ${ac_cv_prog_PKGHANDLER+:} false; then :
8121   $as_echo_n "(cached) " >&6
8122 else
8123   if test -n "$PKGHANDLER"; then
8124   ac_cv_prog_PKGHANDLER="$PKGHANDLER" # Let the user override the test.
8125 else
8126 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8127 for as_dir in $PATH
8128 do
8129   IFS=$as_save_IFS
8130   test -z "$as_dir" && as_dir=.
8131     for ac_exec_ext in '' $ac_executable_extensions; do
8132   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8133     ac_cv_prog_PKGHANDLER="$ac_prog"
8134     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8135     break 2
8136   fi
8137 done
8138   done
8139 IFS=$as_save_IFS
8140 
8141 fi
8142 fi
8143 PKGHANDLER=$ac_cv_prog_PKGHANDLER
8144 if test -n "$PKGHANDLER"; then
8145   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKGHANDLER" >&5
8146 $as_echo "$PKGHANDLER" >&6; }
8147 else
8148   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8149 $as_echo "no" >&6; }
8150 fi
8151 
8152 
8153   test -n "$PKGHANDLER" && break
8154 done
8155 
8156 
8157 
8158 # Setup tools that requires more complex handling, or that is not needed by the configure script.
8159 
8160 
8161   # We need to find a recent version of GNU make. Especially on Solaris, this can be tricky.
8162   if test "x$MAKE" != x; then
8163     # User has supplied a make, test it.
8164     if test ! -f "$MAKE"; then
8165       as_fn_error $? "The specified make (by MAKE=$MAKE) is not found." "$LINENO" 5
8166     fi
8167 
8168   MAKE_CANDIDATE=""$MAKE""
8169   DESCRIPTION="user supplied MAKE=$MAKE"
8170   if test "x$MAKE_CANDIDATE" != x; then
8171     { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
8172 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
8173     MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
8174     IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
8175     if test "x$IS_GNU_MAKE" = x; then
8176       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
8177 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
8178     else
8179       IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'`
8180       if test "x$IS_MODERN_MAKE" = x; then
8181         { $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
8182 $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;}
8183       else
8184         if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
8185           if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8186             MAKE_EXPECTED_ENV='cygwin'
8187           elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8188             MAKE_EXPECTED_ENV='msys'
8189           else
8190             as_fn_error $? "Unknown Windows environment" "$LINENO" 5
8191           fi
8192           MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
8193           IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
8194         else
8195           # Not relevant for non-Windows
8196           IS_MAKE_CORRECT_ENV=true
8197         fi
8198         if test "x$IS_MAKE_CORRECT_ENV" = x; then
8199           { $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
8200 $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;}
8201         else
8202           FOUND_MAKE=$MAKE_CANDIDATE
8203 
8204   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8205 
8206   # First separate the path from the arguments. This will split at the first
8207   # space.
8208   complete="$FOUND_MAKE"
8209   path="${complete%% *}"
8210   tmp="$complete EOL"
8211   arguments="${tmp#* }"
8212 
8213   # Input might be given as Windows format, start by converting to
8214   # unix format.
8215   new_path=`$CYGPATH -u "$path"`
8216 
8217   # Now try to locate executable using which
8218   new_path=`$WHICH "$new_path" 2> /dev/null`
8219   # bat and cmd files are not always considered executable in cygwin causing which
8220   # to not find them
8221   if test "x$new_path" = x \
8222            && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8223            && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8224     new_path=`$CYGPATH -u "$path"`
8225   fi
8226   if test "x$new_path" = x; then
8227     # Oops. Which didn't find the executable.
8228     # The splitting of arguments from the executable at a space might have been incorrect,
8229     # since paths with space are more likely in Windows. Give it another try with the whole
8230     # argument.
8231     path="$complete"
8232     arguments="EOL"
8233     new_path=`$CYGPATH -u "$path"`
8234     new_path=`$WHICH "$new_path" 2> /dev/null`
8235     # bat and cmd files are not always considered executable in cygwin causing which
8236     # to not find them
8237     if test "x$new_path" = x \
8238              && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8239              && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8240       new_path=`$CYGPATH -u "$path"`
8241     fi
8242     if test "x$new_path" = x; then
8243       # It's still not found. Now this is an unrecoverable error.
8244       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8245 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8246       has_space=`$ECHO "$complete" | $GREP " "`
8247       if test "x$has_space" != x; then
8248         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8249 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8250       fi
8251       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8252     fi
8253   fi
8254 
8255   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
8256   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
8257   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
8258   # "foo.exe" is OK but "foo" is an error.
8259   #
8260   # This test is therefore slightly more accurate than "test -f" to check for file precense.
8261   # It is also a way to make sure we got the proper file name for the real test later on.
8262   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
8263   if test "x$test_shortpath" = x; then
8264     # Short path failed, file does not exist as specified.
8265     # Try adding .exe or .cmd
8266     if test -f "${new_path}.exe"; then
8267        input_to_shortpath="${new_path}.exe"
8268     elif test -f "${new_path}.cmd"; then
8269        input_to_shortpath="${new_path}.cmd"
8270     else
8271       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
8272 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
8273       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
8274 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
8275       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8276     fi
8277   else
8278     input_to_shortpath="$new_path"
8279   fi
8280 
8281   # Call helper function which possibly converts this using DOS-style short mode.
8282   # If so, the updated path is stored in $new_path.
8283   new_path="$input_to_shortpath"
8284 
8285   input_path="$input_to_shortpath"
8286   # Check if we need to convert this using DOS-style short mode. If the path
8287   # contains just simple characters, use it. Otherwise (spaces, weird characters),
8288   # take no chances and rewrite it.
8289   # Note: m4 eats our [], so we need to use [ and ] instead.
8290   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
8291   if test "x$has_forbidden_chars" != x; then
8292     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8293     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
8294     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
8295     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
8296       # Going to short mode and back again did indeed matter. Since short mode is
8297       # case insensitive, let's make it lowercase to improve readability.
8298       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8299       # Now convert it back to Unix-stile (cygpath)
8300       input_path=`$CYGPATH -u "$shortmode_path"`
8301       new_path="$input_path"
8302     fi
8303   fi
8304 
8305   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
8306   if test "x$test_cygdrive_prefix" = x; then
8307     # As a simple fix, exclude /usr/bin since it's not a real path.
8308     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
8309       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
8310       # a path prefixed by /cygdrive for fixpath to work.
8311       new_path="$CYGWIN_ROOT_PATH$input_path"
8312     fi
8313   fi
8314 
8315   # remove trailing .exe if any
8316   new_path="${new_path/%.exe/}"
8317 
8318   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8319 
8320   # First separate the path from the arguments. This will split at the first
8321   # space.
8322   complete="$FOUND_MAKE"
8323   path="${complete%% *}"
8324   tmp="$complete EOL"
8325   arguments="${tmp#* }"
8326 
8327   # Input might be given as Windows format, start by converting to
8328   # unix format.
8329   new_path="$path"
8330 
8331   windows_path="$new_path"
8332   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8333     unix_path=`$CYGPATH -u "$windows_path"`
8334     new_path="$unix_path"
8335   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8336     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8337     new_path="$unix_path"
8338   fi
8339 
8340 
8341   # Now try to locate executable using which
8342   new_path=`$WHICH "$new_path" 2> /dev/null`
8343 
8344   if test "x$new_path" = x; then
8345     # Oops. Which didn't find the executable.
8346     # The splitting of arguments from the executable at a space might have been incorrect,
8347     # since paths with space are more likely in Windows. Give it another try with the whole
8348     # argument.
8349     path="$complete"
8350     arguments="EOL"
8351     new_path="$path"
8352 
8353   windows_path="$new_path"
8354   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8355     unix_path=`$CYGPATH -u "$windows_path"`
8356     new_path="$unix_path"
8357   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8358     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8359     new_path="$unix_path"
8360   fi
8361 
8362 
8363     new_path=`$WHICH "$new_path" 2> /dev/null`
8364 
8365     if test "x$new_path" = x; then
8366       # It's still not found. Now this is an unrecoverable error.
8367       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8368 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8369       has_space=`$ECHO "$complete" | $GREP " "`
8370       if test "x$has_space" != x; then
8371         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8372 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8373       fi
8374       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8375     fi
8376   fi
8377 
8378   # Now new_path has a complete unix path to the binary
8379   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
8380     # Keep paths in /bin as-is, but remove trailing .exe if any
8381     new_path="${new_path/%.exe/}"
8382     # Do not save /bin paths to all_fixpath_prefixes!
8383   else
8384     # Not in mixed or Windows style, start by that.
8385     new_path=`cmd //c echo $new_path`
8386 
8387   input_path="$new_path"
8388   # Check if we need to convert this using DOS-style short mode. If the path
8389   # contains just simple characters, use it. Otherwise (spaces, weird characters),
8390   # take no chances and rewrite it.
8391   # Note: m4 eats our [], so we need to use [ and ] instead.
8392   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
8393   if test "x$has_forbidden_chars" != x; then
8394     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8395     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8396   fi
8397 
8398     # Output is in $new_path
8399 
8400   windows_path="$new_path"
8401   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8402     unix_path=`$CYGPATH -u "$windows_path"`
8403     new_path="$unix_path"
8404   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8405     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8406     new_path="$unix_path"
8407   fi
8408 
8409     # remove trailing .exe if any
8410     new_path="${new_path/%.exe/}"
8411 
8412     # Save the first 10 bytes of this path to the storage, so fixpath can work.
8413     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
8414   fi
8415 
8416   else
8417     # We're on a posix platform. Hooray! :)
8418     # First separate the path from the arguments. This will split at the first
8419     # space.
8420     complete="$FOUND_MAKE"
8421     path="${complete%% *}"
8422     tmp="$complete EOL"
8423     arguments="${tmp#* }"
8424 
8425     # Cannot rely on the command "which" here since it doesn't always work.
8426     is_absolute_path=`$ECHO "$path" | $GREP ^/`
8427     if test -z "$is_absolute_path"; then
8428       # Path to executable is not absolute. Find it.
8429       IFS_save="$IFS"
8430       IFS=:
8431       for p in $PATH; do
8432         if test -f "$p/$path" && test -x "$p/$path"; then
8433           new_path="$p/$path"
8434           break
8435         fi
8436       done
8437       IFS="$IFS_save"
8438     else
8439       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
8440 $as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
8441       new_path="$path"
8442     fi
8443 
8444     if test "x$new_path" = x; then
8445         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8446 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8447         has_space=`$ECHO "$complete" | $GREP " "`
8448         if test "x$has_space" != x; then
8449           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
8450 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
8451         fi
8452         as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8453       fi
8454   fi
8455 
8456       # Now join together the path and the arguments once again
8457       if test "x$arguments" != xEOL; then
8458         new_complete="$new_path ${arguments% *}"
8459       else
8460         new_complete="$new_path"
8461       fi
8462 
8463   if test "x$complete" != "x$new_complete"; then
8464       FOUND_MAKE="$new_complete"
8465       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
8466 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
8467     fi
8468 
8469         fi
8470       fi
8471     fi
8472   fi
8473 
8474     if test "x$FOUND_MAKE" = x; then
8475       as_fn_error $? "The specified make (by MAKE=$MAKE) is not GNU make 3.81 or newer." "$LINENO" 5
8476     fi
8477   else
8478     # Try our hardest to locate a correct version of GNU make
8479     for ac_prog in gmake
8480 do
8481   # Extract the first word of "$ac_prog", so it can be a program name with args.
8482 set dummy $ac_prog; ac_word=$2
8483 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8484 $as_echo_n "checking for $ac_word... " >&6; }
8485 if ${ac_cv_path_CHECK_GMAKE+:} false; then :
8486   $as_echo_n "(cached) " >&6
8487 else
8488   case $CHECK_GMAKE in
8489   [\\/]* | ?:[\\/]*)
8490   ac_cv_path_CHECK_GMAKE="$CHECK_GMAKE" # Let the user override the test with a path.
8491   ;;
8492   *)
8493   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8494 for as_dir in $PATH
8495 do
8496   IFS=$as_save_IFS
8497   test -z "$as_dir" && as_dir=.
8498     for ac_exec_ext in '' $ac_executable_extensions; do
8499   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8500     ac_cv_path_CHECK_GMAKE="$as_dir/$ac_word$ac_exec_ext"
8501     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8502     break 2
8503   fi
8504 done
8505   done
8506 IFS=$as_save_IFS
8507 
8508   ;;
8509 esac
8510 fi
8511 CHECK_GMAKE=$ac_cv_path_CHECK_GMAKE
8512 if test -n "$CHECK_GMAKE"; then
8513   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_GMAKE" >&5
8514 $as_echo "$CHECK_GMAKE" >&6; }
8515 else
8516   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8517 $as_echo "no" >&6; }
8518 fi
8519 
8520 
8521   test -n "$CHECK_GMAKE" && break
8522 done
8523 
8524 
8525   MAKE_CANDIDATE=""$CHECK_GMAKE""
8526   DESCRIPTION="gmake in PATH"
8527   if test "x$MAKE_CANDIDATE" != x; then
8528     { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
8529 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
8530     MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
8531     IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
8532     if test "x$IS_GNU_MAKE" = x; then
8533       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
8534 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
8535     else
8536       IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'`
8537       if test "x$IS_MODERN_MAKE" = x; then
8538         { $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
8539 $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;}
8540       else
8541         if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
8542           if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8543             MAKE_EXPECTED_ENV='cygwin'
8544           elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8545             MAKE_EXPECTED_ENV='msys'
8546           else
8547             as_fn_error $? "Unknown Windows environment" "$LINENO" 5
8548           fi
8549           MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
8550           IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
8551         else
8552           # Not relevant for non-Windows
8553           IS_MAKE_CORRECT_ENV=true
8554         fi
8555         if test "x$IS_MAKE_CORRECT_ENV" = x; then
8556           { $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
8557 $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;}
8558         else
8559           FOUND_MAKE=$MAKE_CANDIDATE
8560 
8561   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8562 
8563   # First separate the path from the arguments. This will split at the first
8564   # space.
8565   complete="$FOUND_MAKE"
8566   path="${complete%% *}"
8567   tmp="$complete EOL"
8568   arguments="${tmp#* }"
8569 
8570   # Input might be given as Windows format, start by converting to
8571   # unix format.
8572   new_path=`$CYGPATH -u "$path"`
8573 
8574   # Now try to locate executable using which
8575   new_path=`$WHICH "$new_path" 2> /dev/null`
8576   # bat and cmd files are not always considered executable in cygwin causing which
8577   # to not find them
8578   if test "x$new_path" = x \
8579            && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8580            && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8581     new_path=`$CYGPATH -u "$path"`
8582   fi
8583   if test "x$new_path" = x; then
8584     # Oops. Which didn't find the executable.
8585     # The splitting of arguments from the executable at a space might have been incorrect,
8586     # since paths with space are more likely in Windows. Give it another try with the whole
8587     # argument.
8588     path="$complete"
8589     arguments="EOL"
8590     new_path=`$CYGPATH -u "$path"`
8591     new_path=`$WHICH "$new_path" 2> /dev/null`
8592     # bat and cmd files are not always considered executable in cygwin causing which
8593     # to not find them
8594     if test "x$new_path" = x \
8595              && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8596              && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8597       new_path=`$CYGPATH -u "$path"`
8598     fi
8599     if test "x$new_path" = x; then
8600       # It's still not found. Now this is an unrecoverable error.
8601       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8602 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8603       has_space=`$ECHO "$complete" | $GREP " "`
8604       if test "x$has_space" != x; then
8605         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8606 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8607       fi
8608       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8609     fi
8610   fi
8611 
8612   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
8613   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
8614   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
8615   # "foo.exe" is OK but "foo" is an error.
8616   #
8617   # This test is therefore slightly more accurate than "test -f" to check for file precense.
8618   # It is also a way to make sure we got the proper file name for the real test later on.
8619   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
8620   if test "x$test_shortpath" = x; then
8621     # Short path failed, file does not exist as specified.
8622     # Try adding .exe or .cmd
8623     if test -f "${new_path}.exe"; then
8624        input_to_shortpath="${new_path}.exe"
8625     elif test -f "${new_path}.cmd"; then
8626        input_to_shortpath="${new_path}.cmd"
8627     else
8628       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
8629 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
8630       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
8631 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
8632       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8633     fi
8634   else
8635     input_to_shortpath="$new_path"
8636   fi
8637 
8638   # Call helper function which possibly converts this using DOS-style short mode.
8639   # If so, the updated path is stored in $new_path.
8640   new_path="$input_to_shortpath"
8641 
8642   input_path="$input_to_shortpath"
8643   # Check if we need to convert this using DOS-style short mode. If the path
8644   # contains just simple characters, use it. Otherwise (spaces, weird characters),
8645   # take no chances and rewrite it.
8646   # Note: m4 eats our [], so we need to use [ and ] instead.
8647   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
8648   if test "x$has_forbidden_chars" != x; then
8649     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8650     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
8651     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
8652     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
8653       # Going to short mode and back again did indeed matter. Since short mode is
8654       # case insensitive, let's make it lowercase to improve readability.
8655       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8656       # Now convert it back to Unix-stile (cygpath)
8657       input_path=`$CYGPATH -u "$shortmode_path"`
8658       new_path="$input_path"
8659     fi
8660   fi
8661 
8662   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
8663   if test "x$test_cygdrive_prefix" = x; then
8664     # As a simple fix, exclude /usr/bin since it's not a real path.
8665     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
8666       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
8667       # a path prefixed by /cygdrive for fixpath to work.
8668       new_path="$CYGWIN_ROOT_PATH$input_path"
8669     fi
8670   fi
8671 
8672   # remove trailing .exe if any
8673   new_path="${new_path/%.exe/}"
8674 
8675   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8676 
8677   # First separate the path from the arguments. This will split at the first
8678   # space.
8679   complete="$FOUND_MAKE"
8680   path="${complete%% *}"
8681   tmp="$complete EOL"
8682   arguments="${tmp#* }"
8683 
8684   # Input might be given as Windows format, start by converting to
8685   # unix format.
8686   new_path="$path"
8687 
8688   windows_path="$new_path"
8689   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8690     unix_path=`$CYGPATH -u "$windows_path"`
8691     new_path="$unix_path"
8692   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8693     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8694     new_path="$unix_path"
8695   fi
8696 
8697 
8698   # Now try to locate executable using which
8699   new_path=`$WHICH "$new_path" 2> /dev/null`
8700 
8701   if test "x$new_path" = x; then
8702     # Oops. Which didn't find the executable.
8703     # The splitting of arguments from the executable at a space might have been incorrect,
8704     # since paths with space are more likely in Windows. Give it another try with the whole
8705     # argument.
8706     path="$complete"
8707     arguments="EOL"
8708     new_path="$path"
8709 
8710   windows_path="$new_path"
8711   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8712     unix_path=`$CYGPATH -u "$windows_path"`
8713     new_path="$unix_path"
8714   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8715     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8716     new_path="$unix_path"
8717   fi
8718 
8719 
8720     new_path=`$WHICH "$new_path" 2> /dev/null`
8721 
8722     if test "x$new_path" = x; then
8723       # It's still not found. Now this is an unrecoverable error.
8724       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8725 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8726       has_space=`$ECHO "$complete" | $GREP " "`
8727       if test "x$has_space" != x; then
8728         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8729 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8730       fi
8731       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8732     fi
8733   fi
8734 
8735   # Now new_path has a complete unix path to the binary
8736   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
8737     # Keep paths in /bin as-is, but remove trailing .exe if any
8738     new_path="${new_path/%.exe/}"
8739     # Do not save /bin paths to all_fixpath_prefixes!
8740   else
8741     # Not in mixed or Windows style, start by that.
8742     new_path=`cmd //c echo $new_path`
8743 
8744   input_path="$new_path"
8745   # Check if we need to convert this using DOS-style short mode. If the path
8746   # contains just simple characters, use it. Otherwise (spaces, weird characters),
8747   # take no chances and rewrite it.
8748   # Note: m4 eats our [], so we need to use [ and ] instead.
8749   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
8750   if test "x$has_forbidden_chars" != x; then
8751     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8752     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8753   fi
8754 
8755     # Output is in $new_path
8756 
8757   windows_path="$new_path"
8758   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8759     unix_path=`$CYGPATH -u "$windows_path"`
8760     new_path="$unix_path"
8761   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8762     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8763     new_path="$unix_path"
8764   fi
8765 
8766     # remove trailing .exe if any
8767     new_path="${new_path/%.exe/}"
8768 
8769     # Save the first 10 bytes of this path to the storage, so fixpath can work.
8770     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
8771   fi
8772 
8773   else
8774     # We're on a posix platform. Hooray! :)
8775     # First separate the path from the arguments. This will split at the first
8776     # space.
8777     complete="$FOUND_MAKE"
8778     path="${complete%% *}"
8779     tmp="$complete EOL"
8780     arguments="${tmp#* }"
8781 
8782     # Cannot rely on the command "which" here since it doesn't always work.
8783     is_absolute_path=`$ECHO "$path" | $GREP ^/`
8784     if test -z "$is_absolute_path"; then
8785       # Path to executable is not absolute. Find it.
8786       IFS_save="$IFS"
8787       IFS=:
8788       for p in $PATH; do
8789         if test -f "$p/$path" && test -x "$p/$path"; then
8790           new_path="$p/$path"
8791           break
8792         fi
8793       done
8794       IFS="$IFS_save"
8795     else
8796       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
8797 $as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
8798       new_path="$path"
8799     fi
8800 
8801     if test "x$new_path" = x; then
8802         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8803 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8804         has_space=`$ECHO "$complete" | $GREP " "`
8805         if test "x$has_space" != x; then
8806           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
8807 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
8808         fi
8809         as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8810       fi
8811   fi
8812 
8813       # Now join together the path and the arguments once again
8814       if test "x$arguments" != xEOL; then
8815         new_complete="$new_path ${arguments% *}"
8816       else
8817         new_complete="$new_path"
8818       fi
8819 
8820   if test "x$complete" != "x$new_complete"; then
8821       FOUND_MAKE="$new_complete"
8822       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
8823 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
8824     fi
8825 
8826         fi
8827       fi
8828     fi
8829   fi
8830 
8831 
8832     if test "x$FOUND_MAKE" = x; then
8833       for ac_prog in make
8834 do
8835   # Extract the first word of "$ac_prog", so it can be a program name with args.
8836 set dummy $ac_prog; ac_word=$2
8837 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8838 $as_echo_n "checking for $ac_word... " >&6; }
8839 if ${ac_cv_path_CHECK_MAKE+:} false; then :
8840   $as_echo_n "(cached) " >&6
8841 else
8842   case $CHECK_MAKE in
8843   [\\/]* | ?:[\\/]*)
8844   ac_cv_path_CHECK_MAKE="$CHECK_MAKE" # Let the user override the test with a path.
8845   ;;
8846   *)
8847   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8848 for as_dir in $PATH
8849 do
8850   IFS=$as_save_IFS
8851   test -z "$as_dir" && as_dir=.
8852     for ac_exec_ext in '' $ac_executable_extensions; do
8853   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8854     ac_cv_path_CHECK_MAKE="$as_dir/$ac_word$ac_exec_ext"
8855     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8856     break 2
8857   fi
8858 done
8859   done
8860 IFS=$as_save_IFS
8861 
8862   ;;
8863 esac
8864 fi
8865 CHECK_MAKE=$ac_cv_path_CHECK_MAKE
8866 if test -n "$CHECK_MAKE"; then
8867   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_MAKE" >&5
8868 $as_echo "$CHECK_MAKE" >&6; }
8869 else
8870   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8871 $as_echo "no" >&6; }
8872 fi
8873 
8874 
8875   test -n "$CHECK_MAKE" && break
8876 done
8877 
8878 
8879   MAKE_CANDIDATE=""$CHECK_MAKE""
8880   DESCRIPTION="make in PATH"
8881   if test "x$MAKE_CANDIDATE" != x; then
8882     { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
8883 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
8884     MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
8885     IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
8886     if test "x$IS_GNU_MAKE" = x; then
8887       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
8888 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
8889     else
8890       IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'`
8891       if test "x$IS_MODERN_MAKE" = x; then
8892         { $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
8893 $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;}
8894       else
8895         if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
8896           if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8897             MAKE_EXPECTED_ENV='cygwin'
8898           elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8899             MAKE_EXPECTED_ENV='msys'
8900           else
8901             as_fn_error $? "Unknown Windows environment" "$LINENO" 5
8902           fi
8903           MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
8904           IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
8905         else
8906           # Not relevant for non-Windows
8907           IS_MAKE_CORRECT_ENV=true
8908         fi
8909         if test "x$IS_MAKE_CORRECT_ENV" = x; then
8910           { $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
8911 $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;}
8912         else
8913           FOUND_MAKE=$MAKE_CANDIDATE
8914 
8915   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8916 
8917   # First separate the path from the arguments. This will split at the first
8918   # space.
8919   complete="$FOUND_MAKE"
8920   path="${complete%% *}"
8921   tmp="$complete EOL"
8922   arguments="${tmp#* }"
8923 
8924   # Input might be given as Windows format, start by converting to
8925   # unix format.
8926   new_path=`$CYGPATH -u "$path"`
8927 
8928   # Now try to locate executable using which
8929   new_path=`$WHICH "$new_path" 2> /dev/null`
8930   # bat and cmd files are not always considered executable in cygwin causing which
8931   # to not find them
8932   if test "x$new_path" = x \
8933            && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8934            && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8935     new_path=`$CYGPATH -u "$path"`
8936   fi
8937   if test "x$new_path" = x; then
8938     # Oops. Which didn't find the executable.
8939     # The splitting of arguments from the executable at a space might have been incorrect,
8940     # since paths with space are more likely in Windows. Give it another try with the whole
8941     # argument.
8942     path="$complete"
8943     arguments="EOL"
8944     new_path=`$CYGPATH -u "$path"`
8945     new_path=`$WHICH "$new_path" 2> /dev/null`
8946     # bat and cmd files are not always considered executable in cygwin causing which
8947     # to not find them
8948     if test "x$new_path" = x \
8949              && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8950              && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8951       new_path=`$CYGPATH -u "$path"`
8952     fi
8953     if test "x$new_path" = x; then
8954       # It's still not found. Now this is an unrecoverable error.
8955       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8956 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8957       has_space=`$ECHO "$complete" | $GREP " "`
8958       if test "x$has_space" != x; then
8959         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8960 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8961       fi
8962       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8963     fi
8964   fi
8965 
8966   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
8967   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
8968   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
8969   # "foo.exe" is OK but "foo" is an error.
8970   #
8971   # This test is therefore slightly more accurate than "test -f" to check for file precense.
8972   # It is also a way to make sure we got the proper file name for the real test later on.
8973   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
8974   if test "x$test_shortpath" = x; then
8975     # Short path failed, file does not exist as specified.
8976     # Try adding .exe or .cmd
8977     if test -f "${new_path}.exe"; then
8978        input_to_shortpath="${new_path}.exe"
8979     elif test -f "${new_path}.cmd"; then
8980        input_to_shortpath="${new_path}.cmd"
8981     else
8982       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
8983 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
8984       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
8985 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
8986       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8987     fi
8988   else
8989     input_to_shortpath="$new_path"
8990   fi
8991 
8992   # Call helper function which possibly converts this using DOS-style short mode.
8993   # If so, the updated path is stored in $new_path.
8994   new_path="$input_to_shortpath"
8995 
8996   input_path="$input_to_shortpath"
8997   # Check if we need to convert this using DOS-style short mode. If the path
8998   # contains just simple characters, use it. Otherwise (spaces, weird characters),
8999   # take no chances and rewrite it.
9000   # Note: m4 eats our [], so we need to use [ and ] instead.
9001   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
9002   if test "x$has_forbidden_chars" != x; then
9003     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9004     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
9005     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
9006     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
9007       # Going to short mode and back again did indeed matter. Since short mode is
9008       # case insensitive, let's make it lowercase to improve readability.
9009       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9010       # Now convert it back to Unix-stile (cygpath)
9011       input_path=`$CYGPATH -u "$shortmode_path"`
9012       new_path="$input_path"
9013     fi
9014   fi
9015 
9016   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
9017   if test "x$test_cygdrive_prefix" = x; then
9018     # As a simple fix, exclude /usr/bin since it's not a real path.
9019     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
9020       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
9021       # a path prefixed by /cygdrive for fixpath to work.
9022       new_path="$CYGWIN_ROOT_PATH$input_path"
9023     fi
9024   fi
9025 
9026   # remove trailing .exe if any
9027   new_path="${new_path/%.exe/}"
9028 
9029   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9030 
9031   # First separate the path from the arguments. This will split at the first
9032   # space.
9033   complete="$FOUND_MAKE"
9034   path="${complete%% *}"
9035   tmp="$complete EOL"
9036   arguments="${tmp#* }"
9037 
9038   # Input might be given as Windows format, start by converting to
9039   # unix format.
9040   new_path="$path"
9041 
9042   windows_path="$new_path"
9043   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9044     unix_path=`$CYGPATH -u "$windows_path"`
9045     new_path="$unix_path"
9046   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9047     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9048     new_path="$unix_path"
9049   fi
9050 
9051 
9052   # Now try to locate executable using which
9053   new_path=`$WHICH "$new_path" 2> /dev/null`
9054 
9055   if test "x$new_path" = x; then
9056     # Oops. Which didn't find the executable.
9057     # The splitting of arguments from the executable at a space might have been incorrect,
9058     # since paths with space are more likely in Windows. Give it another try with the whole
9059     # argument.
9060     path="$complete"
9061     arguments="EOL"
9062     new_path="$path"
9063 
9064   windows_path="$new_path"
9065   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9066     unix_path=`$CYGPATH -u "$windows_path"`
9067     new_path="$unix_path"
9068   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9069     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9070     new_path="$unix_path"
9071   fi
9072 
9073 
9074     new_path=`$WHICH "$new_path" 2> /dev/null`
9075 
9076     if test "x$new_path" = x; then
9077       # It's still not found. Now this is an unrecoverable error.
9078       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9079 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9080       has_space=`$ECHO "$complete" | $GREP " "`
9081       if test "x$has_space" != x; then
9082         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9083 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9084       fi
9085       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9086     fi
9087   fi
9088 
9089   # Now new_path has a complete unix path to the binary
9090   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
9091     # Keep paths in /bin as-is, but remove trailing .exe if any
9092     new_path="${new_path/%.exe/}"
9093     # Do not save /bin paths to all_fixpath_prefixes!
9094   else
9095     # Not in mixed or Windows style, start by that.
9096     new_path=`cmd //c echo $new_path`
9097 
9098   input_path="$new_path"
9099   # Check if we need to convert this using DOS-style short mode. If the path
9100   # contains just simple characters, use it. Otherwise (spaces, weird characters),
9101   # take no chances and rewrite it.
9102   # Note: m4 eats our [], so we need to use [ and ] instead.
9103   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
9104   if test "x$has_forbidden_chars" != x; then
9105     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9106     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9107   fi
9108 
9109     # Output is in $new_path
9110 
9111   windows_path="$new_path"
9112   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9113     unix_path=`$CYGPATH -u "$windows_path"`
9114     new_path="$unix_path"
9115   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9116     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9117     new_path="$unix_path"
9118   fi
9119 
9120     # remove trailing .exe if any
9121     new_path="${new_path/%.exe/}"
9122 
9123     # Save the first 10 bytes of this path to the storage, so fixpath can work.
9124     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
9125   fi
9126 
9127   else
9128     # We're on a posix platform. Hooray! :)
9129     # First separate the path from the arguments. This will split at the first
9130     # space.
9131     complete="$FOUND_MAKE"
9132     path="${complete%% *}"
9133     tmp="$complete EOL"
9134     arguments="${tmp#* }"
9135 
9136     # Cannot rely on the command "which" here since it doesn't always work.
9137     is_absolute_path=`$ECHO "$path" | $GREP ^/`
9138     if test -z "$is_absolute_path"; then
9139       # Path to executable is not absolute. Find it.
9140       IFS_save="$IFS"
9141       IFS=:
9142       for p in $PATH; do
9143         if test -f "$p/$path" && test -x "$p/$path"; then
9144           new_path="$p/$path"
9145           break
9146         fi
9147       done
9148       IFS="$IFS_save"
9149     else
9150       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
9151 $as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
9152       new_path="$path"
9153     fi
9154 
9155     if test "x$new_path" = x; then
9156         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9157 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9158         has_space=`$ECHO "$complete" | $GREP " "`
9159         if test "x$has_space" != x; then
9160           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
9161 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
9162         fi
9163         as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9164       fi
9165   fi
9166 
9167       # Now join together the path and the arguments once again
9168       if test "x$arguments" != xEOL; then
9169         new_complete="$new_path ${arguments% *}"
9170       else
9171         new_complete="$new_path"
9172       fi
9173 
9174   if test "x$complete" != "x$new_complete"; then
9175       FOUND_MAKE="$new_complete"
9176       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
9177 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
9178     fi
9179 
9180         fi
9181       fi
9182     fi
9183   fi
9184 
9185     fi
9186 
9187     if test "x$FOUND_MAKE" = x; then
9188       if test "x$TOOLS_DIR" != x; then
9189         # We have a tools-dir, check that as well before giving up.
9190         OLD_PATH=$PATH
9191         PATH=$TOOLS_DIR:$PATH
9192         for ac_prog in gmake
9193 do
9194   # Extract the first word of "$ac_prog", so it can be a program name with args.
9195 set dummy $ac_prog; ac_word=$2
9196 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9197 $as_echo_n "checking for $ac_word... " >&6; }
9198 if ${ac_cv_path_CHECK_TOOLSDIR_GMAKE+:} false; then :
9199   $as_echo_n "(cached) " >&6
9200 else
9201   case $CHECK_TOOLSDIR_GMAKE in
9202   [\\/]* | ?:[\\/]*)
9203   ac_cv_path_CHECK_TOOLSDIR_GMAKE="$CHECK_TOOLSDIR_GMAKE" # Let the user override the test with a path.
9204   ;;
9205   *)
9206   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9207 for as_dir in $PATH
9208 do
9209   IFS=$as_save_IFS
9210   test -z "$as_dir" && as_dir=.
9211     for ac_exec_ext in '' $ac_executable_extensions; do
9212   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9213     ac_cv_path_CHECK_TOOLSDIR_GMAKE="$as_dir/$ac_word$ac_exec_ext"
9214     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9215     break 2
9216   fi
9217 done
9218   done
9219 IFS=$as_save_IFS
9220 
9221   ;;
9222 esac
9223 fi
9224 CHECK_TOOLSDIR_GMAKE=$ac_cv_path_CHECK_TOOLSDIR_GMAKE
9225 if test -n "$CHECK_TOOLSDIR_GMAKE"; then
9226   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_GMAKE" >&5
9227 $as_echo "$CHECK_TOOLSDIR_GMAKE" >&6; }
9228 else
9229   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9230 $as_echo "no" >&6; }
9231 fi
9232 
9233 
9234   test -n "$CHECK_TOOLSDIR_GMAKE" && break
9235 done
9236 
9237 
9238   MAKE_CANDIDATE=""$CHECK_TOOLSDIR_GMAKE""
9239   DESCRIPTION="gmake in tools-dir"
9240   if test "x$MAKE_CANDIDATE" != x; then
9241     { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
9242 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
9243     MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
9244     IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
9245     if test "x$IS_GNU_MAKE" = x; then
9246       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
9247 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
9248     else
9249       IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'`
9250       if test "x$IS_MODERN_MAKE" = x; then
9251         { $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
9252 $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;}
9253       else
9254         if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
9255           if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9256             MAKE_EXPECTED_ENV='cygwin'
9257           elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9258             MAKE_EXPECTED_ENV='msys'
9259           else
9260             as_fn_error $? "Unknown Windows environment" "$LINENO" 5
9261           fi
9262           MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
9263           IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
9264         else
9265           # Not relevant for non-Windows
9266           IS_MAKE_CORRECT_ENV=true
9267         fi
9268         if test "x$IS_MAKE_CORRECT_ENV" = x; then
9269           { $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
9270 $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;}
9271         else
9272           FOUND_MAKE=$MAKE_CANDIDATE
9273 
9274   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9275 
9276   # First separate the path from the arguments. This will split at the first
9277   # space.
9278   complete="$FOUND_MAKE"
9279   path="${complete%% *}"
9280   tmp="$complete EOL"
9281   arguments="${tmp#* }"
9282 
9283   # Input might be given as Windows format, start by converting to
9284   # unix format.
9285   new_path=`$CYGPATH -u "$path"`
9286 
9287   # Now try to locate executable using which
9288   new_path=`$WHICH "$new_path" 2> /dev/null`
9289   # bat and cmd files are not always considered executable in cygwin causing which
9290   # to not find them
9291   if test "x$new_path" = x \
9292            && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
9293            && test "x`$LS \"$path\" 2>/dev/null`" != x; then
9294     new_path=`$CYGPATH -u "$path"`
9295   fi
9296   if test "x$new_path" = x; then
9297     # Oops. Which didn't find the executable.
9298     # The splitting of arguments from the executable at a space might have been incorrect,
9299     # since paths with space are more likely in Windows. Give it another try with the whole
9300     # argument.
9301     path="$complete"
9302     arguments="EOL"
9303     new_path=`$CYGPATH -u "$path"`
9304     new_path=`$WHICH "$new_path" 2> /dev/null`
9305     # bat and cmd files are not always considered executable in cygwin causing which
9306     # to not find them
9307     if test "x$new_path" = x \
9308              && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
9309              && test "x`$LS \"$path\" 2>/dev/null`" != x; then
9310       new_path=`$CYGPATH -u "$path"`
9311     fi
9312     if test "x$new_path" = x; then
9313       # It's still not found. Now this is an unrecoverable error.
9314       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9315 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9316       has_space=`$ECHO "$complete" | $GREP " "`
9317       if test "x$has_space" != x; then
9318         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9319 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9320       fi
9321       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9322     fi
9323   fi
9324 
9325   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
9326   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
9327   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
9328   # "foo.exe" is OK but "foo" is an error.
9329   #
9330   # This test is therefore slightly more accurate than "test -f" to check for file precense.
9331   # It is also a way to make sure we got the proper file name for the real test later on.
9332   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
9333   if test "x$test_shortpath" = x; then
9334     # Short path failed, file does not exist as specified.
9335     # Try adding .exe or .cmd
9336     if test -f "${new_path}.exe"; then
9337        input_to_shortpath="${new_path}.exe"
9338     elif test -f "${new_path}.cmd"; then
9339        input_to_shortpath="${new_path}.cmd"
9340     else
9341       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
9342 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
9343       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
9344 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
9345       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9346     fi
9347   else
9348     input_to_shortpath="$new_path"
9349   fi
9350 
9351   # Call helper function which possibly converts this using DOS-style short mode.
9352   # If so, the updated path is stored in $new_path.
9353   new_path="$input_to_shortpath"
9354 
9355   input_path="$input_to_shortpath"
9356   # Check if we need to convert this using DOS-style short mode. If the path
9357   # contains just simple characters, use it. Otherwise (spaces, weird characters),
9358   # take no chances and rewrite it.
9359   # Note: m4 eats our [], so we need to use [ and ] instead.
9360   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
9361   if test "x$has_forbidden_chars" != x; then
9362     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9363     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
9364     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
9365     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
9366       # Going to short mode and back again did indeed matter. Since short mode is
9367       # case insensitive, let's make it lowercase to improve readability.
9368       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9369       # Now convert it back to Unix-stile (cygpath)
9370       input_path=`$CYGPATH -u "$shortmode_path"`
9371       new_path="$input_path"
9372     fi
9373   fi
9374 
9375   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
9376   if test "x$test_cygdrive_prefix" = x; then
9377     # As a simple fix, exclude /usr/bin since it's not a real path.
9378     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
9379       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
9380       # a path prefixed by /cygdrive for fixpath to work.
9381       new_path="$CYGWIN_ROOT_PATH$input_path"
9382     fi
9383   fi
9384 
9385   # remove trailing .exe if any
9386   new_path="${new_path/%.exe/}"
9387 
9388   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9389 
9390   # First separate the path from the arguments. This will split at the first
9391   # space.
9392   complete="$FOUND_MAKE"
9393   path="${complete%% *}"
9394   tmp="$complete EOL"
9395   arguments="${tmp#* }"
9396 
9397   # Input might be given as Windows format, start by converting to
9398   # unix format.
9399   new_path="$path"
9400 
9401   windows_path="$new_path"
9402   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9403     unix_path=`$CYGPATH -u "$windows_path"`
9404     new_path="$unix_path"
9405   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9406     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9407     new_path="$unix_path"
9408   fi
9409 
9410 
9411   # Now try to locate executable using which
9412   new_path=`$WHICH "$new_path" 2> /dev/null`
9413 
9414   if test "x$new_path" = x; then
9415     # Oops. Which didn't find the executable.
9416     # The splitting of arguments from the executable at a space might have been incorrect,
9417     # since paths with space are more likely in Windows. Give it another try with the whole
9418     # argument.
9419     path="$complete"
9420     arguments="EOL"
9421     new_path="$path"
9422 
9423   windows_path="$new_path"
9424   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9425     unix_path=`$CYGPATH -u "$windows_path"`
9426     new_path="$unix_path"
9427   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9428     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9429     new_path="$unix_path"
9430   fi
9431 
9432 
9433     new_path=`$WHICH "$new_path" 2> /dev/null`
9434 
9435     if test "x$new_path" = x; then
9436       # It's still not found. Now this is an unrecoverable error.
9437       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9438 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9439       has_space=`$ECHO "$complete" | $GREP " "`
9440       if test "x$has_space" != x; then
9441         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9442 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9443       fi
9444       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9445     fi
9446   fi
9447 
9448   # Now new_path has a complete unix path to the binary
9449   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
9450     # Keep paths in /bin as-is, but remove trailing .exe if any
9451     new_path="${new_path/%.exe/}"
9452     # Do not save /bin paths to all_fixpath_prefixes!
9453   else
9454     # Not in mixed or Windows style, start by that.
9455     new_path=`cmd //c echo $new_path`
9456 
9457   input_path="$new_path"
9458   # Check if we need to convert this using DOS-style short mode. If the path
9459   # contains just simple characters, use it. Otherwise (spaces, weird characters),
9460   # take no chances and rewrite it.
9461   # Note: m4 eats our [], so we need to use [ and ] instead.
9462   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
9463   if test "x$has_forbidden_chars" != x; then
9464     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9465     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9466   fi
9467 
9468     # Output is in $new_path
9469 
9470   windows_path="$new_path"
9471   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9472     unix_path=`$CYGPATH -u "$windows_path"`
9473     new_path="$unix_path"
9474   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9475     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9476     new_path="$unix_path"
9477   fi
9478 
9479     # remove trailing .exe if any
9480     new_path="${new_path/%.exe/}"
9481 
9482     # Save the first 10 bytes of this path to the storage, so fixpath can work.
9483     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
9484   fi
9485 
9486   else
9487     # We're on a posix platform. Hooray! :)
9488     # First separate the path from the arguments. This will split at the first
9489     # space.
9490     complete="$FOUND_MAKE"
9491     path="${complete%% *}"
9492     tmp="$complete EOL"
9493     arguments="${tmp#* }"
9494 
9495     # Cannot rely on the command "which" here since it doesn't always work.
9496     is_absolute_path=`$ECHO "$path" | $GREP ^/`
9497     if test -z "$is_absolute_path"; then
9498       # Path to executable is not absolute. Find it.
9499       IFS_save="$IFS"
9500       IFS=:
9501       for p in $PATH; do
9502         if test -f "$p/$path" && test -x "$p/$path"; then
9503           new_path="$p/$path"
9504           break
9505         fi
9506       done
9507       IFS="$IFS_save"
9508     else
9509       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
9510 $as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
9511       new_path="$path"
9512     fi
9513 
9514     if test "x$new_path" = x; then
9515         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9516 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9517         has_space=`$ECHO "$complete" | $GREP " "`
9518         if test "x$has_space" != x; then
9519           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
9520 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
9521         fi
9522         as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9523       fi
9524   fi
9525 
9526       # Now join together the path and the arguments once again
9527       if test "x$arguments" != xEOL; then
9528         new_complete="$new_path ${arguments% *}"
9529       else
9530         new_complete="$new_path"
9531       fi
9532 
9533   if test "x$complete" != "x$new_complete"; then
9534       FOUND_MAKE="$new_complete"
9535       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
9536 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
9537     fi
9538 
9539         fi
9540       fi
9541     fi
9542   fi
9543 
9544         if test "x$FOUND_MAKE" = x; then
9545           for ac_prog in make
9546 do
9547   # Extract the first word of "$ac_prog", so it can be a program name with args.
9548 set dummy $ac_prog; ac_word=$2
9549 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9550 $as_echo_n "checking for $ac_word... " >&6; }
9551 if ${ac_cv_path_CHECK_TOOLSDIR_MAKE+:} false; then :
9552   $as_echo_n "(cached) " >&6
9553 else
9554   case $CHECK_TOOLSDIR_MAKE in
9555   [\\/]* | ?:[\\/]*)
9556   ac_cv_path_CHECK_TOOLSDIR_MAKE="$CHECK_TOOLSDIR_MAKE" # Let the user override the test with a path.
9557   ;;
9558   *)
9559   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9560 for as_dir in $PATH
9561 do
9562   IFS=$as_save_IFS
9563   test -z "$as_dir" && as_dir=.
9564     for ac_exec_ext in '' $ac_executable_extensions; do
9565   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9566     ac_cv_path_CHECK_TOOLSDIR_MAKE="$as_dir/$ac_word$ac_exec_ext"
9567     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9568     break 2
9569   fi
9570 done
9571   done
9572 IFS=$as_save_IFS
9573 
9574   ;;
9575 esac
9576 fi
9577 CHECK_TOOLSDIR_MAKE=$ac_cv_path_CHECK_TOOLSDIR_MAKE
9578 if test -n "$CHECK_TOOLSDIR_MAKE"; then
9579   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_MAKE" >&5
9580 $as_echo "$CHECK_TOOLSDIR_MAKE" >&6; }
9581 else
9582   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9583 $as_echo "no" >&6; }
9584 fi
9585 
9586 
9587   test -n "$CHECK_TOOLSDIR_MAKE" && break
9588 done
9589 
9590 
9591   MAKE_CANDIDATE=""$CHECK_TOOLSDIR_MAKE""
9592   DESCRIPTION="make in tools-dir"
9593   if test "x$MAKE_CANDIDATE" != x; then
9594     { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
9595 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
9596     MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
9597     IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
9598     if test "x$IS_GNU_MAKE" = x; then
9599       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
9600 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
9601     else
9602       IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'`
9603       if test "x$IS_MODERN_MAKE" = x; then
9604         { $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
9605 $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;}
9606       else
9607         if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
9608           if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9609             MAKE_EXPECTED_ENV='cygwin'
9610           elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9611             MAKE_EXPECTED_ENV='msys'
9612           else
9613             as_fn_error $? "Unknown Windows environment" "$LINENO" 5
9614           fi
9615           MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
9616           IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
9617         else
9618           # Not relevant for non-Windows
9619           IS_MAKE_CORRECT_ENV=true
9620         fi
9621         if test "x$IS_MAKE_CORRECT_ENV" = x; then
9622           { $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
9623 $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;}
9624         else
9625           FOUND_MAKE=$MAKE_CANDIDATE
9626 
9627   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9628 
9629   # First separate the path from the arguments. This will split at the first
9630   # space.
9631   complete="$FOUND_MAKE"
9632   path="${complete%% *}"
9633   tmp="$complete EOL"
9634   arguments="${tmp#* }"
9635 
9636   # Input might be given as Windows format, start by converting to
9637   # unix format.
9638   new_path=`$CYGPATH -u "$path"`
9639 
9640   # Now try to locate executable using which
9641   new_path=`$WHICH "$new_path" 2> /dev/null`
9642   # bat and cmd files are not always considered executable in cygwin causing which
9643   # to not find them
9644   if test "x$new_path" = x \
9645            && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
9646            && test "x`$LS \"$path\" 2>/dev/null`" != x; then
9647     new_path=`$CYGPATH -u "$path"`
9648   fi
9649   if test "x$new_path" = x; then
9650     # Oops. Which didn't find the executable.
9651     # The splitting of arguments from the executable at a space might have been incorrect,
9652     # since paths with space are more likely in Windows. Give it another try with the whole
9653     # argument.
9654     path="$complete"
9655     arguments="EOL"
9656     new_path=`$CYGPATH -u "$path"`
9657     new_path=`$WHICH "$new_path" 2> /dev/null`
9658     # bat and cmd files are not always considered executable in cygwin causing which
9659     # to not find them
9660     if test "x$new_path" = x \
9661              && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
9662              && test "x`$LS \"$path\" 2>/dev/null`" != x; then
9663       new_path=`$CYGPATH -u "$path"`
9664     fi
9665     if test "x$new_path" = x; then
9666       # It's still not found. Now this is an unrecoverable error.
9667       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9668 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9669       has_space=`$ECHO "$complete" | $GREP " "`
9670       if test "x$has_space" != x; then
9671         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9672 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9673       fi
9674       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9675     fi
9676   fi
9677 
9678   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
9679   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
9680   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
9681   # "foo.exe" is OK but "foo" is an error.
9682   #
9683   # This test is therefore slightly more accurate than "test -f" to check for file precense.
9684   # It is also a way to make sure we got the proper file name for the real test later on.
9685   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
9686   if test "x$test_shortpath" = x; then
9687     # Short path failed, file does not exist as specified.
9688     # Try adding .exe or .cmd
9689     if test -f "${new_path}.exe"; then
9690        input_to_shortpath="${new_path}.exe"
9691     elif test -f "${new_path}.cmd"; then
9692        input_to_shortpath="${new_path}.cmd"
9693     else
9694       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
9695 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
9696       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
9697 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
9698       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9699     fi
9700   else
9701     input_to_shortpath="$new_path"
9702   fi
9703 
9704   # Call helper function which possibly converts this using DOS-style short mode.
9705   # If so, the updated path is stored in $new_path.
9706   new_path="$input_to_shortpath"
9707 
9708   input_path="$input_to_shortpath"
9709   # Check if we need to convert this using DOS-style short mode. If the path
9710   # contains just simple characters, use it. Otherwise (spaces, weird characters),
9711   # take no chances and rewrite it.
9712   # Note: m4 eats our [], so we need to use [ and ] instead.
9713   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
9714   if test "x$has_forbidden_chars" != x; then
9715     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9716     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
9717     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
9718     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
9719       # Going to short mode and back again did indeed matter. Since short mode is
9720       # case insensitive, let's make it lowercase to improve readability.
9721       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9722       # Now convert it back to Unix-stile (cygpath)
9723       input_path=`$CYGPATH -u "$shortmode_path"`
9724       new_path="$input_path"
9725     fi
9726   fi
9727 
9728   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
9729   if test "x$test_cygdrive_prefix" = x; then
9730     # As a simple fix, exclude /usr/bin since it's not a real path.
9731     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
9732       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
9733       # a path prefixed by /cygdrive for fixpath to work.
9734       new_path="$CYGWIN_ROOT_PATH$input_path"
9735     fi
9736   fi
9737 
9738   # remove trailing .exe if any
9739   new_path="${new_path/%.exe/}"
9740 
9741   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9742 
9743   # First separate the path from the arguments. This will split at the first
9744   # space.
9745   complete="$FOUND_MAKE"
9746   path="${complete%% *}"
9747   tmp="$complete EOL"
9748   arguments="${tmp#* }"
9749 
9750   # Input might be given as Windows format, start by converting to
9751   # unix format.
9752   new_path="$path"
9753 
9754   windows_path="$new_path"
9755   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9756     unix_path=`$CYGPATH -u "$windows_path"`
9757     new_path="$unix_path"
9758   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9759     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9760     new_path="$unix_path"
9761   fi
9762 
9763 
9764   # Now try to locate executable using which
9765   new_path=`$WHICH "$new_path" 2> /dev/null`
9766 
9767   if test "x$new_path" = x; then
9768     # Oops. Which didn't find the executable.
9769     # The splitting of arguments from the executable at a space might have been incorrect,
9770     # since paths with space are more likely in Windows. Give it another try with the whole
9771     # argument.
9772     path="$complete"
9773     arguments="EOL"
9774     new_path="$path"
9775 
9776   windows_path="$new_path"
9777   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9778     unix_path=`$CYGPATH -u "$windows_path"`
9779     new_path="$unix_path"
9780   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9781     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9782     new_path="$unix_path"
9783   fi
9784 
9785 
9786     new_path=`$WHICH "$new_path" 2> /dev/null`
9787 
9788     if test "x$new_path" = x; then
9789       # It's still not found. Now this is an unrecoverable error.
9790       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9791 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9792       has_space=`$ECHO "$complete" | $GREP " "`
9793       if test "x$has_space" != x; then
9794         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9795 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9796       fi
9797       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9798     fi
9799   fi
9800 
9801   # Now new_path has a complete unix path to the binary
9802   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
9803     # Keep paths in /bin as-is, but remove trailing .exe if any
9804     new_path="${new_path/%.exe/}"
9805     # Do not save /bin paths to all_fixpath_prefixes!
9806   else
9807     # Not in mixed or Windows style, start by that.
9808     new_path=`cmd //c echo $new_path`
9809 
9810   input_path="$new_path"
9811   # Check if we need to convert this using DOS-style short mode. If the path
9812   # contains just simple characters, use it. Otherwise (spaces, weird characters),
9813   # take no chances and rewrite it.
9814   # Note: m4 eats our [], so we need to use [ and ] instead.
9815   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
9816   if test "x$has_forbidden_chars" != x; then
9817     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9818     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9819   fi
9820 
9821     # Output is in $new_path
9822 
9823   windows_path="$new_path"
9824   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9825     unix_path=`$CYGPATH -u "$windows_path"`
9826     new_path="$unix_path"
9827   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9828     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9829     new_path="$unix_path"
9830   fi
9831 
9832     # remove trailing .exe if any
9833     new_path="${new_path/%.exe/}"
9834 
9835     # Save the first 10 bytes of this path to the storage, so fixpath can work.
9836     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
9837   fi
9838 
9839   else
9840     # We're on a posix platform. Hooray! :)
9841     # First separate the path from the arguments. This will split at the first
9842     # space.
9843     complete="$FOUND_MAKE"
9844     path="${complete%% *}"
9845     tmp="$complete EOL"
9846     arguments="${tmp#* }"
9847 
9848     # Cannot rely on the command "which" here since it doesn't always work.
9849     is_absolute_path=`$ECHO "$path" | $GREP ^/`
9850     if test -z "$is_absolute_path"; then
9851       # Path to executable is not absolute. Find it.
9852       IFS_save="$IFS"
9853       IFS=:
9854       for p in $PATH; do
9855         if test -f "$p/$path" && test -x "$p/$path"; then
9856           new_path="$p/$path"
9857           break
9858         fi
9859       done
9860       IFS="$IFS_save"
9861     else
9862       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
9863 $as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
9864       new_path="$path"
9865     fi
9866 
9867     if test "x$new_path" = x; then
9868         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9869 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9870         has_space=`$ECHO "$complete" | $GREP " "`
9871         if test "x$has_space" != x; then
9872           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
9873 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
9874         fi
9875         as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9876       fi
9877   fi
9878 
9879       # Now join together the path and the arguments once again
9880       if test "x$arguments" != xEOL; then
9881         new_complete="$new_path ${arguments% *}"
9882       else
9883         new_complete="$new_path"
9884       fi
9885 
9886   if test "x$complete" != "x$new_complete"; then
9887       FOUND_MAKE="$new_complete"
9888       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
9889 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
9890     fi
9891 
9892         fi
9893       fi
9894     fi
9895   fi
9896 
9897         fi
9898         PATH=$OLD_PATH
9899       fi
9900     fi
9901 
9902     if test "x$FOUND_MAKE" = x; then
9903       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
9904     fi
9905   fi
9906 
9907   MAKE=$FOUND_MAKE
9908 
9909   { $as_echo "$as_me:${as_lineno-$LINENO}: Using GNU make 3.81 (or later) at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&5
9910 $as_echo "$as_me: Using GNU make 3.81 (or later) at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&6;}
9911 
9912 
9913 
9914     # Test if find supports -delete
9915     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if find supports -delete" >&5
9916 $as_echo_n "checking if find supports -delete... " >&6; }
9917     FIND_DELETE="-delete"
9918 
9919     DELETEDIR=`$MKTEMP -d tmp.XXXXXXXXXX` || (echo Could not create temporary directory!; exit $?)
9920 
9921     echo Hejsan > $DELETEDIR/TestIfFindSupportsDelete
9922 
9923     TEST_DELETE=`$FIND "$DELETEDIR" -name TestIfFindSupportsDelete $FIND_DELETE 2>&1`
9924     if test -f $DELETEDIR/TestIfFindSupportsDelete; then
9925         # No, it does not.
9926         rm $DELETEDIR/TestIfFindSupportsDelete
9927         FIND_DELETE="-exec rm \{\} \+"
9928         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9929 $as_echo "no" >&6; }
9930     else
9931         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9932 $as_echo "yes" >&6; }
9933     fi
9934     rmdir $DELETEDIR
9935 
9936 
9937 
9938 # These tools might not be installed by default,
9939 # need hint on how to install them.
9940 
9941     for ac_prog in unzip
9942 do
9943   # Extract the first word of "$ac_prog", so it can be a program name with args.
9944 set dummy $ac_prog; ac_word=$2
9945 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9946 $as_echo_n "checking for $ac_word... " >&6; }
9947 if ${ac_cv_path_UNZIP+:} false; then :
9948   $as_echo_n "(cached) " >&6
9949 else
9950   case $UNZIP in
9951   [\\/]* | ?:[\\/]*)
9952   ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
9953   ;;
9954   *)
9955   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9956 for as_dir in $PATH
9957 do
9958   IFS=$as_save_IFS
9959   test -z "$as_dir" && as_dir=.
9960     for ac_exec_ext in '' $ac_executable_extensions; do
9961   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9962     ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
9963     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9964     break 2
9965   fi
9966 done
9967   done
9968 IFS=$as_save_IFS
9969 
9970   ;;
9971 esac
9972 fi
9973 UNZIP=$ac_cv_path_UNZIP
9974 if test -n "$UNZIP"; then
9975   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
9976 $as_echo "$UNZIP" >&6; }
9977 else
9978   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9979 $as_echo "no" >&6; }
9980 fi
9981 
9982 
9983   test -n "$UNZIP" && break
9984 done
9985 
9986 
9987     if test "x$UNZIP" = x; then
9988         if test "xunzip" = x; then
9989           PROG_NAME=unzip
9990         else
9991           PROG_NAME=unzip
9992         fi
9993         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
9994 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
9995         as_fn_error $? "Cannot continue" "$LINENO" 5
9996     fi
9997 
9998 
9999 
10000     for ac_prog in zip
10001 do
10002   # Extract the first word of "$ac_prog", so it can be a program name with args.
10003 set dummy $ac_prog; ac_word=$2
10004 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10005 $as_echo_n "checking for $ac_word... " >&6; }
10006 if ${ac_cv_path_ZIP+:} false; then :
10007   $as_echo_n "(cached) " >&6
10008 else
10009   case $ZIP in
10010   [\\/]* | ?:[\\/]*)
10011   ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
10012   ;;
10013   *)
10014   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10015 for as_dir in $PATH
10016 do
10017   IFS=$as_save_IFS
10018   test -z "$as_dir" && as_dir=.
10019     for ac_exec_ext in '' $ac_executable_extensions; do
10020   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10021     ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
10022     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10023     break 2
10024   fi
10025 done
10026   done
10027 IFS=$as_save_IFS
10028 
10029   ;;
10030 esac
10031 fi
10032 ZIP=$ac_cv_path_ZIP
10033 if test -n "$ZIP"; then
10034   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
10035 $as_echo "$ZIP" >&6; }
10036 else
10037   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10038 $as_echo "no" >&6; }
10039 fi
10040 
10041 
10042   test -n "$ZIP" && break
10043 done
10044 
10045 
10046     if test "x$ZIP" = x; then
10047         if test "xzip" = x; then
10048           PROG_NAME=zip
10049         else
10050           PROG_NAME=zip
10051         fi
10052         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
10053 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
10054         as_fn_error $? "Cannot continue" "$LINENO" 5
10055     fi
10056 
10057 
10058 
10059 # Non-required basic tools
10060 
10061 # Extract the first word of "ldd", so it can be a program name with args.
10062 set dummy ldd; ac_word=$2
10063 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10064 $as_echo_n "checking for $ac_word... " >&6; }
10065 if ${ac_cv_path_LDD+:} false; then :
10066   $as_echo_n "(cached) " >&6
10067 else
10068   case $LDD in
10069   [\\/]* | ?:[\\/]*)
10070   ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
10071   ;;
10072   *)
10073   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10074 for as_dir in $PATH
10075 do
10076   IFS=$as_save_IFS
10077   test -z "$as_dir" && as_dir=.
10078     for ac_exec_ext in '' $ac_executable_extensions; do
10079   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10080     ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
10081     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10082     break 2
10083   fi
10084 done
10085   done
10086 IFS=$as_save_IFS
10087 
10088   ;;
10089 esac
10090 fi
10091 LDD=$ac_cv_path_LDD
10092 if test -n "$LDD"; then
10093   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
10094 $as_echo "$LDD" >&6; }
10095 else
10096   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10097 $as_echo "no" >&6; }
10098 fi
10099 
10100 
10101 if test "x$LDD" = "x"; then
10102     # List shared lib dependencies is used for
10103     # debug output and checking for forbidden dependencies.
10104     # We can build without it.
10105     LDD="true"
10106 fi
10107 # Extract the first word of "otool", so it can be a program name with args.
10108 set dummy otool; ac_word=$2
10109 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10110 $as_echo_n "checking for $ac_word... " >&6; }
10111 if ${ac_cv_path_OTOOL+:} false; then :
10112   $as_echo_n "(cached) " >&6
10113 else
10114   case $OTOOL in
10115   [\\/]* | ?:[\\/]*)
10116   ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
10117   ;;
10118   *)
10119   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10120 for as_dir in $PATH
10121 do
10122   IFS=$as_save_IFS
10123   test -z "$as_dir" && as_dir=.
10124     for ac_exec_ext in '' $ac_executable_extensions; do
10125   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10126     ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
10127     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10128     break 2
10129   fi
10130 done
10131   done
10132 IFS=$as_save_IFS
10133 
10134   ;;
10135 esac
10136 fi
10137 OTOOL=$ac_cv_path_OTOOL
10138 if test -n "$OTOOL"; then
10139   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
10140 $as_echo "$OTOOL" >&6; }
10141 else
10142   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10143 $as_echo "no" >&6; }
10144 fi
10145 
10146 
10147 if test "x$OTOOL" = "x"; then
10148    OTOOL="true"
10149 fi
10150 for ac_prog in readelf greadelf
10151 do
10152   # Extract the first word of "$ac_prog", so it can be a program name with args.
10153 set dummy $ac_prog; ac_word=$2
10154 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10155 $as_echo_n "checking for $ac_word... " >&6; }
10156 if ${ac_cv_path_READELF+:} false; then :
10157   $as_echo_n "(cached) " >&6
10158 else
10159   case $READELF in
10160   [\\/]* | ?:[\\/]*)
10161   ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
10162   ;;
10163   *)
10164   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10165 for as_dir in $PATH
10166 do
10167   IFS=$as_save_IFS
10168   test -z "$as_dir" && as_dir=.
10169     for ac_exec_ext in '' $ac_executable_extensions; do
10170   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10171     ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
10172     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10173     break 2
10174   fi
10175 done
10176   done
10177 IFS=$as_save_IFS
10178 
10179   ;;
10180 esac
10181 fi
10182 READELF=$ac_cv_path_READELF
10183 if test -n "$READELF"; then
10184   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
10185 $as_echo "$READELF" >&6; }
10186 else
10187   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10188 $as_echo "no" >&6; }
10189 fi
10190 
10191 
10192   test -n "$READELF" && break
10193 done
10194 
10195 # Extract the first word of "hg", so it can be a program name with args.
10196 set dummy hg; ac_word=$2
10197 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10198 $as_echo_n "checking for $ac_word... " >&6; }
10199 if ${ac_cv_path_HG+:} false; then :
10200   $as_echo_n "(cached) " >&6
10201 else
10202   case $HG in
10203   [\\/]* | ?:[\\/]*)
10204   ac_cv_path_HG="$HG" # Let the user override the test with a path.
10205   ;;
10206   *)
10207   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10208 for as_dir in $PATH
10209 do
10210   IFS=$as_save_IFS
10211   test -z "$as_dir" && as_dir=.
10212     for ac_exec_ext in '' $ac_executable_extensions; do
10213   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10214     ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
10215     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10216     break 2
10217   fi
10218 done
10219   done
10220 IFS=$as_save_IFS
10221 
10222   ;;
10223 esac
10224 fi
10225 HG=$ac_cv_path_HG
10226 if test -n "$HG"; then
10227   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
10228 $as_echo "$HG" >&6; }
10229 else
10230   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10231 $as_echo "no" >&6; }
10232 fi
10233 
10234 
10235 # Extract the first word of "stat", so it can be a program name with args.
10236 set dummy stat; ac_word=$2
10237 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10238 $as_echo_n "checking for $ac_word... " >&6; }
10239 if ${ac_cv_path_STAT+:} false; then :
10240   $as_echo_n "(cached) " >&6
10241 else
10242   case $STAT in
10243   [\\/]* | ?:[\\/]*)
10244   ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
10245   ;;
10246   *)
10247   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10248 for as_dir in $PATH
10249 do
10250   IFS=$as_save_IFS
10251   test -z "$as_dir" && as_dir=.
10252     for ac_exec_ext in '' $ac_executable_extensions; do
10253   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10254     ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
10255     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10256     break 2
10257   fi
10258 done
10259   done
10260 IFS=$as_save_IFS
10261 
10262   ;;
10263 esac
10264 fi
10265 STAT=$ac_cv_path_STAT
10266 if test -n "$STAT"; then
10267   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
10268 $as_echo "$STAT" >&6; }
10269 else
10270   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10271 $as_echo "no" >&6; }
10272 fi
10273 
10274 
10275 # Extract the first word of "time", so it can be a program name with args.
10276 set dummy time; ac_word=$2
10277 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10278 $as_echo_n "checking for $ac_word... " >&6; }
10279 if ${ac_cv_path_TIME+:} false; then :
10280   $as_echo_n "(cached) " >&6
10281 else
10282   case $TIME in
10283   [\\/]* | ?:[\\/]*)
10284   ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
10285   ;;
10286   *)
10287   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10288 for as_dir in $PATH
10289 do
10290   IFS=$as_save_IFS
10291   test -z "$as_dir" && as_dir=.
10292     for ac_exec_ext in '' $ac_executable_extensions; do
10293   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10294     ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
10295     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10296     break 2
10297   fi
10298 done
10299   done
10300 IFS=$as_save_IFS
10301 
10302   ;;
10303 esac
10304 fi
10305 TIME=$ac_cv_path_TIME
10306 if test -n "$TIME"; then
10307   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
10308 $as_echo "$TIME" >&6; }
10309 else
10310   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10311 $as_echo "no" >&6; }
10312 fi
10313 
10314 
10315 
10316 if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
10317 
10318     for ac_prog in comm
10319 do
10320   # Extract the first word of "$ac_prog", so it can be a program name with args.
10321 set dummy $ac_prog; ac_word=$2
10322 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10323 $as_echo_n "checking for $ac_word... " >&6; }
10324 if ${ac_cv_path_COMM+:} false; then :
10325   $as_echo_n "(cached) " >&6
10326 else
10327   case $COMM in
10328   [\\/]* | ?:[\\/]*)
10329   ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
10330   ;;
10331   *)
10332   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10333 for as_dir in $PATH
10334 do
10335   IFS=$as_save_IFS
10336   test -z "$as_dir" && as_dir=.
10337     for ac_exec_ext in '' $ac_executable_extensions; do
10338   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10339     ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
10340     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10341     break 2
10342   fi
10343 done
10344   done
10345 IFS=$as_save_IFS
10346 
10347   ;;
10348 esac
10349 fi
10350 COMM=$ac_cv_path_COMM
10351 if test -n "$COMM"; then
10352   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
10353 $as_echo "$COMM" >&6; }
10354 else
10355   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10356 $as_echo "no" >&6; }
10357 fi
10358 
10359 
10360   test -n "$COMM" && break
10361 done
10362 
10363 
10364     if test "x$COMM" = x; then
10365         if test "xcomm" = x; then
10366           PROG_NAME=comm
10367         else
10368           PROG_NAME=comm
10369         fi
10370         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
10371 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
10372         as_fn_error $? "Cannot continue" "$LINENO" 5
10373     fi
10374 
10375 
10376 fi
10377 
10378 
10379 # Check if pkg-config is available.
10380 
10381 
10382 if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
10383         if test -n "$ac_tool_prefix"; then
10384   # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
10385 set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
10386 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10387 $as_echo_n "checking for $ac_word... " >&6; }
10388 if ${ac_cv_path_PKG_CONFIG+:} false; then :
10389   $as_echo_n "(cached) " >&6
10390 else
10391   case $PKG_CONFIG in
10392   [\\/]* | ?:[\\/]*)
10393   ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
10394   ;;
10395   *)
10396   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10397 for as_dir in $PATH
10398 do
10399   IFS=$as_save_IFS
10400   test -z "$as_dir" && as_dir=.
10401     for ac_exec_ext in '' $ac_executable_extensions; do
10402   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10403     ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
10404     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10405     break 2
10406   fi
10407 done
10408   done
10409 IFS=$as_save_IFS
10410 
10411   ;;
10412 esac
10413 fi
10414 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
10415 if test -n "$PKG_CONFIG"; then
10416   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
10417 $as_echo "$PKG_CONFIG" >&6; }
10418 else
10419   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10420 $as_echo "no" >&6; }
10421 fi
10422 
10423 
10424 fi
10425 if test -z "$ac_cv_path_PKG_CONFIG"; then
10426   ac_pt_PKG_CONFIG=$PKG_CONFIG
10427   # Extract the first word of "pkg-config", so it can be a program name with args.
10428 set dummy pkg-config; ac_word=$2
10429 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10430 $as_echo_n "checking for $ac_word... " >&6; }
10431 if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
10432   $as_echo_n "(cached) " >&6
10433 else
10434   case $ac_pt_PKG_CONFIG in
10435   [\\/]* | ?:[\\/]*)
10436   ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
10437   ;;
10438   *)
10439   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10440 for as_dir in $PATH
10441 do
10442   IFS=$as_save_IFS
10443   test -z "$as_dir" && as_dir=.
10444     for ac_exec_ext in '' $ac_executable_extensions; do
10445   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10446     ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
10447     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10448     break 2
10449   fi
10450 done
10451   done
10452 IFS=$as_save_IFS
10453 
10454   ;;
10455 esac
10456 fi
10457 ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
10458 if test -n "$ac_pt_PKG_CONFIG"; then
10459   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
10460 $as_echo "$ac_pt_PKG_CONFIG" >&6; }
10461 else
10462   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10463 $as_echo "no" >&6; }
10464 fi
10465 
10466   if test "x$ac_pt_PKG_CONFIG" = x; then
10467     PKG_CONFIG=""
10468   else
10469     case $cross_compiling:$ac_tool_warned in
10470 yes:)
10471 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
10472 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
10473 ac_tool_warned=yes ;;
10474 esac
10475     PKG_CONFIG=$ac_pt_PKG_CONFIG
10476   fi
10477 else
10478   PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
10479 fi
10480 
10481 fi
10482 if test -n "$PKG_CONFIG"; then
10483         _pkg_min_version=0.9.0
10484         { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
10485 $as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
10486         if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
10487                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10488 $as_echo "yes" >&6; }
10489         else
10490                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10491 $as_echo "no" >&6; }
10492                 PKG_CONFIG=""
10493         fi
10494 
10495 fi
10496 
10497 # After basic tools have been setup, we can check build os specific details.
10498 
10499 ###############################################################################
10500 
10501 # Note that this is the build platform OS version!
10502 
10503 OS_VERSION="`uname -r | ${SED} 's!\.! !g' | ${SED} 's!-! !g'`"
10504 OS_VERSION_MAJOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 1 -d ' '`"
10505 OS_VERSION_MINOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 2 -d ' '`"
10506 OS_VERSION_MICRO="`${ECHO} ${OS_VERSION} | ${CUT} -f 3 -d ' '`"
10507 
10508 
10509 
10510 
10511 
10512 # Setup builddeps, for automatic downloading of tools we need.
10513 # This is needed before we can call BDEPS_CHECK_MODULE, which is done in
10514 # boot-jdk setup, but we need to have basic tools setup first.
10515 
10516 
10517 # Check whether --with-builddeps-conf was given.
10518 if test "${with_builddeps_conf+set}" = set; then :
10519   withval=$with_builddeps_conf;
10520 fi
10521 
10522 
10523 
10524 # Check whether --with-builddeps-server was given.
10525 if test "${with_builddeps_server+set}" = set; then :
10526   withval=$with_builddeps_server;
10527 fi
10528 
10529 
10530 
10531 # Check whether --with-builddeps-dir was given.
10532 if test "${with_builddeps_dir+set}" = set; then :
10533   withval=$with_builddeps_dir;
10534 else
10535   with_builddeps_dir=/localhome/builddeps
10536 fi
10537 
10538 
10539 
10540 # Check whether --with-builddeps-group was given.
10541 if test "${with_builddeps_group+set}" = set; then :
10542   withval=$with_builddeps_group;
10543 fi
10544 
10545 
10546 
10547 
10548     if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
10549         if test "x$with_builddeps_conf" != x; then
10550             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for supplied builddeps configuration file" >&5
10551 $as_echo_n "checking for supplied builddeps configuration file... " >&6; }
10552             builddepsfile=$with_builddeps_conf
10553             if test -s $builddepsfile; then
10554                 . $builddepsfile
10555                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: loaded!" >&5
10556 $as_echo "loaded!" >&6; }
10557             else
10558                as_fn_error $? "The given builddeps conf file $with_builddeps_conf could not be loaded!" "$LINENO" 5
10559            fi
10560         else
10561             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builddeps.conf files in sources..." >&5
10562 $as_echo_n "checking for builddeps.conf files in sources...... " >&6; }
10563             builddepsfile=`mktemp`
10564             touch $builddepsfile
10565             # Put all found confs into a single file.
10566             find ${SRC_ROOT} -name builddeps.conf -exec cat \{\} \; >> $builddepsfile
10567             # Source the file to acquire the variables
10568             if test -s $builddepsfile; then
10569                 . $builddepsfile
10570                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: found at least one!" >&5
10571 $as_echo "found at least one!" >&6; }
10572             else
10573                as_fn_error $? "Could not find any builddeps.conf at all!" "$LINENO" 5
10574            fi
10575         fi
10576         # Create build and target names that use _ instead of "-" and ".".
10577         # This is necessary to use them in variable names.
10578         build_var=`echo ${OPENJDK_BUILD_AUTOCONF_NAME} | tr '-' '_' | tr '.' '_'`
10579         target_var=`echo ${OPENJDK_TARGET_AUTOCONF_NAME} | tr '-' '_' | tr '.' '_'`
10580         # Extract rewrite information for build and target
10581         eval rewritten_build=\${REWRITE_${build_var}}
10582         if test "x$rewritten_build" = x; then
10583             rewritten_build=${OPENJDK_BUILD_AUTOCONF_NAME}
10584             echo Build stays the same $rewritten_build
10585         else
10586             echo Rewriting build for builddeps into $rewritten_build
10587         fi
10588         eval rewritten_target=\${REWRITE_${target_var}}
10589         if test "x$rewritten_target" = x; then
10590             rewritten_target=${OPENJDK_TARGET_AUTOCONF_NAME}
10591             echo Target stays the same $rewritten_target
10592         else
10593             echo Rewriting target for builddeps into $rewritten_target
10594         fi
10595         rewritten_build_var=`echo ${rewritten_build} | tr '-' '_' | tr '.' '_'`
10596         rewritten_target_var=`echo ${rewritten_target} | tr '-' '_' | tr '.' '_'`
10597     fi
10598     for ac_prog in 7z unzip
10599 do
10600   # Extract the first word of "$ac_prog", so it can be a program name with args.
10601 set dummy $ac_prog; ac_word=$2
10602 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10603 $as_echo_n "checking for $ac_word... " >&6; }
10604 if ${ac_cv_prog_BDEPS_UNZIP+:} false; then :
10605   $as_echo_n "(cached) " >&6
10606 else
10607   if test -n "$BDEPS_UNZIP"; then
10608   ac_cv_prog_BDEPS_UNZIP="$BDEPS_UNZIP" # Let the user override the test.
10609 else
10610 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10611 for as_dir in $PATH
10612 do
10613   IFS=$as_save_IFS
10614   test -z "$as_dir" && as_dir=.
10615     for ac_exec_ext in '' $ac_executable_extensions; do
10616   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10617     ac_cv_prog_BDEPS_UNZIP="$ac_prog"
10618     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10619     break 2
10620   fi
10621 done
10622   done
10623 IFS=$as_save_IFS
10624 
10625 fi
10626 fi
10627 BDEPS_UNZIP=$ac_cv_prog_BDEPS_UNZIP
10628 if test -n "$BDEPS_UNZIP"; then
10629   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BDEPS_UNZIP" >&5
10630 $as_echo "$BDEPS_UNZIP" >&6; }
10631 else
10632   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10633 $as_echo "no" >&6; }
10634 fi
10635 
10636 
10637   test -n "$BDEPS_UNZIP" && break
10638 done
10639 
10640     if test "x$BDEPS_UNZIP" = x7z; then
10641         BDEPS_UNZIP="7z x"
10642     fi
10643 
10644     for ac_prog in wget lftp ftp
10645 do
10646   # Extract the first word of "$ac_prog", so it can be a program name with args.
10647 set dummy $ac_prog; ac_word=$2
10648 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10649 $as_echo_n "checking for $ac_word... " >&6; }
10650 if ${ac_cv_prog_BDEPS_FTP+:} false; then :
10651   $as_echo_n "(cached) " >&6
10652 else
10653   if test -n "$BDEPS_FTP"; then
10654   ac_cv_prog_BDEPS_FTP="$BDEPS_FTP" # Let the user override the test.
10655 else
10656 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10657 for as_dir in $PATH
10658 do
10659   IFS=$as_save_IFS
10660   test -z "$as_dir" && as_dir=.
10661     for ac_exec_ext in '' $ac_executable_extensions; do
10662   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10663     ac_cv_prog_BDEPS_FTP="$ac_prog"
10664     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10665     break 2
10666   fi
10667 done
10668   done
10669 IFS=$as_save_IFS
10670 
10671 fi
10672 fi
10673 BDEPS_FTP=$ac_cv_prog_BDEPS_FTP
10674 if test -n "$BDEPS_FTP"; then
10675   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BDEPS_FTP" >&5
10676 $as_echo "$BDEPS_FTP" >&6; }
10677 else
10678   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10679 $as_echo "no" >&6; }
10680 fi
10681 
10682 
10683   test -n "$BDEPS_FTP" && break
10684 done
10685 
10686 
10687 
10688 ###############################################################################
10689 #
10690 # Determine OpenJDK variants, options and version numbers.
10691 #
10692 ###############################################################################
10693 
10694 # We need build & target for this.
10695 
10696 
10697 ###############################################################################
10698 #
10699 # Should we build a JDK/JVM with headful support (ie a graphical ui)?
10700 # We always build headless support.
10701 #
10702 { $as_echo "$as_me:${as_lineno-$LINENO}: checking headful support" >&5
10703 $as_echo_n "checking headful support... " >&6; }
10704 # Check whether --enable-headful was given.
10705 if test "${enable_headful+set}" = set; then :
10706   enableval=$enable_headful; SUPPORT_HEADFUL=${enable_headful}
10707 else
10708   SUPPORT_HEADFUL=yes
10709 fi
10710 
10711 
10712 SUPPORT_HEADLESS=yes
10713 BUILD_HEADLESS="BUILD_HEADLESS:=true"
10714 
10715 if test "x$SUPPORT_HEADFUL" = xyes; then
10716     # We are building both headful and headless.
10717     headful_msg="inlude support for both headful and headless"
10718 fi
10719 
10720 if test "x$SUPPORT_HEADFUL" = xno; then
10721     # Thus we are building headless only.
10722     BUILD_HEADLESS="BUILD_HEADLESS:=true"
10723     headful_msg="headless only"
10724 fi
10725 
10726 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $headful_msg" >&5
10727 $as_echo "$headful_msg" >&6; }
10728 
10729 
10730 
10731 
10732 
10733 # Control wether Hotspot runs Queens test after build.
10734 # Check whether --enable-hotspot-test-in-build was given.
10735 if test "${enable_hotspot_test_in_build+set}" = set; then :
10736   enableval=$enable_hotspot_test_in_build;
10737 else
10738   enable_hotspot_test_in_build=no
10739 fi
10740 
10741 if test "x$enable_hotspot_test_in_build" = "xyes"; then
10742     TEST_IN_BUILD=true
10743 else
10744     TEST_IN_BUILD=false
10745 fi
10746 
10747 
10748 ###############################################################################
10749 #
10750 # Choose cacerts source file
10751 #
10752 
10753 # Check whether --with-cacerts-file was given.
10754 if test "${with_cacerts_file+set}" = set; then :
10755   withval=$with_cacerts_file;
10756 fi
10757 
10758 if test "x$with_cacerts_file" != x; then
10759     CACERTS_FILE=$with_cacerts_file
10760 else
10761     if test "x$OPENJDK" = "xtrue"; then
10762         CACERTS_FILE=${SRC_ROOT}/jdk/src/share/lib/security/cacerts
10763     else
10764         CACERTS_FILE=${SRC_ROOT}/jdk/src/closed/share/lib/security/cacerts.internal
10765     fi
10766 fi
10767 
10768 
10769 ###############################################################################
10770 #
10771 # Enable or disable unlimited crypto
10772 #
10773 # Check whether --enable-unlimited-crypto was given.
10774 if test "${enable_unlimited_crypto+set}" = set; then :
10775   enableval=$enable_unlimited_crypto;
10776 else
10777   enable_unlimited_crypto=no
10778 fi
10779 
10780 if test "x$enable_unlimited_crypto" = "xyes"; then
10781     UNLIMITED_CRYPTO=true
10782 else
10783     UNLIMITED_CRYPTO=false
10784 fi
10785 
10786 
10787 ###############################################################################
10788 #
10789 # Enable or disable the elliptic curve crypto implementation
10790 #
10791 
10792 
10793 ###############################################################################
10794 #
10795 # Compress jars
10796 #
10797 COMPRESS_JARS=false
10798 
10799 
10800 
10801 
10802 # Source the version numbers
10803 . $AUTOCONF_DIR/version-numbers
10804 
10805 # Get the settings from parameters
10806 
10807 # Check whether --with-milestone was given.
10808 if test "${with_milestone+set}" = set; then :
10809   withval=$with_milestone;
10810 fi
10811 
10812 if test "x$with_milestone" = xyes; then
10813   as_fn_error $? "Milestone must have a value" "$LINENO" 5
10814 elif test "x$with_milestone" != x; then
10815     MILESTONE="$with_milestone"
10816 fi
10817 if test "x$MILESTONE" = x; then
10818   MILESTONE=internal
10819 fi
10820 
10821 
10822 # Check whether --with-build-number was given.
10823 if test "${with_build_number+set}" = set; then :
10824   withval=$with_build_number;
10825 fi
10826 
10827 if test "x$with_build_number" = xyes; then
10828   as_fn_error $? "Build number must have a value" "$LINENO" 5
10829 elif test "x$with_build_number" != x; then
10830   JDK_BUILD_NUMBER="$with_build_number"
10831 fi
10832 if test "x$JDK_BUILD_NUMBER" = x; then
10833   JDK_BUILD_NUMBER=b00
10834 fi
10835 
10836 
10837 # Check whether --with-user-release-suffix was given.
10838 if test "${with_user_release_suffix+set}" = set; then :
10839   withval=$with_user_release_suffix;
10840 fi
10841 
10842 if test "x$with_user_release_suffix" = xyes; then
10843   as_fn_error $? "Release suffix must have a value" "$LINENO" 5
10844 elif test "x$with_user_release_suffix" != x; then
10845   USER_RELEASE_SUFFIX="$with_user_release_suffix"
10846 else
10847   BUILD_DATE=`date '+%Y_%m_%d_%H_%M'`
10848   # Avoid [:alnum:] since it depends on the locale.
10849   CLEAN_USERNAME=`echo "$USER" | $TR -d -c 'abcdefghijklmnopqrstuvqxyz0123456789'`
10850   USER_RELEASE_SUFFIX=`echo "${CLEAN_USERNAME}_${BUILD_DATE}" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
10851 fi
10852 
10853 
10854 # Now set the JDK version, milestone, build number etc.
10855 
10856 
10857 
10858 
10859 
10860 
10861 
10862 
10863 
10864 
10865 
10866 
10867 
10868 
10869 COPYRIGHT_YEAR=`date +'%Y'`
10870 
10871 
10872 if test "x$JDK_UPDATE_VERSION" != x; then
10873   JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}_${JDK_UPDATE_VERSION}"
10874 else
10875   JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}"
10876 fi
10877 
10878 
10879 COOKED_BUILD_NUMBER=`$ECHO $JDK_BUILD_NUMBER | $SED -e 's/^b//' -e 's/^0//'`
10880 
10881 
10882 
10883 ###############################################################################
10884 #
10885 # Setup BootJDK, used to bootstrap the build.
10886 #
10887 ###############################################################################
10888 
10889 
10890 BOOT_JDK_FOUND=no
10891 
10892 # Check whether --with-boot-jdk was given.
10893 if test "${with_boot_jdk+set}" = set; then :
10894   withval=$with_boot_jdk;
10895 fi
10896 
10897 
10898 # We look for the Boot JDK through various means, going from more certain to
10899 # more of a guess-work. After each test, BOOT_JDK_FOUND is set to "yes" if
10900 # we detected something (if so, the path to the jdk is in BOOT_JDK). But we
10901 # must check if this is indeed valid; otherwise we'll continue looking.
10902 
10903 # Test: Is bootjdk explicitely set by command line arguments?
10904 
10905   if test "x$BOOT_JDK_FOUND" = xno; then
10906     # Now execute the test
10907 
10908 if test "x$with_boot_jdk" != x; then
10909     BOOT_JDK=$with_boot_jdk
10910     BOOT_JDK_FOUND=maybe
10911     { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using configure arguments" >&5
10912 $as_echo "$as_me: Found potential Boot JDK using configure arguments" >&6;}
10913 fi
10914 
10915 
10916     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
10917     if test "x$BOOT_JDK_FOUND" = xmaybe; then
10918       # Do we have a bin/java?
10919       if test ! -x "$BOOT_JDK/bin/java"; then
10920         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
10921 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
10922         BOOT_JDK_FOUND=no
10923       else
10924         # Do we have a bin/javac?
10925         if test ! -x "$BOOT_JDK/bin/javac"; then
10926           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
10927 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
10928           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
10929 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
10930           BOOT_JDK_FOUND=no
10931         else
10932           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
10933           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
10934             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
10935 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
10936             BOOT_JDK_FOUND=no
10937           else
10938             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
10939             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
10940 
10941             # Extra M4 quote needed to protect [] in grep expression.
10942             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
10943             if test "x$FOUND_VERSION_78" = x; then
10944               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
10945 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
10946               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
10947 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
10948               BOOT_JDK_FOUND=no
10949             else
10950               # We're done! :-)
10951               BOOT_JDK_FOUND=yes
10952 
10953   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
10954 
10955   # Input might be given as Windows format, start by converting to
10956   # unix format.
10957   path="$BOOT_JDK"
10958   new_path=`$CYGPATH -u "$path"`
10959 
10960   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
10961   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
10962   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
10963   # "foo.exe" is OK but "foo" is an error.
10964   #
10965   # This test is therefore slightly more accurate than "test -f" to check for file precense.
10966   # It is also a way to make sure we got the proper file name for the real test later on.
10967   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
10968   if test "x$test_shortpath" = x; then
10969     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
10970 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
10971     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
10972   fi
10973 
10974   # Call helper function which possibly converts this using DOS-style short mode.
10975   # If so, the updated path is stored in $new_path.
10976 
10977   input_path="$new_path"
10978   # Check if we need to convert this using DOS-style short mode. If the path
10979   # contains just simple characters, use it. Otherwise (spaces, weird characters),
10980   # take no chances and rewrite it.
10981   # Note: m4 eats our [], so we need to use [ and ] instead.
10982   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
10983   if test "x$has_forbidden_chars" != x; then
10984     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
10985     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
10986     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
10987     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
10988       # Going to short mode and back again did indeed matter. Since short mode is
10989       # case insensitive, let's make it lowercase to improve readability.
10990       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
10991       # Now convert it back to Unix-stile (cygpath)
10992       input_path=`$CYGPATH -u "$shortmode_path"`
10993       new_path="$input_path"
10994     fi
10995   fi
10996 
10997   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
10998   if test "x$test_cygdrive_prefix" = x; then
10999     # As a simple fix, exclude /usr/bin since it's not a real path.
11000     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
11001       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
11002       # a path prefixed by /cygdrive for fixpath to work.
11003       new_path="$CYGWIN_ROOT_PATH$input_path"
11004     fi
11005   fi
11006 
11007 
11008   if test "x$path" != "x$new_path"; then
11009     BOOT_JDK="$new_path"
11010     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11011 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11012   fi
11013 
11014   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11015 
11016   path="$BOOT_JDK"
11017   has_colon=`$ECHO $path | $GREP ^.:`
11018   new_path="$path"
11019   if test "x$has_colon" = x; then
11020     # Not in mixed or Windows style, start by that.
11021     new_path=`cmd //c echo $path`
11022   fi
11023 
11024 
11025   input_path="$new_path"
11026   # Check if we need to convert this using DOS-style short mode. If the path
11027   # contains just simple characters, use it. Otherwise (spaces, weird characters),
11028   # take no chances and rewrite it.
11029   # Note: m4 eats our [], so we need to use [ and ] instead.
11030   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
11031   if test "x$has_forbidden_chars" != x; then
11032     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11033     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11034   fi
11035 
11036 
11037   windows_path="$new_path"
11038   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11039     unix_path=`$CYGPATH -u "$windows_path"`
11040     new_path="$unix_path"
11041   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11042     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11043     new_path="$unix_path"
11044   fi
11045 
11046   if test "x$path" != "x$new_path"; then
11047     BOOT_JDK="$new_path"
11048     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11049 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11050   fi
11051 
11052   # Save the first 10 bytes of this path to the storage, so fixpath can work.
11053   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
11054 
11055   else
11056     # We're on a posix platform. Hooray! :)
11057     path="$BOOT_JDK"
11058 
11059     if test ! -f "$path" && test ! -d "$path"; then
11060       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
11061     fi
11062 
11063     has_space=`$ECHO "$path" | $GREP " "`
11064     if test "x$has_space" != x; then
11065       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11066 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11067       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
11068     fi
11069   fi
11070 
11071               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
11072 $as_echo_n "checking for Boot JDK... " >&6; }
11073               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
11074 $as_echo "$BOOT_JDK" >&6; }
11075               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
11076 $as_echo_n "checking Boot JDK version... " >&6; }
11077               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
11078               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
11079 $as_echo "$BOOT_JDK_VERSION" >&6; }
11080             fi # end check jdk version
11081           fi # end check rt.jar
11082         fi # end check javac
11083       fi # end check java
11084     fi # end check boot jdk found
11085   fi
11086 
11087 if test "x$with_boot_jdk" != x && test "x$BOOT_JDK_FOUND" = xno; then
11088   # Having specified an argument which is incorrect will produce an instant failure;
11089   # we should not go on looking
11090   as_fn_error $? "The path given by --with-boot-jdk does not contain a valid Boot JDK" "$LINENO" 5
11091 fi
11092 
11093 # Test: Is bootjdk available from builddeps?
11094 
11095   if test "x$BOOT_JDK_FOUND" = xno; then
11096     # Now execute the test
11097 
11098 
11099 
11100     if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
11101         # Source the builddeps file again, to make sure it uses the latest variables!
11102         . $builddepsfile
11103         # Look for a target and build machine specific resource!
11104         eval resource=\${builddep_bootjdk_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
11105         if test "x$resource" = x; then
11106             # Ok, lets instead look for a target specific resource
11107             eval resource=\${builddep_bootjdk_TARGET_${rewritten_target_var}}
11108         fi
11109         if test "x$resource" = x; then
11110             # Ok, lets instead look for a build specific resource
11111             eval resource=\${builddep_bootjdk_BUILD_${rewritten_build_var}}
11112         fi
11113         if test "x$resource" = x; then
11114             # Ok, lets instead look for a generic resource
11115             # (The bootjdk comes from M4 and not the shell, thus no need for eval here.)
11116             resource=${builddep_bootjdk}
11117         fi
11118         if test "x$resource" != x; then
11119             { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for bootjdk" >&5
11120 $as_echo "$as_me: Using builddeps $resource for bootjdk" >&6;}
11121             # If the resource in the builddeps.conf file is an existing directory,
11122             # for example /java/linux/cups
11123             if test -d ${resource}; then
11124                depdir=${resource}
11125             else
11126 
11127 # bootjdk is for example mymodule
11128 # $resource is for example libs/general/libmymod_1_2_3.zip
11129 # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
11130 # $with_builddeps_dir is for example /localhome/builddeps
11131 # depdir is the name of the variable into which we store the depdir, eg MYMOD
11132 # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
11133 # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
11134     filename=`basename $resource`
11135     filebase=`echo $filename | sed 's/\.[^\.]*$//'`
11136     filebase=${filename%%.*}
11137     extension=${filename#*.}
11138     installdir=$with_builddeps_dir/$filebase
11139     if test ! -f $installdir/$filename.unpacked; then
11140         { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency bootjdk from $with_builddeps_server/$resource and installing into $installdir" >&5
11141 $as_echo "$as_me: Downloading build dependency bootjdk from $with_builddeps_server/$resource and installing into $installdir" >&6;}
11142         if test ! -d $installdir; then
11143             mkdir -p $installdir
11144         fi
11145         if test ! -d $installdir; then
11146             as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
11147         fi
11148         tmpfile=`mktemp $installdir/bootjdk.XXXXXXXXX`
11149         touch $tmpfile
11150         if test ! -f $tmpfile; then
11151             as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
11152         fi
11153 
11154     # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
11155     # $tmpfile is the local file name for the downloaded file.
11156     VALID_TOOL=no
11157     if test "x$BDEPS_FTP" = xwget; then
11158        VALID_TOOL=yes
11159        wget -O $tmpfile $with_builddeps_server/$resource
11160     fi
11161     if test "x$BDEPS_FTP" = xlftp; then
11162        VALID_TOOL=yes
11163        lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
11164     fi
11165     if test "x$BDEPS_FTP" = xftp; then
11166         VALID_TOOL=yes
11167         FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
11168         FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
11169         FTPUSERPWD=${FTPSERVER%%@*}
11170         if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
11171             FTPUSER=${userpwd%%:*}
11172             FTPPWD=${userpwd#*@}
11173             FTPSERVER=${FTPSERVER#*@}
11174         else
11175             FTPUSER=ftp
11176             FTPPWD=ftp
11177         fi
11178         # the "pass" command does not work on some
11179         # ftp clients (read ftp.exe) but if it works,
11180         # passive mode is better!
11181         (\
11182             echo "user $FTPUSER $FTPPWD"        ;\
11183             echo "pass"                         ;\
11184             echo "bin"                          ;\
11185             echo "get $FTPPATH $tmpfile"              ;\
11186         ) | ftp -in $FTPSERVER
11187     fi
11188     if test "x$VALID_TOOL" != xyes; then
11189        as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
11190     fi
11191 
11192         mv $tmpfile $installdir/$filename
11193         if test ! -s $installdir/$filename; then
11194             as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
11195         fi
11196         case "$extension" in
11197             zip)  echo "Unzipping $installdir/$filename..."
11198                (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
11199             ;;
11200             tar.gz) echo "Untaring $installdir/$filename..."
11201                (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
11202             ;;
11203             tgz) echo "Untaring $installdir/$filename..."
11204                (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
11205             ;;
11206             *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
11207             ;;
11208         esac
11209     fi
11210     if test -f $installdir/$filename.unpacked; then
11211         depdir=$installdir
11212     fi
11213 
11214             fi
11215             # Source the builddeps file again, because in the previous command, the depdir
11216             # was updated to point at the current build dependency install directory.
11217             . $builddepsfile
11218             # Now extract variables from the builddeps.conf files.
11219             theroot=${builddep_bootjdk_ROOT}
11220             thecflags=${builddep_bootjdk_CFLAGS}
11221             thelibs=${builddep_bootjdk_LIBS}
11222             if test "x$depdir" = x; then
11223                 as_fn_error $? "Could not download build dependency bootjdk" "$LINENO" 5
11224             fi
11225             BOOT_JDK=$depdir
11226             if test "x$theroot" != x; then
11227                BOOT_JDK="$theroot"
11228             fi
11229             if test "x$thecflags" != x; then
11230                BOOT_JDK_CFLAGS="$thecflags"
11231             fi
11232             if test "x$thelibs" != x; then
11233                BOOT_JDK_LIBS="$thelibs"
11234             fi
11235             BOOT_JDK_FOUND=maybe
11236             else BOOT_JDK_FOUND=no
11237 
11238         fi
11239         else BOOT_JDK_FOUND=no
11240 
11241     fi
11242 
11243 
11244 
11245     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
11246     if test "x$BOOT_JDK_FOUND" = xmaybe; then
11247       # Do we have a bin/java?
11248       if test ! -x "$BOOT_JDK/bin/java"; then
11249         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
11250 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
11251         BOOT_JDK_FOUND=no
11252       else
11253         # Do we have a bin/javac?
11254         if test ! -x "$BOOT_JDK/bin/javac"; then
11255           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
11256 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
11257           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
11258 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
11259           BOOT_JDK_FOUND=no
11260         else
11261           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
11262           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
11263             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
11264 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
11265             BOOT_JDK_FOUND=no
11266           else
11267             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
11268             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
11269 
11270             # Extra M4 quote needed to protect [] in grep expression.
11271             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
11272             if test "x$FOUND_VERSION_78" = x; then
11273               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
11274 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
11275               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
11276 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
11277               BOOT_JDK_FOUND=no
11278             else
11279               # We're done! :-)
11280               BOOT_JDK_FOUND=yes
11281 
11282   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11283 
11284   # Input might be given as Windows format, start by converting to
11285   # unix format.
11286   path="$BOOT_JDK"
11287   new_path=`$CYGPATH -u "$path"`
11288 
11289   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
11290   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
11291   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
11292   # "foo.exe" is OK but "foo" is an error.
11293   #
11294   # This test is therefore slightly more accurate than "test -f" to check for file precense.
11295   # It is also a way to make sure we got the proper file name for the real test later on.
11296   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
11297   if test "x$test_shortpath" = x; then
11298     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11299 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11300     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
11301   fi
11302 
11303   # Call helper function which possibly converts this using DOS-style short mode.
11304   # If so, the updated path is stored in $new_path.
11305 
11306   input_path="$new_path"
11307   # Check if we need to convert this using DOS-style short mode. If the path
11308   # contains just simple characters, use it. Otherwise (spaces, weird characters),
11309   # take no chances and rewrite it.
11310   # Note: m4 eats our [], so we need to use [ and ] instead.
11311   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
11312   if test "x$has_forbidden_chars" != x; then
11313     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11314     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
11315     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
11316     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
11317       # Going to short mode and back again did indeed matter. Since short mode is
11318       # case insensitive, let's make it lowercase to improve readability.
11319       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11320       # Now convert it back to Unix-stile (cygpath)
11321       input_path=`$CYGPATH -u "$shortmode_path"`
11322       new_path="$input_path"
11323     fi
11324   fi
11325 
11326   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
11327   if test "x$test_cygdrive_prefix" = x; then
11328     # As a simple fix, exclude /usr/bin since it's not a real path.
11329     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
11330       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
11331       # a path prefixed by /cygdrive for fixpath to work.
11332       new_path="$CYGWIN_ROOT_PATH$input_path"
11333     fi
11334   fi
11335 
11336 
11337   if test "x$path" != "x$new_path"; then
11338     BOOT_JDK="$new_path"
11339     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11340 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11341   fi
11342 
11343   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11344 
11345   path="$BOOT_JDK"
11346   has_colon=`$ECHO $path | $GREP ^.:`
11347   new_path="$path"
11348   if test "x$has_colon" = x; then
11349     # Not in mixed or Windows style, start by that.
11350     new_path=`cmd //c echo $path`
11351   fi
11352 
11353 
11354   input_path="$new_path"
11355   # Check if we need to convert this using DOS-style short mode. If the path
11356   # contains just simple characters, use it. Otherwise (spaces, weird characters),
11357   # take no chances and rewrite it.
11358   # Note: m4 eats our [], so we need to use [ and ] instead.
11359   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
11360   if test "x$has_forbidden_chars" != x; then
11361     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11362     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11363   fi
11364 
11365 
11366   windows_path="$new_path"
11367   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11368     unix_path=`$CYGPATH -u "$windows_path"`
11369     new_path="$unix_path"
11370   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11371     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11372     new_path="$unix_path"
11373   fi
11374 
11375   if test "x$path" != "x$new_path"; then
11376     BOOT_JDK="$new_path"
11377     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11378 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11379   fi
11380 
11381   # Save the first 10 bytes of this path to the storage, so fixpath can work.
11382   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
11383 
11384   else
11385     # We're on a posix platform. Hooray! :)
11386     path="$BOOT_JDK"
11387 
11388     if test ! -f "$path" && test ! -d "$path"; then
11389       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
11390     fi
11391 
11392     has_space=`$ECHO "$path" | $GREP " "`
11393     if test "x$has_space" != x; then
11394       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11395 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11396       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
11397     fi
11398   fi
11399 
11400               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
11401 $as_echo_n "checking for Boot JDK... " >&6; }
11402               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
11403 $as_echo "$BOOT_JDK" >&6; }
11404               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
11405 $as_echo_n "checking Boot JDK version... " >&6; }
11406               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
11407               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
11408 $as_echo "$BOOT_JDK_VERSION" >&6; }
11409             fi # end check jdk version
11410           fi # end check rt.jar
11411         fi # end check javac
11412       fi # end check java
11413     fi # end check boot jdk found
11414   fi
11415 
11416 
11417 # Test: Is $JAVA_HOME set?
11418 
11419   if test "x$BOOT_JDK_FOUND" = xno; then
11420     # Now execute the test
11421 
11422     if test "x$JAVA_HOME" != x; then
11423         JAVA_HOME_PROCESSED="$JAVA_HOME"
11424 
11425   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11426 
11427   # Input might be given as Windows format, start by converting to
11428   # unix format.
11429   path="$JAVA_HOME_PROCESSED"
11430   new_path=`$CYGPATH -u "$path"`
11431 
11432   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
11433   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
11434   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
11435   # "foo.exe" is OK but "foo" is an error.
11436   #
11437   # This test is therefore slightly more accurate than "test -f" to check for file precense.
11438   # It is also a way to make sure we got the proper file name for the real test later on.
11439   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
11440   if test "x$test_shortpath" = x; then
11441     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
11442 $as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
11443     as_fn_error $? "Cannot locate the the path of JAVA_HOME_PROCESSED" "$LINENO" 5
11444   fi
11445 
11446   # Call helper function which possibly converts this using DOS-style short mode.
11447   # If so, the updated path is stored in $new_path.
11448 
11449   input_path="$new_path"
11450   # Check if we need to convert this using DOS-style short mode. If the path
11451   # contains just simple characters, use it. Otherwise (spaces, weird characters),
11452   # take no chances and rewrite it.
11453   # Note: m4 eats our [], so we need to use [ and ] instead.
11454   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
11455   if test "x$has_forbidden_chars" != x; then
11456     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11457     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
11458     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
11459     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
11460       # Going to short mode and back again did indeed matter. Since short mode is
11461       # case insensitive, let's make it lowercase to improve readability.
11462       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11463       # Now convert it back to Unix-stile (cygpath)
11464       input_path=`$CYGPATH -u "$shortmode_path"`
11465       new_path="$input_path"
11466     fi
11467   fi
11468 
11469   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
11470   if test "x$test_cygdrive_prefix" = x; then
11471     # As a simple fix, exclude /usr/bin since it's not a real path.
11472     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
11473       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
11474       # a path prefixed by /cygdrive for fixpath to work.
11475       new_path="$CYGWIN_ROOT_PATH$input_path"
11476     fi
11477   fi
11478 
11479 
11480   if test "x$path" != "x$new_path"; then
11481     JAVA_HOME_PROCESSED="$new_path"
11482     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
11483 $as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
11484   fi
11485 
11486   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11487 
11488   path="$JAVA_HOME_PROCESSED"
11489   has_colon=`$ECHO $path | $GREP ^.:`
11490   new_path="$path"
11491   if test "x$has_colon" = x; then
11492     # Not in mixed or Windows style, start by that.
11493     new_path=`cmd //c echo $path`
11494   fi
11495 
11496 
11497   input_path="$new_path"
11498   # Check if we need to convert this using DOS-style short mode. If the path
11499   # contains just simple characters, use it. Otherwise (spaces, weird characters),
11500   # take no chances and rewrite it.
11501   # Note: m4 eats our [], so we need to use [ and ] instead.
11502   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
11503   if test "x$has_forbidden_chars" != x; then
11504     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11505     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11506   fi
11507 
11508 
11509   windows_path="$new_path"
11510   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11511     unix_path=`$CYGPATH -u "$windows_path"`
11512     new_path="$unix_path"
11513   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11514     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11515     new_path="$unix_path"
11516   fi
11517 
11518   if test "x$path" != "x$new_path"; then
11519     JAVA_HOME_PROCESSED="$new_path"
11520     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
11521 $as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
11522   fi
11523 
11524   # Save the first 10 bytes of this path to the storage, so fixpath can work.
11525   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
11526 
11527   else
11528     # We're on a posix platform. Hooray! :)
11529     path="$JAVA_HOME_PROCESSED"
11530 
11531     if test ! -f "$path" && test ! -d "$path"; then
11532       as_fn_error $? "The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is not found." "$LINENO" 5
11533     fi
11534 
11535     has_space=`$ECHO "$path" | $GREP " "`
11536     if test "x$has_space" != x; then
11537       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
11538 $as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
11539       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
11540     fi
11541   fi
11542 
11543         if test ! -d "$JAVA_HOME_PROCESSED"; then
11544             { $as_echo "$as_me:${as_lineno-$LINENO}: Your JAVA_HOME points to a non-existing directory!" >&5
11545 $as_echo "$as_me: Your JAVA_HOME points to a non-existing directory!" >&6;}
11546         else
11547           # Aha, the user has set a JAVA_HOME
11548           # let us use that as the Boot JDK.
11549           BOOT_JDK="$JAVA_HOME_PROCESSED"
11550           BOOT_JDK_FOUND=maybe
11551           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using JAVA_HOME" >&5
11552 $as_echo "$as_me: Found potential Boot JDK using JAVA_HOME" >&6;}
11553         fi
11554     fi
11555 
11556 
11557     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
11558     if test "x$BOOT_JDK_FOUND" = xmaybe; then
11559       # Do we have a bin/java?
11560       if test ! -x "$BOOT_JDK/bin/java"; then
11561         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
11562 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
11563         BOOT_JDK_FOUND=no
11564       else
11565         # Do we have a bin/javac?
11566         if test ! -x "$BOOT_JDK/bin/javac"; then
11567           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
11568 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
11569           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
11570 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
11571           BOOT_JDK_FOUND=no
11572         else
11573           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
11574           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
11575             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
11576 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
11577             BOOT_JDK_FOUND=no
11578           else
11579             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
11580             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
11581 
11582             # Extra M4 quote needed to protect [] in grep expression.
11583             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
11584             if test "x$FOUND_VERSION_78" = x; then
11585               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
11586 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
11587               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
11588 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
11589               BOOT_JDK_FOUND=no
11590             else
11591               # We're done! :-)
11592               BOOT_JDK_FOUND=yes
11593 
11594   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11595 
11596   # Input might be given as Windows format, start by converting to
11597   # unix format.
11598   path="$BOOT_JDK"
11599   new_path=`$CYGPATH -u "$path"`
11600 
11601   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
11602   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
11603   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
11604   # "foo.exe" is OK but "foo" is an error.
11605   #
11606   # This test is therefore slightly more accurate than "test -f" to check for file precense.
11607   # It is also a way to make sure we got the proper file name for the real test later on.
11608   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
11609   if test "x$test_shortpath" = x; then
11610     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11611 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11612     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
11613   fi
11614 
11615   # Call helper function which possibly converts this using DOS-style short mode.
11616   # If so, the updated path is stored in $new_path.
11617 
11618   input_path="$new_path"
11619   # Check if we need to convert this using DOS-style short mode. If the path
11620   # contains just simple characters, use it. Otherwise (spaces, weird characters),
11621   # take no chances and rewrite it.
11622   # Note: m4 eats our [], so we need to use [ and ] instead.
11623   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
11624   if test "x$has_forbidden_chars" != x; then
11625     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11626     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
11627     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
11628     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
11629       # Going to short mode and back again did indeed matter. Since short mode is
11630       # case insensitive, let's make it lowercase to improve readability.
11631       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11632       # Now convert it back to Unix-stile (cygpath)
11633       input_path=`$CYGPATH -u "$shortmode_path"`
11634       new_path="$input_path"
11635     fi
11636   fi
11637 
11638   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
11639   if test "x$test_cygdrive_prefix" = x; then
11640     # As a simple fix, exclude /usr/bin since it's not a real path.
11641     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
11642       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
11643       # a path prefixed by /cygdrive for fixpath to work.
11644       new_path="$CYGWIN_ROOT_PATH$input_path"
11645     fi
11646   fi
11647 
11648 
11649   if test "x$path" != "x$new_path"; then
11650     BOOT_JDK="$new_path"
11651     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11652 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11653   fi
11654 
11655   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11656 
11657   path="$BOOT_JDK"
11658   has_colon=`$ECHO $path | $GREP ^.:`
11659   new_path="$path"
11660   if test "x$has_colon" = x; then
11661     # Not in mixed or Windows style, start by that.
11662     new_path=`cmd //c echo $path`
11663   fi
11664 
11665 
11666   input_path="$new_path"
11667   # Check if we need to convert this using DOS-style short mode. If the path
11668   # contains just simple characters, use it. Otherwise (spaces, weird characters),
11669   # take no chances and rewrite it.
11670   # Note: m4 eats our [], so we need to use [ and ] instead.
11671   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
11672   if test "x$has_forbidden_chars" != x; then
11673     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11674     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11675   fi
11676 
11677 
11678   windows_path="$new_path"
11679   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11680     unix_path=`$CYGPATH -u "$windows_path"`
11681     new_path="$unix_path"
11682   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11683     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11684     new_path="$unix_path"
11685   fi
11686 
11687   if test "x$path" != "x$new_path"; then
11688     BOOT_JDK="$new_path"
11689     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11690 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11691   fi
11692 
11693   # Save the first 10 bytes of this path to the storage, so fixpath can work.
11694   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
11695 
11696   else
11697     # We're on a posix platform. Hooray! :)
11698     path="$BOOT_JDK"
11699 
11700     if test ! -f "$path" && test ! -d "$path"; then
11701       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
11702     fi
11703 
11704     has_space=`$ECHO "$path" | $GREP " "`
11705     if test "x$has_space" != x; then
11706       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11707 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11708       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
11709     fi
11710   fi
11711 
11712               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
11713 $as_echo_n "checking for Boot JDK... " >&6; }
11714               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
11715 $as_echo "$BOOT_JDK" >&6; }
11716               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
11717 $as_echo_n "checking Boot JDK version... " >&6; }
11718               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
11719               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
11720 $as_echo "$BOOT_JDK_VERSION" >&6; }
11721             fi # end check jdk version
11722           fi # end check rt.jar
11723         fi # end check javac
11724       fi # end check java
11725     fi # end check boot jdk found
11726   fi
11727 
11728 
11729 # Test: Is there a /usr/libexec/java_home? (Typically on MacOSX)
11730 
11731   if test "x$BOOT_JDK_FOUND" = xno; then
11732     # Now execute the test
11733 
11734     if test -x /usr/libexec/java_home; then
11735         BOOT_JDK=`/usr/libexec/java_home`
11736         BOOT_JDK_FOUND=maybe
11737         { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home" >&5
11738 $as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home" >&6;}
11739     fi
11740 
11741 
11742     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
11743     if test "x$BOOT_JDK_FOUND" = xmaybe; then
11744       # Do we have a bin/java?
11745       if test ! -x "$BOOT_JDK/bin/java"; then
11746         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
11747 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
11748         BOOT_JDK_FOUND=no
11749       else
11750         # Do we have a bin/javac?
11751         if test ! -x "$BOOT_JDK/bin/javac"; then
11752           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
11753 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
11754           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
11755 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
11756           BOOT_JDK_FOUND=no
11757         else
11758           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
11759           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
11760             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
11761 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
11762             BOOT_JDK_FOUND=no
11763           else
11764             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
11765             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
11766 
11767             # Extra M4 quote needed to protect [] in grep expression.
11768             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
11769             if test "x$FOUND_VERSION_78" = x; then
11770               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
11771 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
11772               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
11773 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
11774               BOOT_JDK_FOUND=no
11775             else
11776               # We're done! :-)
11777               BOOT_JDK_FOUND=yes
11778 
11779   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11780 
11781   # Input might be given as Windows format, start by converting to
11782   # unix format.
11783   path="$BOOT_JDK"
11784   new_path=`$CYGPATH -u "$path"`
11785 
11786   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
11787   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
11788   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
11789   # "foo.exe" is OK but "foo" is an error.
11790   #
11791   # This test is therefore slightly more accurate than "test -f" to check for file precense.
11792   # It is also a way to make sure we got the proper file name for the real test later on.
11793   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
11794   if test "x$test_shortpath" = x; then
11795     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11796 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11797     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
11798   fi
11799 
11800   # Call helper function which possibly converts this using DOS-style short mode.
11801   # If so, the updated path is stored in $new_path.
11802 
11803   input_path="$new_path"
11804   # Check if we need to convert this using DOS-style short mode. If the path
11805   # contains just simple characters, use it. Otherwise (spaces, weird characters),
11806   # take no chances and rewrite it.
11807   # Note: m4 eats our [], so we need to use [ and ] instead.
11808   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
11809   if test "x$has_forbidden_chars" != x; then
11810     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11811     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
11812     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
11813     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
11814       # Going to short mode and back again did indeed matter. Since short mode is
11815       # case insensitive, let's make it lowercase to improve readability.
11816       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11817       # Now convert it back to Unix-stile (cygpath)
11818       input_path=`$CYGPATH -u "$shortmode_path"`
11819       new_path="$input_path"
11820     fi
11821   fi
11822 
11823   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
11824   if test "x$test_cygdrive_prefix" = x; then
11825     # As a simple fix, exclude /usr/bin since it's not a real path.
11826     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
11827       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
11828       # a path prefixed by /cygdrive for fixpath to work.
11829       new_path="$CYGWIN_ROOT_PATH$input_path"
11830     fi
11831   fi
11832 
11833 
11834   if test "x$path" != "x$new_path"; then
11835     BOOT_JDK="$new_path"
11836     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11837 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11838   fi
11839 
11840   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11841 
11842   path="$BOOT_JDK"
11843   has_colon=`$ECHO $path | $GREP ^.:`
11844   new_path="$path"
11845   if test "x$has_colon" = x; then
11846     # Not in mixed or Windows style, start by that.
11847     new_path=`cmd //c echo $path`
11848   fi
11849 
11850 
11851   input_path="$new_path"
11852   # Check if we need to convert this using DOS-style short mode. If the path
11853   # contains just simple characters, use it. Otherwise (spaces, weird characters),
11854   # take no chances and rewrite it.
11855   # Note: m4 eats our [], so we need to use [ and ] instead.
11856   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
11857   if test "x$has_forbidden_chars" != x; then
11858     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11859     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11860   fi
11861 
11862 
11863   windows_path="$new_path"
11864   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11865     unix_path=`$CYGPATH -u "$windows_path"`
11866     new_path="$unix_path"
11867   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11868     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11869     new_path="$unix_path"
11870   fi
11871 
11872   if test "x$path" != "x$new_path"; then
11873     BOOT_JDK="$new_path"
11874     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11875 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11876   fi
11877 
11878   # Save the first 10 bytes of this path to the storage, so fixpath can work.
11879   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
11880 
11881   else
11882     # We're on a posix platform. Hooray! :)
11883     path="$BOOT_JDK"
11884 
11885     if test ! -f "$path" && test ! -d "$path"; then
11886       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
11887     fi
11888 
11889     has_space=`$ECHO "$path" | $GREP " "`
11890     if test "x$has_space" != x; then
11891       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11892 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11893       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
11894     fi
11895   fi
11896 
11897               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
11898 $as_echo_n "checking for Boot JDK... " >&6; }
11899               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
11900 $as_echo "$BOOT_JDK" >&6; }
11901               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
11902 $as_echo_n "checking Boot JDK version... " >&6; }
11903               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
11904               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
11905 $as_echo "$BOOT_JDK_VERSION" >&6; }
11906             fi # end check jdk version
11907           fi # end check rt.jar
11908         fi # end check javac
11909       fi # end check java
11910     fi # end check boot jdk found
11911   fi
11912 
11913 
11914 # Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
11915 
11916   if test "x$BOOT_JDK_FOUND" = xno; then
11917     # Now execute the test
11918 
11919     # Extract the first word of "javac", so it can be a program name with args.
11920 set dummy javac; ac_word=$2
11921 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11922 $as_echo_n "checking for $ac_word... " >&6; }
11923 if ${ac_cv_path_JAVAC_CHECK+:} false; then :
11924   $as_echo_n "(cached) " >&6
11925 else
11926   case $JAVAC_CHECK in
11927   [\\/]* | ?:[\\/]*)
11928   ac_cv_path_JAVAC_CHECK="$JAVAC_CHECK" # Let the user override the test with a path.
11929   ;;
11930   *)
11931   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11932 for as_dir in $PATH
11933 do
11934   IFS=$as_save_IFS
11935   test -z "$as_dir" && as_dir=.
11936     for ac_exec_ext in '' $ac_executable_extensions; do
11937   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
11938     ac_cv_path_JAVAC_CHECK="$as_dir/$ac_word$ac_exec_ext"
11939     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11940     break 2
11941   fi
11942 done
11943   done
11944 IFS=$as_save_IFS
11945 
11946   ;;
11947 esac
11948 fi
11949 JAVAC_CHECK=$ac_cv_path_JAVAC_CHECK
11950 if test -n "$JAVAC_CHECK"; then
11951   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC_CHECK" >&5
11952 $as_echo "$JAVAC_CHECK" >&6; }
11953 else
11954   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11955 $as_echo "no" >&6; }
11956 fi
11957 
11958 
11959     # Extract the first word of "java", so it can be a program name with args.
11960 set dummy java; ac_word=$2
11961 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11962 $as_echo_n "checking for $ac_word... " >&6; }
11963 if ${ac_cv_path_JAVA_CHECK+:} false; then :
11964   $as_echo_n "(cached) " >&6
11965 else
11966   case $JAVA_CHECK in
11967   [\\/]* | ?:[\\/]*)
11968   ac_cv_path_JAVA_CHECK="$JAVA_CHECK" # Let the user override the test with a path.
11969   ;;
11970   *)
11971   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11972 for as_dir in $PATH
11973 do
11974   IFS=$as_save_IFS
11975   test -z "$as_dir" && as_dir=.
11976     for ac_exec_ext in '' $ac_executable_extensions; do
11977   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
11978     ac_cv_path_JAVA_CHECK="$as_dir/$ac_word$ac_exec_ext"
11979     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11980     break 2
11981   fi
11982 done
11983   done
11984 IFS=$as_save_IFS
11985 
11986   ;;
11987 esac
11988 fi
11989 JAVA_CHECK=$ac_cv_path_JAVA_CHECK
11990 if test -n "$JAVA_CHECK"; then
11991   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA_CHECK" >&5
11992 $as_echo "$JAVA_CHECK" >&6; }
11993 else
11994   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11995 $as_echo "no" >&6; }
11996 fi
11997 
11998 
11999     BINARY="$JAVAC_CHECK"
12000     if test "x$JAVAC_CHECK" = x; then
12001         BINARY="$JAVA_CHECK"
12002     fi
12003     if test "x$BINARY" != x; then
12004         # So there is a java(c) binary, it might be part of a JDK.
12005         # Lets find the JDK/JRE directory by following symbolic links.
12006         # Linux/GNU systems often have links from /usr/bin/java to
12007         # /etc/alternatives/java to the real JDK binary.
12008 
12009     if test "x$OPENJDK_BUILD_OS" != xwindows; then
12010         # Follow a chain of symbolic links. Use readlink
12011         # where it exists, else fall back to horribly
12012         # complicated shell code.
12013         if test "x$READLINK_TESTED" != yes; then
12014             # On MacOSX there is a readlink tool with a different
12015             # purpose than the GNU readlink tool. Check the found readlink.
12016             ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
12017             if test "x$ISGNU" = x; then
12018                  # A readlink that we do not know how to use.
12019                  # Are there other non-GNU readlinks out there?
12020                  READLINK_TESTED=yes
12021                  READLINK=
12022             fi
12023         fi
12024 
12025         if test "x$READLINK" != x; then
12026             BINARY=`$READLINK -f $BINARY`
12027         else
12028             # Save the current directory for restoring afterwards
12029             STARTDIR=$PWD
12030             COUNTER=0
12031             sym_link_dir=`$DIRNAME $BINARY`
12032             sym_link_file=`$BASENAME $BINARY`
12033             # Use the system pwd and not the shell builtin to resolve directory symlinks
12034             cd $sym_link_dir
12035             cd `$THEPWDCMD`
12036             sym_link_dir=`$THEPWDCMD`
12037             # Resolve file symlinks
12038             while test $COUNTER -lt 20; do
12039                 ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
12040                 if test "x$ISLINK" == x; then
12041                     # This is not a symbolic link! We are done!
12042                     break
12043                 fi
12044                 # Again resolve directory symlinks since the target of the just found
12045                 # link could be in a different directory
12046                 cd `$DIRNAME $ISLINK`
12047                 sym_link_dir=`$THEPWDCMD`
12048                 sym_link_file=`$BASENAME $ISLINK`
12049                 let COUNTER=COUNTER+1
12050             done
12051             cd $STARTDIR
12052             BINARY=$sym_link_dir/$sym_link_file
12053         fi
12054     fi
12055 
12056         BOOT_JDK=`dirname "$BINARY"`
12057         BOOT_JDK=`cd "$BOOT_JDK/.."; pwd`
12058         if test -x "$BOOT_JDK/bin/javac" && test -x "$BOOT_JDK/bin/java"; then
12059             # Looks like we found ourselves an JDK
12060             BOOT_JDK_FOUND=maybe
12061             { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using java(c) in PATH" >&5
12062 $as_echo "$as_me: Found potential Boot JDK using java(c) in PATH" >&6;}
12063         fi
12064     fi
12065 
12066 
12067     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12068     if test "x$BOOT_JDK_FOUND" = xmaybe; then
12069       # Do we have a bin/java?
12070       if test ! -x "$BOOT_JDK/bin/java"; then
12071         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12072 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12073         BOOT_JDK_FOUND=no
12074       else
12075         # Do we have a bin/javac?
12076         if test ! -x "$BOOT_JDK/bin/javac"; then
12077           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12078 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12079           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12080 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12081           BOOT_JDK_FOUND=no
12082         else
12083           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12084           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12085             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12086 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12087             BOOT_JDK_FOUND=no
12088           else
12089             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12090             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12091 
12092             # Extra M4 quote needed to protect [] in grep expression.
12093             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12094             if test "x$FOUND_VERSION_78" = x; then
12095               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12096 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12097               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12098 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12099               BOOT_JDK_FOUND=no
12100             else
12101               # We're done! :-)
12102               BOOT_JDK_FOUND=yes
12103 
12104   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12105 
12106   # Input might be given as Windows format, start by converting to
12107   # unix format.
12108   path="$BOOT_JDK"
12109   new_path=`$CYGPATH -u "$path"`
12110 
12111   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12112   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12113   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12114   # "foo.exe" is OK but "foo" is an error.
12115   #
12116   # This test is therefore slightly more accurate than "test -f" to check for file precense.
12117   # It is also a way to make sure we got the proper file name for the real test later on.
12118   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12119   if test "x$test_shortpath" = x; then
12120     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12121 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12122     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12123   fi
12124 
12125   # Call helper function which possibly converts this using DOS-style short mode.
12126   # If so, the updated path is stored in $new_path.
12127 
12128   input_path="$new_path"
12129   # Check if we need to convert this using DOS-style short mode. If the path
12130   # contains just simple characters, use it. Otherwise (spaces, weird characters),
12131   # take no chances and rewrite it.
12132   # Note: m4 eats our [], so we need to use [ and ] instead.
12133   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12134   if test "x$has_forbidden_chars" != x; then
12135     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12136     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12137     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12138     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12139       # Going to short mode and back again did indeed matter. Since short mode is
12140       # case insensitive, let's make it lowercase to improve readability.
12141       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12142       # Now convert it back to Unix-stile (cygpath)
12143       input_path=`$CYGPATH -u "$shortmode_path"`
12144       new_path="$input_path"
12145     fi
12146   fi
12147 
12148   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12149   if test "x$test_cygdrive_prefix" = x; then
12150     # As a simple fix, exclude /usr/bin since it's not a real path.
12151     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12152       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12153       # a path prefixed by /cygdrive for fixpath to work.
12154       new_path="$CYGWIN_ROOT_PATH$input_path"
12155     fi
12156   fi
12157 
12158 
12159   if test "x$path" != "x$new_path"; then
12160     BOOT_JDK="$new_path"
12161     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12162 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12163   fi
12164 
12165   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12166 
12167   path="$BOOT_JDK"
12168   has_colon=`$ECHO $path | $GREP ^.:`
12169   new_path="$path"
12170   if test "x$has_colon" = x; then
12171     # Not in mixed or Windows style, start by that.
12172     new_path=`cmd //c echo $path`
12173   fi
12174 
12175 
12176   input_path="$new_path"
12177   # Check if we need to convert this using DOS-style short mode. If the path
12178   # contains just simple characters, use it. Otherwise (spaces, weird characters),
12179   # take no chances and rewrite it.
12180   # Note: m4 eats our [], so we need to use [ and ] instead.
12181   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12182   if test "x$has_forbidden_chars" != x; then
12183     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12184     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12185   fi
12186 
12187 
12188   windows_path="$new_path"
12189   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12190     unix_path=`$CYGPATH -u "$windows_path"`
12191     new_path="$unix_path"
12192   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12193     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12194     new_path="$unix_path"
12195   fi
12196 
12197   if test "x$path" != "x$new_path"; then
12198     BOOT_JDK="$new_path"
12199     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12200 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12201   fi
12202 
12203   # Save the first 10 bytes of this path to the storage, so fixpath can work.
12204   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12205 
12206   else
12207     # We're on a posix platform. Hooray! :)
12208     path="$BOOT_JDK"
12209 
12210     if test ! -f "$path" && test ! -d "$path"; then
12211       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
12212     fi
12213 
12214     has_space=`$ECHO "$path" | $GREP " "`
12215     if test "x$has_space" != x; then
12216       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12217 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12218       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
12219     fi
12220   fi
12221 
12222               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12223 $as_echo_n "checking for Boot JDK... " >&6; }
12224               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12225 $as_echo "$BOOT_JDK" >&6; }
12226               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12227 $as_echo_n "checking Boot JDK version... " >&6; }
12228               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12229               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12230 $as_echo "$BOOT_JDK_VERSION" >&6; }
12231             fi # end check jdk version
12232           fi # end check rt.jar
12233         fi # end check javac
12234       fi # end check java
12235     fi # end check boot jdk found
12236   fi
12237 
12238 
12239 # Test: Is there a JDK installed in default, well-known locations?
12240 
12241   if test "x$BOOT_JDK_FOUND" = xno; then
12242     # Now execute the test
12243 
12244   if test "x$OPENJDK_TARGET_OS" = xwindows; then
12245 
12246   if test "x$BOOT_JDK_FOUND" = xno; then
12247     # Now execute the test
12248 
12249   if test "x$ProgramW6432" != x; then
12250     VIRTUAL_DIR="$ProgramW6432/Java"
12251 
12252   windows_path="$VIRTUAL_DIR"
12253   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12254     unix_path=`$CYGPATH -u "$windows_path"`
12255     VIRTUAL_DIR="$unix_path"
12256   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12257     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12258     VIRTUAL_DIR="$unix_path"
12259   fi
12260 
12261 
12262   BOOT_JDK_PREFIX="$VIRTUAL_DIR"
12263   BOOT_JDK_SUFFIX=""
12264   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
12265   if test "x$ALL_JDKS_FOUND" != x; then
12266     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
12267 
12268   if test "x$BOOT_JDK_FOUND" = xno; then
12269     # Now execute the test
12270 
12271         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
12272         if test -d "$BOOT_JDK"; then
12273           BOOT_JDK_FOUND=maybe
12274           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
12275 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
12276         fi
12277 
12278 
12279     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12280     if test "x$BOOT_JDK_FOUND" = xmaybe; then
12281       # Do we have a bin/java?
12282       if test ! -x "$BOOT_JDK/bin/java"; then
12283         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12284 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12285         BOOT_JDK_FOUND=no
12286       else
12287         # Do we have a bin/javac?
12288         if test ! -x "$BOOT_JDK/bin/javac"; then
12289           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12290 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12291           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12292 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12293           BOOT_JDK_FOUND=no
12294         else
12295           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12296           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12297             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12298 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12299             BOOT_JDK_FOUND=no
12300           else
12301             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12302             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12303 
12304             # Extra M4 quote needed to protect [] in grep expression.
12305             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12306             if test "x$FOUND_VERSION_78" = x; then
12307               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12308 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12309               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12310 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12311               BOOT_JDK_FOUND=no
12312             else
12313               # We're done! :-)
12314               BOOT_JDK_FOUND=yes
12315 
12316   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12317 
12318   # Input might be given as Windows format, start by converting to
12319   # unix format.
12320   path="$BOOT_JDK"
12321   new_path=`$CYGPATH -u "$path"`
12322 
12323   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12324   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12325   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12326   # "foo.exe" is OK but "foo" is an error.
12327   #
12328   # This test is therefore slightly more accurate than "test -f" to check for file precense.
12329   # It is also a way to make sure we got the proper file name for the real test later on.
12330   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12331   if test "x$test_shortpath" = x; then
12332     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12333 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12334     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12335   fi
12336 
12337   # Call helper function which possibly converts this using DOS-style short mode.
12338   # If so, the updated path is stored in $new_path.
12339 
12340   input_path="$new_path"
12341   # Check if we need to convert this using DOS-style short mode. If the path
12342   # contains just simple characters, use it. Otherwise (spaces, weird characters),
12343   # take no chances and rewrite it.
12344   # Note: m4 eats our [], so we need to use [ and ] instead.
12345   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12346   if test "x$has_forbidden_chars" != x; then
12347     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12348     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12349     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12350     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12351       # Going to short mode and back again did indeed matter. Since short mode is
12352       # case insensitive, let's make it lowercase to improve readability.
12353       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12354       # Now convert it back to Unix-stile (cygpath)
12355       input_path=`$CYGPATH -u "$shortmode_path"`
12356       new_path="$input_path"
12357     fi
12358   fi
12359 
12360   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12361   if test "x$test_cygdrive_prefix" = x; then
12362     # As a simple fix, exclude /usr/bin since it's not a real path.
12363     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12364       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12365       # a path prefixed by /cygdrive for fixpath to work.
12366       new_path="$CYGWIN_ROOT_PATH$input_path"
12367     fi
12368   fi
12369 
12370 
12371   if test "x$path" != "x$new_path"; then
12372     BOOT_JDK="$new_path"
12373     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12374 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12375   fi
12376 
12377   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12378 
12379   path="$BOOT_JDK"
12380   has_colon=`$ECHO $path | $GREP ^.:`
12381   new_path="$path"
12382   if test "x$has_colon" = x; then
12383     # Not in mixed or Windows style, start by that.
12384     new_path=`cmd //c echo $path`
12385   fi
12386 
12387 
12388   input_path="$new_path"
12389   # Check if we need to convert this using DOS-style short mode. If the path
12390   # contains just simple characters, use it. Otherwise (spaces, weird characters),
12391   # take no chances and rewrite it.
12392   # Note: m4 eats our [], so we need to use [ and ] instead.
12393   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12394   if test "x$has_forbidden_chars" != x; then
12395     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12396     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12397   fi
12398 
12399 
12400   windows_path="$new_path"
12401   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12402     unix_path=`$CYGPATH -u "$windows_path"`
12403     new_path="$unix_path"
12404   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12405     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12406     new_path="$unix_path"
12407   fi
12408 
12409   if test "x$path" != "x$new_path"; then
12410     BOOT_JDK="$new_path"
12411     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12412 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12413   fi
12414 
12415   # Save the first 10 bytes of this path to the storage, so fixpath can work.
12416   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12417 
12418   else
12419     # We're on a posix platform. Hooray! :)
12420     path="$BOOT_JDK"
12421 
12422     if test ! -f "$path" && test ! -d "$path"; then
12423       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
12424     fi
12425 
12426     has_space=`$ECHO "$path" | $GREP " "`
12427     if test "x$has_space" != x; then
12428       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12429 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12430       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
12431     fi
12432   fi
12433 
12434               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12435 $as_echo_n "checking for Boot JDK... " >&6; }
12436               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12437 $as_echo "$BOOT_JDK" >&6; }
12438               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12439 $as_echo_n "checking Boot JDK version... " >&6; }
12440               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12441               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12442 $as_echo "$BOOT_JDK_VERSION" >&6; }
12443             fi # end check jdk version
12444           fi # end check rt.jar
12445         fi # end check javac
12446       fi # end check java
12447     fi # end check boot jdk found
12448   fi
12449 
12450     done
12451   fi
12452 
12453   fi
12454 
12455 
12456     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12457     if test "x$BOOT_JDK_FOUND" = xmaybe; then
12458       # Do we have a bin/java?
12459       if test ! -x "$BOOT_JDK/bin/java"; then
12460         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12461 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12462         BOOT_JDK_FOUND=no
12463       else
12464         # Do we have a bin/javac?
12465         if test ! -x "$BOOT_JDK/bin/javac"; then
12466           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12467 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12468           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12469 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12470           BOOT_JDK_FOUND=no
12471         else
12472           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12473           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12474             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12475 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12476             BOOT_JDK_FOUND=no
12477           else
12478             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12479             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12480 
12481             # Extra M4 quote needed to protect [] in grep expression.
12482             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12483             if test "x$FOUND_VERSION_78" = x; then
12484               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12485 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12486               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12487 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12488               BOOT_JDK_FOUND=no
12489             else
12490               # We're done! :-)
12491               BOOT_JDK_FOUND=yes
12492 
12493   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12494 
12495   # Input might be given as Windows format, start by converting to
12496   # unix format.
12497   path="$BOOT_JDK"
12498   new_path=`$CYGPATH -u "$path"`
12499 
12500   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12501   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12502   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12503   # "foo.exe" is OK but "foo" is an error.
12504   #
12505   # This test is therefore slightly more accurate than "test -f" to check for file precense.
12506   # It is also a way to make sure we got the proper file name for the real test later on.
12507   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12508   if test "x$test_shortpath" = x; then
12509     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12510 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12511     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12512   fi
12513 
12514   # Call helper function which possibly converts this using DOS-style short mode.
12515   # If so, the updated path is stored in $new_path.
12516 
12517   input_path="$new_path"
12518   # Check if we need to convert this using DOS-style short mode. If the path
12519   # contains just simple characters, use it. Otherwise (spaces, weird characters),
12520   # take no chances and rewrite it.
12521   # Note: m4 eats our [], so we need to use [ and ] instead.
12522   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12523   if test "x$has_forbidden_chars" != x; then
12524     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12525     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12526     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12527     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12528       # Going to short mode and back again did indeed matter. Since short mode is
12529       # case insensitive, let's make it lowercase to improve readability.
12530       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12531       # Now convert it back to Unix-stile (cygpath)
12532       input_path=`$CYGPATH -u "$shortmode_path"`
12533       new_path="$input_path"
12534     fi
12535   fi
12536 
12537   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12538   if test "x$test_cygdrive_prefix" = x; then
12539     # As a simple fix, exclude /usr/bin since it's not a real path.
12540     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12541       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12542       # a path prefixed by /cygdrive for fixpath to work.
12543       new_path="$CYGWIN_ROOT_PATH$input_path"
12544     fi
12545   fi
12546 
12547 
12548   if test "x$path" != "x$new_path"; then
12549     BOOT_JDK="$new_path"
12550     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12551 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12552   fi
12553 
12554   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12555 
12556   path="$BOOT_JDK"
12557   has_colon=`$ECHO $path | $GREP ^.:`
12558   new_path="$path"
12559   if test "x$has_colon" = x; then
12560     # Not in mixed or Windows style, start by that.
12561     new_path=`cmd //c echo $path`
12562   fi
12563 
12564 
12565   input_path="$new_path"
12566   # Check if we need to convert this using DOS-style short mode. If the path
12567   # contains just simple characters, use it. Otherwise (spaces, weird characters),
12568   # take no chances and rewrite it.
12569   # Note: m4 eats our [], so we need to use [ and ] instead.
12570   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12571   if test "x$has_forbidden_chars" != x; then
12572     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12573     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12574   fi
12575 
12576 
12577   windows_path="$new_path"
12578   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12579     unix_path=`$CYGPATH -u "$windows_path"`
12580     new_path="$unix_path"
12581   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12582     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12583     new_path="$unix_path"
12584   fi
12585 
12586   if test "x$path" != "x$new_path"; then
12587     BOOT_JDK="$new_path"
12588     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12589 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12590   fi
12591 
12592   # Save the first 10 bytes of this path to the storage, so fixpath can work.
12593   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12594 
12595   else
12596     # We're on a posix platform. Hooray! :)
12597     path="$BOOT_JDK"
12598 
12599     if test ! -f "$path" && test ! -d "$path"; then
12600       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
12601     fi
12602 
12603     has_space=`$ECHO "$path" | $GREP " "`
12604     if test "x$has_space" != x; then
12605       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12606 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12607       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
12608     fi
12609   fi
12610 
12611               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12612 $as_echo_n "checking for Boot JDK... " >&6; }
12613               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12614 $as_echo "$BOOT_JDK" >&6; }
12615               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12616 $as_echo_n "checking Boot JDK version... " >&6; }
12617               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12618               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12619 $as_echo "$BOOT_JDK_VERSION" >&6; }
12620             fi # end check jdk version
12621           fi # end check rt.jar
12622         fi # end check javac
12623       fi # end check java
12624     fi # end check boot jdk found
12625   fi
12626 
12627 
12628   if test "x$BOOT_JDK_FOUND" = xno; then
12629     # Now execute the test
12630 
12631   if test "x$PROGRAMW6432" != x; then
12632     VIRTUAL_DIR="$PROGRAMW6432/Java"
12633 
12634   windows_path="$VIRTUAL_DIR"
12635   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12636     unix_path=`$CYGPATH -u "$windows_path"`
12637     VIRTUAL_DIR="$unix_path"
12638   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12639     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12640     VIRTUAL_DIR="$unix_path"
12641   fi
12642 
12643 
12644   BOOT_JDK_PREFIX="$VIRTUAL_DIR"
12645   BOOT_JDK_SUFFIX=""
12646   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
12647   if test "x$ALL_JDKS_FOUND" != x; then
12648     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
12649 
12650   if test "x$BOOT_JDK_FOUND" = xno; then
12651     # Now execute the test
12652 
12653         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
12654         if test -d "$BOOT_JDK"; then
12655           BOOT_JDK_FOUND=maybe
12656           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
12657 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
12658         fi
12659 
12660 
12661     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12662     if test "x$BOOT_JDK_FOUND" = xmaybe; then
12663       # Do we have a bin/java?
12664       if test ! -x "$BOOT_JDK/bin/java"; then
12665         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12666 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12667         BOOT_JDK_FOUND=no
12668       else
12669         # Do we have a bin/javac?
12670         if test ! -x "$BOOT_JDK/bin/javac"; then
12671           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12672 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12673           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12674 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12675           BOOT_JDK_FOUND=no
12676         else
12677           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12678           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12679             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12680 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12681             BOOT_JDK_FOUND=no
12682           else
12683             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12684             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12685 
12686             # Extra M4 quote needed to protect [] in grep expression.
12687             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12688             if test "x$FOUND_VERSION_78" = x; then
12689               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12690 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12691               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12692 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12693               BOOT_JDK_FOUND=no
12694             else
12695               # We're done! :-)
12696               BOOT_JDK_FOUND=yes
12697 
12698   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12699 
12700   # Input might be given as Windows format, start by converting to
12701   # unix format.
12702   path="$BOOT_JDK"
12703   new_path=`$CYGPATH -u "$path"`
12704 
12705   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12706   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12707   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12708   # "foo.exe" is OK but "foo" is an error.
12709   #
12710   # This test is therefore slightly more accurate than "test -f" to check for file precense.
12711   # It is also a way to make sure we got the proper file name for the real test later on.
12712   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12713   if test "x$test_shortpath" = x; then
12714     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12715 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12716     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12717   fi
12718 
12719   # Call helper function which possibly converts this using DOS-style short mode.
12720   # If so, the updated path is stored in $new_path.
12721 
12722   input_path="$new_path"
12723   # Check if we need to convert this using DOS-style short mode. If the path
12724   # contains just simple characters, use it. Otherwise (spaces, weird characters),
12725   # take no chances and rewrite it.
12726   # Note: m4 eats our [], so we need to use [ and ] instead.
12727   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12728   if test "x$has_forbidden_chars" != x; then
12729     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12730     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12731     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12732     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12733       # Going to short mode and back again did indeed matter. Since short mode is
12734       # case insensitive, let's make it lowercase to improve readability.
12735       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12736       # Now convert it back to Unix-stile (cygpath)
12737       input_path=`$CYGPATH -u "$shortmode_path"`
12738       new_path="$input_path"
12739     fi
12740   fi
12741 
12742   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12743   if test "x$test_cygdrive_prefix" = x; then
12744     # As a simple fix, exclude /usr/bin since it's not a real path.
12745     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12746       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12747       # a path prefixed by /cygdrive for fixpath to work.
12748       new_path="$CYGWIN_ROOT_PATH$input_path"
12749     fi
12750   fi
12751 
12752 
12753   if test "x$path" != "x$new_path"; then
12754     BOOT_JDK="$new_path"
12755     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12756 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12757   fi
12758 
12759   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12760 
12761   path="$BOOT_JDK"
12762   has_colon=`$ECHO $path | $GREP ^.:`
12763   new_path="$path"
12764   if test "x$has_colon" = x; then
12765     # Not in mixed or Windows style, start by that.
12766     new_path=`cmd //c echo $path`
12767   fi
12768 
12769 
12770   input_path="$new_path"
12771   # Check if we need to convert this using DOS-style short mode. If the path
12772   # contains just simple characters, use it. Otherwise (spaces, weird characters),
12773   # take no chances and rewrite it.
12774   # Note: m4 eats our [], so we need to use [ and ] instead.
12775   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12776   if test "x$has_forbidden_chars" != x; then
12777     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12778     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12779   fi
12780 
12781 
12782   windows_path="$new_path"
12783   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12784     unix_path=`$CYGPATH -u "$windows_path"`
12785     new_path="$unix_path"
12786   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12787     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12788     new_path="$unix_path"
12789   fi
12790 
12791   if test "x$path" != "x$new_path"; then
12792     BOOT_JDK="$new_path"
12793     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12794 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12795   fi
12796 
12797   # Save the first 10 bytes of this path to the storage, so fixpath can work.
12798   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12799 
12800   else
12801     # We're on a posix platform. Hooray! :)
12802     path="$BOOT_JDK"
12803 
12804     if test ! -f "$path" && test ! -d "$path"; then
12805       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
12806     fi
12807 
12808     has_space=`$ECHO "$path" | $GREP " "`
12809     if test "x$has_space" != x; then
12810       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12811 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12812       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
12813     fi
12814   fi
12815 
12816               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12817 $as_echo_n "checking for Boot JDK... " >&6; }
12818               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12819 $as_echo "$BOOT_JDK" >&6; }
12820               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12821 $as_echo_n "checking Boot JDK version... " >&6; }
12822               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12823               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12824 $as_echo "$BOOT_JDK_VERSION" >&6; }
12825             fi # end check jdk version
12826           fi # end check rt.jar
12827         fi # end check javac
12828       fi # end check java
12829     fi # end check boot jdk found
12830   fi
12831 
12832     done
12833   fi
12834 
12835   fi
12836 
12837 
12838     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12839     if test "x$BOOT_JDK_FOUND" = xmaybe; then
12840       # Do we have a bin/java?
12841       if test ! -x "$BOOT_JDK/bin/java"; then
12842         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12843 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12844         BOOT_JDK_FOUND=no
12845       else
12846         # Do we have a bin/javac?
12847         if test ! -x "$BOOT_JDK/bin/javac"; then
12848           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12849 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12850           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12851 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12852           BOOT_JDK_FOUND=no
12853         else
12854           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12855           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12856             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12857 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12858             BOOT_JDK_FOUND=no
12859           else
12860             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12861             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12862 
12863             # Extra M4 quote needed to protect [] in grep expression.
12864             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12865             if test "x$FOUND_VERSION_78" = x; then
12866               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12867 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12868               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12869 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12870               BOOT_JDK_FOUND=no
12871             else
12872               # We're done! :-)
12873               BOOT_JDK_FOUND=yes
12874 
12875   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12876 
12877   # Input might be given as Windows format, start by converting to
12878   # unix format.
12879   path="$BOOT_JDK"
12880   new_path=`$CYGPATH -u "$path"`
12881 
12882   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12883   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12884   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12885   # "foo.exe" is OK but "foo" is an error.
12886   #
12887   # This test is therefore slightly more accurate than "test -f" to check for file precense.
12888   # It is also a way to make sure we got the proper file name for the real test later on.
12889   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12890   if test "x$test_shortpath" = x; then
12891     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12892 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12893     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12894   fi
12895 
12896   # Call helper function which possibly converts this using DOS-style short mode.
12897   # If so, the updated path is stored in $new_path.
12898 
12899   input_path="$new_path"
12900   # Check if we need to convert this using DOS-style short mode. If the path
12901   # contains just simple characters, use it. Otherwise (spaces, weird characters),
12902   # take no chances and rewrite it.
12903   # Note: m4 eats our [], so we need to use [ and ] instead.
12904   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12905   if test "x$has_forbidden_chars" != x; then
12906     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12907     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12908     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12909     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12910       # Going to short mode and back again did indeed matter. Since short mode is
12911       # case insensitive, let's make it lowercase to improve readability.
12912       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12913       # Now convert it back to Unix-stile (cygpath)
12914       input_path=`$CYGPATH -u "$shortmode_path"`
12915       new_path="$input_path"
12916     fi
12917   fi
12918 
12919   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12920   if test "x$test_cygdrive_prefix" = x; then
12921     # As a simple fix, exclude /usr/bin since it's not a real path.
12922     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12923       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12924       # a path prefixed by /cygdrive for fixpath to work.
12925       new_path="$CYGWIN_ROOT_PATH$input_path"
12926     fi
12927   fi
12928 
12929 
12930   if test "x$path" != "x$new_path"; then
12931     BOOT_JDK="$new_path"
12932     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12933 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12934   fi
12935 
12936   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12937 
12938   path="$BOOT_JDK"
12939   has_colon=`$ECHO $path | $GREP ^.:`
12940   new_path="$path"
12941   if test "x$has_colon" = x; then
12942     # Not in mixed or Windows style, start by that.
12943     new_path=`cmd //c echo $path`
12944   fi
12945 
12946 
12947   input_path="$new_path"
12948   # Check if we need to convert this using DOS-style short mode. If the path
12949   # contains just simple characters, use it. Otherwise (spaces, weird characters),
12950   # take no chances and rewrite it.
12951   # Note: m4 eats our [], so we need to use [ and ] instead.
12952   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12953   if test "x$has_forbidden_chars" != x; then
12954     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12955     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12956   fi
12957 
12958 
12959   windows_path="$new_path"
12960   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12961     unix_path=`$CYGPATH -u "$windows_path"`
12962     new_path="$unix_path"
12963   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12964     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12965     new_path="$unix_path"
12966   fi
12967 
12968   if test "x$path" != "x$new_path"; then
12969     BOOT_JDK="$new_path"
12970     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12971 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12972   fi
12973 
12974   # Save the first 10 bytes of this path to the storage, so fixpath can work.
12975   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12976 
12977   else
12978     # We're on a posix platform. Hooray! :)
12979     path="$BOOT_JDK"
12980 
12981     if test ! -f "$path" && test ! -d "$path"; then
12982       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
12983     fi
12984 
12985     has_space=`$ECHO "$path" | $GREP " "`
12986     if test "x$has_space" != x; then
12987       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12988 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12989       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
12990     fi
12991   fi
12992 
12993               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12994 $as_echo_n "checking for Boot JDK... " >&6; }
12995               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12996 $as_echo "$BOOT_JDK" >&6; }
12997               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12998 $as_echo_n "checking Boot JDK version... " >&6; }
12999               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13000               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13001 $as_echo "$BOOT_JDK_VERSION" >&6; }
13002             fi # end check jdk version
13003           fi # end check rt.jar
13004         fi # end check javac
13005       fi # end check java
13006     fi # end check boot jdk found
13007   fi
13008 
13009 
13010   if test "x$BOOT_JDK_FOUND" = xno; then
13011     # Now execute the test
13012 
13013   if test "x$PROGRAMFILES" != x; then
13014     VIRTUAL_DIR="$PROGRAMFILES/Java"
13015 
13016   windows_path="$VIRTUAL_DIR"
13017   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13018     unix_path=`$CYGPATH -u "$windows_path"`
13019     VIRTUAL_DIR="$unix_path"
13020   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13021     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13022     VIRTUAL_DIR="$unix_path"
13023   fi
13024 
13025 
13026   BOOT_JDK_PREFIX="$VIRTUAL_DIR"
13027   BOOT_JDK_SUFFIX=""
13028   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
13029   if test "x$ALL_JDKS_FOUND" != x; then
13030     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
13031 
13032   if test "x$BOOT_JDK_FOUND" = xno; then
13033     # Now execute the test
13034 
13035         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
13036         if test -d "$BOOT_JDK"; then
13037           BOOT_JDK_FOUND=maybe
13038           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
13039 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
13040         fi
13041 
13042 
13043     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13044     if test "x$BOOT_JDK_FOUND" = xmaybe; then
13045       # Do we have a bin/java?
13046       if test ! -x "$BOOT_JDK/bin/java"; then
13047         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13048 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13049         BOOT_JDK_FOUND=no
13050       else
13051         # Do we have a bin/javac?
13052         if test ! -x "$BOOT_JDK/bin/javac"; then
13053           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13054 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13055           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13056 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13057           BOOT_JDK_FOUND=no
13058         else
13059           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13060           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13061             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13062 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13063             BOOT_JDK_FOUND=no
13064           else
13065             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13066             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13067 
13068             # Extra M4 quote needed to protect [] in grep expression.
13069             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13070             if test "x$FOUND_VERSION_78" = x; then
13071               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13072 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13073               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13074 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13075               BOOT_JDK_FOUND=no
13076             else
13077               # We're done! :-)
13078               BOOT_JDK_FOUND=yes
13079 
13080   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13081 
13082   # Input might be given as Windows format, start by converting to
13083   # unix format.
13084   path="$BOOT_JDK"
13085   new_path=`$CYGPATH -u "$path"`
13086 
13087   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13088   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13089   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13090   # "foo.exe" is OK but "foo" is an error.
13091   #
13092   # This test is therefore slightly more accurate than "test -f" to check for file precense.
13093   # It is also a way to make sure we got the proper file name for the real test later on.
13094   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13095   if test "x$test_shortpath" = x; then
13096     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13097 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13098     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13099   fi
13100 
13101   # Call helper function which possibly converts this using DOS-style short mode.
13102   # If so, the updated path is stored in $new_path.
13103 
13104   input_path="$new_path"
13105   # Check if we need to convert this using DOS-style short mode. If the path
13106   # contains just simple characters, use it. Otherwise (spaces, weird characters),
13107   # take no chances and rewrite it.
13108   # Note: m4 eats our [], so we need to use [ and ] instead.
13109   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13110   if test "x$has_forbidden_chars" != x; then
13111     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13112     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13113     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13114     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13115       # Going to short mode and back again did indeed matter. Since short mode is
13116       # case insensitive, let's make it lowercase to improve readability.
13117       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13118       # Now convert it back to Unix-stile (cygpath)
13119       input_path=`$CYGPATH -u "$shortmode_path"`
13120       new_path="$input_path"
13121     fi
13122   fi
13123 
13124   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13125   if test "x$test_cygdrive_prefix" = x; then
13126     # As a simple fix, exclude /usr/bin since it's not a real path.
13127     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13128       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13129       # a path prefixed by /cygdrive for fixpath to work.
13130       new_path="$CYGWIN_ROOT_PATH$input_path"
13131     fi
13132   fi
13133 
13134 
13135   if test "x$path" != "x$new_path"; then
13136     BOOT_JDK="$new_path"
13137     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13138 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13139   fi
13140 
13141   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13142 
13143   path="$BOOT_JDK"
13144   has_colon=`$ECHO $path | $GREP ^.:`
13145   new_path="$path"
13146   if test "x$has_colon" = x; then
13147     # Not in mixed or Windows style, start by that.
13148     new_path=`cmd //c echo $path`
13149   fi
13150 
13151 
13152   input_path="$new_path"
13153   # Check if we need to convert this using DOS-style short mode. If the path
13154   # contains just simple characters, use it. Otherwise (spaces, weird characters),
13155   # take no chances and rewrite it.
13156   # Note: m4 eats our [], so we need to use [ and ] instead.
13157   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13158   if test "x$has_forbidden_chars" != x; then
13159     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13160     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13161   fi
13162 
13163 
13164   windows_path="$new_path"
13165   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13166     unix_path=`$CYGPATH -u "$windows_path"`
13167     new_path="$unix_path"
13168   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13169     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13170     new_path="$unix_path"
13171   fi
13172 
13173   if test "x$path" != "x$new_path"; then
13174     BOOT_JDK="$new_path"
13175     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13176 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13177   fi
13178 
13179   # Save the first 10 bytes of this path to the storage, so fixpath can work.
13180   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13181 
13182   else
13183     # We're on a posix platform. Hooray! :)
13184     path="$BOOT_JDK"
13185 
13186     if test ! -f "$path" && test ! -d "$path"; then
13187       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13188     fi
13189 
13190     has_space=`$ECHO "$path" | $GREP " "`
13191     if test "x$has_space" != x; then
13192       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13193 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13194       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13195     fi
13196   fi
13197 
13198               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13199 $as_echo_n "checking for Boot JDK... " >&6; }
13200               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13201 $as_echo "$BOOT_JDK" >&6; }
13202               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13203 $as_echo_n "checking Boot JDK version... " >&6; }
13204               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13205               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13206 $as_echo "$BOOT_JDK_VERSION" >&6; }
13207             fi # end check jdk version
13208           fi # end check rt.jar
13209         fi # end check javac
13210       fi # end check java
13211     fi # end check boot jdk found
13212   fi
13213 
13214     done
13215   fi
13216 
13217   fi
13218 
13219 
13220     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13221     if test "x$BOOT_JDK_FOUND" = xmaybe; then
13222       # Do we have a bin/java?
13223       if test ! -x "$BOOT_JDK/bin/java"; then
13224         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13225 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13226         BOOT_JDK_FOUND=no
13227       else
13228         # Do we have a bin/javac?
13229         if test ! -x "$BOOT_JDK/bin/javac"; then
13230           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13231 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13232           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13233 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13234           BOOT_JDK_FOUND=no
13235         else
13236           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13237           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13238             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13239 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13240             BOOT_JDK_FOUND=no
13241           else
13242             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13243             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13244 
13245             # Extra M4 quote needed to protect [] in grep expression.
13246             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13247             if test "x$FOUND_VERSION_78" = x; then
13248               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13249 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13250               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13251 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13252               BOOT_JDK_FOUND=no
13253             else
13254               # We're done! :-)
13255               BOOT_JDK_FOUND=yes
13256 
13257   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13258 
13259   # Input might be given as Windows format, start by converting to
13260   # unix format.
13261   path="$BOOT_JDK"
13262   new_path=`$CYGPATH -u "$path"`
13263 
13264   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13265   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13266   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13267   # "foo.exe" is OK but "foo" is an error.
13268   #
13269   # This test is therefore slightly more accurate than "test -f" to check for file precense.
13270   # It is also a way to make sure we got the proper file name for the real test later on.
13271   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13272   if test "x$test_shortpath" = x; then
13273     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13274 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13275     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13276   fi
13277 
13278   # Call helper function which possibly converts this using DOS-style short mode.
13279   # If so, the updated path is stored in $new_path.
13280 
13281   input_path="$new_path"
13282   # Check if we need to convert this using DOS-style short mode. If the path
13283   # contains just simple characters, use it. Otherwise (spaces, weird characters),
13284   # take no chances and rewrite it.
13285   # Note: m4 eats our [], so we need to use [ and ] instead.
13286   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13287   if test "x$has_forbidden_chars" != x; then
13288     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13289     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13290     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13291     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13292       # Going to short mode and back again did indeed matter. Since short mode is
13293       # case insensitive, let's make it lowercase to improve readability.
13294       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13295       # Now convert it back to Unix-stile (cygpath)
13296       input_path=`$CYGPATH -u "$shortmode_path"`
13297       new_path="$input_path"
13298     fi
13299   fi
13300 
13301   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13302   if test "x$test_cygdrive_prefix" = x; then
13303     # As a simple fix, exclude /usr/bin since it's not a real path.
13304     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13305       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13306       # a path prefixed by /cygdrive for fixpath to work.
13307       new_path="$CYGWIN_ROOT_PATH$input_path"
13308     fi
13309   fi
13310 
13311 
13312   if test "x$path" != "x$new_path"; then
13313     BOOT_JDK="$new_path"
13314     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13315 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13316   fi
13317 
13318   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13319 
13320   path="$BOOT_JDK"
13321   has_colon=`$ECHO $path | $GREP ^.:`
13322   new_path="$path"
13323   if test "x$has_colon" = x; then
13324     # Not in mixed or Windows style, start by that.
13325     new_path=`cmd //c echo $path`
13326   fi
13327 
13328 
13329   input_path="$new_path"
13330   # Check if we need to convert this using DOS-style short mode. If the path
13331   # contains just simple characters, use it. Otherwise (spaces, weird characters),
13332   # take no chances and rewrite it.
13333   # Note: m4 eats our [], so we need to use [ and ] instead.
13334   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13335   if test "x$has_forbidden_chars" != x; then
13336     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13337     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13338   fi
13339 
13340 
13341   windows_path="$new_path"
13342   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13343     unix_path=`$CYGPATH -u "$windows_path"`
13344     new_path="$unix_path"
13345   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13346     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13347     new_path="$unix_path"
13348   fi
13349 
13350   if test "x$path" != "x$new_path"; then
13351     BOOT_JDK="$new_path"
13352     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13353 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13354   fi
13355 
13356   # Save the first 10 bytes of this path to the storage, so fixpath can work.
13357   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13358 
13359   else
13360     # We're on a posix platform. Hooray! :)
13361     path="$BOOT_JDK"
13362 
13363     if test ! -f "$path" && test ! -d "$path"; then
13364       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13365     fi
13366 
13367     has_space=`$ECHO "$path" | $GREP " "`
13368     if test "x$has_space" != x; then
13369       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13370 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13371       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13372     fi
13373   fi
13374 
13375               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13376 $as_echo_n "checking for Boot JDK... " >&6; }
13377               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13378 $as_echo "$BOOT_JDK" >&6; }
13379               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13380 $as_echo_n "checking Boot JDK version... " >&6; }
13381               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13382               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13383 $as_echo "$BOOT_JDK_VERSION" >&6; }
13384             fi # end check jdk version
13385           fi # end check rt.jar
13386         fi # end check javac
13387       fi # end check java
13388     fi # end check boot jdk found
13389   fi
13390 
13391 
13392   if test "x$BOOT_JDK_FOUND" = xno; then
13393     # Now execute the test
13394 
13395   if test "x$ProgramFiles" != x; then
13396     VIRTUAL_DIR="$ProgramFiles/Java"
13397 
13398   windows_path="$VIRTUAL_DIR"
13399   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13400     unix_path=`$CYGPATH -u "$windows_path"`
13401     VIRTUAL_DIR="$unix_path"
13402   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13403     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13404     VIRTUAL_DIR="$unix_path"
13405   fi
13406 
13407 
13408   BOOT_JDK_PREFIX="$VIRTUAL_DIR"
13409   BOOT_JDK_SUFFIX=""
13410   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
13411   if test "x$ALL_JDKS_FOUND" != x; then
13412     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
13413 
13414   if test "x$BOOT_JDK_FOUND" = xno; then
13415     # Now execute the test
13416 
13417         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
13418         if test -d "$BOOT_JDK"; then
13419           BOOT_JDK_FOUND=maybe
13420           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
13421 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
13422         fi
13423 
13424 
13425     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13426     if test "x$BOOT_JDK_FOUND" = xmaybe; then
13427       # Do we have a bin/java?
13428       if test ! -x "$BOOT_JDK/bin/java"; then
13429         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13430 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13431         BOOT_JDK_FOUND=no
13432       else
13433         # Do we have a bin/javac?
13434         if test ! -x "$BOOT_JDK/bin/javac"; then
13435           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13436 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13437           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13438 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13439           BOOT_JDK_FOUND=no
13440         else
13441           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13442           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13443             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13444 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13445             BOOT_JDK_FOUND=no
13446           else
13447             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13448             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13449 
13450             # Extra M4 quote needed to protect [] in grep expression.
13451             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13452             if test "x$FOUND_VERSION_78" = x; then
13453               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13454 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13455               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13456 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13457               BOOT_JDK_FOUND=no
13458             else
13459               # We're done! :-)
13460               BOOT_JDK_FOUND=yes
13461 
13462   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13463 
13464   # Input might be given as Windows format, start by converting to
13465   # unix format.
13466   path="$BOOT_JDK"
13467   new_path=`$CYGPATH -u "$path"`
13468 
13469   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13470   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13471   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13472   # "foo.exe" is OK but "foo" is an error.
13473   #
13474   # This test is therefore slightly more accurate than "test -f" to check for file precense.
13475   # It is also a way to make sure we got the proper file name for the real test later on.
13476   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13477   if test "x$test_shortpath" = x; then
13478     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13479 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13480     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13481   fi
13482 
13483   # Call helper function which possibly converts this using DOS-style short mode.
13484   # If so, the updated path is stored in $new_path.
13485 
13486   input_path="$new_path"
13487   # Check if we need to convert this using DOS-style short mode. If the path
13488   # contains just simple characters, use it. Otherwise (spaces, weird characters),
13489   # take no chances and rewrite it.
13490   # Note: m4 eats our [], so we need to use [ and ] instead.
13491   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13492   if test "x$has_forbidden_chars" != x; then
13493     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13494     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13495     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13496     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13497       # Going to short mode and back again did indeed matter. Since short mode is
13498       # case insensitive, let's make it lowercase to improve readability.
13499       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13500       # Now convert it back to Unix-stile (cygpath)
13501       input_path=`$CYGPATH -u "$shortmode_path"`
13502       new_path="$input_path"
13503     fi
13504   fi
13505 
13506   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13507   if test "x$test_cygdrive_prefix" = x; then
13508     # As a simple fix, exclude /usr/bin since it's not a real path.
13509     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13510       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13511       # a path prefixed by /cygdrive for fixpath to work.
13512       new_path="$CYGWIN_ROOT_PATH$input_path"
13513     fi
13514   fi
13515 
13516 
13517   if test "x$path" != "x$new_path"; then
13518     BOOT_JDK="$new_path"
13519     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13520 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13521   fi
13522 
13523   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13524 
13525   path="$BOOT_JDK"
13526   has_colon=`$ECHO $path | $GREP ^.:`
13527   new_path="$path"
13528   if test "x$has_colon" = x; then
13529     # Not in mixed or Windows style, start by that.
13530     new_path=`cmd //c echo $path`
13531   fi
13532 
13533 
13534   input_path="$new_path"
13535   # Check if we need to convert this using DOS-style short mode. If the path
13536   # contains just simple characters, use it. Otherwise (spaces, weird characters),
13537   # take no chances and rewrite it.
13538   # Note: m4 eats our [], so we need to use [ and ] instead.
13539   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13540   if test "x$has_forbidden_chars" != x; then
13541     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13542     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13543   fi
13544 
13545 
13546   windows_path="$new_path"
13547   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13548     unix_path=`$CYGPATH -u "$windows_path"`
13549     new_path="$unix_path"
13550   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13551     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13552     new_path="$unix_path"
13553   fi
13554 
13555   if test "x$path" != "x$new_path"; then
13556     BOOT_JDK="$new_path"
13557     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13558 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13559   fi
13560 
13561   # Save the first 10 bytes of this path to the storage, so fixpath can work.
13562   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13563 
13564   else
13565     # We're on a posix platform. Hooray! :)
13566     path="$BOOT_JDK"
13567 
13568     if test ! -f "$path" && test ! -d "$path"; then
13569       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13570     fi
13571 
13572     has_space=`$ECHO "$path" | $GREP " "`
13573     if test "x$has_space" != x; then
13574       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13575 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13576       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13577     fi
13578   fi
13579 
13580               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13581 $as_echo_n "checking for Boot JDK... " >&6; }
13582               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13583 $as_echo "$BOOT_JDK" >&6; }
13584               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13585 $as_echo_n "checking Boot JDK version... " >&6; }
13586               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13587               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13588 $as_echo "$BOOT_JDK_VERSION" >&6; }
13589             fi # end check jdk version
13590           fi # end check rt.jar
13591         fi # end check javac
13592       fi # end check java
13593     fi # end check boot jdk found
13594   fi
13595 
13596     done
13597   fi
13598 
13599   fi
13600 
13601 
13602     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13603     if test "x$BOOT_JDK_FOUND" = xmaybe; then
13604       # Do we have a bin/java?
13605       if test ! -x "$BOOT_JDK/bin/java"; then
13606         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13607 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13608         BOOT_JDK_FOUND=no
13609       else
13610         # Do we have a bin/javac?
13611         if test ! -x "$BOOT_JDK/bin/javac"; then
13612           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13613 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13614           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13615 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13616           BOOT_JDK_FOUND=no
13617         else
13618           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13619           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13620             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13621 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13622             BOOT_JDK_FOUND=no
13623           else
13624             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13625             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13626 
13627             # Extra M4 quote needed to protect [] in grep expression.
13628             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13629             if test "x$FOUND_VERSION_78" = x; then
13630               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13631 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13632               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13633 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13634               BOOT_JDK_FOUND=no
13635             else
13636               # We're done! :-)
13637               BOOT_JDK_FOUND=yes
13638 
13639   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13640 
13641   # Input might be given as Windows format, start by converting to
13642   # unix format.
13643   path="$BOOT_JDK"
13644   new_path=`$CYGPATH -u "$path"`
13645 
13646   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13647   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13648   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13649   # "foo.exe" is OK but "foo" is an error.
13650   #
13651   # This test is therefore slightly more accurate than "test -f" to check for file precense.
13652   # It is also a way to make sure we got the proper file name for the real test later on.
13653   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13654   if test "x$test_shortpath" = x; then
13655     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13656 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13657     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13658   fi
13659 
13660   # Call helper function which possibly converts this using DOS-style short mode.
13661   # If so, the updated path is stored in $new_path.
13662 
13663   input_path="$new_path"
13664   # Check if we need to convert this using DOS-style short mode. If the path
13665   # contains just simple characters, use it. Otherwise (spaces, weird characters),
13666   # take no chances and rewrite it.
13667   # Note: m4 eats our [], so we need to use [ and ] instead.
13668   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13669   if test "x$has_forbidden_chars" != x; then
13670     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13671     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13672     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13673     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13674       # Going to short mode and back again did indeed matter. Since short mode is
13675       # case insensitive, let's make it lowercase to improve readability.
13676       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13677       # Now convert it back to Unix-stile (cygpath)
13678       input_path=`$CYGPATH -u "$shortmode_path"`
13679       new_path="$input_path"
13680     fi
13681   fi
13682 
13683   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13684   if test "x$test_cygdrive_prefix" = x; then
13685     # As a simple fix, exclude /usr/bin since it's not a real path.
13686     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13687       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13688       # a path prefixed by /cygdrive for fixpath to work.
13689       new_path="$CYGWIN_ROOT_PATH$input_path"
13690     fi
13691   fi
13692 
13693 
13694   if test "x$path" != "x$new_path"; then
13695     BOOT_JDK="$new_path"
13696     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13697 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13698   fi
13699 
13700   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13701 
13702   path="$BOOT_JDK"
13703   has_colon=`$ECHO $path | $GREP ^.:`
13704   new_path="$path"
13705   if test "x$has_colon" = x; then
13706     # Not in mixed or Windows style, start by that.
13707     new_path=`cmd //c echo $path`
13708   fi
13709 
13710 
13711   input_path="$new_path"
13712   # Check if we need to convert this using DOS-style short mode. If the path
13713   # contains just simple characters, use it. Otherwise (spaces, weird characters),
13714   # take no chances and rewrite it.
13715   # Note: m4 eats our [], so we need to use [ and ] instead.
13716   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13717   if test "x$has_forbidden_chars" != x; then
13718     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13719     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13720   fi
13721 
13722 
13723   windows_path="$new_path"
13724   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13725     unix_path=`$CYGPATH -u "$windows_path"`
13726     new_path="$unix_path"
13727   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13728     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13729     new_path="$unix_path"
13730   fi
13731 
13732   if test "x$path" != "x$new_path"; then
13733     BOOT_JDK="$new_path"
13734     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13735 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13736   fi
13737 
13738   # Save the first 10 bytes of this path to the storage, so fixpath can work.
13739   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13740 
13741   else
13742     # We're on a posix platform. Hooray! :)
13743     path="$BOOT_JDK"
13744 
13745     if test ! -f "$path" && test ! -d "$path"; then
13746       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13747     fi
13748 
13749     has_space=`$ECHO "$path" | $GREP " "`
13750     if test "x$has_space" != x; then
13751       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13752 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13753       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13754     fi
13755   fi
13756 
13757               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13758 $as_echo_n "checking for Boot JDK... " >&6; }
13759               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13760 $as_echo "$BOOT_JDK" >&6; }
13761               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13762 $as_echo_n "checking Boot JDK version... " >&6; }
13763               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13764               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13765 $as_echo "$BOOT_JDK_VERSION" >&6; }
13766             fi # end check jdk version
13767           fi # end check rt.jar
13768         fi # end check javac
13769       fi # end check java
13770     fi # end check boot jdk found
13771   fi
13772 
13773 
13774   if test "x$BOOT_JDK_FOUND" = xno; then
13775     # Now execute the test
13776 
13777   BOOT_JDK_PREFIX="/cygdrive/c/Program Files/Java"
13778   BOOT_JDK_SUFFIX=""
13779   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
13780   if test "x$ALL_JDKS_FOUND" != x; then
13781     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
13782 
13783   if test "x$BOOT_JDK_FOUND" = xno; then
13784     # Now execute the test
13785 
13786         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
13787         if test -d "$BOOT_JDK"; then
13788           BOOT_JDK_FOUND=maybe
13789           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
13790 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
13791         fi
13792 
13793 
13794     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13795     if test "x$BOOT_JDK_FOUND" = xmaybe; then
13796       # Do we have a bin/java?
13797       if test ! -x "$BOOT_JDK/bin/java"; then
13798         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13799 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13800         BOOT_JDK_FOUND=no
13801       else
13802         # Do we have a bin/javac?
13803         if test ! -x "$BOOT_JDK/bin/javac"; then
13804           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13805 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13806           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13807 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13808           BOOT_JDK_FOUND=no
13809         else
13810           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13811           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13812             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13813 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13814             BOOT_JDK_FOUND=no
13815           else
13816             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13817             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13818 
13819             # Extra M4 quote needed to protect [] in grep expression.
13820             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13821             if test "x$FOUND_VERSION_78" = x; then
13822               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13823 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13824               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13825 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13826               BOOT_JDK_FOUND=no
13827             else
13828               # We're done! :-)
13829               BOOT_JDK_FOUND=yes
13830 
13831   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13832 
13833   # Input might be given as Windows format, start by converting to
13834   # unix format.
13835   path="$BOOT_JDK"
13836   new_path=`$CYGPATH -u "$path"`
13837 
13838   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13839   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13840   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13841   # "foo.exe" is OK but "foo" is an error.
13842   #
13843   # This test is therefore slightly more accurate than "test -f" to check for file precense.
13844   # It is also a way to make sure we got the proper file name for the real test later on.
13845   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13846   if test "x$test_shortpath" = x; then
13847     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13848 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13849     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13850   fi
13851 
13852   # Call helper function which possibly converts this using DOS-style short mode.
13853   # If so, the updated path is stored in $new_path.
13854 
13855   input_path="$new_path"
13856   # Check if we need to convert this using DOS-style short mode. If the path
13857   # contains just simple characters, use it. Otherwise (spaces, weird characters),
13858   # take no chances and rewrite it.
13859   # Note: m4 eats our [], so we need to use [ and ] instead.
13860   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13861   if test "x$has_forbidden_chars" != x; then
13862     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13863     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13864     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13865     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13866       # Going to short mode and back again did indeed matter. Since short mode is
13867       # case insensitive, let's make it lowercase to improve readability.
13868       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13869       # Now convert it back to Unix-stile (cygpath)
13870       input_path=`$CYGPATH -u "$shortmode_path"`
13871       new_path="$input_path"
13872     fi
13873   fi
13874 
13875   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13876   if test "x$test_cygdrive_prefix" = x; then
13877     # As a simple fix, exclude /usr/bin since it's not a real path.
13878     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13879       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13880       # a path prefixed by /cygdrive for fixpath to work.
13881       new_path="$CYGWIN_ROOT_PATH$input_path"
13882     fi
13883   fi
13884 
13885 
13886   if test "x$path" != "x$new_path"; then
13887     BOOT_JDK="$new_path"
13888     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13889 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13890   fi
13891 
13892   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13893 
13894   path="$BOOT_JDK"
13895   has_colon=`$ECHO $path | $GREP ^.:`
13896   new_path="$path"
13897   if test "x$has_colon" = x; then
13898     # Not in mixed or Windows style, start by that.
13899     new_path=`cmd //c echo $path`
13900   fi
13901 
13902 
13903   input_path="$new_path"
13904   # Check if we need to convert this using DOS-style short mode. If the path
13905   # contains just simple characters, use it. Otherwise (spaces, weird characters),
13906   # take no chances and rewrite it.
13907   # Note: m4 eats our [], so we need to use [ and ] instead.
13908   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13909   if test "x$has_forbidden_chars" != x; then
13910     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13911     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13912   fi
13913 
13914 
13915   windows_path="$new_path"
13916   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13917     unix_path=`$CYGPATH -u "$windows_path"`
13918     new_path="$unix_path"
13919   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13920     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13921     new_path="$unix_path"
13922   fi
13923 
13924   if test "x$path" != "x$new_path"; then
13925     BOOT_JDK="$new_path"
13926     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13927 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13928   fi
13929 
13930   # Save the first 10 bytes of this path to the storage, so fixpath can work.
13931   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13932 
13933   else
13934     # We're on a posix platform. Hooray! :)
13935     path="$BOOT_JDK"
13936 
13937     if test ! -f "$path" && test ! -d "$path"; then
13938       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13939     fi
13940 
13941     has_space=`$ECHO "$path" | $GREP " "`
13942     if test "x$has_space" != x; then
13943       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13944 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13945       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13946     fi
13947   fi
13948 
13949               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13950 $as_echo_n "checking for Boot JDK... " >&6; }
13951               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13952 $as_echo "$BOOT_JDK" >&6; }
13953               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13954 $as_echo_n "checking Boot JDK version... " >&6; }
13955               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13956               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13957 $as_echo "$BOOT_JDK_VERSION" >&6; }
13958             fi # end check jdk version
13959           fi # end check rt.jar
13960         fi # end check javac
13961       fi # end check java
13962     fi # end check boot jdk found
13963   fi
13964 
13965     done
13966   fi
13967 
13968 
13969     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13970     if test "x$BOOT_JDK_FOUND" = xmaybe; then
13971       # Do we have a bin/java?
13972       if test ! -x "$BOOT_JDK/bin/java"; then
13973         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13974 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13975         BOOT_JDK_FOUND=no
13976       else
13977         # Do we have a bin/javac?
13978         if test ! -x "$BOOT_JDK/bin/javac"; then
13979           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13980 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13981           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13982 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13983           BOOT_JDK_FOUND=no
13984         else
13985           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13986           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13987             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13988 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13989             BOOT_JDK_FOUND=no
13990           else
13991             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13992             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13993 
13994             # Extra M4 quote needed to protect [] in grep expression.
13995             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13996             if test "x$FOUND_VERSION_78" = x; then
13997               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13998 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13999               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14000 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14001               BOOT_JDK_FOUND=no
14002             else
14003               # We're done! :-)
14004               BOOT_JDK_FOUND=yes
14005 
14006   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14007 
14008   # Input might be given as Windows format, start by converting to
14009   # unix format.
14010   path="$BOOT_JDK"
14011   new_path=`$CYGPATH -u "$path"`
14012 
14013   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14014   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14015   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14016   # "foo.exe" is OK but "foo" is an error.
14017   #
14018   # This test is therefore slightly more accurate than "test -f" to check for file precense.
14019   # It is also a way to make sure we got the proper file name for the real test later on.
14020   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14021   if test "x$test_shortpath" = x; then
14022     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14023 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14024     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14025   fi
14026 
14027   # Call helper function which possibly converts this using DOS-style short mode.
14028   # If so, the updated path is stored in $new_path.
14029 
14030   input_path="$new_path"
14031   # Check if we need to convert this using DOS-style short mode. If the path
14032   # contains just simple characters, use it. Otherwise (spaces, weird characters),
14033   # take no chances and rewrite it.
14034   # Note: m4 eats our [], so we need to use [ and ] instead.
14035   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14036   if test "x$has_forbidden_chars" != x; then
14037     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14038     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14039     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14040     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14041       # Going to short mode and back again did indeed matter. Since short mode is
14042       # case insensitive, let's make it lowercase to improve readability.
14043       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14044       # Now convert it back to Unix-stile (cygpath)
14045       input_path=`$CYGPATH -u "$shortmode_path"`
14046       new_path="$input_path"
14047     fi
14048   fi
14049 
14050   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14051   if test "x$test_cygdrive_prefix" = x; then
14052     # As a simple fix, exclude /usr/bin since it's not a real path.
14053     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14054       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14055       # a path prefixed by /cygdrive for fixpath to work.
14056       new_path="$CYGWIN_ROOT_PATH$input_path"
14057     fi
14058   fi
14059 
14060 
14061   if test "x$path" != "x$new_path"; then
14062     BOOT_JDK="$new_path"
14063     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14064 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14065   fi
14066 
14067   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14068 
14069   path="$BOOT_JDK"
14070   has_colon=`$ECHO $path | $GREP ^.:`
14071   new_path="$path"
14072   if test "x$has_colon" = x; then
14073     # Not in mixed or Windows style, start by that.
14074     new_path=`cmd //c echo $path`
14075   fi
14076 
14077 
14078   input_path="$new_path"
14079   # Check if we need to convert this using DOS-style short mode. If the path
14080   # contains just simple characters, use it. Otherwise (spaces, weird characters),
14081   # take no chances and rewrite it.
14082   # Note: m4 eats our [], so we need to use [ and ] instead.
14083   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14084   if test "x$has_forbidden_chars" != x; then
14085     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14086     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14087   fi
14088 
14089 
14090   windows_path="$new_path"
14091   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14092     unix_path=`$CYGPATH -u "$windows_path"`
14093     new_path="$unix_path"
14094   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14095     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14096     new_path="$unix_path"
14097   fi
14098 
14099   if test "x$path" != "x$new_path"; then
14100     BOOT_JDK="$new_path"
14101     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14102 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14103   fi
14104 
14105   # Save the first 10 bytes of this path to the storage, so fixpath can work.
14106   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14107 
14108   else
14109     # We're on a posix platform. Hooray! :)
14110     path="$BOOT_JDK"
14111 
14112     if test ! -f "$path" && test ! -d "$path"; then
14113       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14114     fi
14115 
14116     has_space=`$ECHO "$path" | $GREP " "`
14117     if test "x$has_space" != x; then
14118       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14119 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14120       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14121     fi
14122   fi
14123 
14124               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14125 $as_echo_n "checking for Boot JDK... " >&6; }
14126               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14127 $as_echo "$BOOT_JDK" >&6; }
14128               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14129 $as_echo_n "checking Boot JDK version... " >&6; }
14130               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14131               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14132 $as_echo "$BOOT_JDK_VERSION" >&6; }
14133             fi # end check jdk version
14134           fi # end check rt.jar
14135         fi # end check javac
14136       fi # end check java
14137     fi # end check boot jdk found
14138   fi
14139 
14140   elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
14141 
14142   if test "x$BOOT_JDK_FOUND" = xno; then
14143     # Now execute the test
14144 
14145   BOOT_JDK_PREFIX="/Library/Java/JavaVirtualMachines"
14146   BOOT_JDK_SUFFIX="/Contents/Home"
14147   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
14148   if test "x$ALL_JDKS_FOUND" != x; then
14149     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
14150 
14151   if test "x$BOOT_JDK_FOUND" = xno; then
14152     # Now execute the test
14153 
14154         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
14155         if test -d "$BOOT_JDK"; then
14156           BOOT_JDK_FOUND=maybe
14157           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
14158 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
14159         fi
14160 
14161 
14162     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14163     if test "x$BOOT_JDK_FOUND" = xmaybe; then
14164       # Do we have a bin/java?
14165       if test ! -x "$BOOT_JDK/bin/java"; then
14166         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14167 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14168         BOOT_JDK_FOUND=no
14169       else
14170         # Do we have a bin/javac?
14171         if test ! -x "$BOOT_JDK/bin/javac"; then
14172           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14173 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14174           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14175 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14176           BOOT_JDK_FOUND=no
14177         else
14178           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14179           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14180             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14181 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14182             BOOT_JDK_FOUND=no
14183           else
14184             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14185             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14186 
14187             # Extra M4 quote needed to protect [] in grep expression.
14188             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14189             if test "x$FOUND_VERSION_78" = x; then
14190               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14191 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14192               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14193 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14194               BOOT_JDK_FOUND=no
14195             else
14196               # We're done! :-)
14197               BOOT_JDK_FOUND=yes
14198 
14199   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14200 
14201   # Input might be given as Windows format, start by converting to
14202   # unix format.
14203   path="$BOOT_JDK"
14204   new_path=`$CYGPATH -u "$path"`
14205 
14206   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14207   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14208   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14209   # "foo.exe" is OK but "foo" is an error.
14210   #
14211   # This test is therefore slightly more accurate than "test -f" to check for file precense.
14212   # It is also a way to make sure we got the proper file name for the real test later on.
14213   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14214   if test "x$test_shortpath" = x; then
14215     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14216 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14217     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14218   fi
14219 
14220   # Call helper function which possibly converts this using DOS-style short mode.
14221   # If so, the updated path is stored in $new_path.
14222 
14223   input_path="$new_path"
14224   # Check if we need to convert this using DOS-style short mode. If the path
14225   # contains just simple characters, use it. Otherwise (spaces, weird characters),
14226   # take no chances and rewrite it.
14227   # Note: m4 eats our [], so we need to use [ and ] instead.
14228   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14229   if test "x$has_forbidden_chars" != x; then
14230     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14231     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14232     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14233     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14234       # Going to short mode and back again did indeed matter. Since short mode is
14235       # case insensitive, let's make it lowercase to improve readability.
14236       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14237       # Now convert it back to Unix-stile (cygpath)
14238       input_path=`$CYGPATH -u "$shortmode_path"`
14239       new_path="$input_path"
14240     fi
14241   fi
14242 
14243   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14244   if test "x$test_cygdrive_prefix" = x; then
14245     # As a simple fix, exclude /usr/bin since it's not a real path.
14246     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14247       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14248       # a path prefixed by /cygdrive for fixpath to work.
14249       new_path="$CYGWIN_ROOT_PATH$input_path"
14250     fi
14251   fi
14252 
14253 
14254   if test "x$path" != "x$new_path"; then
14255     BOOT_JDK="$new_path"
14256     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14257 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14258   fi
14259 
14260   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14261 
14262   path="$BOOT_JDK"
14263   has_colon=`$ECHO $path | $GREP ^.:`
14264   new_path="$path"
14265   if test "x$has_colon" = x; then
14266     # Not in mixed or Windows style, start by that.
14267     new_path=`cmd //c echo $path`
14268   fi
14269 
14270 
14271   input_path="$new_path"
14272   # Check if we need to convert this using DOS-style short mode. If the path
14273   # contains just simple characters, use it. Otherwise (spaces, weird characters),
14274   # take no chances and rewrite it.
14275   # Note: m4 eats our [], so we need to use [ and ] instead.
14276   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14277   if test "x$has_forbidden_chars" != x; then
14278     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14279     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14280   fi
14281 
14282 
14283   windows_path="$new_path"
14284   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14285     unix_path=`$CYGPATH -u "$windows_path"`
14286     new_path="$unix_path"
14287   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14288     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14289     new_path="$unix_path"
14290   fi
14291 
14292   if test "x$path" != "x$new_path"; then
14293     BOOT_JDK="$new_path"
14294     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14295 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14296   fi
14297 
14298   # Save the first 10 bytes of this path to the storage, so fixpath can work.
14299   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14300 
14301   else
14302     # We're on a posix platform. Hooray! :)
14303     path="$BOOT_JDK"
14304 
14305     if test ! -f "$path" && test ! -d "$path"; then
14306       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14307     fi
14308 
14309     has_space=`$ECHO "$path" | $GREP " "`
14310     if test "x$has_space" != x; then
14311       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14312 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14313       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14314     fi
14315   fi
14316 
14317               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14318 $as_echo_n "checking for Boot JDK... " >&6; }
14319               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14320 $as_echo "$BOOT_JDK" >&6; }
14321               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14322 $as_echo_n "checking Boot JDK version... " >&6; }
14323               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14324               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14325 $as_echo "$BOOT_JDK_VERSION" >&6; }
14326             fi # end check jdk version
14327           fi # end check rt.jar
14328         fi # end check javac
14329       fi # end check java
14330     fi # end check boot jdk found
14331   fi
14332 
14333     done
14334   fi
14335 
14336 
14337     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14338     if test "x$BOOT_JDK_FOUND" = xmaybe; then
14339       # Do we have a bin/java?
14340       if test ! -x "$BOOT_JDK/bin/java"; then
14341         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14342 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14343         BOOT_JDK_FOUND=no
14344       else
14345         # Do we have a bin/javac?
14346         if test ! -x "$BOOT_JDK/bin/javac"; then
14347           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14348 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14349           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14350 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14351           BOOT_JDK_FOUND=no
14352         else
14353           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14354           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14355             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14356 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14357             BOOT_JDK_FOUND=no
14358           else
14359             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14360             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14361 
14362             # Extra M4 quote needed to protect [] in grep expression.
14363             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14364             if test "x$FOUND_VERSION_78" = x; then
14365               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14366 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14367               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14368 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14369               BOOT_JDK_FOUND=no
14370             else
14371               # We're done! :-)
14372               BOOT_JDK_FOUND=yes
14373 
14374   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14375 
14376   # Input might be given as Windows format, start by converting to
14377   # unix format.
14378   path="$BOOT_JDK"
14379   new_path=`$CYGPATH -u "$path"`
14380 
14381   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14382   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14383   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14384   # "foo.exe" is OK but "foo" is an error.
14385   #
14386   # This test is therefore slightly more accurate than "test -f" to check for file precense.
14387   # It is also a way to make sure we got the proper file name for the real test later on.
14388   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14389   if test "x$test_shortpath" = x; then
14390     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14391 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14392     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14393   fi
14394 
14395   # Call helper function which possibly converts this using DOS-style short mode.
14396   # If so, the updated path is stored in $new_path.
14397 
14398   input_path="$new_path"
14399   # Check if we need to convert this using DOS-style short mode. If the path
14400   # contains just simple characters, use it. Otherwise (spaces, weird characters),
14401   # take no chances and rewrite it.
14402   # Note: m4 eats our [], so we need to use [ and ] instead.
14403   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14404   if test "x$has_forbidden_chars" != x; then
14405     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14406     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14407     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14408     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14409       # Going to short mode and back again did indeed matter. Since short mode is
14410       # case insensitive, let's make it lowercase to improve readability.
14411       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14412       # Now convert it back to Unix-stile (cygpath)
14413       input_path=`$CYGPATH -u "$shortmode_path"`
14414       new_path="$input_path"
14415     fi
14416   fi
14417 
14418   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14419   if test "x$test_cygdrive_prefix" = x; then
14420     # As a simple fix, exclude /usr/bin since it's not a real path.
14421     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14422       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14423       # a path prefixed by /cygdrive for fixpath to work.
14424       new_path="$CYGWIN_ROOT_PATH$input_path"
14425     fi
14426   fi
14427 
14428 
14429   if test "x$path" != "x$new_path"; then
14430     BOOT_JDK="$new_path"
14431     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14432 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14433   fi
14434 
14435   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14436 
14437   path="$BOOT_JDK"
14438   has_colon=`$ECHO $path | $GREP ^.:`
14439   new_path="$path"
14440   if test "x$has_colon" = x; then
14441     # Not in mixed or Windows style, start by that.
14442     new_path=`cmd //c echo $path`
14443   fi
14444 
14445 
14446   input_path="$new_path"
14447   # Check if we need to convert this using DOS-style short mode. If the path
14448   # contains just simple characters, use it. Otherwise (spaces, weird characters),
14449   # take no chances and rewrite it.
14450   # Note: m4 eats our [], so we need to use [ and ] instead.
14451   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14452   if test "x$has_forbidden_chars" != x; then
14453     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14454     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14455   fi
14456 
14457 
14458   windows_path="$new_path"
14459   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14460     unix_path=`$CYGPATH -u "$windows_path"`
14461     new_path="$unix_path"
14462   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14463     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14464     new_path="$unix_path"
14465   fi
14466 
14467   if test "x$path" != "x$new_path"; then
14468     BOOT_JDK="$new_path"
14469     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14470 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14471   fi
14472 
14473   # Save the first 10 bytes of this path to the storage, so fixpath can work.
14474   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14475 
14476   else
14477     # We're on a posix platform. Hooray! :)
14478     path="$BOOT_JDK"
14479 
14480     if test ! -f "$path" && test ! -d "$path"; then
14481       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14482     fi
14483 
14484     has_space=`$ECHO "$path" | $GREP " "`
14485     if test "x$has_space" != x; then
14486       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14487 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14488       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14489     fi
14490   fi
14491 
14492               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14493 $as_echo_n "checking for Boot JDK... " >&6; }
14494               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14495 $as_echo "$BOOT_JDK" >&6; }
14496               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14497 $as_echo_n "checking Boot JDK version... " >&6; }
14498               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14499               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14500 $as_echo "$BOOT_JDK_VERSION" >&6; }
14501             fi # end check jdk version
14502           fi # end check rt.jar
14503         fi # end check javac
14504       fi # end check java
14505     fi # end check boot jdk found
14506   fi
14507 
14508 
14509   if test "x$BOOT_JDK_FOUND" = xno; then
14510     # Now execute the test
14511 
14512   BOOT_JDK_PREFIX="/System/Library/Java/JavaVirtualMachines"
14513   BOOT_JDK_SUFFIX="/Contents/Home"
14514   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
14515   if test "x$ALL_JDKS_FOUND" != x; then
14516     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
14517 
14518   if test "x$BOOT_JDK_FOUND" = xno; then
14519     # Now execute the test
14520 
14521         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
14522         if test -d "$BOOT_JDK"; then
14523           BOOT_JDK_FOUND=maybe
14524           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
14525 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
14526         fi
14527 
14528 
14529     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14530     if test "x$BOOT_JDK_FOUND" = xmaybe; then
14531       # Do we have a bin/java?
14532       if test ! -x "$BOOT_JDK/bin/java"; then
14533         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14534 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14535         BOOT_JDK_FOUND=no
14536       else
14537         # Do we have a bin/javac?
14538         if test ! -x "$BOOT_JDK/bin/javac"; then
14539           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14540 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14541           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14542 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14543           BOOT_JDK_FOUND=no
14544         else
14545           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14546           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14547             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14548 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14549             BOOT_JDK_FOUND=no
14550           else
14551             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14552             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14553 
14554             # Extra M4 quote needed to protect [] in grep expression.
14555             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14556             if test "x$FOUND_VERSION_78" = x; then
14557               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14558 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14559               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14560 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14561               BOOT_JDK_FOUND=no
14562             else
14563               # We're done! :-)
14564               BOOT_JDK_FOUND=yes
14565 
14566   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14567 
14568   # Input might be given as Windows format, start by converting to
14569   # unix format.
14570   path="$BOOT_JDK"
14571   new_path=`$CYGPATH -u "$path"`
14572 
14573   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14574   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14575   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14576   # "foo.exe" is OK but "foo" is an error.
14577   #
14578   # This test is therefore slightly more accurate than "test -f" to check for file precense.
14579   # It is also a way to make sure we got the proper file name for the real test later on.
14580   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14581   if test "x$test_shortpath" = x; then
14582     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14583 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14584     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14585   fi
14586 
14587   # Call helper function which possibly converts this using DOS-style short mode.
14588   # If so, the updated path is stored in $new_path.
14589 
14590   input_path="$new_path"
14591   # Check if we need to convert this using DOS-style short mode. If the path
14592   # contains just simple characters, use it. Otherwise (spaces, weird characters),
14593   # take no chances and rewrite it.
14594   # Note: m4 eats our [], so we need to use [ and ] instead.
14595   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14596   if test "x$has_forbidden_chars" != x; then
14597     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14598     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14599     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14600     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14601       # Going to short mode and back again did indeed matter. Since short mode is
14602       # case insensitive, let's make it lowercase to improve readability.
14603       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14604       # Now convert it back to Unix-stile (cygpath)
14605       input_path=`$CYGPATH -u "$shortmode_path"`
14606       new_path="$input_path"
14607     fi
14608   fi
14609 
14610   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14611   if test "x$test_cygdrive_prefix" = x; then
14612     # As a simple fix, exclude /usr/bin since it's not a real path.
14613     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14614       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14615       # a path prefixed by /cygdrive for fixpath to work.
14616       new_path="$CYGWIN_ROOT_PATH$input_path"
14617     fi
14618   fi
14619 
14620 
14621   if test "x$path" != "x$new_path"; then
14622     BOOT_JDK="$new_path"
14623     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14624 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14625   fi
14626 
14627   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14628 
14629   path="$BOOT_JDK"
14630   has_colon=`$ECHO $path | $GREP ^.:`
14631   new_path="$path"
14632   if test "x$has_colon" = x; then
14633     # Not in mixed or Windows style, start by that.
14634     new_path=`cmd //c echo $path`
14635   fi
14636 
14637 
14638   input_path="$new_path"
14639   # Check if we need to convert this using DOS-style short mode. If the path
14640   # contains just simple characters, use it. Otherwise (spaces, weird characters),
14641   # take no chances and rewrite it.
14642   # Note: m4 eats our [], so we need to use [ and ] instead.
14643   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14644   if test "x$has_forbidden_chars" != x; then
14645     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14646     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14647   fi
14648 
14649 
14650   windows_path="$new_path"
14651   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14652     unix_path=`$CYGPATH -u "$windows_path"`
14653     new_path="$unix_path"
14654   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14655     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14656     new_path="$unix_path"
14657   fi
14658 
14659   if test "x$path" != "x$new_path"; then
14660     BOOT_JDK="$new_path"
14661     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14662 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14663   fi
14664 
14665   # Save the first 10 bytes of this path to the storage, so fixpath can work.
14666   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14667 
14668   else
14669     # We're on a posix platform. Hooray! :)
14670     path="$BOOT_JDK"
14671 
14672     if test ! -f "$path" && test ! -d "$path"; then
14673       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14674     fi
14675 
14676     has_space=`$ECHO "$path" | $GREP " "`
14677     if test "x$has_space" != x; then
14678       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14679 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14680       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14681     fi
14682   fi
14683 
14684               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14685 $as_echo_n "checking for Boot JDK... " >&6; }
14686               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14687 $as_echo "$BOOT_JDK" >&6; }
14688               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14689 $as_echo_n "checking Boot JDK version... " >&6; }
14690               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14691               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14692 $as_echo "$BOOT_JDK_VERSION" >&6; }
14693             fi # end check jdk version
14694           fi # end check rt.jar
14695         fi # end check javac
14696       fi # end check java
14697     fi # end check boot jdk found
14698   fi
14699 
14700     done
14701   fi
14702 
14703 
14704     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14705     if test "x$BOOT_JDK_FOUND" = xmaybe; then
14706       # Do we have a bin/java?
14707       if test ! -x "$BOOT_JDK/bin/java"; then
14708         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14709 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14710         BOOT_JDK_FOUND=no
14711       else
14712         # Do we have a bin/javac?
14713         if test ! -x "$BOOT_JDK/bin/javac"; then
14714           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14715 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14716           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14717 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14718           BOOT_JDK_FOUND=no
14719         else
14720           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14721           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14722             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14723 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14724             BOOT_JDK_FOUND=no
14725           else
14726             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14727             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14728 
14729             # Extra M4 quote needed to protect [] in grep expression.
14730             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14731             if test "x$FOUND_VERSION_78" = x; then
14732               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14733 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14734               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14735 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14736               BOOT_JDK_FOUND=no
14737             else
14738               # We're done! :-)
14739               BOOT_JDK_FOUND=yes
14740 
14741   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14742 
14743   # Input might be given as Windows format, start by converting to
14744   # unix format.
14745   path="$BOOT_JDK"
14746   new_path=`$CYGPATH -u "$path"`
14747 
14748   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14749   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14750   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14751   # "foo.exe" is OK but "foo" is an error.
14752   #
14753   # This test is therefore slightly more accurate than "test -f" to check for file precense.
14754   # It is also a way to make sure we got the proper file name for the real test later on.
14755   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14756   if test "x$test_shortpath" = x; then
14757     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14758 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14759     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14760   fi
14761 
14762   # Call helper function which possibly converts this using DOS-style short mode.
14763   # If so, the updated path is stored in $new_path.
14764 
14765   input_path="$new_path"
14766   # Check if we need to convert this using DOS-style short mode. If the path
14767   # contains just simple characters, use it. Otherwise (spaces, weird characters),
14768   # take no chances and rewrite it.
14769   # Note: m4 eats our [], so we need to use [ and ] instead.
14770   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14771   if test "x$has_forbidden_chars" != x; then
14772     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14773     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14774     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14775     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14776       # Going to short mode and back again did indeed matter. Since short mode is
14777       # case insensitive, let's make it lowercase to improve readability.
14778       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14779       # Now convert it back to Unix-stile (cygpath)
14780       input_path=`$CYGPATH -u "$shortmode_path"`
14781       new_path="$input_path"
14782     fi
14783   fi
14784 
14785   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14786   if test "x$test_cygdrive_prefix" = x; then
14787     # As a simple fix, exclude /usr/bin since it's not a real path.
14788     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14789       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14790       # a path prefixed by /cygdrive for fixpath to work.
14791       new_path="$CYGWIN_ROOT_PATH$input_path"
14792     fi
14793   fi
14794 
14795 
14796   if test "x$path" != "x$new_path"; then
14797     BOOT_JDK="$new_path"
14798     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14799 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14800   fi
14801 
14802   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14803 
14804   path="$BOOT_JDK"
14805   has_colon=`$ECHO $path | $GREP ^.:`
14806   new_path="$path"
14807   if test "x$has_colon" = x; then
14808     # Not in mixed or Windows style, start by that.
14809     new_path=`cmd //c echo $path`
14810   fi
14811 
14812 
14813   input_path="$new_path"
14814   # Check if we need to convert this using DOS-style short mode. If the path
14815   # contains just simple characters, use it. Otherwise (spaces, weird characters),
14816   # take no chances and rewrite it.
14817   # Note: m4 eats our [], so we need to use [ and ] instead.
14818   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14819   if test "x$has_forbidden_chars" != x; then
14820     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14821     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14822   fi
14823 
14824 
14825   windows_path="$new_path"
14826   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14827     unix_path=`$CYGPATH -u "$windows_path"`
14828     new_path="$unix_path"
14829   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14830     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14831     new_path="$unix_path"
14832   fi
14833 
14834   if test "x$path" != "x$new_path"; then
14835     BOOT_JDK="$new_path"
14836     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14837 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14838   fi
14839 
14840   # Save the first 10 bytes of this path to the storage, so fixpath can work.
14841   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14842 
14843   else
14844     # We're on a posix platform. Hooray! :)
14845     path="$BOOT_JDK"
14846 
14847     if test ! -f "$path" && test ! -d "$path"; then
14848       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14849     fi
14850 
14851     has_space=`$ECHO "$path" | $GREP " "`
14852     if test "x$has_space" != x; then
14853       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14854 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14855       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14856     fi
14857   fi
14858 
14859               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14860 $as_echo_n "checking for Boot JDK... " >&6; }
14861               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14862 $as_echo "$BOOT_JDK" >&6; }
14863               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14864 $as_echo_n "checking Boot JDK version... " >&6; }
14865               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14866               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14867 $as_echo "$BOOT_JDK_VERSION" >&6; }
14868             fi # end check jdk version
14869           fi # end check rt.jar
14870         fi # end check javac
14871       fi # end check java
14872     fi # end check boot jdk found
14873   fi
14874 
14875   elif test "x$OPENJDK_TARGET_OS" = xlinux; then
14876 
14877   if test "x$BOOT_JDK_FOUND" = xno; then
14878     # Now execute the test
14879 
14880   BOOT_JDK_PREFIX="/usr/lib/jvm"
14881   BOOT_JDK_SUFFIX=""
14882   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
14883   if test "x$ALL_JDKS_FOUND" != x; then
14884     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
14885 
14886   if test "x$BOOT_JDK_FOUND" = xno; then
14887     # Now execute the test
14888 
14889         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
14890         if test -d "$BOOT_JDK"; then
14891           BOOT_JDK_FOUND=maybe
14892           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
14893 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
14894         fi
14895 
14896 
14897     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14898     if test "x$BOOT_JDK_FOUND" = xmaybe; then
14899       # Do we have a bin/java?
14900       if test ! -x "$BOOT_JDK/bin/java"; then
14901         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14902 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14903         BOOT_JDK_FOUND=no
14904       else
14905         # Do we have a bin/javac?
14906         if test ! -x "$BOOT_JDK/bin/javac"; then
14907           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14908 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14909           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14910 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14911           BOOT_JDK_FOUND=no
14912         else
14913           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14914           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14915             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14916 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14917             BOOT_JDK_FOUND=no
14918           else
14919             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14920             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14921 
14922             # Extra M4 quote needed to protect [] in grep expression.
14923             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14924             if test "x$FOUND_VERSION_78" = x; then
14925               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14926 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14927               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14928 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14929               BOOT_JDK_FOUND=no
14930             else
14931               # We're done! :-)
14932               BOOT_JDK_FOUND=yes
14933 
14934   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14935 
14936   # Input might be given as Windows format, start by converting to
14937   # unix format.
14938   path="$BOOT_JDK"
14939   new_path=`$CYGPATH -u "$path"`
14940 
14941   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14942   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14943   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14944   # "foo.exe" is OK but "foo" is an error.
14945   #
14946   # This test is therefore slightly more accurate than "test -f" to check for file precense.
14947   # It is also a way to make sure we got the proper file name for the real test later on.
14948   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14949   if test "x$test_shortpath" = x; then
14950     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14951 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14952     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14953   fi
14954 
14955   # Call helper function which possibly converts this using DOS-style short mode.
14956   # If so, the updated path is stored in $new_path.
14957 
14958   input_path="$new_path"
14959   # Check if we need to convert this using DOS-style short mode. If the path
14960   # contains just simple characters, use it. Otherwise (spaces, weird characters),
14961   # take no chances and rewrite it.
14962   # Note: m4 eats our [], so we need to use [ and ] instead.
14963   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14964   if test "x$has_forbidden_chars" != x; then
14965     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14966     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14967     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14968     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14969       # Going to short mode and back again did indeed matter. Since short mode is
14970       # case insensitive, let's make it lowercase to improve readability.
14971       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14972       # Now convert it back to Unix-stile (cygpath)
14973       input_path=`$CYGPATH -u "$shortmode_path"`
14974       new_path="$input_path"
14975     fi
14976   fi
14977 
14978   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14979   if test "x$test_cygdrive_prefix" = x; then
14980     # As a simple fix, exclude /usr/bin since it's not a real path.
14981     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14982       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14983       # a path prefixed by /cygdrive for fixpath to work.
14984       new_path="$CYGWIN_ROOT_PATH$input_path"
14985     fi
14986   fi
14987 
14988 
14989   if test "x$path" != "x$new_path"; then
14990     BOOT_JDK="$new_path"
14991     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14992 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14993   fi
14994 
14995   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14996 
14997   path="$BOOT_JDK"
14998   has_colon=`$ECHO $path | $GREP ^.:`
14999   new_path="$path"
15000   if test "x$has_colon" = x; then
15001     # Not in mixed or Windows style, start by that.
15002     new_path=`cmd //c echo $path`
15003   fi
15004 
15005 
15006   input_path="$new_path"
15007   # Check if we need to convert this using DOS-style short mode. If the path
15008   # contains just simple characters, use it. Otherwise (spaces, weird characters),
15009   # take no chances and rewrite it.
15010   # Note: m4 eats our [], so we need to use [ and ] instead.
15011   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15012   if test "x$has_forbidden_chars" != x; then
15013     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15014     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15015   fi
15016 
15017 
15018   windows_path="$new_path"
15019   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15020     unix_path=`$CYGPATH -u "$windows_path"`
15021     new_path="$unix_path"
15022   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15023     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15024     new_path="$unix_path"
15025   fi
15026 
15027   if test "x$path" != "x$new_path"; then
15028     BOOT_JDK="$new_path"
15029     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15030 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15031   fi
15032 
15033   # Save the first 10 bytes of this path to the storage, so fixpath can work.
15034   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15035 
15036   else
15037     # We're on a posix platform. Hooray! :)
15038     path="$BOOT_JDK"
15039 
15040     if test ! -f "$path" && test ! -d "$path"; then
15041       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
15042     fi
15043 
15044     has_space=`$ECHO "$path" | $GREP " "`
15045     if test "x$has_space" != x; then
15046       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15047 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15048       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15049     fi
15050   fi
15051 
15052               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
15053 $as_echo_n "checking for Boot JDK... " >&6; }
15054               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
15055 $as_echo "$BOOT_JDK" >&6; }
15056               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
15057 $as_echo_n "checking Boot JDK version... " >&6; }
15058               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
15059               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
15060 $as_echo "$BOOT_JDK_VERSION" >&6; }
15061             fi # end check jdk version
15062           fi # end check rt.jar
15063         fi # end check javac
15064       fi # end check java
15065     fi # end check boot jdk found
15066   fi
15067 
15068     done
15069   fi
15070 
15071 
15072     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
15073     if test "x$BOOT_JDK_FOUND" = xmaybe; then
15074       # Do we have a bin/java?
15075       if test ! -x "$BOOT_JDK/bin/java"; then
15076         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
15077 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
15078         BOOT_JDK_FOUND=no
15079       else
15080         # Do we have a bin/javac?
15081         if test ! -x "$BOOT_JDK/bin/javac"; then
15082           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
15083 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
15084           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
15085 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
15086           BOOT_JDK_FOUND=no
15087         else
15088           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
15089           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
15090             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
15091 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
15092             BOOT_JDK_FOUND=no
15093           else
15094             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
15095             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
15096 
15097             # Extra M4 quote needed to protect [] in grep expression.
15098             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
15099             if test "x$FOUND_VERSION_78" = x; then
15100               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
15101 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
15102               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
15103 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
15104               BOOT_JDK_FOUND=no
15105             else
15106               # We're done! :-)
15107               BOOT_JDK_FOUND=yes
15108 
15109   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15110 
15111   # Input might be given as Windows format, start by converting to
15112   # unix format.
15113   path="$BOOT_JDK"
15114   new_path=`$CYGPATH -u "$path"`
15115 
15116   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15117   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15118   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15119   # "foo.exe" is OK but "foo" is an error.
15120   #
15121   # This test is therefore slightly more accurate than "test -f" to check for file precense.
15122   # It is also a way to make sure we got the proper file name for the real test later on.
15123   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15124   if test "x$test_shortpath" = x; then
15125     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15126 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15127     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
15128   fi
15129 
15130   # Call helper function which possibly converts this using DOS-style short mode.
15131   # If so, the updated path is stored in $new_path.
15132 
15133   input_path="$new_path"
15134   # Check if we need to convert this using DOS-style short mode. If the path
15135   # contains just simple characters, use it. Otherwise (spaces, weird characters),
15136   # take no chances and rewrite it.
15137   # Note: m4 eats our [], so we need to use [ and ] instead.
15138   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15139   if test "x$has_forbidden_chars" != x; then
15140     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15141     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15142     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15143     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15144       # Going to short mode and back again did indeed matter. Since short mode is
15145       # case insensitive, let's make it lowercase to improve readability.
15146       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15147       # Now convert it back to Unix-stile (cygpath)
15148       input_path=`$CYGPATH -u "$shortmode_path"`
15149       new_path="$input_path"
15150     fi
15151   fi
15152 
15153   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15154   if test "x$test_cygdrive_prefix" = x; then
15155     # As a simple fix, exclude /usr/bin since it's not a real path.
15156     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15157       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15158       # a path prefixed by /cygdrive for fixpath to work.
15159       new_path="$CYGWIN_ROOT_PATH$input_path"
15160     fi
15161   fi
15162 
15163 
15164   if test "x$path" != "x$new_path"; then
15165     BOOT_JDK="$new_path"
15166     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15167 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15168   fi
15169 
15170   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15171 
15172   path="$BOOT_JDK"
15173   has_colon=`$ECHO $path | $GREP ^.:`
15174   new_path="$path"
15175   if test "x$has_colon" = x; then
15176     # Not in mixed or Windows style, start by that.
15177     new_path=`cmd //c echo $path`
15178   fi
15179 
15180 
15181   input_path="$new_path"
15182   # Check if we need to convert this using DOS-style short mode. If the path
15183   # contains just simple characters, use it. Otherwise (spaces, weird characters),
15184   # take no chances and rewrite it.
15185   # Note: m4 eats our [], so we need to use [ and ] instead.
15186   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15187   if test "x$has_forbidden_chars" != x; then
15188     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15189     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15190   fi
15191 
15192 
15193   windows_path="$new_path"
15194   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15195     unix_path=`$CYGPATH -u "$windows_path"`
15196     new_path="$unix_path"
15197   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15198     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15199     new_path="$unix_path"
15200   fi
15201 
15202   if test "x$path" != "x$new_path"; then
15203     BOOT_JDK="$new_path"
15204     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15205 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15206   fi
15207 
15208   # Save the first 10 bytes of this path to the storage, so fixpath can work.
15209   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15210 
15211   else
15212     # We're on a posix platform. Hooray! :)
15213     path="$BOOT_JDK"
15214 
15215     if test ! -f "$path" && test ! -d "$path"; then
15216       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
15217     fi
15218 
15219     has_space=`$ECHO "$path" | $GREP " "`
15220     if test "x$has_space" != x; then
15221       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15222 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15223       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15224     fi
15225   fi
15226 
15227               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
15228 $as_echo_n "checking for Boot JDK... " >&6; }
15229               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
15230 $as_echo "$BOOT_JDK" >&6; }
15231               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
15232 $as_echo_n "checking Boot JDK version... " >&6; }
15233               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
15234               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
15235 $as_echo "$BOOT_JDK_VERSION" >&6; }
15236             fi # end check jdk version
15237           fi # end check rt.jar
15238         fi # end check javac
15239       fi # end check java
15240     fi # end check boot jdk found
15241   fi
15242 
15243   fi
15244 
15245 
15246     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
15247     if test "x$BOOT_JDK_FOUND" = xmaybe; then
15248       # Do we have a bin/java?
15249       if test ! -x "$BOOT_JDK/bin/java"; then
15250         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
15251 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
15252         BOOT_JDK_FOUND=no
15253       else
15254         # Do we have a bin/javac?
15255         if test ! -x "$BOOT_JDK/bin/javac"; then
15256           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
15257 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
15258           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
15259 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
15260           BOOT_JDK_FOUND=no
15261         else
15262           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
15263           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
15264             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
15265 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
15266             BOOT_JDK_FOUND=no
15267           else
15268             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
15269             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
15270 
15271             # Extra M4 quote needed to protect [] in grep expression.
15272             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
15273             if test "x$FOUND_VERSION_78" = x; then
15274               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
15275 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
15276               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
15277 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
15278               BOOT_JDK_FOUND=no
15279             else
15280               # We're done! :-)
15281               BOOT_JDK_FOUND=yes
15282 
15283   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15284 
15285   # Input might be given as Windows format, start by converting to
15286   # unix format.
15287   path="$BOOT_JDK"
15288   new_path=`$CYGPATH -u "$path"`
15289 
15290   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15291   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15292   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15293   # "foo.exe" is OK but "foo" is an error.
15294   #
15295   # This test is therefore slightly more accurate than "test -f" to check for file precense.
15296   # It is also a way to make sure we got the proper file name for the real test later on.
15297   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15298   if test "x$test_shortpath" = x; then
15299     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15300 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15301     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
15302   fi
15303 
15304   # Call helper function which possibly converts this using DOS-style short mode.
15305   # If so, the updated path is stored in $new_path.
15306 
15307   input_path="$new_path"
15308   # Check if we need to convert this using DOS-style short mode. If the path
15309   # contains just simple characters, use it. Otherwise (spaces, weird characters),
15310   # take no chances and rewrite it.
15311   # Note: m4 eats our [], so we need to use [ and ] instead.
15312   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15313   if test "x$has_forbidden_chars" != x; then
15314     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15315     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15316     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15317     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15318       # Going to short mode and back again did indeed matter. Since short mode is
15319       # case insensitive, let's make it lowercase to improve readability.
15320       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15321       # Now convert it back to Unix-stile (cygpath)
15322       input_path=`$CYGPATH -u "$shortmode_path"`
15323       new_path="$input_path"
15324     fi
15325   fi
15326 
15327   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15328   if test "x$test_cygdrive_prefix" = x; then
15329     # As a simple fix, exclude /usr/bin since it's not a real path.
15330     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15331       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15332       # a path prefixed by /cygdrive for fixpath to work.
15333       new_path="$CYGWIN_ROOT_PATH$input_path"
15334     fi
15335   fi
15336 
15337 
15338   if test "x$path" != "x$new_path"; then
15339     BOOT_JDK="$new_path"
15340     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15341 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15342   fi
15343 
15344   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15345 
15346   path="$BOOT_JDK"
15347   has_colon=`$ECHO $path | $GREP ^.:`
15348   new_path="$path"
15349   if test "x$has_colon" = x; then
15350     # Not in mixed or Windows style, start by that.
15351     new_path=`cmd //c echo $path`
15352   fi
15353 
15354 
15355   input_path="$new_path"
15356   # Check if we need to convert this using DOS-style short mode. If the path
15357   # contains just simple characters, use it. Otherwise (spaces, weird characters),
15358   # take no chances and rewrite it.
15359   # Note: m4 eats our [], so we need to use [ and ] instead.
15360   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15361   if test "x$has_forbidden_chars" != x; then
15362     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15363     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15364   fi
15365 
15366 
15367   windows_path="$new_path"
15368   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15369     unix_path=`$CYGPATH -u "$windows_path"`
15370     new_path="$unix_path"
15371   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15372     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15373     new_path="$unix_path"
15374   fi
15375 
15376   if test "x$path" != "x$new_path"; then
15377     BOOT_JDK="$new_path"
15378     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15379 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15380   fi
15381 
15382   # Save the first 10 bytes of this path to the storage, so fixpath can work.
15383   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15384 
15385   else
15386     # We're on a posix platform. Hooray! :)
15387     path="$BOOT_JDK"
15388 
15389     if test ! -f "$path" && test ! -d "$path"; then
15390       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
15391     fi
15392 
15393     has_space=`$ECHO "$path" | $GREP " "`
15394     if test "x$has_space" != x; then
15395       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15396 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15397       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15398     fi
15399   fi
15400 
15401               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
15402 $as_echo_n "checking for Boot JDK... " >&6; }
15403               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
15404 $as_echo "$BOOT_JDK" >&6; }
15405               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
15406 $as_echo_n "checking Boot JDK version... " >&6; }
15407               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
15408               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
15409 $as_echo "$BOOT_JDK_VERSION" >&6; }
15410             fi # end check jdk version
15411           fi # end check rt.jar
15412         fi # end check javac
15413       fi # end check java
15414     fi # end check boot jdk found
15415   fi
15416 
15417 
15418 # If we haven't found anything yet, we've truly lost. Give up.
15419 if test "x$BOOT_JDK_FOUND" = xno; then
15420 
15421     # Print a helpful message on how to acquire the necessary build dependency.
15422     # openjdk is the help tag: freetyp2, cups, pulse, alsa etc
15423     MISSING_DEPENDENCY=openjdk
15424     PKGHANDLER_COMMAND=
15425 
15426     case $PKGHANDLER in
15427         apt-get)
15428                 apt_help     $MISSING_DEPENDENCY ;;
15429     yum)
15430                 yum_help     $MISSING_DEPENDENCY ;;
15431         port)
15432                 port_help    $MISSING_DEPENDENCY ;;
15433         pkgutil)
15434                 pkgutil_help $MISSING_DEPENDENCY ;;
15435         pkgadd)
15436                 pkgadd_help  $MISSING_DEPENDENCY ;;
15437     * )
15438       break ;;
15439     esac
15440 
15441     if test "x$PKGHANDLER_COMMAND" != x; then
15442         HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
15443     fi
15444 
15445   { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find a valid Boot JDK. $HELP_MSG" >&5
15446 $as_echo "$as_me: Could not find a valid Boot JDK. $HELP_MSG" >&6;}
15447   { $as_echo "$as_me:${as_lineno-$LINENO}: This might be fixed by explicitely setting --with-boot-jdk" >&5
15448 $as_echo "$as_me: This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15449   as_fn_error $? "Cannot continue" "$LINENO" 5
15450 fi
15451 
15452 # Setup proper paths for what we found
15453 BOOT_RTJAR="$BOOT_JDK/jre/lib/rt.jar"
15454 if test ! -f "$BOOT_RTJAR"; then
15455     # On MacOSX it is called classes.jar
15456     BOOT_RTJAR="$BOOT_JDK/../Classes/classes.jar"
15457     if test -f "$BOOT_RTJAR"; then
15458       # Remove the ..
15459       BOOT_RTJAR="`cd ${BOOT_RTJAR%/*} && pwd`/${BOOT_RTJAR##*/}"
15460     fi
15461 fi
15462 BOOT_TOOLSJAR="$BOOT_JDK/lib/tools.jar"
15463 BOOT_JDK="$BOOT_JDK"
15464 
15465 
15466 
15467 
15468 # Setup tools from the Boot JDK.
15469 
15470   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
15471 $as_echo_n "checking for java in Boot JDK... " >&6; }
15472   JAVA=$BOOT_JDK/bin/java
15473   if test ! -x $JAVA; then
15474       { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15475 $as_echo "not found" >&6; }
15476       { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15477 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15478       as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
15479   fi
15480   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15481 $as_echo "ok" >&6; }
15482 
15483 
15484   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
15485 $as_echo_n "checking for javac in Boot JDK... " >&6; }
15486   JAVAC=$BOOT_JDK/bin/javac
15487   if test ! -x $JAVAC; then
15488       { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15489 $as_echo "not found" >&6; }
15490       { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15491 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15492       as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
15493   fi
15494   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15495 $as_echo "ok" >&6; }
15496 
15497 
15498   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
15499 $as_echo_n "checking for javah in Boot JDK... " >&6; }
15500   JAVAH=$BOOT_JDK/bin/javah
15501   if test ! -x $JAVAH; then
15502       { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15503 $as_echo "not found" >&6; }
15504       { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15505 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15506       as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
15507   fi
15508   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15509 $as_echo "ok" >&6; }
15510 
15511 
15512   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javap in Boot JDK" >&5
15513 $as_echo_n "checking for javap in Boot JDK... " >&6; }
15514   JAVAP=$BOOT_JDK/bin/javap
15515   if test ! -x $JAVAP; then
15516       { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15517 $as_echo "not found" >&6; }
15518       { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15519 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15520       as_fn_error $? "Could not find javap in the Boot JDK" "$LINENO" 5
15521   fi
15522   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15523 $as_echo "ok" >&6; }
15524 
15525 
15526   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
15527 $as_echo_n "checking for jar in Boot JDK... " >&6; }
15528   JAR=$BOOT_JDK/bin/jar
15529   if test ! -x $JAR; then
15530       { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15531 $as_echo "not found" >&6; }
15532       { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15533 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15534       as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
15535   fi
15536   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15537 $as_echo "ok" >&6; }
15538 
15539 
15540   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for rmic in Boot JDK" >&5
15541 $as_echo_n "checking for rmic in Boot JDK... " >&6; }
15542   RMIC=$BOOT_JDK/bin/rmic
15543   if test ! -x $RMIC; then
15544       { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15545 $as_echo "not found" >&6; }
15546       { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15547 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15548       as_fn_error $? "Could not find rmic in the Boot JDK" "$LINENO" 5
15549   fi
15550   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15551 $as_echo "ok" >&6; }
15552 
15553 
15554   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for native2ascii in Boot JDK" >&5
15555 $as_echo_n "checking for native2ascii in Boot JDK... " >&6; }
15556   NATIVE2ASCII=$BOOT_JDK/bin/native2ascii
15557   if test ! -x $NATIVE2ASCII; then
15558       { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15559 $as_echo "not found" >&6; }
15560       { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15561 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15562       as_fn_error $? "Could not find native2ascii in the Boot JDK" "$LINENO" 5
15563   fi
15564   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15565 $as_echo "ok" >&6; }
15566 
15567 
15568 # Finally, set some other options...
15569 
15570 # When compiling code to be executed by the Boot JDK, force jdk7 compatibility.
15571 BOOT_JDK_SOURCETARGET="-source 7 -target 7"
15572 
15573 
15574 
15575 
15576 ##############################################################################
15577 #
15578 # Specify options for anything that is run with the Boot JDK.
15579 #
15580 
15581 # Check whether --with-boot-jdk-jvmargs was given.
15582 if test "${with_boot_jdk_jvmargs+set}" = set; then :
15583   withval=$with_boot_jdk_jvmargs;
15584 fi
15585 
15586 
15587 if test "x$with_boot_jdk_jvmargs" = x; then
15588     # Not all JVM:s accept the same arguments on the command line.
15589     # OpenJDK specific increase in thread stack for JDK build,
15590     # well more specifically, when running javac.
15591     if test "x$BUILD_NUM_BITS" = x32; then
15592        STACK_SIZE=768
15593     else
15594        # Running Javac on a JVM on a 64-bit machine, the stack takes more space
15595        # since 64-bit pointers are pushed on the stach. Apparently, we need
15596        # to increase the stack space when javacing the JDK....
15597        STACK_SIZE=1536
15598     fi
15599 
15600     # Minimum amount of heap memory.
15601 
15602     # Test if -Xms64M is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
15603     # If so, then append -Xms64M to boot_jdk_jvmargs
15604     FOUND_WARN=`$JAVA -Xms64M -version 2>&1 | grep -i warn`
15605     FOUND_VERSION=`$JAVA -Xms64M -version 2>&1 | grep " version \""`
15606     if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15607         boot_jdk_jvmargs="$boot_jdk_jvmargs -Xms64M"
15608     fi
15609 
15610     if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
15611         # Why does macosx need more heap? Its the huge JDK batch.
15612 
15613     # Test if -Xmx1600M is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
15614     # If so, then append -Xmx1600M to boot_jdk_jvmargs
15615     FOUND_WARN=`$JAVA -Xmx1600M -version 2>&1 | grep -i warn`
15616     FOUND_VERSION=`$JAVA -Xmx1600M -version 2>&1 | grep " version \""`
15617     if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15618         boot_jdk_jvmargs="$boot_jdk_jvmargs -Xmx1600M"
15619     fi
15620 
15621     else
15622 
15623     # Test if -Xmx1100M is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
15624     # If so, then append -Xmx1100M to boot_jdk_jvmargs
15625     FOUND_WARN=`$JAVA -Xmx1100M -version 2>&1 | grep -i warn`
15626     FOUND_VERSION=`$JAVA -Xmx1100M -version 2>&1 | grep " version \""`
15627     if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15628         boot_jdk_jvmargs="$boot_jdk_jvmargs -Xmx1100M"
15629     fi
15630 
15631     fi
15632     # When is adding -client something that speeds up the JVM?
15633     # ADD_JVM_ARG_IF_OK([-client],boot_jdk_jvmargs,[$JAVA])
15634 
15635     # Test if -XX:PermSize=32m is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
15636     # If so, then append -XX:PermSize=32m to boot_jdk_jvmargs
15637     FOUND_WARN=`$JAVA -XX:PermSize=32m -version 2>&1 | grep -i warn`
15638     FOUND_VERSION=`$JAVA -XX:PermSize=32m -version 2>&1 | grep " version \""`
15639     if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15640         boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:PermSize=32m"
15641     fi
15642 
15643 
15644     # Test if -XX:MaxPermSize=160m is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
15645     # If so, then append -XX:MaxPermSize=160m to boot_jdk_jvmargs
15646     FOUND_WARN=`$JAVA -XX:MaxPermSize=160m -version 2>&1 | grep -i warn`
15647     FOUND_VERSION=`$JAVA -XX:MaxPermSize=160m -version 2>&1 | grep " version \""`
15648     if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15649         boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:MaxPermSize=160m"
15650     fi
15651 
15652 
15653     # Test if -XX:ThreadStackSize=$STACK_SIZE is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
15654     # If so, then append -XX:ThreadStackSize=$STACK_SIZE to boot_jdk_jvmargs
15655     FOUND_WARN=`$JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1 | grep -i warn`
15656     FOUND_VERSION=`$JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1 | grep " version \""`
15657     if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15658         boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:ThreadStackSize=$STACK_SIZE"
15659     fi
15660 
15661     # Disable special log output when a debug build is used as Boot JDK...
15662 
15663     # Test if -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
15664     # If so, then append -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput to boot_jdk_jvmargs
15665     FOUND_WARN=`$JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version 2>&1 | grep -i warn`
15666     FOUND_VERSION=`$JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version 2>&1 | grep " version \""`
15667     if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15668         boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput"
15669     fi
15670 
15671 fi
15672 
15673 BOOT_JDK_JVMARGS=$boot_jdk_jvmargs
15674 
15675 
15676 
15677 ###############################################################################
15678 #
15679 # Configure the sources to use. We can add or override individual directories.
15680 #
15681 ###############################################################################
15682 
15683 
15684 
15685 # Where are the sources. Any of these can be overridden
15686 # using --with-override-corba and the likes.
15687 LANGTOOLS_TOPDIR="$SRC_ROOT/langtools"
15688 CORBA_TOPDIR="$SRC_ROOT/corba"
15689 JAXP_TOPDIR="$SRC_ROOT/jaxp"
15690 JAXWS_TOPDIR="$SRC_ROOT/jaxws"
15691 HOTSPOT_TOPDIR="$SRC_ROOT/hotspot"
15692 JDK_TOPDIR="$SRC_ROOT/jdk"
15693 
15694 
15695 
15696 
15697 
15698 
15699 
15700 
15701 
15702 ###############################################################################
15703 #
15704 # Pickup additional source for a component from outside of the source root
15705 # or override source for a component.
15706 #
15707 
15708 # Check whether --with-add-source-root was given.
15709 if test "${with_add_source_root+set}" = set; then :
15710   withval=$with_add_source_root;
15711 fi
15712 
15713 
15714 
15715 # Check whether --with-override-source-root was given.
15716 if test "${with_override_source_root+set}" = set; then :
15717   withval=$with_override_source_root;
15718 fi
15719 
15720 
15721 
15722 # Check whether --with-adds-and-overrides was given.
15723 if test "${with_adds_and_overrides+set}" = set; then :
15724   withval=$with_adds_and_overrides;
15725 fi
15726 
15727 
15728 if test "x$with_adds_and_overrides" != x; then
15729     with_add_source_root="$with_adds_and_overrides/adds"
15730     with_override_source_root="$with_adds_and_overrides/overrides"
15731 fi
15732 
15733 if test "x$with_add_source_root" != x; then
15734     if ! test -d $with_add_source_root; then
15735        as_fn_error $? "Trying to use a non-existant add-source-root $with_add_source_root" "$LINENO" 5
15736     fi
15737     CURDIR="$PWD"
15738     cd "$with_add_source_root"
15739     ADD_SRC_ROOT="`pwd`"
15740     cd "$CURDIR"
15741     # Verify that the addon source root does not have any root makefiles.
15742     # If it does, then it is usually an error, prevent this.
15743     if test -f $with_add_source_root/langtools/makefiles/Makefile || \
15744        test -f $with_add_source_root/langtools/make/Makefile; then
15745         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
15746     fi
15747     if test -f $with_add_source_root/corba/makefiles/Makefile || \
15748        test -f $with_add_source_root/corba/make/Makefile; then
15749         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
15750     fi
15751     if test -f $with_add_source_root/jaxp/makefiles/Makefile || \
15752        test -f $with_add_source_root/jaxp/make/Makefile; then
15753         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
15754     fi
15755     if test -f $with_add_source_root/jaxws/makefiles/Makefile || \
15756        test -f $with_add_source_root/jaxws/make/Makefile; then
15757         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
15758     fi
15759     if test -f $with_add_source_root/hotspot/makefiles/Makefile || \
15760        test -f $with_add_source_root/hotspot/make/Makefile; then
15761         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
15762     fi
15763     if test -f $with_add_source_root/jdk/makefiles/Makefile || \
15764        test -f $with_add_source_root/jdk/make/Makefile; then
15765         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
15766     fi
15767 fi
15768 
15769 
15770 if test "x$with_override_source_root" != x; then
15771     if ! test -d $with_override_source_root; then
15772        as_fn_error $? "Trying to use a non-existant override-source-root $with_override_source_root" "$LINENO" 5
15773     fi
15774     CURDIR="$PWD"
15775     cd "$with_override_source_root"
15776     OVERRIDE_SRC_ROOT="`pwd`"
15777     cd "$CURDIR"
15778     if test -f $with_override_source_root/langtools/makefiles/Makefile || \
15779        test -f $with_override_source_root/langtools/make/Makefile; then
15780         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
15781     fi
15782     if test -f $with_override_source_root/corba/makefiles/Makefile || \
15783        test -f $with_override_source_root/corba/make/Makefile; then
15784         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
15785     fi
15786     if test -f $with_override_source_root/jaxp/makefiles/Makefile || \
15787        test -f $with_override_source_root/jaxp/make/Makefile; then
15788         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
15789     fi
15790     if test -f $with_override_source_root/jaxws/makefiles/Makefile || \
15791        test -f $with_override_source_root/jaxws/make/Makefile; then
15792         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
15793     fi
15794     if test -f $with_override_source_root/hotspot/makefiles/Makefile || \
15795        test -f $with_override_source_root/hotspot/make/Makefile; then
15796         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
15797     fi
15798     if test -f $with_override_source_root/jdk/makefiles/Makefile || \
15799        test -f $with_override_source_root/jdk/make/Makefile; then
15800         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
15801     fi
15802 fi
15803 
15804 
15805 ###############################################################################
15806 #
15807 # Override a repo completely, this is used for example when you have 3 small
15808 # development sandboxes of the langtools sources and want to avoid having 3 full
15809 # OpenJDK sources checked out on disk.
15810 #
15811 # Assuming that the 3 langtools sandboxes are located here:
15812 # /home/fredrik/sandbox1/langtools
15813 # /home/fredrik/sandbox2/langtools
15814 # /home/fredrik/sandbox3/langtools
15815 #
15816 # From the source root you create build subdirs manually:
15817 #     mkdir -p build1 build2 build3
15818 # in each build directory run:
15819 #     (cd build1 && ../configure --with-override-langtools=/home/fredrik/sandbox1 && make)
15820 #     (cd build2 && ../configure --with-override-langtools=/home/fredrik/sandbox2 && make)
15821 #     (cd build3 && ../configure --with-override-langtools=/home/fredrik/sandbox3 && make)
15822 #
15823 
15824 
15825 # Check whether --with-override-langtools was given.
15826 if test "${with_override_langtools+set}" = set; then :
15827   withval=$with_override_langtools;
15828 fi
15829 
15830 
15831 
15832 # Check whether --with-override-corba was given.
15833 if test "${with_override_corba+set}" = set; then :
15834   withval=$with_override_corba;
15835 fi
15836 
15837 
15838 
15839 # Check whether --with-override-jaxp was given.
15840 if test "${with_override_jaxp+set}" = set; then :
15841   withval=$with_override_jaxp;
15842 fi
15843 
15844 
15845 
15846 # Check whether --with-override-jaxws was given.
15847 if test "${with_override_jaxws+set}" = set; then :
15848   withval=$with_override_jaxws;
15849 fi
15850 
15851 
15852 
15853 # Check whether --with-override-hotspot was given.
15854 if test "${with_override_hotspot+set}" = set; then :
15855   withval=$with_override_hotspot;
15856 fi
15857 
15858 
15859 
15860 # Check whether --with-override-jdk was given.
15861 if test "${with_override_jdk+set}" = set; then :
15862   withval=$with_override_jdk;
15863 fi
15864 
15865 
15866 if test "x$with_override_langtools" != x; then
15867     CURDIR="$PWD"
15868     cd "$with_override_langtools"
15869     LANGTOOLS_TOPDIR="`pwd`"
15870     cd "$CURDIR"
15871     if ! test -f $LANGTOOLS_TOPDIR/makefiles/Makefile; then
15872         as_fn_error $? "You have to override langtools with a full langtools repo!" "$LINENO" 5
15873     fi
15874     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if langtools should be overridden" >&5
15875 $as_echo_n "checking if langtools should be overridden... " >&6; }
15876     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $LANGTOOLS_TOPDIR" >&5
15877 $as_echo "yes with $LANGTOOLS_TOPDIR" >&6; }
15878 fi
15879 if test "x$with_override_corba" != x; then
15880     CURDIR="$PWD"
15881     cd "$with_override_corba"
15882     CORBA_TOPDIR="`pwd`"
15883     cd "$CURDIR"
15884     if ! test -f $CORBA_TOPDIR/makefiles/Makefile; then
15885         as_fn_error $? "You have to override corba with a full corba repo!" "$LINENO" 5
15886     fi
15887     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if corba should be overridden" >&5
15888 $as_echo_n "checking if corba should be overridden... " >&6; }
15889     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $CORBA_TOPDIR" >&5
15890 $as_echo "yes with $CORBA_TOPDIR" >&6; }
15891 fi
15892 if test "x$with_override_jaxp" != x; then
15893     CURDIR="$PWD"
15894     cd "$with_override_jaxp"
15895     JAXP_TOPDIR="`pwd`"
15896     cd "$CURDIR"
15897     if ! test -f $JAXP_TOPDIR/makefiles/Makefile; then
15898         as_fn_error $? "You have to override jaxp with a full jaxp repo!" "$LINENO" 5
15899     fi
15900     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jaxp should be overridden" >&5
15901 $as_echo_n "checking if jaxp should be overridden... " >&6; }
15902     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JAXP_TOPDIR" >&5
15903 $as_echo "yes with $JAXP_TOPDIR" >&6; }
15904 fi
15905 if test "x$with_override_jaxws" != x; then
15906     CURDIR="$PWD"
15907     cd "$with_override_jaxws"
15908     JAXWS_TOPDIR="`pwd`"
15909     cd "$CURDIR"
15910     if ! test -f $JAXWS_TOPDIR/makefiles/Makefile; then
15911         as_fn_error $? "You have to override jaxws with a full jaxws repo!" "$LINENO" 5
15912     fi
15913     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jaxws should be overridden" >&5
15914 $as_echo_n "checking if jaxws should be overridden... " >&6; }
15915     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JAXWS_TOPDIR" >&5
15916 $as_echo "yes with $JAXWS_TOPDIR" >&6; }
15917 fi
15918 if test "x$with_override_hotspot" != x; then
15919     CURDIR="$PWD"
15920     cd "$with_override_hotspot"
15921     HOTSPOT_TOPDIR="`pwd`"
15922     cd "$CURDIR"
15923     if ! test -f $HOTSPOT_TOPDIR/make/Makefile && \
15924        ! test -f $HOTSPOT_TOPDIR/makefiles/Makefile; then
15925         as_fn_error $? "You have to override hotspot with a full hotspot repo!" "$LINENO" 5
15926     fi
15927     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be overridden" >&5
15928 $as_echo_n "checking if hotspot should be overridden... " >&6; }
15929     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $HOTSPOT_TOPDIR" >&5
15930 $as_echo "yes with $HOTSPOT_TOPDIR" >&6; }
15931 fi
15932 if test "x$with_override_jdk" != x; then
15933     CURDIR="$PWD"
15934     cd "$with_override_jdk"
15935     JDK_TOPDIR="`pwd`"
15936     cd "$CURDIR"
15937     if ! test -f $JDK_TOPDIR/makefiles/Makefile; then
15938         as_fn_error $? "You have to override JDK with a full JDK repo!" "$LINENO" 5
15939     fi
15940     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if JDK should be overridden" >&5
15941 $as_echo_n "checking if JDK should be overridden... " >&6; }
15942     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JDK_TOPDIR" >&5
15943 $as_echo "yes with $JDK_TOPDIR" >&6; }
15944 fi
15945 
15946 
15947 
15948 BUILD_OUTPUT="$OUTPUT_ROOT"
15949 
15950 
15951 HOTSPOT_DIST="$OUTPUT_ROOT/hotspot/dist"
15952 BUILD_HOTSPOT=true
15953 
15954 
15955 
15956 # Check whether --with-import-hotspot was given.
15957 if test "${with_import_hotspot+set}" = set; then :
15958   withval=$with_import_hotspot;
15959 fi
15960 
15961 if test "x$with_import_hotspot" != x; then
15962     CURDIR="$PWD"
15963     cd "$with_import_hotspot"
15964     HOTSPOT_DIST="`pwd`"
15965     cd "$CURDIR"
15966     if ! (test -d $HOTSPOT_DIST/lib && test -d $HOTSPOT_DIST/jre/lib); then
15967         as_fn_error $? "You have to import hotspot from a full jdk image or hotspot build dist dir!" "$LINENO" 5
15968     fi
15969     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be imported" >&5
15970 $as_echo_n "checking if hotspot should be imported... " >&6; }
15971     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes from $HOTSPOT_DIST" >&5
15972 $as_echo "yes from $HOTSPOT_DIST" >&6; }
15973     BUILD_HOTSPOT=false
15974 fi
15975 
15976 JDK_OUTPUTDIR="$OUTPUT_ROOT/jdk"
15977 
15978 
15979 ###############################################################################
15980 #
15981 # Setup the toolchain (compilers etc), i.e. the tools that need to be
15982 # cross-compilation aware.
15983 #
15984 ###############################################################################
15985 
15986 
15987 ###############################################################################
15988 #
15989 # Configure the development tool paths and potential sysroot.
15990 #
15991 ac_ext=cpp
15992 ac_cpp='$CXXCPP $CPPFLAGS'
15993 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
15994 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
15995 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
15996 
15997 
15998 # The option used to specify the target .o,.a or .so file.
15999 # When compiling, how to specify the to be created object file.
16000 CC_OUT_OPTION='-o$(SPACE)'
16001 # When linking, how to specify the to be created executable.
16002 EXE_OUT_OPTION='-o$(SPACE)'
16003 # When linking, how to specify the to be created dynamically linkable library.
16004 LD_OUT_OPTION='-o$(SPACE)'
16005 # When archiving, how to specify the to be create static archive for object files.
16006 AR_OUT_OPTION='rcs$(SPACE)'
16007 
16008 
16009 
16010 
16011 
16012 # Locate the actual tools
16013 
16014 if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
16015 
16016   # Store path to cygwin link.exe to help excluding it when searching for
16017   # VS linker. This must be done before changing the PATH when looking for VS.
16018   # Extract the first word of "link", so it can be a program name with args.
16019 set dummy link; ac_word=$2
16020 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16021 $as_echo_n "checking for $ac_word... " >&6; }
16022 if ${ac_cv_path_CYGWIN_LINK+:} false; then :
16023   $as_echo_n "(cached) " >&6
16024 else
16025   case $CYGWIN_LINK in
16026   [\\/]* | ?:[\\/]*)
16027   ac_cv_path_CYGWIN_LINK="$CYGWIN_LINK" # Let the user override the test with a path.
16028   ;;
16029   *)
16030   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16031 for as_dir in $PATH
16032 do
16033   IFS=$as_save_IFS
16034   test -z "$as_dir" && as_dir=.
16035     for ac_exec_ext in '' $ac_executable_extensions; do
16036   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
16037     ac_cv_path_CYGWIN_LINK="$as_dir/$ac_word$ac_exec_ext"
16038     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16039     break 2
16040   fi
16041 done
16042   done
16043 IFS=$as_save_IFS
16044 
16045   ;;
16046 esac
16047 fi
16048 CYGWIN_LINK=$ac_cv_path_CYGWIN_LINK
16049 if test -n "$CYGWIN_LINK"; then
16050   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_LINK" >&5
16051 $as_echo "$CYGWIN_LINK" >&6; }
16052 else
16053   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16054 $as_echo "no" >&6; }
16055 fi
16056 
16057 
16058   if test "x$CYGWIN_LINK" != x; then
16059     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the first found link.exe is actually the Cygwin link tool" >&5
16060 $as_echo_n "checking if the first found link.exe is actually the Cygwin link tool... " >&6; }
16061     "$CYGWIN_LINK" --version > /dev/null
16062     if test $? -eq 0 ; then
16063       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16064 $as_echo "yes" >&6; }
16065     else
16066       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16067 $as_echo "no" >&6; }
16068       # This might be the VS linker. Don't exclude it later on.
16069       CYGWIN_LINK=""
16070     fi
16071   fi
16072 
16073   # First-hand choice is to locate and run the vsvars bat file.
16074 
16075   if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
16076     VCVARSFILE="vc/bin/vcvars32.bat"
16077   else
16078     VCVARSFILE="vc/bin/amd64/vcvars64.bat"
16079   fi
16080 
16081   VS_ENV_CMD=""
16082   VS_ENV_ARGS=""
16083   if test "x$with_toolsdir" != x; then
16084 
16085   if test "x$VS_ENV_CMD" = x; then
16086     VS100BASE="$with_toolsdir/../.."
16087     METHOD="--with-tools-dir"
16088 
16089   windows_path="$VS100BASE"
16090   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16091     unix_path=`$CYGPATH -u "$windows_path"`
16092     VS100BASE="$unix_path"
16093   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16094     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16095     VS100BASE="$unix_path"
16096   fi
16097 
16098     if test -d "$VS100BASE"; then
16099       if test -f "$VS100BASE/$VCVARSFILE"; then
16100         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16101 $as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16102         VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16103       else
16104         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16105 $as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16106         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16107 $as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16108       fi
16109     fi
16110   fi
16111 
16112   fi
16113 
16114   if test "x$with_toolsdir" != x && test "x$VS_ENV_CMD" = x; then
16115     # Having specified an argument which is incorrect will produce an instant failure;
16116     # we should not go on looking
16117     { $as_echo "$as_me:${as_lineno-$LINENO}: The path given by --with-tools-dir does not contain a valid Visual Studio installation" >&5
16118 $as_echo "$as_me: The path given by --with-tools-dir does not contain a valid Visual Studio installation" >&6;}
16119     { $as_echo "$as_me:${as_lineno-$LINENO}: Please point to the VC/bin directory within the Visual Studio installation" >&5
16120 $as_echo "$as_me: Please point to the VC/bin directory within the Visual Studio installation" >&6;}
16121     as_fn_error $? "Cannot locate a valid Visual Studio installation" "$LINENO" 5
16122   fi
16123 
16124   if test "x$ProgramW6432" != x; then
16125 
16126   if test "x$VS_ENV_CMD" = x; then
16127     WIN_SDK_BASE="$ProgramW6432/Microsoft SDKs/Windows/v7.1/Bin"
16128     METHOD="well-known name"
16129 
16130   windows_path="$WIN_SDK_BASE"
16131   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16132     unix_path=`$CYGPATH -u "$windows_path"`
16133     WIN_SDK_BASE="$unix_path"
16134   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16135     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16136     WIN_SDK_BASE="$unix_path"
16137   fi
16138 
16139     if test -d "$WIN_SDK_BASE"; then
16140       # There have been cases of partial or broken SDK installations. A missing
16141       # lib dir is not going to work.
16142       if test ! -d "$WIN_SDK_BASE/../lib"; then
16143         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16144 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16145         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
16146 $as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
16147       elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
16148         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16149 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16150         VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
16151         if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
16152           VS_ENV_ARGS="/x86"
16153         else
16154           VS_ENV_ARGS="/x64"
16155         fi
16156       else
16157         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16158 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16159         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
16160 $as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
16161       fi
16162     fi
16163   fi
16164 
16165   fi
16166   if test "x$PROGRAMW6432" != x; then
16167 
16168   if test "x$VS_ENV_CMD" = x; then
16169     WIN_SDK_BASE="$PROGRAMW6432/Microsoft SDKs/Windows/v7.1/Bin"
16170     METHOD="well-known name"
16171 
16172   windows_path="$WIN_SDK_BASE"
16173   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16174     unix_path=`$CYGPATH -u "$windows_path"`
16175     WIN_SDK_BASE="$unix_path"
16176   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16177     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16178     WIN_SDK_BASE="$unix_path"
16179   fi
16180 
16181     if test -d "$WIN_SDK_BASE"; then
16182       # There have been cases of partial or broken SDK installations. A missing
16183       # lib dir is not going to work.
16184       if test ! -d "$WIN_SDK_BASE/../lib"; then
16185         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16186 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16187         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
16188 $as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
16189       elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
16190         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16191 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16192         VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
16193         if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
16194           VS_ENV_ARGS="/x86"
16195         else
16196           VS_ENV_ARGS="/x64"
16197         fi
16198       else
16199         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16200 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16201         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
16202 $as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
16203       fi
16204     fi
16205   fi
16206 
16207   fi
16208   if test "x$PROGRAMFILES" != x; then
16209 
16210   if test "x$VS_ENV_CMD" = x; then
16211     WIN_SDK_BASE="$PROGRAMFILES/Microsoft SDKs/Windows/v7.1/Bin"
16212     METHOD="well-known name"
16213 
16214   windows_path="$WIN_SDK_BASE"
16215   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16216     unix_path=`$CYGPATH -u "$windows_path"`
16217     WIN_SDK_BASE="$unix_path"
16218   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16219     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16220     WIN_SDK_BASE="$unix_path"
16221   fi
16222 
16223     if test -d "$WIN_SDK_BASE"; then
16224       # There have been cases of partial or broken SDK installations. A missing
16225       # lib dir is not going to work.
16226       if test ! -d "$WIN_SDK_BASE/../lib"; then
16227         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16228 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16229         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
16230 $as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
16231       elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
16232         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16233 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16234         VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
16235         if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
16236           VS_ENV_ARGS="/x86"
16237         else
16238           VS_ENV_ARGS="/x64"
16239         fi
16240       else
16241         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16242 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16243         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
16244 $as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
16245       fi
16246     fi
16247   fi
16248 
16249   fi
16250 
16251   if test "x$VS_ENV_CMD" = x; then
16252     WIN_SDK_BASE="C:/Program Files/Microsoft SDKs/Windows/v7.1/Bin"
16253     METHOD="well-known name"
16254 
16255   windows_path="$WIN_SDK_BASE"
16256   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16257     unix_path=`$CYGPATH -u "$windows_path"`
16258     WIN_SDK_BASE="$unix_path"
16259   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16260     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16261     WIN_SDK_BASE="$unix_path"
16262   fi
16263 
16264     if test -d "$WIN_SDK_BASE"; then
16265       # There have been cases of partial or broken SDK installations. A missing
16266       # lib dir is not going to work.
16267       if test ! -d "$WIN_SDK_BASE/../lib"; then
16268         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16269 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16270         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
16271 $as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
16272       elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
16273         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16274 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16275         VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
16276         if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
16277           VS_ENV_ARGS="/x86"
16278         else
16279           VS_ENV_ARGS="/x64"
16280         fi
16281       else
16282         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16283 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16284         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
16285 $as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
16286       fi
16287     fi
16288   fi
16289 
16290 
16291   if test "x$VS_ENV_CMD" = x; then
16292     WIN_SDK_BASE="C:/Program Files (x86)/Microsoft SDKs/Windows/v7.1/Bin"
16293     METHOD="well-known name"
16294 
16295   windows_path="$WIN_SDK_BASE"
16296   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16297     unix_path=`$CYGPATH -u "$windows_path"`
16298     WIN_SDK_BASE="$unix_path"
16299   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16300     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16301     WIN_SDK_BASE="$unix_path"
16302   fi
16303 
16304     if test -d "$WIN_SDK_BASE"; then
16305       # There have been cases of partial or broken SDK installations. A missing
16306       # lib dir is not going to work.
16307       if test ! -d "$WIN_SDK_BASE/../lib"; then
16308         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16309 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16310         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
16311 $as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
16312       elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
16313         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16314 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16315         VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
16316         if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
16317           VS_ENV_ARGS="/x86"
16318         else
16319           VS_ENV_ARGS="/x64"
16320         fi
16321       else
16322         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16323 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16324         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
16325 $as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
16326       fi
16327     fi
16328   fi
16329 
16330 
16331   if test "x$VS100COMNTOOLS" != x; then
16332 
16333   if test "x$VS_ENV_CMD" = x; then
16334     VS100BASE="$VS100COMNTOOLS/../.."
16335     METHOD="VS100COMNTOOLS variable"
16336 
16337   windows_path="$VS100BASE"
16338   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16339     unix_path=`$CYGPATH -u "$windows_path"`
16340     VS100BASE="$unix_path"
16341   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16342     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16343     VS100BASE="$unix_path"
16344   fi
16345 
16346     if test -d "$VS100BASE"; then
16347       if test -f "$VS100BASE/$VCVARSFILE"; then
16348         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16349 $as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16350         VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16351       else
16352         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16353 $as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16354         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16355 $as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16356       fi
16357     fi
16358   fi
16359 
16360   fi
16361   if test "x$PROGRAMFILES" != x; then
16362 
16363   if test "x$VS_ENV_CMD" = x; then
16364     VS100BASE="$PROGRAMFILES/Microsoft Visual Studio 10.0"
16365     METHOD="well-known name"
16366 
16367   windows_path="$VS100BASE"
16368   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16369     unix_path=`$CYGPATH -u "$windows_path"`
16370     VS100BASE="$unix_path"
16371   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16372     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16373     VS100BASE="$unix_path"
16374   fi
16375 
16376     if test -d "$VS100BASE"; then
16377       if test -f "$VS100BASE/$VCVARSFILE"; then
16378         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16379 $as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16380         VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16381       else
16382         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16383 $as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16384         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16385 $as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16386       fi
16387     fi
16388   fi
16389 
16390   fi
16391 
16392   if test "x$VS_ENV_CMD" = x; then
16393     VS100BASE="C:/Program Files/Microsoft Visual Studio 10.0"
16394     METHOD="well-known name"
16395 
16396   windows_path="$VS100BASE"
16397   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16398     unix_path=`$CYGPATH -u "$windows_path"`
16399     VS100BASE="$unix_path"
16400   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16401     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16402     VS100BASE="$unix_path"
16403   fi
16404 
16405     if test -d "$VS100BASE"; then
16406       if test -f "$VS100BASE/$VCVARSFILE"; then
16407         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16408 $as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16409         VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16410       else
16411         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16412 $as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16413         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16414 $as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16415       fi
16416     fi
16417   fi
16418 
16419 
16420   if test "x$VS_ENV_CMD" = x; then
16421     VS100BASE="C:/Program Files (x86)/Microsoft Visual Studio 10.0"
16422     METHOD="well-known name"
16423 
16424   windows_path="$VS100BASE"
16425   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16426     unix_path=`$CYGPATH -u "$windows_path"`
16427     VS100BASE="$unix_path"
16428   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16429     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16430     VS100BASE="$unix_path"
16431   fi
16432 
16433     if test -d "$VS100BASE"; then
16434       if test -f "$VS100BASE/$VCVARSFILE"; then
16435         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16436 $as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16437         VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16438       else
16439         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16440 $as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16441         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16442 $as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16443       fi
16444     fi
16445   fi
16446 
16447 
16448   if test "x$VS_ENV_CMD" != x; then
16449     # We have found a Visual Studio environment on disk, let's extract variables from the vsvars bat file.
16450 
16451   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16452 
16453   # First separate the path from the arguments. This will split at the first
16454   # space.
16455   complete="$VS_ENV_CMD"
16456   path="${complete%% *}"
16457   tmp="$complete EOL"
16458   arguments="${tmp#* }"
16459 
16460   # Input might be given as Windows format, start by converting to
16461   # unix format.
16462   new_path=`$CYGPATH -u "$path"`
16463 
16464   # Now try to locate executable using which
16465   new_path=`$WHICH "$new_path" 2> /dev/null`
16466   # bat and cmd files are not always considered executable in cygwin causing which
16467   # to not find them
16468   if test "x$new_path" = x \
16469            && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16470            && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16471     new_path=`$CYGPATH -u "$path"`
16472   fi
16473   if test "x$new_path" = x; then
16474     # Oops. Which didn't find the executable.
16475     # The splitting of arguments from the executable at a space might have been incorrect,
16476     # since paths with space are more likely in Windows. Give it another try with the whole
16477     # argument.
16478     path="$complete"
16479     arguments="EOL"
16480     new_path=`$CYGPATH -u "$path"`
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       # It's still not found. Now this is an unrecoverable error.
16491       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
16492 $as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
16493       has_space=`$ECHO "$complete" | $GREP " "`
16494       if test "x$has_space" != x; then
16495         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16496 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16497       fi
16498       as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
16499     fi
16500   fi
16501 
16502   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16503   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16504   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16505   # "foo.exe" is OK but "foo" is an error.
16506   #
16507   # This test is therefore slightly more accurate than "test -f" to check for file precense.
16508   # It is also a way to make sure we got the proper file name for the real test later on.
16509   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16510   if test "x$test_shortpath" = x; then
16511     # Short path failed, file does not exist as specified.
16512     # Try adding .exe or .cmd
16513     if test -f "${new_path}.exe"; then
16514        input_to_shortpath="${new_path}.exe"
16515     elif test -f "${new_path}.cmd"; then
16516        input_to_shortpath="${new_path}.cmd"
16517     else
16518       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&5
16519 $as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&6;}
16520       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
16521 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
16522       as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
16523     fi
16524   else
16525     input_to_shortpath="$new_path"
16526   fi
16527 
16528   # Call helper function which possibly converts this using DOS-style short mode.
16529   # If so, the updated path is stored in $new_path.
16530   new_path="$input_to_shortpath"
16531 
16532   input_path="$input_to_shortpath"
16533   # Check if we need to convert this using DOS-style short mode. If the path
16534   # contains just simple characters, use it. Otherwise (spaces, weird characters),
16535   # take no chances and rewrite it.
16536   # Note: m4 eats our [], so we need to use [ and ] instead.
16537   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16538   if test "x$has_forbidden_chars" != x; then
16539     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16540     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16541     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16542     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16543       # Going to short mode and back again did indeed matter. Since short mode is
16544       # case insensitive, let's make it lowercase to improve readability.
16545       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16546       # Now convert it back to Unix-stile (cygpath)
16547       input_path=`$CYGPATH -u "$shortmode_path"`
16548       new_path="$input_path"
16549     fi
16550   fi
16551 
16552   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16553   if test "x$test_cygdrive_prefix" = x; then
16554     # As a simple fix, exclude /usr/bin since it's not a real path.
16555     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
16556       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16557       # a path prefixed by /cygdrive for fixpath to work.
16558       new_path="$CYGWIN_ROOT_PATH$input_path"
16559     fi
16560   fi
16561 
16562   # remove trailing .exe if any
16563   new_path="${new_path/%.exe/}"
16564 
16565   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16566 
16567   # First separate the path from the arguments. This will split at the first
16568   # space.
16569   complete="$VS_ENV_CMD"
16570   path="${complete%% *}"
16571   tmp="$complete EOL"
16572   arguments="${tmp#* }"
16573 
16574   # Input might be given as Windows format, start by converting to
16575   # unix format.
16576   new_path="$path"
16577 
16578   windows_path="$new_path"
16579   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16580     unix_path=`$CYGPATH -u "$windows_path"`
16581     new_path="$unix_path"
16582   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16583     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16584     new_path="$unix_path"
16585   fi
16586 
16587 
16588   # Now try to locate executable using which
16589   new_path=`$WHICH "$new_path" 2> /dev/null`
16590 
16591   if test "x$new_path" = x; then
16592     # Oops. Which didn't find the executable.
16593     # The splitting of arguments from the executable at a space might have been incorrect,
16594     # since paths with space are more likely in Windows. Give it another try with the whole
16595     # argument.
16596     path="$complete"
16597     arguments="EOL"
16598     new_path="$path"
16599 
16600   windows_path="$new_path"
16601   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16602     unix_path=`$CYGPATH -u "$windows_path"`
16603     new_path="$unix_path"
16604   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16605     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16606     new_path="$unix_path"
16607   fi
16608 
16609 
16610     new_path=`$WHICH "$new_path" 2> /dev/null`
16611 
16612     if test "x$new_path" = x; then
16613       # It's still not found. Now this is an unrecoverable error.
16614       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
16615 $as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
16616       has_space=`$ECHO "$complete" | $GREP " "`
16617       if test "x$has_space" != x; then
16618         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16619 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16620       fi
16621       as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
16622     fi
16623   fi
16624 
16625   # Now new_path has a complete unix path to the binary
16626   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
16627     # Keep paths in /bin as-is, but remove trailing .exe if any
16628     new_path="${new_path/%.exe/}"
16629     # Do not save /bin paths to all_fixpath_prefixes!
16630   else
16631     # Not in mixed or Windows style, start by that.
16632     new_path=`cmd //c echo $new_path`
16633 
16634   input_path="$new_path"
16635   # Check if we need to convert this using DOS-style short mode. If the path
16636   # contains just simple characters, use it. Otherwise (spaces, weird characters),
16637   # take no chances and rewrite it.
16638   # Note: m4 eats our [], so we need to use [ and ] instead.
16639   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16640   if test "x$has_forbidden_chars" != x; then
16641     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16642     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16643   fi
16644 
16645     # Output is in $new_path
16646 
16647   windows_path="$new_path"
16648   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16649     unix_path=`$CYGPATH -u "$windows_path"`
16650     new_path="$unix_path"
16651   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16652     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16653     new_path="$unix_path"
16654   fi
16655 
16656     # remove trailing .exe if any
16657     new_path="${new_path/%.exe/}"
16658 
16659     # Save the first 10 bytes of this path to the storage, so fixpath can work.
16660     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16661   fi
16662 
16663   else
16664     # We're on a posix platform. Hooray! :)
16665     # First separate the path from the arguments. This will split at the first
16666     # space.
16667     complete="$VS_ENV_CMD"
16668     path="${complete%% *}"
16669     tmp="$complete EOL"
16670     arguments="${tmp#* }"
16671 
16672     # Cannot rely on the command "which" here since it doesn't always work.
16673     is_absolute_path=`$ECHO "$path" | $GREP ^/`
16674     if test -z "$is_absolute_path"; then
16675       # Path to executable is not absolute. Find it.
16676       IFS_save="$IFS"
16677       IFS=:
16678       for p in $PATH; do
16679         if test -f "$p/$path" && test -x "$p/$path"; then
16680           new_path="$p/$path"
16681           break
16682         fi
16683       done
16684       IFS="$IFS_save"
16685     else
16686       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving VS_ENV_CMD (as $path) failed, using $path directly." >&5
16687 $as_echo "$as_me: Resolving VS_ENV_CMD (as $path) failed, using $path directly." >&6;}
16688       new_path="$path"
16689     fi
16690 
16691     if test "x$new_path" = x; then
16692         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
16693 $as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
16694         has_space=`$ECHO "$complete" | $GREP " "`
16695         if test "x$has_space" != x; then
16696           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
16697 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
16698         fi
16699         as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
16700       fi
16701   fi
16702 
16703       # Now join together the path and the arguments once again
16704       if test "x$arguments" != xEOL; then
16705         new_complete="$new_path ${arguments% *}"
16706       else
16707         new_complete="$new_path"
16708       fi
16709 
16710   if test "x$complete" != "x$new_complete"; then
16711       VS_ENV_CMD="$new_complete"
16712       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting VS_ENV_CMD to \"$new_complete\"" >&5
16713 $as_echo "$as_me: Rewriting VS_ENV_CMD to \"$new_complete\"" >&6;}
16714     fi
16715 
16716 
16717     # Lets extract the variables that are set by vcvarsall.bat/vsvars32.bat/vsvars64.bat
16718     { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to extract Visual Studio environment variables" >&5
16719 $as_echo "$as_me: Trying to extract Visual Studio environment variables" >&6;}
16720     cd $OUTPUT_ROOT
16721     # FIXME: The code betweeen ---- was inlined from a separate script and is not properly adapted
16722     # to autoconf standards.
16723 
16724     #----
16725 
16726     # Cannot use the VS10 setup script directly (since it only updates the DOS subshell environment)
16727     # but calculate the difference in Cygwin environment before/after running it and then
16728     # apply the diff.
16729 
16730     if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
16731       _vs10varsall=`cygpath -a -m -s "$VS_ENV_CMD"`
16732       _dosvs10varsall=`cygpath -a -w -s $_vs10varsall`
16733       _dosbash=`cygpath -a -w -s \`which bash\`.*`
16734     else
16735       _dosvs10varsall=`cmd //c echo $VS_ENV_CMD`
16736       _dosbash=`cmd //c echo \`which bash\``
16737     fi
16738 
16739     # generate the set of exported vars before/after the vs10 setup
16740     $ECHO "@echo off"                                           >  localdevenvtmp.bat
16741     $ECHO "$_dosbash -c \"export -p\" > localdevenvtmp.export0" >> localdevenvtmp.bat
16742     $ECHO "call $_dosvs10varsall $VS_ENV_ARGS"                  >> localdevenvtmp.bat
16743     $ECHO "$_dosbash -c \"export -p\" > localdevenvtmp.export1" >> localdevenvtmp.bat
16744 
16745     # Now execute the newly created bat file.
16746     # The | cat is to stop SetEnv.Cmd to mess with system colors on msys
16747     cmd /c localdevenvtmp.bat | cat
16748 
16749     # apply the diff (less some non-vs10 vars named by "!")
16750     $SORT localdevenvtmp.export0 | $GREP -v "!" > localdevenvtmp.export0.sort
16751     $SORT localdevenvtmp.export1 | $GREP -v "!" > localdevenvtmp.export1.sort
16752     $COMM -1 -3 localdevenvtmp.export0.sort localdevenvtmp.export1.sort > localdevenv.sh
16753 
16754     # cleanup
16755     $RM localdevenvtmp*
16756     #----
16757     cd $CURDIR
16758     if test ! -s $OUTPUT_ROOT/localdevenv.sh; then
16759       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16760 $as_echo "no" >&6; }
16761       { $as_echo "$as_me:${as_lineno-$LINENO}: Could not succesfully extract the envionment variables needed for the VS setup." >&5
16762 $as_echo "$as_me: Could not succesfully extract the envionment variables needed for the VS setup." >&6;}
16763       { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
16764 $as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
16765       { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
16766 $as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
16767       as_fn_error $? "Cannot continue" "$LINENO" 5
16768     fi
16769 
16770     # Now set all paths and other env variables. This will allow the rest of
16771     # the configure script to find and run the compiler in the proper way.
16772     { $as_echo "$as_me:${as_lineno-$LINENO}: Setting extracted environment variables" >&5
16773 $as_echo "$as_me: Setting extracted environment variables" >&6;}
16774     . $OUTPUT_ROOT/localdevenv.sh
16775   else
16776     # We did not find a vsvars bat file, let's hope we are run from a VS command prompt.
16777     { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio installation, checking current environment" >&5
16778 $as_echo "$as_me: Cannot locate a valid Visual Studio installation, checking current environment" >&6;}
16779   fi
16780 
16781   # At this point, we should have corrent variables in the environment, or we can't continue.
16782   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Visual Studio variables" >&5
16783 $as_echo_n "checking for Visual Studio variables... " >&6; }
16784 
16785   if test "x$VCINSTALLDIR" != x || test "x$WindowsSDKDir" != x || test "x$WINDOWSSDKDIR" != x; then
16786     if test "x$INCLUDE" = x || test "x$LIB" = x; then
16787       { $as_echo "$as_me:${as_lineno-$LINENO}: result: present but broken" >&5
16788 $as_echo "present but broken" >&6; }
16789       as_fn_error $? "Your VC command prompt seems broken, INCLUDE and/or LIB is missing." "$LINENO" 5
16790     else
16791       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
16792 $as_echo "ok" >&6; }
16793       # Remove any trailing \ from INCLUDE and LIB to avoid trouble in spec.gmk.
16794       VS_INCLUDE=`$ECHO "$INCLUDE" | $SED 's/\\\\$//'`
16795       VS_LIB=`$ECHO "$LIB" | $SED 's/\\\\$//'`
16796       VS_PATH="$PATH"
16797 
16798 
16799 
16800     fi
16801   else
16802     { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
16803 $as_echo "not found" >&6; }
16804 
16805     if test "x$VS_ENV_CMD" = x; then
16806       { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&5
16807 $as_echo "$as_me: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&6;}
16808       { $as_echo "$as_me:${as_lineno-$LINENO}: nor is this script run from a Visual Studio command prompt." >&5
16809 $as_echo "$as_me: nor is this script run from a Visual Studio command prompt." >&6;}
16810     else
16811       { $as_echo "$as_me:${as_lineno-$LINENO}: Running the extraction script failed." >&5
16812 $as_echo "$as_me: Running the extraction script failed." >&6;}
16813     fi
16814     { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
16815 $as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
16816     { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
16817 $as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
16818     as_fn_error $? "Cannot continue" "$LINENO" 5
16819   fi
16820 
16821   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
16822 $as_echo_n "checking for msvcr100.dll... " >&6; }
16823 
16824 # Check whether --with-msvcr-dll was given.
16825 if test "${with_msvcr_dll+set}" = set; then :
16826   withval=$with_msvcr_dll;
16827 fi
16828 
16829   if test "x$with_msvcr_dll" != x; then
16830     MSVCR_DLL="$with_msvcr_dll"
16831   else
16832     if test "x$VCINSTALLDIR" != x; then
16833       if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
16834         MSVCR_DLL=`find "$VCINSTALLDIR" -name msvcr100.dll | grep x64 | head --lines 1`
16835       else
16836         MSVCR_DLL=`find "$VCINSTALLDIR" -name msvcr100.dll | grep x86 | grep -v ia64 | grep -v x64 | head --lines 1`
16837         if test "x$MSVCR_DLL" = x; then
16838           MSVCR_DLL=`find "$VCINSTALLDIR" -name msvcr100.dll | head --lines 1`
16839         fi
16840       fi
16841       if test "x$MSVCR_DLL" != x; then
16842         { $as_echo "$as_me:${as_lineno-$LINENO}: msvcr100.dll found in VCINSTALLDIR: $VCINSTALLDIR" >&5
16843 $as_echo "$as_me: msvcr100.dll found in VCINSTALLDIR: $VCINSTALLDIR" >&6;}
16844       else
16845         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: msvcr100.dll not found in VCINSTALLDIR: $VCINSTALLDIR" >&5
16846 $as_echo "$as_me: Warning: msvcr100.dll not found in VCINSTALLDIR: $VCINSTALLDIR" >&6;}
16847       fi
16848     fi
16849     if test "x$MSVCR_DLL" = x; then
16850       if test -f "$SYSTEMROOT/system32/msvcr100.dll"; then
16851         { $as_echo "$as_me:${as_lineno-$LINENO}: msvcr100.dll found in $SYSTEMROOT/system32" >&5
16852 $as_echo "$as_me: msvcr100.dll found in $SYSTEMROOT/system32" >&6;}
16853         MSVCR_DLL="$SYSTEMROOT/system32/msvcr100.dll"
16854       fi
16855     fi
16856   fi
16857   if test "x$MSVCR_DLL" = x; then
16858     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16859 $as_echo "no" >&6; }
16860     as_fn_error $? "Could not find msvcr100.dll !" "$LINENO" 5
16861   fi
16862   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
16863 $as_echo "$MSVCR_DLL" >&6; }
16864 
16865   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16866 
16867   # Input might be given as Windows format, start by converting to
16868   # unix format.
16869   path="$MSVCR_DLL"
16870   new_path=`$CYGPATH -u "$path"`
16871 
16872   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16873   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16874   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16875   # "foo.exe" is OK but "foo" is an error.
16876   #
16877   # This test is therefore slightly more accurate than "test -f" to check for file precense.
16878   # It is also a way to make sure we got the proper file name for the real test later on.
16879   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16880   if test "x$test_shortpath" = x; then
16881     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&5
16882 $as_echo "$as_me: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&6;}
16883     as_fn_error $? "Cannot locate the the path of MSVCR_DLL" "$LINENO" 5
16884   fi
16885 
16886   # Call helper function which possibly converts this using DOS-style short mode.
16887   # If so, the updated path is stored in $new_path.
16888 
16889   input_path="$new_path"
16890   # Check if we need to convert this using DOS-style short mode. If the path
16891   # contains just simple characters, use it. Otherwise (spaces, weird characters),
16892   # take no chances and rewrite it.
16893   # Note: m4 eats our [], so we need to use [ and ] instead.
16894   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16895   if test "x$has_forbidden_chars" != x; then
16896     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16897     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16898     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16899     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16900       # Going to short mode and back again did indeed matter. Since short mode is
16901       # case insensitive, let's make it lowercase to improve readability.
16902       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16903       # Now convert it back to Unix-stile (cygpath)
16904       input_path=`$CYGPATH -u "$shortmode_path"`
16905       new_path="$input_path"
16906     fi
16907   fi
16908 
16909   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16910   if test "x$test_cygdrive_prefix" = x; then
16911     # As a simple fix, exclude /usr/bin since it's not a real path.
16912     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
16913       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16914       # a path prefixed by /cygdrive for fixpath to work.
16915       new_path="$CYGWIN_ROOT_PATH$input_path"
16916     fi
16917   fi
16918 
16919 
16920   if test "x$path" != "x$new_path"; then
16921     MSVCR_DLL="$new_path"
16922     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVCR_DLL to \"$new_path\"" >&5
16923 $as_echo "$as_me: Rewriting MSVCR_DLL to \"$new_path\"" >&6;}
16924   fi
16925 
16926   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16927 
16928   path="$MSVCR_DLL"
16929   has_colon=`$ECHO $path | $GREP ^.:`
16930   new_path="$path"
16931   if test "x$has_colon" = x; then
16932     # Not in mixed or Windows style, start by that.
16933     new_path=`cmd //c echo $path`
16934   fi
16935 
16936 
16937   input_path="$new_path"
16938   # Check if we need to convert this using DOS-style short mode. If the path
16939   # contains just simple characters, use it. Otherwise (spaces, weird characters),
16940   # take no chances and rewrite it.
16941   # Note: m4 eats our [], so we need to use [ and ] instead.
16942   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16943   if test "x$has_forbidden_chars" != x; then
16944     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16945     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16946   fi
16947 
16948 
16949   windows_path="$new_path"
16950   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16951     unix_path=`$CYGPATH -u "$windows_path"`
16952     new_path="$unix_path"
16953   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16954     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16955     new_path="$unix_path"
16956   fi
16957 
16958   if test "x$path" != "x$new_path"; then
16959     MSVCR_DLL="$new_path"
16960     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVCR_DLL to \"$new_path\"" >&5
16961 $as_echo "$as_me: Rewriting MSVCR_DLL to \"$new_path\"" >&6;}
16962   fi
16963 
16964   # Save the first 10 bytes of this path to the storage, so fixpath can work.
16965   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16966 
16967   else
16968     # We're on a posix platform. Hooray! :)
16969     path="$MSVCR_DLL"
16970 
16971     if test ! -f "$path" && test ! -d "$path"; then
16972       as_fn_error $? "The path of MSVCR_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
16973     fi
16974 
16975     has_space=`$ECHO "$path" | $GREP " "`
16976     if test "x$has_space" != x; then
16977       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&5
16978 $as_echo "$as_me: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&6;}
16979       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
16980     fi
16981   fi
16982 
16983 
16984 
16985 
16986 # Check whether --with-dxsdk was given.
16987 if test "${with_dxsdk+set}" = set; then :
16988   withval=$with_dxsdk;
16989 fi
16990 
16991 
16992 # Check whether --with-dxsdk-lib was given.
16993 if test "${with_dxsdk_lib+set}" = set; then :
16994   withval=$with_dxsdk_lib;
16995 fi
16996 
16997 
16998 # Check whether --with-dxsdk-include was given.
16999 if test "${with_dxsdk_include+set}" = set; then :
17000   withval=$with_dxsdk_include;
17001 fi
17002 
17003 
17004   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DirectX SDK" >&5
17005 $as_echo_n "checking for DirectX SDK... " >&6; }
17006 
17007   if test "x$with_dxsdk" != x; then
17008     dxsdk_path="$with_dxsdk"
17009   elif test "x$DXSDK_DIR" != x; then
17010     dxsdk_path="$DXSDK_DIR"
17011   elif test -d "C:/DXSDK"; then
17012     dxsdk_path="C:/DXSDK"
17013   else
17014     as_fn_error $? "Could not find the DirectX SDK" "$LINENO" 5
17015   fi
17016   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $dxsdk_path" >&5
17017 $as_echo "$dxsdk_path" >&6; }
17018 
17019   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17020 
17021   # Input might be given as Windows format, start by converting to
17022   # unix format.
17023   path="$dxsdk_path"
17024   new_path=`$CYGPATH -u "$path"`
17025 
17026   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17027   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17028   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17029   # "foo.exe" is OK but "foo" is an error.
17030   #
17031   # This test is therefore slightly more accurate than "test -f" to check for file precense.
17032   # It is also a way to make sure we got the proper file name for the real test later on.
17033   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17034   if test "x$test_shortpath" = x; then
17035     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of dxsdk_path, which resolves as \"$path\", is invalid." >&5
17036 $as_echo "$as_me: The path of dxsdk_path, which resolves as \"$path\", is invalid." >&6;}
17037     as_fn_error $? "Cannot locate the the path of dxsdk_path" "$LINENO" 5
17038   fi
17039 
17040   # Call helper function which possibly converts this using DOS-style short mode.
17041   # If so, the updated path is stored in $new_path.
17042 
17043   input_path="$new_path"
17044   # Check if we need to convert this using DOS-style short mode. If the path
17045   # contains just simple characters, use it. Otherwise (spaces, weird characters),
17046   # take no chances and rewrite it.
17047   # Note: m4 eats our [], so we need to use [ and ] instead.
17048   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17049   if test "x$has_forbidden_chars" != x; then
17050     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17051     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17052     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17053     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17054       # Going to short mode and back again did indeed matter. Since short mode is
17055       # case insensitive, let's make it lowercase to improve readability.
17056       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17057       # Now convert it back to Unix-stile (cygpath)
17058       input_path=`$CYGPATH -u "$shortmode_path"`
17059       new_path="$input_path"
17060     fi
17061   fi
17062 
17063   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17064   if test "x$test_cygdrive_prefix" = x; then
17065     # As a simple fix, exclude /usr/bin since it's not a real path.
17066     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
17067       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17068       # a path prefixed by /cygdrive for fixpath to work.
17069       new_path="$CYGWIN_ROOT_PATH$input_path"
17070     fi
17071   fi
17072 
17073 
17074   if test "x$path" != "x$new_path"; then
17075     dxsdk_path="$new_path"
17076     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting dxsdk_path to \"$new_path\"" >&5
17077 $as_echo "$as_me: Rewriting dxsdk_path to \"$new_path\"" >&6;}
17078   fi
17079 
17080   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17081 
17082   path="$dxsdk_path"
17083   has_colon=`$ECHO $path | $GREP ^.:`
17084   new_path="$path"
17085   if test "x$has_colon" = x; then
17086     # Not in mixed or Windows style, start by that.
17087     new_path=`cmd //c echo $path`
17088   fi
17089 
17090 
17091   input_path="$new_path"
17092   # Check if we need to convert this using DOS-style short mode. If the path
17093   # contains just simple characters, use it. Otherwise (spaces, weird characters),
17094   # take no chances and rewrite it.
17095   # Note: m4 eats our [], so we need to use [ and ] instead.
17096   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17097   if test "x$has_forbidden_chars" != x; then
17098     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17099     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17100   fi
17101 
17102 
17103   windows_path="$new_path"
17104   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17105     unix_path=`$CYGPATH -u "$windows_path"`
17106     new_path="$unix_path"
17107   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17108     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17109     new_path="$unix_path"
17110   fi
17111 
17112   if test "x$path" != "x$new_path"; then
17113     dxsdk_path="$new_path"
17114     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting dxsdk_path to \"$new_path\"" >&5
17115 $as_echo "$as_me: Rewriting dxsdk_path to \"$new_path\"" >&6;}
17116   fi
17117 
17118   # Save the first 10 bytes of this path to the storage, so fixpath can work.
17119   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17120 
17121   else
17122     # We're on a posix platform. Hooray! :)
17123     path="$dxsdk_path"
17124 
17125     if test ! -f "$path" && test ! -d "$path"; then
17126       as_fn_error $? "The path of dxsdk_path, which resolves as \"$path\", is not found." "$LINENO" 5
17127     fi
17128 
17129     has_space=`$ECHO "$path" | $GREP " "`
17130     if test "x$has_space" != x; then
17131       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of dxsdk_path, which resolves as \"$path\", is invalid." >&5
17132 $as_echo "$as_me: The path of dxsdk_path, which resolves as \"$path\", is invalid." >&6;}
17133       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
17134     fi
17135   fi
17136 
17137 
17138   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DirectX SDK lib dir" >&5
17139 $as_echo_n "checking for DirectX SDK lib dir... " >&6; }
17140   if test "x$with_dxsdk_lib" != x; then
17141     DXSDK_LIB_PATH="$with_dxsdk_lib"
17142   elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
17143     DXSDK_LIB_PATH="$dxsdk_path/Lib/x64"
17144   else
17145     DXSDK_LIB_PATH="$dxsdk_path/Lib"
17146   fi
17147   # dsound.lib is linked to in jsoundds
17148   if test ! -f "$DXSDK_LIB_PATH/dsound.lib"; then
17149     as_fn_error $? "Invalid DirectX SDK lib dir" "$LINENO" 5
17150   fi
17151   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DXSDK_LIB_PATH" >&5
17152 $as_echo "$DXSDK_LIB_PATH" >&6; }
17153 
17154   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17155 
17156   # Input might be given as Windows format, start by converting to
17157   # unix format.
17158   path="$DXSDK_LIB_PATH"
17159   new_path=`$CYGPATH -u "$path"`
17160 
17161   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17162   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17163   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17164   # "foo.exe" is OK but "foo" is an error.
17165   #
17166   # This test is therefore slightly more accurate than "test -f" to check for file precense.
17167   # It is also a way to make sure we got the proper file name for the real test later on.
17168   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17169   if test "x$test_shortpath" = x; then
17170     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DXSDK_LIB_PATH, which resolves as \"$path\", is invalid." >&5
17171 $as_echo "$as_me: The path of DXSDK_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
17172     as_fn_error $? "Cannot locate the the path of DXSDK_LIB_PATH" "$LINENO" 5
17173   fi
17174 
17175   # Call helper function which possibly converts this using DOS-style short mode.
17176   # If so, the updated path is stored in $new_path.
17177 
17178   input_path="$new_path"
17179   # Check if we need to convert this using DOS-style short mode. If the path
17180   # contains just simple characters, use it. Otherwise (spaces, weird characters),
17181   # take no chances and rewrite it.
17182   # Note: m4 eats our [], so we need to use [ and ] instead.
17183   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17184   if test "x$has_forbidden_chars" != x; then
17185     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17186     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17187     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17188     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17189       # Going to short mode and back again did indeed matter. Since short mode is
17190       # case insensitive, let's make it lowercase to improve readability.
17191       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17192       # Now convert it back to Unix-stile (cygpath)
17193       input_path=`$CYGPATH -u "$shortmode_path"`
17194       new_path="$input_path"
17195     fi
17196   fi
17197 
17198   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17199   if test "x$test_cygdrive_prefix" = x; then
17200     # As a simple fix, exclude /usr/bin since it's not a real path.
17201     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
17202       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17203       # a path prefixed by /cygdrive for fixpath to work.
17204       new_path="$CYGWIN_ROOT_PATH$input_path"
17205     fi
17206   fi
17207 
17208 
17209   if test "x$path" != "x$new_path"; then
17210     DXSDK_LIB_PATH="$new_path"
17211     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DXSDK_LIB_PATH to \"$new_path\"" >&5
17212 $as_echo "$as_me: Rewriting DXSDK_LIB_PATH to \"$new_path\"" >&6;}
17213   fi
17214 
17215   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17216 
17217   path="$DXSDK_LIB_PATH"
17218   has_colon=`$ECHO $path | $GREP ^.:`
17219   new_path="$path"
17220   if test "x$has_colon" = x; then
17221     # Not in mixed or Windows style, start by that.
17222     new_path=`cmd //c echo $path`
17223   fi
17224 
17225 
17226   input_path="$new_path"
17227   # Check if we need to convert this using DOS-style short mode. If the path
17228   # contains just simple characters, use it. Otherwise (spaces, weird characters),
17229   # take no chances and rewrite it.
17230   # Note: m4 eats our [], so we need to use [ and ] instead.
17231   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17232   if test "x$has_forbidden_chars" != x; then
17233     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17234     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17235   fi
17236 
17237 
17238   windows_path="$new_path"
17239   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17240     unix_path=`$CYGPATH -u "$windows_path"`
17241     new_path="$unix_path"
17242   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17243     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17244     new_path="$unix_path"
17245   fi
17246 
17247   if test "x$path" != "x$new_path"; then
17248     DXSDK_LIB_PATH="$new_path"
17249     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DXSDK_LIB_PATH to \"$new_path\"" >&5
17250 $as_echo "$as_me: Rewriting DXSDK_LIB_PATH to \"$new_path\"" >&6;}
17251   fi
17252 
17253   # Save the first 10 bytes of this path to the storage, so fixpath can work.
17254   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17255 
17256   else
17257     # We're on a posix platform. Hooray! :)
17258     path="$DXSDK_LIB_PATH"
17259 
17260     if test ! -f "$path" && test ! -d "$path"; then
17261       as_fn_error $? "The path of DXSDK_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
17262     fi
17263 
17264     has_space=`$ECHO "$path" | $GREP " "`
17265     if test "x$has_space" != x; then
17266       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DXSDK_LIB_PATH, which resolves as \"$path\", is invalid." >&5
17267 $as_echo "$as_me: The path of DXSDK_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
17268       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
17269     fi
17270   fi
17271 
17272 
17273   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DirectX SDK include dir" >&5
17274 $as_echo_n "checking for DirectX SDK include dir... " >&6; }
17275   if test "x$with_dxsdk_include" != x; then
17276     DXSDK_INCLUDE_PATH="$with_dxsdk_include"
17277   else
17278     DXSDK_INCLUDE_PATH="$dxsdk_path/Include"
17279   fi
17280   # dsound.h is included in jsoundds
17281   if test ! -f "$DXSDK_INCLUDE_PATH/dsound.h"; then
17282     as_fn_error $? "Invalid DirectX SDK lib dir" "$LINENO" 5
17283   fi
17284   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DXSDK_INCLUDE_PATH" >&5
17285 $as_echo "$DXSDK_INCLUDE_PATH" >&6; }
17286 
17287   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17288 
17289   # Input might be given as Windows format, start by converting to
17290   # unix format.
17291   path="$DXSDK_INCLUDE_PATH"
17292   new_path=`$CYGPATH -u "$path"`
17293 
17294   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17295   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17296   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17297   # "foo.exe" is OK but "foo" is an error.
17298   #
17299   # This test is therefore slightly more accurate than "test -f" to check for file precense.
17300   # It is also a way to make sure we got the proper file name for the real test later on.
17301   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17302   if test "x$test_shortpath" = x; then
17303     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DXSDK_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
17304 $as_echo "$as_me: The path of DXSDK_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
17305     as_fn_error $? "Cannot locate the the path of DXSDK_INCLUDE_PATH" "$LINENO" 5
17306   fi
17307 
17308   # Call helper function which possibly converts this using DOS-style short mode.
17309   # If so, the updated path is stored in $new_path.
17310 
17311   input_path="$new_path"
17312   # Check if we need to convert this using DOS-style short mode. If the path
17313   # contains just simple characters, use it. Otherwise (spaces, weird characters),
17314   # take no chances and rewrite it.
17315   # Note: m4 eats our [], so we need to use [ and ] instead.
17316   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17317   if test "x$has_forbidden_chars" != x; then
17318     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17319     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17320     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17321     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17322       # Going to short mode and back again did indeed matter. Since short mode is
17323       # case insensitive, let's make it lowercase to improve readability.
17324       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17325       # Now convert it back to Unix-stile (cygpath)
17326       input_path=`$CYGPATH -u "$shortmode_path"`
17327       new_path="$input_path"
17328     fi
17329   fi
17330 
17331   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17332   if test "x$test_cygdrive_prefix" = x; then
17333     # As a simple fix, exclude /usr/bin since it's not a real path.
17334     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
17335       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17336       # a path prefixed by /cygdrive for fixpath to work.
17337       new_path="$CYGWIN_ROOT_PATH$input_path"
17338     fi
17339   fi
17340 
17341 
17342   if test "x$path" != "x$new_path"; then
17343     DXSDK_INCLUDE_PATH="$new_path"
17344     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DXSDK_INCLUDE_PATH to \"$new_path\"" >&5
17345 $as_echo "$as_me: Rewriting DXSDK_INCLUDE_PATH to \"$new_path\"" >&6;}
17346   fi
17347 
17348   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17349 
17350   path="$DXSDK_INCLUDE_PATH"
17351   has_colon=`$ECHO $path | $GREP ^.:`
17352   new_path="$path"
17353   if test "x$has_colon" = x; then
17354     # Not in mixed or Windows style, start by that.
17355     new_path=`cmd //c echo $path`
17356   fi
17357 
17358 
17359   input_path="$new_path"
17360   # Check if we need to convert this using DOS-style short mode. If the path
17361   # contains just simple characters, use it. Otherwise (spaces, weird characters),
17362   # take no chances and rewrite it.
17363   # Note: m4 eats our [], so we need to use [ and ] instead.
17364   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17365   if test "x$has_forbidden_chars" != x; then
17366     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17367     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17368   fi
17369 
17370 
17371   windows_path="$new_path"
17372   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17373     unix_path=`$CYGPATH -u "$windows_path"`
17374     new_path="$unix_path"
17375   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17376     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17377     new_path="$unix_path"
17378   fi
17379 
17380   if test "x$path" != "x$new_path"; then
17381     DXSDK_INCLUDE_PATH="$new_path"
17382     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DXSDK_INCLUDE_PATH to \"$new_path\"" >&5
17383 $as_echo "$as_me: Rewriting DXSDK_INCLUDE_PATH to \"$new_path\"" >&6;}
17384   fi
17385 
17386   # Save the first 10 bytes of this path to the storage, so fixpath can work.
17387   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17388 
17389   else
17390     # We're on a posix platform. Hooray! :)
17391     path="$DXSDK_INCLUDE_PATH"
17392 
17393     if test ! -f "$path" && test ! -d "$path"; then
17394       as_fn_error $? "The path of DXSDK_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
17395     fi
17396 
17397     has_space=`$ECHO "$path" | $GREP " "`
17398     if test "x$has_space" != x; then
17399       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DXSDK_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
17400 $as_echo "$as_me: The path of DXSDK_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
17401       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
17402     fi
17403   fi
17404 
17405 
17406 
17407 
17408   LDFLAGS_JDK="$LDFLAGS_JDK -libpath:$DXSDK_LIB_PATH"
17409 
17410 fi
17411 
17412 
17413 
17414 # If --build AND --host is set, then the configure script will find any
17415 # cross compilation tools in the PATH. Cross compilation tools
17416 # follows the cross compilation standard where they are prefixed with ${host}.
17417 # For example the binary i686-sun-solaris2.10-gcc
17418 # will cross compile for i686-sun-solaris2.10
17419 # If neither of build and host is not set, then build=host and the
17420 # default compiler found in the path will be used.
17421 # Setting only --host, does not seem to be really supported.
17422 # Please set both --build and --host if you want to cross compile.
17423 
17424 if test "x$COMPILE_TYPE" = "xcross"; then
17425     # Now we to find a C/C++ compiler that can build executables for the build
17426     # platform. We can't use the AC_PROG_CC macro, since it can only be used
17427     # once. Also, we need to do this before adding a tools dir to the path,
17428     # otherwise we might pick up cross-compilers which don't use standard naming.
17429     # Otherwise, we'll set the BUILD_tools to the native tools, but that'll have
17430     # to wait until they are properly discovered.
17431     for ac_prog in cl cc gcc
17432 do
17433   # Extract the first word of "$ac_prog", so it can be a program name with args.
17434 set dummy $ac_prog; ac_word=$2
17435 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17436 $as_echo_n "checking for $ac_word... " >&6; }
17437 if ${ac_cv_path_BUILD_CC+:} false; then :
17438   $as_echo_n "(cached) " >&6
17439 else
17440   case $BUILD_CC in
17441   [\\/]* | ?:[\\/]*)
17442   ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
17443   ;;
17444   *)
17445   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17446 for as_dir in $PATH
17447 do
17448   IFS=$as_save_IFS
17449   test -z "$as_dir" && as_dir=.
17450     for ac_exec_ext in '' $ac_executable_extensions; do
17451   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
17452     ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
17453     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17454     break 2
17455   fi
17456 done
17457   done
17458 IFS=$as_save_IFS
17459 
17460   ;;
17461 esac
17462 fi
17463 BUILD_CC=$ac_cv_path_BUILD_CC
17464 if test -n "$BUILD_CC"; then
17465   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
17466 $as_echo "$BUILD_CC" >&6; }
17467 else
17468   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17469 $as_echo "no" >&6; }
17470 fi
17471 
17472 
17473   test -n "$BUILD_CC" && break
17474 done
17475 
17476 
17477   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17478 
17479   # First separate the path from the arguments. This will split at the first
17480   # space.
17481   complete="$BUILD_CC"
17482   path="${complete%% *}"
17483   tmp="$complete EOL"
17484   arguments="${tmp#* }"
17485 
17486   # Input might be given as Windows format, start by converting to
17487   # unix format.
17488   new_path=`$CYGPATH -u "$path"`
17489 
17490   # Now try to locate executable using which
17491   new_path=`$WHICH "$new_path" 2> /dev/null`
17492   # bat and cmd files are not always considered executable in cygwin causing which
17493   # to not find them
17494   if test "x$new_path" = x \
17495            && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17496            && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17497     new_path=`$CYGPATH -u "$path"`
17498   fi
17499   if test "x$new_path" = x; then
17500     # Oops. Which didn't find the executable.
17501     # The splitting of arguments from the executable at a space might have been incorrect,
17502     # since paths with space are more likely in Windows. Give it another try with the whole
17503     # argument.
17504     path="$complete"
17505     arguments="EOL"
17506     new_path=`$CYGPATH -u "$path"`
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       # It's still not found. Now this is an unrecoverable error.
17517       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
17518 $as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
17519       has_space=`$ECHO "$complete" | $GREP " "`
17520       if test "x$has_space" != x; then
17521         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17522 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17523       fi
17524       as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
17525     fi
17526   fi
17527 
17528   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17529   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17530   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17531   # "foo.exe" is OK but "foo" is an error.
17532   #
17533   # This test is therefore slightly more accurate than "test -f" to check for file precense.
17534   # It is also a way to make sure we got the proper file name for the real test later on.
17535   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17536   if test "x$test_shortpath" = x; then
17537     # Short path failed, file does not exist as specified.
17538     # Try adding .exe or .cmd
17539     if test -f "${new_path}.exe"; then
17540        input_to_shortpath="${new_path}.exe"
17541     elif test -f "${new_path}.cmd"; then
17542        input_to_shortpath="${new_path}.cmd"
17543     else
17544       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&5
17545 $as_echo "$as_me: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&6;}
17546       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
17547 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
17548       as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
17549     fi
17550   else
17551     input_to_shortpath="$new_path"
17552   fi
17553 
17554   # Call helper function which possibly converts this using DOS-style short mode.
17555   # If so, the updated path is stored in $new_path.
17556   new_path="$input_to_shortpath"
17557 
17558   input_path="$input_to_shortpath"
17559   # Check if we need to convert this using DOS-style short mode. If the path
17560   # contains just simple characters, use it. Otherwise (spaces, weird characters),
17561   # take no chances and rewrite it.
17562   # Note: m4 eats our [], so we need to use [ and ] instead.
17563   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17564   if test "x$has_forbidden_chars" != x; then
17565     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17566     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17567     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17568     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17569       # Going to short mode and back again did indeed matter. Since short mode is
17570       # case insensitive, let's make it lowercase to improve readability.
17571       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17572       # Now convert it back to Unix-stile (cygpath)
17573       input_path=`$CYGPATH -u "$shortmode_path"`
17574       new_path="$input_path"
17575     fi
17576   fi
17577 
17578   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17579   if test "x$test_cygdrive_prefix" = x; then
17580     # As a simple fix, exclude /usr/bin since it's not a real path.
17581     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
17582       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17583       # a path prefixed by /cygdrive for fixpath to work.
17584       new_path="$CYGWIN_ROOT_PATH$input_path"
17585     fi
17586   fi
17587 
17588   # remove trailing .exe if any
17589   new_path="${new_path/%.exe/}"
17590 
17591   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17592 
17593   # First separate the path from the arguments. This will split at the first
17594   # space.
17595   complete="$BUILD_CC"
17596   path="${complete%% *}"
17597   tmp="$complete EOL"
17598   arguments="${tmp#* }"
17599 
17600   # Input might be given as Windows format, start by converting to
17601   # unix format.
17602   new_path="$path"
17603 
17604   windows_path="$new_path"
17605   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17606     unix_path=`$CYGPATH -u "$windows_path"`
17607     new_path="$unix_path"
17608   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17609     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17610     new_path="$unix_path"
17611   fi
17612 
17613 
17614   # Now try to locate executable using which
17615   new_path=`$WHICH "$new_path" 2> /dev/null`
17616 
17617   if test "x$new_path" = x; then
17618     # Oops. Which didn't find the executable.
17619     # The splitting of arguments from the executable at a space might have been incorrect,
17620     # since paths with space are more likely in Windows. Give it another try with the whole
17621     # argument.
17622     path="$complete"
17623     arguments="EOL"
17624     new_path="$path"
17625 
17626   windows_path="$new_path"
17627   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17628     unix_path=`$CYGPATH -u "$windows_path"`
17629     new_path="$unix_path"
17630   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17631     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17632     new_path="$unix_path"
17633   fi
17634 
17635 
17636     new_path=`$WHICH "$new_path" 2> /dev/null`
17637 
17638     if test "x$new_path" = x; then
17639       # It's still not found. Now this is an unrecoverable error.
17640       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
17641 $as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
17642       has_space=`$ECHO "$complete" | $GREP " "`
17643       if test "x$has_space" != x; then
17644         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17645 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17646       fi
17647       as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
17648     fi
17649   fi
17650 
17651   # Now new_path has a complete unix path to the binary
17652   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
17653     # Keep paths in /bin as-is, but remove trailing .exe if any
17654     new_path="${new_path/%.exe/}"
17655     # Do not save /bin paths to all_fixpath_prefixes!
17656   else
17657     # Not in mixed or Windows style, start by that.
17658     new_path=`cmd //c echo $new_path`
17659 
17660   input_path="$new_path"
17661   # Check if we need to convert this using DOS-style short mode. If the path
17662   # contains just simple characters, use it. Otherwise (spaces, weird characters),
17663   # take no chances and rewrite it.
17664   # Note: m4 eats our [], so we need to use [ and ] instead.
17665   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17666   if test "x$has_forbidden_chars" != x; then
17667     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17668     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17669   fi
17670 
17671     # Output is in $new_path
17672 
17673   windows_path="$new_path"
17674   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17675     unix_path=`$CYGPATH -u "$windows_path"`
17676     new_path="$unix_path"
17677   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17678     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17679     new_path="$unix_path"
17680   fi
17681 
17682     # remove trailing .exe if any
17683     new_path="${new_path/%.exe/}"
17684 
17685     # Save the first 10 bytes of this path to the storage, so fixpath can work.
17686     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17687   fi
17688 
17689   else
17690     # We're on a posix platform. Hooray! :)
17691     # First separate the path from the arguments. This will split at the first
17692     # space.
17693     complete="$BUILD_CC"
17694     path="${complete%% *}"
17695     tmp="$complete EOL"
17696     arguments="${tmp#* }"
17697 
17698     # Cannot rely on the command "which" here since it doesn't always work.
17699     is_absolute_path=`$ECHO "$path" | $GREP ^/`
17700     if test -z "$is_absolute_path"; then
17701       # Path to executable is not absolute. Find it.
17702       IFS_save="$IFS"
17703       IFS=:
17704       for p in $PATH; do
17705         if test -f "$p/$path" && test -x "$p/$path"; then
17706           new_path="$p/$path"
17707           break
17708         fi
17709       done
17710       IFS="$IFS_save"
17711     else
17712       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving BUILD_CC (as $path) failed, using $path directly." >&5
17713 $as_echo "$as_me: Resolving BUILD_CC (as $path) failed, using $path directly." >&6;}
17714       new_path="$path"
17715     fi
17716 
17717     if test "x$new_path" = x; then
17718         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
17719 $as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
17720         has_space=`$ECHO "$complete" | $GREP " "`
17721         if test "x$has_space" != x; then
17722           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
17723 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
17724         fi
17725         as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
17726       fi
17727   fi
17728 
17729       # Now join together the path and the arguments once again
17730       if test "x$arguments" != xEOL; then
17731         new_complete="$new_path ${arguments% *}"
17732       else
17733         new_complete="$new_path"
17734       fi
17735 
17736   if test "x$complete" != "x$new_complete"; then
17737       BUILD_CC="$new_complete"
17738       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CC to \"$new_complete\"" >&5
17739 $as_echo "$as_me: Rewriting BUILD_CC to \"$new_complete\"" >&6;}
17740     fi
17741 
17742     for ac_prog in cl CC g++
17743 do
17744   # Extract the first word of "$ac_prog", so it can be a program name with args.
17745 set dummy $ac_prog; ac_word=$2
17746 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17747 $as_echo_n "checking for $ac_word... " >&6; }
17748 if ${ac_cv_path_BUILD_CXX+:} false; then :
17749   $as_echo_n "(cached) " >&6
17750 else
17751   case $BUILD_CXX in
17752   [\\/]* | ?:[\\/]*)
17753   ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
17754   ;;
17755   *)
17756   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17757 for as_dir in $PATH
17758 do
17759   IFS=$as_save_IFS
17760   test -z "$as_dir" && as_dir=.
17761     for ac_exec_ext in '' $ac_executable_extensions; do
17762   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
17763     ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
17764     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17765     break 2
17766   fi
17767 done
17768   done
17769 IFS=$as_save_IFS
17770 
17771   ;;
17772 esac
17773 fi
17774 BUILD_CXX=$ac_cv_path_BUILD_CXX
17775 if test -n "$BUILD_CXX"; then
17776   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
17777 $as_echo "$BUILD_CXX" >&6; }
17778 else
17779   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17780 $as_echo "no" >&6; }
17781 fi
17782 
17783 
17784   test -n "$BUILD_CXX" && break
17785 done
17786 
17787 
17788   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17789 
17790   # First separate the path from the arguments. This will split at the first
17791   # space.
17792   complete="$BUILD_CXX"
17793   path="${complete%% *}"
17794   tmp="$complete EOL"
17795   arguments="${tmp#* }"
17796 
17797   # Input might be given as Windows format, start by converting to
17798   # unix format.
17799   new_path=`$CYGPATH -u "$path"`
17800 
17801   # Now try to locate executable using which
17802   new_path=`$WHICH "$new_path" 2> /dev/null`
17803   # bat and cmd files are not always considered executable in cygwin causing which
17804   # to not find them
17805   if test "x$new_path" = x \
17806            && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17807            && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17808     new_path=`$CYGPATH -u "$path"`
17809   fi
17810   if test "x$new_path" = x; then
17811     # Oops. Which didn't find the executable.
17812     # The splitting of arguments from the executable at a space might have been incorrect,
17813     # since paths with space are more likely in Windows. Give it another try with the whole
17814     # argument.
17815     path="$complete"
17816     arguments="EOL"
17817     new_path=`$CYGPATH -u "$path"`
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       # It's still not found. Now this is an unrecoverable error.
17828       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
17829 $as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
17830       has_space=`$ECHO "$complete" | $GREP " "`
17831       if test "x$has_space" != x; then
17832         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17833 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17834       fi
17835       as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
17836     fi
17837   fi
17838 
17839   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17840   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17841   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17842   # "foo.exe" is OK but "foo" is an error.
17843   #
17844   # This test is therefore slightly more accurate than "test -f" to check for file precense.
17845   # It is also a way to make sure we got the proper file name for the real test later on.
17846   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17847   if test "x$test_shortpath" = x; then
17848     # Short path failed, file does not exist as specified.
17849     # Try adding .exe or .cmd
17850     if test -f "${new_path}.exe"; then
17851        input_to_shortpath="${new_path}.exe"
17852     elif test -f "${new_path}.cmd"; then
17853        input_to_shortpath="${new_path}.cmd"
17854     else
17855       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&5
17856 $as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&6;}
17857       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
17858 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
17859       as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
17860     fi
17861   else
17862     input_to_shortpath="$new_path"
17863   fi
17864 
17865   # Call helper function which possibly converts this using DOS-style short mode.
17866   # If so, the updated path is stored in $new_path.
17867   new_path="$input_to_shortpath"
17868 
17869   input_path="$input_to_shortpath"
17870   # Check if we need to convert this using DOS-style short mode. If the path
17871   # contains just simple characters, use it. Otherwise (spaces, weird characters),
17872   # take no chances and rewrite it.
17873   # Note: m4 eats our [], so we need to use [ and ] instead.
17874   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17875   if test "x$has_forbidden_chars" != x; then
17876     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17877     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17878     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17879     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17880       # Going to short mode and back again did indeed matter. Since short mode is
17881       # case insensitive, let's make it lowercase to improve readability.
17882       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17883       # Now convert it back to Unix-stile (cygpath)
17884       input_path=`$CYGPATH -u "$shortmode_path"`
17885       new_path="$input_path"
17886     fi
17887   fi
17888 
17889   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17890   if test "x$test_cygdrive_prefix" = x; then
17891     # As a simple fix, exclude /usr/bin since it's not a real path.
17892     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
17893       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17894       # a path prefixed by /cygdrive for fixpath to work.
17895       new_path="$CYGWIN_ROOT_PATH$input_path"
17896     fi
17897   fi
17898 
17899   # remove trailing .exe if any
17900   new_path="${new_path/%.exe/}"
17901 
17902   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17903 
17904   # First separate the path from the arguments. This will split at the first
17905   # space.
17906   complete="$BUILD_CXX"
17907   path="${complete%% *}"
17908   tmp="$complete EOL"
17909   arguments="${tmp#* }"
17910 
17911   # Input might be given as Windows format, start by converting to
17912   # unix format.
17913   new_path="$path"
17914 
17915   windows_path="$new_path"
17916   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17917     unix_path=`$CYGPATH -u "$windows_path"`
17918     new_path="$unix_path"
17919   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17920     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17921     new_path="$unix_path"
17922   fi
17923 
17924 
17925   # Now try to locate executable using which
17926   new_path=`$WHICH "$new_path" 2> /dev/null`
17927 
17928   if test "x$new_path" = x; then
17929     # Oops. Which didn't find the executable.
17930     # The splitting of arguments from the executable at a space might have been incorrect,
17931     # since paths with space are more likely in Windows. Give it another try with the whole
17932     # argument.
17933     path="$complete"
17934     arguments="EOL"
17935     new_path="$path"
17936 
17937   windows_path="$new_path"
17938   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17939     unix_path=`$CYGPATH -u "$windows_path"`
17940     new_path="$unix_path"
17941   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17942     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17943     new_path="$unix_path"
17944   fi
17945 
17946 
17947     new_path=`$WHICH "$new_path" 2> /dev/null`
17948 
17949     if test "x$new_path" = x; then
17950       # It's still not found. Now this is an unrecoverable error.
17951       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
17952 $as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
17953       has_space=`$ECHO "$complete" | $GREP " "`
17954       if test "x$has_space" != x; then
17955         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17956 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17957       fi
17958       as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
17959     fi
17960   fi
17961 
17962   # Now new_path has a complete unix path to the binary
17963   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
17964     # Keep paths in /bin as-is, but remove trailing .exe if any
17965     new_path="${new_path/%.exe/}"
17966     # Do not save /bin paths to all_fixpath_prefixes!
17967   else
17968     # Not in mixed or Windows style, start by that.
17969     new_path=`cmd //c echo $new_path`
17970 
17971   input_path="$new_path"
17972   # Check if we need to convert this using DOS-style short mode. If the path
17973   # contains just simple characters, use it. Otherwise (spaces, weird characters),
17974   # take no chances and rewrite it.
17975   # Note: m4 eats our [], so we need to use [ and ] instead.
17976   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17977   if test "x$has_forbidden_chars" != x; then
17978     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17979     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17980   fi
17981 
17982     # Output is in $new_path
17983 
17984   windows_path="$new_path"
17985   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17986     unix_path=`$CYGPATH -u "$windows_path"`
17987     new_path="$unix_path"
17988   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17989     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17990     new_path="$unix_path"
17991   fi
17992 
17993     # remove trailing .exe if any
17994     new_path="${new_path/%.exe/}"
17995 
17996     # Save the first 10 bytes of this path to the storage, so fixpath can work.
17997     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17998   fi
17999 
18000   else
18001     # We're on a posix platform. Hooray! :)
18002     # First separate the path from the arguments. This will split at the first
18003     # space.
18004     complete="$BUILD_CXX"
18005     path="${complete%% *}"
18006     tmp="$complete EOL"
18007     arguments="${tmp#* }"
18008 
18009     # Cannot rely on the command "which" here since it doesn't always work.
18010     is_absolute_path=`$ECHO "$path" | $GREP ^/`
18011     if test -z "$is_absolute_path"; then
18012       # Path to executable is not absolute. Find it.
18013       IFS_save="$IFS"
18014       IFS=:
18015       for p in $PATH; do
18016         if test -f "$p/$path" && test -x "$p/$path"; then
18017           new_path="$p/$path"
18018           break
18019         fi
18020       done
18021       IFS="$IFS_save"
18022     else
18023       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving BUILD_CXX (as $path) failed, using $path directly." >&5
18024 $as_echo "$as_me: Resolving BUILD_CXX (as $path) failed, using $path directly." >&6;}
18025       new_path="$path"
18026     fi
18027 
18028     if test "x$new_path" = x; then
18029         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
18030 $as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
18031         has_space=`$ECHO "$complete" | $GREP " "`
18032         if test "x$has_space" != x; then
18033           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18034 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18035         fi
18036         as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
18037       fi
18038   fi
18039 
18040       # Now join together the path and the arguments once again
18041       if test "x$arguments" != xEOL; then
18042         new_complete="$new_path ${arguments% *}"
18043       else
18044         new_complete="$new_path"
18045       fi
18046 
18047   if test "x$complete" != "x$new_complete"; then
18048       BUILD_CXX="$new_complete"
18049       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CXX to \"$new_complete\"" >&5
18050 $as_echo "$as_me: Rewriting BUILD_CXX to \"$new_complete\"" >&6;}
18051     fi
18052 
18053     # Extract the first word of "ld", so it can be a program name with args.
18054 set dummy ld; ac_word=$2
18055 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18056 $as_echo_n "checking for $ac_word... " >&6; }
18057 if ${ac_cv_path_BUILD_LD+:} false; then :
18058   $as_echo_n "(cached) " >&6
18059 else
18060   case $BUILD_LD in
18061   [\\/]* | ?:[\\/]*)
18062   ac_cv_path_BUILD_LD="$BUILD_LD" # Let the user override the test with a path.
18063   ;;
18064   *)
18065   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18066 for as_dir in $PATH
18067 do
18068   IFS=$as_save_IFS
18069   test -z "$as_dir" && as_dir=.
18070     for ac_exec_ext in '' $ac_executable_extensions; do
18071   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
18072     ac_cv_path_BUILD_LD="$as_dir/$ac_word$ac_exec_ext"
18073     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18074     break 2
18075   fi
18076 done
18077   done
18078 IFS=$as_save_IFS
18079 
18080   ;;
18081 esac
18082 fi
18083 BUILD_LD=$ac_cv_path_BUILD_LD
18084 if test -n "$BUILD_LD"; then
18085   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_LD" >&5
18086 $as_echo "$BUILD_LD" >&6; }
18087 else
18088   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18089 $as_echo "no" >&6; }
18090 fi
18091 
18092 
18093 
18094   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18095 
18096   # First separate the path from the arguments. This will split at the first
18097   # space.
18098   complete="$BUILD_LD"
18099   path="${complete%% *}"
18100   tmp="$complete EOL"
18101   arguments="${tmp#* }"
18102 
18103   # Input might be given as Windows format, start by converting to
18104   # unix format.
18105   new_path=`$CYGPATH -u "$path"`
18106 
18107   # Now try to locate executable using which
18108   new_path=`$WHICH "$new_path" 2> /dev/null`
18109   # bat and cmd files are not always considered executable in cygwin causing which
18110   # to not find them
18111   if test "x$new_path" = x \
18112            && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18113            && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18114     new_path=`$CYGPATH -u "$path"`
18115   fi
18116   if test "x$new_path" = x; then
18117     # Oops. Which didn't find the executable.
18118     # The splitting of arguments from the executable at a space might have been incorrect,
18119     # since paths with space are more likely in Windows. Give it another try with the whole
18120     # argument.
18121     path="$complete"
18122     arguments="EOL"
18123     new_path=`$CYGPATH -u "$path"`
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       # It's still not found. Now this is an unrecoverable error.
18134       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
18135 $as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
18136       has_space=`$ECHO "$complete" | $GREP " "`
18137       if test "x$has_space" != x; then
18138         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18139 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18140       fi
18141       as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
18142     fi
18143   fi
18144 
18145   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18146   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18147   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18148   # "foo.exe" is OK but "foo" is an error.
18149   #
18150   # This test is therefore slightly more accurate than "test -f" to check for file precense.
18151   # It is also a way to make sure we got the proper file name for the real test later on.
18152   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18153   if test "x$test_shortpath" = x; then
18154     # Short path failed, file does not exist as specified.
18155     # Try adding .exe or .cmd
18156     if test -f "${new_path}.exe"; then
18157        input_to_shortpath="${new_path}.exe"
18158     elif test -f "${new_path}.cmd"; then
18159        input_to_shortpath="${new_path}.cmd"
18160     else
18161       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$new_path\", is invalid." >&5
18162 $as_echo "$as_me: The path of BUILD_LD, which resolves as \"$new_path\", is invalid." >&6;}
18163       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18164 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18165       as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
18166     fi
18167   else
18168     input_to_shortpath="$new_path"
18169   fi
18170 
18171   # Call helper function which possibly converts this using DOS-style short mode.
18172   # If so, the updated path is stored in $new_path.
18173   new_path="$input_to_shortpath"
18174 
18175   input_path="$input_to_shortpath"
18176   # Check if we need to convert this using DOS-style short mode. If the path
18177   # contains just simple characters, use it. Otherwise (spaces, weird characters),
18178   # take no chances and rewrite it.
18179   # Note: m4 eats our [], so we need to use [ and ] instead.
18180   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18181   if test "x$has_forbidden_chars" != x; then
18182     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18183     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18184     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18185     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18186       # Going to short mode and back again did indeed matter. Since short mode is
18187       # case insensitive, let's make it lowercase to improve readability.
18188       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18189       # Now convert it back to Unix-stile (cygpath)
18190       input_path=`$CYGPATH -u "$shortmode_path"`
18191       new_path="$input_path"
18192     fi
18193   fi
18194 
18195   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18196   if test "x$test_cygdrive_prefix" = x; then
18197     # As a simple fix, exclude /usr/bin since it's not a real path.
18198     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18199       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18200       # a path prefixed by /cygdrive for fixpath to work.
18201       new_path="$CYGWIN_ROOT_PATH$input_path"
18202     fi
18203   fi
18204 
18205   # remove trailing .exe if any
18206   new_path="${new_path/%.exe/}"
18207 
18208   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18209 
18210   # First separate the path from the arguments. This will split at the first
18211   # space.
18212   complete="$BUILD_LD"
18213   path="${complete%% *}"
18214   tmp="$complete EOL"
18215   arguments="${tmp#* }"
18216 
18217   # Input might be given as Windows format, start by converting to
18218   # unix format.
18219   new_path="$path"
18220 
18221   windows_path="$new_path"
18222   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18223     unix_path=`$CYGPATH -u "$windows_path"`
18224     new_path="$unix_path"
18225   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18226     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18227     new_path="$unix_path"
18228   fi
18229 
18230 
18231   # Now try to locate executable using which
18232   new_path=`$WHICH "$new_path" 2> /dev/null`
18233 
18234   if test "x$new_path" = x; then
18235     # Oops. Which didn't find the executable.
18236     # The splitting of arguments from the executable at a space might have been incorrect,
18237     # since paths with space are more likely in Windows. Give it another try with the whole
18238     # argument.
18239     path="$complete"
18240     arguments="EOL"
18241     new_path="$path"
18242 
18243   windows_path="$new_path"
18244   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18245     unix_path=`$CYGPATH -u "$windows_path"`
18246     new_path="$unix_path"
18247   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18248     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18249     new_path="$unix_path"
18250   fi
18251 
18252 
18253     new_path=`$WHICH "$new_path" 2> /dev/null`
18254 
18255     if test "x$new_path" = x; then
18256       # It's still not found. Now this is an unrecoverable error.
18257       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
18258 $as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
18259       has_space=`$ECHO "$complete" | $GREP " "`
18260       if test "x$has_space" != x; then
18261         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18262 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18263       fi
18264       as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
18265     fi
18266   fi
18267 
18268   # Now new_path has a complete unix path to the binary
18269   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18270     # Keep paths in /bin as-is, but remove trailing .exe if any
18271     new_path="${new_path/%.exe/}"
18272     # Do not save /bin paths to all_fixpath_prefixes!
18273   else
18274     # Not in mixed or Windows style, start by that.
18275     new_path=`cmd //c echo $new_path`
18276 
18277   input_path="$new_path"
18278   # Check if we need to convert this using DOS-style short mode. If the path
18279   # contains just simple characters, use it. Otherwise (spaces, weird characters),
18280   # take no chances and rewrite it.
18281   # Note: m4 eats our [], so we need to use [ and ] instead.
18282   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18283   if test "x$has_forbidden_chars" != x; then
18284     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18285     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18286   fi
18287 
18288     # Output is in $new_path
18289 
18290   windows_path="$new_path"
18291   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18292     unix_path=`$CYGPATH -u "$windows_path"`
18293     new_path="$unix_path"
18294   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18295     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18296     new_path="$unix_path"
18297   fi
18298 
18299     # remove trailing .exe if any
18300     new_path="${new_path/%.exe/}"
18301 
18302     # Save the first 10 bytes of this path to the storage, so fixpath can work.
18303     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18304   fi
18305 
18306   else
18307     # We're on a posix platform. Hooray! :)
18308     # First separate the path from the arguments. This will split at the first
18309     # space.
18310     complete="$BUILD_LD"
18311     path="${complete%% *}"
18312     tmp="$complete EOL"
18313     arguments="${tmp#* }"
18314 
18315     # Cannot rely on the command "which" here since it doesn't always work.
18316     is_absolute_path=`$ECHO "$path" | $GREP ^/`
18317     if test -z "$is_absolute_path"; then
18318       # Path to executable is not absolute. Find it.
18319       IFS_save="$IFS"
18320       IFS=:
18321       for p in $PATH; do
18322         if test -f "$p/$path" && test -x "$p/$path"; then
18323           new_path="$p/$path"
18324           break
18325         fi
18326       done
18327       IFS="$IFS_save"
18328     else
18329       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving BUILD_LD (as $path) failed, using $path directly." >&5
18330 $as_echo "$as_me: Resolving BUILD_LD (as $path) failed, using $path directly." >&6;}
18331       new_path="$path"
18332     fi
18333 
18334     if test "x$new_path" = x; then
18335         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
18336 $as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
18337         has_space=`$ECHO "$complete" | $GREP " "`
18338         if test "x$has_space" != x; then
18339           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18340 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18341         fi
18342         as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
18343       fi
18344   fi
18345 
18346       # Now join together the path and the arguments once again
18347       if test "x$arguments" != xEOL; then
18348         new_complete="$new_path ${arguments% *}"
18349       else
18350         new_complete="$new_path"
18351       fi
18352 
18353   if test "x$complete" != "x$new_complete"; then
18354       BUILD_LD="$new_complete"
18355       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_LD to \"$new_complete\"" >&5
18356 $as_echo "$as_me: Rewriting BUILD_LD to \"$new_complete\"" >&6;}
18357     fi
18358 
18359 fi
18360 
18361 
18362 
18363 
18364 # If a devkit is found on the builddeps server, then prepend its path to the
18365 # PATH variable. If there are cross compilers available in the devkit, these
18366 # will be found by AC_PROG_CC et al.
18367 DEVKIT=
18368 
18369 
18370     if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
18371         # Source the builddeps file again, to make sure it uses the latest variables!
18372         . $builddepsfile
18373         # Look for a target and build machine specific resource!
18374         eval resource=\${builddep_devkit_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
18375         if test "x$resource" = x; then
18376             # Ok, lets instead look for a target specific resource
18377             eval resource=\${builddep_devkit_TARGET_${rewritten_target_var}}
18378         fi
18379         if test "x$resource" = x; then
18380             # Ok, lets instead look for a build specific resource
18381             eval resource=\${builddep_devkit_BUILD_${rewritten_build_var}}
18382         fi
18383         if test "x$resource" = x; then
18384             # Ok, lets instead look for a generic resource
18385             # (The devkit comes from M4 and not the shell, thus no need for eval here.)
18386             resource=${builddep_devkit}
18387         fi
18388         if test "x$resource" != x; then
18389             { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for devkit" >&5
18390 $as_echo "$as_me: Using builddeps $resource for devkit" >&6;}
18391             # If the resource in the builddeps.conf file is an existing directory,
18392             # for example /java/linux/cups
18393             if test -d ${resource}; then
18394                depdir=${resource}
18395             else
18396 
18397 # devkit is for example mymodule
18398 # $resource is for example libs/general/libmymod_1_2_3.zip
18399 # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
18400 # $with_builddeps_dir is for example /localhome/builddeps
18401 # depdir is the name of the variable into which we store the depdir, eg MYMOD
18402 # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
18403 # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
18404     filename=`basename $resource`
18405     filebase=`echo $filename | sed 's/\.[^\.]*$//'`
18406     filebase=${filename%%.*}
18407     extension=${filename#*.}
18408     installdir=$with_builddeps_dir/$filebase
18409     if test ! -f $installdir/$filename.unpacked; then
18410         { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency devkit from $with_builddeps_server/$resource and installing into $installdir" >&5
18411 $as_echo "$as_me: Downloading build dependency devkit from $with_builddeps_server/$resource and installing into $installdir" >&6;}
18412         if test ! -d $installdir; then
18413             mkdir -p $installdir
18414         fi
18415         if test ! -d $installdir; then
18416             as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
18417         fi
18418         tmpfile=`mktemp $installdir/devkit.XXXXXXXXX`
18419         touch $tmpfile
18420         if test ! -f $tmpfile; then
18421             as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
18422         fi
18423 
18424     # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
18425     # $tmpfile is the local file name for the downloaded file.
18426     VALID_TOOL=no
18427     if test "x$BDEPS_FTP" = xwget; then
18428        VALID_TOOL=yes
18429        wget -O $tmpfile $with_builddeps_server/$resource
18430     fi
18431     if test "x$BDEPS_FTP" = xlftp; then
18432        VALID_TOOL=yes
18433        lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
18434     fi
18435     if test "x$BDEPS_FTP" = xftp; then
18436         VALID_TOOL=yes
18437         FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
18438         FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
18439         FTPUSERPWD=${FTPSERVER%%@*}
18440         if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
18441             FTPUSER=${userpwd%%:*}
18442             FTPPWD=${userpwd#*@}
18443             FTPSERVER=${FTPSERVER#*@}
18444         else
18445             FTPUSER=ftp
18446             FTPPWD=ftp
18447         fi
18448         # the "pass" command does not work on some
18449         # ftp clients (read ftp.exe) but if it works,
18450         # passive mode is better!
18451         (\
18452             echo "user $FTPUSER $FTPPWD"        ;\
18453             echo "pass"                         ;\
18454             echo "bin"                          ;\
18455             echo "get $FTPPATH $tmpfile"              ;\
18456         ) | ftp -in $FTPSERVER
18457     fi
18458     if test "x$VALID_TOOL" != xyes; then
18459        as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
18460     fi
18461 
18462         mv $tmpfile $installdir/$filename
18463         if test ! -s $installdir/$filename; then
18464             as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
18465         fi
18466         case "$extension" in
18467             zip)  echo "Unzipping $installdir/$filename..."
18468                (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
18469             ;;
18470             tar.gz) echo "Untaring $installdir/$filename..."
18471                (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
18472             ;;
18473             tgz) echo "Untaring $installdir/$filename..."
18474                (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
18475             ;;
18476             *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
18477             ;;
18478         esac
18479     fi
18480     if test -f $installdir/$filename.unpacked; then
18481         depdir=$installdir
18482     fi
18483 
18484             fi
18485             # Source the builddeps file again, because in the previous command, the depdir
18486             # was updated to point at the current build dependency install directory.
18487             . $builddepsfile
18488             # Now extract variables from the builddeps.conf files.
18489             theroot=${builddep_devkit_ROOT}
18490             thecflags=${builddep_devkit_CFLAGS}
18491             thelibs=${builddep_devkit_LIBS}
18492             if test "x$depdir" = x; then
18493                 as_fn_error $? "Could not download build dependency devkit" "$LINENO" 5
18494             fi
18495             DEVKIT=$depdir
18496             if test "x$theroot" != x; then
18497                DEVKIT="$theroot"
18498             fi
18499             if test "x$thecflags" != x; then
18500                DEVKIT_CFLAGS="$thecflags"
18501             fi
18502             if test "x$thelibs" != x; then
18503                DEVKIT_LIBS="$thelibs"
18504             fi
18505             # Found devkit
18506                      PATH="$DEVKIT/bin:$PATH"
18507                      SYS_ROOT="$DEVKIT/${rewritten_target}/sys-root"
18508                      if test "x$x_includes" = "xNONE"; then
18509                          x_includes="$SYS_ROOT/usr/include/X11"
18510                      fi
18511                      if test "x$x_libraries" = "xNONE"; then
18512                          x_libraries="$SYS_ROOT/usr/lib"
18513                      fi
18514 
18515 
18516         fi
18517 
18518     fi
18519 
18520 
18521 if test "x$SYS_ROOT" != "x/" ; then
18522     CFLAGS="--sysroot=$SYS_ROOT $CFLAGS"
18523     CXXFLAGS="--sysroot=$SYS_ROOT $CXXFLAGS"
18524     OBJCFLAGS="--sysroot=$SYS_ROOT $OBJCFLAGS"
18525     OBJCXXFLAGS="--sysroot=$SYS_ROOT $OBJCFLAGS"
18526     CPPFLAGS="--sysroot=$SYS_ROOT $CPPFLAGS"
18527     LDFLAGS="--sysroot=$SYS_ROOT $LDFLAGS"
18528 fi
18529 
18530 # Store the CFLAGS etal passed to the configure script.
18531 ORG_CFLAGS="$CFLAGS"
18532 ORG_CXXFLAGS="$CXXFLAGS"
18533 ORG_OBJCFLAGS="$OBJCFLAGS"
18534 
18535 # autoconf magic only relies on PATH, so update it if tools dir is specified
18536 OLD_PATH="$PATH"
18537 if test "x$TOOLS_DIR" != x; then
18538   PATH=$TOOLS_DIR:$PATH
18539 fi
18540 
18541 
18542 ### Locate C compiler (CC)
18543 
18544 # gcc is almost always present, but on Windows we
18545 # prefer cl.exe and on Solaris we prefer CC.
18546 # Thus test for them in this order.
18547 if test "x$OPENJDK_TARGET_OS" = xmacosx; then
18548   # Do not probe for cc on MacOSX.
18549   COMPILER_CHECK_LIST="cl gcc"
18550 else
18551   COMPILER_CHECK_LIST="cl cc gcc"
18552 fi
18553 
18554 
18555   COMPILER_NAME=C
18556 
18557   CC=
18558   # If TOOLS_DIR is set, check for all compiler names in there first
18559   # before checking the rest of the PATH.
18560   if test -n "$TOOLS_DIR"; then
18561     PATH_save="$PATH"
18562     PATH="$TOOLS_DIR"
18563     for ac_prog in $COMPILER_CHECK_LIST
18564 do
18565   # Extract the first word of "$ac_prog", so it can be a program name with args.
18566 set dummy $ac_prog; ac_word=$2
18567 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18568 $as_echo_n "checking for $ac_word... " >&6; }
18569 if ${ac_cv_path_TOOLS_DIR_CC+:} false; then :
18570   $as_echo_n "(cached) " >&6
18571 else
18572   case $TOOLS_DIR_CC in
18573   [\\/]* | ?:[\\/]*)
18574   ac_cv_path_TOOLS_DIR_CC="$TOOLS_DIR_CC" # Let the user override the test with a path.
18575   ;;
18576   *)
18577   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18578 for as_dir in $PATH
18579 do
18580   IFS=$as_save_IFS
18581   test -z "$as_dir" && as_dir=.
18582     for ac_exec_ext in '' $ac_executable_extensions; do
18583   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
18584     ac_cv_path_TOOLS_DIR_CC="$as_dir/$ac_word$ac_exec_ext"
18585     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18586     break 2
18587   fi
18588 done
18589   done
18590 IFS=$as_save_IFS
18591 
18592   ;;
18593 esac
18594 fi
18595 TOOLS_DIR_CC=$ac_cv_path_TOOLS_DIR_CC
18596 if test -n "$TOOLS_DIR_CC"; then
18597   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLS_DIR_CC" >&5
18598 $as_echo "$TOOLS_DIR_CC" >&6; }
18599 else
18600   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18601 $as_echo "no" >&6; }
18602 fi
18603 
18604 
18605   test -n "$TOOLS_DIR_CC" && break
18606 done
18607 
18608     CC=$TOOLS_DIR_CC
18609     PATH="$PATH_save"
18610   fi
18611 
18612   # AC_PATH_PROGS can't be run multiple times with the same variable,
18613   # so create a new name for this run.
18614   if test "x$CC" = x; then
18615     for ac_prog in $COMPILER_CHECK_LIST
18616 do
18617   # Extract the first word of "$ac_prog", so it can be a program name with args.
18618 set dummy $ac_prog; ac_word=$2
18619 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18620 $as_echo_n "checking for $ac_word... " >&6; }
18621 if ${ac_cv_path_POTENTIAL_CC+:} false; then :
18622   $as_echo_n "(cached) " >&6
18623 else
18624   case $POTENTIAL_CC in
18625   [\\/]* | ?:[\\/]*)
18626   ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
18627   ;;
18628   *)
18629   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18630 for as_dir in $PATH
18631 do
18632   IFS=$as_save_IFS
18633   test -z "$as_dir" && as_dir=.
18634     for ac_exec_ext in '' $ac_executable_extensions; do
18635   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
18636     ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
18637     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18638     break 2
18639   fi
18640 done
18641   done
18642 IFS=$as_save_IFS
18643 
18644   ;;
18645 esac
18646 fi
18647 POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
18648 if test -n "$POTENTIAL_CC"; then
18649   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
18650 $as_echo "$POTENTIAL_CC" >&6; }
18651 else
18652   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18653 $as_echo "no" >&6; }
18654 fi
18655 
18656 
18657   test -n "$POTENTIAL_CC" && break
18658 done
18659 
18660     CC=$POTENTIAL_CC
18661   fi
18662 
18663   if test "x$CC" = x; then
18664 
18665     # Print a helpful message on how to acquire the necessary build dependency.
18666     # devkit is the help tag: freetyp2, cups, pulse, alsa etc
18667     MISSING_DEPENDENCY=devkit
18668     PKGHANDLER_COMMAND=
18669 
18670     case $PKGHANDLER in
18671         apt-get)
18672                 apt_help     $MISSING_DEPENDENCY ;;
18673     yum)
18674                 yum_help     $MISSING_DEPENDENCY ;;
18675         port)
18676                 port_help    $MISSING_DEPENDENCY ;;
18677         pkgutil)
18678                 pkgutil_help $MISSING_DEPENDENCY ;;
18679         pkgadd)
18680                 pkgadd_help  $MISSING_DEPENDENCY ;;
18681     * )
18682       break ;;
18683     esac
18684 
18685     if test "x$PKGHANDLER_COMMAND" != x; then
18686         HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
18687     fi
18688 
18689       as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
18690   fi
18691 
18692   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18693 
18694   # First separate the path from the arguments. This will split at the first
18695   # space.
18696   complete="$CC"
18697   path="${complete%% *}"
18698   tmp="$complete EOL"
18699   arguments="${tmp#* }"
18700 
18701   # Input might be given as Windows format, start by converting to
18702   # unix format.
18703   new_path=`$CYGPATH -u "$path"`
18704 
18705   # Now try to locate executable using which
18706   new_path=`$WHICH "$new_path" 2> /dev/null`
18707   # bat and cmd files are not always considered executable in cygwin causing which
18708   # to not find them
18709   if test "x$new_path" = x \
18710            && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18711            && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18712     new_path=`$CYGPATH -u "$path"`
18713   fi
18714   if test "x$new_path" = x; then
18715     # Oops. Which didn't find the executable.
18716     # The splitting of arguments from the executable at a space might have been incorrect,
18717     # since paths with space are more likely in Windows. Give it another try with the whole
18718     # argument.
18719     path="$complete"
18720     arguments="EOL"
18721     new_path=`$CYGPATH -u "$path"`
18722     new_path=`$WHICH "$new_path" 2> /dev/null`
18723     # bat and cmd files are not always considered executable in cygwin causing which
18724     # to not find them
18725     if test "x$new_path" = x \
18726              && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18727              && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18728       new_path=`$CYGPATH -u "$path"`
18729     fi
18730     if test "x$new_path" = x; then
18731       # It's still not found. Now this is an unrecoverable error.
18732       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
18733 $as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
18734       has_space=`$ECHO "$complete" | $GREP " "`
18735       if test "x$has_space" != x; then
18736         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18737 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18738       fi
18739       as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
18740     fi
18741   fi
18742 
18743   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18744   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18745   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18746   # "foo.exe" is OK but "foo" is an error.
18747   #
18748   # This test is therefore slightly more accurate than "test -f" to check for file precense.
18749   # It is also a way to make sure we got the proper file name for the real test later on.
18750   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18751   if test "x$test_shortpath" = x; then
18752     # Short path failed, file does not exist as specified.
18753     # Try adding .exe or .cmd
18754     if test -f "${new_path}.exe"; then
18755        input_to_shortpath="${new_path}.exe"
18756     elif test -f "${new_path}.cmd"; then
18757        input_to_shortpath="${new_path}.cmd"
18758     else
18759       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$new_path\", is invalid." >&5
18760 $as_echo "$as_me: The path of CC, which resolves as \"$new_path\", is invalid." >&6;}
18761       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18762 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18763       as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
18764     fi
18765   else
18766     input_to_shortpath="$new_path"
18767   fi
18768 
18769   # Call helper function which possibly converts this using DOS-style short mode.
18770   # If so, the updated path is stored in $new_path.
18771   new_path="$input_to_shortpath"
18772 
18773   input_path="$input_to_shortpath"
18774   # Check if we need to convert this using DOS-style short mode. If the path
18775   # contains just simple characters, use it. Otherwise (spaces, weird characters),
18776   # take no chances and rewrite it.
18777   # Note: m4 eats our [], so we need to use [ and ] instead.
18778   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18779   if test "x$has_forbidden_chars" != x; then
18780     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18781     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18782     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18783     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18784       # Going to short mode and back again did indeed matter. Since short mode is
18785       # case insensitive, let's make it lowercase to improve readability.
18786       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18787       # Now convert it back to Unix-stile (cygpath)
18788       input_path=`$CYGPATH -u "$shortmode_path"`
18789       new_path="$input_path"
18790     fi
18791   fi
18792 
18793   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18794   if test "x$test_cygdrive_prefix" = x; then
18795     # As a simple fix, exclude /usr/bin since it's not a real path.
18796     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18797       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18798       # a path prefixed by /cygdrive for fixpath to work.
18799       new_path="$CYGWIN_ROOT_PATH$input_path"
18800     fi
18801   fi
18802 
18803   # remove trailing .exe if any
18804   new_path="${new_path/%.exe/}"
18805 
18806   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18807 
18808   # First separate the path from the arguments. This will split at the first
18809   # space.
18810   complete="$CC"
18811   path="${complete%% *}"
18812   tmp="$complete EOL"
18813   arguments="${tmp#* }"
18814 
18815   # Input might be given as Windows format, start by converting to
18816   # unix format.
18817   new_path="$path"
18818 
18819   windows_path="$new_path"
18820   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18821     unix_path=`$CYGPATH -u "$windows_path"`
18822     new_path="$unix_path"
18823   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18824     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18825     new_path="$unix_path"
18826   fi
18827 
18828 
18829   # Now try to locate executable using which
18830   new_path=`$WHICH "$new_path" 2> /dev/null`
18831 
18832   if test "x$new_path" = x; then
18833     # Oops. Which didn't find the executable.
18834     # The splitting of arguments from the executable at a space might have been incorrect,
18835     # since paths with space are more likely in Windows. Give it another try with the whole
18836     # argument.
18837     path="$complete"
18838     arguments="EOL"
18839     new_path="$path"
18840 
18841   windows_path="$new_path"
18842   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18843     unix_path=`$CYGPATH -u "$windows_path"`
18844     new_path="$unix_path"
18845   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18846     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18847     new_path="$unix_path"
18848   fi
18849 
18850 
18851     new_path=`$WHICH "$new_path" 2> /dev/null`
18852 
18853     if test "x$new_path" = x; then
18854       # It's still not found. Now this is an unrecoverable error.
18855       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
18856 $as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
18857       has_space=`$ECHO "$complete" | $GREP " "`
18858       if test "x$has_space" != x; then
18859         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18860 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18861       fi
18862       as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
18863     fi
18864   fi
18865 
18866   # Now new_path has a complete unix path to the binary
18867   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18868     # Keep paths in /bin as-is, but remove trailing .exe if any
18869     new_path="${new_path/%.exe/}"
18870     # Do not save /bin paths to all_fixpath_prefixes!
18871   else
18872     # Not in mixed or Windows style, start by that.
18873     new_path=`cmd //c echo $new_path`
18874 
18875   input_path="$new_path"
18876   # Check if we need to convert this using DOS-style short mode. If the path
18877   # contains just simple characters, use it. Otherwise (spaces, weird characters),
18878   # take no chances and rewrite it.
18879   # Note: m4 eats our [], so we need to use [ and ] instead.
18880   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18881   if test "x$has_forbidden_chars" != x; then
18882     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18883     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18884   fi
18885 
18886     # Output is in $new_path
18887 
18888   windows_path="$new_path"
18889   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18890     unix_path=`$CYGPATH -u "$windows_path"`
18891     new_path="$unix_path"
18892   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18893     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18894     new_path="$unix_path"
18895   fi
18896 
18897     # remove trailing .exe if any
18898     new_path="${new_path/%.exe/}"
18899 
18900     # Save the first 10 bytes of this path to the storage, so fixpath can work.
18901     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18902   fi
18903 
18904   else
18905     # We're on a posix platform. Hooray! :)
18906     # First separate the path from the arguments. This will split at the first
18907     # space.
18908     complete="$CC"
18909     path="${complete%% *}"
18910     tmp="$complete EOL"
18911     arguments="${tmp#* }"
18912 
18913     # Cannot rely on the command "which" here since it doesn't always work.
18914     is_absolute_path=`$ECHO "$path" | $GREP ^/`
18915     if test -z "$is_absolute_path"; then
18916       # Path to executable is not absolute. Find it.
18917       IFS_save="$IFS"
18918       IFS=:
18919       for p in $PATH; do
18920         if test -f "$p/$path" && test -x "$p/$path"; then
18921           new_path="$p/$path"
18922           break
18923         fi
18924       done
18925       IFS="$IFS_save"
18926     else
18927       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CC (as $path) failed, using $path directly." >&5
18928 $as_echo "$as_me: Resolving CC (as $path) failed, using $path directly." >&6;}
18929       new_path="$path"
18930     fi
18931 
18932     if test "x$new_path" = x; then
18933         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
18934 $as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
18935         has_space=`$ECHO "$complete" | $GREP " "`
18936         if test "x$has_space" != x; then
18937           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18938 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18939         fi
18940         as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
18941       fi
18942   fi
18943 
18944       # Now join together the path and the arguments once again
18945       if test "x$arguments" != xEOL; then
18946         new_complete="$new_path ${arguments% *}"
18947       else
18948         new_complete="$new_path"
18949       fi
18950 
18951   if test "x$complete" != "x$new_complete"; then
18952       CC="$new_complete"
18953       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CC to \"$new_complete\"" >&5
18954 $as_echo "$as_me: Rewriting CC to \"$new_complete\"" >&6;}
18955     fi
18956 
18957   { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CC" >&5
18958 $as_echo_n "checking resolved symbolic links for CC... " >&6; }
18959   TEST_COMPILER="$CC"
18960 
18961     if test "x$OPENJDK_BUILD_OS" != xwindows; then
18962         # Follow a chain of symbolic links. Use readlink
18963         # where it exists, else fall back to horribly
18964         # complicated shell code.
18965         if test "x$READLINK_TESTED" != yes; then
18966             # On MacOSX there is a readlink tool with a different
18967             # purpose than the GNU readlink tool. Check the found readlink.
18968             ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
18969             if test "x$ISGNU" = x; then
18970                  # A readlink that we do not know how to use.
18971                  # Are there other non-GNU readlinks out there?
18972                  READLINK_TESTED=yes
18973                  READLINK=
18974             fi
18975         fi
18976 
18977         if test "x$READLINK" != x; then
18978             TEST_COMPILER=`$READLINK -f $TEST_COMPILER`
18979         else
18980             # Save the current directory for restoring afterwards
18981             STARTDIR=$PWD
18982             COUNTER=0
18983             sym_link_dir=`$DIRNAME $TEST_COMPILER`
18984             sym_link_file=`$BASENAME $TEST_COMPILER`
18985             # Use the system pwd and not the shell builtin to resolve directory symlinks
18986             cd $sym_link_dir
18987             cd `$THEPWDCMD`
18988             sym_link_dir=`$THEPWDCMD`
18989             # Resolve file symlinks
18990             while test $COUNTER -lt 20; do
18991                 ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
18992                 if test "x$ISLINK" == x; then
18993                     # This is not a symbolic link! We are done!
18994                     break
18995                 fi
18996                 # Again resolve directory symlinks since the target of the just found
18997                 # link could be in a different directory
18998                 cd `$DIRNAME $ISLINK`
18999                 sym_link_dir=`$THEPWDCMD`
19000                 sym_link_file=`$BASENAME $ISLINK`
19001                 let COUNTER=COUNTER+1
19002             done
19003             cd $STARTDIR
19004             TEST_COMPILER=$sym_link_dir/$sym_link_file
19005         fi
19006     fi
19007 
19008   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_COMPILER" >&5
19009 $as_echo "$TEST_COMPILER" >&6; }
19010   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CC is disguised ccache" >&5
19011 $as_echo_n "checking if CC is disguised ccache... " >&6; }
19012 
19013   COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"`
19014   if test "x$COMPILER_BASENAME" = "xccache"; then
19015     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5
19016 $as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; }
19017     # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache.
19018     # We want to control ccache invocation ourselves, so ignore this cc and try
19019     # searching again.
19020 
19021     # Remove the path to the fake ccache cc from the PATH
19022     RETRY_COMPILER_SAVED_PATH="$PATH"
19023     COMPILER_DIRNAME=`$DIRNAME $CC`
19024     PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`"
19025 
19026     # Try again looking for our compiler
19027     if test -n "$ac_tool_prefix"; then
19028   for ac_prog in $COMPILER_CHECK_LIST
19029   do
19030     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
19031 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
19032 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19033 $as_echo_n "checking for $ac_word... " >&6; }
19034 if ${ac_cv_prog_PROPER_COMPILER_CC+:} false; then :
19035   $as_echo_n "(cached) " >&6
19036 else
19037   if test -n "$PROPER_COMPILER_CC"; then
19038   ac_cv_prog_PROPER_COMPILER_CC="$PROPER_COMPILER_CC" # Let the user override the test.
19039 else
19040 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19041 for as_dir in $PATH
19042 do
19043   IFS=$as_save_IFS
19044   test -z "$as_dir" && as_dir=.
19045     for ac_exec_ext in '' $ac_executable_extensions; do
19046   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
19047     ac_cv_prog_PROPER_COMPILER_CC="$ac_tool_prefix$ac_prog"
19048     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19049     break 2
19050   fi
19051 done
19052   done
19053 IFS=$as_save_IFS
19054 
19055 fi
19056 fi
19057 PROPER_COMPILER_CC=$ac_cv_prog_PROPER_COMPILER_CC
19058 if test -n "$PROPER_COMPILER_CC"; then
19059   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5
19060 $as_echo "$PROPER_COMPILER_CC" >&6; }
19061 else
19062   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19063 $as_echo "no" >&6; }
19064 fi
19065 
19066 
19067     test -n "$PROPER_COMPILER_CC" && break
19068   done
19069 fi
19070 if test -z "$PROPER_COMPILER_CC"; then
19071   ac_ct_PROPER_COMPILER_CC=$PROPER_COMPILER_CC
19072   for ac_prog in $COMPILER_CHECK_LIST
19073 do
19074   # Extract the first word of "$ac_prog", so it can be a program name with args.
19075 set dummy $ac_prog; ac_word=$2
19076 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19077 $as_echo_n "checking for $ac_word... " >&6; }
19078 if ${ac_cv_prog_ac_ct_PROPER_COMPILER_CC+:} false; then :
19079   $as_echo_n "(cached) " >&6
19080 else
19081   if test -n "$ac_ct_PROPER_COMPILER_CC"; then
19082   ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_ct_PROPER_COMPILER_CC" # Let the user override the test.
19083 else
19084 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19085 for as_dir in $PATH
19086 do
19087   IFS=$as_save_IFS
19088   test -z "$as_dir" && as_dir=.
19089     for ac_exec_ext in '' $ac_executable_extensions; do
19090   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
19091     ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_prog"
19092     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19093     break 2
19094   fi
19095 done
19096   done
19097 IFS=$as_save_IFS
19098 
19099 fi
19100 fi
19101 ac_ct_PROPER_COMPILER_CC=$ac_cv_prog_ac_ct_PROPER_COMPILER_CC
19102 if test -n "$ac_ct_PROPER_COMPILER_CC"; then
19103   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CC" >&5
19104 $as_echo "$ac_ct_PROPER_COMPILER_CC" >&6; }
19105 else
19106   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19107 $as_echo "no" >&6; }
19108 fi
19109 
19110 
19111   test -n "$ac_ct_PROPER_COMPILER_CC" && break
19112 done
19113 
19114   if test "x$ac_ct_PROPER_COMPILER_CC" = x; then
19115     PROPER_COMPILER_CC=""
19116   else
19117     case $cross_compiling:$ac_tool_warned in
19118 yes:)
19119 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
19120 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
19121 ac_tool_warned=yes ;;
19122 esac
19123     PROPER_COMPILER_CC=$ac_ct_PROPER_COMPILER_CC
19124   fi
19125 fi
19126 
19127 
19128   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19129 
19130   # First separate the path from the arguments. This will split at the first
19131   # space.
19132   complete="$PROPER_COMPILER_CC"
19133   path="${complete%% *}"
19134   tmp="$complete EOL"
19135   arguments="${tmp#* }"
19136 
19137   # Input might be given as Windows format, start by converting to
19138   # unix format.
19139   new_path=`$CYGPATH -u "$path"`
19140 
19141   # Now try to locate executable using which
19142   new_path=`$WHICH "$new_path" 2> /dev/null`
19143   # bat and cmd files are not always considered executable in cygwin causing which
19144   # to not find them
19145   if test "x$new_path" = x \
19146            && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19147            && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19148     new_path=`$CYGPATH -u "$path"`
19149   fi
19150   if test "x$new_path" = x; then
19151     # Oops. Which didn't find the executable.
19152     # The splitting of arguments from the executable at a space might have been incorrect,
19153     # since paths with space are more likely in Windows. Give it another try with the whole
19154     # argument.
19155     path="$complete"
19156     arguments="EOL"
19157     new_path=`$CYGPATH -u "$path"`
19158     new_path=`$WHICH "$new_path" 2> /dev/null`
19159     # bat and cmd files are not always considered executable in cygwin causing which
19160     # to not find them
19161     if test "x$new_path" = x \
19162              && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19163              && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19164       new_path=`$CYGPATH -u "$path"`
19165     fi
19166     if test "x$new_path" = x; then
19167       # It's still not found. Now this is an unrecoverable error.
19168       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
19169 $as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
19170       has_space=`$ECHO "$complete" | $GREP " "`
19171       if test "x$has_space" != x; then
19172         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19173 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19174       fi
19175       as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
19176     fi
19177   fi
19178 
19179   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19180   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19181   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19182   # "foo.exe" is OK but "foo" is an error.
19183   #
19184   # This test is therefore slightly more accurate than "test -f" to check for file precense.
19185   # It is also a way to make sure we got the proper file name for the real test later on.
19186   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19187   if test "x$test_shortpath" = x; then
19188     # Short path failed, file does not exist as specified.
19189     # Try adding .exe or .cmd
19190     if test -f "${new_path}.exe"; then
19191        input_to_shortpath="${new_path}.exe"
19192     elif test -f "${new_path}.cmd"; then
19193        input_to_shortpath="${new_path}.cmd"
19194     else
19195       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&5
19196 $as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&6;}
19197       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19198 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19199       as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
19200     fi
19201   else
19202     input_to_shortpath="$new_path"
19203   fi
19204 
19205   # Call helper function which possibly converts this using DOS-style short mode.
19206   # If so, the updated path is stored in $new_path.
19207   new_path="$input_to_shortpath"
19208 
19209   input_path="$input_to_shortpath"
19210   # Check if we need to convert this using DOS-style short mode. If the path
19211   # contains just simple characters, use it. Otherwise (spaces, weird characters),
19212   # take no chances and rewrite it.
19213   # Note: m4 eats our [], so we need to use [ and ] instead.
19214   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19215   if test "x$has_forbidden_chars" != x; then
19216     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19217     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19218     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19219     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19220       # Going to short mode and back again did indeed matter. Since short mode is
19221       # case insensitive, let's make it lowercase to improve readability.
19222       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19223       # Now convert it back to Unix-stile (cygpath)
19224       input_path=`$CYGPATH -u "$shortmode_path"`
19225       new_path="$input_path"
19226     fi
19227   fi
19228 
19229   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19230   if test "x$test_cygdrive_prefix" = x; then
19231     # As a simple fix, exclude /usr/bin since it's not a real path.
19232     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19233       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19234       # a path prefixed by /cygdrive for fixpath to work.
19235       new_path="$CYGWIN_ROOT_PATH$input_path"
19236     fi
19237   fi
19238 
19239   # remove trailing .exe if any
19240   new_path="${new_path/%.exe/}"
19241 
19242   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19243 
19244   # First separate the path from the arguments. This will split at the first
19245   # space.
19246   complete="$PROPER_COMPILER_CC"
19247   path="${complete%% *}"
19248   tmp="$complete EOL"
19249   arguments="${tmp#* }"
19250 
19251   # Input might be given as Windows format, start by converting to
19252   # unix format.
19253   new_path="$path"
19254 
19255   windows_path="$new_path"
19256   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19257     unix_path=`$CYGPATH -u "$windows_path"`
19258     new_path="$unix_path"
19259   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19260     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19261     new_path="$unix_path"
19262   fi
19263 
19264 
19265   # Now try to locate executable using which
19266   new_path=`$WHICH "$new_path" 2> /dev/null`
19267 
19268   if test "x$new_path" = x; then
19269     # Oops. Which didn't find the executable.
19270     # The splitting of arguments from the executable at a space might have been incorrect,
19271     # since paths with space are more likely in Windows. Give it another try with the whole
19272     # argument.
19273     path="$complete"
19274     arguments="EOL"
19275     new_path="$path"
19276 
19277   windows_path="$new_path"
19278   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19279     unix_path=`$CYGPATH -u "$windows_path"`
19280     new_path="$unix_path"
19281   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19282     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19283     new_path="$unix_path"
19284   fi
19285 
19286 
19287     new_path=`$WHICH "$new_path" 2> /dev/null`
19288 
19289     if test "x$new_path" = x; then
19290       # It's still not found. Now this is an unrecoverable error.
19291       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
19292 $as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
19293       has_space=`$ECHO "$complete" | $GREP " "`
19294       if test "x$has_space" != x; then
19295         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19296 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19297       fi
19298       as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
19299     fi
19300   fi
19301 
19302   # Now new_path has a complete unix path to the binary
19303   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
19304     # Keep paths in /bin as-is, but remove trailing .exe if any
19305     new_path="${new_path/%.exe/}"
19306     # Do not save /bin paths to all_fixpath_prefixes!
19307   else
19308     # Not in mixed or Windows style, start by that.
19309     new_path=`cmd //c echo $new_path`
19310 
19311   input_path="$new_path"
19312   # Check if we need to convert this using DOS-style short mode. If the path
19313   # contains just simple characters, use it. Otherwise (spaces, weird characters),
19314   # take no chances and rewrite it.
19315   # Note: m4 eats our [], so we need to use [ and ] instead.
19316   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19317   if test "x$has_forbidden_chars" != x; then
19318     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19319     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19320   fi
19321 
19322     # Output is in $new_path
19323 
19324   windows_path="$new_path"
19325   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19326     unix_path=`$CYGPATH -u "$windows_path"`
19327     new_path="$unix_path"
19328   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19329     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19330     new_path="$unix_path"
19331   fi
19332 
19333     # remove trailing .exe if any
19334     new_path="${new_path/%.exe/}"
19335 
19336     # Save the first 10 bytes of this path to the storage, so fixpath can work.
19337     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19338   fi
19339 
19340   else
19341     # We're on a posix platform. Hooray! :)
19342     # First separate the path from the arguments. This will split at the first
19343     # space.
19344     complete="$PROPER_COMPILER_CC"
19345     path="${complete%% *}"
19346     tmp="$complete EOL"
19347     arguments="${tmp#* }"
19348 
19349     # Cannot rely on the command "which" here since it doesn't always work.
19350     is_absolute_path=`$ECHO "$path" | $GREP ^/`
19351     if test -z "$is_absolute_path"; then
19352       # Path to executable is not absolute. Find it.
19353       IFS_save="$IFS"
19354       IFS=:
19355       for p in $PATH; do
19356         if test -f "$p/$path" && test -x "$p/$path"; then
19357           new_path="$p/$path"
19358           break
19359         fi
19360       done
19361       IFS="$IFS_save"
19362     else
19363       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving PROPER_COMPILER_CC (as $path) failed, using $path directly." >&5
19364 $as_echo "$as_me: Resolving PROPER_COMPILER_CC (as $path) failed, using $path directly." >&6;}
19365       new_path="$path"
19366     fi
19367 
19368     if test "x$new_path" = x; then
19369         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
19370 $as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
19371         has_space=`$ECHO "$complete" | $GREP " "`
19372         if test "x$has_space" != x; then
19373           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19374 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19375         fi
19376         as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
19377       fi
19378   fi
19379 
19380       # Now join together the path and the arguments once again
19381       if test "x$arguments" != xEOL; then
19382         new_complete="$new_path ${arguments% *}"
19383       else
19384         new_complete="$new_path"
19385       fi
19386 
19387   if test "x$complete" != "x$new_complete"; then
19388       PROPER_COMPILER_CC="$new_complete"
19389       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&5
19390 $as_echo "$as_me: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&6;}
19391     fi
19392 
19393     PATH="$RETRY_COMPILER_SAVED_PATH"
19394 
19395     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CC" >&5
19396 $as_echo_n "checking for resolved symbolic links for CC... " >&6; }
19397 
19398     if test "x$OPENJDK_BUILD_OS" != xwindows; then
19399         # Follow a chain of symbolic links. Use readlink
19400         # where it exists, else fall back to horribly
19401         # complicated shell code.
19402         if test "x$READLINK_TESTED" != yes; then
19403             # On MacOSX there is a readlink tool with a different
19404             # purpose than the GNU readlink tool. Check the found readlink.
19405             ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
19406             if test "x$ISGNU" = x; then
19407                  # A readlink that we do not know how to use.
19408                  # Are there other non-GNU readlinks out there?
19409                  READLINK_TESTED=yes
19410                  READLINK=
19411             fi
19412         fi
19413 
19414         if test "x$READLINK" != x; then
19415             PROPER_COMPILER_CC=`$READLINK -f $PROPER_COMPILER_CC`
19416         else
19417             # Save the current directory for restoring afterwards
19418             STARTDIR=$PWD
19419             COUNTER=0
19420             sym_link_dir=`$DIRNAME $PROPER_COMPILER_CC`
19421             sym_link_file=`$BASENAME $PROPER_COMPILER_CC`
19422             # Use the system pwd and not the shell builtin to resolve directory symlinks
19423             cd $sym_link_dir
19424             cd `$THEPWDCMD`
19425             sym_link_dir=`$THEPWDCMD`
19426             # Resolve file symlinks
19427             while test $COUNTER -lt 20; do
19428                 ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
19429                 if test "x$ISLINK" == x; then
19430                     # This is not a symbolic link! We are done!
19431                     break
19432                 fi
19433                 # Again resolve directory symlinks since the target of the just found
19434                 # link could be in a different directory
19435                 cd `$DIRNAME $ISLINK`
19436                 sym_link_dir=`$THEPWDCMD`
19437                 sym_link_file=`$BASENAME $ISLINK`
19438                 let COUNTER=COUNTER+1
19439             done
19440             cd $STARTDIR
19441             PROPER_COMPILER_CC=$sym_link_dir/$sym_link_file
19442         fi
19443     fi
19444 
19445     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5
19446 $as_echo "$PROPER_COMPILER_CC" >&6; }
19447     CC="$PROPER_COMPILER_CC"
19448   else
19449     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CC" >&5
19450 $as_echo "no, keeping CC" >&6; }
19451     CC="$TEST_COMPILER"
19452   fi
19453 
19454   COMPILER=$CC
19455   COMPILER_NAME=$COMPILER_NAME
19456 
19457   if test "x$OPENJDK_TARGET_OS" = xsolaris; then
19458     # Make sure we use the Sun Studio compiler and not gcc on Solaris, which won't work
19459     COMPILER_VERSION_TEST=`$COMPILER -V 2>&1 | $HEAD -n 1`
19460     $ECHO $COMPILER_VERSION_TEST | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
19461     if test $? -ne 0; then
19462       GCC_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
19463 
19464       { $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
19465 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required Sun Studio compiler." >&6;}
19466       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&5
19467 $as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&6;}
19468       as_fn_error $? "Sun Studio compiler is required. Try setting --with-tools-dir." "$LINENO" 5
19469     else
19470       COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/p"`
19471       COMPILER_VENDOR="Sun Studio"
19472     fi
19473   elif test  "x$OPENJDK_TARGET_OS" = xwindows; then
19474     # First line typically looks something like:
19475     # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.30319.01 for 80x86
19476     COMPILER_VERSION_TEST=`$COMPILER 2>&1 | $HEAD -n 1`
19477     COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*Version \([1-9][0-9.]*\) .*/\1/p"`
19478     COMPILER_VENDOR="Microsoft CL.EXE"
19479     COMPILER_CPU_TEST=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* for \(.*\)$/\1/p"`
19480     if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
19481       if test "x$COMPILER_CPU_TEST" != "x80x86"; then
19482         as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"80x86\"." "$LINENO" 5
19483       fi
19484     elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
19485       if test "x$COMPILER_CPU_TEST" != "xx64"; then
19486         as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." "$LINENO" 5
19487       fi
19488     fi
19489   else
19490     COMPILER_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
19491     # Check that this is likely to be GCC.
19492     $COMPILER --version 2>&1 | $GREP "Free Software Foundation" > /dev/null
19493     if test $? -ne 0; then
19494       { $as_echo "$as_me:${as_lineno-$LINENO}: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&5
19495 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&6;}
19496       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&5
19497 $as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&6;}
19498       as_fn_error $? "GCC compiler is required. Try setting --with-tools-dir." "$LINENO" 5
19499     fi
19500 
19501     # First line typically looks something like:
19502     # gcc (Ubuntu/Linaro 4.5.2-8ubuntu4) 4.5.2
19503     COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* \([1-9][0-9.]*\)/\1/p"`
19504     COMPILER_VENDOR=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^\(.*\) [1-9][0-9.]*/\1/p"`
19505   fi
19506   # This sets CC_VERSION or CXX_VERSION. (This comment is a grep marker)
19507   CC_VERSION="$COMPILER_VERSION"
19508   # This sets CC_VENDOR or CXX_VENDOR. (This comment is a grep marker)
19509   CC_VENDOR="$COMPILER_VENDOR"
19510 
19511   { $as_echo "$as_me:${as_lineno-$LINENO}: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&5
19512 $as_echo "$as_me: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&6;}
19513 
19514 
19515 # Now that we have resolved CC ourself, let autoconf have it's go at it
19516 ac_ext=c
19517 ac_cpp='$CPP $CPPFLAGS'
19518 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
19519 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
19520 ac_compiler_gnu=$ac_cv_c_compiler_gnu
19521 if test -n "$ac_tool_prefix"; then
19522   for ac_prog in $CC
19523   do
19524     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
19525 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
19526 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19527 $as_echo_n "checking for $ac_word... " >&6; }
19528 if ${ac_cv_prog_CC+:} false; then :
19529   $as_echo_n "(cached) " >&6
19530 else
19531   if test -n "$CC"; then
19532   ac_cv_prog_CC="$CC" # Let the user override the test.
19533 else
19534 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19535 for as_dir in $PATH
19536 do
19537   IFS=$as_save_IFS
19538   test -z "$as_dir" && as_dir=.
19539     for ac_exec_ext in '' $ac_executable_extensions; do
19540   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
19541     ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
19542     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19543     break 2
19544   fi
19545 done
19546   done
19547 IFS=$as_save_IFS
19548 
19549 fi
19550 fi
19551 CC=$ac_cv_prog_CC
19552 if test -n "$CC"; then
19553   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
19554 $as_echo "$CC" >&6; }
19555 else
19556   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19557 $as_echo "no" >&6; }
19558 fi
19559 
19560 
19561     test -n "$CC" && break
19562   done
19563 fi
19564 if test -z "$CC"; then
19565   ac_ct_CC=$CC
19566   for ac_prog in $CC
19567 do
19568   # Extract the first word of "$ac_prog", so it can be a program name with args.
19569 set dummy $ac_prog; ac_word=$2
19570 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19571 $as_echo_n "checking for $ac_word... " >&6; }
19572 if ${ac_cv_prog_ac_ct_CC+:} false; then :
19573   $as_echo_n "(cached) " >&6
19574 else
19575   if test -n "$ac_ct_CC"; then
19576   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
19577 else
19578 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19579 for as_dir in $PATH
19580 do
19581   IFS=$as_save_IFS
19582   test -z "$as_dir" && as_dir=.
19583     for ac_exec_ext in '' $ac_executable_extensions; do
19584   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
19585     ac_cv_prog_ac_ct_CC="$ac_prog"
19586     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19587     break 2
19588   fi
19589 done
19590   done
19591 IFS=$as_save_IFS
19592 
19593 fi
19594 fi
19595 ac_ct_CC=$ac_cv_prog_ac_ct_CC
19596 if test -n "$ac_ct_CC"; then
19597   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
19598 $as_echo "$ac_ct_CC" >&6; }
19599 else
19600   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19601 $as_echo "no" >&6; }
19602 fi
19603 
19604 
19605   test -n "$ac_ct_CC" && break
19606 done
19607 
19608   if test "x$ac_ct_CC" = x; then
19609     CC=""
19610   else
19611     case $cross_compiling:$ac_tool_warned in
19612 yes:)
19613 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
19614 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
19615 ac_tool_warned=yes ;;
19616 esac
19617     CC=$ac_ct_CC
19618   fi
19619 fi
19620 
19621 
19622 test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
19623 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
19624 as_fn_error $? "no acceptable C compiler found in \$PATH
19625 See \`config.log' for more details" "$LINENO" 5; }
19626 
19627 # Provide some information about the compiler.
19628 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
19629 set X $ac_compile
19630 ac_compiler=$2
19631 for ac_option in --version -v -V -qversion; do
19632   { { ac_try="$ac_compiler $ac_option >&5"
19633 case "(($ac_try" in
19634   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19635   *) ac_try_echo=$ac_try;;
19636 esac
19637 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
19638 $as_echo "$ac_try_echo"; } >&5
19639   (eval "$ac_compiler $ac_option >&5") 2>conftest.err
19640   ac_status=$?
19641   if test -s conftest.err; then
19642     sed '10a\
19643 ... rest of stderr output deleted ...
19644          10q' conftest.err >conftest.er1
19645     cat conftest.er1 >&5
19646   fi
19647   rm -f conftest.er1 conftest.err
19648   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
19649   test $ac_status = 0; }
19650 done
19651 
19652 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19653 /* end confdefs.h.  */
19654 
19655 int
19656 main ()
19657 {
19658 
19659   ;
19660   return 0;
19661 }
19662 _ACEOF
19663 ac_clean_files_save=$ac_clean_files
19664 ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
19665 # Try to create an executable without -o first, disregard a.out.
19666 # It will help us diagnose broken compilers, and finding out an intuition
19667 # of exeext.
19668 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
19669 $as_echo_n "checking whether the C compiler works... " >&6; }
19670 ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
19671 
19672 # The possible output files:
19673 ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
19674 
19675 ac_rmfiles=
19676 for ac_file in $ac_files
19677 do
19678   case $ac_file in
19679     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
19680     * ) ac_rmfiles="$ac_rmfiles $ac_file";;
19681   esac
19682 done
19683 rm -f $ac_rmfiles
19684 
19685 if { { ac_try="$ac_link_default"
19686 case "(($ac_try" in
19687   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19688   *) ac_try_echo=$ac_try;;
19689 esac
19690 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
19691 $as_echo "$ac_try_echo"; } >&5
19692   (eval "$ac_link_default") 2>&5
19693   ac_status=$?
19694   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
19695   test $ac_status = 0; }; then :
19696   # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
19697 # So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
19698 # in a Makefile.  We should not override ac_cv_exeext if it was cached,
19699 # so that the user can short-circuit this test for compilers unknown to
19700 # Autoconf.
19701 for ac_file in $ac_files ''
19702 do
19703   test -f "$ac_file" || continue
19704   case $ac_file in
19705     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
19706         ;;
19707     [ab].out )
19708         # We found the default executable, but exeext='' is most
19709         # certainly right.
19710         break;;
19711     *.* )
19712         if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
19713         then :; else
19714            ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
19715         fi
19716         # We set ac_cv_exeext here because the later test for it is not
19717         # safe: cross compilers may not add the suffix if given an `-o'
19718         # argument, so we may need to know it at that point already.
19719         # Even if this section looks crufty: it has the advantage of
19720         # actually working.
19721         break;;
19722     * )
19723         break;;
19724   esac
19725 done
19726 test "$ac_cv_exeext" = no && ac_cv_exeext=
19727 
19728 else
19729   ac_file=''
19730 fi
19731 if test -z "$ac_file"; then :
19732   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19733 $as_echo "no" >&6; }
19734 $as_echo "$as_me: failed program was:" >&5
19735 sed 's/^/| /' conftest.$ac_ext >&5
19736 
19737 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
19738 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
19739 as_fn_error 77 "C compiler cannot create executables
19740 See \`config.log' for more details" "$LINENO" 5; }
19741 else
19742   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
19743 $as_echo "yes" >&6; }
19744 fi
19745 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
19746 $as_echo_n "checking for C compiler default output file name... " >&6; }
19747 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
19748 $as_echo "$ac_file" >&6; }
19749 ac_exeext=$ac_cv_exeext
19750 
19751 rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
19752 ac_clean_files=$ac_clean_files_save
19753 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
19754 $as_echo_n "checking for suffix of executables... " >&6; }
19755 if { { ac_try="$ac_link"
19756 case "(($ac_try" in
19757   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19758   *) ac_try_echo=$ac_try;;
19759 esac
19760 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
19761 $as_echo "$ac_try_echo"; } >&5
19762   (eval "$ac_link") 2>&5
19763   ac_status=$?
19764   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
19765   test $ac_status = 0; }; then :
19766   # If both `conftest.exe' and `conftest' are `present' (well, observable)
19767 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
19768 # work properly (i.e., refer to `conftest.exe'), while it won't with
19769 # `rm'.
19770 for ac_file in conftest.exe conftest conftest.*; do
19771   test -f "$ac_file" || continue
19772   case $ac_file in
19773     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
19774     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
19775           break;;
19776     * ) break;;
19777   esac
19778 done
19779 else
19780   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
19781 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
19782 as_fn_error $? "cannot compute suffix of executables: cannot compile and link
19783 See \`config.log' for more details" "$LINENO" 5; }
19784 fi
19785 rm -f conftest conftest$ac_cv_exeext
19786 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
19787 $as_echo "$ac_cv_exeext" >&6; }
19788 
19789 rm -f conftest.$ac_ext
19790 EXEEXT=$ac_cv_exeext
19791 ac_exeext=$EXEEXT
19792 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19793 /* end confdefs.h.  */
19794 #include <stdio.h>
19795 int
19796 main ()
19797 {
19798 FILE *f = fopen ("conftest.out", "w");
19799  return ferror (f) || fclose (f) != 0;
19800 
19801   ;
19802   return 0;
19803 }
19804 _ACEOF
19805 ac_clean_files="$ac_clean_files conftest.out"
19806 # Check that the compiler produces executables we can run.  If not, either
19807 # the compiler is broken, or we cross compile.
19808 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
19809 $as_echo_n "checking whether we are cross compiling... " >&6; }
19810 if test "$cross_compiling" != yes; then
19811   { { ac_try="$ac_link"
19812 case "(($ac_try" in
19813   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19814   *) ac_try_echo=$ac_try;;
19815 esac
19816 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
19817 $as_echo "$ac_try_echo"; } >&5
19818   (eval "$ac_link") 2>&5
19819   ac_status=$?
19820   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
19821   test $ac_status = 0; }
19822   if { ac_try='./conftest$ac_cv_exeext'
19823   { { case "(($ac_try" in
19824   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19825   *) ac_try_echo=$ac_try;;
19826 esac
19827 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
19828 $as_echo "$ac_try_echo"; } >&5
19829   (eval "$ac_try") 2>&5
19830   ac_status=$?
19831   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
19832   test $ac_status = 0; }; }; then
19833     cross_compiling=no
19834   else
19835     if test "$cross_compiling" = maybe; then
19836         cross_compiling=yes
19837     else
19838         { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
19839 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
19840 as_fn_error $? "cannot run C compiled programs.
19841 If you meant to cross compile, use \`--host'.
19842 See \`config.log' for more details" "$LINENO" 5; }
19843     fi
19844   fi
19845 fi
19846 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
19847 $as_echo "$cross_compiling" >&6; }
19848 
19849 rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
19850 ac_clean_files=$ac_clean_files_save
19851 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
19852 $as_echo_n "checking for suffix of object files... " >&6; }
19853 if ${ac_cv_objext+:} false; then :
19854   $as_echo_n "(cached) " >&6
19855 else
19856   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19857 /* end confdefs.h.  */
19858 
19859 int
19860 main ()
19861 {
19862 
19863   ;
19864   return 0;
19865 }
19866 _ACEOF
19867 rm -f conftest.o conftest.obj
19868 if { { ac_try="$ac_compile"
19869 case "(($ac_try" in
19870   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19871   *) ac_try_echo=$ac_try;;
19872 esac
19873 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
19874 $as_echo "$ac_try_echo"; } >&5
19875   (eval "$ac_compile") 2>&5
19876   ac_status=$?
19877   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
19878   test $ac_status = 0; }; then :
19879   for ac_file in conftest.o conftest.obj conftest.*; do
19880   test -f "$ac_file" || continue;
19881   case $ac_file in
19882     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
19883     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
19884        break;;
19885   esac
19886 done
19887 else
19888   $as_echo "$as_me: failed program was:" >&5
19889 sed 's/^/| /' conftest.$ac_ext >&5
19890 
19891 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
19892 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
19893 as_fn_error $? "cannot compute suffix of object files: cannot compile
19894 See \`config.log' for more details" "$LINENO" 5; }
19895 fi
19896 rm -f conftest.$ac_cv_objext conftest.$ac_ext
19897 fi
19898 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
19899 $as_echo "$ac_cv_objext" >&6; }
19900 OBJEXT=$ac_cv_objext
19901 ac_objext=$OBJEXT
19902 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
19903 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
19904 if ${ac_cv_c_compiler_gnu+:} false; then :
19905   $as_echo_n "(cached) " >&6
19906 else
19907   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19908 /* end confdefs.h.  */
19909 
19910 int
19911 main ()
19912 {
19913 #ifndef __GNUC__
19914        choke me
19915 #endif
19916 
19917   ;
19918   return 0;
19919 }
19920 _ACEOF
19921 if ac_fn_c_try_compile "$LINENO"; then :
19922   ac_compiler_gnu=yes
19923 else
19924   ac_compiler_gnu=no
19925 fi
19926 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19927 ac_cv_c_compiler_gnu=$ac_compiler_gnu
19928 
19929 fi
19930 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
19931 $as_echo "$ac_cv_c_compiler_gnu" >&6; }
19932 if test $ac_compiler_gnu = yes; then
19933   GCC=yes
19934 else
19935   GCC=
19936 fi
19937 ac_test_CFLAGS=${CFLAGS+set}
19938 ac_save_CFLAGS=$CFLAGS
19939 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
19940 $as_echo_n "checking whether $CC accepts -g... " >&6; }
19941 if ${ac_cv_prog_cc_g+:} false; then :
19942   $as_echo_n "(cached) " >&6
19943 else
19944   ac_save_c_werror_flag=$ac_c_werror_flag
19945    ac_c_werror_flag=yes
19946    ac_cv_prog_cc_g=no
19947    CFLAGS="-g"
19948    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19949 /* end confdefs.h.  */
19950 
19951 int
19952 main ()
19953 {
19954 
19955   ;
19956   return 0;
19957 }
19958 _ACEOF
19959 if ac_fn_c_try_compile "$LINENO"; then :
19960   ac_cv_prog_cc_g=yes
19961 else
19962   CFLAGS=""
19963       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19964 /* end confdefs.h.  */
19965 
19966 int
19967 main ()
19968 {
19969 
19970   ;
19971   return 0;
19972 }
19973 _ACEOF
19974 if ac_fn_c_try_compile "$LINENO"; then :
19975 
19976 else
19977   ac_c_werror_flag=$ac_save_c_werror_flag
19978          CFLAGS="-g"
19979          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19980 /* end confdefs.h.  */
19981 
19982 int
19983 main ()
19984 {
19985 
19986   ;
19987   return 0;
19988 }
19989 _ACEOF
19990 if ac_fn_c_try_compile "$LINENO"; then :
19991   ac_cv_prog_cc_g=yes
19992 fi
19993 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19994 fi
19995 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19996 fi
19997 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19998    ac_c_werror_flag=$ac_save_c_werror_flag
19999 fi
20000 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
20001 $as_echo "$ac_cv_prog_cc_g" >&6; }
20002 if test "$ac_test_CFLAGS" = set; then
20003   CFLAGS=$ac_save_CFLAGS
20004 elif test $ac_cv_prog_cc_g = yes; then
20005   if test "$GCC" = yes; then
20006     CFLAGS="-g -O2"
20007   else
20008     CFLAGS="-g"
20009   fi
20010 else
20011   if test "$GCC" = yes; then
20012     CFLAGS="-O2"
20013   else
20014     CFLAGS=
20015   fi
20016 fi
20017 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
20018 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
20019 if ${ac_cv_prog_cc_c89+:} false; then :
20020   $as_echo_n "(cached) " >&6
20021 else
20022   ac_cv_prog_cc_c89=no
20023 ac_save_CC=$CC
20024 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20025 /* end confdefs.h.  */
20026 #include <stdarg.h>
20027 #include <stdio.h>
20028 #include <sys/types.h>
20029 #include <sys/stat.h>
20030 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
20031 struct buf { int x; };
20032 FILE * (*rcsopen) (struct buf *, struct stat *, int);
20033 static char *e (p, i)
20034      char **p;
20035      int i;
20036 {
20037   return p[i];
20038 }
20039 static char *f (char * (*g) (char **, int), char **p, ...)
20040 {
20041   char *s;
20042   va_list v;
20043   va_start (v,p);
20044   s = g (p, va_arg (v,int));
20045   va_end (v);
20046   return s;
20047 }
20048 
20049 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
20050    function prototypes and stuff, but not '\xHH' hex character constants.
20051    These don't provoke an error unfortunately, instead are silently treated
20052    as 'x'.  The following induces an error, until -std is added to get
20053    proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
20054    array size at least.  It's necessary to write '\x00'==0 to get something
20055    that's true only with -std.  */
20056 int osf4_cc_array ['\x00' == 0 ? 1 : -1];
20057 
20058 /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
20059    inside strings and character constants.  */
20060 #define FOO(x) 'x'
20061 int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
20062 
20063 int test (int i, double x);
20064 struct s1 {int (*f) (int a);};
20065 struct s2 {int (*f) (double a);};
20066 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
20067 int argc;
20068 char **argv;
20069 int
20070 main ()
20071 {
20072 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
20073   ;
20074   return 0;
20075 }
20076 _ACEOF
20077 for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
20078         -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
20079 do
20080   CC="$ac_save_CC $ac_arg"
20081   if ac_fn_c_try_compile "$LINENO"; then :
20082   ac_cv_prog_cc_c89=$ac_arg
20083 fi
20084 rm -f core conftest.err conftest.$ac_objext
20085   test "x$ac_cv_prog_cc_c89" != "xno" && break
20086 done
20087 rm -f conftest.$ac_ext
20088 CC=$ac_save_CC
20089 
20090 fi
20091 # AC_CACHE_VAL
20092 case "x$ac_cv_prog_cc_c89" in
20093   x)
20094     { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
20095 $as_echo "none needed" >&6; } ;;
20096   xno)
20097     { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
20098 $as_echo "unsupported" >&6; } ;;
20099   *)
20100     CC="$CC $ac_cv_prog_cc_c89"
20101     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
20102 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
20103 esac
20104 if test "x$ac_cv_prog_cc_c89" != xno; then :
20105 
20106 fi
20107 
20108 ac_ext=cpp
20109 ac_cpp='$CXXCPP $CPPFLAGS'
20110 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
20111 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
20112 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
20113 
20114 
20115 ### Locate C++ compiler (CXX)
20116 
20117 if test "x$OPENJDK_TARGET_OS" = xmacosx; then
20118   # Do not probe for CC on MacOSX.
20119   COMPILER_CHECK_LIST="cl g++"
20120 else
20121   COMPILER_CHECK_LIST="cl CC g++"
20122 fi
20123 
20124   COMPILER_NAME=C++
20125 
20126   CXX=
20127   # If TOOLS_DIR is set, check for all compiler names in there first
20128   # before checking the rest of the PATH.
20129   if test -n "$TOOLS_DIR"; then
20130     PATH_save="$PATH"
20131     PATH="$TOOLS_DIR"
20132     for ac_prog in $COMPILER_CHECK_LIST
20133 do
20134   # Extract the first word of "$ac_prog", so it can be a program name with args.
20135 set dummy $ac_prog; ac_word=$2
20136 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20137 $as_echo_n "checking for $ac_word... " >&6; }
20138 if ${ac_cv_path_TOOLS_DIR_CXX+:} false; then :
20139   $as_echo_n "(cached) " >&6
20140 else
20141   case $TOOLS_DIR_CXX in
20142   [\\/]* | ?:[\\/]*)
20143   ac_cv_path_TOOLS_DIR_CXX="$TOOLS_DIR_CXX" # Let the user override the test with a path.
20144   ;;
20145   *)
20146   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20147 for as_dir in $PATH
20148 do
20149   IFS=$as_save_IFS
20150   test -z "$as_dir" && as_dir=.
20151     for ac_exec_ext in '' $ac_executable_extensions; do
20152   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
20153     ac_cv_path_TOOLS_DIR_CXX="$as_dir/$ac_word$ac_exec_ext"
20154     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20155     break 2
20156   fi
20157 done
20158   done
20159 IFS=$as_save_IFS
20160 
20161   ;;
20162 esac
20163 fi
20164 TOOLS_DIR_CXX=$ac_cv_path_TOOLS_DIR_CXX
20165 if test -n "$TOOLS_DIR_CXX"; then
20166   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLS_DIR_CXX" >&5
20167 $as_echo "$TOOLS_DIR_CXX" >&6; }
20168 else
20169   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20170 $as_echo "no" >&6; }
20171 fi
20172 
20173 
20174   test -n "$TOOLS_DIR_CXX" && break
20175 done
20176 
20177     CXX=$TOOLS_DIR_CXX
20178     PATH="$PATH_save"
20179   fi
20180 
20181   # AC_PATH_PROGS can't be run multiple times with the same variable,
20182   # so create a new name for this run.
20183   if test "x$CXX" = x; then
20184     for ac_prog in $COMPILER_CHECK_LIST
20185 do
20186   # Extract the first word of "$ac_prog", so it can be a program name with args.
20187 set dummy $ac_prog; ac_word=$2
20188 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20189 $as_echo_n "checking for $ac_word... " >&6; }
20190 if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
20191   $as_echo_n "(cached) " >&6
20192 else
20193   case $POTENTIAL_CXX in
20194   [\\/]* | ?:[\\/]*)
20195   ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
20196   ;;
20197   *)
20198   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20199 for as_dir in $PATH
20200 do
20201   IFS=$as_save_IFS
20202   test -z "$as_dir" && as_dir=.
20203     for ac_exec_ext in '' $ac_executable_extensions; do
20204   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
20205     ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
20206     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20207     break 2
20208   fi
20209 done
20210   done
20211 IFS=$as_save_IFS
20212 
20213   ;;
20214 esac
20215 fi
20216 POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
20217 if test -n "$POTENTIAL_CXX"; then
20218   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
20219 $as_echo "$POTENTIAL_CXX" >&6; }
20220 else
20221   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20222 $as_echo "no" >&6; }
20223 fi
20224 
20225 
20226   test -n "$POTENTIAL_CXX" && break
20227 done
20228 
20229     CXX=$POTENTIAL_CXX
20230   fi
20231 
20232   if test "x$CXX" = x; then
20233 
20234     # Print a helpful message on how to acquire the necessary build dependency.
20235     # devkit is the help tag: freetyp2, cups, pulse, alsa etc
20236     MISSING_DEPENDENCY=devkit
20237     PKGHANDLER_COMMAND=
20238 
20239     case $PKGHANDLER in
20240         apt-get)
20241                 apt_help     $MISSING_DEPENDENCY ;;
20242     yum)
20243                 yum_help     $MISSING_DEPENDENCY ;;
20244         port)
20245                 port_help    $MISSING_DEPENDENCY ;;
20246         pkgutil)
20247                 pkgutil_help $MISSING_DEPENDENCY ;;
20248         pkgadd)
20249                 pkgadd_help  $MISSING_DEPENDENCY ;;
20250     * )
20251       break ;;
20252     esac
20253 
20254     if test "x$PKGHANDLER_COMMAND" != x; then
20255         HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
20256     fi
20257 
20258       as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
20259   fi
20260 
20261   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20262 
20263   # First separate the path from the arguments. This will split at the first
20264   # space.
20265   complete="$CXX"
20266   path="${complete%% *}"
20267   tmp="$complete EOL"
20268   arguments="${tmp#* }"
20269 
20270   # Input might be given as Windows format, start by converting to
20271   # unix format.
20272   new_path=`$CYGPATH -u "$path"`
20273 
20274   # Now try to locate executable using which
20275   new_path=`$WHICH "$new_path" 2> /dev/null`
20276   # bat and cmd files are not always considered executable in cygwin causing which
20277   # to not find them
20278   if test "x$new_path" = x \
20279            && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20280            && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20281     new_path=`$CYGPATH -u "$path"`
20282   fi
20283   if test "x$new_path" = x; then
20284     # Oops. Which didn't find the executable.
20285     # The splitting of arguments from the executable at a space might have been incorrect,
20286     # since paths with space are more likely in Windows. Give it another try with the whole
20287     # argument.
20288     path="$complete"
20289     arguments="EOL"
20290     new_path=`$CYGPATH -u "$path"`
20291     new_path=`$WHICH "$new_path" 2> /dev/null`
20292     # bat and cmd files are not always considered executable in cygwin causing which
20293     # to not find them
20294     if test "x$new_path" = x \
20295              && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20296              && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20297       new_path=`$CYGPATH -u "$path"`
20298     fi
20299     if test "x$new_path" = x; then
20300       # It's still not found. Now this is an unrecoverable error.
20301       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
20302 $as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
20303       has_space=`$ECHO "$complete" | $GREP " "`
20304       if test "x$has_space" != x; then
20305         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20306 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20307       fi
20308       as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
20309     fi
20310   fi
20311 
20312   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20313   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20314   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20315   # "foo.exe" is OK but "foo" is an error.
20316   #
20317   # This test is therefore slightly more accurate than "test -f" to check for file precense.
20318   # It is also a way to make sure we got the proper file name for the real test later on.
20319   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20320   if test "x$test_shortpath" = x; then
20321     # Short path failed, file does not exist as specified.
20322     # Try adding .exe or .cmd
20323     if test -f "${new_path}.exe"; then
20324        input_to_shortpath="${new_path}.exe"
20325     elif test -f "${new_path}.cmd"; then
20326        input_to_shortpath="${new_path}.cmd"
20327     else
20328       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$new_path\", is invalid." >&5
20329 $as_echo "$as_me: The path of CXX, which resolves as \"$new_path\", is invalid." >&6;}
20330       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
20331 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
20332       as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
20333     fi
20334   else
20335     input_to_shortpath="$new_path"
20336   fi
20337 
20338   # Call helper function which possibly converts this using DOS-style short mode.
20339   # If so, the updated path is stored in $new_path.
20340   new_path="$input_to_shortpath"
20341 
20342   input_path="$input_to_shortpath"
20343   # Check if we need to convert this using DOS-style short mode. If the path
20344   # contains just simple characters, use it. Otherwise (spaces, weird characters),
20345   # take no chances and rewrite it.
20346   # Note: m4 eats our [], so we need to use [ and ] instead.
20347   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20348   if test "x$has_forbidden_chars" != x; then
20349     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20350     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20351     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20352     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20353       # Going to short mode and back again did indeed matter. Since short mode is
20354       # case insensitive, let's make it lowercase to improve readability.
20355       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20356       # Now convert it back to Unix-stile (cygpath)
20357       input_path=`$CYGPATH -u "$shortmode_path"`
20358       new_path="$input_path"
20359     fi
20360   fi
20361 
20362   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20363   if test "x$test_cygdrive_prefix" = x; then
20364     # As a simple fix, exclude /usr/bin since it's not a real path.
20365     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
20366       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20367       # a path prefixed by /cygdrive for fixpath to work.
20368       new_path="$CYGWIN_ROOT_PATH$input_path"
20369     fi
20370   fi
20371 
20372   # remove trailing .exe if any
20373   new_path="${new_path/%.exe/}"
20374 
20375   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20376 
20377   # First separate the path from the arguments. This will split at the first
20378   # space.
20379   complete="$CXX"
20380   path="${complete%% *}"
20381   tmp="$complete EOL"
20382   arguments="${tmp#* }"
20383 
20384   # Input might be given as Windows format, start by converting to
20385   # unix format.
20386   new_path="$path"
20387 
20388   windows_path="$new_path"
20389   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20390     unix_path=`$CYGPATH -u "$windows_path"`
20391     new_path="$unix_path"
20392   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20393     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20394     new_path="$unix_path"
20395   fi
20396 
20397 
20398   # Now try to locate executable using which
20399   new_path=`$WHICH "$new_path" 2> /dev/null`
20400 
20401   if test "x$new_path" = x; then
20402     # Oops. Which didn't find the executable.
20403     # The splitting of arguments from the executable at a space might have been incorrect,
20404     # since paths with space are more likely in Windows. Give it another try with the whole
20405     # argument.
20406     path="$complete"
20407     arguments="EOL"
20408     new_path="$path"
20409 
20410   windows_path="$new_path"
20411   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20412     unix_path=`$CYGPATH -u "$windows_path"`
20413     new_path="$unix_path"
20414   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20415     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20416     new_path="$unix_path"
20417   fi
20418 
20419 
20420     new_path=`$WHICH "$new_path" 2> /dev/null`
20421 
20422     if test "x$new_path" = x; then
20423       # It's still not found. Now this is an unrecoverable error.
20424       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
20425 $as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
20426       has_space=`$ECHO "$complete" | $GREP " "`
20427       if test "x$has_space" != x; then
20428         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20429 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20430       fi
20431       as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
20432     fi
20433   fi
20434 
20435   # Now new_path has a complete unix path to the binary
20436   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
20437     # Keep paths in /bin as-is, but remove trailing .exe if any
20438     new_path="${new_path/%.exe/}"
20439     # Do not save /bin paths to all_fixpath_prefixes!
20440   else
20441     # Not in mixed or Windows style, start by that.
20442     new_path=`cmd //c echo $new_path`
20443 
20444   input_path="$new_path"
20445   # Check if we need to convert this using DOS-style short mode. If the path
20446   # contains just simple characters, use it. Otherwise (spaces, weird characters),
20447   # take no chances and rewrite it.
20448   # Note: m4 eats our [], so we need to use [ and ] instead.
20449   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20450   if test "x$has_forbidden_chars" != x; then
20451     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20452     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20453   fi
20454 
20455     # Output is in $new_path
20456 
20457   windows_path="$new_path"
20458   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20459     unix_path=`$CYGPATH -u "$windows_path"`
20460     new_path="$unix_path"
20461   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20462     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20463     new_path="$unix_path"
20464   fi
20465 
20466     # remove trailing .exe if any
20467     new_path="${new_path/%.exe/}"
20468 
20469     # Save the first 10 bytes of this path to the storage, so fixpath can work.
20470     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20471   fi
20472 
20473   else
20474     # We're on a posix platform. Hooray! :)
20475     # First separate the path from the arguments. This will split at the first
20476     # space.
20477     complete="$CXX"
20478     path="${complete%% *}"
20479     tmp="$complete EOL"
20480     arguments="${tmp#* }"
20481 
20482     # Cannot rely on the command "which" here since it doesn't always work.
20483     is_absolute_path=`$ECHO "$path" | $GREP ^/`
20484     if test -z "$is_absolute_path"; then
20485       # Path to executable is not absolute. Find it.
20486       IFS_save="$IFS"
20487       IFS=:
20488       for p in $PATH; do
20489         if test -f "$p/$path" && test -x "$p/$path"; then
20490           new_path="$p/$path"
20491           break
20492         fi
20493       done
20494       IFS="$IFS_save"
20495     else
20496       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CXX (as $path) failed, using $path directly." >&5
20497 $as_echo "$as_me: Resolving CXX (as $path) failed, using $path directly." >&6;}
20498       new_path="$path"
20499     fi
20500 
20501     if test "x$new_path" = x; then
20502         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
20503 $as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
20504         has_space=`$ECHO "$complete" | $GREP " "`
20505         if test "x$has_space" != x; then
20506           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
20507 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
20508         fi
20509         as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
20510       fi
20511   fi
20512 
20513       # Now join together the path and the arguments once again
20514       if test "x$arguments" != xEOL; then
20515         new_complete="$new_path ${arguments% *}"
20516       else
20517         new_complete="$new_path"
20518       fi
20519 
20520   if test "x$complete" != "x$new_complete"; then
20521       CXX="$new_complete"
20522       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXX to \"$new_complete\"" >&5
20523 $as_echo "$as_me: Rewriting CXX to \"$new_complete\"" >&6;}
20524     fi
20525 
20526   { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CXX" >&5
20527 $as_echo_n "checking resolved symbolic links for CXX... " >&6; }
20528   TEST_COMPILER="$CXX"
20529 
20530     if test "x$OPENJDK_BUILD_OS" != xwindows; then
20531         # Follow a chain of symbolic links. Use readlink
20532         # where it exists, else fall back to horribly
20533         # complicated shell code.
20534         if test "x$READLINK_TESTED" != yes; then
20535             # On MacOSX there is a readlink tool with a different
20536             # purpose than the GNU readlink tool. Check the found readlink.
20537             ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
20538             if test "x$ISGNU" = x; then
20539                  # A readlink that we do not know how to use.
20540                  # Are there other non-GNU readlinks out there?
20541                  READLINK_TESTED=yes
20542                  READLINK=
20543             fi
20544         fi
20545 
20546         if test "x$READLINK" != x; then
20547             TEST_COMPILER=`$READLINK -f $TEST_COMPILER`
20548         else
20549             # Save the current directory for restoring afterwards
20550             STARTDIR=$PWD
20551             COUNTER=0
20552             sym_link_dir=`$DIRNAME $TEST_COMPILER`
20553             sym_link_file=`$BASENAME $TEST_COMPILER`
20554             # Use the system pwd and not the shell builtin to resolve directory symlinks
20555             cd $sym_link_dir
20556             cd `$THEPWDCMD`
20557             sym_link_dir=`$THEPWDCMD`
20558             # Resolve file symlinks
20559             while test $COUNTER -lt 20; do
20560                 ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
20561                 if test "x$ISLINK" == x; then
20562                     # This is not a symbolic link! We are done!
20563                     break
20564                 fi
20565                 # Again resolve directory symlinks since the target of the just found
20566                 # link could be in a different directory
20567                 cd `$DIRNAME $ISLINK`
20568                 sym_link_dir=`$THEPWDCMD`
20569                 sym_link_file=`$BASENAME $ISLINK`
20570                 let COUNTER=COUNTER+1
20571             done
20572             cd $STARTDIR
20573             TEST_COMPILER=$sym_link_dir/$sym_link_file
20574         fi
20575     fi
20576 
20577   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_COMPILER" >&5
20578 $as_echo "$TEST_COMPILER" >&6; }
20579   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CXX is disguised ccache" >&5
20580 $as_echo_n "checking if CXX is disguised ccache... " >&6; }
20581 
20582   COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"`
20583   if test "x$COMPILER_BASENAME" = "xccache"; then
20584     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5
20585 $as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; }
20586     # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache.
20587     # We want to control ccache invocation ourselves, so ignore this cc and try
20588     # searching again.
20589 
20590     # Remove the path to the fake ccache cc from the PATH
20591     RETRY_COMPILER_SAVED_PATH="$PATH"
20592     COMPILER_DIRNAME=`$DIRNAME $CXX`
20593     PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`"
20594 
20595     # Try again looking for our compiler
20596     if test -n "$ac_tool_prefix"; then
20597   for ac_prog in $COMPILER_CHECK_LIST
20598   do
20599     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
20600 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
20601 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20602 $as_echo_n "checking for $ac_word... " >&6; }
20603 if ${ac_cv_prog_PROPER_COMPILER_CXX+:} false; then :
20604   $as_echo_n "(cached) " >&6
20605 else
20606   if test -n "$PROPER_COMPILER_CXX"; then
20607   ac_cv_prog_PROPER_COMPILER_CXX="$PROPER_COMPILER_CXX" # Let the user override the test.
20608 else
20609 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20610 for as_dir in $PATH
20611 do
20612   IFS=$as_save_IFS
20613   test -z "$as_dir" && as_dir=.
20614     for ac_exec_ext in '' $ac_executable_extensions; do
20615   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
20616     ac_cv_prog_PROPER_COMPILER_CXX="$ac_tool_prefix$ac_prog"
20617     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20618     break 2
20619   fi
20620 done
20621   done
20622 IFS=$as_save_IFS
20623 
20624 fi
20625 fi
20626 PROPER_COMPILER_CXX=$ac_cv_prog_PROPER_COMPILER_CXX
20627 if test -n "$PROPER_COMPILER_CXX"; then
20628   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5
20629 $as_echo "$PROPER_COMPILER_CXX" >&6; }
20630 else
20631   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20632 $as_echo "no" >&6; }
20633 fi
20634 
20635 
20636     test -n "$PROPER_COMPILER_CXX" && break
20637   done
20638 fi
20639 if test -z "$PROPER_COMPILER_CXX"; then
20640   ac_ct_PROPER_COMPILER_CXX=$PROPER_COMPILER_CXX
20641   for ac_prog in $COMPILER_CHECK_LIST
20642 do
20643   # Extract the first word of "$ac_prog", so it can be a program name with args.
20644 set dummy $ac_prog; ac_word=$2
20645 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20646 $as_echo_n "checking for $ac_word... " >&6; }
20647 if ${ac_cv_prog_ac_ct_PROPER_COMPILER_CXX+:} false; then :
20648   $as_echo_n "(cached) " >&6
20649 else
20650   if test -n "$ac_ct_PROPER_COMPILER_CXX"; then
20651   ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_ct_PROPER_COMPILER_CXX" # Let the user override the test.
20652 else
20653 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20654 for as_dir in $PATH
20655 do
20656   IFS=$as_save_IFS
20657   test -z "$as_dir" && as_dir=.
20658     for ac_exec_ext in '' $ac_executable_extensions; do
20659   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
20660     ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_prog"
20661     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20662     break 2
20663   fi
20664 done
20665   done
20666 IFS=$as_save_IFS
20667 
20668 fi
20669 fi
20670 ac_ct_PROPER_COMPILER_CXX=$ac_cv_prog_ac_ct_PROPER_COMPILER_CXX
20671 if test -n "$ac_ct_PROPER_COMPILER_CXX"; then
20672   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CXX" >&5
20673 $as_echo "$ac_ct_PROPER_COMPILER_CXX" >&6; }
20674 else
20675   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20676 $as_echo "no" >&6; }
20677 fi
20678 
20679 
20680   test -n "$ac_ct_PROPER_COMPILER_CXX" && break
20681 done
20682 
20683   if test "x$ac_ct_PROPER_COMPILER_CXX" = x; then
20684     PROPER_COMPILER_CXX=""
20685   else
20686     case $cross_compiling:$ac_tool_warned in
20687 yes:)
20688 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
20689 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
20690 ac_tool_warned=yes ;;
20691 esac
20692     PROPER_COMPILER_CXX=$ac_ct_PROPER_COMPILER_CXX
20693   fi
20694 fi
20695 
20696 
20697   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20698 
20699   # First separate the path from the arguments. This will split at the first
20700   # space.
20701   complete="$PROPER_COMPILER_CXX"
20702   path="${complete%% *}"
20703   tmp="$complete EOL"
20704   arguments="${tmp#* }"
20705 
20706   # Input might be given as Windows format, start by converting to
20707   # unix format.
20708   new_path=`$CYGPATH -u "$path"`
20709 
20710   # Now try to locate executable using which
20711   new_path=`$WHICH "$new_path" 2> /dev/null`
20712   # bat and cmd files are not always considered executable in cygwin causing which
20713   # to not find them
20714   if test "x$new_path" = x \
20715            && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20716            && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20717     new_path=`$CYGPATH -u "$path"`
20718   fi
20719   if test "x$new_path" = x; then
20720     # Oops. Which didn't find the executable.
20721     # The splitting of arguments from the executable at a space might have been incorrect,
20722     # since paths with space are more likely in Windows. Give it another try with the whole
20723     # argument.
20724     path="$complete"
20725     arguments="EOL"
20726     new_path=`$CYGPATH -u "$path"`
20727     new_path=`$WHICH "$new_path" 2> /dev/null`
20728     # bat and cmd files are not always considered executable in cygwin causing which
20729     # to not find them
20730     if test "x$new_path" = x \
20731              && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20732              && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20733       new_path=`$CYGPATH -u "$path"`
20734     fi
20735     if test "x$new_path" = x; then
20736       # It's still not found. Now this is an unrecoverable error.
20737       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
20738 $as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
20739       has_space=`$ECHO "$complete" | $GREP " "`
20740       if test "x$has_space" != x; then
20741         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20742 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20743       fi
20744       as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
20745     fi
20746   fi
20747 
20748   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20749   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20750   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20751   # "foo.exe" is OK but "foo" is an error.
20752   #
20753   # This test is therefore slightly more accurate than "test -f" to check for file precense.
20754   # It is also a way to make sure we got the proper file name for the real test later on.
20755   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20756   if test "x$test_shortpath" = x; then
20757     # Short path failed, file does not exist as specified.
20758     # Try adding .exe or .cmd
20759     if test -f "${new_path}.exe"; then
20760        input_to_shortpath="${new_path}.exe"
20761     elif test -f "${new_path}.cmd"; then
20762        input_to_shortpath="${new_path}.cmd"
20763     else
20764       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&5
20765 $as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&6;}
20766       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
20767 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
20768       as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
20769     fi
20770   else
20771     input_to_shortpath="$new_path"
20772   fi
20773 
20774   # Call helper function which possibly converts this using DOS-style short mode.
20775   # If so, the updated path is stored in $new_path.
20776   new_path="$input_to_shortpath"
20777 
20778   input_path="$input_to_shortpath"
20779   # Check if we need to convert this using DOS-style short mode. If the path
20780   # contains just simple characters, use it. Otherwise (spaces, weird characters),
20781   # take no chances and rewrite it.
20782   # Note: m4 eats our [], so we need to use [ and ] instead.
20783   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20784   if test "x$has_forbidden_chars" != x; then
20785     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20786     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20787     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20788     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20789       # Going to short mode and back again did indeed matter. Since short mode is
20790       # case insensitive, let's make it lowercase to improve readability.
20791       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20792       # Now convert it back to Unix-stile (cygpath)
20793       input_path=`$CYGPATH -u "$shortmode_path"`
20794       new_path="$input_path"
20795     fi
20796   fi
20797 
20798   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20799   if test "x$test_cygdrive_prefix" = x; then
20800     # As a simple fix, exclude /usr/bin since it's not a real path.
20801     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
20802       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20803       # a path prefixed by /cygdrive for fixpath to work.
20804       new_path="$CYGWIN_ROOT_PATH$input_path"
20805     fi
20806   fi
20807 
20808   # remove trailing .exe if any
20809   new_path="${new_path/%.exe/}"
20810 
20811   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20812 
20813   # First separate the path from the arguments. This will split at the first
20814   # space.
20815   complete="$PROPER_COMPILER_CXX"
20816   path="${complete%% *}"
20817   tmp="$complete EOL"
20818   arguments="${tmp#* }"
20819 
20820   # Input might be given as Windows format, start by converting to
20821   # unix format.
20822   new_path="$path"
20823 
20824   windows_path="$new_path"
20825   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20826     unix_path=`$CYGPATH -u "$windows_path"`
20827     new_path="$unix_path"
20828   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20829     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20830     new_path="$unix_path"
20831   fi
20832 
20833 
20834   # Now try to locate executable using which
20835   new_path=`$WHICH "$new_path" 2> /dev/null`
20836 
20837   if test "x$new_path" = x; then
20838     # Oops. Which didn't find the executable.
20839     # The splitting of arguments from the executable at a space might have been incorrect,
20840     # since paths with space are more likely in Windows. Give it another try with the whole
20841     # argument.
20842     path="$complete"
20843     arguments="EOL"
20844     new_path="$path"
20845 
20846   windows_path="$new_path"
20847   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20848     unix_path=`$CYGPATH -u "$windows_path"`
20849     new_path="$unix_path"
20850   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20851     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20852     new_path="$unix_path"
20853   fi
20854 
20855 
20856     new_path=`$WHICH "$new_path" 2> /dev/null`
20857 
20858     if test "x$new_path" = x; then
20859       # It's still not found. Now this is an unrecoverable error.
20860       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
20861 $as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
20862       has_space=`$ECHO "$complete" | $GREP " "`
20863       if test "x$has_space" != x; then
20864         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20865 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20866       fi
20867       as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
20868     fi
20869   fi
20870 
20871   # Now new_path has a complete unix path to the binary
20872   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
20873     # Keep paths in /bin as-is, but remove trailing .exe if any
20874     new_path="${new_path/%.exe/}"
20875     # Do not save /bin paths to all_fixpath_prefixes!
20876   else
20877     # Not in mixed or Windows style, start by that.
20878     new_path=`cmd //c echo $new_path`
20879 
20880   input_path="$new_path"
20881   # Check if we need to convert this using DOS-style short mode. If the path
20882   # contains just simple characters, use it. Otherwise (spaces, weird characters),
20883   # take no chances and rewrite it.
20884   # Note: m4 eats our [], so we need to use [ and ] instead.
20885   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20886   if test "x$has_forbidden_chars" != x; then
20887     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20888     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20889   fi
20890 
20891     # Output is in $new_path
20892 
20893   windows_path="$new_path"
20894   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20895     unix_path=`$CYGPATH -u "$windows_path"`
20896     new_path="$unix_path"
20897   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20898     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20899     new_path="$unix_path"
20900   fi
20901 
20902     # remove trailing .exe if any
20903     new_path="${new_path/%.exe/}"
20904 
20905     # Save the first 10 bytes of this path to the storage, so fixpath can work.
20906     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20907   fi
20908 
20909   else
20910     # We're on a posix platform. Hooray! :)
20911     # First separate the path from the arguments. This will split at the first
20912     # space.
20913     complete="$PROPER_COMPILER_CXX"
20914     path="${complete%% *}"
20915     tmp="$complete EOL"
20916     arguments="${tmp#* }"
20917 
20918     # Cannot rely on the command "which" here since it doesn't always work.
20919     is_absolute_path=`$ECHO "$path" | $GREP ^/`
20920     if test -z "$is_absolute_path"; then
20921       # Path to executable is not absolute. Find it.
20922       IFS_save="$IFS"
20923       IFS=:
20924       for p in $PATH; do
20925         if test -f "$p/$path" && test -x "$p/$path"; then
20926           new_path="$p/$path"
20927           break
20928         fi
20929       done
20930       IFS="$IFS_save"
20931     else
20932       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving PROPER_COMPILER_CXX (as $path) failed, using $path directly." >&5
20933 $as_echo "$as_me: Resolving PROPER_COMPILER_CXX (as $path) failed, using $path directly." >&6;}
20934       new_path="$path"
20935     fi
20936 
20937     if test "x$new_path" = x; then
20938         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
20939 $as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
20940         has_space=`$ECHO "$complete" | $GREP " "`
20941         if test "x$has_space" != x; then
20942           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
20943 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
20944         fi
20945         as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
20946       fi
20947   fi
20948 
20949       # Now join together the path and the arguments once again
20950       if test "x$arguments" != xEOL; then
20951         new_complete="$new_path ${arguments% *}"
20952       else
20953         new_complete="$new_path"
20954       fi
20955 
20956   if test "x$complete" != "x$new_complete"; then
20957       PROPER_COMPILER_CXX="$new_complete"
20958       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&5
20959 $as_echo "$as_me: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&6;}
20960     fi
20961 
20962     PATH="$RETRY_COMPILER_SAVED_PATH"
20963 
20964     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CXX" >&5
20965 $as_echo_n "checking for resolved symbolic links for CXX... " >&6; }
20966 
20967     if test "x$OPENJDK_BUILD_OS" != xwindows; then
20968         # Follow a chain of symbolic links. Use readlink
20969         # where it exists, else fall back to horribly
20970         # complicated shell code.
20971         if test "x$READLINK_TESTED" != yes; then
20972             # On MacOSX there is a readlink tool with a different
20973             # purpose than the GNU readlink tool. Check the found readlink.
20974             ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
20975             if test "x$ISGNU" = x; then
20976                  # A readlink that we do not know how to use.
20977                  # Are there other non-GNU readlinks out there?
20978                  READLINK_TESTED=yes
20979                  READLINK=
20980             fi
20981         fi
20982 
20983         if test "x$READLINK" != x; then
20984             PROPER_COMPILER_CXX=`$READLINK -f $PROPER_COMPILER_CXX`
20985         else
20986             # Save the current directory for restoring afterwards
20987             STARTDIR=$PWD
20988             COUNTER=0
20989             sym_link_dir=`$DIRNAME $PROPER_COMPILER_CXX`
20990             sym_link_file=`$BASENAME $PROPER_COMPILER_CXX`
20991             # Use the system pwd and not the shell builtin to resolve directory symlinks
20992             cd $sym_link_dir
20993             cd `$THEPWDCMD`
20994             sym_link_dir=`$THEPWDCMD`
20995             # Resolve file symlinks
20996             while test $COUNTER -lt 20; do
20997                 ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
20998                 if test "x$ISLINK" == x; then
20999                     # This is not a symbolic link! We are done!
21000                     break
21001                 fi
21002                 # Again resolve directory symlinks since the target of the just found
21003                 # link could be in a different directory
21004                 cd `$DIRNAME $ISLINK`
21005                 sym_link_dir=`$THEPWDCMD`
21006                 sym_link_file=`$BASENAME $ISLINK`
21007                 let COUNTER=COUNTER+1
21008             done
21009             cd $STARTDIR
21010             PROPER_COMPILER_CXX=$sym_link_dir/$sym_link_file
21011         fi
21012     fi
21013 
21014     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5
21015 $as_echo "$PROPER_COMPILER_CXX" >&6; }
21016     CXX="$PROPER_COMPILER_CXX"
21017   else
21018     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CXX" >&5
21019 $as_echo "no, keeping CXX" >&6; }
21020     CXX="$TEST_COMPILER"
21021   fi
21022 
21023   COMPILER=$CXX
21024   COMPILER_NAME=$COMPILER_NAME
21025 
21026   if test "x$OPENJDK_TARGET_OS" = xsolaris; then
21027     # Make sure we use the Sun Studio compiler and not gcc on Solaris, which won't work
21028     COMPILER_VERSION_TEST=`$COMPILER -V 2>&1 | $HEAD -n 1`
21029     $ECHO $COMPILER_VERSION_TEST | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
21030     if test $? -ne 0; then
21031       GCC_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
21032 
21033       { $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
21034 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required Sun Studio compiler." >&6;}
21035       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&5
21036 $as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&6;}
21037       as_fn_error $? "Sun Studio compiler is required. Try setting --with-tools-dir." "$LINENO" 5
21038     else
21039       COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/p"`
21040       COMPILER_VENDOR="Sun Studio"
21041     fi
21042   elif test  "x$OPENJDK_TARGET_OS" = xwindows; then
21043     # First line typically looks something like:
21044     # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.30319.01 for 80x86
21045     COMPILER_VERSION_TEST=`$COMPILER 2>&1 | $HEAD -n 1`
21046     COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*Version \([1-9][0-9.]*\) .*/\1/p"`
21047     COMPILER_VENDOR="Microsoft CL.EXE"
21048     COMPILER_CPU_TEST=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* for \(.*\)$/\1/p"`
21049     if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
21050       if test "x$COMPILER_CPU_TEST" != "x80x86"; then
21051         as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"80x86\"." "$LINENO" 5
21052       fi
21053     elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
21054       if test "x$COMPILER_CPU_TEST" != "xx64"; then
21055         as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." "$LINENO" 5
21056       fi
21057     fi
21058   else
21059     COMPILER_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
21060     # Check that this is likely to be GCC.
21061     $COMPILER --version 2>&1 | $GREP "Free Software Foundation" > /dev/null
21062     if test $? -ne 0; then
21063       { $as_echo "$as_me:${as_lineno-$LINENO}: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&5
21064 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&6;}
21065       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&5
21066 $as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&6;}
21067       as_fn_error $? "GCC compiler is required. Try setting --with-tools-dir." "$LINENO" 5
21068     fi
21069 
21070     # First line typically looks something like:
21071     # gcc (Ubuntu/Linaro 4.5.2-8ubuntu4) 4.5.2
21072     COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* \([1-9][0-9.]*\)/\1/p"`
21073     COMPILER_VENDOR=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^\(.*\) [1-9][0-9.]*/\1/p"`
21074   fi
21075   # This sets CC_VERSION or CXX_VERSION. (This comment is a grep marker)
21076   CXX_VERSION="$COMPILER_VERSION"
21077   # This sets CC_VENDOR or CXX_VENDOR. (This comment is a grep marker)
21078   CXX_VENDOR="$COMPILER_VENDOR"
21079 
21080   { $as_echo "$as_me:${as_lineno-$LINENO}: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&5
21081 $as_echo "$as_me: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&6;}
21082 
21083 
21084 # Now that we have resolved CXX ourself, let autoconf have it's go at it
21085 ac_ext=cpp
21086 ac_cpp='$CXXCPP $CPPFLAGS'
21087 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
21088 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
21089 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
21090 if test -z "$CXX"; then
21091   if test -n "$CCC"; then
21092     CXX=$CCC
21093   else
21094     if test -n "$ac_tool_prefix"; then
21095   for ac_prog in $CXX
21096   do
21097     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
21098 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
21099 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21100 $as_echo_n "checking for $ac_word... " >&6; }
21101 if ${ac_cv_prog_CXX+:} false; then :
21102   $as_echo_n "(cached) " >&6
21103 else
21104   if test -n "$CXX"; then
21105   ac_cv_prog_CXX="$CXX" # Let the user override the test.
21106 else
21107 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21108 for as_dir in $PATH
21109 do
21110   IFS=$as_save_IFS
21111   test -z "$as_dir" && as_dir=.
21112     for ac_exec_ext in '' $ac_executable_extensions; do
21113   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
21114     ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
21115     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21116     break 2
21117   fi
21118 done
21119   done
21120 IFS=$as_save_IFS
21121 
21122 fi
21123 fi
21124 CXX=$ac_cv_prog_CXX
21125 if test -n "$CXX"; then
21126   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
21127 $as_echo "$CXX" >&6; }
21128 else
21129   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21130 $as_echo "no" >&6; }
21131 fi
21132 
21133 
21134     test -n "$CXX" && break
21135   done
21136 fi
21137 if test -z "$CXX"; then
21138   ac_ct_CXX=$CXX
21139   for ac_prog in $CXX
21140 do
21141   # Extract the first word of "$ac_prog", so it can be a program name with args.
21142 set dummy $ac_prog; ac_word=$2
21143 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21144 $as_echo_n "checking for $ac_word... " >&6; }
21145 if ${ac_cv_prog_ac_ct_CXX+:} false; then :
21146   $as_echo_n "(cached) " >&6
21147 else
21148   if test -n "$ac_ct_CXX"; then
21149   ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
21150 else
21151 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21152 for as_dir in $PATH
21153 do
21154   IFS=$as_save_IFS
21155   test -z "$as_dir" && as_dir=.
21156     for ac_exec_ext in '' $ac_executable_extensions; do
21157   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
21158     ac_cv_prog_ac_ct_CXX="$ac_prog"
21159     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21160     break 2
21161   fi
21162 done
21163   done
21164 IFS=$as_save_IFS
21165 
21166 fi
21167 fi
21168 ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
21169 if test -n "$ac_ct_CXX"; then
21170   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
21171 $as_echo "$ac_ct_CXX" >&6; }
21172 else
21173   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21174 $as_echo "no" >&6; }
21175 fi
21176 
21177 
21178   test -n "$ac_ct_CXX" && break
21179 done
21180 
21181   if test "x$ac_ct_CXX" = x; then
21182     CXX="g++"
21183   else
21184     case $cross_compiling:$ac_tool_warned in
21185 yes:)
21186 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
21187 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
21188 ac_tool_warned=yes ;;
21189 esac
21190     CXX=$ac_ct_CXX
21191   fi
21192 fi
21193 
21194   fi
21195 fi
21196 # Provide some information about the compiler.
21197 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
21198 set X $ac_compile
21199 ac_compiler=$2
21200 for ac_option in --version -v -V -qversion; do
21201   { { ac_try="$ac_compiler $ac_option >&5"
21202 case "(($ac_try" in
21203   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21204   *) ac_try_echo=$ac_try;;
21205 esac
21206 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
21207 $as_echo "$ac_try_echo"; } >&5
21208   (eval "$ac_compiler $ac_option >&5") 2>conftest.err
21209   ac_status=$?
21210   if test -s conftest.err; then
21211     sed '10a\
21212 ... rest of stderr output deleted ...
21213          10q' conftest.err >conftest.er1
21214     cat conftest.er1 >&5
21215   fi
21216   rm -f conftest.er1 conftest.err
21217   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
21218   test $ac_status = 0; }
21219 done
21220 
21221 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
21222 $as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
21223 if ${ac_cv_cxx_compiler_gnu+:} false; then :
21224   $as_echo_n "(cached) " >&6
21225 else
21226   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21227 /* end confdefs.h.  */
21228 
21229 int
21230 main ()
21231 {
21232 #ifndef __GNUC__
21233        choke me
21234 #endif
21235 
21236   ;
21237   return 0;
21238 }
21239 _ACEOF
21240 if ac_fn_cxx_try_compile "$LINENO"; then :
21241   ac_compiler_gnu=yes
21242 else
21243   ac_compiler_gnu=no
21244 fi
21245 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21246 ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
21247 
21248 fi
21249 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
21250 $as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
21251 if test $ac_compiler_gnu = yes; then
21252   GXX=yes
21253 else
21254   GXX=
21255 fi
21256 ac_test_CXXFLAGS=${CXXFLAGS+set}
21257 ac_save_CXXFLAGS=$CXXFLAGS
21258 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
21259 $as_echo_n "checking whether $CXX accepts -g... " >&6; }
21260 if ${ac_cv_prog_cxx_g+:} false; then :
21261   $as_echo_n "(cached) " >&6
21262 else
21263   ac_save_cxx_werror_flag=$ac_cxx_werror_flag
21264    ac_cxx_werror_flag=yes
21265    ac_cv_prog_cxx_g=no
21266    CXXFLAGS="-g"
21267    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21268 /* end confdefs.h.  */
21269 
21270 int
21271 main ()
21272 {
21273 
21274   ;
21275   return 0;
21276 }
21277 _ACEOF
21278 if ac_fn_cxx_try_compile "$LINENO"; then :
21279   ac_cv_prog_cxx_g=yes
21280 else
21281   CXXFLAGS=""
21282       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21283 /* end confdefs.h.  */
21284 
21285 int
21286 main ()
21287 {
21288 
21289   ;
21290   return 0;
21291 }
21292 _ACEOF
21293 if ac_fn_cxx_try_compile "$LINENO"; then :
21294 
21295 else
21296   ac_cxx_werror_flag=$ac_save_cxx_werror_flag
21297          CXXFLAGS="-g"
21298          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21299 /* end confdefs.h.  */
21300 
21301 int
21302 main ()
21303 {
21304 
21305   ;
21306   return 0;
21307 }
21308 _ACEOF
21309 if ac_fn_cxx_try_compile "$LINENO"; then :
21310   ac_cv_prog_cxx_g=yes
21311 fi
21312 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21313 fi
21314 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21315 fi
21316 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21317    ac_cxx_werror_flag=$ac_save_cxx_werror_flag
21318 fi
21319 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
21320 $as_echo "$ac_cv_prog_cxx_g" >&6; }
21321 if test "$ac_test_CXXFLAGS" = set; then
21322   CXXFLAGS=$ac_save_CXXFLAGS
21323 elif test $ac_cv_prog_cxx_g = yes; then
21324   if test "$GXX" = yes; then
21325     CXXFLAGS="-g -O2"
21326   else
21327     CXXFLAGS="-g"
21328   fi
21329 else
21330   if test "$GXX" = yes; then
21331     CXXFLAGS="-O2"
21332   else
21333     CXXFLAGS=
21334   fi
21335 fi
21336 ac_ext=cpp
21337 ac_cpp='$CXXCPP $CPPFLAGS'
21338 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
21339 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
21340 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
21341 
21342 
21343 ### Locate other tools
21344 
21345 if test "x$OPENJDK_TARGET_OS" = xmacosx; then
21346     ac_ext=m
21347 ac_cpp='$OBJCPP $CPPFLAGS'
21348 ac_compile='$OBJC -c $OBJCFLAGS $CPPFLAGS conftest.$ac_ext >&5'
21349 ac_link='$OBJC -o conftest$ac_exeext $OBJCFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
21350 ac_compiler_gnu=$ac_cv_objc_compiler_gnu
21351 if test -n "$ac_tool_prefix"; then
21352   for ac_prog in gcc objcc objc cc CC
21353   do
21354     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
21355 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
21356 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21357 $as_echo_n "checking for $ac_word... " >&6; }
21358 if ${ac_cv_prog_OBJC+:} false; then :
21359   $as_echo_n "(cached) " >&6
21360 else
21361   if test -n "$OBJC"; then
21362   ac_cv_prog_OBJC="$OBJC" # Let the user override the test.
21363 else
21364 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21365 for as_dir in $PATH
21366 do
21367   IFS=$as_save_IFS
21368   test -z "$as_dir" && as_dir=.
21369     for ac_exec_ext in '' $ac_executable_extensions; do
21370   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
21371     ac_cv_prog_OBJC="$ac_tool_prefix$ac_prog"
21372     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21373     break 2
21374   fi
21375 done
21376   done
21377 IFS=$as_save_IFS
21378 
21379 fi
21380 fi
21381 OBJC=$ac_cv_prog_OBJC
21382 if test -n "$OBJC"; then
21383   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJC" >&5
21384 $as_echo "$OBJC" >&6; }
21385 else
21386   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21387 $as_echo "no" >&6; }
21388 fi
21389 
21390 
21391     test -n "$OBJC" && break
21392   done
21393 fi
21394 if test -z "$OBJC"; then
21395   ac_ct_OBJC=$OBJC
21396   for ac_prog in gcc objcc objc cc CC
21397 do
21398   # Extract the first word of "$ac_prog", so it can be a program name with args.
21399 set dummy $ac_prog; ac_word=$2
21400 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21401 $as_echo_n "checking for $ac_word... " >&6; }
21402 if ${ac_cv_prog_ac_ct_OBJC+:} false; then :
21403   $as_echo_n "(cached) " >&6
21404 else
21405   if test -n "$ac_ct_OBJC"; then
21406   ac_cv_prog_ac_ct_OBJC="$ac_ct_OBJC" # Let the user override the test.
21407 else
21408 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21409 for as_dir in $PATH
21410 do
21411   IFS=$as_save_IFS
21412   test -z "$as_dir" && as_dir=.
21413     for ac_exec_ext in '' $ac_executable_extensions; do
21414   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
21415     ac_cv_prog_ac_ct_OBJC="$ac_prog"
21416     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21417     break 2
21418   fi
21419 done
21420   done
21421 IFS=$as_save_IFS
21422 
21423 fi
21424 fi
21425 ac_ct_OBJC=$ac_cv_prog_ac_ct_OBJC
21426 if test -n "$ac_ct_OBJC"; then
21427   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJC" >&5
21428 $as_echo "$ac_ct_OBJC" >&6; }
21429 else
21430   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21431 $as_echo "no" >&6; }
21432 fi
21433 
21434 
21435   test -n "$ac_ct_OBJC" && break
21436 done
21437 
21438   if test "x$ac_ct_OBJC" = x; then
21439     OBJC="gcc"
21440   else
21441     case $cross_compiling:$ac_tool_warned in
21442 yes:)
21443 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
21444 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
21445 ac_tool_warned=yes ;;
21446 esac
21447     OBJC=$ac_ct_OBJC
21448   fi
21449 fi
21450 
21451 # Provide some information about the compiler.
21452 $as_echo "$as_me:${as_lineno-$LINENO}: checking for Objective C compiler version" >&5
21453 set X $ac_compile
21454 ac_compiler=$2
21455 for ac_option in --version -v -V -qversion; do
21456   { { ac_try="$ac_compiler $ac_option >&5"
21457 case "(($ac_try" in
21458   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21459   *) ac_try_echo=$ac_try;;
21460 esac
21461 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
21462 $as_echo "$ac_try_echo"; } >&5
21463   (eval "$ac_compiler $ac_option >&5") 2>conftest.err
21464   ac_status=$?
21465   if test -s conftest.err; then
21466     sed '10a\
21467 ... rest of stderr output deleted ...
21468          10q' conftest.err >conftest.er1
21469     cat conftest.er1 >&5
21470   fi
21471   rm -f conftest.er1 conftest.err
21472   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
21473   test $ac_status = 0; }
21474 done
21475 
21476 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU Objective C compiler" >&5
21477 $as_echo_n "checking whether we are using the GNU Objective C compiler... " >&6; }
21478 if ${ac_cv_objc_compiler_gnu+:} false; then :
21479   $as_echo_n "(cached) " >&6
21480 else
21481   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21482 /* end confdefs.h.  */
21483 
21484 int
21485 main ()
21486 {
21487 #ifndef __GNUC__
21488        choke me
21489 #endif
21490 
21491   ;
21492   return 0;
21493 }
21494 _ACEOF
21495 if ac_fn_objc_try_compile "$LINENO"; then :
21496   ac_compiler_gnu=yes
21497 else
21498   ac_compiler_gnu=no
21499 fi
21500 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21501 ac_cv_objc_compiler_gnu=$ac_compiler_gnu
21502 
21503 fi
21504 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objc_compiler_gnu" >&5
21505 $as_echo "$ac_cv_objc_compiler_gnu" >&6; }
21506 if test $ac_compiler_gnu = yes; then
21507   GOBJC=yes
21508 else
21509   GOBJC=
21510 fi
21511 ac_test_OBJCFLAGS=${OBJCFLAGS+set}
21512 ac_save_OBJCFLAGS=$OBJCFLAGS
21513 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $OBJC accepts -g" >&5
21514 $as_echo_n "checking whether $OBJC accepts -g... " >&6; }
21515 if ${ac_cv_prog_objc_g+:} false; then :
21516   $as_echo_n "(cached) " >&6
21517 else
21518   ac_save_objc_werror_flag=$ac_objc_werror_flag
21519    ac_objc_werror_flag=yes
21520    ac_cv_prog_objc_g=no
21521    OBJCFLAGS="-g"
21522    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21523 /* end confdefs.h.  */
21524 
21525 int
21526 main ()
21527 {
21528 
21529   ;
21530   return 0;
21531 }
21532 _ACEOF
21533 if ac_fn_objc_try_compile "$LINENO"; then :
21534   ac_cv_prog_objc_g=yes
21535 else
21536   OBJCFLAGS=""
21537       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21538 /* end confdefs.h.  */
21539 
21540 int
21541 main ()
21542 {
21543 
21544   ;
21545   return 0;
21546 }
21547 _ACEOF
21548 if ac_fn_objc_try_compile "$LINENO"; then :
21549 
21550 else
21551   ac_objc_werror_flag=$ac_save_objc_werror_flag
21552          OBJCFLAGS="-g"
21553          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21554 /* end confdefs.h.  */
21555 
21556 int
21557 main ()
21558 {
21559 
21560   ;
21561   return 0;
21562 }
21563 _ACEOF
21564 if ac_fn_objc_try_compile "$LINENO"; then :
21565   ac_cv_prog_objc_g=yes
21566 fi
21567 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21568 fi
21569 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21570 fi
21571 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21572    ac_objc_werror_flag=$ac_save_objc_werror_flag
21573 fi
21574 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_objc_g" >&5
21575 $as_echo "$ac_cv_prog_objc_g" >&6; }
21576 if test "$ac_test_OBJCFLAGS" = set; then
21577   OBJCFLAGS=$ac_save_OBJCFLAGS
21578 elif test $ac_cv_prog_objc_g = yes; then
21579   if test "$GOBJC" = yes; then
21580     OBJCFLAGS="-g -O2"
21581   else
21582     OBJCFLAGS="-g"
21583   fi
21584 else
21585   if test "$GOBJC" = yes; then
21586     OBJCFLAGS="-O2"
21587   else
21588     OBJCFLAGS=
21589   fi
21590 fi
21591 ac_ext=cpp
21592 ac_cpp='$CXXCPP $CPPFLAGS'
21593 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
21594 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
21595 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
21596 
21597 
21598   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21599 
21600   # First separate the path from the arguments. This will split at the first
21601   # space.
21602   complete="$OBJC"
21603   path="${complete%% *}"
21604   tmp="$complete EOL"
21605   arguments="${tmp#* }"
21606 
21607   # Input might be given as Windows format, start by converting to
21608   # unix format.
21609   new_path=`$CYGPATH -u "$path"`
21610 
21611   # Now try to locate executable using which
21612   new_path=`$WHICH "$new_path" 2> /dev/null`
21613   # bat and cmd files are not always considered executable in cygwin causing which
21614   # to not find them
21615   if test "x$new_path" = x \
21616            && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21617            && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21618     new_path=`$CYGPATH -u "$path"`
21619   fi
21620   if test "x$new_path" = x; then
21621     # Oops. Which didn't find the executable.
21622     # The splitting of arguments from the executable at a space might have been incorrect,
21623     # since paths with space are more likely in Windows. Give it another try with the whole
21624     # argument.
21625     path="$complete"
21626     arguments="EOL"
21627     new_path=`$CYGPATH -u "$path"`
21628     new_path=`$WHICH "$new_path" 2> /dev/null`
21629     # bat and cmd files are not always considered executable in cygwin causing which
21630     # to not find them
21631     if test "x$new_path" = x \
21632              && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21633              && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21634       new_path=`$CYGPATH -u "$path"`
21635     fi
21636     if test "x$new_path" = x; then
21637       # It's still not found. Now this is an unrecoverable error.
21638       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
21639 $as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
21640       has_space=`$ECHO "$complete" | $GREP " "`
21641       if test "x$has_space" != x; then
21642         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21643 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21644       fi
21645       as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
21646     fi
21647   fi
21648 
21649   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21650   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21651   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21652   # "foo.exe" is OK but "foo" is an error.
21653   #
21654   # This test is therefore slightly more accurate than "test -f" to check for file precense.
21655   # It is also a way to make sure we got the proper file name for the real test later on.
21656   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21657   if test "x$test_shortpath" = x; then
21658     # Short path failed, file does not exist as specified.
21659     # Try adding .exe or .cmd
21660     if test -f "${new_path}.exe"; then
21661        input_to_shortpath="${new_path}.exe"
21662     elif test -f "${new_path}.cmd"; then
21663        input_to_shortpath="${new_path}.cmd"
21664     else
21665       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$new_path\", is invalid." >&5
21666 $as_echo "$as_me: The path of OBJC, which resolves as \"$new_path\", is invalid." >&6;}
21667       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
21668 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
21669       as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
21670     fi
21671   else
21672     input_to_shortpath="$new_path"
21673   fi
21674 
21675   # Call helper function which possibly converts this using DOS-style short mode.
21676   # If so, the updated path is stored in $new_path.
21677   new_path="$input_to_shortpath"
21678 
21679   input_path="$input_to_shortpath"
21680   # Check if we need to convert this using DOS-style short mode. If the path
21681   # contains just simple characters, use it. Otherwise (spaces, weird characters),
21682   # take no chances and rewrite it.
21683   # Note: m4 eats our [], so we need to use [ and ] instead.
21684   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21685   if test "x$has_forbidden_chars" != x; then
21686     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21687     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21688     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21689     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21690       # Going to short mode and back again did indeed matter. Since short mode is
21691       # case insensitive, let's make it lowercase to improve readability.
21692       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21693       # Now convert it back to Unix-stile (cygpath)
21694       input_path=`$CYGPATH -u "$shortmode_path"`
21695       new_path="$input_path"
21696     fi
21697   fi
21698 
21699   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21700   if test "x$test_cygdrive_prefix" = x; then
21701     # As a simple fix, exclude /usr/bin since it's not a real path.
21702     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
21703       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21704       # a path prefixed by /cygdrive for fixpath to work.
21705       new_path="$CYGWIN_ROOT_PATH$input_path"
21706     fi
21707   fi
21708 
21709   # remove trailing .exe if any
21710   new_path="${new_path/%.exe/}"
21711 
21712   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21713 
21714   # First separate the path from the arguments. This will split at the first
21715   # space.
21716   complete="$OBJC"
21717   path="${complete%% *}"
21718   tmp="$complete EOL"
21719   arguments="${tmp#* }"
21720 
21721   # Input might be given as Windows format, start by converting to
21722   # unix format.
21723   new_path="$path"
21724 
21725   windows_path="$new_path"
21726   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21727     unix_path=`$CYGPATH -u "$windows_path"`
21728     new_path="$unix_path"
21729   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21730     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21731     new_path="$unix_path"
21732   fi
21733 
21734 
21735   # Now try to locate executable using which
21736   new_path=`$WHICH "$new_path" 2> /dev/null`
21737 
21738   if test "x$new_path" = x; then
21739     # Oops. Which didn't find the executable.
21740     # The splitting of arguments from the executable at a space might have been incorrect,
21741     # since paths with space are more likely in Windows. Give it another try with the whole
21742     # argument.
21743     path="$complete"
21744     arguments="EOL"
21745     new_path="$path"
21746 
21747   windows_path="$new_path"
21748   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21749     unix_path=`$CYGPATH -u "$windows_path"`
21750     new_path="$unix_path"
21751   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21752     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21753     new_path="$unix_path"
21754   fi
21755 
21756 
21757     new_path=`$WHICH "$new_path" 2> /dev/null`
21758 
21759     if test "x$new_path" = x; then
21760       # It's still not found. Now this is an unrecoverable error.
21761       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
21762 $as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
21763       has_space=`$ECHO "$complete" | $GREP " "`
21764       if test "x$has_space" != x; then
21765         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21766 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21767       fi
21768       as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
21769     fi
21770   fi
21771 
21772   # Now new_path has a complete unix path to the binary
21773   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
21774     # Keep paths in /bin as-is, but remove trailing .exe if any
21775     new_path="${new_path/%.exe/}"
21776     # Do not save /bin paths to all_fixpath_prefixes!
21777   else
21778     # Not in mixed or Windows style, start by that.
21779     new_path=`cmd //c echo $new_path`
21780 
21781   input_path="$new_path"
21782   # Check if we need to convert this using DOS-style short mode. If the path
21783   # contains just simple characters, use it. Otherwise (spaces, weird characters),
21784   # take no chances and rewrite it.
21785   # Note: m4 eats our [], so we need to use [ and ] instead.
21786   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21787   if test "x$has_forbidden_chars" != x; then
21788     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21789     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21790   fi
21791 
21792     # Output is in $new_path
21793 
21794   windows_path="$new_path"
21795   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21796     unix_path=`$CYGPATH -u "$windows_path"`
21797     new_path="$unix_path"
21798   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21799     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21800     new_path="$unix_path"
21801   fi
21802 
21803     # remove trailing .exe if any
21804     new_path="${new_path/%.exe/}"
21805 
21806     # Save the first 10 bytes of this path to the storage, so fixpath can work.
21807     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21808   fi
21809 
21810   else
21811     # We're on a posix platform. Hooray! :)
21812     # First separate the path from the arguments. This will split at the first
21813     # space.
21814     complete="$OBJC"
21815     path="${complete%% *}"
21816     tmp="$complete EOL"
21817     arguments="${tmp#* }"
21818 
21819     # Cannot rely on the command "which" here since it doesn't always work.
21820     is_absolute_path=`$ECHO "$path" | $GREP ^/`
21821     if test -z "$is_absolute_path"; then
21822       # Path to executable is not absolute. Find it.
21823       IFS_save="$IFS"
21824       IFS=:
21825       for p in $PATH; do
21826         if test -f "$p/$path" && test -x "$p/$path"; then
21827           new_path="$p/$path"
21828           break
21829         fi
21830       done
21831       IFS="$IFS_save"
21832     else
21833       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving OBJC (as $path) failed, using $path directly." >&5
21834 $as_echo "$as_me: Resolving OBJC (as $path) failed, using $path directly." >&6;}
21835       new_path="$path"
21836     fi
21837 
21838     if test "x$new_path" = x; then
21839         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
21840 $as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
21841         has_space=`$ECHO "$complete" | $GREP " "`
21842         if test "x$has_space" != x; then
21843           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
21844 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
21845         fi
21846         as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
21847       fi
21848   fi
21849 
21850       # Now join together the path and the arguments once again
21851       if test "x$arguments" != xEOL; then
21852         new_complete="$new_path ${arguments% *}"
21853       else
21854         new_complete="$new_path"
21855       fi
21856 
21857   if test "x$complete" != "x$new_complete"; then
21858       OBJC="$new_complete"
21859       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJC to \"$new_complete\"" >&5
21860 $as_echo "$as_me: Rewriting OBJC to \"$new_complete\"" >&6;}
21861     fi
21862 
21863 else
21864     OBJC=
21865 fi
21866 
21867 # Restore the flags to the user specified values.
21868 # This is necessary since AC_PROG_CC defaults CFLAGS to "-g -O2"
21869 CFLAGS="$ORG_CFLAGS"
21870 CXXFLAGS="$ORG_CXXFLAGS"
21871 OBJCFLAGS="$ORG_OBJCFLAGS"
21872 
21873 LD="$CC"
21874 LDEXE="$CC"
21875 LDCXX="$CXX"
21876 LDEXECXX="$CXX"
21877 
21878 # LDEXE is the linker to use, when creating executables.
21879 
21880 # Linking C++ libraries.
21881 
21882 # Linking C++ executables.
21883 
21884 
21885 if test "x$OPENJDK_TARGET_OS" != xwindows; then
21886     if test -n "$ac_tool_prefix"; then
21887   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
21888 set dummy ${ac_tool_prefix}ar; ac_word=$2
21889 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21890 $as_echo_n "checking for $ac_word... " >&6; }
21891 if ${ac_cv_prog_AR+:} false; then :
21892   $as_echo_n "(cached) " >&6
21893 else
21894   if test -n "$AR"; then
21895   ac_cv_prog_AR="$AR" # Let the user override the test.
21896 else
21897 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21898 for as_dir in $PATH
21899 do
21900   IFS=$as_save_IFS
21901   test -z "$as_dir" && as_dir=.
21902     for ac_exec_ext in '' $ac_executable_extensions; do
21903   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
21904     ac_cv_prog_AR="${ac_tool_prefix}ar"
21905     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21906     break 2
21907   fi
21908 done
21909   done
21910 IFS=$as_save_IFS
21911 
21912 fi
21913 fi
21914 AR=$ac_cv_prog_AR
21915 if test -n "$AR"; then
21916   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
21917 $as_echo "$AR" >&6; }
21918 else
21919   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21920 $as_echo "no" >&6; }
21921 fi
21922 
21923 
21924 fi
21925 if test -z "$ac_cv_prog_AR"; then
21926   ac_ct_AR=$AR
21927   # Extract the first word of "ar", so it can be a program name with args.
21928 set dummy ar; ac_word=$2
21929 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21930 $as_echo_n "checking for $ac_word... " >&6; }
21931 if ${ac_cv_prog_ac_ct_AR+:} false; then :
21932   $as_echo_n "(cached) " >&6
21933 else
21934   if test -n "$ac_ct_AR"; then
21935   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
21936 else
21937 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21938 for as_dir in $PATH
21939 do
21940   IFS=$as_save_IFS
21941   test -z "$as_dir" && as_dir=.
21942     for ac_exec_ext in '' $ac_executable_extensions; do
21943   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
21944     ac_cv_prog_ac_ct_AR="ar"
21945     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21946     break 2
21947   fi
21948 done
21949   done
21950 IFS=$as_save_IFS
21951 
21952 fi
21953 fi
21954 ac_ct_AR=$ac_cv_prog_ac_ct_AR
21955 if test -n "$ac_ct_AR"; then
21956   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
21957 $as_echo "$ac_ct_AR" >&6; }
21958 else
21959   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21960 $as_echo "no" >&6; }
21961 fi
21962 
21963   if test "x$ac_ct_AR" = x; then
21964     AR=""
21965   else
21966     case $cross_compiling:$ac_tool_warned in
21967 yes:)
21968 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
21969 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
21970 ac_tool_warned=yes ;;
21971 esac
21972     AR=$ac_ct_AR
21973   fi
21974 else
21975   AR="$ac_cv_prog_AR"
21976 fi
21977 
21978 
21979   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21980 
21981   # First separate the path from the arguments. This will split at the first
21982   # space.
21983   complete="$AR"
21984   path="${complete%% *}"
21985   tmp="$complete EOL"
21986   arguments="${tmp#* }"
21987 
21988   # Input might be given as Windows format, start by converting to
21989   # unix format.
21990   new_path=`$CYGPATH -u "$path"`
21991 
21992   # Now try to locate executable using which
21993   new_path=`$WHICH "$new_path" 2> /dev/null`
21994   # bat and cmd files are not always considered executable in cygwin causing which
21995   # to not find them
21996   if test "x$new_path" = x \
21997            && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21998            && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21999     new_path=`$CYGPATH -u "$path"`
22000   fi
22001   if test "x$new_path" = x; then
22002     # Oops. Which didn't find the executable.
22003     # The splitting of arguments from the executable at a space might have been incorrect,
22004     # since paths with space are more likely in Windows. Give it another try with the whole
22005     # argument.
22006     path="$complete"
22007     arguments="EOL"
22008     new_path=`$CYGPATH -u "$path"`
22009     new_path=`$WHICH "$new_path" 2> /dev/null`
22010     # bat and cmd files are not always considered executable in cygwin causing which
22011     # to not find them
22012     if test "x$new_path" = x \
22013              && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22014              && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22015       new_path=`$CYGPATH -u "$path"`
22016     fi
22017     if test "x$new_path" = x; then
22018       # It's still not found. Now this is an unrecoverable error.
22019       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
22020 $as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
22021       has_space=`$ECHO "$complete" | $GREP " "`
22022       if test "x$has_space" != x; then
22023         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22024 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22025       fi
22026       as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
22027     fi
22028   fi
22029 
22030   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22031   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22032   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22033   # "foo.exe" is OK but "foo" is an error.
22034   #
22035   # This test is therefore slightly more accurate than "test -f" to check for file precense.
22036   # It is also a way to make sure we got the proper file name for the real test later on.
22037   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22038   if test "x$test_shortpath" = x; then
22039     # Short path failed, file does not exist as specified.
22040     # Try adding .exe or .cmd
22041     if test -f "${new_path}.exe"; then
22042        input_to_shortpath="${new_path}.exe"
22043     elif test -f "${new_path}.cmd"; then
22044        input_to_shortpath="${new_path}.cmd"
22045     else
22046       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$new_path\", is invalid." >&5
22047 $as_echo "$as_me: The path of AR, which resolves as \"$new_path\", is invalid." >&6;}
22048       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
22049 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
22050       as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
22051     fi
22052   else
22053     input_to_shortpath="$new_path"
22054   fi
22055 
22056   # Call helper function which possibly converts this using DOS-style short mode.
22057   # If so, the updated path is stored in $new_path.
22058   new_path="$input_to_shortpath"
22059 
22060   input_path="$input_to_shortpath"
22061   # Check if we need to convert this using DOS-style short mode. If the path
22062   # contains just simple characters, use it. Otherwise (spaces, weird characters),
22063   # take no chances and rewrite it.
22064   # Note: m4 eats our [], so we need to use [ and ] instead.
22065   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22066   if test "x$has_forbidden_chars" != x; then
22067     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22068     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22069     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22070     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22071       # Going to short mode and back again did indeed matter. Since short mode is
22072       # case insensitive, let's make it lowercase to improve readability.
22073       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22074       # Now convert it back to Unix-stile (cygpath)
22075       input_path=`$CYGPATH -u "$shortmode_path"`
22076       new_path="$input_path"
22077     fi
22078   fi
22079 
22080   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22081   if test "x$test_cygdrive_prefix" = x; then
22082     # As a simple fix, exclude /usr/bin since it's not a real path.
22083     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
22084       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22085       # a path prefixed by /cygdrive for fixpath to work.
22086       new_path="$CYGWIN_ROOT_PATH$input_path"
22087     fi
22088   fi
22089 
22090   # remove trailing .exe if any
22091   new_path="${new_path/%.exe/}"
22092 
22093   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22094 
22095   # First separate the path from the arguments. This will split at the first
22096   # space.
22097   complete="$AR"
22098   path="${complete%% *}"
22099   tmp="$complete EOL"
22100   arguments="${tmp#* }"
22101 
22102   # Input might be given as Windows format, start by converting to
22103   # unix format.
22104   new_path="$path"
22105 
22106   windows_path="$new_path"
22107   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22108     unix_path=`$CYGPATH -u "$windows_path"`
22109     new_path="$unix_path"
22110   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22111     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22112     new_path="$unix_path"
22113   fi
22114 
22115 
22116   # Now try to locate executable using which
22117   new_path=`$WHICH "$new_path" 2> /dev/null`
22118 
22119   if test "x$new_path" = x; then
22120     # Oops. Which didn't find the executable.
22121     # The splitting of arguments from the executable at a space might have been incorrect,
22122     # since paths with space are more likely in Windows. Give it another try with the whole
22123     # argument.
22124     path="$complete"
22125     arguments="EOL"
22126     new_path="$path"
22127 
22128   windows_path="$new_path"
22129   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22130     unix_path=`$CYGPATH -u "$windows_path"`
22131     new_path="$unix_path"
22132   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22133     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22134     new_path="$unix_path"
22135   fi
22136 
22137 
22138     new_path=`$WHICH "$new_path" 2> /dev/null`
22139 
22140     if test "x$new_path" = x; then
22141       # It's still not found. Now this is an unrecoverable error.
22142       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
22143 $as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
22144       has_space=`$ECHO "$complete" | $GREP " "`
22145       if test "x$has_space" != x; then
22146         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22147 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22148       fi
22149       as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
22150     fi
22151   fi
22152 
22153   # Now new_path has a complete unix path to the binary
22154   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
22155     # Keep paths in /bin as-is, but remove trailing .exe if any
22156     new_path="${new_path/%.exe/}"
22157     # Do not save /bin paths to all_fixpath_prefixes!
22158   else
22159     # Not in mixed or Windows style, start by that.
22160     new_path=`cmd //c echo $new_path`
22161 
22162   input_path="$new_path"
22163   # Check if we need to convert this using DOS-style short mode. If the path
22164   # contains just simple characters, use it. Otherwise (spaces, weird characters),
22165   # take no chances and rewrite it.
22166   # Note: m4 eats our [], so we need to use [ and ] instead.
22167   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22168   if test "x$has_forbidden_chars" != x; then
22169     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22170     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22171   fi
22172 
22173     # Output is in $new_path
22174 
22175   windows_path="$new_path"
22176   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22177     unix_path=`$CYGPATH -u "$windows_path"`
22178     new_path="$unix_path"
22179   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22180     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22181     new_path="$unix_path"
22182   fi
22183 
22184     # remove trailing .exe if any
22185     new_path="${new_path/%.exe/}"
22186 
22187     # Save the first 10 bytes of this path to the storage, so fixpath can work.
22188     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22189   fi
22190 
22191   else
22192     # We're on a posix platform. Hooray! :)
22193     # First separate the path from the arguments. This will split at the first
22194     # space.
22195     complete="$AR"
22196     path="${complete%% *}"
22197     tmp="$complete EOL"
22198     arguments="${tmp#* }"
22199 
22200     # Cannot rely on the command "which" here since it doesn't always work.
22201     is_absolute_path=`$ECHO "$path" | $GREP ^/`
22202     if test -z "$is_absolute_path"; then
22203       # Path to executable is not absolute. Find it.
22204       IFS_save="$IFS"
22205       IFS=:
22206       for p in $PATH; do
22207         if test -f "$p/$path" && test -x "$p/$path"; then
22208           new_path="$p/$path"
22209           break
22210         fi
22211       done
22212       IFS="$IFS_save"
22213     else
22214       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving AR (as $path) failed, using $path directly." >&5
22215 $as_echo "$as_me: Resolving AR (as $path) failed, using $path directly." >&6;}
22216       new_path="$path"
22217     fi
22218 
22219     if test "x$new_path" = x; then
22220         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
22221 $as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
22222         has_space=`$ECHO "$complete" | $GREP " "`
22223         if test "x$has_space" != x; then
22224           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
22225 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
22226         fi
22227         as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
22228       fi
22229   fi
22230 
22231       # Now join together the path and the arguments once again
22232       if test "x$arguments" != xEOL; then
22233         new_complete="$new_path ${arguments% *}"
22234       else
22235         new_complete="$new_path"
22236       fi
22237 
22238   if test "x$complete" != "x$new_complete"; then
22239       AR="$new_complete"
22240       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AR to \"$new_complete\"" >&5
22241 $as_echo "$as_me: Rewriting AR to \"$new_complete\"" >&6;}
22242     fi
22243 
22244 fi
22245 if test "x$OPENJDK_TARGET_OS" = xmacosx; then
22246     ARFLAGS="-r"
22247 else
22248     ARFLAGS=""
22249 fi
22250 
22251 
22252 # For hotspot, we need these in Windows mixed path; other platforms keep them the same
22253 HOTSPOT_CXX="$CXX"
22254 HOTSPOT_LD="$LD"
22255 
22256 
22257 
22258 COMPILER_NAME=gcc
22259 COMPILER_TYPE=CC
22260 if test "x$OPENJDK_TARGET_OS" = xwindows; then :
22261 
22262     # For now, assume that we are always compiling using cl.exe.
22263     CC_OUT_OPTION=-Fo
22264     EXE_OUT_OPTION=-out:
22265     LD_OUT_OPTION=-out:
22266     AR_OUT_OPTION=-out:
22267     # On Windows, reject /usr/bin/link (as determined in CYGWIN_LINK), which is a cygwin
22268     # program for something completely different.
22269     # Extract the first word of "link", so it can be a program name with args.
22270 set dummy link; ac_word=$2
22271 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22272 $as_echo_n "checking for $ac_word... " >&6; }
22273 if ${ac_cv_prog_WINLD+:} false; then :
22274   $as_echo_n "(cached) " >&6
22275 else
22276   if test -n "$WINLD"; then
22277   ac_cv_prog_WINLD="$WINLD" # Let the user override the test.
22278 else
22279   ac_prog_rejected=no
22280 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22281 for as_dir in $PATH
22282 do
22283   IFS=$as_save_IFS
22284   test -z "$as_dir" && as_dir=.
22285     for ac_exec_ext in '' $ac_executable_extensions; do
22286   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
22287     if test "$as_dir/$ac_word$ac_exec_ext" = "$CYGWIN_LINK"; then
22288        ac_prog_rejected=yes
22289        continue
22290      fi
22291     ac_cv_prog_WINLD="link"
22292     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22293     break 2
22294   fi
22295 done
22296   done
22297 IFS=$as_save_IFS
22298 
22299 if test $ac_prog_rejected = yes; then
22300   # We found a bogon in the path, so make sure we never use it.
22301   set dummy $ac_cv_prog_WINLD
22302   shift
22303   if test $# != 0; then
22304     # We chose a different compiler from the bogus one.
22305     # However, it has the same basename, so the bogon will be chosen
22306     # first if we set WINLD to just the basename; use the full file name.
22307     shift
22308     ac_cv_prog_WINLD="$as_dir/$ac_word${1+' '}$@"
22309   fi
22310 fi
22311 fi
22312 fi
22313 WINLD=$ac_cv_prog_WINLD
22314 if test -n "$WINLD"; then
22315   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINLD" >&5
22316 $as_echo "$WINLD" >&6; }
22317 else
22318   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22319 $as_echo "no" >&6; }
22320 fi
22321 
22322 
22323     # Since we must ignore the first found link, WINLD will contain
22324     # the full path to the link.exe program.
22325 
22326   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22327 
22328   # First separate the path from the arguments. This will split at the first
22329   # space.
22330   complete="$WINLD"
22331   path="${complete%% *}"
22332   tmp="$complete EOL"
22333   arguments="${tmp#* }"
22334 
22335   # Input might be given as Windows format, start by converting to
22336   # unix format.
22337   new_path=`$CYGPATH -u "$path"`
22338 
22339   # Now try to locate executable using which
22340   new_path=`$WHICH "$new_path" 2> /dev/null`
22341   # bat and cmd files are not always considered executable in cygwin causing which
22342   # to not find them
22343   if test "x$new_path" = x \
22344            && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22345            && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22346     new_path=`$CYGPATH -u "$path"`
22347   fi
22348   if test "x$new_path" = x; then
22349     # Oops. Which didn't find the executable.
22350     # The splitting of arguments from the executable at a space might have been incorrect,
22351     # since paths with space are more likely in Windows. Give it another try with the whole
22352     # argument.
22353     path="$complete"
22354     arguments="EOL"
22355     new_path=`$CYGPATH -u "$path"`
22356     new_path=`$WHICH "$new_path" 2> /dev/null`
22357     # bat and cmd files are not always considered executable in cygwin causing which
22358     # to not find them
22359     if test "x$new_path" = x \
22360              && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22361              && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22362       new_path=`$CYGPATH -u "$path"`
22363     fi
22364     if test "x$new_path" = x; then
22365       # It's still not found. Now this is an unrecoverable error.
22366       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$complete\", is not found." >&5
22367 $as_echo "$as_me: The path of WINLD, which resolves as \"$complete\", is not found." >&6;}
22368       has_space=`$ECHO "$complete" | $GREP " "`
22369       if test "x$has_space" != x; then
22370         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22371 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22372       fi
22373       as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
22374     fi
22375   fi
22376 
22377   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22378   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22379   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22380   # "foo.exe" is OK but "foo" is an error.
22381   #
22382   # This test is therefore slightly more accurate than "test -f" to check for file precense.
22383   # It is also a way to make sure we got the proper file name for the real test later on.
22384   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22385   if test "x$test_shortpath" = x; then
22386     # Short path failed, file does not exist as specified.
22387     # Try adding .exe or .cmd
22388     if test -f "${new_path}.exe"; then
22389        input_to_shortpath="${new_path}.exe"
22390     elif test -f "${new_path}.cmd"; then
22391        input_to_shortpath="${new_path}.cmd"
22392     else
22393       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$new_path\", is invalid." >&5
22394 $as_echo "$as_me: The path of WINLD, which resolves as \"$new_path\", is invalid." >&6;}
22395       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
22396 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
22397       as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
22398     fi
22399   else
22400     input_to_shortpath="$new_path"
22401   fi
22402 
22403   # Call helper function which possibly converts this using DOS-style short mode.
22404   # If so, the updated path is stored in $new_path.
22405   new_path="$input_to_shortpath"
22406 
22407   input_path="$input_to_shortpath"
22408   # Check if we need to convert this using DOS-style short mode. If the path
22409   # contains just simple characters, use it. Otherwise (spaces, weird characters),
22410   # take no chances and rewrite it.
22411   # Note: m4 eats our [], so we need to use [ and ] instead.
22412   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22413   if test "x$has_forbidden_chars" != x; then
22414     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22415     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22416     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22417     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22418       # Going to short mode and back again did indeed matter. Since short mode is
22419       # case insensitive, let's make it lowercase to improve readability.
22420       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22421       # Now convert it back to Unix-stile (cygpath)
22422       input_path=`$CYGPATH -u "$shortmode_path"`
22423       new_path="$input_path"
22424     fi
22425   fi
22426 
22427   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22428   if test "x$test_cygdrive_prefix" = x; then
22429     # As a simple fix, exclude /usr/bin since it's not a real path.
22430     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
22431       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22432       # a path prefixed by /cygdrive for fixpath to work.
22433       new_path="$CYGWIN_ROOT_PATH$input_path"
22434     fi
22435   fi
22436 
22437   # remove trailing .exe if any
22438   new_path="${new_path/%.exe/}"
22439 
22440   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22441 
22442   # First separate the path from the arguments. This will split at the first
22443   # space.
22444   complete="$WINLD"
22445   path="${complete%% *}"
22446   tmp="$complete EOL"
22447   arguments="${tmp#* }"
22448 
22449   # Input might be given as Windows format, start by converting to
22450   # unix format.
22451   new_path="$path"
22452 
22453   windows_path="$new_path"
22454   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22455     unix_path=`$CYGPATH -u "$windows_path"`
22456     new_path="$unix_path"
22457   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22458     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22459     new_path="$unix_path"
22460   fi
22461 
22462 
22463   # Now try to locate executable using which
22464   new_path=`$WHICH "$new_path" 2> /dev/null`
22465 
22466   if test "x$new_path" = x; then
22467     # Oops. Which didn't find the executable.
22468     # The splitting of arguments from the executable at a space might have been incorrect,
22469     # since paths with space are more likely in Windows. Give it another try with the whole
22470     # argument.
22471     path="$complete"
22472     arguments="EOL"
22473     new_path="$path"
22474 
22475   windows_path="$new_path"
22476   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22477     unix_path=`$CYGPATH -u "$windows_path"`
22478     new_path="$unix_path"
22479   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22480     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22481     new_path="$unix_path"
22482   fi
22483 
22484 
22485     new_path=`$WHICH "$new_path" 2> /dev/null`
22486 
22487     if test "x$new_path" = x; then
22488       # It's still not found. Now this is an unrecoverable error.
22489       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$complete\", is not found." >&5
22490 $as_echo "$as_me: The path of WINLD, which resolves as \"$complete\", is not found." >&6;}
22491       has_space=`$ECHO "$complete" | $GREP " "`
22492       if test "x$has_space" != x; then
22493         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22494 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22495       fi
22496       as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
22497     fi
22498   fi
22499 
22500   # Now new_path has a complete unix path to the binary
22501   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
22502     # Keep paths in /bin as-is, but remove trailing .exe if any
22503     new_path="${new_path/%.exe/}"
22504     # Do not save /bin paths to all_fixpath_prefixes!
22505   else
22506     # Not in mixed or Windows style, start by that.
22507     new_path=`cmd //c echo $new_path`
22508 
22509   input_path="$new_path"
22510   # Check if we need to convert this using DOS-style short mode. If the path
22511   # contains just simple characters, use it. Otherwise (spaces, weird characters),
22512   # take no chances and rewrite it.
22513   # Note: m4 eats our [], so we need to use [ and ] instead.
22514   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22515   if test "x$has_forbidden_chars" != x; then
22516     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22517     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22518   fi
22519 
22520     # Output is in $new_path
22521 
22522   windows_path="$new_path"
22523   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22524     unix_path=`$CYGPATH -u "$windows_path"`
22525     new_path="$unix_path"
22526   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22527     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22528     new_path="$unix_path"
22529   fi
22530 
22531     # remove trailing .exe if any
22532     new_path="${new_path/%.exe/}"
22533 
22534     # Save the first 10 bytes of this path to the storage, so fixpath can work.
22535     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22536   fi
22537 
22538   else
22539     # We're on a posix platform. Hooray! :)
22540     # First separate the path from the arguments. This will split at the first
22541     # space.
22542     complete="$WINLD"
22543     path="${complete%% *}"
22544     tmp="$complete EOL"
22545     arguments="${tmp#* }"
22546 
22547     # Cannot rely on the command "which" here since it doesn't always work.
22548     is_absolute_path=`$ECHO "$path" | $GREP ^/`
22549     if test -z "$is_absolute_path"; then
22550       # Path to executable is not absolute. Find it.
22551       IFS_save="$IFS"
22552       IFS=:
22553       for p in $PATH; do
22554         if test -f "$p/$path" && test -x "$p/$path"; then
22555           new_path="$p/$path"
22556           break
22557         fi
22558       done
22559       IFS="$IFS_save"
22560     else
22561       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving WINLD (as $path) failed, using $path directly." >&5
22562 $as_echo "$as_me: Resolving WINLD (as $path) failed, using $path directly." >&6;}
22563       new_path="$path"
22564     fi
22565 
22566     if test "x$new_path" = x; then
22567         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$complete\", is not found." >&5
22568 $as_echo "$as_me: The path of WINLD, which resolves as \"$complete\", is not found." >&6;}
22569         has_space=`$ECHO "$complete" | $GREP " "`
22570         if test "x$has_space" != x; then
22571           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
22572 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
22573         fi
22574         as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
22575       fi
22576   fi
22577 
22578       # Now join together the path and the arguments once again
22579       if test "x$arguments" != xEOL; then
22580         new_complete="$new_path ${arguments% *}"
22581       else
22582         new_complete="$new_path"
22583       fi
22584 
22585   if test "x$complete" != "x$new_complete"; then
22586       WINLD="$new_complete"
22587       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting WINLD to \"$new_complete\"" >&5
22588 $as_echo "$as_me: Rewriting WINLD to \"$new_complete\"" >&6;}
22589     fi
22590 
22591     printf "Windows linker was found at $WINLD\n"
22592     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the found link.exe is actually the Visual Studio linker" >&5
22593 $as_echo_n "checking if the found link.exe is actually the Visual Studio linker... " >&6; }
22594     "$WINLD" --version > /dev/null
22595     if test $? -eq 0 ; then
22596       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22597 $as_echo "no" >&6; }
22598       as_fn_error $? "This is the Cygwin link tool. Please check your PATH and rerun configure." "$LINENO" 5
22599     else
22600       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
22601 $as_echo "yes" >&6; }
22602     fi
22603     LD="$WINLD"
22604     LDEXE="$WINLD"
22605     LDCXX="$WINLD"
22606     LDEXECXX="$WINLD"
22607 
22608     # Extract the first word of "mt", so it can be a program name with args.
22609 set dummy mt; ac_word=$2
22610 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22611 $as_echo_n "checking for $ac_word... " >&6; }
22612 if ${ac_cv_prog_MT+:} false; then :
22613   $as_echo_n "(cached) " >&6
22614 else
22615   if test -n "$MT"; then
22616   ac_cv_prog_MT="$MT" # Let the user override the test.
22617 else
22618   ac_prog_rejected=no
22619 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22620 for as_dir in $PATH
22621 do
22622   IFS=$as_save_IFS
22623   test -z "$as_dir" && as_dir=.
22624     for ac_exec_ext in '' $ac_executable_extensions; do
22625   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
22626     if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/mt"; then
22627        ac_prog_rejected=yes
22628        continue
22629      fi
22630     ac_cv_prog_MT="mt"
22631     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22632     break 2
22633   fi
22634 done
22635   done
22636 IFS=$as_save_IFS
22637 
22638 if test $ac_prog_rejected = yes; then
22639   # We found a bogon in the path, so make sure we never use it.
22640   set dummy $ac_cv_prog_MT
22641   shift
22642   if test $# != 0; then
22643     # We chose a different compiler from the bogus one.
22644     # However, it has the same basename, so the bogon will be chosen
22645     # first if we set MT to just the basename; use the full file name.
22646     shift
22647     ac_cv_prog_MT="$as_dir/$ac_word${1+' '}$@"
22648   fi
22649 fi
22650 fi
22651 fi
22652 MT=$ac_cv_prog_MT
22653 if test -n "$MT"; then
22654   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MT" >&5
22655 $as_echo "$MT" >&6; }
22656 else
22657   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22658 $as_echo "no" >&6; }
22659 fi
22660 
22661 
22662 
22663   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22664 
22665   # First separate the path from the arguments. This will split at the first
22666   # space.
22667   complete="$MT"
22668   path="${complete%% *}"
22669   tmp="$complete EOL"
22670   arguments="${tmp#* }"
22671 
22672   # Input might be given as Windows format, start by converting to
22673   # unix format.
22674   new_path=`$CYGPATH -u "$path"`
22675 
22676   # Now try to locate executable using which
22677   new_path=`$WHICH "$new_path" 2> /dev/null`
22678   # bat and cmd files are not always considered executable in cygwin causing which
22679   # to not find them
22680   if test "x$new_path" = x \
22681            && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22682            && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22683     new_path=`$CYGPATH -u "$path"`
22684   fi
22685   if test "x$new_path" = x; then
22686     # Oops. Which didn't find the executable.
22687     # The splitting of arguments from the executable at a space might have been incorrect,
22688     # since paths with space are more likely in Windows. Give it another try with the whole
22689     # argument.
22690     path="$complete"
22691     arguments="EOL"
22692     new_path=`$CYGPATH -u "$path"`
22693     new_path=`$WHICH "$new_path" 2> /dev/null`
22694     # bat and cmd files are not always considered executable in cygwin causing which
22695     # to not find them
22696     if test "x$new_path" = x \
22697              && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22698              && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22699       new_path=`$CYGPATH -u "$path"`
22700     fi
22701     if test "x$new_path" = x; then
22702       # It's still not found. Now this is an unrecoverable error.
22703       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
22704 $as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
22705       has_space=`$ECHO "$complete" | $GREP " "`
22706       if test "x$has_space" != x; then
22707         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22708 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22709       fi
22710       as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
22711     fi
22712   fi
22713 
22714   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22715   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22716   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22717   # "foo.exe" is OK but "foo" is an error.
22718   #
22719   # This test is therefore slightly more accurate than "test -f" to check for file precense.
22720   # It is also a way to make sure we got the proper file name for the real test later on.
22721   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22722   if test "x$test_shortpath" = x; then
22723     # Short path failed, file does not exist as specified.
22724     # Try adding .exe or .cmd
22725     if test -f "${new_path}.exe"; then
22726        input_to_shortpath="${new_path}.exe"
22727     elif test -f "${new_path}.cmd"; then
22728        input_to_shortpath="${new_path}.cmd"
22729     else
22730       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$new_path\", is invalid." >&5
22731 $as_echo "$as_me: The path of MT, which resolves as \"$new_path\", is invalid." >&6;}
22732       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
22733 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
22734       as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
22735     fi
22736   else
22737     input_to_shortpath="$new_path"
22738   fi
22739 
22740   # Call helper function which possibly converts this using DOS-style short mode.
22741   # If so, the updated path is stored in $new_path.
22742   new_path="$input_to_shortpath"
22743 
22744   input_path="$input_to_shortpath"
22745   # Check if we need to convert this using DOS-style short mode. If the path
22746   # contains just simple characters, use it. Otherwise (spaces, weird characters),
22747   # take no chances and rewrite it.
22748   # Note: m4 eats our [], so we need to use [ and ] instead.
22749   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22750   if test "x$has_forbidden_chars" != x; then
22751     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22752     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22753     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22754     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22755       # Going to short mode and back again did indeed matter. Since short mode is
22756       # case insensitive, let's make it lowercase to improve readability.
22757       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22758       # Now convert it back to Unix-stile (cygpath)
22759       input_path=`$CYGPATH -u "$shortmode_path"`
22760       new_path="$input_path"
22761     fi
22762   fi
22763 
22764   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22765   if test "x$test_cygdrive_prefix" = x; then
22766     # As a simple fix, exclude /usr/bin since it's not a real path.
22767     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
22768       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22769       # a path prefixed by /cygdrive for fixpath to work.
22770       new_path="$CYGWIN_ROOT_PATH$input_path"
22771     fi
22772   fi
22773 
22774   # remove trailing .exe if any
22775   new_path="${new_path/%.exe/}"
22776 
22777   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22778 
22779   # First separate the path from the arguments. This will split at the first
22780   # space.
22781   complete="$MT"
22782   path="${complete%% *}"
22783   tmp="$complete EOL"
22784   arguments="${tmp#* }"
22785 
22786   # Input might be given as Windows format, start by converting to
22787   # unix format.
22788   new_path="$path"
22789 
22790   windows_path="$new_path"
22791   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22792     unix_path=`$CYGPATH -u "$windows_path"`
22793     new_path="$unix_path"
22794   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22795     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22796     new_path="$unix_path"
22797   fi
22798 
22799 
22800   # Now try to locate executable using which
22801   new_path=`$WHICH "$new_path" 2> /dev/null`
22802 
22803   if test "x$new_path" = x; then
22804     # Oops. Which didn't find the executable.
22805     # The splitting of arguments from the executable at a space might have been incorrect,
22806     # since paths with space are more likely in Windows. Give it another try with the whole
22807     # argument.
22808     path="$complete"
22809     arguments="EOL"
22810     new_path="$path"
22811 
22812   windows_path="$new_path"
22813   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22814     unix_path=`$CYGPATH -u "$windows_path"`
22815     new_path="$unix_path"
22816   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22817     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22818     new_path="$unix_path"
22819   fi
22820 
22821 
22822     new_path=`$WHICH "$new_path" 2> /dev/null`
22823 
22824     if test "x$new_path" = x; then
22825       # It's still not found. Now this is an unrecoverable error.
22826       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
22827 $as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
22828       has_space=`$ECHO "$complete" | $GREP " "`
22829       if test "x$has_space" != x; then
22830         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22831 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22832       fi
22833       as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
22834     fi
22835   fi
22836 
22837   # Now new_path has a complete unix path to the binary
22838   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
22839     # Keep paths in /bin as-is, but remove trailing .exe if any
22840     new_path="${new_path/%.exe/}"
22841     # Do not save /bin paths to all_fixpath_prefixes!
22842   else
22843     # Not in mixed or Windows style, start by that.
22844     new_path=`cmd //c echo $new_path`
22845 
22846   input_path="$new_path"
22847   # Check if we need to convert this using DOS-style short mode. If the path
22848   # contains just simple characters, use it. Otherwise (spaces, weird characters),
22849   # take no chances and rewrite it.
22850   # Note: m4 eats our [], so we need to use [ and ] instead.
22851   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22852   if test "x$has_forbidden_chars" != x; then
22853     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22854     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22855   fi
22856 
22857     # Output is in $new_path
22858 
22859   windows_path="$new_path"
22860   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22861     unix_path=`$CYGPATH -u "$windows_path"`
22862     new_path="$unix_path"
22863   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22864     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22865     new_path="$unix_path"
22866   fi
22867 
22868     # remove trailing .exe if any
22869     new_path="${new_path/%.exe/}"
22870 
22871     # Save the first 10 bytes of this path to the storage, so fixpath can work.
22872     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22873   fi
22874 
22875   else
22876     # We're on a posix platform. Hooray! :)
22877     # First separate the path from the arguments. This will split at the first
22878     # space.
22879     complete="$MT"
22880     path="${complete%% *}"
22881     tmp="$complete EOL"
22882     arguments="${tmp#* }"
22883 
22884     # Cannot rely on the command "which" here since it doesn't always work.
22885     is_absolute_path=`$ECHO "$path" | $GREP ^/`
22886     if test -z "$is_absolute_path"; then
22887       # Path to executable is not absolute. Find it.
22888       IFS_save="$IFS"
22889       IFS=:
22890       for p in $PATH; do
22891         if test -f "$p/$path" && test -x "$p/$path"; then
22892           new_path="$p/$path"
22893           break
22894         fi
22895       done
22896       IFS="$IFS_save"
22897     else
22898       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving MT (as $path) failed, using $path directly." >&5
22899 $as_echo "$as_me: Resolving MT (as $path) failed, using $path directly." >&6;}
22900       new_path="$path"
22901     fi
22902 
22903     if test "x$new_path" = x; then
22904         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
22905 $as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
22906         has_space=`$ECHO "$complete" | $GREP " "`
22907         if test "x$has_space" != x; then
22908           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
22909 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
22910         fi
22911         as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
22912       fi
22913   fi
22914 
22915       # Now join together the path and the arguments once again
22916       if test "x$arguments" != xEOL; then
22917         new_complete="$new_path ${arguments% *}"
22918       else
22919         new_complete="$new_path"
22920       fi
22921 
22922   if test "x$complete" != "x$new_complete"; then
22923       MT="$new_complete"
22924       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MT to \"$new_complete\"" >&5
22925 $as_echo "$as_me: Rewriting MT to \"$new_complete\"" >&6;}
22926     fi
22927 
22928     # The resource compiler
22929     # Extract the first word of "rc", so it can be a program name with args.
22930 set dummy rc; ac_word=$2
22931 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22932 $as_echo_n "checking for $ac_word... " >&6; }
22933 if ${ac_cv_prog_RC+:} false; then :
22934   $as_echo_n "(cached) " >&6
22935 else
22936   if test -n "$RC"; then
22937   ac_cv_prog_RC="$RC" # Let the user override the test.
22938 else
22939   ac_prog_rejected=no
22940 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22941 for as_dir in $PATH
22942 do
22943   IFS=$as_save_IFS
22944   test -z "$as_dir" && as_dir=.
22945     for ac_exec_ext in '' $ac_executable_extensions; do
22946   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
22947     if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/rc"; then
22948        ac_prog_rejected=yes
22949        continue
22950      fi
22951     ac_cv_prog_RC="rc"
22952     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22953     break 2
22954   fi
22955 done
22956   done
22957 IFS=$as_save_IFS
22958 
22959 if test $ac_prog_rejected = yes; then
22960   # We found a bogon in the path, so make sure we never use it.
22961   set dummy $ac_cv_prog_RC
22962   shift
22963   if test $# != 0; then
22964     # We chose a different compiler from the bogus one.
22965     # However, it has the same basename, so the bogon will be chosen
22966     # first if we set RC to just the basename; use the full file name.
22967     shift
22968     ac_cv_prog_RC="$as_dir/$ac_word${1+' '}$@"
22969   fi
22970 fi
22971 fi
22972 fi
22973 RC=$ac_cv_prog_RC
22974 if test -n "$RC"; then
22975   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RC" >&5
22976 $as_echo "$RC" >&6; }
22977 else
22978   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22979 $as_echo "no" >&6; }
22980 fi
22981 
22982 
22983 
22984   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22985 
22986   # First separate the path from the arguments. This will split at the first
22987   # space.
22988   complete="$RC"
22989   path="${complete%% *}"
22990   tmp="$complete EOL"
22991   arguments="${tmp#* }"
22992 
22993   # Input might be given as Windows format, start by converting to
22994   # unix format.
22995   new_path=`$CYGPATH -u "$path"`
22996 
22997   # Now try to locate executable using which
22998   new_path=`$WHICH "$new_path" 2> /dev/null`
22999   # bat and cmd files are not always considered executable in cygwin causing which
23000   # to not find them
23001   if test "x$new_path" = x \
23002            && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23003            && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23004     new_path=`$CYGPATH -u "$path"`
23005   fi
23006   if test "x$new_path" = x; then
23007     # Oops. Which didn't find the executable.
23008     # The splitting of arguments from the executable at a space might have been incorrect,
23009     # since paths with space are more likely in Windows. Give it another try with the whole
23010     # argument.
23011     path="$complete"
23012     arguments="EOL"
23013     new_path=`$CYGPATH -u "$path"`
23014     new_path=`$WHICH "$new_path" 2> /dev/null`
23015     # bat and cmd files are not always considered executable in cygwin causing which
23016     # to not find them
23017     if test "x$new_path" = x \
23018              && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23019              && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23020       new_path=`$CYGPATH -u "$path"`
23021     fi
23022     if test "x$new_path" = x; then
23023       # It's still not found. Now this is an unrecoverable error.
23024       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
23025 $as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
23026       has_space=`$ECHO "$complete" | $GREP " "`
23027       if test "x$has_space" != x; then
23028         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23029 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23030       fi
23031       as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
23032     fi
23033   fi
23034 
23035   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23036   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23037   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23038   # "foo.exe" is OK but "foo" is an error.
23039   #
23040   # This test is therefore slightly more accurate than "test -f" to check for file precense.
23041   # It is also a way to make sure we got the proper file name for the real test later on.
23042   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23043   if test "x$test_shortpath" = x; then
23044     # Short path failed, file does not exist as specified.
23045     # Try adding .exe or .cmd
23046     if test -f "${new_path}.exe"; then
23047        input_to_shortpath="${new_path}.exe"
23048     elif test -f "${new_path}.cmd"; then
23049        input_to_shortpath="${new_path}.cmd"
23050     else
23051       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$new_path\", is invalid." >&5
23052 $as_echo "$as_me: The path of RC, which resolves as \"$new_path\", is invalid." >&6;}
23053       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
23054 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
23055       as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
23056     fi
23057   else
23058     input_to_shortpath="$new_path"
23059   fi
23060 
23061   # Call helper function which possibly converts this using DOS-style short mode.
23062   # If so, the updated path is stored in $new_path.
23063   new_path="$input_to_shortpath"
23064 
23065   input_path="$input_to_shortpath"
23066   # Check if we need to convert this using DOS-style short mode. If the path
23067   # contains just simple characters, use it. Otherwise (spaces, weird characters),
23068   # take no chances and rewrite it.
23069   # Note: m4 eats our [], so we need to use [ and ] instead.
23070   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23071   if test "x$has_forbidden_chars" != x; then
23072     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23073     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23074     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23075     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23076       # Going to short mode and back again did indeed matter. Since short mode is
23077       # case insensitive, let's make it lowercase to improve readability.
23078       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23079       # Now convert it back to Unix-stile (cygpath)
23080       input_path=`$CYGPATH -u "$shortmode_path"`
23081       new_path="$input_path"
23082     fi
23083   fi
23084 
23085   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23086   if test "x$test_cygdrive_prefix" = x; then
23087     # As a simple fix, exclude /usr/bin since it's not a real path.
23088     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
23089       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23090       # a path prefixed by /cygdrive for fixpath to work.
23091       new_path="$CYGWIN_ROOT_PATH$input_path"
23092     fi
23093   fi
23094 
23095   # remove trailing .exe if any
23096   new_path="${new_path/%.exe/}"
23097 
23098   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23099 
23100   # First separate the path from the arguments. This will split at the first
23101   # space.
23102   complete="$RC"
23103   path="${complete%% *}"
23104   tmp="$complete EOL"
23105   arguments="${tmp#* }"
23106 
23107   # Input might be given as Windows format, start by converting to
23108   # unix format.
23109   new_path="$path"
23110 
23111   windows_path="$new_path"
23112   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23113     unix_path=`$CYGPATH -u "$windows_path"`
23114     new_path="$unix_path"
23115   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23116     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23117     new_path="$unix_path"
23118   fi
23119 
23120 
23121   # Now try to locate executable using which
23122   new_path=`$WHICH "$new_path" 2> /dev/null`
23123 
23124   if test "x$new_path" = x; then
23125     # Oops. Which didn't find the executable.
23126     # The splitting of arguments from the executable at a space might have been incorrect,
23127     # since paths with space are more likely in Windows. Give it another try with the whole
23128     # argument.
23129     path="$complete"
23130     arguments="EOL"
23131     new_path="$path"
23132 
23133   windows_path="$new_path"
23134   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23135     unix_path=`$CYGPATH -u "$windows_path"`
23136     new_path="$unix_path"
23137   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23138     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23139     new_path="$unix_path"
23140   fi
23141 
23142 
23143     new_path=`$WHICH "$new_path" 2> /dev/null`
23144 
23145     if test "x$new_path" = x; then
23146       # It's still not found. Now this is an unrecoverable error.
23147       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
23148 $as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
23149       has_space=`$ECHO "$complete" | $GREP " "`
23150       if test "x$has_space" != x; then
23151         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23152 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23153       fi
23154       as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
23155     fi
23156   fi
23157 
23158   # Now new_path has a complete unix path to the binary
23159   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
23160     # Keep paths in /bin as-is, but remove trailing .exe if any
23161     new_path="${new_path/%.exe/}"
23162     # Do not save /bin paths to all_fixpath_prefixes!
23163   else
23164     # Not in mixed or Windows style, start by that.
23165     new_path=`cmd //c echo $new_path`
23166 
23167   input_path="$new_path"
23168   # Check if we need to convert this using DOS-style short mode. If the path
23169   # contains just simple characters, use it. Otherwise (spaces, weird characters),
23170   # take no chances and rewrite it.
23171   # Note: m4 eats our [], so we need to use [ and ] instead.
23172   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23173   if test "x$has_forbidden_chars" != x; then
23174     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23175     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23176   fi
23177 
23178     # Output is in $new_path
23179 
23180   windows_path="$new_path"
23181   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23182     unix_path=`$CYGPATH -u "$windows_path"`
23183     new_path="$unix_path"
23184   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23185     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23186     new_path="$unix_path"
23187   fi
23188 
23189     # remove trailing .exe if any
23190     new_path="${new_path/%.exe/}"
23191 
23192     # Save the first 10 bytes of this path to the storage, so fixpath can work.
23193     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23194   fi
23195 
23196   else
23197     # We're on a posix platform. Hooray! :)
23198     # First separate the path from the arguments. This will split at the first
23199     # space.
23200     complete="$RC"
23201     path="${complete%% *}"
23202     tmp="$complete EOL"
23203     arguments="${tmp#* }"
23204 
23205     # Cannot rely on the command "which" here since it doesn't always work.
23206     is_absolute_path=`$ECHO "$path" | $GREP ^/`
23207     if test -z "$is_absolute_path"; then
23208       # Path to executable is not absolute. Find it.
23209       IFS_save="$IFS"
23210       IFS=:
23211       for p in $PATH; do
23212         if test -f "$p/$path" && test -x "$p/$path"; then
23213           new_path="$p/$path"
23214           break
23215         fi
23216       done
23217       IFS="$IFS_save"
23218     else
23219       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving RC (as $path) failed, using $path directly." >&5
23220 $as_echo "$as_me: Resolving RC (as $path) failed, using $path directly." >&6;}
23221       new_path="$path"
23222     fi
23223 
23224     if test "x$new_path" = x; then
23225         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
23226 $as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
23227         has_space=`$ECHO "$complete" | $GREP " "`
23228         if test "x$has_space" != x; then
23229           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
23230 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
23231         fi
23232         as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
23233       fi
23234   fi
23235 
23236       # Now join together the path and the arguments once again
23237       if test "x$arguments" != xEOL; then
23238         new_complete="$new_path ${arguments% *}"
23239       else
23240         new_complete="$new_path"
23241       fi
23242 
23243   if test "x$complete" != "x$new_complete"; then
23244       RC="$new_complete"
23245       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting RC to \"$new_complete\"" >&5
23246 $as_echo "$as_me: Rewriting RC to \"$new_complete\"" >&6;}
23247     fi
23248 
23249 
23250     # For hotspot, we need these in Windows mixed path,
23251     # so rewrite them all. Need added .exe suffix.
23252     HOTSPOT_CXX="$CXX.exe"
23253     HOTSPOT_LD="$LD.exe"
23254     HOTSPOT_MT="$MT.exe"
23255     HOTSPOT_RC="$RC.exe"
23256 
23257   unix_path="$HOTSPOT_CXX"
23258   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23259     windows_path=`$CYGPATH -m "$unix_path"`
23260     HOTSPOT_CXX="$windows_path"
23261   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23262     windows_path=`cmd //c echo $unix_path`
23263     HOTSPOT_CXX="$windows_path"
23264   fi
23265 
23266 
23267   unix_path="$HOTSPOT_LD"
23268   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23269     windows_path=`$CYGPATH -m "$unix_path"`
23270     HOTSPOT_LD="$windows_path"
23271   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23272     windows_path=`cmd //c echo $unix_path`
23273     HOTSPOT_LD="$windows_path"
23274   fi
23275 
23276 
23277   unix_path="$HOTSPOT_MT"
23278   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23279     windows_path=`$CYGPATH -m "$unix_path"`
23280     HOTSPOT_MT="$windows_path"
23281   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23282     windows_path=`cmd //c echo $unix_path`
23283     HOTSPOT_MT="$windows_path"
23284   fi
23285 
23286 
23287   unix_path="$HOTSPOT_RC"
23288   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23289     windows_path=`$CYGPATH -m "$unix_path"`
23290     HOTSPOT_RC="$windows_path"
23291   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23292     windows_path=`cmd //c echo $unix_path`
23293     HOTSPOT_RC="$windows_path"
23294   fi
23295 
23296 
23297 
23298 
23299     RC_FLAGS="-nologo -l 0x409 -r"
23300     if test "x$VARIANT" = xOPT; then :
23301 
23302         RC_FLAGS="$RC_FLAGS -d NDEBUG"
23303 
23304 fi
23305     JDK_UPDATE_VERSION_NOTNULL=$JDK_UPDATE_VERSION
23306     if test "x$JDK_UPDATE_VERSION" = x; then :
23307 
23308         JDK_UPDATE_VERSION_NOTNULL=0
23309 
23310 fi
23311     RC_FLAGS="$RC_FLAGS -d \"JDK_BUILD_ID=$FULL_VERSION\""
23312     RC_FLAGS="$RC_FLAGS -d \"JDK_COMPANY=$COMPANY_NAME\""
23313     RC_FLAGS="$RC_FLAGS -d \"JDK_COMPONENT=$PRODUCT_NAME $JDK_RC_PLATFORM_NAME binary\""
23314     RC_FLAGS="$RC_FLAGS -d \"JDK_VER=$JDK_MINOR_VERSION.$JDK_MICRO_VERSION.$JDK_UPDATE_VERSION_NOTNULL.$COOKED_BUILD_NUMBER\""
23315     RC_FLAGS="$RC_FLAGS -d \"JDK_COPYRIGHT=Copyright \xA9 $COPYRIGHT_YEAR\""
23316     RC_FLAGS="$RC_FLAGS -d \"JDK_NAME=$PRODUCT_NAME $JDK_RC_PLATFORM_NAME $JDK_MINOR_VERSION $JDK_UPDATE_META_TAG\""
23317     RC_FLAGS="$RC_FLAGS -d \"JDK_FVER=$JDK_MINOR_VERSION,$JDK_MICRO_VERSION,$JDK_UPDATE_VERSION_NOTNULL,$COOKED_BUILD_NUMBER\""
23318 
23319     # lib.exe is used to create static libraries.
23320     # Extract the first word of "lib", so it can be a program name with args.
23321 set dummy lib; ac_word=$2
23322 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23323 $as_echo_n "checking for $ac_word... " >&6; }
23324 if ${ac_cv_prog_WINAR+:} false; then :
23325   $as_echo_n "(cached) " >&6
23326 else
23327   if test -n "$WINAR"; then
23328   ac_cv_prog_WINAR="$WINAR" # Let the user override the test.
23329 else
23330 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23331 for as_dir in $PATH
23332 do
23333   IFS=$as_save_IFS
23334   test -z "$as_dir" && as_dir=.
23335     for ac_exec_ext in '' $ac_executable_extensions; do
23336   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
23337     ac_cv_prog_WINAR="lib"
23338     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23339     break 2
23340   fi
23341 done
23342   done
23343 IFS=$as_save_IFS
23344 
23345 fi
23346 fi
23347 WINAR=$ac_cv_prog_WINAR
23348 if test -n "$WINAR"; then
23349   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINAR" >&5
23350 $as_echo "$WINAR" >&6; }
23351 else
23352   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23353 $as_echo "no" >&6; }
23354 fi
23355 
23356 
23357 
23358   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23359 
23360   # First separate the path from the arguments. This will split at the first
23361   # space.
23362   complete="$WINAR"
23363   path="${complete%% *}"
23364   tmp="$complete EOL"
23365   arguments="${tmp#* }"
23366 
23367   # Input might be given as Windows format, start by converting to
23368   # unix format.
23369   new_path=`$CYGPATH -u "$path"`
23370 
23371   # Now try to locate executable using which
23372   new_path=`$WHICH "$new_path" 2> /dev/null`
23373   # bat and cmd files are not always considered executable in cygwin causing which
23374   # to not find them
23375   if test "x$new_path" = x \
23376            && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23377            && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23378     new_path=`$CYGPATH -u "$path"`
23379   fi
23380   if test "x$new_path" = x; then
23381     # Oops. Which didn't find the executable.
23382     # The splitting of arguments from the executable at a space might have been incorrect,
23383     # since paths with space are more likely in Windows. Give it another try with the whole
23384     # argument.
23385     path="$complete"
23386     arguments="EOL"
23387     new_path=`$CYGPATH -u "$path"`
23388     new_path=`$WHICH "$new_path" 2> /dev/null`
23389     # bat and cmd files are not always considered executable in cygwin causing which
23390     # to not find them
23391     if test "x$new_path" = x \
23392              && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23393              && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23394       new_path=`$CYGPATH -u "$path"`
23395     fi
23396     if test "x$new_path" = x; then
23397       # It's still not found. Now this is an unrecoverable error.
23398       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$complete\", is not found." >&5
23399 $as_echo "$as_me: The path of WINAR, which resolves as \"$complete\", is not found." >&6;}
23400       has_space=`$ECHO "$complete" | $GREP " "`
23401       if test "x$has_space" != x; then
23402         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23403 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23404       fi
23405       as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5
23406     fi
23407   fi
23408 
23409   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23410   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23411   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23412   # "foo.exe" is OK but "foo" is an error.
23413   #
23414   # This test is therefore slightly more accurate than "test -f" to check for file precense.
23415   # It is also a way to make sure we got the proper file name for the real test later on.
23416   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23417   if test "x$test_shortpath" = x; then
23418     # Short path failed, file does not exist as specified.
23419     # Try adding .exe or .cmd
23420     if test -f "${new_path}.exe"; then
23421        input_to_shortpath="${new_path}.exe"
23422     elif test -f "${new_path}.cmd"; then
23423        input_to_shortpath="${new_path}.cmd"
23424     else
23425       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$new_path\", is invalid." >&5
23426 $as_echo "$as_me: The path of WINAR, which resolves as \"$new_path\", is invalid." >&6;}
23427       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
23428 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
23429       as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5
23430     fi
23431   else
23432     input_to_shortpath="$new_path"
23433   fi
23434 
23435   # Call helper function which possibly converts this using DOS-style short mode.
23436   # If so, the updated path is stored in $new_path.
23437   new_path="$input_to_shortpath"
23438 
23439   input_path="$input_to_shortpath"
23440   # Check if we need to convert this using DOS-style short mode. If the path
23441   # contains just simple characters, use it. Otherwise (spaces, weird characters),
23442   # take no chances and rewrite it.
23443   # Note: m4 eats our [], so we need to use [ and ] instead.
23444   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23445   if test "x$has_forbidden_chars" != x; then
23446     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23447     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23448     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23449     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23450       # Going to short mode and back again did indeed matter. Since short mode is
23451       # case insensitive, let's make it lowercase to improve readability.
23452       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23453       # Now convert it back to Unix-stile (cygpath)
23454       input_path=`$CYGPATH -u "$shortmode_path"`
23455       new_path="$input_path"
23456     fi
23457   fi
23458 
23459   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23460   if test "x$test_cygdrive_prefix" = x; then
23461     # As a simple fix, exclude /usr/bin since it's not a real path.
23462     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
23463       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23464       # a path prefixed by /cygdrive for fixpath to work.
23465       new_path="$CYGWIN_ROOT_PATH$input_path"
23466     fi
23467   fi
23468 
23469   # remove trailing .exe if any
23470   new_path="${new_path/%.exe/}"
23471 
23472   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23473 
23474   # First separate the path from the arguments. This will split at the first
23475   # space.
23476   complete="$WINAR"
23477   path="${complete%% *}"
23478   tmp="$complete EOL"
23479   arguments="${tmp#* }"
23480 
23481   # Input might be given as Windows format, start by converting to
23482   # unix format.
23483   new_path="$path"
23484 
23485   windows_path="$new_path"
23486   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23487     unix_path=`$CYGPATH -u "$windows_path"`
23488     new_path="$unix_path"
23489   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23490     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23491     new_path="$unix_path"
23492   fi
23493 
23494 
23495   # Now try to locate executable using which
23496   new_path=`$WHICH "$new_path" 2> /dev/null`
23497 
23498   if test "x$new_path" = x; then
23499     # Oops. Which didn't find the executable.
23500     # The splitting of arguments from the executable at a space might have been incorrect,
23501     # since paths with space are more likely in Windows. Give it another try with the whole
23502     # argument.
23503     path="$complete"
23504     arguments="EOL"
23505     new_path="$path"
23506 
23507   windows_path="$new_path"
23508   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23509     unix_path=`$CYGPATH -u "$windows_path"`
23510     new_path="$unix_path"
23511   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23512     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23513     new_path="$unix_path"
23514   fi
23515 
23516 
23517     new_path=`$WHICH "$new_path" 2> /dev/null`
23518 
23519     if test "x$new_path" = x; then
23520       # It's still not found. Now this is an unrecoverable error.
23521       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$complete\", is not found." >&5
23522 $as_echo "$as_me: The path of WINAR, which resolves as \"$complete\", is not found." >&6;}
23523       has_space=`$ECHO "$complete" | $GREP " "`
23524       if test "x$has_space" != x; then
23525         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23526 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23527       fi
23528       as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5
23529     fi
23530   fi
23531 
23532   # Now new_path has a complete unix path to the binary
23533   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
23534     # Keep paths in /bin as-is, but remove trailing .exe if any
23535     new_path="${new_path/%.exe/}"
23536     # Do not save /bin paths to all_fixpath_prefixes!
23537   else
23538     # Not in mixed or Windows style, start by that.
23539     new_path=`cmd //c echo $new_path`
23540 
23541   input_path="$new_path"
23542   # Check if we need to convert this using DOS-style short mode. If the path
23543   # contains just simple characters, use it. Otherwise (spaces, weird characters),
23544   # take no chances and rewrite it.
23545   # Note: m4 eats our [], so we need to use [ and ] instead.
23546   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23547   if test "x$has_forbidden_chars" != x; then
23548     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23549     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23550   fi
23551 
23552     # Output is in $new_path
23553 
23554   windows_path="$new_path"
23555   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23556     unix_path=`$CYGPATH -u "$windows_path"`
23557     new_path="$unix_path"
23558   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23559     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23560     new_path="$unix_path"
23561   fi
23562 
23563     # remove trailing .exe if any
23564     new_path="${new_path/%.exe/}"
23565 
23566     # Save the first 10 bytes of this path to the storage, so fixpath can work.
23567     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23568   fi
23569 
23570   else
23571     # We're on a posix platform. Hooray! :)
23572     # First separate the path from the arguments. This will split at the first
23573     # space.
23574     complete="$WINAR"
23575     path="${complete%% *}"
23576     tmp="$complete EOL"
23577     arguments="${tmp#* }"
23578 
23579     # Cannot rely on the command "which" here since it doesn't always work.
23580     is_absolute_path=`$ECHO "$path" | $GREP ^/`
23581     if test -z "$is_absolute_path"; then
23582       # Path to executable is not absolute. Find it.
23583       IFS_save="$IFS"
23584       IFS=:
23585       for p in $PATH; do
23586         if test -f "$p/$path" && test -x "$p/$path"; then
23587           new_path="$p/$path"
23588           break
23589         fi
23590       done
23591       IFS="$IFS_save"
23592     else
23593       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving WINAR (as $path) failed, using $path directly." >&5
23594 $as_echo "$as_me: Resolving WINAR (as $path) failed, using $path directly." >&6;}
23595       new_path="$path"
23596     fi
23597 
23598     if test "x$new_path" = x; then
23599         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$complete\", is not found." >&5
23600 $as_echo "$as_me: The path of WINAR, which resolves as \"$complete\", is not found." >&6;}
23601         has_space=`$ECHO "$complete" | $GREP " "`
23602         if test "x$has_space" != x; then
23603           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
23604 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
23605         fi
23606         as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5
23607       fi
23608   fi
23609 
23610       # Now join together the path and the arguments once again
23611       if test "x$arguments" != xEOL; then
23612         new_complete="$new_path ${arguments% *}"
23613       else
23614         new_complete="$new_path"
23615       fi
23616 
23617   if test "x$complete" != "x$new_complete"; then
23618       WINAR="$new_complete"
23619       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting WINAR to \"$new_complete\"" >&5
23620 $as_echo "$as_me: Rewriting WINAR to \"$new_complete\"" >&6;}
23621     fi
23622 
23623     AR="$WINAR"
23624     ARFLAGS="-nologo -NODEFAULTLIB:MSVCRT"
23625 
23626     # Extract the first word of "dumpbin", so it can be a program name with args.
23627 set dummy dumpbin; ac_word=$2
23628 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23629 $as_echo_n "checking for $ac_word... " >&6; }
23630 if ${ac_cv_prog_DUMPBIN+:} false; then :
23631   $as_echo_n "(cached) " >&6
23632 else
23633   if test -n "$DUMPBIN"; then
23634   ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test.
23635 else
23636 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23637 for as_dir in $PATH
23638 do
23639   IFS=$as_save_IFS
23640   test -z "$as_dir" && as_dir=.
23641     for ac_exec_ext in '' $ac_executable_extensions; do
23642   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
23643     ac_cv_prog_DUMPBIN="dumpbin"
23644     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23645     break 2
23646   fi
23647 done
23648   done
23649 IFS=$as_save_IFS
23650 
23651 fi
23652 fi
23653 DUMPBIN=$ac_cv_prog_DUMPBIN
23654 if test -n "$DUMPBIN"; then
23655   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5
23656 $as_echo "$DUMPBIN" >&6; }
23657 else
23658   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23659 $as_echo "no" >&6; }
23660 fi
23661 
23662 
23663 
23664   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23665 
23666   # First separate the path from the arguments. This will split at the first
23667   # space.
23668   complete="$DUMPBIN"
23669   path="${complete%% *}"
23670   tmp="$complete EOL"
23671   arguments="${tmp#* }"
23672 
23673   # Input might be given as Windows format, start by converting to
23674   # unix format.
23675   new_path=`$CYGPATH -u "$path"`
23676 
23677   # Now try to locate executable using which
23678   new_path=`$WHICH "$new_path" 2> /dev/null`
23679   # bat and cmd files are not always considered executable in cygwin causing which
23680   # to not find them
23681   if test "x$new_path" = x \
23682            && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23683            && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23684     new_path=`$CYGPATH -u "$path"`
23685   fi
23686   if test "x$new_path" = x; then
23687     # Oops. Which didn't find the executable.
23688     # The splitting of arguments from the executable at a space might have been incorrect,
23689     # since paths with space are more likely in Windows. Give it another try with the whole
23690     # argument.
23691     path="$complete"
23692     arguments="EOL"
23693     new_path=`$CYGPATH -u "$path"`
23694     new_path=`$WHICH "$new_path" 2> /dev/null`
23695     # bat and cmd files are not always considered executable in cygwin causing which
23696     # to not find them
23697     if test "x$new_path" = x \
23698              && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23699              && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23700       new_path=`$CYGPATH -u "$path"`
23701     fi
23702     if test "x$new_path" = x; then
23703       # It's still not found. Now this is an unrecoverable error.
23704       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
23705 $as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
23706       has_space=`$ECHO "$complete" | $GREP " "`
23707       if test "x$has_space" != x; then
23708         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23709 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23710       fi
23711       as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
23712     fi
23713   fi
23714 
23715   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23716   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23717   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23718   # "foo.exe" is OK but "foo" is an error.
23719   #
23720   # This test is therefore slightly more accurate than "test -f" to check for file precense.
23721   # It is also a way to make sure we got the proper file name for the real test later on.
23722   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23723   if test "x$test_shortpath" = x; then
23724     # Short path failed, file does not exist as specified.
23725     # Try adding .exe or .cmd
23726     if test -f "${new_path}.exe"; then
23727        input_to_shortpath="${new_path}.exe"
23728     elif test -f "${new_path}.cmd"; then
23729        input_to_shortpath="${new_path}.cmd"
23730     else
23731       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&5
23732 $as_echo "$as_me: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&6;}
23733       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
23734 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
23735       as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
23736     fi
23737   else
23738     input_to_shortpath="$new_path"
23739   fi
23740 
23741   # Call helper function which possibly converts this using DOS-style short mode.
23742   # If so, the updated path is stored in $new_path.
23743   new_path="$input_to_shortpath"
23744 
23745   input_path="$input_to_shortpath"
23746   # Check if we need to convert this using DOS-style short mode. If the path
23747   # contains just simple characters, use it. Otherwise (spaces, weird characters),
23748   # take no chances and rewrite it.
23749   # Note: m4 eats our [], so we need to use [ and ] instead.
23750   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23751   if test "x$has_forbidden_chars" != x; then
23752     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23753     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23754     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23755     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23756       # Going to short mode and back again did indeed matter. Since short mode is
23757       # case insensitive, let's make it lowercase to improve readability.
23758       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23759       # Now convert it back to Unix-stile (cygpath)
23760       input_path=`$CYGPATH -u "$shortmode_path"`
23761       new_path="$input_path"
23762     fi
23763   fi
23764 
23765   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23766   if test "x$test_cygdrive_prefix" = x; then
23767     # As a simple fix, exclude /usr/bin since it's not a real path.
23768     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
23769       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23770       # a path prefixed by /cygdrive for fixpath to work.
23771       new_path="$CYGWIN_ROOT_PATH$input_path"
23772     fi
23773   fi
23774 
23775   # remove trailing .exe if any
23776   new_path="${new_path/%.exe/}"
23777 
23778   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23779 
23780   # First separate the path from the arguments. This will split at the first
23781   # space.
23782   complete="$DUMPBIN"
23783   path="${complete%% *}"
23784   tmp="$complete EOL"
23785   arguments="${tmp#* }"
23786 
23787   # Input might be given as Windows format, start by converting to
23788   # unix format.
23789   new_path="$path"
23790 
23791   windows_path="$new_path"
23792   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23793     unix_path=`$CYGPATH -u "$windows_path"`
23794     new_path="$unix_path"
23795   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23796     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23797     new_path="$unix_path"
23798   fi
23799 
23800 
23801   # Now try to locate executable using which
23802   new_path=`$WHICH "$new_path" 2> /dev/null`
23803 
23804   if test "x$new_path" = x; then
23805     # Oops. Which didn't find the executable.
23806     # The splitting of arguments from the executable at a space might have been incorrect,
23807     # since paths with space are more likely in Windows. Give it another try with the whole
23808     # argument.
23809     path="$complete"
23810     arguments="EOL"
23811     new_path="$path"
23812 
23813   windows_path="$new_path"
23814   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23815     unix_path=`$CYGPATH -u "$windows_path"`
23816     new_path="$unix_path"
23817   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23818     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23819     new_path="$unix_path"
23820   fi
23821 
23822 
23823     new_path=`$WHICH "$new_path" 2> /dev/null`
23824 
23825     if test "x$new_path" = x; then
23826       # It's still not found. Now this is an unrecoverable error.
23827       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
23828 $as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
23829       has_space=`$ECHO "$complete" | $GREP " "`
23830       if test "x$has_space" != x; then
23831         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23832 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23833       fi
23834       as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
23835     fi
23836   fi
23837 
23838   # Now new_path has a complete unix path to the binary
23839   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
23840     # Keep paths in /bin as-is, but remove trailing .exe if any
23841     new_path="${new_path/%.exe/}"
23842     # Do not save /bin paths to all_fixpath_prefixes!
23843   else
23844     # Not in mixed or Windows style, start by that.
23845     new_path=`cmd //c echo $new_path`
23846 
23847   input_path="$new_path"
23848   # Check if we need to convert this using DOS-style short mode. If the path
23849   # contains just simple characters, use it. Otherwise (spaces, weird characters),
23850   # take no chances and rewrite it.
23851   # Note: m4 eats our [], so we need to use [ and ] instead.
23852   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23853   if test "x$has_forbidden_chars" != x; then
23854     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23855     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23856   fi
23857 
23858     # Output is in $new_path
23859 
23860   windows_path="$new_path"
23861   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23862     unix_path=`$CYGPATH -u "$windows_path"`
23863     new_path="$unix_path"
23864   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23865     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23866     new_path="$unix_path"
23867   fi
23868 
23869     # remove trailing .exe if any
23870     new_path="${new_path/%.exe/}"
23871 
23872     # Save the first 10 bytes of this path to the storage, so fixpath can work.
23873     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23874   fi
23875 
23876   else
23877     # We're on a posix platform. Hooray! :)
23878     # First separate the path from the arguments. This will split at the first
23879     # space.
23880     complete="$DUMPBIN"
23881     path="${complete%% *}"
23882     tmp="$complete EOL"
23883     arguments="${tmp#* }"
23884 
23885     # Cannot rely on the command "which" here since it doesn't always work.
23886     is_absolute_path=`$ECHO "$path" | $GREP ^/`
23887     if test -z "$is_absolute_path"; then
23888       # Path to executable is not absolute. Find it.
23889       IFS_save="$IFS"
23890       IFS=:
23891       for p in $PATH; do
23892         if test -f "$p/$path" && test -x "$p/$path"; then
23893           new_path="$p/$path"
23894           break
23895         fi
23896       done
23897       IFS="$IFS_save"
23898     else
23899       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving DUMPBIN (as $path) failed, using $path directly." >&5
23900 $as_echo "$as_me: Resolving DUMPBIN (as $path) failed, using $path directly." >&6;}
23901       new_path="$path"
23902     fi
23903 
23904     if test "x$new_path" = x; then
23905         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
23906 $as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
23907         has_space=`$ECHO "$complete" | $GREP " "`
23908         if test "x$has_space" != x; then
23909           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
23910 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
23911         fi
23912         as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
23913       fi
23914   fi
23915 
23916       # Now join together the path and the arguments once again
23917       if test "x$arguments" != xEOL; then
23918         new_complete="$new_path ${arguments% *}"
23919       else
23920         new_complete="$new_path"
23921       fi
23922 
23923   if test "x$complete" != "x$new_complete"; then
23924       DUMPBIN="$new_complete"
23925       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DUMPBIN to \"$new_complete\"" >&5
23926 $as_echo "$as_me: Rewriting DUMPBIN to \"$new_complete\"" >&6;}
23927     fi
23928 
23929 
23930     COMPILER_TYPE=CL
23931     CCXXFLAGS="$CCXXFLAGS -nologo"
23932 
23933 fi
23934 
23935 
23936 
23937 ac_ext=c
23938 ac_cpp='$CPP $CPPFLAGS'
23939 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
23940 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
23941 ac_compiler_gnu=$ac_cv_c_compiler_gnu
23942 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
23943 $as_echo_n "checking how to run the C preprocessor... " >&6; }
23944 # On Suns, sometimes $CPP names a directory.
23945 if test -n "$CPP" && test -d "$CPP"; then
23946   CPP=
23947 fi
23948 if test -z "$CPP"; then
23949   if ${ac_cv_prog_CPP+:} false; then :
23950   $as_echo_n "(cached) " >&6
23951 else
23952       # Double quotes because CPP needs to be expanded
23953     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
23954     do
23955       ac_preproc_ok=false
23956 for ac_c_preproc_warn_flag in '' yes
23957 do
23958   # Use a header file that comes with gcc, so configuring glibc
23959   # with a fresh cross-compiler works.
23960   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
23961   # <limits.h> exists even on freestanding compilers.
23962   # On the NeXT, cc -E runs the code through the compiler's parser,
23963   # not just through cpp. "Syntax error" is here to catch this case.
23964   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23965 /* end confdefs.h.  */
23966 #ifdef __STDC__
23967 # include <limits.h>
23968 #else
23969 # include <assert.h>
23970 #endif
23971                      Syntax error
23972 _ACEOF
23973 if ac_fn_c_try_cpp "$LINENO"; then :
23974 
23975 else
23976   # Broken: fails on valid input.
23977 continue
23978 fi
23979 rm -f conftest.err conftest.i conftest.$ac_ext
23980 
23981   # OK, works on sane cases.  Now check whether nonexistent headers
23982   # can be detected and how.
23983   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23984 /* end confdefs.h.  */
23985 #include <ac_nonexistent.h>
23986 _ACEOF
23987 if ac_fn_c_try_cpp "$LINENO"; then :
23988   # Broken: success on invalid input.
23989 continue
23990 else
23991   # Passes both tests.
23992 ac_preproc_ok=:
23993 break
23994 fi
23995 rm -f conftest.err conftest.i conftest.$ac_ext
23996 
23997 done
23998 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
23999 rm -f conftest.i conftest.err conftest.$ac_ext
24000 if $ac_preproc_ok; then :
24001   break
24002 fi
24003 
24004     done
24005     ac_cv_prog_CPP=$CPP
24006 
24007 fi
24008   CPP=$ac_cv_prog_CPP
24009 else
24010   ac_cv_prog_CPP=$CPP
24011 fi
24012 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
24013 $as_echo "$CPP" >&6; }
24014 ac_preproc_ok=false
24015 for ac_c_preproc_warn_flag in '' yes
24016 do
24017   # Use a header file that comes with gcc, so configuring glibc
24018   # with a fresh cross-compiler works.
24019   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
24020   # <limits.h> exists even on freestanding compilers.
24021   # On the NeXT, cc -E runs the code through the compiler's parser,
24022   # not just through cpp. "Syntax error" is here to catch this case.
24023   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24024 /* end confdefs.h.  */
24025 #ifdef __STDC__
24026 # include <limits.h>
24027 #else
24028 # include <assert.h>
24029 #endif
24030                      Syntax error
24031 _ACEOF
24032 if ac_fn_c_try_cpp "$LINENO"; then :
24033 
24034 else
24035   # Broken: fails on valid input.
24036 continue
24037 fi
24038 rm -f conftest.err conftest.i conftest.$ac_ext
24039 
24040   # OK, works on sane cases.  Now check whether nonexistent headers
24041   # can be detected and how.
24042   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24043 /* end confdefs.h.  */
24044 #include <ac_nonexistent.h>
24045 _ACEOF
24046 if ac_fn_c_try_cpp "$LINENO"; then :
24047   # Broken: success on invalid input.
24048 continue
24049 else
24050   # Passes both tests.
24051 ac_preproc_ok=:
24052 break
24053 fi
24054 rm -f conftest.err conftest.i conftest.$ac_ext
24055 
24056 done
24057 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
24058 rm -f conftest.i conftest.err conftest.$ac_ext
24059 if $ac_preproc_ok; then :
24060 
24061 else
24062   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
24063 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
24064 as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
24065 See \`config.log' for more details" "$LINENO" 5; }
24066 fi
24067 
24068 ac_ext=cpp
24069 ac_cpp='$CXXCPP $CPPFLAGS'
24070 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
24071 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
24072 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
24073 
24074 
24075   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24076 
24077   # First separate the path from the arguments. This will split at the first
24078   # space.
24079   complete="$CPP"
24080   path="${complete%% *}"
24081   tmp="$complete EOL"
24082   arguments="${tmp#* }"
24083 
24084   # Input might be given as Windows format, start by converting to
24085   # unix format.
24086   new_path=`$CYGPATH -u "$path"`
24087 
24088   # Now try to locate executable using which
24089   new_path=`$WHICH "$new_path" 2> /dev/null`
24090   # bat and cmd files are not always considered executable in cygwin causing which
24091   # to not find them
24092   if test "x$new_path" = x \
24093            && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24094            && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24095     new_path=`$CYGPATH -u "$path"`
24096   fi
24097   if test "x$new_path" = x; then
24098     # Oops. Which didn't find the executable.
24099     # The splitting of arguments from the executable at a space might have been incorrect,
24100     # since paths with space are more likely in Windows. Give it another try with the whole
24101     # argument.
24102     path="$complete"
24103     arguments="EOL"
24104     new_path=`$CYGPATH -u "$path"`
24105     new_path=`$WHICH "$new_path" 2> /dev/null`
24106     # bat and cmd files are not always considered executable in cygwin causing which
24107     # to not find them
24108     if test "x$new_path" = x \
24109              && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24110              && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24111       new_path=`$CYGPATH -u "$path"`
24112     fi
24113     if test "x$new_path" = x; then
24114       # It's still not found. Now this is an unrecoverable error.
24115       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
24116 $as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
24117       has_space=`$ECHO "$complete" | $GREP " "`
24118       if test "x$has_space" != x; then
24119         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24120 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24121       fi
24122       as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
24123     fi
24124   fi
24125 
24126   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24127   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24128   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24129   # "foo.exe" is OK but "foo" is an error.
24130   #
24131   # This test is therefore slightly more accurate than "test -f" to check for file precense.
24132   # It is also a way to make sure we got the proper file name for the real test later on.
24133   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24134   if test "x$test_shortpath" = x; then
24135     # Short path failed, file does not exist as specified.
24136     # Try adding .exe or .cmd
24137     if test -f "${new_path}.exe"; then
24138        input_to_shortpath="${new_path}.exe"
24139     elif test -f "${new_path}.cmd"; then
24140        input_to_shortpath="${new_path}.cmd"
24141     else
24142       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$new_path\", is invalid." >&5
24143 $as_echo "$as_me: The path of CPP, which resolves as \"$new_path\", is invalid." >&6;}
24144       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
24145 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
24146       as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
24147     fi
24148   else
24149     input_to_shortpath="$new_path"
24150   fi
24151 
24152   # Call helper function which possibly converts this using DOS-style short mode.
24153   # If so, the updated path is stored in $new_path.
24154   new_path="$input_to_shortpath"
24155 
24156   input_path="$input_to_shortpath"
24157   # Check if we need to convert this using DOS-style short mode. If the path
24158   # contains just simple characters, use it. Otherwise (spaces, weird characters),
24159   # take no chances and rewrite it.
24160   # Note: m4 eats our [], so we need to use [ and ] instead.
24161   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24162   if test "x$has_forbidden_chars" != x; then
24163     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24164     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24165     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24166     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24167       # Going to short mode and back again did indeed matter. Since short mode is
24168       # case insensitive, let's make it lowercase to improve readability.
24169       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24170       # Now convert it back to Unix-stile (cygpath)
24171       input_path=`$CYGPATH -u "$shortmode_path"`
24172       new_path="$input_path"
24173     fi
24174   fi
24175 
24176   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24177   if test "x$test_cygdrive_prefix" = x; then
24178     # As a simple fix, exclude /usr/bin since it's not a real path.
24179     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
24180       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24181       # a path prefixed by /cygdrive for fixpath to work.
24182       new_path="$CYGWIN_ROOT_PATH$input_path"
24183     fi
24184   fi
24185 
24186   # remove trailing .exe if any
24187   new_path="${new_path/%.exe/}"
24188 
24189   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24190 
24191   # First separate the path from the arguments. This will split at the first
24192   # space.
24193   complete="$CPP"
24194   path="${complete%% *}"
24195   tmp="$complete EOL"
24196   arguments="${tmp#* }"
24197 
24198   # Input might be given as Windows format, start by converting to
24199   # unix format.
24200   new_path="$path"
24201 
24202   windows_path="$new_path"
24203   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24204     unix_path=`$CYGPATH -u "$windows_path"`
24205     new_path="$unix_path"
24206   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24207     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24208     new_path="$unix_path"
24209   fi
24210 
24211 
24212   # Now try to locate executable using which
24213   new_path=`$WHICH "$new_path" 2> /dev/null`
24214 
24215   if test "x$new_path" = x; then
24216     # Oops. Which didn't find the executable.
24217     # The splitting of arguments from the executable at a space might have been incorrect,
24218     # since paths with space are more likely in Windows. Give it another try with the whole
24219     # argument.
24220     path="$complete"
24221     arguments="EOL"
24222     new_path="$path"
24223 
24224   windows_path="$new_path"
24225   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24226     unix_path=`$CYGPATH -u "$windows_path"`
24227     new_path="$unix_path"
24228   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24229     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24230     new_path="$unix_path"
24231   fi
24232 
24233 
24234     new_path=`$WHICH "$new_path" 2> /dev/null`
24235 
24236     if test "x$new_path" = x; then
24237       # It's still not found. Now this is an unrecoverable error.
24238       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
24239 $as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
24240       has_space=`$ECHO "$complete" | $GREP " "`
24241       if test "x$has_space" != x; then
24242         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24243 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24244       fi
24245       as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
24246     fi
24247   fi
24248 
24249   # Now new_path has a complete unix path to the binary
24250   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
24251     # Keep paths in /bin as-is, but remove trailing .exe if any
24252     new_path="${new_path/%.exe/}"
24253     # Do not save /bin paths to all_fixpath_prefixes!
24254   else
24255     # Not in mixed or Windows style, start by that.
24256     new_path=`cmd //c echo $new_path`
24257 
24258   input_path="$new_path"
24259   # Check if we need to convert this using DOS-style short mode. If the path
24260   # contains just simple characters, use it. Otherwise (spaces, weird characters),
24261   # take no chances and rewrite it.
24262   # Note: m4 eats our [], so we need to use [ and ] instead.
24263   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24264   if test "x$has_forbidden_chars" != x; then
24265     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24266     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24267   fi
24268 
24269     # Output is in $new_path
24270 
24271   windows_path="$new_path"
24272   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24273     unix_path=`$CYGPATH -u "$windows_path"`
24274     new_path="$unix_path"
24275   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24276     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24277     new_path="$unix_path"
24278   fi
24279 
24280     # remove trailing .exe if any
24281     new_path="${new_path/%.exe/}"
24282 
24283     # Save the first 10 bytes of this path to the storage, so fixpath can work.
24284     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24285   fi
24286 
24287   else
24288     # We're on a posix platform. Hooray! :)
24289     # First separate the path from the arguments. This will split at the first
24290     # space.
24291     complete="$CPP"
24292     path="${complete%% *}"
24293     tmp="$complete EOL"
24294     arguments="${tmp#* }"
24295 
24296     # Cannot rely on the command "which" here since it doesn't always work.
24297     is_absolute_path=`$ECHO "$path" | $GREP ^/`
24298     if test -z "$is_absolute_path"; then
24299       # Path to executable is not absolute. Find it.
24300       IFS_save="$IFS"
24301       IFS=:
24302       for p in $PATH; do
24303         if test -f "$p/$path" && test -x "$p/$path"; then
24304           new_path="$p/$path"
24305           break
24306         fi
24307       done
24308       IFS="$IFS_save"
24309     else
24310       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CPP (as $path) failed, using $path directly." >&5
24311 $as_echo "$as_me: Resolving CPP (as $path) failed, using $path directly." >&6;}
24312       new_path="$path"
24313     fi
24314 
24315     if test "x$new_path" = x; then
24316         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
24317 $as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
24318         has_space=`$ECHO "$complete" | $GREP " "`
24319         if test "x$has_space" != x; then
24320           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
24321 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
24322         fi
24323         as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
24324       fi
24325   fi
24326 
24327       # Now join together the path and the arguments once again
24328       if test "x$arguments" != xEOL; then
24329         new_complete="$new_path ${arguments% *}"
24330       else
24331         new_complete="$new_path"
24332       fi
24333 
24334   if test "x$complete" != "x$new_complete"; then
24335       CPP="$new_complete"
24336       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CPP to \"$new_complete\"" >&5
24337 $as_echo "$as_me: Rewriting CPP to \"$new_complete\"" >&6;}
24338     fi
24339 
24340 
24341 ac_ext=cpp
24342 ac_cpp='$CXXCPP $CPPFLAGS'
24343 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
24344 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
24345 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
24346 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5
24347 $as_echo_n "checking how to run the C++ preprocessor... " >&6; }
24348 if test -z "$CXXCPP"; then
24349   if ${ac_cv_prog_CXXCPP+:} false; then :
24350   $as_echo_n "(cached) " >&6
24351 else
24352       # Double quotes because CXXCPP needs to be expanded
24353     for CXXCPP in "$CXX -E" "/lib/cpp"
24354     do
24355       ac_preproc_ok=false
24356 for ac_cxx_preproc_warn_flag in '' yes
24357 do
24358   # Use a header file that comes with gcc, so configuring glibc
24359   # with a fresh cross-compiler works.
24360   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
24361   # <limits.h> exists even on freestanding compilers.
24362   # On the NeXT, cc -E runs the code through the compiler's parser,
24363   # not just through cpp. "Syntax error" is here to catch this case.
24364   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24365 /* end confdefs.h.  */
24366 #ifdef __STDC__
24367 # include <limits.h>
24368 #else
24369 # include <assert.h>
24370 #endif
24371                      Syntax error
24372 _ACEOF
24373 if ac_fn_cxx_try_cpp "$LINENO"; then :
24374 
24375 else
24376   # Broken: fails on valid input.
24377 continue
24378 fi
24379 rm -f conftest.err conftest.i conftest.$ac_ext
24380 
24381   # OK, works on sane cases.  Now check whether nonexistent headers
24382   # can be detected and how.
24383   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24384 /* end confdefs.h.  */
24385 #include <ac_nonexistent.h>
24386 _ACEOF
24387 if ac_fn_cxx_try_cpp "$LINENO"; then :
24388   # Broken: success on invalid input.
24389 continue
24390 else
24391   # Passes both tests.
24392 ac_preproc_ok=:
24393 break
24394 fi
24395 rm -f conftest.err conftest.i conftest.$ac_ext
24396 
24397 done
24398 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
24399 rm -f conftest.i conftest.err conftest.$ac_ext
24400 if $ac_preproc_ok; then :
24401   break
24402 fi
24403 
24404     done
24405     ac_cv_prog_CXXCPP=$CXXCPP
24406 
24407 fi
24408   CXXCPP=$ac_cv_prog_CXXCPP
24409 else
24410   ac_cv_prog_CXXCPP=$CXXCPP
24411 fi
24412 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5
24413 $as_echo "$CXXCPP" >&6; }
24414 ac_preproc_ok=false
24415 for ac_cxx_preproc_warn_flag in '' yes
24416 do
24417   # Use a header file that comes with gcc, so configuring glibc
24418   # with a fresh cross-compiler works.
24419   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
24420   # <limits.h> exists even on freestanding compilers.
24421   # On the NeXT, cc -E runs the code through the compiler's parser,
24422   # not just through cpp. "Syntax error" is here to catch this case.
24423   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24424 /* end confdefs.h.  */
24425 #ifdef __STDC__
24426 # include <limits.h>
24427 #else
24428 # include <assert.h>
24429 #endif
24430                      Syntax error
24431 _ACEOF
24432 if ac_fn_cxx_try_cpp "$LINENO"; then :
24433 
24434 else
24435   # Broken: fails on valid input.
24436 continue
24437 fi
24438 rm -f conftest.err conftest.i conftest.$ac_ext
24439 
24440   # OK, works on sane cases.  Now check whether nonexistent headers
24441   # can be detected and how.
24442   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24443 /* end confdefs.h.  */
24444 #include <ac_nonexistent.h>
24445 _ACEOF
24446 if ac_fn_cxx_try_cpp "$LINENO"; then :
24447   # Broken: success on invalid input.
24448 continue
24449 else
24450   # Passes both tests.
24451 ac_preproc_ok=:
24452 break
24453 fi
24454 rm -f conftest.err conftest.i conftest.$ac_ext
24455 
24456 done
24457 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
24458 rm -f conftest.i conftest.err conftest.$ac_ext
24459 if $ac_preproc_ok; then :
24460 
24461 else
24462   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
24463 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
24464 as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check
24465 See \`config.log' for more details" "$LINENO" 5; }
24466 fi
24467 
24468 ac_ext=cpp
24469 ac_cpp='$CXXCPP $CPPFLAGS'
24470 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
24471 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
24472 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
24473 
24474 
24475   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24476 
24477   # First separate the path from the arguments. This will split at the first
24478   # space.
24479   complete="$CXXCPP"
24480   path="${complete%% *}"
24481   tmp="$complete EOL"
24482   arguments="${tmp#* }"
24483 
24484   # Input might be given as Windows format, start by converting to
24485   # unix format.
24486   new_path=`$CYGPATH -u "$path"`
24487 
24488   # Now try to locate executable using which
24489   new_path=`$WHICH "$new_path" 2> /dev/null`
24490   # bat and cmd files are not always considered executable in cygwin causing which
24491   # to not find them
24492   if test "x$new_path" = x \
24493            && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24494            && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24495     new_path=`$CYGPATH -u "$path"`
24496   fi
24497   if test "x$new_path" = x; then
24498     # Oops. Which didn't find the executable.
24499     # The splitting of arguments from the executable at a space might have been incorrect,
24500     # since paths with space are more likely in Windows. Give it another try with the whole
24501     # argument.
24502     path="$complete"
24503     arguments="EOL"
24504     new_path=`$CYGPATH -u "$path"`
24505     new_path=`$WHICH "$new_path" 2> /dev/null`
24506     # bat and cmd files are not always considered executable in cygwin causing which
24507     # to not find them
24508     if test "x$new_path" = x \
24509              && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24510              && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24511       new_path=`$CYGPATH -u "$path"`
24512     fi
24513     if test "x$new_path" = x; then
24514       # It's still not found. Now this is an unrecoverable error.
24515       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
24516 $as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
24517       has_space=`$ECHO "$complete" | $GREP " "`
24518       if test "x$has_space" != x; then
24519         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24520 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24521       fi
24522       as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
24523     fi
24524   fi
24525 
24526   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24527   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24528   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24529   # "foo.exe" is OK but "foo" is an error.
24530   #
24531   # This test is therefore slightly more accurate than "test -f" to check for file precense.
24532   # It is also a way to make sure we got the proper file name for the real test later on.
24533   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24534   if test "x$test_shortpath" = x; then
24535     # Short path failed, file does not exist as specified.
24536     # Try adding .exe or .cmd
24537     if test -f "${new_path}.exe"; then
24538        input_to_shortpath="${new_path}.exe"
24539     elif test -f "${new_path}.cmd"; then
24540        input_to_shortpath="${new_path}.cmd"
24541     else
24542       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&5
24543 $as_echo "$as_me: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&6;}
24544       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
24545 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
24546       as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
24547     fi
24548   else
24549     input_to_shortpath="$new_path"
24550   fi
24551 
24552   # Call helper function which possibly converts this using DOS-style short mode.
24553   # If so, the updated path is stored in $new_path.
24554   new_path="$input_to_shortpath"
24555 
24556   input_path="$input_to_shortpath"
24557   # Check if we need to convert this using DOS-style short mode. If the path
24558   # contains just simple characters, use it. Otherwise (spaces, weird characters),
24559   # take no chances and rewrite it.
24560   # Note: m4 eats our [], so we need to use [ and ] instead.
24561   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24562   if test "x$has_forbidden_chars" != x; then
24563     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24564     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24565     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24566     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24567       # Going to short mode and back again did indeed matter. Since short mode is
24568       # case insensitive, let's make it lowercase to improve readability.
24569       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24570       # Now convert it back to Unix-stile (cygpath)
24571       input_path=`$CYGPATH -u "$shortmode_path"`
24572       new_path="$input_path"
24573     fi
24574   fi
24575 
24576   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24577   if test "x$test_cygdrive_prefix" = x; then
24578     # As a simple fix, exclude /usr/bin since it's not a real path.
24579     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
24580       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24581       # a path prefixed by /cygdrive for fixpath to work.
24582       new_path="$CYGWIN_ROOT_PATH$input_path"
24583     fi
24584   fi
24585 
24586   # remove trailing .exe if any
24587   new_path="${new_path/%.exe/}"
24588 
24589   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24590 
24591   # First separate the path from the arguments. This will split at the first
24592   # space.
24593   complete="$CXXCPP"
24594   path="${complete%% *}"
24595   tmp="$complete EOL"
24596   arguments="${tmp#* }"
24597 
24598   # Input might be given as Windows format, start by converting to
24599   # unix format.
24600   new_path="$path"
24601 
24602   windows_path="$new_path"
24603   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24604     unix_path=`$CYGPATH -u "$windows_path"`
24605     new_path="$unix_path"
24606   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24607     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24608     new_path="$unix_path"
24609   fi
24610 
24611 
24612   # Now try to locate executable using which
24613   new_path=`$WHICH "$new_path" 2> /dev/null`
24614 
24615   if test "x$new_path" = x; then
24616     # Oops. Which didn't find the executable.
24617     # The splitting of arguments from the executable at a space might have been incorrect,
24618     # since paths with space are more likely in Windows. Give it another try with the whole
24619     # argument.
24620     path="$complete"
24621     arguments="EOL"
24622     new_path="$path"
24623 
24624   windows_path="$new_path"
24625   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24626     unix_path=`$CYGPATH -u "$windows_path"`
24627     new_path="$unix_path"
24628   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24629     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24630     new_path="$unix_path"
24631   fi
24632 
24633 
24634     new_path=`$WHICH "$new_path" 2> /dev/null`
24635 
24636     if test "x$new_path" = x; then
24637       # It's still not found. Now this is an unrecoverable error.
24638       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
24639 $as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
24640       has_space=`$ECHO "$complete" | $GREP " "`
24641       if test "x$has_space" != x; then
24642         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24643 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24644       fi
24645       as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
24646     fi
24647   fi
24648 
24649   # Now new_path has a complete unix path to the binary
24650   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
24651     # Keep paths in /bin as-is, but remove trailing .exe if any
24652     new_path="${new_path/%.exe/}"
24653     # Do not save /bin paths to all_fixpath_prefixes!
24654   else
24655     # Not in mixed or Windows style, start by that.
24656     new_path=`cmd //c echo $new_path`
24657 
24658   input_path="$new_path"
24659   # Check if we need to convert this using DOS-style short mode. If the path
24660   # contains just simple characters, use it. Otherwise (spaces, weird characters),
24661   # take no chances and rewrite it.
24662   # Note: m4 eats our [], so we need to use [ and ] instead.
24663   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24664   if test "x$has_forbidden_chars" != x; then
24665     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24666     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24667   fi
24668 
24669     # Output is in $new_path
24670 
24671   windows_path="$new_path"
24672   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24673     unix_path=`$CYGPATH -u "$windows_path"`
24674     new_path="$unix_path"
24675   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24676     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24677     new_path="$unix_path"
24678   fi
24679 
24680     # remove trailing .exe if any
24681     new_path="${new_path/%.exe/}"
24682 
24683     # Save the first 10 bytes of this path to the storage, so fixpath can work.
24684     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24685   fi
24686 
24687   else
24688     # We're on a posix platform. Hooray! :)
24689     # First separate the path from the arguments. This will split at the first
24690     # space.
24691     complete="$CXXCPP"
24692     path="${complete%% *}"
24693     tmp="$complete EOL"
24694     arguments="${tmp#* }"
24695 
24696     # Cannot rely on the command "which" here since it doesn't always work.
24697     is_absolute_path=`$ECHO "$path" | $GREP ^/`
24698     if test -z "$is_absolute_path"; then
24699       # Path to executable is not absolute. Find it.
24700       IFS_save="$IFS"
24701       IFS=:
24702       for p in $PATH; do
24703         if test -f "$p/$path" && test -x "$p/$path"; then
24704           new_path="$p/$path"
24705           break
24706         fi
24707       done
24708       IFS="$IFS_save"
24709     else
24710       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CXXCPP (as $path) failed, using $path directly." >&5
24711 $as_echo "$as_me: Resolving CXXCPP (as $path) failed, using $path directly." >&6;}
24712       new_path="$path"
24713     fi
24714 
24715     if test "x$new_path" = x; then
24716         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
24717 $as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
24718         has_space=`$ECHO "$complete" | $GREP " "`
24719         if test "x$has_space" != x; then
24720           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
24721 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
24722         fi
24723         as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
24724       fi
24725   fi
24726 
24727       # Now join together the path and the arguments once again
24728       if test "x$arguments" != xEOL; then
24729         new_complete="$new_path ${arguments% *}"
24730       else
24731         new_complete="$new_path"
24732       fi
24733 
24734   if test "x$complete" != "x$new_complete"; then
24735       CXXCPP="$new_complete"
24736       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXXCPP to \"$new_complete\"" >&5
24737 $as_echo "$as_me: Rewriting CXXCPP to \"$new_complete\"" >&6;}
24738     fi
24739 
24740 
24741 if test "x$COMPILE_TYPE" != "xcross"; then
24742     # If we are not cross compiling, use the same compilers for
24743     # building the build platform executables. The cross-compilation
24744     # case needed to be done earlier, but this can only be done after
24745     # the native tools have been localized.
24746     BUILD_CC="$CC"
24747     BUILD_CXX="$CXX"
24748     BUILD_LD="$LD"
24749 fi
24750 
24751 # for solaris we really need solaris tools, and not gnu equivalent
24752 #   these seems to normally reside in /usr/ccs/bin so add that to path before
24753 #   starting to probe
24754 #
24755 #   NOTE: I add this /usr/ccs/bin after TOOLS but before OLD_PATH
24756 #         so that it can be overriden --with-tools-dir
24757 if test "x$OPENJDK_BUILD_OS" = xsolaris; then
24758     PATH="${TOOLS_DIR}:/usr/ccs/bin:${OLD_PATH}"
24759 fi
24760 
24761 # Find the right assembler.
24762 if test "x$OPENJDK_TARGET_OS" = xsolaris; then
24763     # Extract the first word of "as", so it can be a program name with args.
24764 set dummy as; ac_word=$2
24765 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24766 $as_echo_n "checking for $ac_word... " >&6; }
24767 if ${ac_cv_path_AS+:} false; then :
24768   $as_echo_n "(cached) " >&6
24769 else
24770   case $AS in
24771   [\\/]* | ?:[\\/]*)
24772   ac_cv_path_AS="$AS" # Let the user override the test with a path.
24773   ;;
24774   *)
24775   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24776 for as_dir in $PATH
24777 do
24778   IFS=$as_save_IFS
24779   test -z "$as_dir" && as_dir=.
24780     for ac_exec_ext in '' $ac_executable_extensions; do
24781   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
24782     ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
24783     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24784     break 2
24785   fi
24786 done
24787   done
24788 IFS=$as_save_IFS
24789 
24790   ;;
24791 esac
24792 fi
24793 AS=$ac_cv_path_AS
24794 if test -n "$AS"; then
24795   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
24796 $as_echo "$AS" >&6; }
24797 else
24798   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24799 $as_echo "no" >&6; }
24800 fi
24801 
24802 
24803 
24804   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24805 
24806   # First separate the path from the arguments. This will split at the first
24807   # space.
24808   complete="$AS"
24809   path="${complete%% *}"
24810   tmp="$complete EOL"
24811   arguments="${tmp#* }"
24812 
24813   # Input might be given as Windows format, start by converting to
24814   # unix format.
24815   new_path=`$CYGPATH -u "$path"`
24816 
24817   # Now try to locate executable using which
24818   new_path=`$WHICH "$new_path" 2> /dev/null`
24819   # bat and cmd files are not always considered executable in cygwin causing which
24820   # to not find them
24821   if test "x$new_path" = x \
24822            && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24823            && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24824     new_path=`$CYGPATH -u "$path"`
24825   fi
24826   if test "x$new_path" = x; then
24827     # Oops. Which didn't find the executable.
24828     # The splitting of arguments from the executable at a space might have been incorrect,
24829     # since paths with space are more likely in Windows. Give it another try with the whole
24830     # argument.
24831     path="$complete"
24832     arguments="EOL"
24833     new_path=`$CYGPATH -u "$path"`
24834     new_path=`$WHICH "$new_path" 2> /dev/null`
24835     # bat and cmd files are not always considered executable in cygwin causing which
24836     # to not find them
24837     if test "x$new_path" = x \
24838              && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24839              && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24840       new_path=`$CYGPATH -u "$path"`
24841     fi
24842     if test "x$new_path" = x; then
24843       # It's still not found. Now this is an unrecoverable error.
24844       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
24845 $as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
24846       has_space=`$ECHO "$complete" | $GREP " "`
24847       if test "x$has_space" != x; then
24848         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24849 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24850       fi
24851       as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
24852     fi
24853   fi
24854 
24855   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24856   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24857   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24858   # "foo.exe" is OK but "foo" is an error.
24859   #
24860   # This test is therefore slightly more accurate than "test -f" to check for file precense.
24861   # It is also a way to make sure we got the proper file name for the real test later on.
24862   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24863   if test "x$test_shortpath" = x; then
24864     # Short path failed, file does not exist as specified.
24865     # Try adding .exe or .cmd
24866     if test -f "${new_path}.exe"; then
24867        input_to_shortpath="${new_path}.exe"
24868     elif test -f "${new_path}.cmd"; then
24869        input_to_shortpath="${new_path}.cmd"
24870     else
24871       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$new_path\", is invalid." >&5
24872 $as_echo "$as_me: The path of AS, which resolves as \"$new_path\", is invalid." >&6;}
24873       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
24874 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
24875       as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
24876     fi
24877   else
24878     input_to_shortpath="$new_path"
24879   fi
24880 
24881   # Call helper function which possibly converts this using DOS-style short mode.
24882   # If so, the updated path is stored in $new_path.
24883   new_path="$input_to_shortpath"
24884 
24885   input_path="$input_to_shortpath"
24886   # Check if we need to convert this using DOS-style short mode. If the path
24887   # contains just simple characters, use it. Otherwise (spaces, weird characters),
24888   # take no chances and rewrite it.
24889   # Note: m4 eats our [], so we need to use [ and ] instead.
24890   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24891   if test "x$has_forbidden_chars" != x; then
24892     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24893     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24894     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24895     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24896       # Going to short mode and back again did indeed matter. Since short mode is
24897       # case insensitive, let's make it lowercase to improve readability.
24898       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24899       # Now convert it back to Unix-stile (cygpath)
24900       input_path=`$CYGPATH -u "$shortmode_path"`
24901       new_path="$input_path"
24902     fi
24903   fi
24904 
24905   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24906   if test "x$test_cygdrive_prefix" = x; then
24907     # As a simple fix, exclude /usr/bin since it's not a real path.
24908     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
24909       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24910       # a path prefixed by /cygdrive for fixpath to work.
24911       new_path="$CYGWIN_ROOT_PATH$input_path"
24912     fi
24913   fi
24914 
24915   # remove trailing .exe if any
24916   new_path="${new_path/%.exe/}"
24917 
24918   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24919 
24920   # First separate the path from the arguments. This will split at the first
24921   # space.
24922   complete="$AS"
24923   path="${complete%% *}"
24924   tmp="$complete EOL"
24925   arguments="${tmp#* }"
24926 
24927   # Input might be given as Windows format, start by converting to
24928   # unix format.
24929   new_path="$path"
24930 
24931   windows_path="$new_path"
24932   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24933     unix_path=`$CYGPATH -u "$windows_path"`
24934     new_path="$unix_path"
24935   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24936     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24937     new_path="$unix_path"
24938   fi
24939 
24940 
24941   # Now try to locate executable using which
24942   new_path=`$WHICH "$new_path" 2> /dev/null`
24943 
24944   if test "x$new_path" = x; then
24945     # Oops. Which didn't find the executable.
24946     # The splitting of arguments from the executable at a space might have been incorrect,
24947     # since paths with space are more likely in Windows. Give it another try with the whole
24948     # argument.
24949     path="$complete"
24950     arguments="EOL"
24951     new_path="$path"
24952 
24953   windows_path="$new_path"
24954   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24955     unix_path=`$CYGPATH -u "$windows_path"`
24956     new_path="$unix_path"
24957   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24958     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24959     new_path="$unix_path"
24960   fi
24961 
24962 
24963     new_path=`$WHICH "$new_path" 2> /dev/null`
24964 
24965     if test "x$new_path" = x; then
24966       # It's still not found. Now this is an unrecoverable error.
24967       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
24968 $as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
24969       has_space=`$ECHO "$complete" | $GREP " "`
24970       if test "x$has_space" != x; then
24971         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24972 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24973       fi
24974       as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
24975     fi
24976   fi
24977 
24978   # Now new_path has a complete unix path to the binary
24979   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
24980     # Keep paths in /bin as-is, but remove trailing .exe if any
24981     new_path="${new_path/%.exe/}"
24982     # Do not save /bin paths to all_fixpath_prefixes!
24983   else
24984     # Not in mixed or Windows style, start by that.
24985     new_path=`cmd //c echo $new_path`
24986 
24987   input_path="$new_path"
24988   # Check if we need to convert this using DOS-style short mode. If the path
24989   # contains just simple characters, use it. Otherwise (spaces, weird characters),
24990   # take no chances and rewrite it.
24991   # Note: m4 eats our [], so we need to use [ and ] instead.
24992   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24993   if test "x$has_forbidden_chars" != x; then
24994     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24995     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24996   fi
24997 
24998     # Output is in $new_path
24999 
25000   windows_path="$new_path"
25001   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25002     unix_path=`$CYGPATH -u "$windows_path"`
25003     new_path="$unix_path"
25004   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25005     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25006     new_path="$unix_path"
25007   fi
25008 
25009     # remove trailing .exe if any
25010     new_path="${new_path/%.exe/}"
25011 
25012     # Save the first 10 bytes of this path to the storage, so fixpath can work.
25013     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25014   fi
25015 
25016   else
25017     # We're on a posix platform. Hooray! :)
25018     # First separate the path from the arguments. This will split at the first
25019     # space.
25020     complete="$AS"
25021     path="${complete%% *}"
25022     tmp="$complete EOL"
25023     arguments="${tmp#* }"
25024 
25025     # Cannot rely on the command "which" here since it doesn't always work.
25026     is_absolute_path=`$ECHO "$path" | $GREP ^/`
25027     if test -z "$is_absolute_path"; then
25028       # Path to executable is not absolute. Find it.
25029       IFS_save="$IFS"
25030       IFS=:
25031       for p in $PATH; do
25032         if test -f "$p/$path" && test -x "$p/$path"; then
25033           new_path="$p/$path"
25034           break
25035         fi
25036       done
25037       IFS="$IFS_save"
25038     else
25039       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving AS (as $path) failed, using $path directly." >&5
25040 $as_echo "$as_me: Resolving AS (as $path) failed, using $path directly." >&6;}
25041       new_path="$path"
25042     fi
25043 
25044     if test "x$new_path" = x; then
25045         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
25046 $as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
25047         has_space=`$ECHO "$complete" | $GREP " "`
25048         if test "x$has_space" != x; then
25049           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
25050 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
25051         fi
25052         as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
25053       fi
25054   fi
25055 
25056       # Now join together the path and the arguments once again
25057       if test "x$arguments" != xEOL; then
25058         new_complete="$new_path ${arguments% *}"
25059       else
25060         new_complete="$new_path"
25061       fi
25062 
25063   if test "x$complete" != "x$new_complete"; then
25064       AS="$new_complete"
25065       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AS to \"$new_complete\"" >&5
25066 $as_echo "$as_me: Rewriting AS to \"$new_complete\"" >&6;}
25067     fi
25068 
25069 else
25070     AS="$CC -c"
25071 fi
25072 
25073 
25074 if test "x$OPENJDK_TARGET_OS" = xsolaris; then
25075     for ac_prog in gnm nm
25076 do
25077   # Extract the first word of "$ac_prog", so it can be a program name with args.
25078 set dummy $ac_prog; ac_word=$2
25079 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25080 $as_echo_n "checking for $ac_word... " >&6; }
25081 if ${ac_cv_path_NM+:} false; then :
25082   $as_echo_n "(cached) " >&6
25083 else
25084   case $NM in
25085   [\\/]* | ?:[\\/]*)
25086   ac_cv_path_NM="$NM" # Let the user override the test with a path.
25087   ;;
25088   *)
25089   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25090 for as_dir in $PATH
25091 do
25092   IFS=$as_save_IFS
25093   test -z "$as_dir" && as_dir=.
25094     for ac_exec_ext in '' $ac_executable_extensions; do
25095   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
25096     ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
25097     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25098     break 2
25099   fi
25100 done
25101   done
25102 IFS=$as_save_IFS
25103 
25104   ;;
25105 esac
25106 fi
25107 NM=$ac_cv_path_NM
25108 if test -n "$NM"; then
25109   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
25110 $as_echo "$NM" >&6; }
25111 else
25112   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25113 $as_echo "no" >&6; }
25114 fi
25115 
25116 
25117   test -n "$NM" && break
25118 done
25119 
25120 
25121   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25122 
25123   # First separate the path from the arguments. This will split at the first
25124   # space.
25125   complete="$NM"
25126   path="${complete%% *}"
25127   tmp="$complete EOL"
25128   arguments="${tmp#* }"
25129 
25130   # Input might be given as Windows format, start by converting to
25131   # unix format.
25132   new_path=`$CYGPATH -u "$path"`
25133 
25134   # Now try to locate executable using which
25135   new_path=`$WHICH "$new_path" 2> /dev/null`
25136   # bat and cmd files are not always considered executable in cygwin causing which
25137   # to not find them
25138   if test "x$new_path" = x \
25139            && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25140            && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25141     new_path=`$CYGPATH -u "$path"`
25142   fi
25143   if test "x$new_path" = x; then
25144     # Oops. Which didn't find the executable.
25145     # The splitting of arguments from the executable at a space might have been incorrect,
25146     # since paths with space are more likely in Windows. Give it another try with the whole
25147     # argument.
25148     path="$complete"
25149     arguments="EOL"
25150     new_path=`$CYGPATH -u "$path"`
25151     new_path=`$WHICH "$new_path" 2> /dev/null`
25152     # bat and cmd files are not always considered executable in cygwin causing which
25153     # to not find them
25154     if test "x$new_path" = x \
25155              && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25156              && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25157       new_path=`$CYGPATH -u "$path"`
25158     fi
25159     if test "x$new_path" = x; then
25160       # It's still not found. Now this is an unrecoverable error.
25161       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
25162 $as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
25163       has_space=`$ECHO "$complete" | $GREP " "`
25164       if test "x$has_space" != x; then
25165         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25166 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25167       fi
25168       as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
25169     fi
25170   fi
25171 
25172   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25173   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25174   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25175   # "foo.exe" is OK but "foo" is an error.
25176   #
25177   # This test is therefore slightly more accurate than "test -f" to check for file precense.
25178   # It is also a way to make sure we got the proper file name for the real test later on.
25179   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25180   if test "x$test_shortpath" = x; then
25181     # Short path failed, file does not exist as specified.
25182     # Try adding .exe or .cmd
25183     if test -f "${new_path}.exe"; then
25184        input_to_shortpath="${new_path}.exe"
25185     elif test -f "${new_path}.cmd"; then
25186        input_to_shortpath="${new_path}.cmd"
25187     else
25188       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
25189 $as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
25190       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
25191 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
25192       as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
25193     fi
25194   else
25195     input_to_shortpath="$new_path"
25196   fi
25197 
25198   # Call helper function which possibly converts this using DOS-style short mode.
25199   # If so, the updated path is stored in $new_path.
25200   new_path="$input_to_shortpath"
25201 
25202   input_path="$input_to_shortpath"
25203   # Check if we need to convert this using DOS-style short mode. If the path
25204   # contains just simple characters, use it. Otherwise (spaces, weird characters),
25205   # take no chances and rewrite it.
25206   # Note: m4 eats our [], so we need to use [ and ] instead.
25207   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25208   if test "x$has_forbidden_chars" != x; then
25209     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25210     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25211     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25212     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25213       # Going to short mode and back again did indeed matter. Since short mode is
25214       # case insensitive, let's make it lowercase to improve readability.
25215       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25216       # Now convert it back to Unix-stile (cygpath)
25217       input_path=`$CYGPATH -u "$shortmode_path"`
25218       new_path="$input_path"
25219     fi
25220   fi
25221 
25222   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25223   if test "x$test_cygdrive_prefix" = x; then
25224     # As a simple fix, exclude /usr/bin since it's not a real path.
25225     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
25226       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25227       # a path prefixed by /cygdrive for fixpath to work.
25228       new_path="$CYGWIN_ROOT_PATH$input_path"
25229     fi
25230   fi
25231 
25232   # remove trailing .exe if any
25233   new_path="${new_path/%.exe/}"
25234 
25235   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25236 
25237   # First separate the path from the arguments. This will split at the first
25238   # space.
25239   complete="$NM"
25240   path="${complete%% *}"
25241   tmp="$complete EOL"
25242   arguments="${tmp#* }"
25243 
25244   # Input might be given as Windows format, start by converting to
25245   # unix format.
25246   new_path="$path"
25247 
25248   windows_path="$new_path"
25249   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25250     unix_path=`$CYGPATH -u "$windows_path"`
25251     new_path="$unix_path"
25252   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25253     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25254     new_path="$unix_path"
25255   fi
25256 
25257 
25258   # Now try to locate executable using which
25259   new_path=`$WHICH "$new_path" 2> /dev/null`
25260 
25261   if test "x$new_path" = x; then
25262     # Oops. Which didn't find the executable.
25263     # The splitting of arguments from the executable at a space might have been incorrect,
25264     # since paths with space are more likely in Windows. Give it another try with the whole
25265     # argument.
25266     path="$complete"
25267     arguments="EOL"
25268     new_path="$path"
25269 
25270   windows_path="$new_path"
25271   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25272     unix_path=`$CYGPATH -u "$windows_path"`
25273     new_path="$unix_path"
25274   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25275     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25276     new_path="$unix_path"
25277   fi
25278 
25279 
25280     new_path=`$WHICH "$new_path" 2> /dev/null`
25281 
25282     if test "x$new_path" = x; then
25283       # It's still not found. Now this is an unrecoverable error.
25284       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
25285 $as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
25286       has_space=`$ECHO "$complete" | $GREP " "`
25287       if test "x$has_space" != x; then
25288         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25289 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25290       fi
25291       as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
25292     fi
25293   fi
25294 
25295   # Now new_path has a complete unix path to the binary
25296   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
25297     # Keep paths in /bin as-is, but remove trailing .exe if any
25298     new_path="${new_path/%.exe/}"
25299     # Do not save /bin paths to all_fixpath_prefixes!
25300   else
25301     # Not in mixed or Windows style, start by that.
25302     new_path=`cmd //c echo $new_path`
25303 
25304   input_path="$new_path"
25305   # Check if we need to convert this using DOS-style short mode. If the path
25306   # contains just simple characters, use it. Otherwise (spaces, weird characters),
25307   # take no chances and rewrite it.
25308   # Note: m4 eats our [], so we need to use [ and ] instead.
25309   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25310   if test "x$has_forbidden_chars" != x; then
25311     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25312     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25313   fi
25314 
25315     # Output is in $new_path
25316 
25317   windows_path="$new_path"
25318   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25319     unix_path=`$CYGPATH -u "$windows_path"`
25320     new_path="$unix_path"
25321   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25322     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25323     new_path="$unix_path"
25324   fi
25325 
25326     # remove trailing .exe if any
25327     new_path="${new_path/%.exe/}"
25328 
25329     # Save the first 10 bytes of this path to the storage, so fixpath can work.
25330     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25331   fi
25332 
25333   else
25334     # We're on a posix platform. Hooray! :)
25335     # First separate the path from the arguments. This will split at the first
25336     # space.
25337     complete="$NM"
25338     path="${complete%% *}"
25339     tmp="$complete EOL"
25340     arguments="${tmp#* }"
25341 
25342     # Cannot rely on the command "which" here since it doesn't always work.
25343     is_absolute_path=`$ECHO "$path" | $GREP ^/`
25344     if test -z "$is_absolute_path"; then
25345       # Path to executable is not absolute. Find it.
25346       IFS_save="$IFS"
25347       IFS=:
25348       for p in $PATH; do
25349         if test -f "$p/$path" && test -x "$p/$path"; then
25350           new_path="$p/$path"
25351           break
25352         fi
25353       done
25354       IFS="$IFS_save"
25355     else
25356       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving NM (as $path) failed, using $path directly." >&5
25357 $as_echo "$as_me: Resolving NM (as $path) failed, using $path directly." >&6;}
25358       new_path="$path"
25359     fi
25360 
25361     if test "x$new_path" = x; then
25362         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
25363 $as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
25364         has_space=`$ECHO "$complete" | $GREP " "`
25365         if test "x$has_space" != x; then
25366           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
25367 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
25368         fi
25369         as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
25370       fi
25371   fi
25372 
25373       # Now join together the path and the arguments once again
25374       if test "x$arguments" != xEOL; then
25375         new_complete="$new_path ${arguments% *}"
25376       else
25377         new_complete="$new_path"
25378       fi
25379 
25380   if test "x$complete" != "x$new_complete"; then
25381       NM="$new_complete"
25382       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
25383 $as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
25384     fi
25385 
25386     # Extract the first word of "strip", so it can be a program name with args.
25387 set dummy strip; ac_word=$2
25388 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25389 $as_echo_n "checking for $ac_word... " >&6; }
25390 if ${ac_cv_path_STRIP+:} false; then :
25391   $as_echo_n "(cached) " >&6
25392 else
25393   case $STRIP in
25394   [\\/]* | ?:[\\/]*)
25395   ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
25396   ;;
25397   *)
25398   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25399 for as_dir in $PATH
25400 do
25401   IFS=$as_save_IFS
25402   test -z "$as_dir" && as_dir=.
25403     for ac_exec_ext in '' $ac_executable_extensions; do
25404   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
25405     ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
25406     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25407     break 2
25408   fi
25409 done
25410   done
25411 IFS=$as_save_IFS
25412 
25413   ;;
25414 esac
25415 fi
25416 STRIP=$ac_cv_path_STRIP
25417 if test -n "$STRIP"; then
25418   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
25419 $as_echo "$STRIP" >&6; }
25420 else
25421   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25422 $as_echo "no" >&6; }
25423 fi
25424 
25425 
25426 
25427   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25428 
25429   # First separate the path from the arguments. This will split at the first
25430   # space.
25431   complete="$STRIP"
25432   path="${complete%% *}"
25433   tmp="$complete EOL"
25434   arguments="${tmp#* }"
25435 
25436   # Input might be given as Windows format, start by converting to
25437   # unix format.
25438   new_path=`$CYGPATH -u "$path"`
25439 
25440   # Now try to locate executable using which
25441   new_path=`$WHICH "$new_path" 2> /dev/null`
25442   # bat and cmd files are not always considered executable in cygwin causing which
25443   # to not find them
25444   if test "x$new_path" = x \
25445            && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25446            && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25447     new_path=`$CYGPATH -u "$path"`
25448   fi
25449   if test "x$new_path" = x; then
25450     # Oops. Which didn't find the executable.
25451     # The splitting of arguments from the executable at a space might have been incorrect,
25452     # since paths with space are more likely in Windows. Give it another try with the whole
25453     # argument.
25454     path="$complete"
25455     arguments="EOL"
25456     new_path=`$CYGPATH -u "$path"`
25457     new_path=`$WHICH "$new_path" 2> /dev/null`
25458     # bat and cmd files are not always considered executable in cygwin causing which
25459     # to not find them
25460     if test "x$new_path" = x \
25461              && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25462              && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25463       new_path=`$CYGPATH -u "$path"`
25464     fi
25465     if test "x$new_path" = x; then
25466       # It's still not found. Now this is an unrecoverable error.
25467       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
25468 $as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
25469       has_space=`$ECHO "$complete" | $GREP " "`
25470       if test "x$has_space" != x; then
25471         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25472 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25473       fi
25474       as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
25475     fi
25476   fi
25477 
25478   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25479   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25480   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25481   # "foo.exe" is OK but "foo" is an error.
25482   #
25483   # This test is therefore slightly more accurate than "test -f" to check for file precense.
25484   # It is also a way to make sure we got the proper file name for the real test later on.
25485   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25486   if test "x$test_shortpath" = x; then
25487     # Short path failed, file does not exist as specified.
25488     # Try adding .exe or .cmd
25489     if test -f "${new_path}.exe"; then
25490        input_to_shortpath="${new_path}.exe"
25491     elif test -f "${new_path}.cmd"; then
25492        input_to_shortpath="${new_path}.cmd"
25493     else
25494       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
25495 $as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
25496       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
25497 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
25498       as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
25499     fi
25500   else
25501     input_to_shortpath="$new_path"
25502   fi
25503 
25504   # Call helper function which possibly converts this using DOS-style short mode.
25505   # If so, the updated path is stored in $new_path.
25506   new_path="$input_to_shortpath"
25507 
25508   input_path="$input_to_shortpath"
25509   # Check if we need to convert this using DOS-style short mode. If the path
25510   # contains just simple characters, use it. Otherwise (spaces, weird characters),
25511   # take no chances and rewrite it.
25512   # Note: m4 eats our [], so we need to use [ and ] instead.
25513   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25514   if test "x$has_forbidden_chars" != x; then
25515     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25516     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25517     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25518     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25519       # Going to short mode and back again did indeed matter. Since short mode is
25520       # case insensitive, let's make it lowercase to improve readability.
25521       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25522       # Now convert it back to Unix-stile (cygpath)
25523       input_path=`$CYGPATH -u "$shortmode_path"`
25524       new_path="$input_path"
25525     fi
25526   fi
25527 
25528   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25529   if test "x$test_cygdrive_prefix" = x; then
25530     # As a simple fix, exclude /usr/bin since it's not a real path.
25531     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
25532       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25533       # a path prefixed by /cygdrive for fixpath to work.
25534       new_path="$CYGWIN_ROOT_PATH$input_path"
25535     fi
25536   fi
25537 
25538   # remove trailing .exe if any
25539   new_path="${new_path/%.exe/}"
25540 
25541   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25542 
25543   # First separate the path from the arguments. This will split at the first
25544   # space.
25545   complete="$STRIP"
25546   path="${complete%% *}"
25547   tmp="$complete EOL"
25548   arguments="${tmp#* }"
25549 
25550   # Input might be given as Windows format, start by converting to
25551   # unix format.
25552   new_path="$path"
25553 
25554   windows_path="$new_path"
25555   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25556     unix_path=`$CYGPATH -u "$windows_path"`
25557     new_path="$unix_path"
25558   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25559     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25560     new_path="$unix_path"
25561   fi
25562 
25563 
25564   # Now try to locate executable using which
25565   new_path=`$WHICH "$new_path" 2> /dev/null`
25566 
25567   if test "x$new_path" = x; then
25568     # Oops. Which didn't find the executable.
25569     # The splitting of arguments from the executable at a space might have been incorrect,
25570     # since paths with space are more likely in Windows. Give it another try with the whole
25571     # argument.
25572     path="$complete"
25573     arguments="EOL"
25574     new_path="$path"
25575 
25576   windows_path="$new_path"
25577   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25578     unix_path=`$CYGPATH -u "$windows_path"`
25579     new_path="$unix_path"
25580   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25581     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25582     new_path="$unix_path"
25583   fi
25584 
25585 
25586     new_path=`$WHICH "$new_path" 2> /dev/null`
25587 
25588     if test "x$new_path" = x; then
25589       # It's still not found. Now this is an unrecoverable error.
25590       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
25591 $as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
25592       has_space=`$ECHO "$complete" | $GREP " "`
25593       if test "x$has_space" != x; then
25594         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25595 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25596       fi
25597       as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
25598     fi
25599   fi
25600 
25601   # Now new_path has a complete unix path to the binary
25602   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
25603     # Keep paths in /bin as-is, but remove trailing .exe if any
25604     new_path="${new_path/%.exe/}"
25605     # Do not save /bin paths to all_fixpath_prefixes!
25606   else
25607     # Not in mixed or Windows style, start by that.
25608     new_path=`cmd //c echo $new_path`
25609 
25610   input_path="$new_path"
25611   # Check if we need to convert this using DOS-style short mode. If the path
25612   # contains just simple characters, use it. Otherwise (spaces, weird characters),
25613   # take no chances and rewrite it.
25614   # Note: m4 eats our [], so we need to use [ and ] instead.
25615   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25616   if test "x$has_forbidden_chars" != x; then
25617     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25618     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25619   fi
25620 
25621     # Output is in $new_path
25622 
25623   windows_path="$new_path"
25624   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25625     unix_path=`$CYGPATH -u "$windows_path"`
25626     new_path="$unix_path"
25627   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25628     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25629     new_path="$unix_path"
25630   fi
25631 
25632     # remove trailing .exe if any
25633     new_path="${new_path/%.exe/}"
25634 
25635     # Save the first 10 bytes of this path to the storage, so fixpath can work.
25636     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25637   fi
25638 
25639   else
25640     # We're on a posix platform. Hooray! :)
25641     # First separate the path from the arguments. This will split at the first
25642     # space.
25643     complete="$STRIP"
25644     path="${complete%% *}"
25645     tmp="$complete EOL"
25646     arguments="${tmp#* }"
25647 
25648     # Cannot rely on the command "which" here since it doesn't always work.
25649     is_absolute_path=`$ECHO "$path" | $GREP ^/`
25650     if test -z "$is_absolute_path"; then
25651       # Path to executable is not absolute. Find it.
25652       IFS_save="$IFS"
25653       IFS=:
25654       for p in $PATH; do
25655         if test -f "$p/$path" && test -x "$p/$path"; then
25656           new_path="$p/$path"
25657           break
25658         fi
25659       done
25660       IFS="$IFS_save"
25661     else
25662       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving STRIP (as $path) failed, using $path directly." >&5
25663 $as_echo "$as_me: Resolving STRIP (as $path) failed, using $path directly." >&6;}
25664       new_path="$path"
25665     fi
25666 
25667     if test "x$new_path" = x; then
25668         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
25669 $as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
25670         has_space=`$ECHO "$complete" | $GREP " "`
25671         if test "x$has_space" != x; then
25672           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
25673 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
25674         fi
25675         as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
25676       fi
25677   fi
25678 
25679       # Now join together the path and the arguments once again
25680       if test "x$arguments" != xEOL; then
25681         new_complete="$new_path ${arguments% *}"
25682       else
25683         new_complete="$new_path"
25684       fi
25685 
25686   if test "x$complete" != "x$new_complete"; then
25687       STRIP="$new_complete"
25688       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
25689 $as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
25690     fi
25691 
25692     # Extract the first word of "mcs", so it can be a program name with args.
25693 set dummy mcs; ac_word=$2
25694 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25695 $as_echo_n "checking for $ac_word... " >&6; }
25696 if ${ac_cv_path_MCS+:} false; then :
25697   $as_echo_n "(cached) " >&6
25698 else
25699   case $MCS in
25700   [\\/]* | ?:[\\/]*)
25701   ac_cv_path_MCS="$MCS" # Let the user override the test with a path.
25702   ;;
25703   *)
25704   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25705 for as_dir in $PATH
25706 do
25707   IFS=$as_save_IFS
25708   test -z "$as_dir" && as_dir=.
25709     for ac_exec_ext in '' $ac_executable_extensions; do
25710   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
25711     ac_cv_path_MCS="$as_dir/$ac_word$ac_exec_ext"
25712     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25713     break 2
25714   fi
25715 done
25716   done
25717 IFS=$as_save_IFS
25718 
25719   ;;
25720 esac
25721 fi
25722 MCS=$ac_cv_path_MCS
25723 if test -n "$MCS"; then
25724   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MCS" >&5
25725 $as_echo "$MCS" >&6; }
25726 else
25727   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25728 $as_echo "no" >&6; }
25729 fi
25730 
25731 
25732 
25733   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25734 
25735   # First separate the path from the arguments. This will split at the first
25736   # space.
25737   complete="$MCS"
25738   path="${complete%% *}"
25739   tmp="$complete EOL"
25740   arguments="${tmp#* }"
25741 
25742   # Input might be given as Windows format, start by converting to
25743   # unix format.
25744   new_path=`$CYGPATH -u "$path"`
25745 
25746   # Now try to locate executable using which
25747   new_path=`$WHICH "$new_path" 2> /dev/null`
25748   # bat and cmd files are not always considered executable in cygwin causing which
25749   # to not find them
25750   if test "x$new_path" = x \
25751            && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25752            && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25753     new_path=`$CYGPATH -u "$path"`
25754   fi
25755   if test "x$new_path" = x; then
25756     # Oops. Which didn't find the executable.
25757     # The splitting of arguments from the executable at a space might have been incorrect,
25758     # since paths with space are more likely in Windows. Give it another try with the whole
25759     # argument.
25760     path="$complete"
25761     arguments="EOL"
25762     new_path=`$CYGPATH -u "$path"`
25763     new_path=`$WHICH "$new_path" 2> /dev/null`
25764     # bat and cmd files are not always considered executable in cygwin causing which
25765     # to not find them
25766     if test "x$new_path" = x \
25767              && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25768              && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25769       new_path=`$CYGPATH -u "$path"`
25770     fi
25771     if test "x$new_path" = x; then
25772       # It's still not found. Now this is an unrecoverable error.
25773       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
25774 $as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
25775       has_space=`$ECHO "$complete" | $GREP " "`
25776       if test "x$has_space" != x; then
25777         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25778 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25779       fi
25780       as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
25781     fi
25782   fi
25783 
25784   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25785   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25786   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25787   # "foo.exe" is OK but "foo" is an error.
25788   #
25789   # This test is therefore slightly more accurate than "test -f" to check for file precense.
25790   # It is also a way to make sure we got the proper file name for the real test later on.
25791   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25792   if test "x$test_shortpath" = x; then
25793     # Short path failed, file does not exist as specified.
25794     # Try adding .exe or .cmd
25795     if test -f "${new_path}.exe"; then
25796        input_to_shortpath="${new_path}.exe"
25797     elif test -f "${new_path}.cmd"; then
25798        input_to_shortpath="${new_path}.cmd"
25799     else
25800       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$new_path\", is invalid." >&5
25801 $as_echo "$as_me: The path of MCS, which resolves as \"$new_path\", is invalid." >&6;}
25802       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
25803 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
25804       as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
25805     fi
25806   else
25807     input_to_shortpath="$new_path"
25808   fi
25809 
25810   # Call helper function which possibly converts this using DOS-style short mode.
25811   # If so, the updated path is stored in $new_path.
25812   new_path="$input_to_shortpath"
25813 
25814   input_path="$input_to_shortpath"
25815   # Check if we need to convert this using DOS-style short mode. If the path
25816   # contains just simple characters, use it. Otherwise (spaces, weird characters),
25817   # take no chances and rewrite it.
25818   # Note: m4 eats our [], so we need to use [ and ] instead.
25819   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25820   if test "x$has_forbidden_chars" != x; then
25821     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25822     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25823     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25824     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25825       # Going to short mode and back again did indeed matter. Since short mode is
25826       # case insensitive, let's make it lowercase to improve readability.
25827       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25828       # Now convert it back to Unix-stile (cygpath)
25829       input_path=`$CYGPATH -u "$shortmode_path"`
25830       new_path="$input_path"
25831     fi
25832   fi
25833 
25834   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25835   if test "x$test_cygdrive_prefix" = x; then
25836     # As a simple fix, exclude /usr/bin since it's not a real path.
25837     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
25838       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25839       # a path prefixed by /cygdrive for fixpath to work.
25840       new_path="$CYGWIN_ROOT_PATH$input_path"
25841     fi
25842   fi
25843 
25844   # remove trailing .exe if any
25845   new_path="${new_path/%.exe/}"
25846 
25847   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25848 
25849   # First separate the path from the arguments. This will split at the first
25850   # space.
25851   complete="$MCS"
25852   path="${complete%% *}"
25853   tmp="$complete EOL"
25854   arguments="${tmp#* }"
25855 
25856   # Input might be given as Windows format, start by converting to
25857   # unix format.
25858   new_path="$path"
25859 
25860   windows_path="$new_path"
25861   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25862     unix_path=`$CYGPATH -u "$windows_path"`
25863     new_path="$unix_path"
25864   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25865     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25866     new_path="$unix_path"
25867   fi
25868 
25869 
25870   # Now try to locate executable using which
25871   new_path=`$WHICH "$new_path" 2> /dev/null`
25872 
25873   if test "x$new_path" = x; then
25874     # Oops. Which didn't find the executable.
25875     # The splitting of arguments from the executable at a space might have been incorrect,
25876     # since paths with space are more likely in Windows. Give it another try with the whole
25877     # argument.
25878     path="$complete"
25879     arguments="EOL"
25880     new_path="$path"
25881 
25882   windows_path="$new_path"
25883   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25884     unix_path=`$CYGPATH -u "$windows_path"`
25885     new_path="$unix_path"
25886   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25887     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25888     new_path="$unix_path"
25889   fi
25890 
25891 
25892     new_path=`$WHICH "$new_path" 2> /dev/null`
25893 
25894     if test "x$new_path" = x; then
25895       # It's still not found. Now this is an unrecoverable error.
25896       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
25897 $as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
25898       has_space=`$ECHO "$complete" | $GREP " "`
25899       if test "x$has_space" != x; then
25900         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25901 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25902       fi
25903       as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
25904     fi
25905   fi
25906 
25907   # Now new_path has a complete unix path to the binary
25908   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
25909     # Keep paths in /bin as-is, but remove trailing .exe if any
25910     new_path="${new_path/%.exe/}"
25911     # Do not save /bin paths to all_fixpath_prefixes!
25912   else
25913     # Not in mixed or Windows style, start by that.
25914     new_path=`cmd //c echo $new_path`
25915 
25916   input_path="$new_path"
25917   # Check if we need to convert this using DOS-style short mode. If the path
25918   # contains just simple characters, use it. Otherwise (spaces, weird characters),
25919   # take no chances and rewrite it.
25920   # Note: m4 eats our [], so we need to use [ and ] instead.
25921   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25922   if test "x$has_forbidden_chars" != x; then
25923     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25924     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25925   fi
25926 
25927     # Output is in $new_path
25928 
25929   windows_path="$new_path"
25930   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25931     unix_path=`$CYGPATH -u "$windows_path"`
25932     new_path="$unix_path"
25933   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25934     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25935     new_path="$unix_path"
25936   fi
25937 
25938     # remove trailing .exe if any
25939     new_path="${new_path/%.exe/}"
25940 
25941     # Save the first 10 bytes of this path to the storage, so fixpath can work.
25942     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25943   fi
25944 
25945   else
25946     # We're on a posix platform. Hooray! :)
25947     # First separate the path from the arguments. This will split at the first
25948     # space.
25949     complete="$MCS"
25950     path="${complete%% *}"
25951     tmp="$complete EOL"
25952     arguments="${tmp#* }"
25953 
25954     # Cannot rely on the command "which" here since it doesn't always work.
25955     is_absolute_path=`$ECHO "$path" | $GREP ^/`
25956     if test -z "$is_absolute_path"; then
25957       # Path to executable is not absolute. Find it.
25958       IFS_save="$IFS"
25959       IFS=:
25960       for p in $PATH; do
25961         if test -f "$p/$path" && test -x "$p/$path"; then
25962           new_path="$p/$path"
25963           break
25964         fi
25965       done
25966       IFS="$IFS_save"
25967     else
25968       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving MCS (as $path) failed, using $path directly." >&5
25969 $as_echo "$as_me: Resolving MCS (as $path) failed, using $path directly." >&6;}
25970       new_path="$path"
25971     fi
25972 
25973     if test "x$new_path" = x; then
25974         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
25975 $as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
25976         has_space=`$ECHO "$complete" | $GREP " "`
25977         if test "x$has_space" != x; then
25978           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
25979 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
25980         fi
25981         as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
25982       fi
25983   fi
25984 
25985       # Now join together the path and the arguments once again
25986       if test "x$arguments" != xEOL; then
25987         new_complete="$new_path ${arguments% *}"
25988       else
25989         new_complete="$new_path"
25990       fi
25991 
25992   if test "x$complete" != "x$new_complete"; then
25993       MCS="$new_complete"
25994       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MCS to \"$new_complete\"" >&5
25995 $as_echo "$as_me: Rewriting MCS to \"$new_complete\"" >&6;}
25996     fi
25997 
25998 elif test "x$OPENJDK_TARGET_OS" != xwindows; then
25999     if test -n "$ac_tool_prefix"; then
26000   # Extract the first word of "${ac_tool_prefix}nm", so it can be a program name with args.
26001 set dummy ${ac_tool_prefix}nm; ac_word=$2
26002 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26003 $as_echo_n "checking for $ac_word... " >&6; }
26004 if ${ac_cv_prog_NM+:} false; then :
26005   $as_echo_n "(cached) " >&6
26006 else
26007   if test -n "$NM"; then
26008   ac_cv_prog_NM="$NM" # Let the user override the test.
26009 else
26010 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26011 for as_dir in $PATH
26012 do
26013   IFS=$as_save_IFS
26014   test -z "$as_dir" && as_dir=.
26015     for ac_exec_ext in '' $ac_executable_extensions; do
26016   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
26017     ac_cv_prog_NM="${ac_tool_prefix}nm"
26018     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26019     break 2
26020   fi
26021 done
26022   done
26023 IFS=$as_save_IFS
26024 
26025 fi
26026 fi
26027 NM=$ac_cv_prog_NM
26028 if test -n "$NM"; then
26029   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
26030 $as_echo "$NM" >&6; }
26031 else
26032   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26033 $as_echo "no" >&6; }
26034 fi
26035 
26036 
26037 fi
26038 if test -z "$ac_cv_prog_NM"; then
26039   ac_ct_NM=$NM
26040   # Extract the first word of "nm", so it can be a program name with args.
26041 set dummy nm; ac_word=$2
26042 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26043 $as_echo_n "checking for $ac_word... " >&6; }
26044 if ${ac_cv_prog_ac_ct_NM+:} false; then :
26045   $as_echo_n "(cached) " >&6
26046 else
26047   if test -n "$ac_ct_NM"; then
26048   ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
26049 else
26050 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26051 for as_dir in $PATH
26052 do
26053   IFS=$as_save_IFS
26054   test -z "$as_dir" && as_dir=.
26055     for ac_exec_ext in '' $ac_executable_extensions; do
26056   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
26057     ac_cv_prog_ac_ct_NM="nm"
26058     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26059     break 2
26060   fi
26061 done
26062   done
26063 IFS=$as_save_IFS
26064 
26065 fi
26066 fi
26067 ac_ct_NM=$ac_cv_prog_ac_ct_NM
26068 if test -n "$ac_ct_NM"; then
26069   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
26070 $as_echo "$ac_ct_NM" >&6; }
26071 else
26072   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26073 $as_echo "no" >&6; }
26074 fi
26075 
26076   if test "x$ac_ct_NM" = x; then
26077     NM=""
26078   else
26079     case $cross_compiling:$ac_tool_warned in
26080 yes:)
26081 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
26082 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
26083 ac_tool_warned=yes ;;
26084 esac
26085     NM=$ac_ct_NM
26086   fi
26087 else
26088   NM="$ac_cv_prog_NM"
26089 fi
26090 
26091 
26092   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26093 
26094   # First separate the path from the arguments. This will split at the first
26095   # space.
26096   complete="$NM"
26097   path="${complete%% *}"
26098   tmp="$complete EOL"
26099   arguments="${tmp#* }"
26100 
26101   # Input might be given as Windows format, start by converting to
26102   # unix format.
26103   new_path=`$CYGPATH -u "$path"`
26104 
26105   # Now try to locate executable using which
26106   new_path=`$WHICH "$new_path" 2> /dev/null`
26107   # bat and cmd files are not always considered executable in cygwin causing which
26108   # to not find them
26109   if test "x$new_path" = x \
26110            && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26111            && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26112     new_path=`$CYGPATH -u "$path"`
26113   fi
26114   if test "x$new_path" = x; then
26115     # Oops. Which didn't find the executable.
26116     # The splitting of arguments from the executable at a space might have been incorrect,
26117     # since paths with space are more likely in Windows. Give it another try with the whole
26118     # argument.
26119     path="$complete"
26120     arguments="EOL"
26121     new_path=`$CYGPATH -u "$path"`
26122     new_path=`$WHICH "$new_path" 2> /dev/null`
26123     # bat and cmd files are not always considered executable in cygwin causing which
26124     # to not find them
26125     if test "x$new_path" = x \
26126              && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26127              && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26128       new_path=`$CYGPATH -u "$path"`
26129     fi
26130     if test "x$new_path" = x; then
26131       # It's still not found. Now this is an unrecoverable error.
26132       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
26133 $as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
26134       has_space=`$ECHO "$complete" | $GREP " "`
26135       if test "x$has_space" != x; then
26136         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26137 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26138       fi
26139       as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
26140     fi
26141   fi
26142 
26143   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26144   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26145   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26146   # "foo.exe" is OK but "foo" is an error.
26147   #
26148   # This test is therefore slightly more accurate than "test -f" to check for file precense.
26149   # It is also a way to make sure we got the proper file name for the real test later on.
26150   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26151   if test "x$test_shortpath" = x; then
26152     # Short path failed, file does not exist as specified.
26153     # Try adding .exe or .cmd
26154     if test -f "${new_path}.exe"; then
26155        input_to_shortpath="${new_path}.exe"
26156     elif test -f "${new_path}.cmd"; then
26157        input_to_shortpath="${new_path}.cmd"
26158     else
26159       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
26160 $as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
26161       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
26162 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
26163       as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
26164     fi
26165   else
26166     input_to_shortpath="$new_path"
26167   fi
26168 
26169   # Call helper function which possibly converts this using DOS-style short mode.
26170   # If so, the updated path is stored in $new_path.
26171   new_path="$input_to_shortpath"
26172 
26173   input_path="$input_to_shortpath"
26174   # Check if we need to convert this using DOS-style short mode. If the path
26175   # contains just simple characters, use it. Otherwise (spaces, weird characters),
26176   # take no chances and rewrite it.
26177   # Note: m4 eats our [], so we need to use [ and ] instead.
26178   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26179   if test "x$has_forbidden_chars" != x; then
26180     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26181     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26182     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26183     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26184       # Going to short mode and back again did indeed matter. Since short mode is
26185       # case insensitive, let's make it lowercase to improve readability.
26186       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26187       # Now convert it back to Unix-stile (cygpath)
26188       input_path=`$CYGPATH -u "$shortmode_path"`
26189       new_path="$input_path"
26190     fi
26191   fi
26192 
26193   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26194   if test "x$test_cygdrive_prefix" = x; then
26195     # As a simple fix, exclude /usr/bin since it's not a real path.
26196     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
26197       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26198       # a path prefixed by /cygdrive for fixpath to work.
26199       new_path="$CYGWIN_ROOT_PATH$input_path"
26200     fi
26201   fi
26202 
26203   # remove trailing .exe if any
26204   new_path="${new_path/%.exe/}"
26205 
26206   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26207 
26208   # First separate the path from the arguments. This will split at the first
26209   # space.
26210   complete="$NM"
26211   path="${complete%% *}"
26212   tmp="$complete EOL"
26213   arguments="${tmp#* }"
26214 
26215   # Input might be given as Windows format, start by converting to
26216   # unix format.
26217   new_path="$path"
26218 
26219   windows_path="$new_path"
26220   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26221     unix_path=`$CYGPATH -u "$windows_path"`
26222     new_path="$unix_path"
26223   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26224     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26225     new_path="$unix_path"
26226   fi
26227 
26228 
26229   # Now try to locate executable using which
26230   new_path=`$WHICH "$new_path" 2> /dev/null`
26231 
26232   if test "x$new_path" = x; then
26233     # Oops. Which didn't find the executable.
26234     # The splitting of arguments from the executable at a space might have been incorrect,
26235     # since paths with space are more likely in Windows. Give it another try with the whole
26236     # argument.
26237     path="$complete"
26238     arguments="EOL"
26239     new_path="$path"
26240 
26241   windows_path="$new_path"
26242   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26243     unix_path=`$CYGPATH -u "$windows_path"`
26244     new_path="$unix_path"
26245   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26246     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26247     new_path="$unix_path"
26248   fi
26249 
26250 
26251     new_path=`$WHICH "$new_path" 2> /dev/null`
26252 
26253     if test "x$new_path" = x; then
26254       # It's still not found. Now this is an unrecoverable error.
26255       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
26256 $as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
26257       has_space=`$ECHO "$complete" | $GREP " "`
26258       if test "x$has_space" != x; then
26259         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26260 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26261       fi
26262       as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
26263     fi
26264   fi
26265 
26266   # Now new_path has a complete unix path to the binary
26267   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
26268     # Keep paths in /bin as-is, but remove trailing .exe if any
26269     new_path="${new_path/%.exe/}"
26270     # Do not save /bin paths to all_fixpath_prefixes!
26271   else
26272     # Not in mixed or Windows style, start by that.
26273     new_path=`cmd //c echo $new_path`
26274 
26275   input_path="$new_path"
26276   # Check if we need to convert this using DOS-style short mode. If the path
26277   # contains just simple characters, use it. Otherwise (spaces, weird characters),
26278   # take no chances and rewrite it.
26279   # Note: m4 eats our [], so we need to use [ and ] instead.
26280   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26281   if test "x$has_forbidden_chars" != x; then
26282     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26283     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26284   fi
26285 
26286     # Output is in $new_path
26287 
26288   windows_path="$new_path"
26289   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26290     unix_path=`$CYGPATH -u "$windows_path"`
26291     new_path="$unix_path"
26292   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26293     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26294     new_path="$unix_path"
26295   fi
26296 
26297     # remove trailing .exe if any
26298     new_path="${new_path/%.exe/}"
26299 
26300     # Save the first 10 bytes of this path to the storage, so fixpath can work.
26301     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26302   fi
26303 
26304   else
26305     # We're on a posix platform. Hooray! :)
26306     # First separate the path from the arguments. This will split at the first
26307     # space.
26308     complete="$NM"
26309     path="${complete%% *}"
26310     tmp="$complete EOL"
26311     arguments="${tmp#* }"
26312 
26313     # Cannot rely on the command "which" here since it doesn't always work.
26314     is_absolute_path=`$ECHO "$path" | $GREP ^/`
26315     if test -z "$is_absolute_path"; then
26316       # Path to executable is not absolute. Find it.
26317       IFS_save="$IFS"
26318       IFS=:
26319       for p in $PATH; do
26320         if test -f "$p/$path" && test -x "$p/$path"; then
26321           new_path="$p/$path"
26322           break
26323         fi
26324       done
26325       IFS="$IFS_save"
26326     else
26327       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving NM (as $path) failed, using $path directly." >&5
26328 $as_echo "$as_me: Resolving NM (as $path) failed, using $path directly." >&6;}
26329       new_path="$path"
26330     fi
26331 
26332     if test "x$new_path" = x; then
26333         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
26334 $as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
26335         has_space=`$ECHO "$complete" | $GREP " "`
26336         if test "x$has_space" != x; then
26337           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
26338 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
26339         fi
26340         as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
26341       fi
26342   fi
26343 
26344       # Now join together the path and the arguments once again
26345       if test "x$arguments" != xEOL; then
26346         new_complete="$new_path ${arguments% *}"
26347       else
26348         new_complete="$new_path"
26349       fi
26350 
26351   if test "x$complete" != "x$new_complete"; then
26352       NM="$new_complete"
26353       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
26354 $as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
26355     fi
26356 
26357     if test -n "$ac_tool_prefix"; then
26358   # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
26359 set dummy ${ac_tool_prefix}strip; ac_word=$2
26360 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26361 $as_echo_n "checking for $ac_word... " >&6; }
26362 if ${ac_cv_prog_STRIP+:} false; then :
26363   $as_echo_n "(cached) " >&6
26364 else
26365   if test -n "$STRIP"; then
26366   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
26367 else
26368 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26369 for as_dir in $PATH
26370 do
26371   IFS=$as_save_IFS
26372   test -z "$as_dir" && as_dir=.
26373     for ac_exec_ext in '' $ac_executable_extensions; do
26374   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
26375     ac_cv_prog_STRIP="${ac_tool_prefix}strip"
26376     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26377     break 2
26378   fi
26379 done
26380   done
26381 IFS=$as_save_IFS
26382 
26383 fi
26384 fi
26385 STRIP=$ac_cv_prog_STRIP
26386 if test -n "$STRIP"; then
26387   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
26388 $as_echo "$STRIP" >&6; }
26389 else
26390   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26391 $as_echo "no" >&6; }
26392 fi
26393 
26394 
26395 fi
26396 if test -z "$ac_cv_prog_STRIP"; then
26397   ac_ct_STRIP=$STRIP
26398   # Extract the first word of "strip", so it can be a program name with args.
26399 set dummy strip; ac_word=$2
26400 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26401 $as_echo_n "checking for $ac_word... " >&6; }
26402 if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
26403   $as_echo_n "(cached) " >&6
26404 else
26405   if test -n "$ac_ct_STRIP"; then
26406   ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
26407 else
26408 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26409 for as_dir in $PATH
26410 do
26411   IFS=$as_save_IFS
26412   test -z "$as_dir" && as_dir=.
26413     for ac_exec_ext in '' $ac_executable_extensions; do
26414   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
26415     ac_cv_prog_ac_ct_STRIP="strip"
26416     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26417     break 2
26418   fi
26419 done
26420   done
26421 IFS=$as_save_IFS
26422 
26423 fi
26424 fi
26425 ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
26426 if test -n "$ac_ct_STRIP"; then
26427   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
26428 $as_echo "$ac_ct_STRIP" >&6; }
26429 else
26430   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26431 $as_echo "no" >&6; }
26432 fi
26433 
26434   if test "x$ac_ct_STRIP" = x; then
26435     STRIP=""
26436   else
26437     case $cross_compiling:$ac_tool_warned in
26438 yes:)
26439 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
26440 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
26441 ac_tool_warned=yes ;;
26442 esac
26443     STRIP=$ac_ct_STRIP
26444   fi
26445 else
26446   STRIP="$ac_cv_prog_STRIP"
26447 fi
26448 
26449 
26450   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26451 
26452   # First separate the path from the arguments. This will split at the first
26453   # space.
26454   complete="$STRIP"
26455   path="${complete%% *}"
26456   tmp="$complete EOL"
26457   arguments="${tmp#* }"
26458 
26459   # Input might be given as Windows format, start by converting to
26460   # unix format.
26461   new_path=`$CYGPATH -u "$path"`
26462 
26463   # Now try to locate executable using which
26464   new_path=`$WHICH "$new_path" 2> /dev/null`
26465   # bat and cmd files are not always considered executable in cygwin causing which
26466   # to not find them
26467   if test "x$new_path" = x \
26468            && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26469            && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26470     new_path=`$CYGPATH -u "$path"`
26471   fi
26472   if test "x$new_path" = x; then
26473     # Oops. Which didn't find the executable.
26474     # The splitting of arguments from the executable at a space might have been incorrect,
26475     # since paths with space are more likely in Windows. Give it another try with the whole
26476     # argument.
26477     path="$complete"
26478     arguments="EOL"
26479     new_path=`$CYGPATH -u "$path"`
26480     new_path=`$WHICH "$new_path" 2> /dev/null`
26481     # bat and cmd files are not always considered executable in cygwin causing which
26482     # to not find them
26483     if test "x$new_path" = x \
26484              && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26485              && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26486       new_path=`$CYGPATH -u "$path"`
26487     fi
26488     if test "x$new_path" = x; then
26489       # It's still not found. Now this is an unrecoverable error.
26490       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
26491 $as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
26492       has_space=`$ECHO "$complete" | $GREP " "`
26493       if test "x$has_space" != x; then
26494         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26495 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26496       fi
26497       as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
26498     fi
26499   fi
26500 
26501   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26502   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26503   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26504   # "foo.exe" is OK but "foo" is an error.
26505   #
26506   # This test is therefore slightly more accurate than "test -f" to check for file precense.
26507   # It is also a way to make sure we got the proper file name for the real test later on.
26508   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26509   if test "x$test_shortpath" = x; then
26510     # Short path failed, file does not exist as specified.
26511     # Try adding .exe or .cmd
26512     if test -f "${new_path}.exe"; then
26513        input_to_shortpath="${new_path}.exe"
26514     elif test -f "${new_path}.cmd"; then
26515        input_to_shortpath="${new_path}.cmd"
26516     else
26517       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
26518 $as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
26519       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
26520 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
26521       as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
26522     fi
26523   else
26524     input_to_shortpath="$new_path"
26525   fi
26526 
26527   # Call helper function which possibly converts this using DOS-style short mode.
26528   # If so, the updated path is stored in $new_path.
26529   new_path="$input_to_shortpath"
26530 
26531   input_path="$input_to_shortpath"
26532   # Check if we need to convert this using DOS-style short mode. If the path
26533   # contains just simple characters, use it. Otherwise (spaces, weird characters),
26534   # take no chances and rewrite it.
26535   # Note: m4 eats our [], so we need to use [ and ] instead.
26536   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26537   if test "x$has_forbidden_chars" != x; then
26538     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26539     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26540     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26541     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26542       # Going to short mode and back again did indeed matter. Since short mode is
26543       # case insensitive, let's make it lowercase to improve readability.
26544       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26545       # Now convert it back to Unix-stile (cygpath)
26546       input_path=`$CYGPATH -u "$shortmode_path"`
26547       new_path="$input_path"
26548     fi
26549   fi
26550 
26551   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26552   if test "x$test_cygdrive_prefix" = x; then
26553     # As a simple fix, exclude /usr/bin since it's not a real path.
26554     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
26555       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26556       # a path prefixed by /cygdrive for fixpath to work.
26557       new_path="$CYGWIN_ROOT_PATH$input_path"
26558     fi
26559   fi
26560 
26561   # remove trailing .exe if any
26562   new_path="${new_path/%.exe/}"
26563 
26564   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26565 
26566   # First separate the path from the arguments. This will split at the first
26567   # space.
26568   complete="$STRIP"
26569   path="${complete%% *}"
26570   tmp="$complete EOL"
26571   arguments="${tmp#* }"
26572 
26573   # Input might be given as Windows format, start by converting to
26574   # unix format.
26575   new_path="$path"
26576 
26577   windows_path="$new_path"
26578   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26579     unix_path=`$CYGPATH -u "$windows_path"`
26580     new_path="$unix_path"
26581   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26582     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26583     new_path="$unix_path"
26584   fi
26585 
26586 
26587   # Now try to locate executable using which
26588   new_path=`$WHICH "$new_path" 2> /dev/null`
26589 
26590   if test "x$new_path" = x; then
26591     # Oops. Which didn't find the executable.
26592     # The splitting of arguments from the executable at a space might have been incorrect,
26593     # since paths with space are more likely in Windows. Give it another try with the whole
26594     # argument.
26595     path="$complete"
26596     arguments="EOL"
26597     new_path="$path"
26598 
26599   windows_path="$new_path"
26600   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26601     unix_path=`$CYGPATH -u "$windows_path"`
26602     new_path="$unix_path"
26603   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26604     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26605     new_path="$unix_path"
26606   fi
26607 
26608 
26609     new_path=`$WHICH "$new_path" 2> /dev/null`
26610 
26611     if test "x$new_path" = x; then
26612       # It's still not found. Now this is an unrecoverable error.
26613       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
26614 $as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
26615       has_space=`$ECHO "$complete" | $GREP " "`
26616       if test "x$has_space" != x; then
26617         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26618 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26619       fi
26620       as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
26621     fi
26622   fi
26623 
26624   # Now new_path has a complete unix path to the binary
26625   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
26626     # Keep paths in /bin as-is, but remove trailing .exe if any
26627     new_path="${new_path/%.exe/}"
26628     # Do not save /bin paths to all_fixpath_prefixes!
26629   else
26630     # Not in mixed or Windows style, start by that.
26631     new_path=`cmd //c echo $new_path`
26632 
26633   input_path="$new_path"
26634   # Check if we need to convert this using DOS-style short mode. If the path
26635   # contains just simple characters, use it. Otherwise (spaces, weird characters),
26636   # take no chances and rewrite it.
26637   # Note: m4 eats our [], so we need to use [ and ] instead.
26638   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26639   if test "x$has_forbidden_chars" != x; then
26640     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26641     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26642   fi
26643 
26644     # Output is in $new_path
26645 
26646   windows_path="$new_path"
26647   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26648     unix_path=`$CYGPATH -u "$windows_path"`
26649     new_path="$unix_path"
26650   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26651     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26652     new_path="$unix_path"
26653   fi
26654 
26655     # remove trailing .exe if any
26656     new_path="${new_path/%.exe/}"
26657 
26658     # Save the first 10 bytes of this path to the storage, so fixpath can work.
26659     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26660   fi
26661 
26662   else
26663     # We're on a posix platform. Hooray! :)
26664     # First separate the path from the arguments. This will split at the first
26665     # space.
26666     complete="$STRIP"
26667     path="${complete%% *}"
26668     tmp="$complete EOL"
26669     arguments="${tmp#* }"
26670 
26671     # Cannot rely on the command "which" here since it doesn't always work.
26672     is_absolute_path=`$ECHO "$path" | $GREP ^/`
26673     if test -z "$is_absolute_path"; then
26674       # Path to executable is not absolute. Find it.
26675       IFS_save="$IFS"
26676       IFS=:
26677       for p in $PATH; do
26678         if test -f "$p/$path" && test -x "$p/$path"; then
26679           new_path="$p/$path"
26680           break
26681         fi
26682       done
26683       IFS="$IFS_save"
26684     else
26685       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving STRIP (as $path) failed, using $path directly." >&5
26686 $as_echo "$as_me: Resolving STRIP (as $path) failed, using $path directly." >&6;}
26687       new_path="$path"
26688     fi
26689 
26690     if test "x$new_path" = x; then
26691         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
26692 $as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
26693         has_space=`$ECHO "$complete" | $GREP " "`
26694         if test "x$has_space" != x; then
26695           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
26696 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
26697         fi
26698         as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
26699       fi
26700   fi
26701 
26702       # Now join together the path and the arguments once again
26703       if test "x$arguments" != xEOL; then
26704         new_complete="$new_path ${arguments% *}"
26705       else
26706         new_complete="$new_path"
26707       fi
26708 
26709   if test "x$complete" != "x$new_complete"; then
26710       STRIP="$new_complete"
26711       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
26712 $as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
26713     fi
26714 
26715 fi
26716 
26717 # objcopy is used for moving debug symbols to separate files when
26718 # full debug symbols are enabled.
26719 if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
26720     if test -n "$ac_tool_prefix"; then
26721   for ac_prog in gobjcopy objcopy
26722   do
26723     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
26724 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
26725 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26726 $as_echo_n "checking for $ac_word... " >&6; }
26727 if ${ac_cv_prog_OBJCOPY+:} false; then :
26728   $as_echo_n "(cached) " >&6
26729 else
26730   if test -n "$OBJCOPY"; then
26731   ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
26732 else
26733 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26734 for as_dir in $PATH
26735 do
26736   IFS=$as_save_IFS
26737   test -z "$as_dir" && as_dir=.
26738     for ac_exec_ext in '' $ac_executable_extensions; do
26739   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
26740     ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
26741     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26742     break 2
26743   fi
26744 done
26745   done
26746 IFS=$as_save_IFS
26747 
26748 fi
26749 fi
26750 OBJCOPY=$ac_cv_prog_OBJCOPY
26751 if test -n "$OBJCOPY"; then
26752   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
26753 $as_echo "$OBJCOPY" >&6; }
26754 else
26755   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26756 $as_echo "no" >&6; }
26757 fi
26758 
26759 
26760     test -n "$OBJCOPY" && break
26761   done
26762 fi
26763 if test -z "$OBJCOPY"; then
26764   ac_ct_OBJCOPY=$OBJCOPY
26765   for ac_prog in gobjcopy objcopy
26766 do
26767   # Extract the first word of "$ac_prog", so it can be a program name with args.
26768 set dummy $ac_prog; ac_word=$2
26769 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26770 $as_echo_n "checking for $ac_word... " >&6; }
26771 if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
26772   $as_echo_n "(cached) " >&6
26773 else
26774   if test -n "$ac_ct_OBJCOPY"; then
26775   ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
26776 else
26777 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26778 for as_dir in $PATH
26779 do
26780   IFS=$as_save_IFS
26781   test -z "$as_dir" && as_dir=.
26782     for ac_exec_ext in '' $ac_executable_extensions; do
26783   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
26784     ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
26785     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26786     break 2
26787   fi
26788 done
26789   done
26790 IFS=$as_save_IFS
26791 
26792 fi
26793 fi
26794 ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
26795 if test -n "$ac_ct_OBJCOPY"; then
26796   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
26797 $as_echo "$ac_ct_OBJCOPY" >&6; }
26798 else
26799   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26800 $as_echo "no" >&6; }
26801 fi
26802 
26803 
26804   test -n "$ac_ct_OBJCOPY" && break
26805 done
26806 
26807   if test "x$ac_ct_OBJCOPY" = x; then
26808     OBJCOPY=""
26809   else
26810     case $cross_compiling:$ac_tool_warned in
26811 yes:)
26812 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
26813 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
26814 ac_tool_warned=yes ;;
26815 esac
26816     OBJCOPY=$ac_ct_OBJCOPY
26817   fi
26818 fi
26819 
26820     # Only call fixup if objcopy was found.
26821     if test -n "$OBJCOPY"; then
26822 
26823   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26824 
26825   # First separate the path from the arguments. This will split at the first
26826   # space.
26827   complete="$OBJCOPY"
26828   path="${complete%% *}"
26829   tmp="$complete EOL"
26830   arguments="${tmp#* }"
26831 
26832   # Input might be given as Windows format, start by converting to
26833   # unix format.
26834   new_path=`$CYGPATH -u "$path"`
26835 
26836   # Now try to locate executable using which
26837   new_path=`$WHICH "$new_path" 2> /dev/null`
26838   # bat and cmd files are not always considered executable in cygwin causing which
26839   # to not find them
26840   if test "x$new_path" = x \
26841            && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26842            && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26843     new_path=`$CYGPATH -u "$path"`
26844   fi
26845   if test "x$new_path" = x; then
26846     # Oops. Which didn't find the executable.
26847     # The splitting of arguments from the executable at a space might have been incorrect,
26848     # since paths with space are more likely in Windows. Give it another try with the whole
26849     # argument.
26850     path="$complete"
26851     arguments="EOL"
26852     new_path=`$CYGPATH -u "$path"`
26853     new_path=`$WHICH "$new_path" 2> /dev/null`
26854     # bat and cmd files are not always considered executable in cygwin causing which
26855     # to not find them
26856     if test "x$new_path" = x \
26857              && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26858              && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26859       new_path=`$CYGPATH -u "$path"`
26860     fi
26861     if test "x$new_path" = x; then
26862       # It's still not found. Now this is an unrecoverable error.
26863       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
26864 $as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
26865       has_space=`$ECHO "$complete" | $GREP " "`
26866       if test "x$has_space" != x; then
26867         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26868 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26869       fi
26870       as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
26871     fi
26872   fi
26873 
26874   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26875   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26876   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26877   # "foo.exe" is OK but "foo" is an error.
26878   #
26879   # This test is therefore slightly more accurate than "test -f" to check for file precense.
26880   # It is also a way to make sure we got the proper file name for the real test later on.
26881   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26882   if test "x$test_shortpath" = x; then
26883     # Short path failed, file does not exist as specified.
26884     # Try adding .exe or .cmd
26885     if test -f "${new_path}.exe"; then
26886        input_to_shortpath="${new_path}.exe"
26887     elif test -f "${new_path}.cmd"; then
26888        input_to_shortpath="${new_path}.cmd"
26889     else
26890       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&5
26891 $as_echo "$as_me: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&6;}
26892       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
26893 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
26894       as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
26895     fi
26896   else
26897     input_to_shortpath="$new_path"
26898   fi
26899 
26900   # Call helper function which possibly converts this using DOS-style short mode.
26901   # If so, the updated path is stored in $new_path.
26902   new_path="$input_to_shortpath"
26903 
26904   input_path="$input_to_shortpath"
26905   # Check if we need to convert this using DOS-style short mode. If the path
26906   # contains just simple characters, use it. Otherwise (spaces, weird characters),
26907   # take no chances and rewrite it.
26908   # Note: m4 eats our [], so we need to use [ and ] instead.
26909   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26910   if test "x$has_forbidden_chars" != x; then
26911     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26912     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26913     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26914     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26915       # Going to short mode and back again did indeed matter. Since short mode is
26916       # case insensitive, let's make it lowercase to improve readability.
26917       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26918       # Now convert it back to Unix-stile (cygpath)
26919       input_path=`$CYGPATH -u "$shortmode_path"`
26920       new_path="$input_path"
26921     fi
26922   fi
26923 
26924   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26925   if test "x$test_cygdrive_prefix" = x; then
26926     # As a simple fix, exclude /usr/bin since it's not a real path.
26927     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
26928       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26929       # a path prefixed by /cygdrive for fixpath to work.
26930       new_path="$CYGWIN_ROOT_PATH$input_path"
26931     fi
26932   fi
26933 
26934   # remove trailing .exe if any
26935   new_path="${new_path/%.exe/}"
26936 
26937   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26938 
26939   # First separate the path from the arguments. This will split at the first
26940   # space.
26941   complete="$OBJCOPY"
26942   path="${complete%% *}"
26943   tmp="$complete EOL"
26944   arguments="${tmp#* }"
26945 
26946   # Input might be given as Windows format, start by converting to
26947   # unix format.
26948   new_path="$path"
26949 
26950   windows_path="$new_path"
26951   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26952     unix_path=`$CYGPATH -u "$windows_path"`
26953     new_path="$unix_path"
26954   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26955     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26956     new_path="$unix_path"
26957   fi
26958 
26959 
26960   # Now try to locate executable using which
26961   new_path=`$WHICH "$new_path" 2> /dev/null`
26962 
26963   if test "x$new_path" = x; then
26964     # Oops. Which didn't find the executable.
26965     # The splitting of arguments from the executable at a space might have been incorrect,
26966     # since paths with space are more likely in Windows. Give it another try with the whole
26967     # argument.
26968     path="$complete"
26969     arguments="EOL"
26970     new_path="$path"
26971 
26972   windows_path="$new_path"
26973   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26974     unix_path=`$CYGPATH -u "$windows_path"`
26975     new_path="$unix_path"
26976   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26977     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26978     new_path="$unix_path"
26979   fi
26980 
26981 
26982     new_path=`$WHICH "$new_path" 2> /dev/null`
26983 
26984     if test "x$new_path" = x; then
26985       # It's still not found. Now this is an unrecoverable error.
26986       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
26987 $as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
26988       has_space=`$ECHO "$complete" | $GREP " "`
26989       if test "x$has_space" != x; then
26990         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26991 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26992       fi
26993       as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
26994     fi
26995   fi
26996 
26997   # Now new_path has a complete unix path to the binary
26998   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
26999     # Keep paths in /bin as-is, but remove trailing .exe if any
27000     new_path="${new_path/%.exe/}"
27001     # Do not save /bin paths to all_fixpath_prefixes!
27002   else
27003     # Not in mixed or Windows style, start by that.
27004     new_path=`cmd //c echo $new_path`
27005 
27006   input_path="$new_path"
27007   # Check if we need to convert this using DOS-style short mode. If the path
27008   # contains just simple characters, use it. Otherwise (spaces, weird characters),
27009   # take no chances and rewrite it.
27010   # Note: m4 eats our [], so we need to use [ and ] instead.
27011   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27012   if test "x$has_forbidden_chars" != x; then
27013     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27014     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27015   fi
27016 
27017     # Output is in $new_path
27018 
27019   windows_path="$new_path"
27020   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27021     unix_path=`$CYGPATH -u "$windows_path"`
27022     new_path="$unix_path"
27023   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27024     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27025     new_path="$unix_path"
27026   fi
27027 
27028     # remove trailing .exe if any
27029     new_path="${new_path/%.exe/}"
27030 
27031     # Save the first 10 bytes of this path to the storage, so fixpath can work.
27032     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27033   fi
27034 
27035   else
27036     # We're on a posix platform. Hooray! :)
27037     # First separate the path from the arguments. This will split at the first
27038     # space.
27039     complete="$OBJCOPY"
27040     path="${complete%% *}"
27041     tmp="$complete EOL"
27042     arguments="${tmp#* }"
27043 
27044     # Cannot rely on the command "which" here since it doesn't always work.
27045     is_absolute_path=`$ECHO "$path" | $GREP ^/`
27046     if test -z "$is_absolute_path"; then
27047       # Path to executable is not absolute. Find it.
27048       IFS_save="$IFS"
27049       IFS=:
27050       for p in $PATH; do
27051         if test -f "$p/$path" && test -x "$p/$path"; then
27052           new_path="$p/$path"
27053           break
27054         fi
27055       done
27056       IFS="$IFS_save"
27057     else
27058       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving OBJCOPY (as $path) failed, using $path directly." >&5
27059 $as_echo "$as_me: Resolving OBJCOPY (as $path) failed, using $path directly." >&6;}
27060       new_path="$path"
27061     fi
27062 
27063     if test "x$new_path" = x; then
27064         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
27065 $as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
27066         has_space=`$ECHO "$complete" | $GREP " "`
27067         if test "x$has_space" != x; then
27068           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
27069 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
27070         fi
27071         as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
27072       fi
27073   fi
27074 
27075       # Now join together the path and the arguments once again
27076       if test "x$arguments" != xEOL; then
27077         new_complete="$new_path ${arguments% *}"
27078       else
27079         new_complete="$new_path"
27080       fi
27081 
27082   if test "x$complete" != "x$new_complete"; then
27083       OBJCOPY="$new_complete"
27084       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJCOPY to \"$new_complete\"" >&5
27085 $as_echo "$as_me: Rewriting OBJCOPY to \"$new_complete\"" >&6;}
27086     fi
27087 
27088     fi
27089 fi
27090 
27091 if test -n "$ac_tool_prefix"; then
27092   for ac_prog in gobjdump objdump
27093   do
27094     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
27095 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
27096 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27097 $as_echo_n "checking for $ac_word... " >&6; }
27098 if ${ac_cv_prog_OBJDUMP+:} false; then :
27099   $as_echo_n "(cached) " >&6
27100 else
27101   if test -n "$OBJDUMP"; then
27102   ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
27103 else
27104 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27105 for as_dir in $PATH
27106 do
27107   IFS=$as_save_IFS
27108   test -z "$as_dir" && as_dir=.
27109     for ac_exec_ext in '' $ac_executable_extensions; do
27110   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
27111     ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
27112     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27113     break 2
27114   fi
27115 done
27116   done
27117 IFS=$as_save_IFS
27118 
27119 fi
27120 fi
27121 OBJDUMP=$ac_cv_prog_OBJDUMP
27122 if test -n "$OBJDUMP"; then
27123   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
27124 $as_echo "$OBJDUMP" >&6; }
27125 else
27126   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27127 $as_echo "no" >&6; }
27128 fi
27129 
27130 
27131     test -n "$OBJDUMP" && break
27132   done
27133 fi
27134 if test -z "$OBJDUMP"; then
27135   ac_ct_OBJDUMP=$OBJDUMP
27136   for ac_prog in gobjdump objdump
27137 do
27138   # Extract the first word of "$ac_prog", so it can be a program name with args.
27139 set dummy $ac_prog; ac_word=$2
27140 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27141 $as_echo_n "checking for $ac_word... " >&6; }
27142 if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
27143   $as_echo_n "(cached) " >&6
27144 else
27145   if test -n "$ac_ct_OBJDUMP"; then
27146   ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
27147 else
27148 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27149 for as_dir in $PATH
27150 do
27151   IFS=$as_save_IFS
27152   test -z "$as_dir" && as_dir=.
27153     for ac_exec_ext in '' $ac_executable_extensions; do
27154   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
27155     ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
27156     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27157     break 2
27158   fi
27159 done
27160   done
27161 IFS=$as_save_IFS
27162 
27163 fi
27164 fi
27165 ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
27166 if test -n "$ac_ct_OBJDUMP"; then
27167   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
27168 $as_echo "$ac_ct_OBJDUMP" >&6; }
27169 else
27170   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27171 $as_echo "no" >&6; }
27172 fi
27173 
27174 
27175   test -n "$ac_ct_OBJDUMP" && break
27176 done
27177 
27178   if test "x$ac_ct_OBJDUMP" = x; then
27179     OBJDUMP=""
27180   else
27181     case $cross_compiling:$ac_tool_warned in
27182 yes:)
27183 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
27184 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
27185 ac_tool_warned=yes ;;
27186 esac
27187     OBJDUMP=$ac_ct_OBJDUMP
27188   fi
27189 fi
27190 
27191 if test "x$OBJDUMP" != x; then
27192   # Only used for compare.sh; we can live without it. BASIC_FIXUP_EXECUTABLE bails if argument is missing.
27193 
27194   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27195 
27196   # First separate the path from the arguments. This will split at the first
27197   # space.
27198   complete="$OBJDUMP"
27199   path="${complete%% *}"
27200   tmp="$complete EOL"
27201   arguments="${tmp#* }"
27202 
27203   # Input might be given as Windows format, start by converting to
27204   # unix format.
27205   new_path=`$CYGPATH -u "$path"`
27206 
27207   # Now try to locate executable using which
27208   new_path=`$WHICH "$new_path" 2> /dev/null`
27209   # bat and cmd files are not always considered executable in cygwin causing which
27210   # to not find them
27211   if test "x$new_path" = x \
27212            && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27213            && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27214     new_path=`$CYGPATH -u "$path"`
27215   fi
27216   if test "x$new_path" = x; then
27217     # Oops. Which didn't find the executable.
27218     # The splitting of arguments from the executable at a space might have been incorrect,
27219     # since paths with space are more likely in Windows. Give it another try with the whole
27220     # argument.
27221     path="$complete"
27222     arguments="EOL"
27223     new_path=`$CYGPATH -u "$path"`
27224     new_path=`$WHICH "$new_path" 2> /dev/null`
27225     # bat and cmd files are not always considered executable in cygwin causing which
27226     # to not find them
27227     if test "x$new_path" = x \
27228              && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27229              && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27230       new_path=`$CYGPATH -u "$path"`
27231     fi
27232     if test "x$new_path" = x; then
27233       # It's still not found. Now this is an unrecoverable error.
27234       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
27235 $as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
27236       has_space=`$ECHO "$complete" | $GREP " "`
27237       if test "x$has_space" != x; then
27238         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27239 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27240       fi
27241       as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
27242     fi
27243   fi
27244 
27245   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27246   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27247   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27248   # "foo.exe" is OK but "foo" is an error.
27249   #
27250   # This test is therefore slightly more accurate than "test -f" to check for file precense.
27251   # It is also a way to make sure we got the proper file name for the real test later on.
27252   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27253   if test "x$test_shortpath" = x; then
27254     # Short path failed, file does not exist as specified.
27255     # Try adding .exe or .cmd
27256     if test -f "${new_path}.exe"; then
27257        input_to_shortpath="${new_path}.exe"
27258     elif test -f "${new_path}.cmd"; then
27259        input_to_shortpath="${new_path}.cmd"
27260     else
27261       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&5
27262 $as_echo "$as_me: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&6;}
27263       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
27264 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
27265       as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
27266     fi
27267   else
27268     input_to_shortpath="$new_path"
27269   fi
27270 
27271   # Call helper function which possibly converts this using DOS-style short mode.
27272   # If so, the updated path is stored in $new_path.
27273   new_path="$input_to_shortpath"
27274 
27275   input_path="$input_to_shortpath"
27276   # Check if we need to convert this using DOS-style short mode. If the path
27277   # contains just simple characters, use it. Otherwise (spaces, weird characters),
27278   # take no chances and rewrite it.
27279   # Note: m4 eats our [], so we need to use [ and ] instead.
27280   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27281   if test "x$has_forbidden_chars" != x; then
27282     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27283     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27284     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27285     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27286       # Going to short mode and back again did indeed matter. Since short mode is
27287       # case insensitive, let's make it lowercase to improve readability.
27288       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27289       # Now convert it back to Unix-stile (cygpath)
27290       input_path=`$CYGPATH -u "$shortmode_path"`
27291       new_path="$input_path"
27292     fi
27293   fi
27294 
27295   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27296   if test "x$test_cygdrive_prefix" = x; then
27297     # As a simple fix, exclude /usr/bin since it's not a real path.
27298     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
27299       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27300       # a path prefixed by /cygdrive for fixpath to work.
27301       new_path="$CYGWIN_ROOT_PATH$input_path"
27302     fi
27303   fi
27304 
27305   # remove trailing .exe if any
27306   new_path="${new_path/%.exe/}"
27307 
27308   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27309 
27310   # First separate the path from the arguments. This will split at the first
27311   # space.
27312   complete="$OBJDUMP"
27313   path="${complete%% *}"
27314   tmp="$complete EOL"
27315   arguments="${tmp#* }"
27316 
27317   # Input might be given as Windows format, start by converting to
27318   # unix format.
27319   new_path="$path"
27320 
27321   windows_path="$new_path"
27322   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27323     unix_path=`$CYGPATH -u "$windows_path"`
27324     new_path="$unix_path"
27325   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27326     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27327     new_path="$unix_path"
27328   fi
27329 
27330 
27331   # Now try to locate executable using which
27332   new_path=`$WHICH "$new_path" 2> /dev/null`
27333 
27334   if test "x$new_path" = x; then
27335     # Oops. Which didn't find the executable.
27336     # The splitting of arguments from the executable at a space might have been incorrect,
27337     # since paths with space are more likely in Windows. Give it another try with the whole
27338     # argument.
27339     path="$complete"
27340     arguments="EOL"
27341     new_path="$path"
27342 
27343   windows_path="$new_path"
27344   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27345     unix_path=`$CYGPATH -u "$windows_path"`
27346     new_path="$unix_path"
27347   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27348     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27349     new_path="$unix_path"
27350   fi
27351 
27352 
27353     new_path=`$WHICH "$new_path" 2> /dev/null`
27354 
27355     if test "x$new_path" = x; then
27356       # It's still not found. Now this is an unrecoverable error.
27357       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
27358 $as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
27359       has_space=`$ECHO "$complete" | $GREP " "`
27360       if test "x$has_space" != x; then
27361         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27362 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27363       fi
27364       as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
27365     fi
27366   fi
27367 
27368   # Now new_path has a complete unix path to the binary
27369   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
27370     # Keep paths in /bin as-is, but remove trailing .exe if any
27371     new_path="${new_path/%.exe/}"
27372     # Do not save /bin paths to all_fixpath_prefixes!
27373   else
27374     # Not in mixed or Windows style, start by that.
27375     new_path=`cmd //c echo $new_path`
27376 
27377   input_path="$new_path"
27378   # Check if we need to convert this using DOS-style short mode. If the path
27379   # contains just simple characters, use it. Otherwise (spaces, weird characters),
27380   # take no chances and rewrite it.
27381   # Note: m4 eats our [], so we need to use [ and ] instead.
27382   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27383   if test "x$has_forbidden_chars" != x; then
27384     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27385     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27386   fi
27387 
27388     # Output is in $new_path
27389 
27390   windows_path="$new_path"
27391   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27392     unix_path=`$CYGPATH -u "$windows_path"`
27393     new_path="$unix_path"
27394   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27395     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27396     new_path="$unix_path"
27397   fi
27398 
27399     # remove trailing .exe if any
27400     new_path="${new_path/%.exe/}"
27401 
27402     # Save the first 10 bytes of this path to the storage, so fixpath can work.
27403     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27404   fi
27405 
27406   else
27407     # We're on a posix platform. Hooray! :)
27408     # First separate the path from the arguments. This will split at the first
27409     # space.
27410     complete="$OBJDUMP"
27411     path="${complete%% *}"
27412     tmp="$complete EOL"
27413     arguments="${tmp#* }"
27414 
27415     # Cannot rely on the command "which" here since it doesn't always work.
27416     is_absolute_path=`$ECHO "$path" | $GREP ^/`
27417     if test -z "$is_absolute_path"; then
27418       # Path to executable is not absolute. Find it.
27419       IFS_save="$IFS"
27420       IFS=:
27421       for p in $PATH; do
27422         if test -f "$p/$path" && test -x "$p/$path"; then
27423           new_path="$p/$path"
27424           break
27425         fi
27426       done
27427       IFS="$IFS_save"
27428     else
27429       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving OBJDUMP (as $path) failed, using $path directly." >&5
27430 $as_echo "$as_me: Resolving OBJDUMP (as $path) failed, using $path directly." >&6;}
27431       new_path="$path"
27432     fi
27433 
27434     if test "x$new_path" = x; then
27435         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
27436 $as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
27437         has_space=`$ECHO "$complete" | $GREP " "`
27438         if test "x$has_space" != x; then
27439           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
27440 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
27441         fi
27442         as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
27443       fi
27444   fi
27445 
27446       # Now join together the path and the arguments once again
27447       if test "x$arguments" != xEOL; then
27448         new_complete="$new_path ${arguments% *}"
27449       else
27450         new_complete="$new_path"
27451       fi
27452 
27453   if test "x$complete" != "x$new_complete"; then
27454       OBJDUMP="$new_complete"
27455       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJDUMP to \"$new_complete\"" >&5
27456 $as_echo "$as_me: Rewriting OBJDUMP to \"$new_complete\"" >&6;}
27457     fi
27458 
27459 fi
27460 
27461 if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
27462    # Extract the first word of "lipo", so it can be a program name with args.
27463 set dummy lipo; ac_word=$2
27464 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27465 $as_echo_n "checking for $ac_word... " >&6; }
27466 if ${ac_cv_path_LIPO+:} false; then :
27467   $as_echo_n "(cached) " >&6
27468 else
27469   case $LIPO in
27470   [\\/]* | ?:[\\/]*)
27471   ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
27472   ;;
27473   *)
27474   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27475 for as_dir in $PATH
27476 do
27477   IFS=$as_save_IFS
27478   test -z "$as_dir" && as_dir=.
27479     for ac_exec_ext in '' $ac_executable_extensions; do
27480   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
27481     ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
27482     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27483     break 2
27484   fi
27485 done
27486   done
27487 IFS=$as_save_IFS
27488 
27489   ;;
27490 esac
27491 fi
27492 LIPO=$ac_cv_path_LIPO
27493 if test -n "$LIPO"; then
27494   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
27495 $as_echo "$LIPO" >&6; }
27496 else
27497   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27498 $as_echo "no" >&6; }
27499 fi
27500 
27501 
27502 
27503   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27504 
27505   # First separate the path from the arguments. This will split at the first
27506   # space.
27507   complete="$LIPO"
27508   path="${complete%% *}"
27509   tmp="$complete EOL"
27510   arguments="${tmp#* }"
27511 
27512   # Input might be given as Windows format, start by converting to
27513   # unix format.
27514   new_path=`$CYGPATH -u "$path"`
27515 
27516   # Now try to locate executable using which
27517   new_path=`$WHICH "$new_path" 2> /dev/null`
27518   # bat and cmd files are not always considered executable in cygwin causing which
27519   # to not find them
27520   if test "x$new_path" = x \
27521            && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27522            && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27523     new_path=`$CYGPATH -u "$path"`
27524   fi
27525   if test "x$new_path" = x; then
27526     # Oops. Which didn't find the executable.
27527     # The splitting of arguments from the executable at a space might have been incorrect,
27528     # since paths with space are more likely in Windows. Give it another try with the whole
27529     # argument.
27530     path="$complete"
27531     arguments="EOL"
27532     new_path=`$CYGPATH -u "$path"`
27533     new_path=`$WHICH "$new_path" 2> /dev/null`
27534     # bat and cmd files are not always considered executable in cygwin causing which
27535     # to not find them
27536     if test "x$new_path" = x \
27537              && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27538              && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27539       new_path=`$CYGPATH -u "$path"`
27540     fi
27541     if test "x$new_path" = x; then
27542       # It's still not found. Now this is an unrecoverable error.
27543       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
27544 $as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
27545       has_space=`$ECHO "$complete" | $GREP " "`
27546       if test "x$has_space" != x; then
27547         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27548 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27549       fi
27550       as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
27551     fi
27552   fi
27553 
27554   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27555   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27556   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27557   # "foo.exe" is OK but "foo" is an error.
27558   #
27559   # This test is therefore slightly more accurate than "test -f" to check for file precense.
27560   # It is also a way to make sure we got the proper file name for the real test later on.
27561   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27562   if test "x$test_shortpath" = x; then
27563     # Short path failed, file does not exist as specified.
27564     # Try adding .exe or .cmd
27565     if test -f "${new_path}.exe"; then
27566        input_to_shortpath="${new_path}.exe"
27567     elif test -f "${new_path}.cmd"; then
27568        input_to_shortpath="${new_path}.cmd"
27569     else
27570       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$new_path\", is invalid." >&5
27571 $as_echo "$as_me: The path of LIPO, which resolves as \"$new_path\", is invalid." >&6;}
27572       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
27573 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
27574       as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
27575     fi
27576   else
27577     input_to_shortpath="$new_path"
27578   fi
27579 
27580   # Call helper function which possibly converts this using DOS-style short mode.
27581   # If so, the updated path is stored in $new_path.
27582   new_path="$input_to_shortpath"
27583 
27584   input_path="$input_to_shortpath"
27585   # Check if we need to convert this using DOS-style short mode. If the path
27586   # contains just simple characters, use it. Otherwise (spaces, weird characters),
27587   # take no chances and rewrite it.
27588   # Note: m4 eats our [], so we need to use [ and ] instead.
27589   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27590   if test "x$has_forbidden_chars" != x; then
27591     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27592     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27593     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27594     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27595       # Going to short mode and back again did indeed matter. Since short mode is
27596       # case insensitive, let's make it lowercase to improve readability.
27597       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27598       # Now convert it back to Unix-stile (cygpath)
27599       input_path=`$CYGPATH -u "$shortmode_path"`
27600       new_path="$input_path"
27601     fi
27602   fi
27603 
27604   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27605   if test "x$test_cygdrive_prefix" = x; then
27606     # As a simple fix, exclude /usr/bin since it's not a real path.
27607     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
27608       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27609       # a path prefixed by /cygdrive for fixpath to work.
27610       new_path="$CYGWIN_ROOT_PATH$input_path"
27611     fi
27612   fi
27613 
27614   # remove trailing .exe if any
27615   new_path="${new_path/%.exe/}"
27616 
27617   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27618 
27619   # First separate the path from the arguments. This will split at the first
27620   # space.
27621   complete="$LIPO"
27622   path="${complete%% *}"
27623   tmp="$complete EOL"
27624   arguments="${tmp#* }"
27625 
27626   # Input might be given as Windows format, start by converting to
27627   # unix format.
27628   new_path="$path"
27629 
27630   windows_path="$new_path"
27631   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27632     unix_path=`$CYGPATH -u "$windows_path"`
27633     new_path="$unix_path"
27634   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27635     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27636     new_path="$unix_path"
27637   fi
27638 
27639 
27640   # Now try to locate executable using which
27641   new_path=`$WHICH "$new_path" 2> /dev/null`
27642 
27643   if test "x$new_path" = x; then
27644     # Oops. Which didn't find the executable.
27645     # The splitting of arguments from the executable at a space might have been incorrect,
27646     # since paths with space are more likely in Windows. Give it another try with the whole
27647     # argument.
27648     path="$complete"
27649     arguments="EOL"
27650     new_path="$path"
27651 
27652   windows_path="$new_path"
27653   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27654     unix_path=`$CYGPATH -u "$windows_path"`
27655     new_path="$unix_path"
27656   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27657     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27658     new_path="$unix_path"
27659   fi
27660 
27661 
27662     new_path=`$WHICH "$new_path" 2> /dev/null`
27663 
27664     if test "x$new_path" = x; then
27665       # It's still not found. Now this is an unrecoverable error.
27666       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
27667 $as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
27668       has_space=`$ECHO "$complete" | $GREP " "`
27669       if test "x$has_space" != x; then
27670         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27671 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27672       fi
27673       as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
27674     fi
27675   fi
27676 
27677   # Now new_path has a complete unix path to the binary
27678   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
27679     # Keep paths in /bin as-is, but remove trailing .exe if any
27680     new_path="${new_path/%.exe/}"
27681     # Do not save /bin paths to all_fixpath_prefixes!
27682   else
27683     # Not in mixed or Windows style, start by that.
27684     new_path=`cmd //c echo $new_path`
27685 
27686   input_path="$new_path"
27687   # Check if we need to convert this using DOS-style short mode. If the path
27688   # contains just simple characters, use it. Otherwise (spaces, weird characters),
27689   # take no chances and rewrite it.
27690   # Note: m4 eats our [], so we need to use [ and ] instead.
27691   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27692   if test "x$has_forbidden_chars" != x; then
27693     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27694     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27695   fi
27696 
27697     # Output is in $new_path
27698 
27699   windows_path="$new_path"
27700   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27701     unix_path=`$CYGPATH -u "$windows_path"`
27702     new_path="$unix_path"
27703   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27704     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27705     new_path="$unix_path"
27706   fi
27707 
27708     # remove trailing .exe if any
27709     new_path="${new_path/%.exe/}"
27710 
27711     # Save the first 10 bytes of this path to the storage, so fixpath can work.
27712     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27713   fi
27714 
27715   else
27716     # We're on a posix platform. Hooray! :)
27717     # First separate the path from the arguments. This will split at the first
27718     # space.
27719     complete="$LIPO"
27720     path="${complete%% *}"
27721     tmp="$complete EOL"
27722     arguments="${tmp#* }"
27723 
27724     # Cannot rely on the command "which" here since it doesn't always work.
27725     is_absolute_path=`$ECHO "$path" | $GREP ^/`
27726     if test -z "$is_absolute_path"; then
27727       # Path to executable is not absolute. Find it.
27728       IFS_save="$IFS"
27729       IFS=:
27730       for p in $PATH; do
27731         if test -f "$p/$path" && test -x "$p/$path"; then
27732           new_path="$p/$path"
27733           break
27734         fi
27735       done
27736       IFS="$IFS_save"
27737     else
27738       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving LIPO (as $path) failed, using $path directly." >&5
27739 $as_echo "$as_me: Resolving LIPO (as $path) failed, using $path directly." >&6;}
27740       new_path="$path"
27741     fi
27742 
27743     if test "x$new_path" = x; then
27744         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
27745 $as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
27746         has_space=`$ECHO "$complete" | $GREP " "`
27747         if test "x$has_space" != x; then
27748           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
27749 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
27750         fi
27751         as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
27752       fi
27753   fi
27754 
27755       # Now join together the path and the arguments once again
27756       if test "x$arguments" != xEOL; then
27757         new_complete="$new_path ${arguments% *}"
27758       else
27759         new_complete="$new_path"
27760       fi
27761 
27762   if test "x$complete" != "x$new_complete"; then
27763       LIPO="$new_complete"
27764       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LIPO to \"$new_complete\"" >&5
27765 $as_echo "$as_me: Rewriting LIPO to \"$new_complete\"" >&6;}
27766     fi
27767 
27768 fi
27769 
27770 # Restore old path without tools dir
27771 PATH="$OLD_PATH"
27772 
27773 
27774 # FIXME: Currently we must test this after paths but before flags. Fix!
27775 
27776 # And we can test some aspects on the target using configure macros.
27777 
27778 
27779 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
27780 $as_echo_n "checking for ANSI C header files... " >&6; }
27781 if ${ac_cv_header_stdc+:} false; then :
27782   $as_echo_n "(cached) " >&6
27783 else
27784   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27785 /* end confdefs.h.  */
27786 #include <stdlib.h>
27787 #include <stdarg.h>
27788 #include <string.h>
27789 #include <float.h>
27790 
27791 int
27792 main ()
27793 {
27794 
27795   ;
27796   return 0;
27797 }
27798 _ACEOF
27799 if ac_fn_cxx_try_compile "$LINENO"; then :
27800   ac_cv_header_stdc=yes
27801 else
27802   ac_cv_header_stdc=no
27803 fi
27804 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27805 
27806 if test $ac_cv_header_stdc = yes; then
27807   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
27808   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27809 /* end confdefs.h.  */
27810 #include <string.h>
27811 
27812 _ACEOF
27813 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
27814   $EGREP "memchr" >/dev/null 2>&1; then :
27815 
27816 else
27817   ac_cv_header_stdc=no
27818 fi
27819 rm -f conftest*
27820 
27821 fi
27822 
27823 if test $ac_cv_header_stdc = yes; then
27824   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
27825   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27826 /* end confdefs.h.  */
27827 #include <stdlib.h>
27828 
27829 _ACEOF
27830 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
27831   $EGREP "free" >/dev/null 2>&1; then :
27832 
27833 else
27834   ac_cv_header_stdc=no
27835 fi
27836 rm -f conftest*
27837 
27838 fi
27839 
27840 if test $ac_cv_header_stdc = yes; then
27841   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
27842   if test "$cross_compiling" = yes; then :
27843   :
27844 else
27845   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27846 /* end confdefs.h.  */
27847 #include <ctype.h>
27848 #include <stdlib.h>
27849 #if ((' ' & 0x0FF) == 0x020)
27850 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
27851 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
27852 #else
27853 # define ISLOWER(c) \
27854                    (('a' <= (c) && (c) <= 'i') \
27855                      || ('j' <= (c) && (c) <= 'r') \
27856                      || ('s' <= (c) && (c) <= 'z'))
27857 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
27858 #endif
27859 
27860 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
27861 int
27862 main ()
27863 {
27864   int i;
27865   for (i = 0; i < 256; i++)
27866     if (XOR (islower (i), ISLOWER (i))
27867         || toupper (i) != TOUPPER (i))
27868       return 2;
27869   return 0;
27870 }
27871 _ACEOF
27872 if ac_fn_cxx_try_run "$LINENO"; then :
27873 
27874 else
27875   ac_cv_header_stdc=no
27876 fi
27877 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
27878   conftest.$ac_objext conftest.beam conftest.$ac_ext
27879 fi
27880 
27881 fi
27882 fi
27883 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
27884 $as_echo "$ac_cv_header_stdc" >&6; }
27885 if test $ac_cv_header_stdc = yes; then
27886 
27887 $as_echo "#define STDC_HEADERS 1" >>confdefs.h
27888 
27889 fi
27890 
27891 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
27892 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
27893                   inttypes.h stdint.h unistd.h
27894 do :
27895   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
27896 ac_fn_cxx_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
27897 "
27898 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
27899   cat >>confdefs.h <<_ACEOF
27900 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
27901 _ACEOF
27902 
27903 fi
27904 
27905 done
27906 
27907 
27908 
27909 ###############################################################################
27910 #
27911 # Now we check if libjvm.so will use 32 or 64 bit pointers for the C/C++ code.
27912 # (The JVM can use 32 or 64 bit Java pointers but that decision
27913 # is made at runtime.)
27914 #
27915 if test "x$OPENJDK_TARGET_OS" = xsolaris; then
27916   # Always specify -m flags on Solaris
27917 
27918   # keep track of c/cxx flags that we added outselves...
27919   #   to prevent emitting warning...
27920   ADDED_CFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
27921   ADDED_CXXFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
27922   ADDED_LDFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
27923 
27924   CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
27925   CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
27926   LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
27927 
27928   CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
27929   CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
27930   LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
27931 
27932 elif test "x$COMPILE_TYPE" = xreduced; then
27933   if test "x$OPENJDK_TARGET_OS" != xwindows; then
27934     # Specify -m if running reduced on other Posix platforms
27935 
27936   # keep track of c/cxx flags that we added outselves...
27937   #   to prevent emitting warning...
27938   ADDED_CFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
27939   ADDED_CXXFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
27940   ADDED_LDFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
27941 
27942   CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
27943   CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
27944   LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
27945 
27946   CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
27947   CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
27948   LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
27949 
27950   fi
27951 fi
27952 
27953 # Make compilation sanity check
27954 for ac_header in stdio.h
27955 do :
27956   ac_fn_cxx_check_header_mongrel "$LINENO" "stdio.h" "ac_cv_header_stdio_h" "$ac_includes_default"
27957 if test "x$ac_cv_header_stdio_h" = xyes; then :
27958   cat >>confdefs.h <<_ACEOF
27959 #define HAVE_STDIO_H 1
27960 _ACEOF
27961 
27962 else
27963 
27964   { $as_echo "$as_me:${as_lineno-$LINENO}: Failed to compile stdio.h. This likely implies missing compile dependencies." >&5
27965 $as_echo "$as_me: Failed to compile stdio.h. This likely implies missing compile dependencies." >&6;}
27966   if test "x$COMPILE_TYPE" = xreduced; then
27967     { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed." >&5
27968 $as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed." >&6;}
27969   elif test "x$COMPILE_TYPE" = xcross; then
27970     { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
27971 $as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;}
27972   fi
27973   as_fn_error $? "Cannot continue." "$LINENO" 5
27974 
27975 fi
27976 
27977 done
27978 
27979 
27980 # The cast to long int works around a bug in the HP C Compiler
27981 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
27982 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
27983 # This bug is HP SR number 8606223364.
27984 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
27985 $as_echo_n "checking size of int *... " >&6; }
27986 if ${ac_cv_sizeof_int_p+:} false; then :
27987   $as_echo_n "(cached) " >&6
27988 else
27989   if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
27990 
27991 else
27992   if test "$ac_cv_type_int_p" = yes; then
27993      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
27994 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
27995 as_fn_error 77 "cannot compute sizeof (int *)
27996 See \`config.log' for more details" "$LINENO" 5; }
27997    else
27998      ac_cv_sizeof_int_p=0
27999    fi
28000 fi
28001 
28002 fi
28003 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
28004 $as_echo "$ac_cv_sizeof_int_p" >&6; }
28005 
28006 
28007 
28008 cat >>confdefs.h <<_ACEOF
28009 #define SIZEOF_INT_P $ac_cv_sizeof_int_p
28010 _ACEOF
28011 
28012 
28013 
28014 if test "x$SIZEOF_INT_P" != "x$ac_cv_sizeof_int_p"; then
28015   # Workaround autoconf bug, see http://lists.gnu.org/archive/html/autoconf/2010-07/msg00004.html
28016   SIZEOF_INT_P="$ac_cv_sizeof_int_p"
28017 fi
28018 
28019 if test "x$SIZEOF_INT_P" = x; then
28020     # The test failed, lets stick to the assumed value.
28021     { $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
28022 $as_echo "$as_me: WARNING: The number of bits in the target could not be determined, using $OPENJDK_TARGET_CPU_BITS." >&2;}
28023 else
28024     TESTED_TARGET_CPU_BITS=`expr 8 \* $SIZEOF_INT_P`
28025 
28026     if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
28027         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
28028     fi
28029 fi
28030 
28031 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for target address size" >&5
28032 $as_echo_n "checking for target address size... " >&6; }
28033 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_CPU_BITS bits" >&5
28034 $as_echo "$OPENJDK_TARGET_CPU_BITS bits" >&6; }
28035 
28036 
28037 ###############################################################################
28038 #
28039 # Is the target little of big endian?
28040 #
28041  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
28042 $as_echo_n "checking whether byte ordering is bigendian... " >&6; }
28043 if ${ac_cv_c_bigendian+:} false; then :
28044   $as_echo_n "(cached) " >&6
28045 else
28046   ac_cv_c_bigendian=unknown
28047     # See if we're dealing with a universal compiler.
28048     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28049 /* end confdefs.h.  */
28050 #ifndef __APPLE_CC__
28051                not a universal capable compiler
28052              #endif
28053              typedef int dummy;
28054 
28055 _ACEOF
28056 if ac_fn_cxx_try_compile "$LINENO"; then :
28057 
28058         # Check for potential -arch flags.  It is not universal unless
28059         # there are at least two -arch flags with different values.
28060         ac_arch=
28061         ac_prev=
28062         for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
28063          if test -n "$ac_prev"; then
28064            case $ac_word in
28065              i?86 | x86_64 | ppc | ppc64)
28066                if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
28067                  ac_arch=$ac_word
28068                else
28069                  ac_cv_c_bigendian=universal
28070                  break
28071                fi
28072                ;;
28073            esac
28074            ac_prev=
28075          elif test "x$ac_word" = "x-arch"; then
28076            ac_prev=arch
28077          fi
28078        done
28079 fi
28080 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28081     if test $ac_cv_c_bigendian = unknown; then
28082       # See if sys/param.h defines the BYTE_ORDER macro.
28083       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28084 /* end confdefs.h.  */
28085 #include <sys/types.h>
28086              #include <sys/param.h>
28087 
28088 int
28089 main ()
28090 {
28091 #if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
28092                      && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
28093                      && LITTLE_ENDIAN)
28094               bogus endian macros
28095              #endif
28096 
28097   ;
28098   return 0;
28099 }
28100 _ACEOF
28101 if ac_fn_cxx_try_compile "$LINENO"; then :
28102   # It does; now see whether it defined to BIG_ENDIAN or not.
28103          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28104 /* end confdefs.h.  */
28105 #include <sys/types.h>
28106                 #include <sys/param.h>
28107 
28108 int
28109 main ()
28110 {
28111 #if BYTE_ORDER != BIG_ENDIAN
28112                  not big endian
28113                 #endif
28114 
28115   ;
28116   return 0;
28117 }
28118 _ACEOF
28119 if ac_fn_cxx_try_compile "$LINENO"; then :
28120   ac_cv_c_bigendian=yes
28121 else
28122   ac_cv_c_bigendian=no
28123 fi
28124 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28125 fi
28126 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28127     fi
28128     if test $ac_cv_c_bigendian = unknown; then
28129       # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
28130       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28131 /* end confdefs.h.  */
28132 #include <limits.h>
28133 
28134 int
28135 main ()
28136 {
28137 #if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
28138               bogus endian macros
28139              #endif
28140 
28141   ;
28142   return 0;
28143 }
28144 _ACEOF
28145 if ac_fn_cxx_try_compile "$LINENO"; then :
28146   # It does; now see whether it defined to _BIG_ENDIAN or not.
28147          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28148 /* end confdefs.h.  */
28149 #include <limits.h>
28150 
28151 int
28152 main ()
28153 {
28154 #ifndef _BIG_ENDIAN
28155                  not big endian
28156                 #endif
28157 
28158   ;
28159   return 0;
28160 }
28161 _ACEOF
28162 if ac_fn_cxx_try_compile "$LINENO"; then :
28163   ac_cv_c_bigendian=yes
28164 else
28165   ac_cv_c_bigendian=no
28166 fi
28167 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28168 fi
28169 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28170     fi
28171     if test $ac_cv_c_bigendian = unknown; then
28172       # Compile a test program.
28173       if test "$cross_compiling" = yes; then :
28174   # Try to guess by grepping values from an object file.
28175          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28176 /* end confdefs.h.  */
28177 short int ascii_mm[] =
28178                   { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
28179                 short int ascii_ii[] =
28180                   { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
28181                 int use_ascii (int i) {
28182                   return ascii_mm[i] + ascii_ii[i];
28183                 }
28184                 short int ebcdic_ii[] =
28185                   { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
28186                 short int ebcdic_mm[] =
28187                   { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
28188                 int use_ebcdic (int i) {
28189                   return ebcdic_mm[i] + ebcdic_ii[i];
28190                 }
28191                 extern int foo;
28192 
28193 int
28194 main ()
28195 {
28196 return use_ascii (foo) == use_ebcdic (foo);
28197   ;
28198   return 0;
28199 }
28200 _ACEOF
28201 if ac_fn_cxx_try_compile "$LINENO"; then :
28202   if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
28203               ac_cv_c_bigendian=yes
28204             fi
28205             if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
28206               if test "$ac_cv_c_bigendian" = unknown; then
28207                 ac_cv_c_bigendian=no
28208               else
28209                 # finding both strings is unlikely to happen, but who knows?
28210                 ac_cv_c_bigendian=unknown
28211               fi
28212             fi
28213 fi
28214 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28215 else
28216   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28217 /* end confdefs.h.  */
28218 $ac_includes_default
28219 int
28220 main ()
28221 {
28222 
28223              /* Are we little or big endian?  From Harbison&Steele.  */
28224              union
28225              {
28226                long int l;
28227                char c[sizeof (long int)];
28228              } u;
28229              u.l = 1;
28230              return u.c[sizeof (long int) - 1] == 1;
28231 
28232   ;
28233   return 0;
28234 }
28235 _ACEOF
28236 if ac_fn_cxx_try_run "$LINENO"; then :
28237   ac_cv_c_bigendian=no
28238 else
28239   ac_cv_c_bigendian=yes
28240 fi
28241 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
28242   conftest.$ac_objext conftest.beam conftest.$ac_ext
28243 fi
28244 
28245     fi
28246 fi
28247 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
28248 $as_echo "$ac_cv_c_bigendian" >&6; }
28249  case $ac_cv_c_bigendian in #(
28250    yes)
28251      ENDIAN="big";; #(
28252    no)
28253      ENDIAN="little" ;; #(
28254    universal)
28255      ENDIAN="universal_endianness"
28256      ;; #(
28257    *)
28258      ENDIAN="unknown" ;;
28259  esac
28260 
28261 
28262 if test "x$ENDIAN" = xuniversal_endianness; then
28263     as_fn_error $? "Building with both big and little endianness is not supported" "$LINENO" 5
28264 fi
28265 if test "x$ENDIAN" != "x$OPENJDK_TARGET_CPU_ENDIAN"; then
28266     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
28267 fi
28268 
28269 
28270 # Configure flags for the tools
28271 
28272 
28273 ###############################################################################
28274 #
28275 # How to compile shared libraries.
28276 #
28277 
28278 if test "x$GCC" = xyes; then
28279     COMPILER_NAME=gcc
28280     PICFLAG="-fPIC"
28281     LIBRARY_PREFIX=lib
28282     SHARED_LIBRARY='lib$1.so'
28283     STATIC_LIBRARY='lib$1.a'
28284     SHARED_LIBRARY_FLAGS="-shared"
28285     SHARED_LIBRARY_SUFFIX='.so'
28286     STATIC_LIBRARY_SUFFIX='.a'
28287     OBJ_SUFFIX='.o'
28288     EXE_SUFFIX=''
28289     SET_SHARED_LIBRARY_NAME='-Xlinker -soname=$1'
28290     SET_SHARED_LIBRARY_MAPFILE='-Xlinker -version-script=$1'
28291     C_FLAG_REORDER=''
28292     CXX_FLAG_REORDER=''
28293     SET_SHARED_LIBRARY_ORIGIN='-Xlinker -z -Xlinker origin -Xlinker -rpath -Xlinker \$$$$ORIGIN$1'
28294     SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker \$$$$ORIGIN$1'
28295     LD="$CC"
28296     LDEXE="$CC"
28297     LDCXX="$CXX"
28298     LDEXECXX="$CXX"
28299     POST_STRIP_CMD="$STRIP -g"
28300 
28301     # Linking is different on MacOSX
28302     if test "x$OPENJDK_TARGET_OS" = xmacosx; then
28303         # Might change in the future to clang.
28304         COMPILER_NAME=gcc
28305         SHARED_LIBRARY='lib$1.dylib'
28306         SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
28307         SHARED_LIBRARY_SUFFIX='.dylib'
28308         EXE_SUFFIX=''
28309         SET_SHARED_LIBRARY_NAME='-Xlinker -install_name -Xlinker @rpath/$1'
28310         SET_SHARED_LIBRARY_MAPFILE=''
28311         SET_SHARED_LIBRARY_ORIGIN='-Xlinker -rpath -Xlinker @loader_path/.'
28312         SET_EXECUTABLE_ORIGIN="$SET_SHARED_LIBRARY_ORIGIN"
28313         POST_STRIP_CMD="$STRIP -S"
28314     fi
28315 else
28316     if test "x$OPENJDK_TARGET_OS" = xsolaris; then
28317         # If it is not gcc, then assume it is the Oracle Solaris Studio Compiler
28318         COMPILER_NAME=ossc
28319         PICFLAG="-KPIC"
28320         LIBRARY_PREFIX=lib
28321         SHARED_LIBRARY='lib$1.so'
28322         STATIC_LIBRARY='lib$1.a'
28323         SHARED_LIBRARY_FLAGS="-G"
28324         SHARED_LIBRARY_SUFFIX='.so'
28325         STATIC_LIBRARY_SUFFIX='.a'
28326         OBJ_SUFFIX='.o'
28327         EXE_SUFFIX=''
28328         SET_SHARED_LIBRARY_NAME=''
28329         SET_SHARED_LIBRARY_MAPFILE='-M$1'
28330         C_FLAG_REORDER='-xF'
28331         CXX_FLAG_REORDER='-xF'
28332         SET_SHARED_LIBRARY_ORIGIN='-R\$$$$ORIGIN$1'
28333         SET_EXECUTABLE_ORIGIN="$SET_SHARED_LIBRARY_ORIGIN"
28334         CFLAGS_JDK="${CFLAGS_JDK} -D__solaris__"
28335         CXXFLAGS_JDK="${CXXFLAGS_JDK} -D__solaris__"
28336         CFLAGS_JDKLIB_EXTRA='-xstrconst'
28337         POST_STRIP_CMD="$STRIP -x"
28338         POST_MCS_CMD="$MCS -d -a \"JDK $FULL_VERSION\""
28339     fi
28340     if test "x$OPENJDK_TARGET_OS" = xwindows; then
28341         # If it is not gcc, then assume it is the MS Visual Studio compiler
28342         COMPILER_NAME=cl
28343         PICFLAG=""
28344         LIBRARY_PREFIX=
28345         SHARED_LIBRARY='$1.dll'
28346         STATIC_LIBRARY='$1.lib'
28347         SHARED_LIBRARY_FLAGS="-LD"
28348         SHARED_LIBRARY_SUFFIX='.dll'
28349         STATIC_LIBRARY_SUFFIX='.lib'
28350         OBJ_SUFFIX='.obj'
28351         EXE_SUFFIX='.exe'
28352         SET_SHARED_LIBRARY_NAME=''
28353         SET_SHARED_LIBRARY_MAPFILE=''
28354         SET_SHARED_LIBRARY_ORIGIN=''
28355         SET_EXECUTABLE_ORIGIN=''
28356     fi
28357 fi
28358 
28359 
28360 
28361 
28362 
28363 
28364 
28365 
28366 
28367 
28368 
28369 
28370 
28371 
28372 
28373 
28374 
28375 
28376 # The (cross) compiler is now configured, we can now test capabilities
28377 # of the target platform.
28378 
28379 
28380 
28381 ###############################################################################
28382 #
28383 # Setup the opt flags for different compilers
28384 # and different operating systems.
28385 #
28386 
28387 #
28388 # NOTE: check for -mstackrealign needs to be below potential addition of -m32
28389 #
28390 if test "x$OPENJDK_TARGET_CPU_BITS" = x32 && test "x$OPENJDK_TARGET_OS" = xmacosx; then
28391     # On 32-bit MacOSX the OS requires C-entry points to be 16 byte aligned.
28392     # While waiting for a better solution, the current workaround is to use -mstackrealign.
28393     CFLAGS="$CFLAGS -mstackrealign"
28394     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if 32-bit compiler supports -mstackrealign" >&5
28395 $as_echo_n "checking if 32-bit compiler supports -mstackrealign... " >&6; }
28396     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28397 /* end confdefs.h.  */
28398 int main() { return 0; }
28399 _ACEOF
28400 if ac_fn_cxx_try_link "$LINENO"; then :
28401 
28402                         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
28403 $as_echo "yes" >&6; }
28404 
28405 else
28406 
28407                         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28408 $as_echo "no" >&6; }
28409                         as_fn_error $? "The selected compiler $CXX does not support -mstackrealign! Try to put another compiler in the path." "$LINENO" 5
28410 
28411 fi
28412 rm -f core conftest.err conftest.$ac_objext \
28413     conftest$ac_exeext conftest.$ac_ext
28414 fi
28415 
28416 C_FLAG_DEPS="-MMD -MF"
28417 CXX_FLAG_DEPS="-MMD -MF"
28418 
28419 case $COMPILER_TYPE in
28420   CC )
28421     D_FLAG="-g"
28422     case $COMPILER_NAME in
28423       gcc )
28424         case $OPENJDK_TARGET_OS in
28425           macosx )
28426             # On MacOSX we optimize for size, something
28427             # we should do for all platforms?
28428             C_O_FLAG_HI="-Os"
28429             C_O_FLAG_NORM="-Os"
28430             C_O_FLAG_NONE=""
28431             ;;
28432           *)
28433             C_O_FLAG_HI="-O3"
28434             C_O_FLAG_NORM="-O2"
28435             C_O_FLAG_NONE="-O0"
28436             CFLAGS_DEBUG_SYMBOLS="-g"
28437             CXXFLAGS_DEBUG_SYMBOLS="-g"
28438             if test "x$OPENJDK_TARGET_CPU_BITS" = "x64" && test "x$DEBUG_LEVEL" = "xfastdebug"; then
28439                CFLAGS_DEBUG_SYMBOLS="-g1"
28440                CXXFLAGS_DEBUG_SYMBOLS="-g1"
28441             fi
28442             ;;
28443         esac
28444         CXX_O_FLAG_HI="$C_O_FLAG_HI"
28445         CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
28446         CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
28447         ;;
28448       ossc )
28449         #
28450         # Forte has different names for this with their C++ compiler...
28451         #
28452         C_FLAG_DEPS="-xMMD -xMF"
28453         CXX_FLAG_DEPS="-xMMD -xMF"
28454 
28455         # Extra options used with HIGHEST
28456         #
28457         # WARNING: Use of OPTIMIZATION_LEVEL=HIGHEST in your Makefile needs to be
28458         #          done with care, there are some assumptions below that need to
28459         #          be understood about the use of pointers, and IEEE behavior.
28460         #
28461         # Use non-standard floating point mode (not IEEE 754)
28462         CC_HIGHEST="$CC_HIGHEST -fns"
28463         # Do some simplification of floating point arithmetic (not IEEE 754)
28464         CC_HIGHEST="$CC_HIGHEST -fsimple"
28465         # Use single precision floating point with 'float'
28466         CC_HIGHEST="$CC_HIGHEST -fsingle"
28467         # Assume memory references via basic pointer types do not alias
28468         #   (Source with excessing pointer casting and data access with mixed
28469         #    pointer types are not recommended)
28470         CC_HIGHEST="$CC_HIGHEST -xalias_level=basic"
28471         # Use intrinsic or inline versions for math/std functions
28472         #   (If you expect perfect errno behavior, do not use this)
28473         CC_HIGHEST="$CC_HIGHEST -xbuiltin=%all"
28474         # Loop data dependency optimizations (need -xO3 or higher)
28475         CC_HIGHEST="$CC_HIGHEST -xdepend"
28476         # Pointer parameters to functions do not overlap
28477         #   (Similar to -xalias_level=basic usage, but less obvious sometimes.
28478         #    If you pass in multiple pointers to the same data, do not use this)
28479         CC_HIGHEST="$CC_HIGHEST -xrestrict"
28480         # Inline some library routines
28481         #   (If you expect perfect errno behavior, do not use this)
28482         CC_HIGHEST="$CC_HIGHEST -xlibmil"
28483         # Use optimized math routines
28484         #   (If you expect perfect errno behavior, do not use this)
28485         #  Can cause undefined external on Solaris 8 X86 on __sincos, removing for now
28486         #CC_HIGHEST="$CC_HIGHEST -xlibmopt"
28487 
28488         if test "x$OPENJDK_TARGET_CPU" = xsparc; then
28489           CFLAGS_JDK="${CFLAGS_JDK} -xmemalign=4s"
28490           CXXFLAGS_JDK="${CXXFLAGS_JDK} -xmemalign=4s"
28491         fi
28492 
28493         case $OPENJDK_TARGET_CPU_ARCH in
28494           x86)
28495             C_O_FLAG_HIGHEST="-xO4 -Wu,-O4~yz $CC_HIGHEST -xregs=no%frameptr"
28496             C_O_FLAG_HI="-xO4 -Wu,-O4~yz -xregs=no%frameptr"
28497             C_O_FLAG_NORM="-xO2 -Wu,-O2~yz -xregs=no%frameptr"
28498             C_O_FLAG_NONE="-xregs=no%frameptr"
28499             CXX_O_FLAG_HIGHEST="-xO4 -Qoption ube -O4~yz $CC_HIGHEST -xregs=no%frameptr"
28500             CXX_O_FLAG_HI="-xO4 -Qoption ube -O4~yz -xregs=no%frameptr"
28501             CXX_O_FLAG_NORM="-xO2 -Qoption ube -O2~yz -xregs=no%frameptr"
28502             CXX_O_FLAG_NONE="-xregs=no%frameptr"
28503             if test "x$OPENJDK_TARGET_CPU" = xx86; then
28504                C_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST -xchip=pentium"
28505                CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HIGHEST -xchip=pentium"
28506             fi
28507             ;;
28508           sparc)
28509             CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
28510             CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
28511             C_O_FLAG_HIGHEST="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
28512             C_O_FLAG_HI="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0"
28513             C_O_FLAG_NORM="-xO2 -Wc,-Qrm-s -Wc,-Qiselect-T0"
28514             C_O_FLAG_NONE=""
28515             CXX_O_FLAG_HIGHEST="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
28516             CXX_O_FLAG_HI="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
28517             CXX_O_FLAG_NORM="-xO2 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
28518             CXX_O_FLAG_NONE=""
28519             ;;
28520         esac
28521 
28522     CFLAGS_DEBUG_SYMBOLS="-g -xs"
28523     CXXFLAGS_DEBUG_SYMBOLS="-g0 -xs"
28524     esac
28525     ;;
28526   CL )
28527     D_FLAG=
28528     C_O_FLAG_HIGHEST="-O2"
28529     C_O_FLAG_HI="-O1"
28530     C_O_FLAG_NORM="-O1"
28531     C_O_FLAG_NONE="-Od"
28532     CXX_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST"
28533     CXX_O_FLAG_HI="$C_O_FLAG_HI"
28534     CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
28535     CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
28536     ;;
28537 esac
28538 
28539 if test -z "$C_O_FLAG_HIGHEST"; then
28540    C_O_FLAG_HIGHEST="$C_O_FLAG_HI"
28541 fi
28542 
28543 if test -z "$CXX_O_FLAG_HIGHEST"; then
28544    CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HI"
28545 fi
28546 
28547 
28548 
28549 
28550 
28551 
28552 
28553 
28554 
28555 
28556 
28557 
28558 
28559 
28560 if test "x$CFLAGS" != "x${ADDED_CFLAGS}"; then
28561    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&5
28562 $as_echo "$as_me: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&2;}
28563 fi
28564 
28565 if test "x$CXXFLAGS" != "x${ADDED_CXXFLAGS}"; then
28566    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&5
28567 $as_echo "$as_me: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&2;}
28568 fi
28569 
28570 if test "x$LDFLAGS" != "x${ADDED_LDFLAGS}"; then
28571    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&5
28572 $as_echo "$as_me: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&2;}
28573 fi
28574 
28575 
28576 # Check whether --with-extra-cflags was given.
28577 if test "${with_extra_cflags+set}" = set; then :
28578   withval=$with_extra_cflags;
28579 fi
28580 
28581 
28582 
28583 # Check whether --with-extra-cxxflags was given.
28584 if test "${with_extra_cxxflags+set}" = set; then :
28585   withval=$with_extra_cxxflags;
28586 fi
28587 
28588 
28589 
28590 # Check whether --with-extra-ldflags was given.
28591 if test "${with_extra_ldflags+set}" = set; then :
28592   withval=$with_extra_ldflags;
28593 fi
28594 
28595 
28596 CFLAGS_JDK="${CFLAGS_JDK} $with_extra_cflags"
28597 CXXFLAGS_JDK="${CXXFLAGS_JDK} $with_extra_cxxflags"
28598 LDFLAGS_JDK="${LDFLAGS_JDK} $with_extra_ldflags"
28599 
28600 # Hotspot needs these set in their legacy form
28601 LEGACY_EXTRA_CFLAGS=$with_extra_cflags
28602 LEGACY_EXTRA_CXXFLAGS=$with_extra_cxxflags
28603 LEGACY_EXTRA_LDFLAGS=$with_extra_ldflags
28604 
28605 
28606 
28607 
28608 
28609 ###############################################################################
28610 #
28611 # Now setup the CFLAGS and LDFLAGS for the JDK build.
28612 # Later we will also have CFLAGS and LDFLAGS for the hotspot subrepo build.
28613 #
28614 case $COMPILER_NAME in
28615       gcc )
28616           CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -W -Wall -Wno-unused -Wno-parentheses \
28617                           -pipe \
28618                           -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
28619           case $OPENJDK_TARGET_CPU_ARCH in
28620           arm )
28621             # on arm we don't prevent gcc to omit frame pointer but do prevent strict aliasing
28622             CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
28623           ;;
28624           ppc )
28625             # on ppc we don't prevent gcc to omit frame pointer nor strict-aliasing
28626           ;;
28627           * )
28628             CCXXFLAGS_JDK="$CCXXFLAGS_JDK -fno-omit-frame-pointer"
28629             CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
28630           ;;
28631           esac
28632           ;;
28633       ossc )
28634           CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS"
28635           case $OPENJDK_TARGET_CPU_ARCH in
28636           x86 )
28637             CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DcpuIntel -Di586 -D$OPENJDK_TARGET_CPU_LEGACY_LIB"
28638             CFLAGS_JDK="$CFLAGS_JDK -erroff=E_BAD_PRAGMA_PACK_VALUE"
28639           ;;
28640           esac
28641 
28642           CFLAGS_JDK="$CFLAGS_JDK -xc99=%none -xCC -errshort=tags -Xa -v -mt -W0,-noglobal"
28643           CXXFLAGS_JDK="$CXXFLAGS_JDK -errtags=yes +w -mt -features=no%except -DCC_NOEX -norunpath -xnolib"
28644 
28645           LDFLAGS_JDK="$LDFLAGS_JDK -z defs -xildoff -ztext"
28646           LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK -norunpath -xnolib"
28647           ;;
28648       cl )
28649           CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -Zi -MD -Zc:wchar_t- -W3 -wd4800 \
28650                -D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB -DWIN32_LEAN_AND_MEAN \
28651                -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \
28652                -DWIN32 -DIAL"
28653           case $OPENJDK_TARGET_CPU in
28654               x86 )
28655                   CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_X86_ -Dx86"
28656                   ;;
28657               x86_64 )
28658                   CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_AMD64_ -Damd64"
28659                   ;;
28660           esac
28661           ;;
28662 esac
28663 
28664 ###############################################################################
28665 
28666 CCXXFLAGS_JDK="$CCXXFLAGS_JDK $ADD_LP64"
28667 
28668 # The package path is used only on macosx?
28669 PACKAGE_PATH=/opt/local
28670 
28671 
28672 if test "x$OPENJDK_TARGET_CPU_ENDIAN" = xlittle; then
28673     # The macro _LITTLE_ENDIAN needs to be defined the same to avoid the
28674     #   Sun C compiler warning message: warning: macro redefined: _LITTLE_ENDIAN
28675     #   (The Solaris X86 system defines this in file /usr/include/sys/isa_defs.h).
28676     #   Note: -Dmacro         is the same as    #define macro 1
28677     #         -Dmacro=      is the same as    #define macro
28678     if test "x$OPENJDK_TARGET_OS" = xsolaris; then
28679         CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_LITTLE_ENDIAN="
28680     else
28681         CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_LITTLE_ENDIAN"
28682     fi
28683 else
28684     CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_BIG_ENDIAN"
28685 fi
28686 if test "x$OPENJDK_TARGET_OS" = xlinux; then
28687     CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DLINUX"
28688 fi
28689 if test "x$OPENJDK_TARGET_OS" = xwindows; then
28690     CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DWINDOWS"
28691 fi
28692 if test "x$OPENJDK_TARGET_OS" = xsolaris; then
28693     CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DSOLARIS"
28694 fi
28695 if test "x$OPENJDK_TARGET_OS" = xmacosx; then
28696     CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DMACOSX -D_ALLBSD_SOURCE"
28697     # Setting these parameters makes it an error to link to macosx APIs that are
28698     # newer than the given OS version and makes the linked binaries compatible even
28699     # if built on a newer version of the OS.
28700     # The expected format is X.Y.Z
28701     MACOSX_VERSION_MIN=10.7.0
28702 
28703     # The macro takes the version with no dots, ex: 1070
28704     # Let the flags variables get resolved in make for easier override on make
28705     # command line.
28706     CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DMAC_OS_X_VERSION_MAX_ALLOWED=\$(subst .,,\$(MACOSX_VERSION_MIN)) -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
28707     LDFLAGS_JDK="$LDFLAGS_JDK -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
28708 fi
28709 if test "x$OPENJDK_TARGET_OS" = xbsd; then
28710     CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DBSD -D_ALLBSD_SOURCE"
28711 fi
28712 if test "x$DEBUG_LEVEL" = xrelease; then
28713     CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DNDEBUG"
28714     if test "x$OPENJDK_TARGET_OS" = xsolaris; then
28715         CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DTRIMMED"
28716     fi
28717 else
28718     CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DDEBUG"
28719 fi
28720 
28721 CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DARCH='\"$OPENJDK_TARGET_CPU_LEGACY\"' -D$OPENJDK_TARGET_CPU_LEGACY"
28722 CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DRELEASE='\"$RELEASE\"'"
28723 
28724 CCXXFLAGS_JDK="$CCXXFLAGS_JDK \
28725         -I${JDK_OUTPUTDIR}/include \
28726         -I${JDK_OUTPUTDIR}/include/$OPENJDK_TARGET_OS \
28727         -I${JDK_TOPDIR}/src/share/javavm/export \
28728         -I${JDK_TOPDIR}/src/$OPENJDK_TARGET_OS_API_DIR/javavm/export \
28729         -I${JDK_TOPDIR}/src/share/native/common \
28730         -I${JDK_TOPDIR}/src/$OPENJDK_TARGET_OS_API_DIR/native/common"
28731 
28732 # The shared libraries are compiled using the picflag.
28733 CFLAGS_JDKLIB="$CCXXFLAGS_JDK $CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
28734 CXXFLAGS_JDKLIB="$CCXXFLAGS_JDK $CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA "
28735 
28736 # Executable flags
28737 CFLAGS_JDKEXE="$CCXXFLAGS_JDK $CFLAGS_JDK"
28738 CXXFLAGS_JDKEXE="$CCXXFLAGS_JDK $CXXFLAGS_JDK"
28739 
28740 # Now this is odd. The JDK native libraries have to link against libjvm.so
28741 # On 32-bit machines there is normally two distinct libjvm.so:s, client and server.
28742 # Which should we link to? Are we lucky enough that the binary api to the libjvm.so library
28743 # is identical for client and server? Yes. Which is picked at runtime (client or server)?
28744 # Neither, since the chosen libjvm.so has already been loaded by the launcher, all the following
28745 # libraries will link to whatever is in memory. Yuck.
28746 #
28747 # Thus we offer the compiler to find libjvm.so first in server then in client. It works. Ugh.
28748 if test "x$COMPILER_NAME" = xcl; then
28749     LDFLAGS_JDK="$LDFLAGS_JDK -nologo -opt:ref -incremental:no"
28750     if test "x$OPENJDK_TARGET_CPU" = xx86; then
28751         LDFLAGS_JDK="$LDFLAGS_JDK -safeseh"
28752     fi
28753     # TODO: make -debug optional "--disable-full-debug-symbols"
28754     LDFLAGS_JDK="$LDFLAGS_JDK -debug"
28755     LDFLAGS_JDKLIB="${LDFLAGS_JDK} -dll -libpath:${JDK_OUTPUTDIR}/lib"
28756     LDFLAGS_JDKLIB_SUFFIX=""
28757     if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
28758         LDFLAGS_STACK_SIZE=1048576
28759     else
28760         LDFLAGS_STACK_SIZE=327680
28761     fi
28762     LDFLAGS_JDKEXE="${LDFLAGS_JDK} /STACK:$LDFLAGS_STACK_SIZE"
28763 else
28764     if test "x$COMPILER_NAME" = xgcc; then
28765         # If this is a --hash-style=gnu system, use --hash-style=both, why?
28766         HAS_GNU_HASH=`$CC -dumpspecs 2>/dev/null | $GREP 'hash-style=gnu'`
28767         if test -n "$HAS_GNU_HASH"; then
28768             LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker --hash-style=both "
28769         fi
28770         if test "x$OPENJDK_TARGET_OS" = xlinux; then
28771           # And since we now know that the linker is gnu, then add -z defs, to forbid
28772           # undefined symbols in object files.
28773           LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -z -Xlinker defs"
28774           if test "x$DEBUG_LEVEL" = "xrelease"; then
28775               # When building release libraries, tell the linker optimize them.
28776               # Should this be supplied to the OSS linker as well?
28777               LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -O1"
28778           fi
28779         fi
28780     fi
28781     LDFLAGS_JDKLIB="${LDFLAGS_JDK} $SHARED_LIBRARY_FLAGS \
28782                     -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}"
28783 
28784     # On some platforms (mac) the linker warns about non existing -L dirs.
28785     # Add server first if available. Linking aginst client does not always produce the same results.
28786     # Only add client dir if client is being built. Add minimal (note not minimal1) if only building minimal1.
28787     # Default to server for other variants.
28788     if test "x$JVM_VARIANT_SERVER" = xtrue; then
28789         LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/server"
28790     elif test "x$JVM_VARIANT_CLIENT" = xtrue; then
28791         LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/client"
28792     elif test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
28793         LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/minimal"
28794     else
28795         LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/server"
28796     fi
28797 
28798     LDFLAGS_JDKLIB_SUFFIX="-ljava -ljvm"
28799     if test "x$COMPILER_NAME" = xossc; then
28800         LDFLAGS_JDKLIB_SUFFIX="$LDFLAGS_JDKLIB_SUFFIX -lc"
28801     fi
28802 
28803     LDFLAGS_JDKEXE="${LDFLAGS_JDK}"
28804     if test "x$OPENJDK_TARGET_OS" = xlinux; then
28805         LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE -Xlinker --allow-shlib-undefined"
28806     fi
28807 fi
28808 
28809 # Adjust flags according to debug level.
28810 case $DEBUG_LEVEL in
28811       fastdebug )
28812               CFLAGS="$CFLAGS $D_FLAG"
28813               JAVAC_FLAGS="$JAVAC_FLAGS -g"
28814               ;;
28815       slowdebug )
28816               CFLAGS="$CFLAGS $D_FLAG"
28817               C_O_FLAG_HI="$C_O_FLAG_NONE"
28818               C_O_FLAG_NORM="$C_O_FLAG_NONE"
28819               CXX_O_FLAG_HI="$CXX_O_FLAG_NONE"
28820               CXX_O_FLAG_NORM="$CXX_O_FLAG_NONE"
28821               JAVAC_FLAGS="$JAVAC_FLAGS -g"
28822               ;;
28823 esac
28824 
28825 
28826 
28827 
28828 
28829 
28830 
28831 
28832 
28833 
28834 
28835 
28836 
28837 
28838 
28839 # Setup debug symbols (need objcopy from the toolchain for that)
28840 
28841 #
28842 # ENABLE_DEBUG_SYMBOLS
28843 # This must be done after the toolchain is setup, since we're looking at objcopy.
28844 #
28845 # Check whether --enable-debug-symbols was given.
28846 if test "${enable_debug_symbols+set}" = set; then :
28847   enableval=$enable_debug_symbols;
28848 fi
28849 
28850 
28851 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should generate debug symbols" >&5
28852 $as_echo_n "checking if we should generate debug symbols... " >&6; }
28853 
28854 if test "x$enable_debug_symbols" = "xyes" && test "x$OBJCOPY" = x; then
28855    # explicit enabling of enable-debug-symbols and can't find objcopy
28856    #   this is an error
28857    as_fn_error $? "Unable to find objcopy, cannot enable debug-symbols" "$LINENO" 5
28858 fi
28859 
28860 if test "x$enable_debug_symbols" = "xyes"; then
28861   ENABLE_DEBUG_SYMBOLS=true
28862 elif test "x$enable_debug_symbols" = "xno"; then
28863   ENABLE_DEBUG_SYMBOLS=false
28864 else
28865   # default on macosx is false
28866   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
28867     ENABLE_DEBUG_SYMBOLS=false
28868   # Default is on if objcopy is found, otherwise off
28869   elif test "x$OBJCOPY" != x || test "x$OPENJDK_TARGET_OS" = xwindows; then
28870     ENABLE_DEBUG_SYMBOLS=true
28871   else
28872     ENABLE_DEBUG_SYMBOLS=false
28873   fi
28874 fi
28875 
28876 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_DEBUG_SYMBOLS" >&5
28877 $as_echo "$ENABLE_DEBUG_SYMBOLS" >&6; }
28878 
28879 #
28880 # ZIP_DEBUGINFO_FILES
28881 #
28882 # Check whether --enable-zip-debug-info was given.
28883 if test "${enable_zip_debug_info+set}" = set; then :
28884   enableval=$enable_zip_debug_info;
28885 fi
28886 
28887 
28888 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should zip debug-info files" >&5
28889 $as_echo_n "checking if we should zip debug-info files... " >&6; }
28890 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${enable_zip_debug_info}" >&5
28891 $as_echo "${enable_zip_debug_info}" >&6; }
28892 
28893 if test "x${enable_zip_debug_info}" = "xno"; then
28894    ZIP_DEBUGINFO_FILES=false
28895 else
28896    ZIP_DEBUGINFO_FILES=true
28897 fi
28898 
28899 
28900 
28901 
28902 
28903 
28904 
28905 ###############################################################################
28906 #
28907 # Check dependencies for external and internal libraries.
28908 #
28909 ###############################################################################
28910 
28911 
28912 
28913 ###############################################################################
28914 #
28915 # OS specific settings that we never will need to probe.
28916 #
28917 if test "x$OPENJDK_TARGET_OS" = xlinux; then
28918     { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Linux?" >&5
28919 $as_echo_n "checking what is not needed on Linux?... " >&6; }
28920     PULSE_NOT_NEEDED=yes
28921     { $as_echo "$as_me:${as_lineno-$LINENO}: result: pulse" >&5
28922 $as_echo "pulse" >&6; }
28923 fi
28924 
28925 if test "x$OPENJDK_TARGET_OS" = xsolaris; then
28926     { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Solaris?" >&5
28927 $as_echo_n "checking what is not needed on Solaris?... " >&6; }
28928     ALSA_NOT_NEEDED=yes
28929     PULSE_NOT_NEEDED=yes
28930     { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse" >&5
28931 $as_echo "alsa pulse" >&6; }
28932 fi
28933 
28934 if test "x$OPENJDK_TARGET_OS" = xwindows; then
28935     { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Windows?" >&5
28936 $as_echo_n "checking what is not needed on Windows?... " >&6; }
28937     CUPS_NOT_NEEDED=yes
28938     ALSA_NOT_NEEDED=yes
28939     PULSE_NOT_NEEDED=yes
28940     X11_NOT_NEEDED=yes
28941     { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa cups pulse x11" >&5
28942 $as_echo "alsa cups pulse x11" >&6; }
28943 fi
28944 
28945 if test "x$OPENJDK_TARGET_OS" = xmacosx; then
28946     { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on MacOSX?" >&5
28947 $as_echo_n "checking what is not needed on MacOSX?... " >&6; }
28948     ALSA_NOT_NEEDED=yes
28949     PULSE_NOT_NEEDED=yes
28950     X11_NOT_NEEDED=yes
28951     FREETYPE2_NOT_NEEDED=yes
28952     # If the java runtime framework is disabled, then we need X11.
28953     # This will be adjusted below.
28954     { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse x11" >&5
28955 $as_echo "alsa pulse x11" >&6; }
28956 fi
28957 
28958 if test "x$OPENJDK_TARGET_OS" = xbsd; then
28959     { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on bsd?" >&5
28960 $as_echo_n "checking what is not needed on bsd?... " >&6; }
28961     ALSA_NOT_NEEDED=yes
28962     { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa" >&5
28963 $as_echo "alsa" >&6; }
28964 fi
28965 
28966 if test "x$OPENJDK" = "xfalse"; then
28967     FREETYPE2_NOT_NEEDED=yes
28968 fi
28969 
28970 if test "x$SUPPORT_HEADFUL" = xno; then
28971     X11_NOT_NEEDED=yes
28972 fi
28973 
28974 ###############################################################################
28975 #
28976 # Check for MacOSX support for OpenJDK. If this exists, try to build a JVM
28977 # that uses this API.
28978 #
28979 # Check whether --enable-macosx-runtime-support was given.
28980 if test "${enable_macosx_runtime_support+set}" = set; then :
28981   enableval=$enable_macosx_runtime_support; MACOSX_RUNTIME_SUPPORT="${enableval}"
28982 else
28983   MACOSX_RUNTIME_SUPPORT="no"
28984 fi
28985 
28986 
28987 USE_MACOSX_RUNTIME_SUPPORT=no
28988 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for explicit Java runtime support in the OS" >&5
28989 $as_echo_n "checking for explicit Java runtime support in the OS... " >&6; }
28990 if test -f /System/Library/Frameworks/JavaVM.framework/Frameworks/JavaRuntimeSupport.framework/Headers/JavaRuntimeSupport.h; then
28991     if test "x$MACOSX_RUNTIME_SUPPORT" != xno; then
28992         MACOSX_RUNTIME_SUPPORT=yes
28993         USE_MACOSX_RUNTIME_SUPPORT=yes
28994         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, does not need alsa freetype2 pulse and X11" >&5
28995 $as_echo "yes, does not need alsa freetype2 pulse and X11" >&6; }
28996     else
28997         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, but explicitly disabled." >&5
28998 $as_echo "yes, but explicitly disabled." >&6; }
28999     fi
29000 else
29001     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29002 $as_echo "no" >&6; }
29003 fi
29004 
29005 if test "x$OPENJDK_TARGET_OS" = xmacosx && test "x$USE_MACOSX_RUNTIME_SUPPORT" = xno; then
29006     { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on an X11 build on MacOSX?" >&5
29007 $as_echo_n "checking what is not needed on an X11 build on MacOSX?... " >&6; }
29008     X11_NOT_NEEDED=
29009     FREETYPE2_NOT_NEEDED=
29010     { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse" >&5
29011 $as_echo "alsa pulse" >&6; }
29012 fi
29013 
29014 
29015 
29016 
29017 ###############################################################################
29018 #
29019 # Check for X Windows
29020 #
29021 
29022 # Check if the user has specified sysroot, but not --x-includes or --x-libraries.
29023 # Make a simple check for the libraries at the sysroot, and setup --x-includes and
29024 # --x-libraries for the sysroot, if that seems to be correct.
29025 if test "x$SYS_ROOT" != "x/"; then
29026   if test "x$x_includes" = xNONE; then
29027     if test -f "$SYS_ROOT/usr/X11R6/include/X11/Xlib.h"; then
29028       x_includes="$SYS_ROOT/usr/X11R6/include"
29029     fi
29030   fi
29031   if test "x$x_libraries" = xNONE; then
29032     if test -f "$SYS_ROOT/usr/X11R6/lib/libX11.so"; then
29033       x_libraries="$SYS_ROOT/usr/X11R6/lib"
29034     fi
29035   fi
29036 fi
29037 
29038 # Now let autoconf do it's magic
29039 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
29040 $as_echo_n "checking for X... " >&6; }
29041 
29042 
29043 # Check whether --with-x was given.
29044 if test "${with_x+set}" = set; then :
29045   withval=$with_x;
29046 fi
29047 
29048 # $have_x is `yes', `no', `disabled', or empty when we do not yet know.
29049 if test "x$with_x" = xno; then
29050   # The user explicitly disabled X.
29051   have_x=disabled
29052 else
29053   case $x_includes,$x_libraries in #(
29054     *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5;; #(
29055     *,NONE | NONE,*) if ${ac_cv_have_x+:} false; then :
29056   $as_echo_n "(cached) " >&6
29057 else
29058   # One or both of the vars are not set, and there is no cached value.
29059 ac_x_includes=no ac_x_libraries=no
29060 rm -f -r conftest.dir
29061 if mkdir conftest.dir; then
29062   cd conftest.dir
29063   cat >Imakefile <<'_ACEOF'
29064 incroot:
29065         @echo incroot='${INCROOT}'
29066 usrlibdir:
29067         @echo usrlibdir='${USRLIBDIR}'
29068 libdir:
29069         @echo libdir='${LIBDIR}'
29070 _ACEOF
29071   if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
29072     # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
29073     for ac_var in incroot usrlibdir libdir; do
29074       eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
29075     done
29076     # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
29077     for ac_extension in a so sl dylib la dll; do
29078       if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
29079          test -f "$ac_im_libdir/libX11.$ac_extension"; then
29080         ac_im_usrlibdir=$ac_im_libdir; break
29081       fi
29082     done
29083     # Screen out bogus values from the imake configuration.  They are
29084     # bogus both because they are the default anyway, and because
29085     # using them would break gcc on systems where it needs fixed includes.
29086     case $ac_im_incroot in
29087         /usr/include) ac_x_includes= ;;
29088         *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
29089     esac
29090     case $ac_im_usrlibdir in
29091         /usr/lib | /usr/lib64 | /lib | /lib64) ;;
29092         *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
29093     esac
29094   fi
29095   cd ..
29096   rm -f -r conftest.dir
29097 fi
29098 
29099 # Standard set of common directories for X headers.
29100 # Check X11 before X11Rn because it is often a symlink to the current release.
29101 ac_x_header_dirs='
29102 /usr/X11/include
29103 /usr/X11R7/include
29104 /usr/X11R6/include
29105 /usr/X11R5/include
29106 /usr/X11R4/include
29107 
29108 /usr/include/X11
29109 /usr/include/X11R7
29110 /usr/include/X11R6
29111 /usr/include/X11R5
29112 /usr/include/X11R4
29113 
29114 /usr/local/X11/include
29115 /usr/local/X11R7/include
29116 /usr/local/X11R6/include
29117 /usr/local/X11R5/include
29118 /usr/local/X11R4/include
29119 
29120 /usr/local/include/X11
29121 /usr/local/include/X11R7
29122 /usr/local/include/X11R6
29123 /usr/local/include/X11R5
29124 /usr/local/include/X11R4
29125 
29126 /usr/X386/include
29127 /usr/x386/include
29128 /usr/XFree86/include/X11
29129 
29130 /usr/include
29131 /usr/local/include
29132 /usr/unsupported/include
29133 /usr/athena/include
29134 /usr/local/x11r5/include
29135 /usr/lpp/Xamples/include
29136 
29137 /usr/openwin/include
29138 /usr/openwin/share/include'
29139 
29140 if test "$ac_x_includes" = no; then
29141   # Guess where to find include files, by looking for Xlib.h.
29142   # First, try using that file with no special directory specified.
29143   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29144 /* end confdefs.h.  */
29145 #include <X11/Xlib.h>
29146 _ACEOF
29147 if ac_fn_cxx_try_cpp "$LINENO"; then :
29148   # We can compile using X headers with no special include directory.
29149 ac_x_includes=
29150 else
29151   for ac_dir in $ac_x_header_dirs; do
29152   if test -r "$ac_dir/X11/Xlib.h"; then
29153     ac_x_includes=$ac_dir
29154     break
29155   fi
29156 done
29157 fi
29158 rm -f conftest.err conftest.i conftest.$ac_ext
29159 fi # $ac_x_includes = no
29160 
29161 if test "$ac_x_libraries" = no; then
29162   # Check for the libraries.
29163   # See if we find them without any special options.
29164   # Don't add to $LIBS permanently.
29165   ac_save_LIBS=$LIBS
29166   LIBS="-lX11 $LIBS"
29167   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29168 /* end confdefs.h.  */
29169 #include <X11/Xlib.h>
29170 int
29171 main ()
29172 {
29173 XrmInitialize ()
29174   ;
29175   return 0;
29176 }
29177 _ACEOF
29178 if ac_fn_cxx_try_link "$LINENO"; then :
29179   LIBS=$ac_save_LIBS
29180 # We can link X programs with no special library path.
29181 ac_x_libraries=
29182 else
29183   LIBS=$ac_save_LIBS
29184 for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
29185 do
29186   # Don't even attempt the hair of trying to link an X program!
29187   for ac_extension in a so sl dylib la dll; do
29188     if test -r "$ac_dir/libX11.$ac_extension"; then
29189       ac_x_libraries=$ac_dir
29190       break 2
29191     fi
29192   done
29193 done
29194 fi
29195 rm -f core conftest.err conftest.$ac_objext \
29196     conftest$ac_exeext conftest.$ac_ext
29197 fi # $ac_x_libraries = no
29198 
29199 case $ac_x_includes,$ac_x_libraries in #(
29200   no,* | *,no | *\'*)
29201     # Didn't find X, or a directory has "'" in its name.
29202     ac_cv_have_x="have_x=no";; #(
29203   *)
29204     # Record where we found X for the cache.
29205     ac_cv_have_x="have_x=yes\
29206         ac_x_includes='$ac_x_includes'\
29207         ac_x_libraries='$ac_x_libraries'"
29208 esac
29209 fi
29210 ;; #(
29211     *) have_x=yes;;
29212   esac
29213   eval "$ac_cv_have_x"
29214 fi # $with_x != no
29215 
29216 if test "$have_x" != yes; then
29217   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
29218 $as_echo "$have_x" >&6; }
29219   no_x=yes
29220 else
29221   # If each of the values was on the command line, it overrides each guess.
29222   test "x$x_includes" = xNONE && x_includes=$ac_x_includes
29223   test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
29224   # Update the cache value to reflect the command line values.
29225   ac_cv_have_x="have_x=yes\
29226         ac_x_includes='$x_includes'\
29227         ac_x_libraries='$x_libraries'"
29228   { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
29229 $as_echo "libraries $x_libraries, headers $x_includes" >&6; }
29230 fi
29231 
29232 if test "$no_x" = yes; then
29233   # Not all programs may use this symbol, but it does not hurt to define it.
29234 
29235 $as_echo "#define X_DISPLAY_MISSING 1" >>confdefs.h
29236 
29237   X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
29238 else
29239   if test -n "$x_includes"; then
29240     X_CFLAGS="$X_CFLAGS -I$x_includes"
29241   fi
29242 
29243   # It would also be nice to do this for all -L options, not just this one.
29244   if test -n "$x_libraries"; then
29245     X_LIBS="$X_LIBS -L$x_libraries"
29246     # For Solaris; some versions of Sun CC require a space after -R and
29247     # others require no space.  Words are not sufficient . . . .
29248     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -R must be followed by a space" >&5
29249 $as_echo_n "checking whether -R must be followed by a space... " >&6; }
29250     ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
29251     ac_xsave_cxx_werror_flag=$ac_cxx_werror_flag
29252     ac_cxx_werror_flag=yes
29253     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29254 /* end confdefs.h.  */
29255 
29256 int
29257 main ()
29258 {
29259 
29260   ;
29261   return 0;
29262 }
29263 _ACEOF
29264 if ac_fn_cxx_try_link "$LINENO"; then :
29265   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29266 $as_echo "no" >&6; }
29267        X_LIBS="$X_LIBS -R$x_libraries"
29268 else
29269   LIBS="$ac_xsave_LIBS -R $x_libraries"
29270        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29271 /* end confdefs.h.  */
29272 
29273 int
29274 main ()
29275 {
29276 
29277   ;
29278   return 0;
29279 }
29280 _ACEOF
29281 if ac_fn_cxx_try_link "$LINENO"; then :
29282   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
29283 $as_echo "yes" >&6; }
29284           X_LIBS="$X_LIBS -R $x_libraries"
29285 else
29286   { $as_echo "$as_me:${as_lineno-$LINENO}: result: neither works" >&5
29287 $as_echo "neither works" >&6; }
29288 fi
29289 rm -f core conftest.err conftest.$ac_objext \
29290     conftest$ac_exeext conftest.$ac_ext
29291 fi
29292 rm -f core conftest.err conftest.$ac_objext \
29293     conftest$ac_exeext conftest.$ac_ext
29294     ac_cxx_werror_flag=$ac_xsave_cxx_werror_flag
29295     LIBS=$ac_xsave_LIBS
29296   fi
29297 
29298   # Check for system-dependent libraries X programs must link with.
29299   # Do this before checking for the system-independent R6 libraries
29300   # (-lICE), since we may need -lsocket or whatever for X linking.
29301 
29302   if test "$ISC" = yes; then
29303     X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
29304   else
29305     # Martyn Johnson says this is needed for Ultrix, if the X
29306     # libraries were built with DECnet support.  And Karl Berry says
29307     # the Alpha needs dnet_stub (dnet does not exist).
29308     ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
29309     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29310 /* end confdefs.h.  */
29311 
29312 /* Override any GCC internal prototype to avoid an error.
29313    Use char because int might match the return type of a GCC
29314    builtin and then its argument prototype would still apply.  */
29315 #ifdef __cplusplus
29316 extern "C"
29317 #endif
29318 char XOpenDisplay ();
29319 int
29320 main ()
29321 {
29322 return XOpenDisplay ();
29323   ;
29324   return 0;
29325 }
29326 _ACEOF
29327 if ac_fn_cxx_try_link "$LINENO"; then :
29328 
29329 else
29330   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5
29331 $as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; }
29332 if ${ac_cv_lib_dnet_dnet_ntoa+:} false; then :
29333   $as_echo_n "(cached) " >&6
29334 else
29335   ac_check_lib_save_LIBS=$LIBS
29336 LIBS="-ldnet  $LIBS"
29337 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29338 /* end confdefs.h.  */
29339 
29340 /* Override any GCC internal prototype to avoid an error.
29341    Use char because int might match the return type of a GCC
29342    builtin and then its argument prototype would still apply.  */
29343 #ifdef __cplusplus
29344 extern "C"
29345 #endif
29346 char dnet_ntoa ();
29347 int
29348 main ()
29349 {
29350 return dnet_ntoa ();
29351   ;
29352   return 0;
29353 }
29354 _ACEOF
29355 if ac_fn_cxx_try_link "$LINENO"; then :
29356   ac_cv_lib_dnet_dnet_ntoa=yes
29357 else
29358   ac_cv_lib_dnet_dnet_ntoa=no
29359 fi
29360 rm -f core conftest.err conftest.$ac_objext \
29361     conftest$ac_exeext conftest.$ac_ext
29362 LIBS=$ac_check_lib_save_LIBS
29363 fi
29364 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
29365 $as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; }
29366 if test "x$ac_cv_lib_dnet_dnet_ntoa" = xyes; then :
29367   X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
29368 fi
29369 
29370     if test $ac_cv_lib_dnet_dnet_ntoa = no; then
29371       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet_stub" >&5
29372 $as_echo_n "checking for dnet_ntoa in -ldnet_stub... " >&6; }
29373 if ${ac_cv_lib_dnet_stub_dnet_ntoa+:} false; then :
29374   $as_echo_n "(cached) " >&6
29375 else
29376   ac_check_lib_save_LIBS=$LIBS
29377 LIBS="-ldnet_stub  $LIBS"
29378 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29379 /* end confdefs.h.  */
29380 
29381 /* Override any GCC internal prototype to avoid an error.
29382    Use char because int might match the return type of a GCC
29383    builtin and then its argument prototype would still apply.  */
29384 #ifdef __cplusplus
29385 extern "C"
29386 #endif
29387 char dnet_ntoa ();
29388 int
29389 main ()
29390 {
29391 return dnet_ntoa ();
29392   ;
29393   return 0;
29394 }
29395 _ACEOF
29396 if ac_fn_cxx_try_link "$LINENO"; then :
29397   ac_cv_lib_dnet_stub_dnet_ntoa=yes
29398 else
29399   ac_cv_lib_dnet_stub_dnet_ntoa=no
29400 fi
29401 rm -f core conftest.err conftest.$ac_objext \
29402     conftest$ac_exeext conftest.$ac_ext
29403 LIBS=$ac_check_lib_save_LIBS
29404 fi
29405 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
29406 $as_echo "$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; }
29407 if test "x$ac_cv_lib_dnet_stub_dnet_ntoa" = xyes; then :
29408   X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
29409 fi
29410 
29411     fi
29412 fi
29413 rm -f core conftest.err conftest.$ac_objext \
29414     conftest$ac_exeext conftest.$ac_ext
29415     LIBS="$ac_xsave_LIBS"
29416 
29417     # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
29418     # to get the SysV transport functions.
29419     # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
29420     # needs -lnsl.
29421     # The nsl library prevents programs from opening the X display
29422     # on Irix 5.2, according to T.E. Dickey.
29423     # The functions gethostbyname, getservbyname, and inet_addr are
29424     # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
29425     ac_fn_cxx_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
29426 if test "x$ac_cv_func_gethostbyname" = xyes; then :
29427 
29428 fi
29429 
29430     if test $ac_cv_func_gethostbyname = no; then
29431       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5
29432 $as_echo_n "checking for gethostbyname in -lnsl... " >&6; }
29433 if ${ac_cv_lib_nsl_gethostbyname+:} false; then :
29434   $as_echo_n "(cached) " >&6
29435 else
29436   ac_check_lib_save_LIBS=$LIBS
29437 LIBS="-lnsl  $LIBS"
29438 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29439 /* end confdefs.h.  */
29440 
29441 /* Override any GCC internal prototype to avoid an error.
29442    Use char because int might match the return type of a GCC
29443    builtin and then its argument prototype would still apply.  */
29444 #ifdef __cplusplus
29445 extern "C"
29446 #endif
29447 char gethostbyname ();
29448 int
29449 main ()
29450 {
29451 return gethostbyname ();
29452   ;
29453   return 0;
29454 }
29455 _ACEOF
29456 if ac_fn_cxx_try_link "$LINENO"; then :
29457   ac_cv_lib_nsl_gethostbyname=yes
29458 else
29459   ac_cv_lib_nsl_gethostbyname=no
29460 fi
29461 rm -f core conftest.err conftest.$ac_objext \
29462     conftest$ac_exeext conftest.$ac_ext
29463 LIBS=$ac_check_lib_save_LIBS
29464 fi
29465 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5
29466 $as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; }
29467 if test "x$ac_cv_lib_nsl_gethostbyname" = xyes; then :
29468   X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
29469 fi
29470 
29471       if test $ac_cv_lib_nsl_gethostbyname = no; then
29472         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lbsd" >&5
29473 $as_echo_n "checking for gethostbyname in -lbsd... " >&6; }
29474 if ${ac_cv_lib_bsd_gethostbyname+:} false; then :
29475   $as_echo_n "(cached) " >&6
29476 else
29477   ac_check_lib_save_LIBS=$LIBS
29478 LIBS="-lbsd  $LIBS"
29479 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29480 /* end confdefs.h.  */
29481 
29482 /* Override any GCC internal prototype to avoid an error.
29483    Use char because int might match the return type of a GCC
29484    builtin and then its argument prototype would still apply.  */
29485 #ifdef __cplusplus
29486 extern "C"
29487 #endif
29488 char gethostbyname ();
29489 int
29490 main ()
29491 {
29492 return gethostbyname ();
29493   ;
29494   return 0;
29495 }
29496 _ACEOF
29497 if ac_fn_cxx_try_link "$LINENO"; then :
29498   ac_cv_lib_bsd_gethostbyname=yes
29499 else
29500   ac_cv_lib_bsd_gethostbyname=no
29501 fi
29502 rm -f core conftest.err conftest.$ac_objext \
29503     conftest$ac_exeext conftest.$ac_ext
29504 LIBS=$ac_check_lib_save_LIBS
29505 fi
29506 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_gethostbyname" >&5
29507 $as_echo "$ac_cv_lib_bsd_gethostbyname" >&6; }
29508 if test "x$ac_cv_lib_bsd_gethostbyname" = xyes; then :
29509   X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
29510 fi
29511 
29512       fi
29513     fi
29514 
29515     # lieder@skyler.mavd.honeywell.com says without -lsocket,
29516     # socket/setsockopt and other routines are undefined under SCO ODT
29517     # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
29518     # on later versions), says Simon Leinen: it contains gethostby*
29519     # variants that don't use the name server (or something).  -lsocket
29520     # must be given before -lnsl if both are needed.  We assume that
29521     # if connect needs -lnsl, so does gethostbyname.
29522     ac_fn_cxx_check_func "$LINENO" "connect" "ac_cv_func_connect"
29523 if test "x$ac_cv_func_connect" = xyes; then :
29524 
29525 fi
29526 
29527     if test $ac_cv_func_connect = no; then
29528       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for connect in -lsocket" >&5
29529 $as_echo_n "checking for connect in -lsocket... " >&6; }
29530 if ${ac_cv_lib_socket_connect+:} false; then :
29531   $as_echo_n "(cached) " >&6
29532 else
29533   ac_check_lib_save_LIBS=$LIBS
29534 LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
29535 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29536 /* end confdefs.h.  */
29537 
29538 /* Override any GCC internal prototype to avoid an error.
29539    Use char because int might match the return type of a GCC
29540    builtin and then its argument prototype would still apply.  */
29541 #ifdef __cplusplus
29542 extern "C"
29543 #endif
29544 char connect ();
29545 int
29546 main ()
29547 {
29548 return connect ();
29549   ;
29550   return 0;
29551 }
29552 _ACEOF
29553 if ac_fn_cxx_try_link "$LINENO"; then :
29554   ac_cv_lib_socket_connect=yes
29555 else
29556   ac_cv_lib_socket_connect=no
29557 fi
29558 rm -f core conftest.err conftest.$ac_objext \
29559     conftest$ac_exeext conftest.$ac_ext
29560 LIBS=$ac_check_lib_save_LIBS
29561 fi
29562 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_connect" >&5
29563 $as_echo "$ac_cv_lib_socket_connect" >&6; }
29564 if test "x$ac_cv_lib_socket_connect" = xyes; then :
29565   X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
29566 fi
29567 
29568     fi
29569 
29570     # Guillermo Gomez says -lposix is necessary on A/UX.
29571     ac_fn_cxx_check_func "$LINENO" "remove" "ac_cv_func_remove"
29572 if test "x$ac_cv_func_remove" = xyes; then :
29573 
29574 fi
29575 
29576     if test $ac_cv_func_remove = no; then
29577       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for remove in -lposix" >&5
29578 $as_echo_n "checking for remove in -lposix... " >&6; }
29579 if ${ac_cv_lib_posix_remove+:} false; then :
29580   $as_echo_n "(cached) " >&6
29581 else
29582   ac_check_lib_save_LIBS=$LIBS
29583 LIBS="-lposix  $LIBS"
29584 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29585 /* end confdefs.h.  */
29586 
29587 /* Override any GCC internal prototype to avoid an error.
29588    Use char because int might match the return type of a GCC
29589    builtin and then its argument prototype would still apply.  */
29590 #ifdef __cplusplus
29591 extern "C"
29592 #endif
29593 char remove ();
29594 int
29595 main ()
29596 {
29597 return remove ();
29598   ;
29599   return 0;
29600 }
29601 _ACEOF
29602 if ac_fn_cxx_try_link "$LINENO"; then :
29603   ac_cv_lib_posix_remove=yes
29604 else
29605   ac_cv_lib_posix_remove=no
29606 fi
29607 rm -f core conftest.err conftest.$ac_objext \
29608     conftest$ac_exeext conftest.$ac_ext
29609 LIBS=$ac_check_lib_save_LIBS
29610 fi
29611 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix_remove" >&5
29612 $as_echo "$ac_cv_lib_posix_remove" >&6; }
29613 if test "x$ac_cv_lib_posix_remove" = xyes; then :
29614   X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
29615 fi
29616 
29617     fi
29618 
29619     # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
29620     ac_fn_cxx_check_func "$LINENO" "shmat" "ac_cv_func_shmat"
29621 if test "x$ac_cv_func_shmat" = xyes; then :
29622 
29623 fi
29624 
29625     if test $ac_cv_func_shmat = no; then
29626       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shmat in -lipc" >&5
29627 $as_echo_n "checking for shmat in -lipc... " >&6; }
29628 if ${ac_cv_lib_ipc_shmat+:} false; then :
29629   $as_echo_n "(cached) " >&6
29630 else
29631   ac_check_lib_save_LIBS=$LIBS
29632 LIBS="-lipc  $LIBS"
29633 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29634 /* end confdefs.h.  */
29635 
29636 /* Override any GCC internal prototype to avoid an error.
29637    Use char because int might match the return type of a GCC
29638    builtin and then its argument prototype would still apply.  */
29639 #ifdef __cplusplus
29640 extern "C"
29641 #endif
29642 char shmat ();
29643 int
29644 main ()
29645 {
29646 return shmat ();
29647   ;
29648   return 0;
29649 }
29650 _ACEOF
29651 if ac_fn_cxx_try_link "$LINENO"; then :
29652   ac_cv_lib_ipc_shmat=yes
29653 else
29654   ac_cv_lib_ipc_shmat=no
29655 fi
29656 rm -f core conftest.err conftest.$ac_objext \
29657     conftest$ac_exeext conftest.$ac_ext
29658 LIBS=$ac_check_lib_save_LIBS
29659 fi
29660 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ipc_shmat" >&5
29661 $as_echo "$ac_cv_lib_ipc_shmat" >&6; }
29662 if test "x$ac_cv_lib_ipc_shmat" = xyes; then :
29663   X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
29664 fi
29665 
29666     fi
29667   fi
29668 
29669   # Check for libraries that X11R6 Xt/Xaw programs need.
29670   ac_save_LDFLAGS=$LDFLAGS
29671   test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
29672   # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
29673   # check for ICE first), but we must link in the order -lSM -lICE or
29674   # we get undefined symbols.  So assume we have SM if we have ICE.
29675   # These have to be linked with before -lX11, unlike the other
29676   # libraries we check for below, so use a different variable.
29677   # John Interrante, Karl Berry
29678   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IceConnectionNumber in -lICE" >&5
29679 $as_echo_n "checking for IceConnectionNumber in -lICE... " >&6; }
29680 if ${ac_cv_lib_ICE_IceConnectionNumber+:} false; then :
29681   $as_echo_n "(cached) " >&6
29682 else
29683   ac_check_lib_save_LIBS=$LIBS
29684 LIBS="-lICE $X_EXTRA_LIBS $LIBS"
29685 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29686 /* end confdefs.h.  */
29687 
29688 /* Override any GCC internal prototype to avoid an error.
29689    Use char because int might match the return type of a GCC
29690    builtin and then its argument prototype would still apply.  */
29691 #ifdef __cplusplus
29692 extern "C"
29693 #endif
29694 char IceConnectionNumber ();
29695 int
29696 main ()
29697 {
29698 return IceConnectionNumber ();
29699   ;
29700   return 0;
29701 }
29702 _ACEOF
29703 if ac_fn_cxx_try_link "$LINENO"; then :
29704   ac_cv_lib_ICE_IceConnectionNumber=yes
29705 else
29706   ac_cv_lib_ICE_IceConnectionNumber=no
29707 fi
29708 rm -f core conftest.err conftest.$ac_objext \
29709     conftest$ac_exeext conftest.$ac_ext
29710 LIBS=$ac_check_lib_save_LIBS
29711 fi
29712 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
29713 $as_echo "$ac_cv_lib_ICE_IceConnectionNumber" >&6; }
29714 if test "x$ac_cv_lib_ICE_IceConnectionNumber" = xyes; then :
29715   X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
29716 fi
29717 
29718   LDFLAGS=$ac_save_LDFLAGS
29719 
29720 fi
29721 
29722 
29723 # AC_PATH_XTRA creates X_LIBS and sometimes adds -R flags. When cross compiling
29724 # this doesn't make sense so we remove it.
29725 if test "x$COMPILE_TYPE" = xcross; then
29726   X_LIBS=`$ECHO $X_LIBS | $SED 's/-R \{0,1\}[^ ]*//g'`
29727 fi
29728 
29729 if test "x$no_x" = xyes && test "x$X11_NOT_NEEDED" != xyes; then
29730 
29731     # Print a helpful message on how to acquire the necessary build dependency.
29732     # x11 is the help tag: freetyp2, cups, pulse, alsa etc
29733     MISSING_DEPENDENCY=x11
29734     PKGHANDLER_COMMAND=
29735 
29736     case $PKGHANDLER in
29737         apt-get)
29738                 apt_help     $MISSING_DEPENDENCY ;;
29739     yum)
29740                 yum_help     $MISSING_DEPENDENCY ;;
29741         port)
29742                 port_help    $MISSING_DEPENDENCY ;;
29743         pkgutil)
29744                 pkgutil_help $MISSING_DEPENDENCY ;;
29745         pkgadd)
29746                 pkgadd_help  $MISSING_DEPENDENCY ;;
29747     * )
29748       break ;;
29749     esac
29750 
29751     if test "x$PKGHANDLER_COMMAND" != x; then
29752         HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
29753     fi
29754 
29755     as_fn_error $? "Could not find X11 libraries. $HELP_MSG" "$LINENO" 5
29756 fi
29757 
29758 # Some of the old makefiles require a setting of OPENWIN_HOME
29759 # Since the X11R6 directory has disappeared on later Linuxes,
29760 # we need to probe for it.
29761 if test "x$OPENJDK_TARGET_OS" = xlinux; then
29762     if test -d "$SYS_ROOT/usr/X11R6"; then
29763         OPENWIN_HOME="$SYS_ROOT/usr/X11R6"
29764     fi
29765     if test -d "$SYS_ROOT/usr/include/X11"; then
29766         OPENWIN_HOME="$SYS_ROOT/usr"
29767     fi
29768 fi
29769 if test "x$OPENJDK_TARGET_OS" = xsolaris; then
29770     OPENWIN_HOME="/usr/openwin"
29771 fi
29772 
29773 
29774 
29775 #
29776 # Weird Sol10 something check...TODO change to try compile
29777 #
29778 if test "x${OPENJDK_TARGET_OS}" = xsolaris; then
29779   if test "`uname -r`" = "5.10"; then
29780      if test "`${EGREP} -c XLinearGradient ${OPENWIN_HOME}/share/include/X11/extensions/Xrender.h`" = "0"; then
29781         X_CFLAGS="${X_CFLAGS} -DSOLARIS10_NO_XRENDER_STRUCTS"
29782      fi
29783   fi
29784 fi
29785 
29786 ac_ext=c
29787 ac_cpp='$CPP $CPPFLAGS'
29788 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29789 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29790 ac_compiler_gnu=$ac_cv_c_compiler_gnu
29791 
29792 OLD_CFLAGS="$CFLAGS"
29793 CFLAGS="$CFLAGS $X_CFLAGS"
29794 
29795 # Need to include Xlib.h and Xutil.h to avoid "present but cannot be compiled" warnings on Solaris 10
29796 for ac_header in X11/extensions/shape.h X11/extensions/Xrender.h X11/extensions/XTest.h
29797 do :
29798   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
29799 ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" " # include <X11/Xlib.h>
29800                    # include <X11/Xutil.h>
29801 
29802 "
29803 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
29804   cat >>confdefs.h <<_ACEOF
29805 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
29806 _ACEOF
29807  X11_A_OK=yes
29808 else
29809   X11_A_OK=no
29810 fi
29811 
29812 done
29813 
29814 
29815 CFLAGS="$OLD_CFLAGS"
29816 ac_ext=cpp
29817 ac_cpp='$CXXCPP $CPPFLAGS'
29818 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29819 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29820 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
29821 
29822 
29823 if test "x$X11_A_OK" = xno && test "x$X11_NOT_NEEDED" != xyes; then
29824 
29825     # Print a helpful message on how to acquire the necessary build dependency.
29826     # x11 is the help tag: freetyp2, cups, pulse, alsa etc
29827     MISSING_DEPENDENCY=x11
29828     PKGHANDLER_COMMAND=
29829 
29830     case $PKGHANDLER in
29831         apt-get)
29832                 apt_help     $MISSING_DEPENDENCY ;;
29833     yum)
29834                 yum_help     $MISSING_DEPENDENCY ;;
29835         port)
29836                 port_help    $MISSING_DEPENDENCY ;;
29837         pkgutil)
29838                 pkgutil_help $MISSING_DEPENDENCY ;;
29839         pkgadd)
29840                 pkgadd_help  $MISSING_DEPENDENCY ;;
29841     * )
29842       break ;;
29843     esac
29844 
29845     if test "x$PKGHANDLER_COMMAND" != x; then
29846         HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
29847     fi
29848 
29849     as_fn_error $? "Could not find all X11 headers (shape.h Xrender.h XTest.h). $HELP_MSG" "$LINENO" 5
29850 fi
29851 
29852 
29853 
29854 
29855 
29856 
29857 ###############################################################################
29858 #
29859 # The common unix printing system cups is used to print from java.
29860 #
29861 
29862 # Check whether --with-cups was given.
29863 if test "${with_cups+set}" = set; then :
29864   withval=$with_cups;
29865 fi
29866 
29867 
29868 # Check whether --with-cups-include was given.
29869 if test "${with_cups_include+set}" = set; then :
29870   withval=$with_cups_include;
29871 fi
29872 
29873 
29874 if test "x$CUPS_NOT_NEEDED" = xyes; then
29875         if test "x${with_cups}" != x || test "x${with_cups_include}" != x; then
29876                 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cups not used, so --with-cups is ignored" >&5
29877 $as_echo "$as_me: WARNING: cups not used, so --with-cups is ignored" >&2;}
29878         fi
29879         CUPS_CFLAGS=
29880 else
29881         CUPS_FOUND=no
29882 
29883         if test "x${with_cups}" = xno || test "x${with_cups_include}" = xno; then
29884             as_fn_error $? "It is not possible to disable the use of cups. Remove the --without-cups option." "$LINENO" 5
29885         fi
29886 
29887         if test "x${with_cups}" != x; then
29888             CUPS_CFLAGS="-I${with_cups}/include"
29889             CUPS_FOUND=yes
29890         fi
29891         if test "x${with_cups_include}" != x; then
29892             CUPS_CFLAGS="-I${with_cups_include}"
29893             CUPS_FOUND=yes
29894         fi
29895         if test "x$CUPS_FOUND" = xno; then
29896 
29897 
29898     if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
29899         # Source the builddeps file again, to make sure it uses the latest variables!
29900         . $builddepsfile
29901         # Look for a target and build machine specific resource!
29902         eval resource=\${builddep_cups_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
29903         if test "x$resource" = x; then
29904             # Ok, lets instead look for a target specific resource
29905             eval resource=\${builddep_cups_TARGET_${rewritten_target_var}}
29906         fi
29907         if test "x$resource" = x; then
29908             # Ok, lets instead look for a build specific resource
29909             eval resource=\${builddep_cups_BUILD_${rewritten_build_var}}
29910         fi
29911         if test "x$resource" = x; then
29912             # Ok, lets instead look for a generic resource
29913             # (The cups comes from M4 and not the shell, thus no need for eval here.)
29914             resource=${builddep_cups}
29915         fi
29916         if test "x$resource" != x; then
29917             { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for cups" >&5
29918 $as_echo "$as_me: Using builddeps $resource for cups" >&6;}
29919             # If the resource in the builddeps.conf file is an existing directory,
29920             # for example /java/linux/cups
29921             if test -d ${resource}; then
29922                depdir=${resource}
29923             else
29924 
29925 # cups is for example mymodule
29926 # $resource is for example libs/general/libmymod_1_2_3.zip
29927 # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
29928 # $with_builddeps_dir is for example /localhome/builddeps
29929 # depdir is the name of the variable into which we store the depdir, eg MYMOD
29930 # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
29931 # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
29932     filename=`basename $resource`
29933     filebase=`echo $filename | sed 's/\.[^\.]*$//'`
29934     filebase=${filename%%.*}
29935     extension=${filename#*.}
29936     installdir=$with_builddeps_dir/$filebase
29937     if test ! -f $installdir/$filename.unpacked; then
29938         { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency cups from $with_builddeps_server/$resource and installing into $installdir" >&5
29939 $as_echo "$as_me: Downloading build dependency cups from $with_builddeps_server/$resource and installing into $installdir" >&6;}
29940         if test ! -d $installdir; then
29941             mkdir -p $installdir
29942         fi
29943         if test ! -d $installdir; then
29944             as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
29945         fi
29946         tmpfile=`mktemp $installdir/cups.XXXXXXXXX`
29947         touch $tmpfile
29948         if test ! -f $tmpfile; then
29949             as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
29950         fi
29951 
29952     # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
29953     # $tmpfile is the local file name for the downloaded file.
29954     VALID_TOOL=no
29955     if test "x$BDEPS_FTP" = xwget; then
29956        VALID_TOOL=yes
29957        wget -O $tmpfile $with_builddeps_server/$resource
29958     fi
29959     if test "x$BDEPS_FTP" = xlftp; then
29960        VALID_TOOL=yes
29961        lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
29962     fi
29963     if test "x$BDEPS_FTP" = xftp; then
29964         VALID_TOOL=yes
29965         FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
29966         FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
29967         FTPUSERPWD=${FTPSERVER%%@*}
29968         if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
29969             FTPUSER=${userpwd%%:*}
29970             FTPPWD=${userpwd#*@}
29971             FTPSERVER=${FTPSERVER#*@}
29972         else
29973             FTPUSER=ftp
29974             FTPPWD=ftp
29975         fi
29976         # the "pass" command does not work on some
29977         # ftp clients (read ftp.exe) but if it works,
29978         # passive mode is better!
29979         (\
29980             echo "user $FTPUSER $FTPPWD"        ;\
29981             echo "pass"                         ;\
29982             echo "bin"                          ;\
29983             echo "get $FTPPATH $tmpfile"              ;\
29984         ) | ftp -in $FTPSERVER
29985     fi
29986     if test "x$VALID_TOOL" != xyes; then
29987        as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
29988     fi
29989 
29990         mv $tmpfile $installdir/$filename
29991         if test ! -s $installdir/$filename; then
29992             as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
29993         fi
29994         case "$extension" in
29995             zip)  echo "Unzipping $installdir/$filename..."
29996                (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
29997             ;;
29998             tar.gz) echo "Untaring $installdir/$filename..."
29999                (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
30000             ;;
30001             tgz) echo "Untaring $installdir/$filename..."
30002                (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
30003             ;;
30004             *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
30005             ;;
30006         esac
30007     fi
30008     if test -f $installdir/$filename.unpacked; then
30009         depdir=$installdir
30010     fi
30011 
30012             fi
30013             # Source the builddeps file again, because in the previous command, the depdir
30014             # was updated to point at the current build dependency install directory.
30015             . $builddepsfile
30016             # Now extract variables from the builddeps.conf files.
30017             theroot=${builddep_cups_ROOT}
30018             thecflags=${builddep_cups_CFLAGS}
30019             thelibs=${builddep_cups_LIBS}
30020             if test "x$depdir" = x; then
30021                 as_fn_error $? "Could not download build dependency cups" "$LINENO" 5
30022             fi
30023             CUPS=$depdir
30024             if test "x$theroot" != x; then
30025                CUPS="$theroot"
30026             fi
30027             if test "x$thecflags" != x; then
30028                CUPS_CFLAGS="$thecflags"
30029             fi
30030             if test "x$thelibs" != x; then
30031                CUPS_LIBS="$thelibs"
30032             fi
30033             CUPS_FOUND=yes
30034 
30035         fi
30036 
30037     fi
30038 
30039         fi
30040         if test "x$CUPS_FOUND" = xno; then
30041             # Are the cups headers installed in the default /usr/include location?
30042             for ac_header in cups/cups.h cups/ppd.h
30043 do :
30044   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
30045 ac_fn_cxx_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
30046 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
30047   cat >>confdefs.h <<_ACEOF
30048 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
30049 _ACEOF
30050  CUPS_FOUND=yes
30051                               CUPS_CFLAGS=
30052                               DEFAULT_CUPS=yes
30053 fi
30054 
30055 done
30056 
30057         fi
30058         if test "x$CUPS_FOUND" = xno; then
30059             # Getting nervous now? Lets poke around for standard Solaris third-party
30060             # package installation locations.
30061             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
30062 $as_echo_n "checking for cups headers... " >&6; }
30063             if test -s /opt/sfw/cups/include/cups/cups.h; then
30064                # An SFW package seems to be installed!
30065                CUPS_FOUND=yes
30066                CUPS_CFLAGS="-I/opt/sfw/cups/include"
30067             elif test -s /opt/csw/include/cups/cups.h; then
30068                # A CSW package seems to be installed!
30069                CUPS_FOUND=yes
30070                CUPS_CFLAGS="-I/opt/csw/include"
30071             fi
30072             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
30073 $as_echo "$CUPS_FOUND" >&6; }
30074         fi
30075         if test "x$CUPS_FOUND" = xno; then
30076 
30077     # Print a helpful message on how to acquire the necessary build dependency.
30078     # cups is the help tag: freetyp2, cups, pulse, alsa etc
30079     MISSING_DEPENDENCY=cups
30080     PKGHANDLER_COMMAND=
30081 
30082     case $PKGHANDLER in
30083         apt-get)
30084                 apt_help     $MISSING_DEPENDENCY ;;
30085     yum)
30086                 yum_help     $MISSING_DEPENDENCY ;;
30087         port)
30088                 port_help    $MISSING_DEPENDENCY ;;
30089         pkgutil)
30090                 pkgutil_help $MISSING_DEPENDENCY ;;
30091         pkgadd)
30092                 pkgadd_help  $MISSING_DEPENDENCY ;;
30093     * )
30094       break ;;
30095     esac
30096 
30097     if test "x$PKGHANDLER_COMMAND" != x; then
30098         HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
30099     fi
30100 
30101             as_fn_error $? "Could not find cups! $HELP_MSG " "$LINENO" 5
30102         fi
30103 fi
30104 
30105 
30106 
30107 
30108 
30109 
30110 ###############################################################################
30111 #
30112 # The ubiquitous freetype2 library is used to render fonts.
30113 #
30114 
30115 # Check whether --with-freetype was given.
30116 if test "${with_freetype+set}" = set; then :
30117   withval=$with_freetype;
30118 fi
30119 
30120 
30121 # If we are using the OS installed system lib for freetype, then we do not need to copy it to the build tree
30122 USING_SYSTEM_FT_LIB=false
30123 
30124 if test "x$FREETYPE2_NOT_NEEDED" = xyes; then
30125         if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != x; then
30126                 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --with-freetype is ignored" >&5
30127 $as_echo "$as_me: WARNING: freetype not used, so --with-freetype is ignored" >&2;}
30128         fi
30129         FREETYPE2_CFLAGS=
30130         FREETYPE2_LIBS=
30131         FREETYPE2_LIB_PATH=
30132 else
30133         FREETYPE2_FOUND=no
30134 
30135         if test "x$with_freetype" != x; then
30136 
30137   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30138 
30139   # Input might be given as Windows format, start by converting to
30140   # unix format.
30141   path="$with_freetype"
30142   new_path=`$CYGPATH -u "$path"`
30143 
30144   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
30145   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
30146   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
30147   # "foo.exe" is OK but "foo" is an error.
30148   #
30149   # This test is therefore slightly more accurate than "test -f" to check for file precense.
30150   # It is also a way to make sure we got the proper file name for the real test later on.
30151   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
30152   if test "x$test_shortpath" = x; then
30153     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_freetype, which resolves as \"$path\", is invalid." >&5
30154 $as_echo "$as_me: The path of with_freetype, which resolves as \"$path\", is invalid." >&6;}
30155     as_fn_error $? "Cannot locate the the path of with_freetype" "$LINENO" 5
30156   fi
30157 
30158   # Call helper function which possibly converts this using DOS-style short mode.
30159   # If so, the updated path is stored in $new_path.
30160 
30161   input_path="$new_path"
30162   # Check if we need to convert this using DOS-style short mode. If the path
30163   # contains just simple characters, use it. Otherwise (spaces, weird characters),
30164   # take no chances and rewrite it.
30165   # Note: m4 eats our [], so we need to use [ and ] instead.
30166   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
30167   if test "x$has_forbidden_chars" != x; then
30168     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30169     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
30170     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
30171     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
30172       # Going to short mode and back again did indeed matter. Since short mode is
30173       # case insensitive, let's make it lowercase to improve readability.
30174       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30175       # Now convert it back to Unix-stile (cygpath)
30176       input_path=`$CYGPATH -u "$shortmode_path"`
30177       new_path="$input_path"
30178     fi
30179   fi
30180 
30181   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
30182   if test "x$test_cygdrive_prefix" = x; then
30183     # As a simple fix, exclude /usr/bin since it's not a real path.
30184     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
30185       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
30186       # a path prefixed by /cygdrive for fixpath to work.
30187       new_path="$CYGWIN_ROOT_PATH$input_path"
30188     fi
30189   fi
30190 
30191 
30192   if test "x$path" != "x$new_path"; then
30193     with_freetype="$new_path"
30194     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_freetype to \"$new_path\"" >&5
30195 $as_echo "$as_me: Rewriting with_freetype to \"$new_path\"" >&6;}
30196   fi
30197 
30198   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30199 
30200   path="$with_freetype"
30201   has_colon=`$ECHO $path | $GREP ^.:`
30202   new_path="$path"
30203   if test "x$has_colon" = x; then
30204     # Not in mixed or Windows style, start by that.
30205     new_path=`cmd //c echo $path`
30206   fi
30207 
30208 
30209   input_path="$new_path"
30210   # Check if we need to convert this using DOS-style short mode. If the path
30211   # contains just simple characters, use it. Otherwise (spaces, weird characters),
30212   # take no chances and rewrite it.
30213   # Note: m4 eats our [], so we need to use [ and ] instead.
30214   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
30215   if test "x$has_forbidden_chars" != x; then
30216     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30217     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30218   fi
30219 
30220 
30221   windows_path="$new_path"
30222   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30223     unix_path=`$CYGPATH -u "$windows_path"`
30224     new_path="$unix_path"
30225   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30226     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30227     new_path="$unix_path"
30228   fi
30229 
30230   if test "x$path" != "x$new_path"; then
30231     with_freetype="$new_path"
30232     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_freetype to \"$new_path\"" >&5
30233 $as_echo "$as_me: Rewriting with_freetype to \"$new_path\"" >&6;}
30234   fi
30235 
30236   # Save the first 10 bytes of this path to the storage, so fixpath can work.
30237   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
30238 
30239   else
30240     # We're on a posix platform. Hooray! :)
30241     path="$with_freetype"
30242 
30243     if test ! -f "$path" && test ! -d "$path"; then
30244       as_fn_error $? "The path of with_freetype, which resolves as \"$path\", is not found." "$LINENO" 5
30245     fi
30246 
30247     has_space=`$ECHO "$path" | $GREP " "`
30248     if test "x$has_space" != x; then
30249       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_freetype, which resolves as \"$path\", is invalid." >&5
30250 $as_echo "$as_me: The path of with_freetype, which resolves as \"$path\", is invalid." >&6;}
30251       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
30252     fi
30253   fi
30254 
30255             FREETYPE2_LIBS="-L$with_freetype/lib -lfreetype"
30256             FREETYPE2_LIB_PATH="$with_freetype/lib"
30257             if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64 && test -d "$with_freetype/lib/amd64"; then
30258                 FREETYPE2_LIBS="-L$with_freetype/lib/amd64 -lfreetype"
30259                 FREETYPE2_LIB_PATH="$with_freetype/lib/amd64"
30260             fi
30261             if test "x$OPENJDK_TARGET_OS" = xwindows; then
30262                 FREETYPE2_LIBS="$with_freetype/lib/freetype.lib"
30263             fi
30264             FREETYPE2_CFLAGS="-I$with_freetype/include"
30265             if test -s $with_freetype/include/ft2build.h && test -d $with_freetype/include/freetype2/freetype; then
30266                 FREETYPE2_CFLAGS="-I$with_freetype/include/freetype2 -I$with_freetype/include"
30267             fi
30268             FREETYPE2_FOUND=yes
30269             if test "x$FREETYPE2_FOUND" = xyes; then
30270                 # Verify that the directories exist
30271                 if ! test -d "$with_freetype/lib" || ! test -d "$with_freetype/include"; then
30272                    as_fn_error $? "Could not find the expected directories $with_freetype/lib and $with_freetype/include" "$LINENO" 5
30273                 fi
30274                 # List the contents of the lib.
30275                 FREETYPELIB=`ls $with_freetype/lib/libfreetype.so $with_freetype/lib/freetype.dll 2> /dev/null`
30276                 if test "x$FREETYPELIB" = x; then
30277                    as_fn_error $? "Could not find libfreetype.so nor freetype.dll in $with_freetype/lib" "$LINENO" 5
30278                 fi
30279                 # Check one h-file
30280                 if ! test -s "$with_freetype/include/ft2build.h"; then
30281                    as_fn_error $? "Could not find $with_freetype/include/ft2build.h" "$LINENO" 5
30282                 fi
30283             fi
30284         fi
30285         if test "x$FREETYPE2_FOUND" = xno; then
30286 
30287 
30288     if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
30289         # Source the builddeps file again, to make sure it uses the latest variables!
30290         . $builddepsfile
30291         # Look for a target and build machine specific resource!
30292         eval resource=\${builddep_freetype2_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
30293         if test "x$resource" = x; then
30294             # Ok, lets instead look for a target specific resource
30295             eval resource=\${builddep_freetype2_TARGET_${rewritten_target_var}}
30296         fi
30297         if test "x$resource" = x; then
30298             # Ok, lets instead look for a build specific resource
30299             eval resource=\${builddep_freetype2_BUILD_${rewritten_build_var}}
30300         fi
30301         if test "x$resource" = x; then
30302             # Ok, lets instead look for a generic resource
30303             # (The freetype2 comes from M4 and not the shell, thus no need for eval here.)
30304             resource=${builddep_freetype2}
30305         fi
30306         if test "x$resource" != x; then
30307             { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for freetype2" >&5
30308 $as_echo "$as_me: Using builddeps $resource for freetype2" >&6;}
30309             # If the resource in the builddeps.conf file is an existing directory,
30310             # for example /java/linux/cups
30311             if test -d ${resource}; then
30312                depdir=${resource}
30313             else
30314 
30315 # freetype2 is for example mymodule
30316 # $resource is for example libs/general/libmymod_1_2_3.zip
30317 # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
30318 # $with_builddeps_dir is for example /localhome/builddeps
30319 # depdir is the name of the variable into which we store the depdir, eg MYMOD
30320 # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
30321 # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
30322     filename=`basename $resource`
30323     filebase=`echo $filename | sed 's/\.[^\.]*$//'`
30324     filebase=${filename%%.*}
30325     extension=${filename#*.}
30326     installdir=$with_builddeps_dir/$filebase
30327     if test ! -f $installdir/$filename.unpacked; then
30328         { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency freetype2 from $with_builddeps_server/$resource and installing into $installdir" >&5
30329 $as_echo "$as_me: Downloading build dependency freetype2 from $with_builddeps_server/$resource and installing into $installdir" >&6;}
30330         if test ! -d $installdir; then
30331             mkdir -p $installdir
30332         fi
30333         if test ! -d $installdir; then
30334             as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
30335         fi
30336         tmpfile=`mktemp $installdir/freetype2.XXXXXXXXX`
30337         touch $tmpfile
30338         if test ! -f $tmpfile; then
30339             as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
30340         fi
30341 
30342     # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
30343     # $tmpfile is the local file name for the downloaded file.
30344     VALID_TOOL=no
30345     if test "x$BDEPS_FTP" = xwget; then
30346        VALID_TOOL=yes
30347        wget -O $tmpfile $with_builddeps_server/$resource
30348     fi
30349     if test "x$BDEPS_FTP" = xlftp; then
30350        VALID_TOOL=yes
30351        lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
30352     fi
30353     if test "x$BDEPS_FTP" = xftp; then
30354         VALID_TOOL=yes
30355         FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
30356         FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
30357         FTPUSERPWD=${FTPSERVER%%@*}
30358         if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
30359             FTPUSER=${userpwd%%:*}
30360             FTPPWD=${userpwd#*@}
30361             FTPSERVER=${FTPSERVER#*@}
30362         else
30363             FTPUSER=ftp
30364             FTPPWD=ftp
30365         fi
30366         # the "pass" command does not work on some
30367         # ftp clients (read ftp.exe) but if it works,
30368         # passive mode is better!
30369         (\
30370             echo "user $FTPUSER $FTPPWD"        ;\
30371             echo "pass"                         ;\
30372             echo "bin"                          ;\
30373             echo "get $FTPPATH $tmpfile"              ;\
30374         ) | ftp -in $FTPSERVER
30375     fi
30376     if test "x$VALID_TOOL" != xyes; then
30377        as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
30378     fi
30379 
30380         mv $tmpfile $installdir/$filename
30381         if test ! -s $installdir/$filename; then
30382             as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
30383         fi
30384         case "$extension" in
30385             zip)  echo "Unzipping $installdir/$filename..."
30386                (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
30387             ;;
30388             tar.gz) echo "Untaring $installdir/$filename..."
30389                (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
30390             ;;
30391             tgz) echo "Untaring $installdir/$filename..."
30392                (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
30393             ;;
30394             *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
30395             ;;
30396         esac
30397     fi
30398     if test -f $installdir/$filename.unpacked; then
30399         depdir=$installdir
30400     fi
30401 
30402             fi
30403             # Source the builddeps file again, because in the previous command, the depdir
30404             # was updated to point at the current build dependency install directory.
30405             . $builddepsfile
30406             # Now extract variables from the builddeps.conf files.
30407             theroot=${builddep_freetype2_ROOT}
30408             thecflags=${builddep_freetype2_CFLAGS}
30409             thelibs=${builddep_freetype2_LIBS}
30410             if test "x$depdir" = x; then
30411                 as_fn_error $? "Could not download build dependency freetype2" "$LINENO" 5
30412             fi
30413             FREETYPE2=$depdir
30414             if test "x$theroot" != x; then
30415                FREETYPE2="$theroot"
30416             fi
30417             if test "x$thecflags" != x; then
30418                FREETYPE2_CFLAGS="$thecflags"
30419             fi
30420             if test "x$thelibs" != x; then
30421                FREETYPE2_LIBS="$thelibs"
30422             fi
30423             FREETYPE2_FOUND=yes
30424             else FREETYPE2_FOUND=no
30425 
30426         fi
30427         else FREETYPE2_FOUND=no
30428 
30429     fi
30430 
30431             USING_SYSTEM_FT_LIB=true
30432         fi
30433         if test "x$FREETYPE2_FOUND" = xno && test "x$OPENJDK_TARGET_OS" = xwindows; then
30434             FREETYPELOCATION="$PROGRAMFILES/GnuWin32"
30435 
30436   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30437 
30438   # Input might be given as Windows format, start by converting to
30439   # unix format.
30440   path="$FREETYPELOCATION"
30441   new_path=`$CYGPATH -u "$path"`
30442 
30443   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
30444   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
30445   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
30446   # "foo.exe" is OK but "foo" is an error.
30447   #
30448   # This test is therefore slightly more accurate than "test -f" to check for file precense.
30449   # It is also a way to make sure we got the proper file name for the real test later on.
30450   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
30451   if test "x$test_shortpath" = x; then
30452     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPELOCATION, which resolves as \"$path\", is invalid." >&5
30453 $as_echo "$as_me: The path of FREETYPELOCATION, which resolves as \"$path\", is invalid." >&6;}
30454     as_fn_error $? "Cannot locate the the path of FREETYPELOCATION" "$LINENO" 5
30455   fi
30456 
30457   # Call helper function which possibly converts this using DOS-style short mode.
30458   # If so, the updated path is stored in $new_path.
30459 
30460   input_path="$new_path"
30461   # Check if we need to convert this using DOS-style short mode. If the path
30462   # contains just simple characters, use it. Otherwise (spaces, weird characters),
30463   # take no chances and rewrite it.
30464   # Note: m4 eats our [], so we need to use [ and ] instead.
30465   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
30466   if test "x$has_forbidden_chars" != x; then
30467     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30468     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
30469     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
30470     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
30471       # Going to short mode and back again did indeed matter. Since short mode is
30472       # case insensitive, let's make it lowercase to improve readability.
30473       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30474       # Now convert it back to Unix-stile (cygpath)
30475       input_path=`$CYGPATH -u "$shortmode_path"`
30476       new_path="$input_path"
30477     fi
30478   fi
30479 
30480   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
30481   if test "x$test_cygdrive_prefix" = x; then
30482     # As a simple fix, exclude /usr/bin since it's not a real path.
30483     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
30484       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
30485       # a path prefixed by /cygdrive for fixpath to work.
30486       new_path="$CYGWIN_ROOT_PATH$input_path"
30487     fi
30488   fi
30489 
30490 
30491   if test "x$path" != "x$new_path"; then
30492     FREETYPELOCATION="$new_path"
30493     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPELOCATION to \"$new_path\"" >&5
30494 $as_echo "$as_me: Rewriting FREETYPELOCATION to \"$new_path\"" >&6;}
30495   fi
30496 
30497   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30498 
30499   path="$FREETYPELOCATION"
30500   has_colon=`$ECHO $path | $GREP ^.:`
30501   new_path="$path"
30502   if test "x$has_colon" = x; then
30503     # Not in mixed or Windows style, start by that.
30504     new_path=`cmd //c echo $path`
30505   fi
30506 
30507 
30508   input_path="$new_path"
30509   # Check if we need to convert this using DOS-style short mode. If the path
30510   # contains just simple characters, use it. Otherwise (spaces, weird characters),
30511   # take no chances and rewrite it.
30512   # Note: m4 eats our [], so we need to use [ and ] instead.
30513   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
30514   if test "x$has_forbidden_chars" != x; then
30515     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30516     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30517   fi
30518 
30519 
30520   windows_path="$new_path"
30521   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30522     unix_path=`$CYGPATH -u "$windows_path"`
30523     new_path="$unix_path"
30524   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30525     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30526     new_path="$unix_path"
30527   fi
30528 
30529   if test "x$path" != "x$new_path"; then
30530     FREETYPELOCATION="$new_path"
30531     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPELOCATION to \"$new_path\"" >&5
30532 $as_echo "$as_me: Rewriting FREETYPELOCATION to \"$new_path\"" >&6;}
30533   fi
30534 
30535   # Save the first 10 bytes of this path to the storage, so fixpath can work.
30536   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
30537 
30538   else
30539     # We're on a posix platform. Hooray! :)
30540     path="$FREETYPELOCATION"
30541 
30542     if test ! -f "$path" && test ! -d "$path"; then
30543       as_fn_error $? "The path of FREETYPELOCATION, which resolves as \"$path\", is not found." "$LINENO" 5
30544     fi
30545 
30546     has_space=`$ECHO "$path" | $GREP " "`
30547     if test "x$has_space" != x; then
30548       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPELOCATION, which resolves as \"$path\", is invalid." >&5
30549 $as_echo "$as_me: The path of FREETYPELOCATION, which resolves as \"$path\", is invalid." >&6;}
30550       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
30551     fi
30552   fi
30553 
30554             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype in some standard windows locations" >&5
30555 $as_echo_n "checking for freetype in some standard windows locations... " >&6; }
30556             if test -s "$FREETYPELOCATION/include/ft2build.h" && test -d "$FREETYPELOCATION/include/freetype2/freetype"; then
30557                 FREETYPE2_CFLAGS="-I$FREETYPELOCATION/include/freetype2 -I$FREETYPELOCATION/include"
30558                 FREETYPE2_LIBS="$FREETYPELOCATION/lib/freetype.lib"
30559                 FREETYPE2_LIB_PATH="$FREETYPELOCATION/lib"
30560                 if ! test -s "$FREETYPE2_LIBS"; then
30561                    as_fn_error $? "Could not find $FREETYPE2_LIBS" "$LINENO" 5
30562                 fi
30563                 if ! test -s "$FREETYPE2_LIB_PATH/freetype.dll"; then
30564                    as_fn_error $? "Could not find $FREETYPE2_LIB_PATH/freetype.dll" "$LINENO" 5
30565                 fi
30566                 USING_SYSTEM_FT_LIB=true
30567                 FREETYPE2_FOUND=yes
30568             fi
30569             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE2_FOUND" >&5
30570 $as_echo "$FREETYPE2_FOUND" >&6; }
30571         fi
30572         if test "x$FREETYPE2_FOUND" = xno; then
30573 
30574 pkg_failed=no
30575 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FREETYPE2" >&5
30576 $as_echo_n "checking for FREETYPE2... " >&6; }
30577 
30578 if test -n "$FREETYPE2_CFLAGS"; then
30579     pkg_cv_FREETYPE2_CFLAGS="$FREETYPE2_CFLAGS"
30580  elif test -n "$PKG_CONFIG"; then
30581     if test -n "$PKG_CONFIG" && \
30582     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
30583   ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
30584   ac_status=$?
30585   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
30586   test $ac_status = 0; }; then
30587   pkg_cv_FREETYPE2_CFLAGS=`$PKG_CONFIG --cflags "freetype2" 2>/dev/null`
30588 else
30589   pkg_failed=yes
30590 fi
30591  else
30592     pkg_failed=untried
30593 fi
30594 if test -n "$FREETYPE2_LIBS"; then
30595     pkg_cv_FREETYPE2_LIBS="$FREETYPE2_LIBS"
30596  elif test -n "$PKG_CONFIG"; then
30597     if test -n "$PKG_CONFIG" && \
30598     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
30599   ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
30600   ac_status=$?
30601   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
30602   test $ac_status = 0; }; then
30603   pkg_cv_FREETYPE2_LIBS=`$PKG_CONFIG --libs "freetype2" 2>/dev/null`
30604 else
30605   pkg_failed=yes
30606 fi
30607  else
30608     pkg_failed=untried
30609 fi
30610 
30611 
30612 
30613 if test $pkg_failed = yes; then
30614 
30615 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
30616         _pkg_short_errors_supported=yes
30617 else
30618         _pkg_short_errors_supported=no
30619 fi
30620         if test $_pkg_short_errors_supported = yes; then
30621                 FREETYPE2_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "freetype2" 2>&1`
30622         else
30623                 FREETYPE2_PKG_ERRORS=`$PKG_CONFIG --print-errors "freetype2" 2>&1`
30624         fi
30625         # Put the nasty error message in config.log where it belongs
30626         echo "$FREETYPE2_PKG_ERRORS" >&5
30627 
30628         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30629 $as_echo "no" >&6; }
30630                 FREETYPE2_FOUND=no
30631 elif test $pkg_failed = untried; then
30632         FREETYPE2_FOUND=no
30633 else
30634         FREETYPE2_CFLAGS=$pkg_cv_FREETYPE2_CFLAGS
30635         FREETYPE2_LIBS=$pkg_cv_FREETYPE2_LIBS
30636         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
30637 $as_echo "yes" >&6; }
30638         FREETYPE2_FOUND=yes
30639 fi
30640             # On solaris, pkg_check adds -lz to freetype libs, which isn't necessary for us.
30641             FREETYPE2_LIBS=`$ECHO $FREETYPE2_LIBS | $SED 's/-lz//g'`
30642             USING_SYSTEM_FT_LIB=true
30643             # 64-bit libs for Solaris x86 are installed in the amd64 subdirectory, change lib to lib/amd64
30644             if test "x$FREETYPE2_FOUND" = xyes && test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
30645               FREETYPE2_LIBS=`$ECHO $FREETYPE2_LIBS | $SED 's?/lib?/lib/amd64?g'`
30646             fi
30647         fi
30648         if test "x$FREETYPE2_FOUND" = xno; then
30649             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype in some standard locations" >&5
30650 $as_echo_n "checking for freetype in some standard locations... " >&6; }
30651 
30652             if test -s /usr/X11/include/ft2build.h && test -d /usr/X11/include/freetype2/freetype; then
30653                 DEFAULT_FREETYPE_CFLAGS="-I/usr/X11/include/freetype2 -I/usr/X11/include"
30654                 DEFAULT_FREETYPE_LIBS="-L/usr/X11/lib -lfreetype"
30655             fi
30656             if test -s /usr/include/ft2build.h && test -d /usr/include/freetype2/freetype; then
30657                 DEFAULT_FREETYPE_CFLAGS="-I/usr/include/freetype2"
30658                 DEFAULT_FREETYPE_LIBS="-lfreetype"
30659             fi
30660 
30661             PREV_CXXCFLAGS="$CXXFLAGS"
30662             PREV_LDFLAGS="$LDFLAGS"
30663             CXXFLAGS="$CXXFLAGS $DEFAULT_FREETYPE_CFLAGS"
30664             LDFLAGS="$LDFLAGS $DEFAULT_FREETYPE_LIBS"
30665             cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30666 /* end confdefs.h.  */
30667 #include<ft2build.h>
30668                             #include FT_FREETYPE_H
30669                            int main() { return 0; }
30670 
30671 _ACEOF
30672 if ac_fn_cxx_try_link "$LINENO"; then :
30673 
30674                               # Yes, the default cflags and libs did the trick.
30675                               FREETYPE2_FOUND=yes
30676                               FREETYPE2_CFLAGS="$DEFAULT_FREETYPE_CFLAGS"
30677                               FREETYPE2_LIBS="$DEFAULT_FREETYPE_LIBS"
30678 
30679 else
30680 
30681                               FREETYPE2_FOUND=no
30682 
30683 fi
30684 rm -f core conftest.err conftest.$ac_objext \
30685     conftest$ac_exeext conftest.$ac_ext
30686             CXXCFLAGS="$PREV_CXXFLAGS"
30687             LDFLAGS="$PREV_LDFLAGS"
30688             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE2_FOUND" >&5
30689 $as_echo "$FREETYPE2_FOUND" >&6; }
30690             USING_SYSTEM_FT_LIB=true
30691         fi
30692         if test "x$FREETYPE2_FOUND" = xno; then
30693 
30694     # Print a helpful message on how to acquire the necessary build dependency.
30695     # freetype2 is the help tag: freetyp2, cups, pulse, alsa etc
30696     MISSING_DEPENDENCY=freetype2
30697     PKGHANDLER_COMMAND=
30698 
30699     case $PKGHANDLER in
30700         apt-get)
30701                 apt_help     $MISSING_DEPENDENCY ;;
30702     yum)
30703                 yum_help     $MISSING_DEPENDENCY ;;
30704         port)
30705                 port_help    $MISSING_DEPENDENCY ;;
30706         pkgutil)
30707                 pkgutil_help $MISSING_DEPENDENCY ;;
30708         pkgadd)
30709                 pkgadd_help  $MISSING_DEPENDENCY ;;
30710     * )
30711       break ;;
30712     esac
30713 
30714     if test "x$PKGHANDLER_COMMAND" != x; then
30715         HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
30716     fi
30717 
30718                 as_fn_error $? "Could not find freetype2! $HELP_MSG " "$LINENO" 5
30719         fi
30720 
30721         if test "x$OPENJDK_TARGET_OS" != xwindows; then
30722             # AC_CHECK_LIB does not support use of cl.exe
30723             PREV_LDFLAGS="$LDFLAGS"
30724             LDFLAGS="$FREETYPE2_LIBS"
30725             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FT_Init_FreeType in -lfreetype" >&5
30726 $as_echo_n "checking for FT_Init_FreeType in -lfreetype... " >&6; }
30727 if ${ac_cv_lib_freetype_FT_Init_FreeType+:} false; then :
30728   $as_echo_n "(cached) " >&6
30729 else
30730   ac_check_lib_save_LIBS=$LIBS
30731 LIBS="-lfreetype  $LIBS"
30732 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30733 /* end confdefs.h.  */
30734 
30735 /* Override any GCC internal prototype to avoid an error.
30736    Use char because int might match the return type of a GCC
30737    builtin and then its argument prototype would still apply.  */
30738 #ifdef __cplusplus
30739 extern "C"
30740 #endif
30741 char FT_Init_FreeType ();
30742 int
30743 main ()
30744 {
30745 return FT_Init_FreeType ();
30746   ;
30747   return 0;
30748 }
30749 _ACEOF
30750 if ac_fn_cxx_try_link "$LINENO"; then :
30751   ac_cv_lib_freetype_FT_Init_FreeType=yes
30752 else
30753   ac_cv_lib_freetype_FT_Init_FreeType=no
30754 fi
30755 rm -f core conftest.err conftest.$ac_objext \
30756     conftest$ac_exeext conftest.$ac_ext
30757 LIBS=$ac_check_lib_save_LIBS
30758 fi
30759 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_freetype_FT_Init_FreeType" >&5
30760 $as_echo "$ac_cv_lib_freetype_FT_Init_FreeType" >&6; }
30761 if test "x$ac_cv_lib_freetype_FT_Init_FreeType" = xyes; then :
30762   FREETYPE2_FOUND=true
30763 else
30764   as_fn_error $? "Could not find freetype2! $HELP_MSG " "$LINENO" 5
30765 fi
30766 
30767             LDFLAGS="$PREV_LDFLAGS"
30768         fi
30769 fi
30770 
30771 
30772 
30773 
30774 
30775 
30776 
30777 
30778 
30779 ###############################################################################
30780 #
30781 # Check for alsa headers and libraries. Used on Linux/GNU systems.
30782 #
30783 
30784 # Check whether --with-alsa was given.
30785 if test "${with_alsa+set}" = set; then :
30786   withval=$with_alsa;
30787 fi
30788 
30789 
30790 # Check whether --with-alsa-include was given.
30791 if test "${with_alsa_include+set}" = set; then :
30792   withval=$with_alsa_include;
30793 fi
30794 
30795 
30796 # Check whether --with-alsa-lib was given.
30797 if test "${with_alsa_lib+set}" = set; then :
30798   withval=$with_alsa_lib;
30799 fi
30800 
30801 
30802 if test "x$ALSA_NOT_NEEDED" = xyes; then
30803         if test "x${with_alsa}" != x || test "x${with_alsa_include}" != x || test "x${with_alsa_lib}" != x; then
30804                 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: alsa not used, so --with-alsa is ignored" >&5
30805 $as_echo "$as_me: WARNING: alsa not used, so --with-alsa is ignored" >&2;}
30806         fi
30807         ALSA_CFLAGS=
30808         ALSA_LIBS=
30809 else
30810         ALSA_FOUND=no
30811 
30812         if test "x${with_alsa}" = xno || test "x${with_alsa_include}" = xno || test "x${with_alsa_lib}" = xno; then
30813             as_fn_error $? "It is not possible to disable the use of alsa. Remove the --without-alsa option." "$LINENO" 5
30814         fi
30815 
30816         if test "x${with_alsa}" != x; then
30817             ALSA_LIBS="-L${with_alsa}/lib -lalsa"
30818             ALSA_CFLAGS="-I${with_alsa}/include"
30819             ALSA_FOUND=yes
30820         fi
30821         if test "x${with_alsa_include}" != x; then
30822             ALSA_CFLAGS="-I${with_alsa_include}"
30823             ALSA_FOUND=yes
30824         fi
30825         if test "x${with_alsa_lib}" != x; then
30826             ALSA_LIBS="-L${with_alsa_lib} -lalsa"
30827             ALSA_FOUND=yes
30828         fi
30829         if test "x$ALSA_FOUND" = xno; then
30830 
30831 
30832     if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
30833         # Source the builddeps file again, to make sure it uses the latest variables!
30834         . $builddepsfile
30835         # Look for a target and build machine specific resource!
30836         eval resource=\${builddep_alsa_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
30837         if test "x$resource" = x; then
30838             # Ok, lets instead look for a target specific resource
30839             eval resource=\${builddep_alsa_TARGET_${rewritten_target_var}}
30840         fi
30841         if test "x$resource" = x; then
30842             # Ok, lets instead look for a build specific resource
30843             eval resource=\${builddep_alsa_BUILD_${rewritten_build_var}}
30844         fi
30845         if test "x$resource" = x; then
30846             # Ok, lets instead look for a generic resource
30847             # (The alsa comes from M4 and not the shell, thus no need for eval here.)
30848             resource=${builddep_alsa}
30849         fi
30850         if test "x$resource" != x; then
30851             { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for alsa" >&5
30852 $as_echo "$as_me: Using builddeps $resource for alsa" >&6;}
30853             # If the resource in the builddeps.conf file is an existing directory,
30854             # for example /java/linux/cups
30855             if test -d ${resource}; then
30856                depdir=${resource}
30857             else
30858 
30859 # alsa is for example mymodule
30860 # $resource is for example libs/general/libmymod_1_2_3.zip
30861 # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
30862 # $with_builddeps_dir is for example /localhome/builddeps
30863 # depdir is the name of the variable into which we store the depdir, eg MYMOD
30864 # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
30865 # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
30866     filename=`basename $resource`
30867     filebase=`echo $filename | sed 's/\.[^\.]*$//'`
30868     filebase=${filename%%.*}
30869     extension=${filename#*.}
30870     installdir=$with_builddeps_dir/$filebase
30871     if test ! -f $installdir/$filename.unpacked; then
30872         { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency alsa from $with_builddeps_server/$resource and installing into $installdir" >&5
30873 $as_echo "$as_me: Downloading build dependency alsa from $with_builddeps_server/$resource and installing into $installdir" >&6;}
30874         if test ! -d $installdir; then
30875             mkdir -p $installdir
30876         fi
30877         if test ! -d $installdir; then
30878             as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
30879         fi
30880         tmpfile=`mktemp $installdir/alsa.XXXXXXXXX`
30881         touch $tmpfile
30882         if test ! -f $tmpfile; then
30883             as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
30884         fi
30885 
30886     # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
30887     # $tmpfile is the local file name for the downloaded file.
30888     VALID_TOOL=no
30889     if test "x$BDEPS_FTP" = xwget; then
30890        VALID_TOOL=yes
30891        wget -O $tmpfile $with_builddeps_server/$resource
30892     fi
30893     if test "x$BDEPS_FTP" = xlftp; then
30894        VALID_TOOL=yes
30895        lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
30896     fi
30897     if test "x$BDEPS_FTP" = xftp; then
30898         VALID_TOOL=yes
30899         FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
30900         FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
30901         FTPUSERPWD=${FTPSERVER%%@*}
30902         if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
30903             FTPUSER=${userpwd%%:*}
30904             FTPPWD=${userpwd#*@}
30905             FTPSERVER=${FTPSERVER#*@}
30906         else
30907             FTPUSER=ftp
30908             FTPPWD=ftp
30909         fi
30910         # the "pass" command does not work on some
30911         # ftp clients (read ftp.exe) but if it works,
30912         # passive mode is better!
30913         (\
30914             echo "user $FTPUSER $FTPPWD"        ;\
30915             echo "pass"                         ;\
30916             echo "bin"                          ;\
30917             echo "get $FTPPATH $tmpfile"              ;\
30918         ) | ftp -in $FTPSERVER
30919     fi
30920     if test "x$VALID_TOOL" != xyes; then
30921        as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
30922     fi
30923 
30924         mv $tmpfile $installdir/$filename
30925         if test ! -s $installdir/$filename; then
30926             as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
30927         fi
30928         case "$extension" in
30929             zip)  echo "Unzipping $installdir/$filename..."
30930                (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
30931             ;;
30932             tar.gz) echo "Untaring $installdir/$filename..."
30933                (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
30934             ;;
30935             tgz) echo "Untaring $installdir/$filename..."
30936                (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
30937             ;;
30938             *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
30939             ;;
30940         esac
30941     fi
30942     if test -f $installdir/$filename.unpacked; then
30943         depdir=$installdir
30944     fi
30945 
30946             fi
30947             # Source the builddeps file again, because in the previous command, the depdir
30948             # was updated to point at the current build dependency install directory.
30949             . $builddepsfile
30950             # Now extract variables from the builddeps.conf files.
30951             theroot=${builddep_alsa_ROOT}
30952             thecflags=${builddep_alsa_CFLAGS}
30953             thelibs=${builddep_alsa_LIBS}
30954             if test "x$depdir" = x; then
30955                 as_fn_error $? "Could not download build dependency alsa" "$LINENO" 5
30956             fi
30957             ALSA=$depdir
30958             if test "x$theroot" != x; then
30959                ALSA="$theroot"
30960             fi
30961             if test "x$thecflags" != x; then
30962                ALSA_CFLAGS="$thecflags"
30963             fi
30964             if test "x$thelibs" != x; then
30965                ALSA_LIBS="$thelibs"
30966             fi
30967             ALSA_FOUND=yes
30968             else ALSA_FOUND=no
30969 
30970         fi
30971         else ALSA_FOUND=no
30972 
30973     fi
30974 
30975         fi
30976         if test "x$ALSA_FOUND" = xno; then
30977 
30978 pkg_failed=no
30979 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ALSA" >&5
30980 $as_echo_n "checking for ALSA... " >&6; }
30981 
30982 if test -n "$ALSA_CFLAGS"; then
30983     pkg_cv_ALSA_CFLAGS="$ALSA_CFLAGS"
30984  elif test -n "$PKG_CONFIG"; then
30985     if test -n "$PKG_CONFIG" && \
30986     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
30987   ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
30988   ac_status=$?
30989   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
30990   test $ac_status = 0; }; then
30991   pkg_cv_ALSA_CFLAGS=`$PKG_CONFIG --cflags "alsa" 2>/dev/null`
30992 else
30993   pkg_failed=yes
30994 fi
30995  else
30996     pkg_failed=untried
30997 fi
30998 if test -n "$ALSA_LIBS"; then
30999     pkg_cv_ALSA_LIBS="$ALSA_LIBS"
31000  elif test -n "$PKG_CONFIG"; then
31001     if test -n "$PKG_CONFIG" && \
31002     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
31003   ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
31004   ac_status=$?
31005   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
31006   test $ac_status = 0; }; then
31007   pkg_cv_ALSA_LIBS=`$PKG_CONFIG --libs "alsa" 2>/dev/null`
31008 else
31009   pkg_failed=yes
31010 fi
31011  else
31012     pkg_failed=untried
31013 fi
31014 
31015 
31016 
31017 if test $pkg_failed = yes; then
31018 
31019 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
31020         _pkg_short_errors_supported=yes
31021 else
31022         _pkg_short_errors_supported=no
31023 fi
31024         if test $_pkg_short_errors_supported = yes; then
31025                 ALSA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "alsa" 2>&1`
31026         else
31027                 ALSA_PKG_ERRORS=`$PKG_CONFIG --print-errors "alsa" 2>&1`
31028         fi
31029         # Put the nasty error message in config.log where it belongs
31030         echo "$ALSA_PKG_ERRORS" >&5
31031 
31032         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31033 $as_echo "no" >&6; }
31034                 ALSA_FOUND=no
31035 elif test $pkg_failed = untried; then
31036         ALSA_FOUND=no
31037 else
31038         ALSA_CFLAGS=$pkg_cv_ALSA_CFLAGS
31039         ALSA_LIBS=$pkg_cv_ALSA_LIBS
31040         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
31041 $as_echo "yes" >&6; }
31042         ALSA_FOUND=yes
31043 fi
31044         fi
31045         if test "x$ALSA_FOUND" = xno; then
31046             for ac_header in alsa/asoundlib.h
31047 do :
31048   ac_fn_cxx_check_header_mongrel "$LINENO" "alsa/asoundlib.h" "ac_cv_header_alsa_asoundlib_h" "$ac_includes_default"
31049 if test "x$ac_cv_header_alsa_asoundlib_h" = xyes; then :
31050   cat >>confdefs.h <<_ACEOF
31051 #define HAVE_ALSA_ASOUNDLIB_H 1
31052 _ACEOF
31053  ALSA_FOUND=yes
31054                               ALSA_CFLAGS=-Iignoreme
31055                               ALSA_LIBS=-lasound
31056                               DEFAULT_ALSA=yes
31057 else
31058   ALSA_FOUND=no
31059 fi
31060 
31061 done
31062 
31063         fi
31064         if test "x$ALSA_FOUND" = xno; then
31065 
31066     # Print a helpful message on how to acquire the necessary build dependency.
31067     # alsa is the help tag: freetyp2, cups, pulse, alsa etc
31068     MISSING_DEPENDENCY=alsa
31069     PKGHANDLER_COMMAND=
31070 
31071     case $PKGHANDLER in
31072         apt-get)
31073                 apt_help     $MISSING_DEPENDENCY ;;
31074     yum)
31075                 yum_help     $MISSING_DEPENDENCY ;;
31076         port)
31077                 port_help    $MISSING_DEPENDENCY ;;
31078         pkgutil)
31079                 pkgutil_help $MISSING_DEPENDENCY ;;
31080         pkgadd)
31081                 pkgadd_help  $MISSING_DEPENDENCY ;;
31082     * )
31083       break ;;
31084     esac
31085 
31086     if test "x$PKGHANDLER_COMMAND" != x; then
31087         HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
31088     fi
31089 
31090             as_fn_error $? "Could not find alsa! $HELP_MSG " "$LINENO" 5
31091         fi
31092 fi
31093 
31094 
31095 
31096 
31097 
31098 
31099 
31100 ###############################################################################
31101 #
31102 # Check for the jpeg library
31103 #
31104 
31105 USE_EXTERNAL_LIBJPEG=true
31106 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -ljpeg" >&5
31107 $as_echo_n "checking for main in -ljpeg... " >&6; }
31108 if ${ac_cv_lib_jpeg_main+:} false; then :
31109   $as_echo_n "(cached) " >&6
31110 else
31111   ac_check_lib_save_LIBS=$LIBS
31112 LIBS="-ljpeg  $LIBS"
31113 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31114 /* end confdefs.h.  */
31115 
31116 
31117 int
31118 main ()
31119 {
31120 return main ();
31121   ;
31122   return 0;
31123 }
31124 _ACEOF
31125 if ac_fn_cxx_try_link "$LINENO"; then :
31126   ac_cv_lib_jpeg_main=yes
31127 else
31128   ac_cv_lib_jpeg_main=no
31129 fi
31130 rm -f core conftest.err conftest.$ac_objext \
31131     conftest$ac_exeext conftest.$ac_ext
31132 LIBS=$ac_check_lib_save_LIBS
31133 fi
31134 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_jpeg_main" >&5
31135 $as_echo "$ac_cv_lib_jpeg_main" >&6; }
31136 if test "x$ac_cv_lib_jpeg_main" = xyes; then :
31137   cat >>confdefs.h <<_ACEOF
31138 #define HAVE_LIBJPEG 1
31139 _ACEOF
31140 
31141   LIBS="-ljpeg $LIBS"
31142 
31143 else
31144    USE_EXTERNAL_LIBJPEG=false
31145                { $as_echo "$as_me:${as_lineno-$LINENO}: Will use jpeg decoder bundled with the OpenJDK source" >&5
31146 $as_echo "$as_me: Will use jpeg decoder bundled with the OpenJDK source" >&6;}
31147 
31148 fi
31149 
31150 
31151 
31152 ###############################################################################
31153 #
31154 # Check for the gif library
31155 #
31156 
31157 USE_EXTERNAL_LIBJPEG=true
31158 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lgif" >&5
31159 $as_echo_n "checking for main in -lgif... " >&6; }
31160 if ${ac_cv_lib_gif_main+:} false; then :
31161   $as_echo_n "(cached) " >&6
31162 else
31163   ac_check_lib_save_LIBS=$LIBS
31164 LIBS="-lgif  $LIBS"
31165 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31166 /* end confdefs.h.  */
31167 
31168 
31169 int
31170 main ()
31171 {
31172 return main ();
31173   ;
31174   return 0;
31175 }
31176 _ACEOF
31177 if ac_fn_cxx_try_link "$LINENO"; then :
31178   ac_cv_lib_gif_main=yes
31179 else
31180   ac_cv_lib_gif_main=no
31181 fi
31182 rm -f core conftest.err conftest.$ac_objext \
31183     conftest$ac_exeext conftest.$ac_ext
31184 LIBS=$ac_check_lib_save_LIBS
31185 fi
31186 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gif_main" >&5
31187 $as_echo "$ac_cv_lib_gif_main" >&6; }
31188 if test "x$ac_cv_lib_gif_main" = xyes; then :
31189   cat >>confdefs.h <<_ACEOF
31190 #define HAVE_LIBGIF 1
31191 _ACEOF
31192 
31193   LIBS="-lgif $LIBS"
31194 
31195 else
31196    USE_EXTERNAL_LIBGIF=false
31197                { $as_echo "$as_me:${as_lineno-$LINENO}: Will use gif decoder bundled with the OpenJDK source" >&5
31198 $as_echo "$as_me: Will use gif decoder bundled with the OpenJDK source" >&6;}
31199 
31200 fi
31201 
31202 
31203 
31204 ###############################################################################
31205 #
31206 # Check for the zlib library
31207 #
31208 
31209 
31210 # Check whether --with-zlib was given.
31211 if test "${with_zlib+set}" = set; then :
31212   withval=$with_zlib;
31213 fi
31214 
31215 
31216 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compress in -lz" >&5
31217 $as_echo_n "checking for compress in -lz... " >&6; }
31218 if ${ac_cv_lib_z_compress+:} false; then :
31219   $as_echo_n "(cached) " >&6
31220 else
31221   ac_check_lib_save_LIBS=$LIBS
31222 LIBS="-lz  $LIBS"
31223 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31224 /* end confdefs.h.  */
31225 
31226 /* Override any GCC internal prototype to avoid an error.
31227    Use char because int might match the return type of a GCC
31228    builtin and then its argument prototype would still apply.  */
31229 #ifdef __cplusplus
31230 extern "C"
31231 #endif
31232 char compress ();
31233 int
31234 main ()
31235 {
31236 return compress ();
31237   ;
31238   return 0;
31239 }
31240 _ACEOF
31241 if ac_fn_cxx_try_link "$LINENO"; then :
31242   ac_cv_lib_z_compress=yes
31243 else
31244   ac_cv_lib_z_compress=no
31245 fi
31246 rm -f core conftest.err conftest.$ac_objext \
31247     conftest$ac_exeext conftest.$ac_ext
31248 LIBS=$ac_check_lib_save_LIBS
31249 fi
31250 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_compress" >&5
31251 $as_echo "$ac_cv_lib_z_compress" >&6; }
31252 if test "x$ac_cv_lib_z_compress" = xyes; then :
31253    ZLIB_FOUND=yes
31254 else
31255    ZLIB_FOUND=no
31256 fi
31257 
31258 
31259 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which zlib to use" >&5
31260 $as_echo_n "checking for which zlib to use... " >&6; }
31261 
31262 DEFAULT_ZLIB=bundled
31263 if test "x$OPENJDK_TARGET_OS" = xmacosx; then
31264 #
31265 # On macosx default is system...on others default is
31266 #
31267     DEFAULT_ZLIB=system
31268 fi
31269 
31270 if test "x${ZLIB_FOUND}" != "xyes"; then
31271 #
31272 # If we don't find any system...set default to bundled
31273 #
31274     DEFAULT_ZLIB=bundled
31275 fi
31276 
31277 #
31278 # If user didn't specify, use DEFAULT_ZLIB
31279 #
31280 if test "x${with_zlib}" = "x"; then
31281     with_zlib=${DEFAULT_ZLIB}
31282 fi
31283 
31284 if test "x${with_zlib}" = "xbundled"; then
31285     USE_EXTERNAL_LIBZ=false
31286     { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
31287 $as_echo "bundled" >&6; }
31288 elif test "x${with_zlib}" = "xsystem"; then
31289     if test "x${ZLIB_FOUND}" = "xyes"; then
31290         USE_EXTERNAL_LIBZ=true
31291         { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
31292 $as_echo "system" >&6; }
31293     else
31294         { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
31295 $as_echo "system not found" >&6; }
31296         as_fn_error $? "--with-zlib=system specified, but no zlib found!" "$LINENO" 5
31297     fi
31298 else
31299     as_fn_error $? "Invalid value for --with-zlib: ${with_zlib}, use 'system' or 'bundled'" "$LINENO" 5
31300 fi
31301 
31302 
31303 
31304 ###############################################################################
31305 LIBZIP_CAN_USE_MMAP=true
31306 
31307 
31308 
31309 ###############################################################################
31310 #
31311 # Check if altzone exists in time.h
31312 #
31313 
31314 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31315 /* end confdefs.h.  */
31316 #include <time.h>
31317 int
31318 main ()
31319 {
31320 return (int)altzone;
31321   ;
31322   return 0;
31323 }
31324 _ACEOF
31325 if ac_fn_cxx_try_link "$LINENO"; then :
31326   has_altzone=yes
31327 else
31328   has_altzone=no
31329 fi
31330 rm -f core conftest.err conftest.$ac_objext \
31331     conftest$ac_exeext conftest.$ac_ext
31332 if test "x$has_altzone" = xyes; then
31333 
31334 $as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
31335 
31336 fi
31337 
31338 ###############################################################################
31339 #
31340 # Check the maths library
31341 #
31342 
31343 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cos in -lm" >&5
31344 $as_echo_n "checking for cos in -lm... " >&6; }
31345 if ${ac_cv_lib_m_cos+:} false; then :
31346   $as_echo_n "(cached) " >&6
31347 else
31348   ac_check_lib_save_LIBS=$LIBS
31349 LIBS="-lm  $LIBS"
31350 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31351 /* end confdefs.h.  */
31352 
31353 /* Override any GCC internal prototype to avoid an error.
31354    Use char because int might match the return type of a GCC
31355    builtin and then its argument prototype would still apply.  */
31356 #ifdef __cplusplus
31357 extern "C"
31358 #endif
31359 char cos ();
31360 int
31361 main ()
31362 {
31363 return cos ();
31364   ;
31365   return 0;
31366 }
31367 _ACEOF
31368 if ac_fn_cxx_try_link "$LINENO"; then :
31369   ac_cv_lib_m_cos=yes
31370 else
31371   ac_cv_lib_m_cos=no
31372 fi
31373 rm -f core conftest.err conftest.$ac_objext \
31374     conftest$ac_exeext conftest.$ac_ext
31375 LIBS=$ac_check_lib_save_LIBS
31376 fi
31377 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_cos" >&5
31378 $as_echo "$ac_cv_lib_m_cos" >&6; }
31379 if test "x$ac_cv_lib_m_cos" = xyes; then :
31380   cat >>confdefs.h <<_ACEOF
31381 #define HAVE_LIBM 1
31382 _ACEOF
31383 
31384   LIBS="-lm $LIBS"
31385 
31386 else
31387 
31388                   { $as_echo "$as_me:${as_lineno-$LINENO}: Maths library was not found" >&5
31389 $as_echo "$as_me: Maths library was not found" >&6;}
31390 
31391 fi
31392 
31393 
31394 
31395 ###############################################################################
31396 #
31397 # Check for libdl.so
31398 
31399 save_LIBS="$LIBS"
31400 LIBS=""
31401 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
31402 $as_echo_n "checking for dlopen in -ldl... " >&6; }
31403 if ${ac_cv_lib_dl_dlopen+:} false; then :
31404   $as_echo_n "(cached) " >&6
31405 else
31406   ac_check_lib_save_LIBS=$LIBS
31407 LIBS="-ldl  $LIBS"
31408 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31409 /* end confdefs.h.  */
31410 
31411 /* Override any GCC internal prototype to avoid an error.
31412    Use char because int might match the return type of a GCC
31413    builtin and then its argument prototype would still apply.  */
31414 #ifdef __cplusplus
31415 extern "C"
31416 #endif
31417 char dlopen ();
31418 int
31419 main ()
31420 {
31421 return dlopen ();
31422   ;
31423   return 0;
31424 }
31425 _ACEOF
31426 if ac_fn_cxx_try_link "$LINENO"; then :
31427   ac_cv_lib_dl_dlopen=yes
31428 else
31429   ac_cv_lib_dl_dlopen=no
31430 fi
31431 rm -f core conftest.err conftest.$ac_objext \
31432     conftest$ac_exeext conftest.$ac_ext
31433 LIBS=$ac_check_lib_save_LIBS
31434 fi
31435 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
31436 $as_echo "$ac_cv_lib_dl_dlopen" >&6; }
31437 if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
31438   cat >>confdefs.h <<_ACEOF
31439 #define HAVE_LIBDL 1
31440 _ACEOF
31441 
31442   LIBS="-ldl $LIBS"
31443 
31444 fi
31445 
31446 LIBDL="$LIBS"
31447 
31448 LIBS="$save_LIBS"
31449 
31450 
31451 
31452 ###############################################################################
31453 #
31454 # statically link libstdc++ before C++ ABI is stablized on Linux unless
31455 # dynamic build is configured on command line.
31456 #
31457 
31458 # Check whether --with-stdc++lib was given.
31459 if test "${with_stdc__lib+set}" = set; then :
31460   withval=$with_stdc__lib;
31461     if test "x$with_stdc__lib" != xdynamic && test "x$with_stdc__lib" != xstatic \
31462         && test "x$with_stdc__lib" != xdefault; then
31463       as_fn_error $? "Bad parameter value --with-stdc++lib=$with_stdc__lib!" "$LINENO" 5
31464     fi
31465 
31466 else
31467   with_stdc__lib=default
31468 
31469 fi
31470 
31471 
31472 if test "x$OPENJDK_TARGET_OS" = xlinux; then
31473     # Test if -lstdc++ works.
31474     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if dynamic link of stdc++ is possible" >&5
31475 $as_echo_n "checking if dynamic link of stdc++ is possible... " >&6; }
31476     ac_ext=cpp
31477 ac_cpp='$CXXCPP $CPPFLAGS'
31478 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31479 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31480 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
31481 
31482     OLD_CXXFLAGS="$CXXFLAGS"
31483     CXXFLAGS="$CXXFLAGS -lstdc++"
31484     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31485 /* end confdefs.h.  */
31486 
31487 int
31488 main ()
31489 {
31490 return 0;
31491   ;
31492   return 0;
31493 }
31494 _ACEOF
31495 if ac_fn_cxx_try_link "$LINENO"; then :
31496   has_dynamic_libstdcxx=yes
31497 else
31498   has_dynamic_libstdcxx=no
31499 fi
31500 rm -f core conftest.err conftest.$ac_objext \
31501     conftest$ac_exeext conftest.$ac_ext
31502     CXXFLAGS="$OLD_CXXFLAGS"
31503     ac_ext=cpp
31504 ac_cpp='$CXXCPP $CPPFLAGS'
31505 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31506 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31507 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
31508 
31509     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_dynamic_libstdcxx" >&5
31510 $as_echo "$has_dynamic_libstdcxx" >&6; }
31511 
31512     # Test if stdc++ can be linked statically.
31513     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static link of stdc++ is possible" >&5
31514 $as_echo_n "checking if static link of stdc++ is possible... " >&6; }
31515     STATIC_STDCXX_FLAGS="-Wl,-Bstatic -lstdc++ -lgcc -Wl,-Bdynamic"
31516     ac_ext=cpp
31517 ac_cpp='$CXXCPP $CPPFLAGS'
31518 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31519 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31520 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
31521 
31522     OLD_LIBS="$LIBS"
31523     OLD_CXX="$CXX"
31524     LIBS="$STATIC_STDCXX_FLAGS"
31525     CXX="$CC"
31526     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31527 /* end confdefs.h.  */
31528 
31529 int
31530 main ()
31531 {
31532 return 0;
31533   ;
31534   return 0;
31535 }
31536 _ACEOF
31537 if ac_fn_cxx_try_link "$LINENO"; then :
31538   has_static_libstdcxx=yes
31539 else
31540   has_static_libstdcxx=no
31541 fi
31542 rm -f core conftest.err conftest.$ac_objext \
31543     conftest$ac_exeext conftest.$ac_ext
31544     LIBS="$OLD_LIBS"
31545     CXX="$OLD_CXX"
31546     ac_ext=cpp
31547 ac_cpp='$CXXCPP $CPPFLAGS'
31548 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31549 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31550 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
31551 
31552     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_static_libstdcxx" >&5
31553 $as_echo "$has_static_libstdcxx" >&6; }
31554 
31555     if test "x$has_static_libstdcxx" = xno && test "x$has_dynamic_libstdcxx" = xno; then
31556         as_fn_error $? "Cannot link to stdc++, neither dynamically nor statically!" "$LINENO" 5
31557     fi
31558 
31559     if test "x$with_stdc__lib" = xstatic && test "x$has_static_libstdcxx" = xno; then
31560         as_fn_error $? "Static linking of libstdc++ was not possible!" "$LINENO" 5
31561     fi
31562 
31563     if test "x$with_stdc__lib" = xdynamic && test "x$has_dynamic_libstdcxx" = xno; then
31564         as_fn_error $? "Dynamic linking of libstdc++ was not possible!" "$LINENO" 5
31565     fi
31566 
31567     { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libstdc++" >&5
31568 $as_echo_n "checking how to link with libstdc++... " >&6; }
31569     # If dynamic was requested, it's available since it would fail above otherwise.
31570     # If dynamic wasn't requested, go with static unless it isn't available.
31571     if test "x$with_stdc__lib" = xdynamic || test "x$has_static_libstdcxx" = xno; then
31572         LIBCXX="$LIBCXX -lstdc++"
31573         LDCXX="$CXX"
31574         STATIC_CXX_SETTING="STATIC_CXX=false"
31575         { $as_echo "$as_me:${as_lineno-$LINENO}: result: dynamic" >&5
31576 $as_echo "dynamic" >&6; }
31577     else
31578         LIBCXX="$LIBCXX $STATIC_STDCXX_FLAGS"
31579         LDCXX="$CC"
31580         STATIC_CXX_SETTING="STATIC_CXX=true"
31581         { $as_echo "$as_me:${as_lineno-$LINENO}: result: static" >&5
31582 $as_echo "static" >&6; }
31583     fi
31584 fi
31585 
31586 
31587 # libCrun is the c++ runtime-library with SunStudio (roughly the equivalent of gcc's libstdc++.so)
31588 if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$LIBCXX" = x; then
31589     LIBCXX="/usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libCrun.so.1"
31590 fi
31591 
31592 # TODO better (platform agnostic) test
31593 if test "x$OPENJDK_TARGET_OS" = xmacosx && test "x$LIBCXX" = x && test "x$GCC" = xyes; then
31594     LIBCXX="-lstdc++"
31595 fi
31596 
31597 
31598 
31599 
31600 
31601 # After we have toolchain and the paths to all libraries (needed by msys), we can compile the fixpath helper
31602 
31603 # When using cygwin or msys, we need a wrapper binary that renames
31604 # /cygdrive/c/ arguments into c:/ arguments and peeks into
31605 # @files and rewrites these too! This wrapper binary is
31606 # called fixpath.
31607 FIXPATH=
31608 if test "x$OPENJDK_BUILD_OS" = xwindows; then
31609     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath can be created" >&5
31610 $as_echo_n "checking if fixpath can be created... " >&6; }
31611     FIXPATH_SRC="$SRC_ROOT/common/src/fixpath.c"
31612     FIXPATH_BIN="$OUTPUT_ROOT/fixpath.exe"
31613     if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
31614       FIXPATH_SRC=`$CYGPATH -m $FIXPATH_SRC`
31615       FIXPATH_BIN=`$CYGPATH -m $FIXPATH_BIN`
31616       # Important to keep the .exe suffix on Cygwin for Hotspot makefiles
31617       FIXPATH="$OUTPUT_ROOT/fixpath.exe -c"
31618     elif test "x$OPENJDK_BUILD_OS_ENV" = xwindows.msys; then
31619       FIXPATH_SRC=`cmd //c echo $FIXPATH_SRC`
31620       FIXPATH_BIN=`cmd //c echo $FIXPATH_BIN`
31621 
31622       # Take all collected prefixes and turn them into a -m/c/foo@/c/bar@... command line
31623       # @ was chosen as separator to minimize risk of other tools messing around with it
31624       all_unique_prefixes=`echo "${all_fixpath_prefixes[@]}" | tr ' ' '\n' | grep '^/./' | sort | uniq`
31625       fixpath_argument_list=`echo $all_unique_prefixes  | tr ' ' '@'`
31626 
31627       FIXPATH="$OUTPUT_ROOT/fixpath -m$fixpath_argument_list"
31628     fi
31629     rm -f $OUTPUT_ROOT/fixpath*
31630     cd $OUTPUT_ROOT
31631     $CC $FIXPATH_SRC -Fe$FIXPATH_BIN > $OUTPUT_ROOT/fixpath1.log 2>&1
31632     cd $CURDIR
31633 
31634     if test ! -x $OUTPUT_ROOT/fixpath.exe; then
31635         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31636 $as_echo "no" >&6; }
31637         cat $OUTPUT_ROOT/fixpath1.log
31638         as_fn_error $? "Could not create $OUTPUT_ROOT/fixpath.exe" "$LINENO" 5
31639     fi
31640     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
31641 $as_echo "yes" >&6; }
31642     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath.exe works" >&5
31643 $as_echo_n "checking if fixpath.exe works... " >&6; }
31644     cd $OUTPUT_ROOT
31645     $FIXPATH $CC $SRC_ROOT/common/src/fixpath.c -Fe$OUTPUT_ROOT/fixpath2.exe > $OUTPUT_ROOT/fixpath2.log 2>&1
31646     cd $CURDIR
31647     if test ! -x $OUTPUT_ROOT/fixpath2.exe; then
31648         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31649 $as_echo "no" >&6; }
31650         cat $OUTPUT_ROOT/fixpath2.log
31651         as_fn_error $? "fixpath did not work!" "$LINENO" 5
31652     fi
31653     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
31654 $as_echo "yes" >&6; }
31655     rm -f $OUTPUT_ROOT/fixpath?.??? $OUTPUT_ROOT/fixpath.obj
31656 fi
31657 
31658 
31659 
31660 
31661 ###############################################################################
31662 #
31663 # We need to do some final tweaking, when everything else is done.
31664 #
31665 ###############################################################################
31666 
31667 
31668 HOTSPOT_MAKE_ARGS="$HOTSPOT_TARGET"
31669 
31670 
31671 # The name of the Service Agent jar.
31672 SALIB_NAME="${LIBRARY_PREFIX}saproc${SHARED_LIBRARY_SUFFIX}"
31673 if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
31674   SALIB_NAME="${LIBRARY_PREFIX}sawindbg${SHARED_LIBRARY_SUFFIX}"
31675 fi
31676 
31677 
31678 
31679 
31680 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if elliptic curve crypto implementation is present" >&5
31681 $as_echo_n "checking if elliptic curve crypto implementation is present... " >&6; }
31682 
31683 if test -d "${SRC_ROOT}/jdk/src/share/native/sun/security/ec/impl"; then
31684     DISABLE_INTREE_EC=
31685     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
31686 $as_echo "yes" >&6; }
31687 else
31688     DISABLE_INTREE_EC=true
31689     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31690 $as_echo "no" >&6; }
31691 fi
31692 
31693 
31694 
31695 
31696 ###############################################################################
31697 #
31698 # Configure parts of the build that only affect the build performance,
31699 # not the result.
31700 #
31701 ###############################################################################
31702 
31703 
31704   # How many cores do we have on this build system?
31705 
31706 # Check whether --with-num-cores was given.
31707 if test "${with_num_cores+set}" = set; then :
31708   withval=$with_num_cores;
31709 fi
31710 
31711   if test "x$with_num_cores" = x; then
31712     # The number of cores were not specified, try to probe them.
31713 
31714     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for number of cores" >&5
31715 $as_echo_n "checking for number of cores... " >&6; }
31716     NUM_CORES=1
31717     FOUND_CORES=no
31718 
31719     if test -f /proc/cpuinfo; then
31720         # Looks like a Linux (or cygwin) system
31721         NUM_CORES=`cat /proc/cpuinfo  | grep -c processor`
31722         FOUND_CORES=yes
31723     elif test -x /usr/sbin/psrinfo; then
31724         # Looks like a Solaris system
31725         NUM_CORES=`LC_MESSAGES=C /usr/sbin/psrinfo -v | grep -c on-line`
31726         FOUND_CORES=yes
31727     elif test -x /usr/sbin/system_profiler; then
31728         # Looks like a MacOSX system
31729         NUM_CORES=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Cores' | awk  '{print $5}'`
31730         FOUND_CORES=yes
31731     elif test -n "$NUMBER_OF_PROCESSORS"; then
31732         # On windows, look in the env
31733         NUM_CORES=$NUMBER_OF_PROCESSORS
31734         FOUND_CORES=yes
31735     fi
31736 
31737     if test "x$FOUND_CORES" = xyes; then
31738         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NUM_CORES" >&5
31739 $as_echo "$NUM_CORES" >&6; }
31740     else
31741         { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect number of cores, defaulting to 1" >&5
31742 $as_echo "could not detect number of cores, defaulting to 1" >&6; }
31743         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This will disable all parallelism from build!" >&5
31744 $as_echo "$as_me: WARNING: This will disable all parallelism from build!" >&2;}
31745     fi
31746 
31747 
31748   else
31749     NUM_CORES=$with_num_cores
31750   fi
31751 
31752 
31753 
31754   # How much memory do we have on this build system?
31755 
31756 # Check whether --with-memory-size was given.
31757 if test "${with_memory_size+set}" = set; then :
31758   withval=$with_memory_size;
31759 fi
31760 
31761   if test "x$with_memory_size" = x; then
31762     # The memory size was not specified, try to probe it.
31763 
31764     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for memory size" >&5
31765 $as_echo_n "checking for memory size... " >&6; }
31766     # Default to 1024 MB
31767     MEMORY_SIZE=1024
31768     FOUND_MEM=no
31769 
31770     if test -f /proc/meminfo; then
31771         # Looks like a Linux (or cygwin) system
31772         MEMORY_SIZE=`cat /proc/meminfo | grep MemTotal | awk '{print $2}'`
31773         MEMORY_SIZE=`expr $MEMORY_SIZE / 1024`
31774         FOUND_MEM=yes
31775     elif test -x /usr/sbin/prtconf; then
31776         # Looks like a Solaris system
31777         MEMORY_SIZE=`/usr/sbin/prtconf | grep "Memory size" | awk '{ print $3 }'`
31778         FOUND_MEM=yes
31779     elif test -x /usr/sbin/system_profiler; then
31780         # Looks like a MacOSX system
31781         MEMORY_SIZE=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Memory' | awk  '{print $2}'`
31782         MEMORY_SIZE=`expr $MEMORY_SIZE \* 1024`
31783         FOUND_MEM=yes
31784     elif test "x$OPENJDK_BUILD_OS" = xwindows; then
31785         # Windows, but without cygwin
31786         MEMORY_SIZE=`wmic computersystem get totalphysicalmemory -value | grep = | cut -d "=" -f 2-`
31787         MEMORY_SIZE=`expr $MEMORY_SIZE / 1024 / 1024`
31788         FOUND_MEM=yes
31789     fi
31790 
31791     if test "x$FOUND_MEM" = xyes; then
31792         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MEMORY_SIZE MB" >&5
31793 $as_echo "$MEMORY_SIZE MB" >&6; }
31794     else
31795         { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect memory size, defaulting to 1024 MB" >&5
31796 $as_echo "could not detect memory size, defaulting to 1024 MB" >&6; }
31797         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This might seriously impact build performance!" >&5
31798 $as_echo "$as_me: WARNING: This might seriously impact build performance!" >&2;}
31799     fi
31800 
31801   else
31802     MEMORY_SIZE=$with_memory_size
31803   fi
31804 
31805 
31806 
31807   # Provide a decent default number of parallel jobs for make depending on
31808   # number of cores, amount of memory and machine architecture.
31809 
31810 # Check whether --with-jobs was given.
31811 if test "${with_jobs+set}" = set; then :
31812   withval=$with_jobs;
31813 fi
31814 
31815   if test "x$with_jobs" = x; then
31816     # Number of jobs was not specified, calculate.
31817     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for appropriate number of jobs to run in parallel" >&5
31818 $as_echo_n "checking for appropriate number of jobs to run in parallel... " >&6; }
31819     # Approximate memory in GB, rounding up a bit.
31820     memory_gb=`expr $MEMORY_SIZE / 1100`
31821     # Pick the lowest of memory in gb and number of cores.
31822     if test "$memory_gb" -lt "$NUM_CORES"; then
31823       JOBS="$memory_gb"
31824     else
31825       JOBS="$NUM_CORES"
31826       # On bigger machines, leave some room for other processes to run
31827       if test "$JOBS" -gt "4"; then
31828         JOBS=`expr $JOBS '*' 90 / 100`
31829       fi
31830     fi
31831     # Cap number of jobs to 16
31832     if test "$JOBS" -gt "16"; then
31833       JOBS=16
31834     fi
31835     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JOBS" >&5
31836 $as_echo "$JOBS" >&6; }
31837   else
31838     JOBS=$with_jobs
31839   fi
31840 
31841 
31842 
31843 # Setup smart javac (after cores and memory have been setup)
31844 
31845 
31846 # Check whether --with-sjavac-server-java was given.
31847 if test "${with_sjavac_server_java+set}" = set; then :
31848   withval=$with_sjavac_server_java;
31849 fi
31850 
31851 
31852 if test "x$with_sjavac_server_java" != x; then
31853     SJAVAC_SERVER_JAVA="$with_sjavac_server_java"
31854     FOUND_VERSION=`$SJAVAC_SERVER_JAVA -version 2>&1 | grep " version \""`
31855     if test "x$FOUND_VERSION" = x; then
31856         as_fn_error $? "Could not execute server java: $SJAVAC_SERVER_JAVA" "$LINENO" 5
31857     fi
31858 else
31859     SJAVAC_SERVER_JAVA=""
31860     # Hotspot specific options.
31861 
31862     # Test if -verbosegc is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
31863     # If so, then append -verbosegc to SJAVAC_SERVER_JAVA
31864     FOUND_WARN=`$JAVA -verbosegc -version 2>&1 | grep -i warn`
31865     FOUND_VERSION=`$JAVA -verbosegc -version 2>&1 | grep " version \""`
31866     if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
31867         SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -verbosegc"
31868     fi
31869 
31870     # JRockit specific options.
31871 
31872     # Test if -Xverbose:gc is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
31873     # If so, then append -Xverbose:gc to SJAVAC_SERVER_JAVA
31874     FOUND_WARN=`$JAVA -Xverbose:gc -version 2>&1 | grep -i warn`
31875     FOUND_VERSION=`$JAVA -Xverbose:gc -version 2>&1 | grep " version \""`
31876     if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
31877         SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xverbose:gc"
31878     fi
31879 
31880     SJAVAC_SERVER_JAVA="$JAVA $SJAVAC_SERVER_JAVA"
31881 fi
31882 
31883 
31884 
31885 # Check whether --with-sjavac-server-cores was given.
31886 if test "${with_sjavac_server_cores+set}" = set; then :
31887   withval=$with_sjavac_server_cores;
31888 fi
31889 
31890 if test "x$with_sjavac_server_cores" != x; then
31891     SJAVAC_SERVER_CORES="$with_sjavac_server_cores"
31892 else
31893     if test "$NUM_CORES" -gt 16; then
31894         # We set this arbitrary limit because we want to limit the heap
31895         # size of the javac server.
31896         # In the future we will make the javac compilers in the server
31897         # share more and more state, thus enabling us to use more and
31898         # more concurrent threads in the server.
31899         SJAVAC_SERVER_CORES="16"
31900     else
31901         SJAVAC_SERVER_CORES="$NUM_CORES"
31902     fi
31903 
31904     if test "$MEMORY_SIZE" -gt "17000"; then
31905         MAX_HEAP_MEM=10000
31906 
31907     # Test if -d64 is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
31908     # If so, then append -d64 to SJAVAC_SERVER_JAVA
31909     FOUND_WARN=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1 | grep -i warn`
31910     FOUND_VERSION=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1 | grep " version \""`
31911     if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
31912         SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -d64"
31913     fi
31914 
31915 
31916     # Test if -Xms10G -Xmx10G is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
31917     # If so, then append -Xms10G -Xmx10G to SJAVAC_SERVER_JAVA
31918     FOUND_WARN=`$SJAVAC_SERVER_JAVA -Xms10G -Xmx10G -version 2>&1 | grep -i warn`
31919     FOUND_VERSION=`$SJAVAC_SERVER_JAVA -Xms10G -Xmx10G -version 2>&1 | grep " version \""`
31920     if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
31921         SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms10G -Xmx10G"
31922     fi
31923 
31924     elif test "$MEMORY_SIZE" -gt "10000"; then
31925         MAX_HEAP_MEM=6000
31926 
31927     # Test if -d64 is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
31928     # If so, then append -d64 to SJAVAC_SERVER_JAVA
31929     FOUND_WARN=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1 | grep -i warn`
31930     FOUND_VERSION=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1 | grep " version \""`
31931     if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
31932         SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -d64"
31933     fi
31934 
31935 
31936     # Test if -Xms6G -Xmx6G is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
31937     # If so, then append -Xms6G -Xmx6G to SJAVAC_SERVER_JAVA
31938     FOUND_WARN=`$SJAVAC_SERVER_JAVA -Xms6G -Xmx6G -version 2>&1 | grep -i warn`
31939     FOUND_VERSION=`$SJAVAC_SERVER_JAVA -Xms6G -Xmx6G -version 2>&1 | grep " version \""`
31940     if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
31941         SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms6G -Xmx6G"
31942     fi
31943 
31944     elif test "$MEMORY_SIZE" -gt "5000"; then
31945         MAX_HEAP_MEM=3000
31946 
31947     # Test if -d64 is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
31948     # If so, then append -d64 to SJAVAC_SERVER_JAVA
31949     FOUND_WARN=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1 | grep -i warn`
31950     FOUND_VERSION=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1 | grep " version \""`
31951     if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
31952         SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -d64"
31953     fi
31954 
31955 
31956     # Test if -Xms1G -Xmx3G is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
31957     # If so, then append -Xms1G -Xmx3G to SJAVAC_SERVER_JAVA
31958     FOUND_WARN=`$SJAVAC_SERVER_JAVA -Xms1G -Xmx3G -version 2>&1 | grep -i warn`
31959     FOUND_VERSION=`$SJAVAC_SERVER_JAVA -Xms1G -Xmx3G -version 2>&1 | grep " version \""`
31960     if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
31961         SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms1G -Xmx3G"
31962     fi
31963 
31964     elif test "$MEMORY_SIZE" -gt "3800"; then
31965         MAX_HEAP_MEM=2500
31966 
31967     # Test if -Xms1G -Xmx2500M is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
31968     # If so, then append -Xms1G -Xmx2500M to SJAVAC_SERVER_JAVA
31969     FOUND_WARN=`$SJAVAC_SERVER_JAVA -Xms1G -Xmx2500M -version 2>&1 | grep -i warn`
31970     FOUND_VERSION=`$SJAVAC_SERVER_JAVA -Xms1G -Xmx2500M -version 2>&1 | grep " version \""`
31971     if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
31972         SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms1G -Xmx2500M"
31973     fi
31974 
31975     elif test "$MEMORY_SIZE" -gt "1900"; then
31976         MAX_HEAP_MEM=1200
31977 
31978     # Test if -Xms700M -Xmx1400M is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
31979     # If so, then append -Xms700M -Xmx1400M to SJAVAC_SERVER_JAVA
31980     FOUND_WARN=`$SJAVAC_SERVER_JAVA -Xms700M -Xmx1400M -version 2>&1 | grep -i warn`
31981     FOUND_VERSION=`$SJAVAC_SERVER_JAVA -Xms700M -Xmx1400M -version 2>&1 | grep " version \""`
31982     if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
31983         SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms700M -Xmx1400M"
31984     fi
31985 
31986     elif test "$MEMORY_SIZE" -gt "1000"; then
31987         MAX_HEAP_MEM=900
31988 
31989     # Test if -Xms400M -Xmx1100M is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
31990     # If so, then append -Xms400M -Xmx1100M to SJAVAC_SERVER_JAVA
31991     FOUND_WARN=`$SJAVAC_SERVER_JAVA -Xms400M -Xmx1100M -version 2>&1 | grep -i warn`
31992     FOUND_VERSION=`$SJAVAC_SERVER_JAVA -Xms400M -Xmx1100M -version 2>&1 | grep " version \""`
31993     if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
31994         SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms400M -Xmx1100M"
31995     fi
31996 
31997     else
31998         MAX_HEAP_MEM=512
31999 
32000     # Test if -Xms256M -Xmx512M is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
32001     # If so, then append -Xms256M -Xmx512M to SJAVAC_SERVER_JAVA
32002     FOUND_WARN=`$SJAVAC_SERVER_JAVA -Xms256M -Xmx512M -version 2>&1 | grep -i warn`
32003     FOUND_VERSION=`$SJAVAC_SERVER_JAVA -Xms256M -Xmx512M -version 2>&1 | grep " version \""`
32004     if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
32005         SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms256M -Xmx512M"
32006     fi
32007 
32008     fi
32009 
32010 
32011     # Test if -XX:PermSize=32m is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
32012     # If so, then append -XX:PermSize=32m to SJAVAC_SERVER_JAVA
32013     FOUND_WARN=`$SJAVAC_SERVER_JAVA -XX:PermSize=32m -version 2>&1 | grep -i warn`
32014     FOUND_VERSION=`$SJAVAC_SERVER_JAVA -XX:PermSize=32m -version 2>&1 | grep " version \""`
32015     if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
32016         SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -XX:PermSize=32m"
32017     fi
32018 
32019 
32020     # Test if -XX:MaxPermSize=160m is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
32021     # If so, then append -XX:MaxPermSize=160m to SJAVAC_SERVER_JAVA
32022     FOUND_WARN=`$SJAVAC_SERVER_JAVA -XX:MaxPermSize=160m -version 2>&1 | grep -i warn`
32023     FOUND_VERSION=`$SJAVAC_SERVER_JAVA -XX:MaxPermSize=160m -version 2>&1 | grep " version \""`
32024     if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
32025         SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -XX:MaxPermSize=160m"
32026     fi
32027 
32028 
32029     # Test if -XX:ThreadStackSize=$STACK_SIZE is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
32030     # If so, then append -XX:ThreadStackSize=$STACK_SIZE to SJAVAC_SERVER_JAVA
32031     FOUND_WARN=`$SJAVAC_SERVER_JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1 | grep -i warn`
32032     FOUND_VERSION=`$SJAVAC_SERVER_JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1 | grep " version \""`
32033     if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
32034         SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -XX:ThreadStackSize=$STACK_SIZE"
32035     fi
32036 
32037 
32038     MAX_COMPILERS_IN_HEAP=`expr $MAX_HEAP_MEM / 501`
32039     if test "$SJAVAC_SERVER_CORES" -gt "$MAX_COMPILERS_IN_HEAP"; then
32040         { $as_echo "$as_me:${as_lineno-$LINENO}: checking if number of server cores must be reduced" >&5
32041 $as_echo_n "checking if number of server cores must be reduced... " >&6; }
32042         SJAVAC_SERVER_CORES="$MAX_COMPILERS_IN_HEAP"
32043         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, to $SJAVAC_SERVER_CORES with max heap size $MAX_HEAP_MEM MB" >&5
32044 $as_echo "yes, to $SJAVAC_SERVER_CORES with max heap size $MAX_HEAP_MEM MB" >&6; }
32045     fi
32046 fi
32047 
32048 
32049 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use sjavac" >&5
32050 $as_echo_n "checking whether to use sjavac... " >&6; }
32051 # Check whether --enable-sjavac was given.
32052 if test "${enable_sjavac+set}" = set; then :
32053   enableval=$enable_sjavac; ENABLE_SJAVAC="${enableval}"
32054 else
32055   ENABLE_SJAVAC='no'
32056 fi
32057 
32058 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_SJAVAC" >&5
32059 $as_echo "$ENABLE_SJAVAC" >&6; }
32060 
32061 
32062 if test "x$ENABLE_SJAVAC" = xyes; then
32063     SJAVAC_SERVER_DIR="$OUTPUT_ROOT/javacservers"
32064 else
32065     SJAVAC_SERVER_DIR=
32066 fi
32067 
32068 
32069 
32070 
32071 # Can the C/C++ compiler use precompiled headers?
32072 
32073 
32074 ###############################################################################
32075 #
32076 # Can the C/C++ compiler use precompiled headers?
32077 #
32078 # Check whether --enable-precompiled-headers was given.
32079 if test "${enable_precompiled_headers+set}" = set; then :
32080   enableval=$enable_precompiled_headers; ENABLE_PRECOMPH=${enable_precompiled_headers}
32081 else
32082   ENABLE_PRECOMPH=yes
32083 fi
32084 
32085 
32086 USE_PRECOMPILED_HEADER=1
32087 if test "x$ENABLE_PRECOMPH" = xno; then
32088     USE_PRECOMPILED_HEADER=0
32089 fi
32090 
32091 if test "x$ENABLE_PRECOMPH" = xyes; then
32092     # Check that the compiler actually supports precomp headers.
32093     if test "x$GCC" = xyes; then
32094          { $as_echo "$as_me:${as_lineno-$LINENO}: checking that precompiled headers work" >&5
32095 $as_echo_n "checking that precompiled headers work... " >&6; }
32096          echo "int alfa();" > conftest.h
32097          $CXX -x c++-header conftest.h -o conftest.hpp.gch 2>&5 >&5
32098          if test ! -f conftest.hpp.gch; then
32099              USE_PRECOMPILED_HEADER=0
32100              { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32101 $as_echo "no" >&6; }
32102          else
32103              { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
32104 $as_echo "yes" >&6; }
32105          fi
32106          rm -f conftest.h conftest.hpp.gch
32107     fi
32108 fi
32109 
32110 
32111 
32112 
32113 # Setup use of ccache, if available
32114 
32115     # Check whether --enable-ccache was given.
32116 if test "${enable_ccache+set}" = set; then :
32117   enableval=$enable_ccache; ENABLE_CCACHE=${enable_ccache}
32118 else
32119   ENABLE_CCACHE=yes
32120 fi
32121 
32122     if test "x$ENABLE_CCACHE" = xyes; then
32123         # Extract the first word of "ccache", so it can be a program name with args.
32124 set dummy ccache; ac_word=$2
32125 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32126 $as_echo_n "checking for $ac_word... " >&6; }
32127 if ${ac_cv_path_CCACHE+:} false; then :
32128   $as_echo_n "(cached) " >&6
32129 else
32130   case $CCACHE in
32131   [\\/]* | ?:[\\/]*)
32132   ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
32133   ;;
32134   *)
32135   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32136 for as_dir in $PATH
32137 do
32138   IFS=$as_save_IFS
32139   test -z "$as_dir" && as_dir=.
32140     for ac_exec_ext in '' $ac_executable_extensions; do
32141   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
32142     ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
32143     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32144     break 2
32145   fi
32146 done
32147   done
32148 IFS=$as_save_IFS
32149 
32150   ;;
32151 esac
32152 fi
32153 CCACHE=$ac_cv_path_CCACHE
32154 if test -n "$CCACHE"; then
32155   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
32156 $as_echo "$CCACHE" >&6; }
32157 else
32158   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32159 $as_echo "no" >&6; }
32160 fi
32161 
32162 
32163     else
32164         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ccache" >&5
32165 $as_echo_n "checking for ccache... " >&6; }
32166         { $as_echo "$as_me:${as_lineno-$LINENO}: result: explicitly disabled" >&5
32167 $as_echo "explicitly disabled" >&6; }
32168         CCACHE=
32169     fi
32170 
32171 
32172 
32173 # Check whether --with-ccache-dir was given.
32174 if test "${with_ccache_dir+set}" = set; then :
32175   withval=$with_ccache_dir;
32176 fi
32177 
32178 
32179     if test "x$with_ccache_dir" != x; then
32180         # When using a non home ccache directory, assume the use is to share ccache files
32181         # with other users. Thus change the umask.
32182         SET_CCACHE_DIR="CCACHE_DIR=$with_ccache_dir CCACHE_UMASK=002"
32183     fi
32184     CCACHE_FOUND=""
32185     if test "x$CCACHE" != x; then
32186 
32187     if test "x$CCACHE" != x; then
32188         CCACHE_FOUND="true"
32189         # Only use ccache if it is 3.1.4 or later, which supports
32190         # precompiled headers.
32191         { $as_echo "$as_me:${as_lineno-$LINENO}: checking if ccache supports precompiled headers" >&5
32192 $as_echo_n "checking if ccache supports precompiled headers... " >&6; }
32193         HAS_GOOD_CCACHE=`($CCACHE --version | head -n 1 | grep -E 3.1.[456789]) 2> /dev/null`
32194         if test "x$HAS_GOOD_CCACHE" = x; then
32195             { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, disabling ccache" >&5
32196 $as_echo "no, disabling ccache" >&6; }
32197             CCACHE=
32198         else
32199             { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
32200 $as_echo "yes" >&6; }
32201             { $as_echo "$as_me:${as_lineno-$LINENO}: checking if C-compiler supports ccache precompiled headers" >&5
32202 $as_echo_n "checking if C-compiler supports ccache precompiled headers... " >&6; }
32203             PUSHED_FLAGS="$CXXFLAGS"
32204             CXXFLAGS="-fpch-preprocess $CXXFLAGS"
32205             cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32206 /* end confdefs.h.  */
32207 
32208 int
32209 main ()
32210 {
32211 
32212   ;
32213   return 0;
32214 }
32215 _ACEOF
32216 if ac_fn_cxx_try_compile "$LINENO"; then :
32217   CC_KNOWS_CCACHE_TRICK=yes
32218 else
32219   CC_KNOWS_CCACHE_TRICK=no
32220 fi
32221 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
32222             CXXFLAGS="$PUSHED_FLAGS"
32223             if test "x$CC_KNOWS_CCACHE_TRICK" = xyes; then
32224                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
32225 $as_echo "yes" >&6; }
32226             else
32227                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, disabling ccaching of precompiled headers" >&5
32228 $as_echo "no, disabling ccaching of precompiled headers" >&6; }
32229                 CCACHE=
32230             fi
32231         fi
32232     fi
32233 
32234     if test "x$CCACHE" != x; then
32235         CCACHE_SLOPPINESS=time_macros
32236         CCACHE="CCACHE_COMPRESS=1 $SET_CCACHE_DIR CCACHE_SLOPPINESS=$CCACHE_SLOPPINESS $CCACHE"
32237         CCACHE_FLAGS=-fpch-preprocess
32238 
32239         if test "x$SET_CCACHE_DIR" != x; then
32240             mkdir -p $CCACHE_DIR > /dev/null 2>&1
32241             chmod a+rwxs $CCACHE_DIR > /dev/null 2>&1
32242         fi
32243     fi
32244 
32245     fi
32246 
32247 
32248 ###############################################################################
32249 #
32250 # And now the finish...
32251 #
32252 ###############################################################################
32253 
32254 # Check for some common pitfalls
32255 
32256   if test x"$OPENJDK_BUILD_OS" = xwindows; then
32257     file_to_test="$SRC_ROOT/LICENSE"
32258     if test `$STAT -c '%a' "$file_to_test"` -lt 400; then
32259       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
32260     fi
32261   fi
32262 
32263 
32264 
32265 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if build directory is on local disk" >&5
32266 $as_echo_n "checking if build directory is on local disk... " >&6; }
32267 
32268         # df -l lists only local disks; if the given directory is not found then
32269         # a non-zero exit code is given
32270   if test "x$DF" = x; then
32271     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32272       # msys does not have df; use Windows "net use" instead.
32273       IS_NETWORK_DISK=`net use | grep \`pwd -W | cut -d ":" -f 1 | tr a-z A-Z\`:`
32274       if test "x$IS_NETWORK_DISK" = x; then
32275         OUTPUT_DIR_IS_LOCAL="yes"
32276       else
32277         OUTPUT_DIR_IS_LOCAL="no"
32278       fi
32279     else
32280       # No df here, say it's local
32281       OUTPUT_DIR_IS_LOCAL="yes"
32282     fi
32283   else
32284     if $DF -l $OUTPUT_ROOT > /dev/null 2>&1; then
32285       OUTPUT_DIR_IS_LOCAL="yes"
32286     else
32287       OUTPUT_DIR_IS_LOCAL="no"
32288     fi
32289   fi
32290 
32291 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_DIR_IS_LOCAL" >&5
32292 $as_echo "$OUTPUT_DIR_IS_LOCAL" >&6; }
32293 
32294 
32295 
32296 # Check if the user has any old-style ALT_ variables set.
32297 FOUND_ALT_VARIABLES=`env | grep ^ALT_`
32298 
32299 # Before generating output files, test if they exist. If they do, this is a reconfigure.
32300 # Since we can't properly handle the dependencies for this, warn the user about the situation
32301 if test -e $OUTPUT_ROOT/spec.gmk; then
32302   IS_RECONFIGURE=yes
32303 else
32304   IS_RECONFIGURE=no
32305 fi
32306 
32307 if test -e $SRC_ROOT/build/.hide-configure-performance-hints; then
32308   HIDE_PERFORMANCE_HINTS=yes
32309 else
32310   HIDE_PERFORMANCE_HINTS=no
32311   # Hide it the next time around...
32312   $TOUCH $SRC_ROOT/build/.hide-configure-performance-hints > /dev/null 2>&1
32313 fi
32314 
32315 
32316 
32317 # At the end, call the custom hook. (Dummy macro if no custom sources available)
32318 
32319 
32320 # We're messing a bit with internal autoconf variables to put the config.status
32321 # in the output directory instead of the current directory.
32322 CONFIG_STATUS="$OUTPUT_ROOT/config.status"
32323 # Create the actual output files. Now the main work of configure is done.
32324 cat >confcache <<\_ACEOF
32325 # This file is a shell script that caches the results of configure
32326 # tests run on this system so they can be shared between configure
32327 # scripts and configure runs, see configure's option --config-cache.
32328 # It is not useful on other systems.  If it contains results you don't
32329 # want to keep, you may remove or edit it.
32330 #
32331 # config.status only pays attention to the cache file if you give it
32332 # the --recheck option to rerun configure.
32333 #
32334 # `ac_cv_env_foo' variables (set or unset) will be overridden when
32335 # loading this file, other *unset* `ac_cv_foo' will be assigned the
32336 # following values.
32337 
32338 _ACEOF
32339 
32340 # The following way of writing the cache mishandles newlines in values,
32341 # but we know of no workaround that is simple, portable, and efficient.
32342 # So, we kill variables containing newlines.
32343 # Ultrix sh set writes to stderr and can't be redirected directly,
32344 # and sets the high bit in the cache file unless we assign to the vars.
32345 (
32346   for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
32347     eval ac_val=\$$ac_var
32348     case $ac_val in #(
32349     *${as_nl}*)
32350       case $ac_var in #(
32351       *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
32352 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
32353       esac
32354       case $ac_var in #(
32355       _ | IFS | as_nl) ;; #(
32356       BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
32357       *) { eval $ac_var=; unset $ac_var;} ;;
32358       esac ;;
32359     esac
32360   done
32361 
32362   (set) 2>&1 |
32363     case $as_nl`(ac_space=' '; set) 2>&1` in #(
32364     *${as_nl}ac_space=\ *)
32365       # `set' does not quote correctly, so add quotes: double-quote
32366       # substitution turns \\\\ into \\, and sed turns \\ into \.
32367       sed -n \
32368         "s/'/'\\\\''/g;
32369           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
32370       ;; #(
32371     *)
32372       # `set' quotes correctly as required by POSIX, so do not add quotes.
32373       sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
32374       ;;
32375     esac |
32376     sort
32377 ) |
32378   sed '
32379      /^ac_cv_env_/b end
32380      t clear
32381      :clear
32382      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
32383      t end
32384      s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
32385      :end' >>confcache
32386 if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
32387   if test -w "$cache_file"; then
32388     if test "x$cache_file" != "x/dev/null"; then
32389       { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
32390 $as_echo "$as_me: updating cache $cache_file" >&6;}
32391       if test ! -f "$cache_file" || test -h "$cache_file"; then
32392         cat confcache >"$cache_file"
32393       else
32394         case $cache_file in #(
32395         */* | ?:*)
32396           mv -f confcache "$cache_file"$$ &&
32397           mv -f "$cache_file"$$ "$cache_file" ;; #(
32398         *)
32399           mv -f confcache "$cache_file" ;;
32400         esac
32401       fi
32402     fi
32403   else
32404     { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
32405 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
32406   fi
32407 fi
32408 rm -f confcache
32409 
32410 test "x$prefix" = xNONE && prefix=$ac_default_prefix
32411 # Let make expand exec_prefix.
32412 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
32413 
32414 DEFS=-DHAVE_CONFIG_H
32415 
32416 ac_libobjs=
32417 ac_ltlibobjs=
32418 U=
32419 for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
32420   # 1. Remove the extension, and $U if already installed.
32421   ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
32422   ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
32423   # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
32424   #    will be set to the directory where LIBOBJS objects are built.
32425   as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
32426   as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
32427 done
32428 LIBOBJS=$ac_libobjs
32429 
32430 LTLIBOBJS=$ac_ltlibobjs
32431 
32432 
32433 
32434 : "${CONFIG_STATUS=./config.status}"
32435 ac_write_fail=0
32436 ac_clean_files_save=$ac_clean_files
32437 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
32438 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
32439 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
32440 as_write_fail=0
32441 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
32442 #! $SHELL
32443 # Generated by $as_me.
32444 # Run this file to recreate the current configuration.
32445 # Compiler output produced by configure, useful for debugging
32446 # configure, is in config.log if it exists.
32447 
32448 debug=false
32449 ac_cs_recheck=false
32450 ac_cs_silent=false
32451 
32452 SHELL=\${CONFIG_SHELL-$SHELL}
32453 export SHELL
32454 _ASEOF
32455 cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
32456 ## -------------------- ##
32457 ## M4sh Initialization. ##
32458 ## -------------------- ##
32459 
32460 # Be more Bourne compatible
32461 DUALCASE=1; export DUALCASE # for MKS sh
32462 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
32463   emulate sh
32464   NULLCMD=:
32465   # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
32466   # is contrary to our usage.  Disable this feature.
32467   alias -g '${1+"$@"}'='"$@"'
32468   setopt NO_GLOB_SUBST
32469 else
32470   case `(set -o) 2>/dev/null` in #(
32471   *posix*) :
32472     set -o posix ;; #(
32473   *) :
32474      ;;
32475 esac
32476 fi
32477 
32478 
32479 as_nl='
32480 '
32481 export as_nl
32482 # Printing a long string crashes Solaris 7 /usr/bin/printf.
32483 as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
32484 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
32485 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
32486 # Prefer a ksh shell builtin over an external printf program on Solaris,
32487 # but without wasting forks for bash or zsh.
32488 if test -z "$BASH_VERSION$ZSH_VERSION" \
32489     && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
32490   as_echo='print -r --'
32491   as_echo_n='print -rn --'
32492 elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
32493   as_echo='printf %s\n'
32494   as_echo_n='printf %s'
32495 else
32496   if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
32497     as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
32498     as_echo_n='/usr/ucb/echo -n'
32499   else
32500     as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
32501     as_echo_n_body='eval
32502       arg=$1;
32503       case $arg in #(
32504       *"$as_nl"*)
32505         expr "X$arg" : "X\\(.*\\)$as_nl";
32506         arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
32507       esac;
32508       expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
32509     '
32510     export as_echo_n_body
32511     as_echo_n='sh -c $as_echo_n_body as_echo'
32512   fi
32513   export as_echo_body
32514   as_echo='sh -c $as_echo_body as_echo'
32515 fi
32516 
32517 # The user is always right.
32518 if test "${PATH_SEPARATOR+set}" != set; then
32519   PATH_SEPARATOR=:
32520   (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
32521     (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
32522       PATH_SEPARATOR=';'
32523   }
32524 fi
32525 
32526 
32527 # IFS
32528 # We need space, tab and new line, in precisely that order.  Quoting is
32529 # there to prevent editors from complaining about space-tab.
32530 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
32531 # splitting by setting IFS to empty value.)
32532 IFS=" ""        $as_nl"
32533 
32534 # Find who we are.  Look in the path if we contain no directory separator.
32535 as_myself=
32536 case $0 in #((
32537   *[\\/]* ) as_myself=$0 ;;
32538   *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32539 for as_dir in $PATH
32540 do
32541   IFS=$as_save_IFS
32542   test -z "$as_dir" && as_dir=.
32543     test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
32544   done
32545 IFS=$as_save_IFS
32546 
32547      ;;
32548 esac
32549 # We did not find ourselves, most probably we were run as `sh COMMAND'
32550 # in which case we are not to be found in the path.
32551 if test "x$as_myself" = x; then
32552   as_myself=$0
32553 fi
32554 if test ! -f "$as_myself"; then
32555   $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
32556   exit 1
32557 fi
32558 
32559 # Unset variables that we do not need and which cause bugs (e.g. in
32560 # pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
32561 # suppresses any "Segmentation fault" message there.  '((' could
32562 # trigger a bug in pdksh 5.2.14.
32563 for as_var in BASH_ENV ENV MAIL MAILPATH
32564 do eval test x\${$as_var+set} = xset \
32565   && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
32566 done
32567 PS1='$ '
32568 PS2='> '
32569 PS4='+ '
32570 
32571 # NLS nuisances.
32572 LC_ALL=C
32573 export LC_ALL
32574 LANGUAGE=C
32575 export LANGUAGE
32576 
32577 # CDPATH.
32578 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
32579 
32580 
32581 # as_fn_error STATUS ERROR [LINENO LOG_FD]
32582 # ----------------------------------------
32583 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
32584 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
32585 # script with STATUS, using 1 if that was 0.
32586 as_fn_error ()
32587 {
32588   as_status=$1; test $as_status -eq 0 && as_status=1
32589   if test "$4"; then
32590     as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
32591     $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
32592   fi
32593   $as_echo "$as_me: error: $2" >&2
32594   as_fn_exit $as_status
32595 } # as_fn_error
32596 
32597 
32598 # as_fn_set_status STATUS
32599 # -----------------------
32600 # Set $? to STATUS, without forking.
32601 as_fn_set_status ()
32602 {
32603   return $1
32604 } # as_fn_set_status
32605 
32606 # as_fn_exit STATUS
32607 # -----------------
32608 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
32609 as_fn_exit ()
32610 {
32611   set +e
32612   as_fn_set_status $1
32613   exit $1
32614 } # as_fn_exit
32615 
32616 # as_fn_unset VAR
32617 # ---------------
32618 # Portably unset VAR.
32619 as_fn_unset ()
32620 {
32621   { eval $1=; unset $1;}
32622 }
32623 as_unset=as_fn_unset
32624 # as_fn_append VAR VALUE
32625 # ----------------------
32626 # Append the text in VALUE to the end of the definition contained in VAR. Take
32627 # advantage of any shell optimizations that allow amortized linear growth over
32628 # repeated appends, instead of the typical quadratic growth present in naive
32629 # implementations.
32630 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
32631   eval 'as_fn_append ()
32632   {
32633     eval $1+=\$2
32634   }'
32635 else
32636   as_fn_append ()
32637   {
32638     eval $1=\$$1\$2
32639   }
32640 fi # as_fn_append
32641 
32642 # as_fn_arith ARG...
32643 # ------------------
32644 # Perform arithmetic evaluation on the ARGs, and store the result in the
32645 # global $as_val. Take advantage of shells that can avoid forks. The arguments
32646 # must be portable across $(()) and expr.
32647 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
32648   eval 'as_fn_arith ()
32649   {
32650     as_val=$(( $* ))
32651   }'
32652 else
32653   as_fn_arith ()
32654   {
32655     as_val=`expr "$@" || test $? -eq 1`
32656   }
32657 fi # as_fn_arith
32658 
32659 
32660 if expr a : '\(a\)' >/dev/null 2>&1 &&
32661    test "X`expr 00001 : '.*\(...\)'`" = X001; then
32662   as_expr=expr
32663 else
32664   as_expr=false
32665 fi
32666 
32667 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
32668   as_basename=basename
32669 else
32670   as_basename=false
32671 fi
32672 
32673 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
32674   as_dirname=dirname
32675 else
32676   as_dirname=false
32677 fi
32678 
32679 as_me=`$as_basename -- "$0" ||
32680 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
32681          X"$0" : 'X\(//\)$' \| \
32682          X"$0" : 'X\(/\)' \| . 2>/dev/null ||
32683 $as_echo X/"$0" |
32684     sed '/^.*\/\([^/][^/]*\)\/*$/{
32685             s//\1/
32686             q
32687           }
32688           /^X\/\(\/\/\)$/{
32689             s//\1/
32690             q
32691           }
32692           /^X\/\(\/\).*/{
32693             s//\1/
32694             q
32695           }
32696           s/.*/./; q'`
32697 
32698 # Avoid depending upon Character Ranges.
32699 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
32700 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
32701 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
32702 as_cr_digits='0123456789'
32703 as_cr_alnum=$as_cr_Letters$as_cr_digits
32704 
32705 ECHO_C= ECHO_N= ECHO_T=
32706 case `echo -n x` in #(((((
32707 -n*)
32708   case `echo 'xy\c'` in
32709   *c*) ECHO_T=' ';;     # ECHO_T is single tab character.
32710   xy)  ECHO_C='\c';;
32711   *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
32712        ECHO_T=' ';;
32713   esac;;
32714 *)
32715   ECHO_N='-n';;
32716 esac
32717 
32718 rm -f conf$$ conf$$.exe conf$$.file
32719 if test -d conf$$.dir; then
32720   rm -f conf$$.dir/conf$$.file
32721 else
32722   rm -f conf$$.dir
32723   mkdir conf$$.dir 2>/dev/null
32724 fi
32725 if (echo >conf$$.file) 2>/dev/null; then
32726   if ln -s conf$$.file conf$$ 2>/dev/null; then
32727     as_ln_s='ln -s'
32728     # ... but there are two gotchas:
32729     # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
32730     # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
32731     # In both cases, we have to default to `cp -p'.
32732     ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
32733       as_ln_s='cp -p'
32734   elif ln conf$$.file conf$$ 2>/dev/null; then
32735     as_ln_s=ln
32736   else
32737     as_ln_s='cp -p'
32738   fi
32739 else
32740   as_ln_s='cp -p'
32741 fi
32742 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
32743 rmdir conf$$.dir 2>/dev/null
32744 
32745 
32746 # as_fn_mkdir_p
32747 # -------------
32748 # Create "$as_dir" as a directory, including parents if necessary.
32749 as_fn_mkdir_p ()
32750 {
32751 
32752   case $as_dir in #(
32753   -*) as_dir=./$as_dir;;
32754   esac
32755   test -d "$as_dir" || eval $as_mkdir_p || {
32756     as_dirs=
32757     while :; do
32758       case $as_dir in #(
32759       *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
32760       *) as_qdir=$as_dir;;
32761       esac
32762       as_dirs="'$as_qdir' $as_dirs"
32763       as_dir=`$as_dirname -- "$as_dir" ||
32764 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
32765          X"$as_dir" : 'X\(//\)[^/]' \| \
32766          X"$as_dir" : 'X\(//\)$' \| \
32767          X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
32768 $as_echo X"$as_dir" |
32769     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
32770             s//\1/
32771             q
32772           }
32773           /^X\(\/\/\)[^/].*/{
32774             s//\1/
32775             q
32776           }
32777           /^X\(\/\/\)$/{
32778             s//\1/
32779             q
32780           }
32781           /^X\(\/\).*/{
32782             s//\1/
32783             q
32784           }
32785           s/.*/./; q'`
32786       test -d "$as_dir" && break
32787     done
32788     test -z "$as_dirs" || eval "mkdir $as_dirs"
32789   } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
32790 
32791 
32792 } # as_fn_mkdir_p
32793 if mkdir -p . 2>/dev/null; then
32794   as_mkdir_p='mkdir -p "$as_dir"'
32795 else
32796   test -d ./-p && rmdir ./-p
32797   as_mkdir_p=false
32798 fi
32799 
32800 if test -x / >/dev/null 2>&1; then
32801   as_test_x='test -x'
32802 else
32803   if ls -dL / >/dev/null 2>&1; then
32804     as_ls_L_option=L
32805   else
32806     as_ls_L_option=
32807   fi
32808   as_test_x='
32809     eval sh -c '\''
32810       if test -d "$1"; then
32811         test -d "$1/.";
32812       else
32813         case $1 in #(
32814         -*)set "./$1";;
32815         esac;
32816         case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
32817         ???[sx]*):;;*)false;;esac;fi
32818     '\'' sh
32819   '
32820 fi
32821 as_executable_p=$as_test_x
32822 
32823 # Sed expression to map a string onto a valid CPP name.
32824 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
32825 
32826 # Sed expression to map a string onto a valid variable name.
32827 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
32828 
32829 
32830 exec 6>&1
32831 ## ----------------------------------- ##
32832 ## Main body of $CONFIG_STATUS script. ##
32833 ## ----------------------------------- ##
32834 _ASEOF
32835 test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
32836 
32837 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
32838 # Save the log message, to keep $0 and so on meaningful, and to
32839 # report actual input values of CONFIG_FILES etc. instead of their
32840 # values after options handling.
32841 ac_log="
32842 This file was extended by OpenJDK $as_me jdk8, which was
32843 generated by GNU Autoconf 2.68.  Invocation command line was
32844 
32845   CONFIG_FILES    = $CONFIG_FILES
32846   CONFIG_HEADERS  = $CONFIG_HEADERS
32847   CONFIG_LINKS    = $CONFIG_LINKS
32848   CONFIG_COMMANDS = $CONFIG_COMMANDS
32849   $ $0 $@
32850 
32851 on `(hostname || uname -n) 2>/dev/null | sed 1q`
32852 "
32853 
32854 _ACEOF
32855 
32856 case $ac_config_files in *"
32857 "*) set x $ac_config_files; shift; ac_config_files=$*;;
32858 esac
32859 
32860 case $ac_config_headers in *"
32861 "*) set x $ac_config_headers; shift; ac_config_headers=$*;;
32862 esac
32863 
32864 
32865 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
32866 # Files that config.status was made for.
32867 config_files="$ac_config_files"
32868 config_headers="$ac_config_headers"
32869 
32870 _ACEOF
32871 
32872 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
32873 ac_cs_usage="\
32874 \`$as_me' instantiates files and other configuration actions
32875 from templates according to the current configuration.  Unless the files
32876 and actions are specified as TAGs, all are instantiated by default.
32877 
32878 Usage: $0 [OPTION]... [TAG]...
32879 
32880   -h, --help       print this help, then exit
32881   -V, --version    print version number and configuration settings, then exit
32882       --config     print configuration, then exit
32883   -q, --quiet, --silent
32884                    do not print progress messages
32885   -d, --debug      don't remove temporary files
32886       --recheck    update $as_me by reconfiguring in the same conditions
32887       --file=FILE[:TEMPLATE]
32888                    instantiate the configuration file FILE
32889       --header=FILE[:TEMPLATE]
32890                    instantiate the configuration header FILE
32891 
32892 Configuration files:
32893 $config_files
32894 
32895 Configuration headers:
32896 $config_headers
32897 
32898 Report bugs to <build-dev@openjdk.java.net>.
32899 OpenJDK home page: <http://openjdk.java.net>."
32900 
32901 _ACEOF
32902 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
32903 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
32904 ac_cs_version="\\
32905 OpenJDK config.status jdk8
32906 configured by $0, generated by GNU Autoconf 2.68,
32907   with options \\"\$ac_cs_config\\"
32908 
32909 Copyright (C) 2010 Free Software Foundation, Inc.
32910 This config.status script is free software; the Free Software Foundation
32911 gives unlimited permission to copy, distribute and modify it."
32912 
32913 ac_pwd='$ac_pwd'
32914 srcdir='$srcdir'
32915 AWK='$AWK'
32916 test -n "\$AWK" || AWK=awk
32917 _ACEOF
32918 
32919 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
32920 # The default lists apply if the user does not specify any file.
32921 ac_need_defaults=:
32922 while test $# != 0
32923 do
32924   case $1 in
32925   --*=?*)
32926     ac_option=`expr "X$1" : 'X\([^=]*\)='`
32927     ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
32928     ac_shift=:
32929     ;;
32930   --*=)
32931     ac_option=`expr "X$1" : 'X\([^=]*\)='`
32932     ac_optarg=
32933     ac_shift=:
32934     ;;
32935   *)
32936     ac_option=$1
32937     ac_optarg=$2
32938     ac_shift=shift
32939     ;;
32940   esac
32941 
32942   case $ac_option in
32943   # Handling of the options.
32944   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
32945     ac_cs_recheck=: ;;
32946   --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
32947     $as_echo "$ac_cs_version"; exit ;;
32948   --config | --confi | --conf | --con | --co | --c )
32949     $as_echo "$ac_cs_config"; exit ;;
32950   --debug | --debu | --deb | --de | --d | -d )
32951     debug=: ;;
32952   --file | --fil | --fi | --f )
32953     $ac_shift
32954     case $ac_optarg in
32955     *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
32956     '') as_fn_error $? "missing file argument" ;;
32957     esac
32958     as_fn_append CONFIG_FILES " '$ac_optarg'"
32959     ac_need_defaults=false;;
32960   --header | --heade | --head | --hea )
32961     $ac_shift
32962     case $ac_optarg in
32963     *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
32964     esac
32965     as_fn_append CONFIG_HEADERS " '$ac_optarg'"
32966     ac_need_defaults=false;;
32967   --he | --h)
32968     # Conflict between --help and --header
32969     as_fn_error $? "ambiguous option: \`$1'
32970 Try \`$0 --help' for more information.";;
32971   --help | --hel | -h )
32972     $as_echo "$ac_cs_usage"; exit ;;
32973   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
32974   | -silent | --silent | --silen | --sile | --sil | --si | --s)
32975     ac_cs_silent=: ;;
32976 
32977   # This is an error.
32978   -*) as_fn_error $? "unrecognized option: \`$1'
32979 Try \`$0 --help' for more information." ;;
32980 
32981   *) as_fn_append ac_config_targets " $1"
32982      ac_need_defaults=false ;;
32983 
32984   esac
32985   shift
32986 done
32987 
32988 ac_configure_extra_args=
32989 
32990 if $ac_cs_silent; then
32991   exec 6>/dev/null
32992   ac_configure_extra_args="$ac_configure_extra_args --silent"
32993 fi
32994 
32995 _ACEOF
32996 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
32997 if \$ac_cs_recheck; then
32998   set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
32999   shift
33000   \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
33001   CONFIG_SHELL='$SHELL'
33002   export CONFIG_SHELL
33003   exec "\$@"
33004 fi
33005 
33006 _ACEOF
33007 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
33008 exec 5>>config.log
33009 {
33010   echo
33011   sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
33012 ## Running $as_me. ##
33013 _ASBOX
33014   $as_echo "$ac_log"
33015 } >&5
33016 
33017 _ACEOF
33018 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
33019 _ACEOF
33020 
33021 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
33022 
33023 # Handling of arguments.
33024 for ac_config_target in $ac_config_targets
33025 do
33026   case $ac_config_target in
33027     "$OUTPUT_ROOT/config.h") CONFIG_HEADERS="$CONFIG_HEADERS $OUTPUT_ROOT/config.h:$AUTOCONF_DIR/config.h.in" ;;
33028     "$OUTPUT_ROOT/spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in" ;;
33029     "$OUTPUT_ROOT/hotspot-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in" ;;
33030     "$OUTPUT_ROOT/bootcycle-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in" ;;
33031     "$OUTPUT_ROOT/compare.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in" ;;
33032     "$OUTPUT_ROOT/spec.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.sh:$AUTOCONF_DIR/spec.sh.in" ;;
33033     "$OUTPUT_ROOT/Makefile") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in" ;;
33034 
33035   *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
33036   esac
33037 done
33038 
33039 
33040 # If the user did not use the arguments to specify the items to instantiate,
33041 # then the envvar interface is used.  Set only those that are not.
33042 # We use the long form for the default assignment because of an extremely
33043 # bizarre bug on SunOS 4.1.3.
33044 if $ac_need_defaults; then
33045   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
33046   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
33047 fi
33048 
33049 # Have a temporary directory for convenience.  Make it in the build tree
33050 # simply because there is no reason against having it here, and in addition,
33051 # creating and moving files from /tmp can sometimes cause problems.
33052 # Hook for its removal unless debugging.
33053 # Note that there is a small window in which the directory will not be cleaned:
33054 # after its creation but before its name has been assigned to `$tmp'.
33055 $debug ||
33056 {
33057   tmp= ac_tmp=
33058   trap 'exit_status=$?
33059   : "${ac_tmp:=$tmp}"
33060   { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
33061 ' 0
33062   trap 'as_fn_exit 1' 1 2 13 15
33063 }
33064 # Create a (secure) tmp directory for tmp files.
33065 
33066 {
33067   tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
33068   test -d "$tmp"
33069 }  ||
33070 {
33071   tmp=./conf$$-$RANDOM
33072   (umask 077 && mkdir "$tmp")
33073 } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
33074 ac_tmp=$tmp
33075 
33076 # Set up the scripts for CONFIG_FILES section.
33077 # No need to generate them if there are no CONFIG_FILES.
33078 # This happens for instance with `./config.status config.h'.
33079 if test -n "$CONFIG_FILES"; then
33080 
33081 
33082 ac_cr=`echo X | tr X '\015'`
33083 # On cygwin, bash can eat \r inside `` if the user requested igncr.
33084 # But we know of no other shell where ac_cr would be empty at this
33085 # point, so we can use a bashism as a fallback.
33086 if test "x$ac_cr" = x; then
33087   eval ac_cr=\$\'\\r\'
33088 fi
33089 ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
33090 if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
33091   ac_cs_awk_cr='\\r'
33092 else
33093   ac_cs_awk_cr=$ac_cr
33094 fi
33095 
33096 echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
33097 _ACEOF
33098 
33099 
33100 {
33101   echo "cat >conf$$subs.awk <<_ACEOF" &&
33102   echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
33103   echo "_ACEOF"
33104 } >conf$$subs.sh ||
33105   as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
33106 ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
33107 ac_delim='%!_!# '
33108 for ac_last_try in false false false false false :; do
33109   . ./conf$$subs.sh ||
33110     as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
33111 
33112   ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
33113   if test $ac_delim_n = $ac_delim_num; then
33114     break
33115   elif $ac_last_try; then
33116     as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
33117   else
33118     ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
33119   fi
33120 done
33121 rm -f conf$$subs.sh
33122 
33123 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
33124 cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
33125 _ACEOF
33126 sed -n '
33127 h
33128 s/^/S["/; s/!.*/"]=/
33129 p
33130 g
33131 s/^[^!]*!//
33132 :repl
33133 t repl
33134 s/'"$ac_delim"'$//
33135 t delim
33136 :nl
33137 h
33138 s/\(.\{148\}\)..*/\1/
33139 t more1
33140 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
33141 p
33142 n
33143 b repl
33144 :more1
33145 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
33146 p
33147 g
33148 s/.\{148\}//
33149 t nl
33150 :delim
33151 h
33152 s/\(.\{148\}\)..*/\1/
33153 t more2
33154 s/["\\]/\\&/g; s/^/"/; s/$/"/
33155 p
33156 b
33157 :more2
33158 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
33159 p
33160 g
33161 s/.\{148\}//
33162 t delim
33163 ' <conf$$subs.awk | sed '
33164 /^[^""]/{
33165   N
33166   s/\n//
33167 }
33168 ' >>$CONFIG_STATUS || ac_write_fail=1
33169 rm -f conf$$subs.awk
33170 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
33171 _ACAWK
33172 cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
33173   for (key in S) S_is_set[key] = 1
33174   FS = ""
33175 
33176 }
33177 {
33178   line = $ 0
33179   nfields = split(line, field, "@")
33180   substed = 0
33181   len = length(field[1])
33182   for (i = 2; i < nfields; i++) {
33183     key = field[i]
33184     keylen = length(key)
33185     if (S_is_set[key]) {
33186       value = S[key]
33187       line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
33188       len += length(value) + length(field[++i])
33189       substed = 1
33190     } else
33191       len += 1 + keylen
33192   }
33193 
33194   print line
33195 }
33196 
33197 _ACAWK
33198 _ACEOF
33199 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
33200 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
33201   sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
33202 else
33203   cat
33204 fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
33205   || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
33206 _ACEOF
33207 
33208 # VPATH may cause trouble with some makes, so we remove sole $(srcdir),
33209 # ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
33210 # trailing colons and then remove the whole line if VPATH becomes empty
33211 # (actually we leave an empty line to preserve line numbers).
33212 if test "x$srcdir" = x.; then
33213   ac_vpsub='/^[  ]*VPATH[        ]*=[    ]*/{
33214 h
33215 s///
33216 s/^/:/
33217 s/[      ]*$/:/
33218 s/:\$(srcdir):/:/g
33219 s/:\${srcdir}:/:/g
33220 s/:@srcdir@:/:/g
33221 s/^:*//
33222 s/:*$//
33223 x
33224 s/\(=[   ]*\).*/\1/
33225 G
33226 s/\n//
33227 s/^[^=]*=[       ]*$//
33228 }'
33229 fi
33230 
33231 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
33232 fi # test -n "$CONFIG_FILES"
33233 
33234 # Set up the scripts for CONFIG_HEADERS section.
33235 # No need to generate them if there are no CONFIG_HEADERS.
33236 # This happens for instance with `./config.status Makefile'.
33237 if test -n "$CONFIG_HEADERS"; then
33238 cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
33239 BEGIN {
33240 _ACEOF
33241 
33242 # Transform confdefs.h into an awk script `defines.awk', embedded as
33243 # here-document in config.status, that substitutes the proper values into
33244 # config.h.in to produce config.h.
33245 
33246 # Create a delimiter string that does not exist in confdefs.h, to ease
33247 # handling of long lines.
33248 ac_delim='%!_!# '
33249 for ac_last_try in false false :; do
33250   ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
33251   if test -z "$ac_tt"; then
33252     break
33253   elif $ac_last_try; then
33254     as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
33255   else
33256     ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
33257   fi
33258 done
33259 
33260 # For the awk script, D is an array of macro values keyed by name,
33261 # likewise P contains macro parameters if any.  Preserve backslash
33262 # newline sequences.
33263 
33264 ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
33265 sed -n '
33266 s/.\{148\}/&'"$ac_delim"'/g
33267 t rset
33268 :rset
33269 s/^[     ]*#[    ]*define[       ][      ]*/ /
33270 t def
33271 d
33272 :def
33273 s/\\$//
33274 t bsnl
33275 s/["\\]/\\&/g
33276 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[     ]*\(.*\)/P["\1"]="\2"\
33277 D["\1"]=" \3"/p
33278 s/^ \('"$ac_word_re"'\)[         ]*\(.*\)/D["\1"]=" \2"/p
33279 d
33280 :bsnl
33281 s/["\\]/\\&/g
33282 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[     ]*\(.*\)/P["\1"]="\2"\
33283 D["\1"]=" \3\\\\\\n"\\/p
33284 t cont
33285 s/^ \('"$ac_word_re"'\)[         ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
33286 t cont
33287 d
33288 :cont
33289 n
33290 s/.\{148\}/&'"$ac_delim"'/g
33291 t clear
33292 :clear
33293 s/\\$//
33294 t bsnlc
33295 s/["\\]/\\&/g; s/^/"/; s/$/"/p
33296 d
33297 :bsnlc
33298 s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
33299 b cont
33300 ' <confdefs.h | sed '
33301 s/'"$ac_delim"'/"\\\
33302 "/g' >>$CONFIG_STATUS || ac_write_fail=1
33303 
33304 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
33305   for (key in D) D_is_set[key] = 1
33306   FS = ""
33307 }
33308 /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
33309   line = \$ 0
33310   split(line, arg, " ")
33311   if (arg[1] == "#") {
33312     defundef = arg[2]
33313     mac1 = arg[3]
33314   } else {
33315     defundef = substr(arg[1], 2)
33316     mac1 = arg[2]
33317   }
33318   split(mac1, mac2, "(") #)
33319   macro = mac2[1]
33320   prefix = substr(line, 1, index(line, defundef) - 1)
33321   if (D_is_set[macro]) {
33322     # Preserve the white space surrounding the "#".
33323     print prefix "define", macro P[macro] D[macro]
33324     next
33325   } else {
33326     # Replace #undef with comments.  This is necessary, for example,
33327     # in the case of _POSIX_SOURCE, which is predefined and required
33328     # on some systems where configure will not decide to define it.
33329     if (defundef == "undef") {
33330       print "/*", prefix defundef, macro, "*/"
33331       next
33332     }
33333   }
33334 }
33335 { print }
33336 _ACAWK
33337 _ACEOF
33338 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
33339   as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
33340 fi # test -n "$CONFIG_HEADERS"
33341 
33342 
33343 eval set X "  :F $CONFIG_FILES  :H $CONFIG_HEADERS    "
33344 shift
33345 for ac_tag
33346 do
33347   case $ac_tag in
33348   :[FHLC]) ac_mode=$ac_tag; continue;;
33349   esac
33350   case $ac_mode$ac_tag in
33351   :[FHL]*:*);;
33352   :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
33353   :[FH]-) ac_tag=-:-;;
33354   :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
33355   esac
33356   ac_save_IFS=$IFS
33357   IFS=:
33358   set x $ac_tag
33359   IFS=$ac_save_IFS
33360   shift
33361   ac_file=$1
33362   shift
33363 
33364   case $ac_mode in
33365   :L) ac_source=$1;;
33366   :[FH])
33367     ac_file_inputs=
33368     for ac_f
33369     do
33370       case $ac_f in
33371       -) ac_f="$ac_tmp/stdin";;
33372       *) # Look for the file first in the build tree, then in the source tree
33373          # (if the path is not absolute).  The absolute path cannot be DOS-style,
33374          # because $ac_f cannot contain `:'.
33375          test -f "$ac_f" ||
33376            case $ac_f in
33377            [\\/$]*) false;;
33378            *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
33379            esac ||
33380            as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
33381       esac
33382       case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
33383       as_fn_append ac_file_inputs " '$ac_f'"
33384     done
33385 
33386     # Let's still pretend it is `configure' which instantiates (i.e., don't
33387     # use $as_me), people would be surprised to read:
33388     #    /* config.h.  Generated by config.status.  */
33389     configure_input='Generated from '`
33390           $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
33391         `' by configure.'
33392     if test x"$ac_file" != x-; then
33393       configure_input="$ac_file.  $configure_input"
33394       { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
33395 $as_echo "$as_me: creating $ac_file" >&6;}
33396     fi
33397     # Neutralize special characters interpreted by sed in replacement strings.
33398     case $configure_input in #(
33399     *\&* | *\|* | *\\* )
33400        ac_sed_conf_input=`$as_echo "$configure_input" |
33401        sed 's/[\\\\&|]/\\\\&/g'`;; #(
33402     *) ac_sed_conf_input=$configure_input;;
33403     esac
33404 
33405     case $ac_tag in
33406     *:-:* | *:-) cat >"$ac_tmp/stdin" \
33407       || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
33408     esac
33409     ;;
33410   esac
33411 
33412   ac_dir=`$as_dirname -- "$ac_file" ||
33413 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
33414          X"$ac_file" : 'X\(//\)[^/]' \| \
33415          X"$ac_file" : 'X\(//\)$' \| \
33416          X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
33417 $as_echo X"$ac_file" |
33418     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
33419             s//\1/
33420             q
33421           }
33422           /^X\(\/\/\)[^/].*/{
33423             s//\1/
33424             q
33425           }
33426           /^X\(\/\/\)$/{
33427             s//\1/
33428             q
33429           }
33430           /^X\(\/\).*/{
33431             s//\1/
33432             q
33433           }
33434           s/.*/./; q'`
33435   as_dir="$ac_dir"; as_fn_mkdir_p
33436   ac_builddir=.
33437 
33438 case "$ac_dir" in
33439 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
33440 *)
33441   ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
33442   # A ".." for each directory in $ac_dir_suffix.
33443   ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
33444   case $ac_top_builddir_sub in
33445   "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
33446   *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
33447   esac ;;
33448 esac
33449 ac_abs_top_builddir=$ac_pwd
33450 ac_abs_builddir=$ac_pwd$ac_dir_suffix
33451 # for backward compatibility:
33452 ac_top_builddir=$ac_top_build_prefix
33453 
33454 case $srcdir in
33455   .)  # We are building in place.
33456     ac_srcdir=.
33457     ac_top_srcdir=$ac_top_builddir_sub
33458     ac_abs_top_srcdir=$ac_pwd ;;
33459   [\\/]* | ?:[\\/]* )  # Absolute name.
33460     ac_srcdir=$srcdir$ac_dir_suffix;
33461     ac_top_srcdir=$srcdir
33462     ac_abs_top_srcdir=$srcdir ;;
33463   *) # Relative name.
33464     ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
33465     ac_top_srcdir=$ac_top_build_prefix$srcdir
33466     ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
33467 esac
33468 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
33469 
33470 
33471   case $ac_mode in
33472   :F)
33473   #
33474   # CONFIG_FILE
33475   #
33476 
33477 _ACEOF
33478 
33479 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
33480 # If the template does not know about datarootdir, expand it.
33481 # FIXME: This hack should be removed a few years after 2.60.
33482 ac_datarootdir_hack=; ac_datarootdir_seen=
33483 ac_sed_dataroot='
33484 /datarootdir/ {
33485   p
33486   q
33487 }
33488 /@datadir@/p
33489 /@docdir@/p
33490 /@infodir@/p
33491 /@localedir@/p
33492 /@mandir@/p'
33493 case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
33494 *datarootdir*) ac_datarootdir_seen=yes;;
33495 *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
33496   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
33497 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
33498 _ACEOF
33499 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
33500   ac_datarootdir_hack='
33501   s&@datadir@&$datadir&g
33502   s&@docdir@&$docdir&g
33503   s&@infodir@&$infodir&g
33504   s&@localedir@&$localedir&g
33505   s&@mandir@&$mandir&g
33506   s&\\\${datarootdir}&$datarootdir&g' ;;
33507 esac
33508 _ACEOF
33509 
33510 # Neutralize VPATH when `$srcdir' = `.'.
33511 # Shell code in configure.ac might set extrasub.
33512 # FIXME: do we really want to maintain this feature?
33513 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
33514 ac_sed_extra="$ac_vpsub
33515 $extrasub
33516 _ACEOF
33517 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
33518 :t
33519 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
33520 s|@configure_input@|$ac_sed_conf_input|;t t
33521 s&@top_builddir@&$ac_top_builddir_sub&;t t
33522 s&@top_build_prefix@&$ac_top_build_prefix&;t t
33523 s&@srcdir@&$ac_srcdir&;t t
33524 s&@abs_srcdir@&$ac_abs_srcdir&;t t
33525 s&@top_srcdir@&$ac_top_srcdir&;t t
33526 s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
33527 s&@builddir@&$ac_builddir&;t t
33528 s&@abs_builddir@&$ac_abs_builddir&;t t
33529 s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
33530 $ac_datarootdir_hack
33531 "
33532 eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
33533   >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
33534 
33535 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
33536   { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
33537   { ac_out=`sed -n '/^[  ]*datarootdir[  ]*:*=/p' \
33538       "$ac_tmp/out"`; test -z "$ac_out"; } &&
33539   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
33540 which seems to be undefined.  Please make sure it is defined" >&5
33541 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
33542 which seems to be undefined.  Please make sure it is defined" >&2;}
33543 
33544   rm -f "$ac_tmp/stdin"
33545   case $ac_file in
33546   -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
33547   *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
33548   esac \
33549   || as_fn_error $? "could not create $ac_file" "$LINENO" 5
33550  ;;
33551   :H)
33552   #
33553   # CONFIG_HEADER
33554   #
33555   if test x"$ac_file" != x-; then
33556     {
33557       $as_echo "/* $configure_input  */" \
33558       && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
33559     } >"$ac_tmp/config.h" \
33560       || as_fn_error $? "could not create $ac_file" "$LINENO" 5
33561     if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
33562       { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
33563 $as_echo "$as_me: $ac_file is unchanged" >&6;}
33564     else
33565       rm -f "$ac_file"
33566       mv "$ac_tmp/config.h" "$ac_file" \
33567         || as_fn_error $? "could not create $ac_file" "$LINENO" 5
33568     fi
33569   else
33570     $as_echo "/* $configure_input  */" \
33571       && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
33572       || as_fn_error $? "could not create -" "$LINENO" 5
33573   fi
33574  ;;
33575 
33576 
33577   esac
33578 
33579 done # for ac_tag
33580 
33581 
33582 as_fn_exit 0
33583 _ACEOF
33584 ac_clean_files=$ac_clean_files_save
33585 
33586 test $ac_write_fail = 0 ||
33587   as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
33588 
33589 
33590 # configure is writing to config.log, and then calls config.status.
33591 # config.status does its own redirection, appending to config.log.
33592 # Unfortunately, on DOS this fails, as config.log is still kept open
33593 # by configure, so config.status won't be able to write to it; its
33594 # output is simply discarded.  So we exec the FD to /dev/null,
33595 # effectively closing config.log, so it can be properly (re)opened and
33596 # appended to by config.status.  When coming back to configure, we
33597 # need to make the FD available again.
33598 if test "$no_create" != yes; then
33599   ac_cs_success=:
33600   ac_config_status_args=
33601   test "$silent" = yes &&
33602     ac_config_status_args="$ac_config_status_args --quiet"
33603   exec 5>/dev/null
33604   $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
33605   exec 5>>config.log
33606   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
33607   # would make configure fail if this is the last instruction.
33608   $ac_cs_success || as_fn_exit 1
33609 fi
33610 if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
33611   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
33612 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
33613 fi
33614 
33615 
33616 # Make the compare script executable
33617 $CHMOD +x $OUTPUT_ROOT/compare.sh
33618 
33619 # Finally output some useful information to the user
33620 
33621 # Finally output some useful information to the user
33622 
33623 if test "x$CCACHE_FOUND" != x; then
33624         if  test "x$HAS_GOOD_CCACHE" = x; then
33625                 CCACHE_STATUS="installed, but disabled (version older than 3.1.4)"
33626                 CCACHE_HELP_MSG="You have ccache installed, but it is a version prior to 3.1.4. Try upgrading."
33627         else
33628                 CCACHE_STATUS="installed and in use"
33629         fi
33630 else
33631         if test "x$GCC" = xyes; then
33632                 CCACHE_STATUS="not installed (consider installing)"
33633                 CCACHE_HELP_MSG="You do not have ccache installed. Try installing it."
33634         else
33635                 CCACHE_STATUS="not available for your system"
33636         fi
33637 fi
33638 
33639 printf "\n"
33640 printf "====================================================\n"
33641 printf "A new configuration has been successfully created in\n"
33642 printf "$OUTPUT_ROOT\n"
33643 if test "x$CONFIGURE_COMMAND_LINE" != x; then
33644         printf "using configure arguments '$CONFIGURE_COMMAND_LINE'.\n"
33645 else
33646         printf "using default settings.\n"
33647 fi
33648 
33649 printf "\n"
33650 printf "Configuration summary:\n"
33651 printf "* Debug level:    $DEBUG_LEVEL\n"
33652 printf "* JDK variant:    $JDK_VARIANT\n"
33653 printf "* JVM variants:   $with_jvm_variants\n"
33654 printf "* OpenJDK target: OS: $OPENJDK_TARGET_OS, CPU architecture: $OPENJDK_TARGET_CPU_ARCH, address length: $OPENJDK_TARGET_CPU_BITS\n"
33655 
33656 printf "\n"
33657 printf "Tools summary:\n"
33658 if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
33659   printf "* Environment:    $WINDOWS_ENV_VENDOR version $WINDOWS_ENV_VERSION (root at $WINDOWS_ENV_ROOT_PATH)\n"
33660 fi
33661 printf "* Boot JDK:       $BOOT_JDK_VERSION (at $BOOT_JDK)\n"
33662 printf "* C Compiler:     $CC_VENDOR version $CC_VERSION (at $CC)\n"
33663 printf "* C++ Compiler:   $CXX_VENDOR version $CXX_VERSION (at $CXX)\n"
33664 
33665 printf "\n"
33666 printf "Build performance summary:\n"
33667 printf "* Cores to use:   $JOBS\n"
33668 printf "* Memory limit:   $MEMORY_SIZE MB\n"
33669 printf "* ccache status:  $CCACHE_STATUS\n"
33670 printf "\n"
33671 
33672 if test "x$CCACHE_HELP_MSG" != x && test "x$HIDE_PERFORMANCE_HINTS" = "xno"; then
33673         printf "Build performance tip: ccache gives a tremendous speedup for C++ recompilations.\n"
33674         printf "$CCACHE_HELP_MSG\n"
33675 
33676     # Print a helpful message on how to acquire the necessary build dependency.
33677     # ccache is the help tag: freetyp2, cups, pulse, alsa etc
33678     MISSING_DEPENDENCY=ccache
33679     PKGHANDLER_COMMAND=
33680 
33681     case $PKGHANDLER in
33682         apt-get)
33683                 apt_help     $MISSING_DEPENDENCY ;;
33684     yum)
33685                 yum_help     $MISSING_DEPENDENCY ;;
33686         port)
33687                 port_help    $MISSING_DEPENDENCY ;;
33688         pkgutil)
33689                 pkgutil_help $MISSING_DEPENDENCY ;;
33690         pkgadd)
33691                 pkgadd_help  $MISSING_DEPENDENCY ;;
33692     * )
33693       break ;;
33694     esac
33695 
33696     if test "x$PKGHANDLER_COMMAND" != x; then
33697         HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
33698     fi
33699 
33700         printf "$HELP_MSG\n"
33701         printf "\n"
33702 fi
33703 
33704 if test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = "xyes"; then
33705         printf "NOTE: You have requested to build more than one version of the JVM, which\n"
33706         printf "will result in longer build times.\n"
33707         printf "\n"
33708 fi
33709 
33710 if test "x$FOUND_ALT_VARIABLES" != "x"; then
33711         printf "WARNING: You have old-style ALT_ environment variables set.\n"
33712         printf "These are not respected, and will be ignored. It is recommended\n"
33713         printf "that you clean your environment. The following variables are set:\n"
33714         printf "$FOUND_ALT_VARIABLES\n"
33715         printf "\n"
33716 fi
33717 
33718 if test "x$OUTPUT_DIR_IS_LOCAL" != "xyes"; then
33719         printf "WARNING: Your build output directory is not on a local disk.\n"
33720         printf "This will severely degrade build performance!\n"
33721         printf "It is recommended that you create an output directory on a local disk,\n"
33722         printf "and run the configure script again from that directory.\n"
33723         printf "\n"
33724 fi
33725 
33726 if test "x$IS_RECONFIGURE" = "xyes"; then
33727         printf "WARNING: The result of this configuration has overridden an older\n"
33728         printf "configuration. You *should* run 'make clean' to make sure you get a\n"
33729         printf "proper build. Failure to do so might result in strange build problems.\n"
33730         printf "\n"
33731 fi
33732